This function deletes the specified HRC.
object.Delete
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISHRC interface |
Delete the specified HRC and HRI.
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.ConceptCode = "zZ.0XL" and aHRI.TermsetCode = "IH") then
aHRI.Delete
end if
end sub
sub ProcessHRC(aHRC)
Dim i
Dim aObs
if (aHRC.ConceptCode = "zZ.0X9" and aHRC.TermsetCode = "IH") then
aHRC.Delete
else
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 if
end sub
In Profile Client v8 on User Interface HRC can be found in
or in .