ISPatientRecallVisit.CompleteAll

Description

This function completes all the patient's interventions within the care plan.

Syntax

object.CompleteAll

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

Example

Complete all 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 COMPLETING:" & GetPlanCollectionInfo(aRecallPlans)

  for each aPlan in aRecallPlans
    set aVisits = aPlan.Visits  
    for each aVisit in aVisits
      aVisit.CompleteAll
    next  
  next    
  
  aMessage = aMessage & vbNewLine & "PLANS AND VISITS AFTER COMPLETING:" &_ 
    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 & "    -    " &_
        aVisit.StatusAsString 
     next
  next   
  GetPlanCollectionInfo = info
end function
Note:

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

Version information

Added in v7.8.0