ISPatientRecallVisit.VersionOnDate

Description

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

Syntax

object.VersionOnDate(aSnapshotDate)

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

Return Value

ISPatientRecallVisitVers

Returns the version of the patient's intervention on the specified date.

Example

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

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

   Profile.MsgBox(aMessage)
end sub


function GetPlanCollectionInfo(aRecallPlans, aOnDate)
  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  
      set aVisitOnDate = aVisit.VersionOnDate(aOnDate)
      if aVisitOnDate is nothing then    
         info = info & vbNewLine & " - " & aVisit.Description &_
         "  -  No Version on this date"
      else            
        info = info & vbNewLine & " Current Date " & aVisit.Description &_
        "      Version on date:  " & aVisitOnDate.Description 
       end if    
     next
  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 Text.

Version information

Added in v7.8.0