ISPatientRecallPlan.VersionOnDate

Description

This function returns the version of the patient's care plan on the specified date.

Syntax

object.VersionOnDate(aSnapshotDate)

Part Attribute Type Description
object Required
The object always implements the ISPatientRecallPlan interface
aSnapshotDate In, Required
DateTime
The date of the returned version

Return Value

ISPatientRecallPlanVers

Returns the version of the patient's care plan on the specified date.

Example

Display the most recent version of the patient's care plan and the version on the specified date.

sub main()
  Dim aPatient
  Dim aRecallPlans
  Dim aRecallVisits
  Dim aOnDate
  Dim aMessage
     
  Set aPatient = Profile.SelectPatient
  set aRecallPlans = aPatient.RecallPlans
   
  aOnDate = #02/22/2019# 
  aMessage = GetPlanCollectionInfo(aRecallPlans, aOnDate)

   Profile.MsgBox(aMessage)
end sub


function GetPlanCollectionInfo(aRecallPlans, aOnDate)
  Dim aPlan
  Dim aPlanOnDate
  info = ""
  for each aPlan in aRecallPlans
    info = info & vbNewLine & aPlan.Description
    
      set aPlanOnDate = aPlan.VersionOnDate(aOnDate)
      if aPlanOnDate is nothing then    
         info = info & vbNewLine & " - " & aPlan.Description & " (" & aPlan.Id & ") " &_
         "  -  No Version on this date"
      else            
        info = info & vbNewLine & " - " &  aPlan.Description & " (" & aPlan.Id & ") " &_
        "      Version on date:  " & aPlanOnDate.Description & " (" & aPlanOnDate.Id & ") " 
      end if    
  next   
  GetPlanCollectionInfo = info
end function  
Note:

In Profile Client v8 on User Interface Versions can be found in Clinical > Medical Record > Care Plans > Open active object(s) > History.

Version information

Added in v7.8.0