ISPatient.VersionOnDate

Description

This function returns the patient version on the specified date.

Syntax

object.VersionOnDate(aDate)

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

Return Value

ISPatientVers

Returns the patient version on the specified date.

Example

Display the patient's first name in the current and the selected patient version.

Dim aPatient  
Dim aNameOnDate
Dim aCurrName
Dim aMessage

Set aPatient = Profile.SelectPatient
aNameOnDate = aPatient.VersionOnDate(#12/20/2018#).FirstName
aPatient.FirstName = "Sam"
aPatient.Save
aCurrName = aPatient.VersionOnDate(now).FirstName

aMessage = aMessage & vbNewLine
aMessage = aMessage & "On 12/20/2018 the first name of the patient was " 
aMessage = aMessage & aNameOnDate & ", "
aMessage = aMessage & "now the first name of the patient is " & aCurrName

Profile.MsgBox(aMessage)  
Note:

In Profile Client v8 on User Interface Patient Versions can be found in Patient > Alter Patient > General > Show Versions.

Version information

Added in v7.8.0