This function returns the version of the action on the specified date.
object.VersionOnDate(aSnapshotDate)
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISRecallAction interface |
|
aSnapshotDate |
In, Required | DateTime |
The date of the returned version |
Display the most recent version of the action and the version on the specified date.
sub main
Dim aPatient
Dim aRecallPlans
Dim aPlan
Dim aVisit
Dim aVisits
Dim aActions
Dim aAction
Dim aMessage
Set aPatient = Profile.SelectPatient
set aRecallPlans = aPatient.RecallPlans
aVersionDate = #03/25/2019 11:40#
if aRecallPlans.Count = 0 then
Profile.MsgBox("The patient has no care plans!")
exit sub
end if
for each aPlan in aRecallPlans
aMessage = aMessage & vbNewLine & "PLAN: '" & aPlan.Description & "'"
set aVisits = aPlan.Visits
if aVisits.Count = 0 then
aMessage = aMessage & vbNewLine & " NO INTERVENTIONS"
end if
for each aVisit in aVisits
set aActions = aVisit.Actions
aMessage = aMessage & vbNewLine & " INTERVENTION: '" &_
aVisit.Description & "'" & " (Action Count = " & aActions.Count & ")"
for i = 0 to aActions.Count - 1
set aAction = aActions.Item(i)
aMessage = aMessage & vbNewLine & " - ACTION: '" & aAction.Description
set aActionOnDate = aAction.VersionOnDate(aVersionDate)
if aActionOnDate is nothing then
aMessage = aMessage & " - no version on selected date "
else
aMessage = aMessage & " - " & aActionOnDate.Description
end if
next
next
next
Profile.MsgBox(aMessage)
end sub
In Profile Client v8 on User Interface Action Version cannot be found.