ISHRObservations.FindItemByCode

Description

This function returns the HR Observation from the collection by the specified concept linked to it.

Syntax

object.FindItemByCode(aTermsetCode, aConceptCode)

Part Attribute Type Description
object Required
The object always implements the ISHRObservations interface
aTermsetCode In, Required
string
The termset code of the concept
aConceptCode In, Required
string
The code of the concept

Return Value

ISHRObservation

Returns the HR observation by its and concept.

Example

Display the name of the observation found by the specified concept.

Dim aPatient
Dim aFilter
Dim aHRObservations, aHRObservation
Dim aTermsetCode
Dim aConceptCode  
Dim aMessage

Set aPatient = Profile.SelectPatient
set aFilter = Profile.CreateObservationFilter
aFilter.PatientId = aPatient.ID 
aFilter.DateFrom = #01/01/2019#
aFilter.DateTo = #01/01/2020#
set aHRObservations = aFilter.Load

aTermsetCode = "IH"
aConceptCode = "IH006"

set aHRObservation = aHRObservations.FindItemByCode(aTermsetCode, aConceptCode)

if aHRObservation is nothing then
  aMessage = "There is no HR Observation with the specified code"
else  
  aMessage = "The name of HR Observation with termset code '" & aTermsetCode &_
    "' and concept code '" & aConceptCode & "' is '" & aHRObservation.Name & "'" 
end if  

Profile.MsgBox(aMessage)  
Note:

In Profile Client v8 on User Interface Concept can be found in Organisation > Work Centre > Work > Manual Trans > Edit Transactions > Item > Modify > Item Properties > Concept and in Clinical > Medical Record > Measures > Edit Measurement > Concept.

Version information

Added in v7.8.0