ISRecallObjective.Delete

Description

This function deletes the care plan objectives linked to the patient's care plan.

Syntax

object.Delete

Part Attribute Type Description
object Required
The object always implements the ISRecallObjective interface

Example

Delete the care plan objectives linked to the patient's care plan.

Dim aPatient
Dim aRecallPlans
Dim aMessage
Dim aPlan
Dim i
Dim aObjectives
Dim aObjective

Set aPatient = Profile.SelectPatient
set aRecallPlans = aPatient.RecallPlans

if aRecallPlans.Count = 0 then
  Profile.MsgBox("The patient has no care plans!")
  exit sub
end if

for each aPlan in aRecallPlans
  aMessage = aMessage & "PLAN: '" & aPlan.Description & "'" & vbNewLine
 
  aMessage = aMessage & "The number of the objectives " &_
    "BEFORE deleting = " & aPlan.RecallObjectives.Count & vbNewLine 

  set aObjectives = aPlan.RecallObjectives         
  for i = 0 to aObjectives.Count - 1
    set aObjective = aObjectives.Item(i)
    aObjective.Delete     
  next  

  aMessage = aMessage & "The number of the objectives " &_
    " AFTER deleting = " & aPlan.RecallObjectives.Count & vbNewLine
next

Profile.MsgBox(aMessage)
Note:

In Profile Client v8 on User Interface Objectives can be found and deleted in Clinical > Care Plans.

Version information

Added in v7.8.0