This function links the concept specified by its code to the HRC.
object.SetConceptCode
aTermsetCode, aConceptCode
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISHRC interface |
|
aTermsetCode |
In, Required | string |
The termset code of the concept |
aConceptCode |
In, Required | string |
The code of the concept |
Replace the specified concepts linked to the observations.
sub main
Dim aPatient
Dim aFilter
Dim aCDOForms, aCDOForm
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 & " - processing"
ProcessHRC(aCDOForm.AsHRC)
next
Profile.MsgBox(aMessage)
end sub
sub ProcessHRI(aHRI)
if (aHRI.TermsetCode = "IH" and aHRI.ConceptCode = "zE.FF") then
aHRI.SetConceptCode "IH", "z..2T"
end if
end sub
sub ProcessHRC(aHRC)
Dim i
Dim aObs
if (aHRC.TermsetCode = "IH" and aHRC.ConceptCode = "zE.FF") then
aHRC.SetConceptCode "IH", "z..2T"
end if
for i = 0 to aHRC.Count - 1
set aObs = aHRC.Item(i)
if aObs.IsHRI then
ProcessHRI(aObs.AsHRI)
else
ProcessHRC(aObs.AsHRC)
end if
next
end sub