This function deletes all the care action templates within the intervention template.
object.doDeleted
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISCareAction interface |
Delete all the care action templates within the intervention template.
sub main
aMessage = "ACTIONS BEFORE DELETING: " & vbNewLine & getActionsDescriptions
DeleteAllActions
aMessage = aMessage & vbNewLine &_
"ACTIONS AFTER DELETING: " & vbNewLine & getActionsDescriptions
Profile.MsgBox (aMessage)
end sub
sub DeleteAllActions
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.DoDeleted
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 deleted in
.