ISHRC.SetConcept

Description

This function links the specified concept to the HRC.

Syntax

object.SetConcept aConcept

Part Attribute Type Description
object Required
The object always implements the ISHRC interface
aConcept In, Required
The concept

Example

Replace the specified concepts linked to the observations.

sub main
  Dim aPatient
  Dim aFilter
  Dim aCDOForms, aCDOForm
  Dim aConcepts
  Dim aNewConcept
  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 & "):"
    
  set aFilter = Profile.CreateConceptsFilter
  aFilter.AddConceptRef "IH", "z..UB", False
  set aConcepts = Profile.LoadConcepts(aFilter)
  set aNewConcept = aConcepts.Item(0)    
      
  for i = 0 to aCDOForms.Count - 1  
    set aCDOForm = aCDOForms.Item(i) 'ISHRObservation
    ProcessHRC aCDOForm.AsHRC, aNewConcept
    aMessage = aMessage & vbNewLine & (i + 1) & ") " & aCDOForm.Name & " - processed"      
  next  
  Profile.MsgBox(aMessage)
end sub

sub ProcessHRI(aHRI, aNewConcept)
  if (aHRI.TermsetCode = "IH" and aHRI.ConceptCode = "z..2T") then
    aHRI.SetConcept aNewConcept
  end if
end sub

sub ProcessHRC(aHRC, aNewConcept)
  Dim i
  Dim aObs 

  if (aHRC.TermsetCode = "IH" and aHRC.ConceptCode = "z..2T") then
    aHRC.SetConcept aNewConcept
  end if
  
  for i = 0 to aHRC.Count - 1
    set aObs = aHRC.Item(i)
    if aObs.IsHRI then
      ProcessHRI aObs.AsHRI, aNewConcept
    else          
      ProcessHRC aObs.AsHRC, aNewConcept
    end if 
  next
end sub 
Note: In Profile Client v8 on User Interface HRC Concept cannot be found.

See also

Version information

Added in v8.3.0