The method returns the parent intervention the selected action version is linked to.
object.ParentVisit()
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISRecallActionVers interface |
Display the parent intervention the selected action version is linked to.
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 = #04/02/2019 12:24#
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 & ")" & vbNewLine
for i = 0 to aActions.Count - 1
set aAction = aActions.Item(i)
set aActionOnDate = aAction.VersionOnDate(aVersionDate)
aMessage = aMessage &_
MakeActionDescription(" ACTUAL VERSION: ", aAction) &_
MakeActionDescription(" VERSION ON DATE: ", aActionOnDate)
next 'i
next ' aVisit
next ' aPlan
Profile.MsgBox(aMessage)
end sub
function MakeActionDescription(aInfo, aActionInstance)
aMessage = aInfo
if aActionInstance is nothing then
aMessage = aMessage & " UNASSIGNED"
else
set aParentIntervention = aActionInstance.ParentVisit
if aParentIntervention is nothing then
aParentInterventionDesc = "UNASSIGNED"
else
aParentInterventionDesc = aParentIntervention.Description
end if
aMessage = aMessage & aActionInstance.Description & vbNewLine &_
" -Parent Intervention: " & aParentInterventionDesc
end if
MakeActionDescription = aMessage & vbNewLine
end function
In Profile Client v8 on User Interface Parent Intervention cannot be found.