ISPatientRecallPlans.Delete

Description

This function excludes the care plans owned by the selected patient.

Syntax

object.Delete aPlanID

Part Attribute Type Description
object Required
The object always implements the ISPatientRecallPlans interface
aPlanID In, Required
int
ID of the care plan

Example

Excludes the care plans owned by the selected patient.

Dim aPatient
Dim aRecallPlans
Dim aMessage
Dim aPlanIds

Set aPatient = Profile.SelectPatient
set aRecallPlans = Profile.LoadRecallPlansByPatientID(aPatientId)
set aPlanIds = Profile.CreateIntCollection   
for each aPlan in aRecallPlans
  aPlanIds.Add aPlan.Id      
next
      
if aRecallPlans.Count = 0 then
  Profile.MsgBox("The patient has no care plans!")
  exit sub
end if 

aMessage = aMessage & vbNewLine & "The number of the care plans BEFORE DELETING = " &_
  aRecallPlans.Count
   
for i = 0 to aPlanIds.Count - 1
  aRecallPlans.Delete  aPlanIds.Item(i)
next

aMessage = aMessage & vbNewLine & "The number of the care plans AFTER DELETING = " &_
  aRecallPlans.Count 

Profile.MsgBox(aMessage)
Note:

In Profile Client v8 on User Interface Delete cannot be found.

Version information

Added in v7.8.0