ISHRObservation.SetConceptCode

Description

This function links the concept specified by its code to the HR Observation.

Syntax

object.SetConceptCode aTermsetCode, aConceptCode

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

Example

Replace the specified concepts linked to the observations.

sub main
  Dim aPatient
  Dim aFilter
  Dim aHRObservations, aHRObservation
  Dim aConcepts, aNewConcept  
  Dim aMessage
  Dim i   

  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

  aMessage = "HR Observations Count: " & aHRObservations.Count & vbNewLine

  for i = 0 to aHRObservations.Count - 1
    set aHRObservation = aHRObservations.Item(i)
    if (aHRObservation.TermsetCode = "IH" and aHRObservation.ConceptCode = "IH006") then
      aHRObservation.SetConceptCode "IH", "IH005"
    end if
  next

  for i = 0 to aHRObservations.Count - 1
    set aHRObservation = aHRObservations.Item(i)
    aMessage = aMessage & vbNewLine & (i + 1) & ") " &_
      "Name: " & aHRObservation.Name & vbNewLine &_
      "   Code: " & aHRObservation.Code & vbNewLine &_
      "   Concept Code: " & aHRObservation.ConceptCode & vbNewLine &_
      "   Is Deleted: " & aHRObservation.IsDeleted & vbNewLine &_
      "   Termset Code: " & aHRObservation.TermsetCode & vbNewLine &_
      "   GUID: " & aHRObservation.GUID & vbNewLine &_
      "   ID: " & aHRObservation.ID & vbNewLine
  next
  Profile.MsgBox(aMessage)
end sub    
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 v8.3.0