ISPatientRecallVisit.Delete

Description

This function deletes the patient's interventions within the care plan.

Syntax

object.Delete

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

Example

Delete the patient's interventions within the care plan.

sub main()
   Dim aPatient, aRecallVisits, aMessage
     
   set aPatient = Profile.SelectPatient
   set aRecallPlans = aPatient.RecallPlans
   
  aMessage = "PLANS AND VISITS BEFORE DELETING:" & GetPlanCollectionInfo(aRecallPlans)

  for each aPlan in aRecallPlans
    set aVisits = aPlan.Visits  
    for each aVisit in aVisits
      aVisit.Delete
    next  
  next    
  
  aMessage = aMessage & vbNewLine & "PLANS AND VISITS AFTER DELETING:" &_ 
    GetPlanCollectionInfo(aRecallPlans)  

  Profile.MsgBox(aMessage)
end sub


function GetPlanCollectionInfo(aRecallPlans)
  info = ""
  for each aPlan in aRecallPlans
    info = info & vbNewLine & aPlan.Description
    set aVisits = aPlan.Visits  
      
    if aVisits.Count = 0 then
      info = info & vbNewLine & " The plan has no interventions!"
    end if  
    for each aVisit in aVisits    
      info = info & vbNewLine & "  -" & aVisit.Description
     next
  next   
  GetPlanCollectionInfo = info
end function
Note:

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

Version information

Added in v7.8.0