This function saves the care action template within the intervention template.
object.Save
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISCareAction interface |
Save the care action template within the intervention template.
sub main
aMessage = "ACTIONS BEFORE UPDATE: " & vbNewLine & getActionsDescriptions
UpdateActions
aMessage = aMessage & vbNewLine &_
"ACTIONS AFTER UPDATE: " & vbNewLine & getActionsDescriptions
Profile.MsgBox (aMessage)
end sub
sub UpdateActions
set aTrans = Profile.StartMapTransaction
set aCarePlan = Profile.LoadCarePlanByCode ("FLU")
set aVisits = aCarePlan.Visits
for i = 0 to aVisits.Count - 1
set aVisit = aVisits.Item(i)
set aActions = aVisit.Actions
for j = 0 to aActions.Count - 1
set aAction = aActions.Item(j)
aAction.Description = aAction.Description & " Updated " & Now
aAction.Save
next 'j
next 'i
aTrans.Commit
end sub
function getActionsDescriptions
set aTrans = Profile.StartMapTransaction
set aCarePlan = Profile.LoadCarePlanByCode ("FLU")
set aVisits = aCarePlan.Visits
for i = 0 to aVisits.Count - 1
set aVisit = aVisits.Item(i)
aMessage = aMessage & vbNewLine & "Intervention: " & aVisit.Description
set aActions = aVisit.Actions
for j = 0 to aActions.Count - 1
set aAction = aActions.Item(j)
aMessage = aMessage & vbNewLine & " Action: " & aAction.Description
next 'j
next 'i
getActionsDescriptions = aMessage
end function
In Profile Client v8 on User Interface Care Actions can be found and saved in
.