Interventions linked to the objective version.
object.Visits
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISRecallObjectiveVers interface |
Display the patient's interventions linked to the objective version.
sub main
Dim aPatient
Dim aRecallPlans
Dim aPlan
Dim i
Dim aObjectives
Dim aObjective
Dim aObjectiveOnDate
Dim aMessage
Set aPatient = Profile.SelectPatient
set aRecallPlans = aPatient.RecallPlans
aVersionDate = #04/06/2019 11:16#
if aRecallPlans.Count = 0 then
Profile.MsgBox("The patient has no care plans!")
exit sub
end if
for each aPlan in aRecallPlans
set aObjectives = aPlan.RecallObjectives
aMessage = aMessage & vbNewLine & "PLAN: '" & aPlan.Description & "'" & vbNewLine
for i = 0 to aObjectives.Count - 1
set aObjective = aObjectives.Item(i)
set aObjectiveOnDate = aObjective.VersionOnDate(aVersionDate)
aMessage = aMessage &_
MakeObjectiveDescription(aPatient, " ACTUAL OBJECTIVE VERSION: ", aObjective) &_
MakeObjectiveDescription(aPatient, " OBJECTIVE VERSION ON DATE: ", aObjectiveOnDate)
next ' aObjective
next ' aPlan
Profile.MsgBox(aMessage)
end sub
function MakeObjectiveDescription(aPatient, aInfo, aObjectiveInstance)
aMessage = aInfo
if aObjectiveInstance is nothing then
aMessage = aMessage & " UNASSIGNED" & vbNewLine
else
set aVisits = aObjectiveInstance.Visits
aMessage = aMessage & aObjectiveInstance.DisplayName & vbNewLine &_
" INTERVENTIONS COUNT: " & aVisits.Count & vbNewLine
for each aVisit in aVisits
aMessage = aMessage & " - " & aVisit.Description & vbNewLine
next
end if
MakeObjectiveDescription = aMessage
end function
In Profile Client v8 on User Interface Interventions can be found in
.