ISPatientRecallVisit.CompleteAllWithDate

Description

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

Syntax

object.CompleteAllWithDate aDate

Part Attribute Type Description
object Required
The object always implements the ISPatientRecallVisit interface
aDate In, Required
DateTime
The date of the intervention

Example

Complete all the patient's interventions within the care plan on the specified date.

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

  aCompleteOnDate = #01/01/2017#

  for each aPlan in aRecallPlans
    set aVisits = aPlan.Visits  
    for each aVisit in aVisits
      aVisit.CompleteAllWithDate aCompleteOnDate
    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