This function returns the version of the care plan objective on the specified date.
object.VersionOnDate(aSnapshotDate)
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISRecallObjective interface |
|
aSnapshotDate |
In, Required | DateTime |
The date of the returned version |
Display the most recent version of the care plan objective and the version on the specified date.
Dim aPatient
Dim aRecallPlans
Dim aMessage
Dim aPlan
Dim i
Dim aObjectives
Dim aObjective
Dim aObjectiveOnDate
Set aPatient = Profile.SelectPatient
set aRecallPlans = aPatient.RecallPlans
aOnDate = #03/29/2019#
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 & "'"
if aObjectives.Count = 0 then
aMessage = aMessage & vbNewLine & " NO OBJECTIVES! "
end if
for i = 0 to aObjectives.Count - 1
set aObjective = aObjectives.Item(i)
set aObjectiveOnDate = aObjective.VersionOnDate(aOnDate)
if aObjectiveOnDate is nothing then
aMessage = aMessage & vbNewLine & "- No Version on this date"
else
aMessage = aMessage & vbNewLine &_
" Current objective: " & aObjective.Name & vbNewLine &_
" Objective version on date: " & aObjectiveOnDate.DisplayName
end if
next
next
Profile.MsgBox(aMessage)
In Profile Client v8 on User Interface Versions can be found in
or .