This function deletes an action by its service code from the patient's intervention.
object.DeleteAction
aAction
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISPatientRecallVisit interface |
|
aAction |
In, Required | The action of the intervention |
Delete the action by its service code from the patient's intervention.
sub main()
set aPatient = Profile.SelectPatient
set aAllRecallVisits = aPatient.RecallVisits
aMessageBefore = _
"State before deliting: " & vbNewLine & GetVisitsAsText(aAllRecallVisits.Due)
set aRecallVisits = aAllRecallVisits.Due
for each aRecallVisit in aRecallVisits
set aRecallActions = aRecallVisit.Actions
for i = 0 to aRecallActions.Count - 1
set aRecallAction = aRecallActions.Item(i)
if aRecallAction.Code = "10" then
aRecallVisit.DeleteAction(aRecallAction)
end if
next
next
aMessageAfter = _
" State after deliting: " & vbNewLine & GetVisitsAsText(aAllRecallVisits.Due)
Profile.MsgBox(aMessageBefore & vbNewLine & "-------" & vbNewLine & aMessageAfter)
end sub
function GetVisitsAsText(aRecallVisits)
for each aRecallVisit in aRecallVisits
aText = aText & "Intervention: " & aRecallVisit.Description & vbNewLine
set aRecallActions = aRecallVisit.Actions
for i = 0 to aRecallActions.Count - 1
set aRecallAction = aRecallActions.Item(i)
aText = aText & " Action: " & aRecallAction.Description & _
"(" & aRecallAction.Code & ") " & vbNewLine
next
next
GetVisitsAsText = aText
end function
In Profile Client v8 on User Interface Actions can be found and deleted in
.