ISPatientMergeLog.MasterPatientId

Description

ID of the master patient in the patient merge log.

Syntax

object.MasterPatientId

Part Attribute Type Description
object Required
The object always implements the ISPatientMergeLog interface
Restriction: This property is readonly.

Return Value

int

Example

Display the number of patient merge logs and some information about them, including the name of the master patient.

Dim aDateFrom, aDateTo
Dim aPatientMergeLogs, aPatientMergeLog
Dim aMessage
Dim i
Dim aMasterPatient, aSubPatient     

aDateFrom = #01/01/2000#
aDateTo = #01/01/2020#

Set aPatientMergeLogs = Profile.GetPatientMergeLogs(aDateFrom, aDateTo)

aMessage = "Patient Merge Logs Count = " & aPatientMergeLogs.Count & vbNewLine

for i = 0 to aPatientMergeLogs.Count - 1
  set aPatientMergeLog = aPatientMergeLogs.Item(i)
  
  set aMasterPatient = Profile.LoadPatient(aPatientMergeLog.MasterPatientId)
  set aSubPatient = Profile.LoadPatient(aPatientMergeLog.SubPatientId)
   
  aMessage = aMessage & vbNewLine & (i + 1) & ". " &_
    "Created on: " & aPatientMergeLog.CreatedOn & vbNewLine &_
    "ID: " & aPatientMergeLog.ID & vbNewLine &_  
    "Master Patient: " & aMasterPatient.SurnameFirstName & vbNewLine &_
    "Sub Patient: " & aSubPatient.SurnameFirstName & vbNewLine 
next

Profile.MsgBox(aMessage)   
Note:

In Profile Client v8 on User Interface Master Patient Id cannot be found.

Version information

Added in v7.8.0