ISProfile.LoadPatientDuplications

Description

This function returns the duplicate copies of the patients in the system.

Syntax

object.LoadPatientDuplications()

Part Attribute Type Description
object Required
The object always implements the ISProfile interface

Return Value

ISCollection

Returns the duplicate copies of the patients in the system.

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 > Delete by clicking the button Find Duplicates.

Version information

Added in v8.3.0