ISPatientDuplicates.MasterID

Description

ID of the patient whose duplicate copies have been created in the system.

Syntax

object.MasterID

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

Return Value

int

Example

Display IDs of the patients with duplicate copies and IDs of these duplicates.

sub main()
  Dim aDuplicates 
  Dim aMessage, aIdList 

  set aDuplicates = Profile.LoadPatientDuplications

  aMessage = "Duplicates Count = " & aDuplicates.Count

  for i = 0 to aDuplicates.Count - 1
    set aDuplicate = aDuplicates.Item(i)
    aMessage = aMessage & vbNewLine
    aMessage = aMessage & "For master ID " & aDuplicate.MasterID & " secondary IDs are: " 
  
    aIdList = ""
    for j = 0 to aDuplicate.SecondaryIDs.Count - 1
      aSecondaryID = aDuplicate.SecondaryIDs.Item(j)
      call StrSep(aIdList, aSecondaryID)  
    next
    aMessage = aMessage & aIdList
  next
  
  Profile.MsgBox(aMessage)
end sub


sub StrSep(ByRef string, value) 
  if (string <> "") and (value <> "") then
    separator = ", "
  else
    separator = ""
  end if
  string = string & separator & value
end sub
Note:

In Profile Client v8 on User Interface Patient Duplicates can be found in Organisation > Control Centre > Manage > Merge > Deleteby clicking the button Find Duplicates.

Version information

Added in v8.3.0