Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

USE-CASE DIAGRAM FOR THE REGISTRATION MODULE


Master Patient Index Developer Notes


Errors 

Patient Identifier Collision

...

Situation: 

  1. You have an OpenMRS server set up, it is configured to connect to an MPI through OpenHIM acting as the Interoperability Layer
  2. Using the registration app
    Image Added
  1. You create a patient
    Image Added
  2. It gives no errors and redirects you to the patient page
    Image Added
    1. Note that the patientId in the URL is actually the uuid of the person which can be found in the person table.
    2. The Patient ID in the dashboard is in this case the OpenMRS ID which is autogenerated by OpenMRS.
  3. However, you cannot find the patient you created in the MPI when you search by name
    Image Added
  4. But if you search by OpenMRS ID, you find a different patient, this patient has the same MPI Global Identifier Domain ID (In this case Open EMPI ID) as the patient you just created
    Image Added
  5. This can be checked by looking at the patient_identifier table

    Image Added

Explanation

The OpenMRS generated ID already exists in the MPI under a different patient, and the . The local OpenMRS generates generated the same OpenMRS ID for a new patient it is registering and submits it, the following will happensubmitted it. This will happen for example if you create two reference application distributions, connect both of them to the same MPI and start creating patients in both of them. There will be no errors. The local patient will be saved locally but with the MPI patient's Global Identifier Domain ID (E.g. ECID for ISantePlus or OpenEMPI ID for default OpenEMPI setup). The local patient will not be saved in the MPI

Solution

In order to ensure that your multiple OpenMRS servers do not generate IDs that collide you could do one or more of the following:

  1. Legacy Admin UI → Manage Patient Identifier Sources → Configure
    Image Added
  2. Add different prefixes and or suffixes
    Image Added
  3. This can also be done directly on the database table:
    Image Added
    1. Additionally you could change the next_sequence_value for the different servers