ISHRC.FindObservationByName

Description

This function returns the observation by the specified name.

Syntax

object.FindObservationByName(aName)

Part Attribute Type Description
object Required
The object always implements the ISHRC interface
aName In, Required
string
The name of the observation

Return Value

ISHRObservation

Returns the observation by the specified name.

Example

Display the number of the CDO forms, their names and observations found by the specified name.

sub main
  Dim aPatient
  Dim aFilter
  Dim aCDOForms, aCDOForm
  Dim aObs
  Dim i
  Dim aMessage

  Set aPatient = Profile.SelectPatient
  set aFilter = Profile.CreateCdoFormFilter
  aFilter.PatientId = aPatient.Id
  set aCDOForms = Profile.LoadCdoForms(aFilter) ' ISHRObservations
    aMessage = "CDO Forms (Count = " & aCDOForms.Count & "):"
    
  for i = 0 to aCDOForms.Count - 1  
    set aCDOForm = aCDOForms.Item(i) 'ISHRObservation
    aMessage = aMessage & vbNewLine & (i + 1) & ") " & aCDOForm.Name & VbNewLine
    
    set aObs = aCDOForm.AsHRC.FindObservationByName("Provider Name")
    if not aObs is nothing then
      aMessage = aMessage & vbNewLine & " *** " & aObs.AsString & VbNewLine     
    end if  
  next  
  Profile.MsgBox(aMessage)
end sub   
Note:

In Profile Client v8 on User Interface Observation Names can be found in Clinical > Medical Record > Results or in Clinical > Review Results.

Version information

Added in v7.8.0