[Deprecated] Patient Simulator - PAM Patient Demographic Consumer

Warning: This documentation is out-dated, newest version of the documentation is available at https://gazelle.ihe.net/gazelle-documentation


The Patient Manager tool implements the Patient Demographic Consumer actor defined by the IHE technical framework for the PAM profile. This simulated actor implements both the Merge and Link/Unlink options. Consequently, the application is able to receive and integrate the following events for the ITI-30 transaction:

  • Create new Patient (ADT^A28^ADT_A05)
  • Update patient Information (ADT^A31^ADT_A05)
  • Change Patient Identifier List (ADT^A47^ADT_A47)
  • Merge two patients (ADT^A40^ADT_39)
  • Link Patient Information (ADT^A24^ADT_A24)
  • Unlink Patient Information (ADT^A37^ADT_A37)

Three sections (pages) of the Patient Manager tool application are dedicated to the use of the Patient Demographic Consumer Actor. You can reach them going to Patient Administration Management --> Patient Demographic Consumer. The 3 pages are available through the related icons.

PAM PDC menu

The first icon is to access to the configuration and messages

The second icon is to access the received patients page

The third one gives you an access to the patient links page

Configuration and messages

When the simulator acts as a PDC, it is only a responder; that means that it is listening on a specific port and sends acknowledgements for the messages it receives. As a consequence, you are not expected to give to the simulator the configuration of the PDS part of your SUT. At the contrary, your SUT needs the configuration of the simulator in order to send it messages. When you go to the page "Configuration and Messages" you can see that various configurations are offered. Actually, in order to be able to properly understand the messages it receives, the simulator needs to open a socket using the appropriate encoding character set. The IP address and the receiving application and facility do not differ from a configuration to another, only the port number should change. Note that if the Character set given in the message (MSH-18) is not the one expected, the message is application rejecting. In the same way that if the receiving application or receiving facility does not match the expected one, the message will be reject with an AR acknowledgment.

In this same page, you can see the list of messages received by the PDC actor. The more recent ones are at the top of the list.

Received Patients

When the simulator receives a message, it tries to integrate it, if it is not able to do it, it sends back an error message. It means that each time it can, it performs the appropriate action on the patient. The resolution of patients is done on their identifiers.

Create new Patient

A new patient is created if none of the given identifiers is already used by another active patient. If one of the identifiers is in use, the PDC application-rejects the message with error code 205 (duplicate key identifier). The creator of the patient is set to sendingFacility_sendingApplication.

Update Patient information

If one of the given identifiers matches an existing patient, the latter is updated with the new values. If the patient does not exist yet, a new patient is created.

Change Patient identifier

If more than one identifier is mentionned in PID-3 or in MRG-1 fields, the message is application-rejected. In the contrary, we get different cases:

  • if both correct and incorrect identifiers are used for an active patient; an error message is sent because a merge action should have been performed instead of the change id.
  • If the incorrect identifier identifies an active patient but the correct identifier is unknown, the list of identifiers of the retrieved patient is updated.
  • if both correct and incorrect identifier are unknown, a new patient is created using values given in PID segment.

Merge two patients

If more than one PATIENT group is contained in the message, the latter is application-rejected. Otherwise, we get four cases:

  • both correct and incorrect patient exist, patients are merged and only the correct one remains.
  • the incorrect patient is known but not the correct one, a change patient id action is performed.
  • both correct and incorrect patient do not exist, a patient is created using the data contained in PID segment.
  • the incorrect patient is unknown but the correct has been retrieved, we do nothing.

Link/Unlink patients

For link case: if both identifiers exists, link them. If one or both of them are missing, create them and link them.

For unlink case: if both identifiers exists and are linked, unlink them. otherwise nothing is done.

Received patient links

When displaying the full information about a patient, you can ask the application to show you the possible links between the patient and the other ones. But in some cases, the PDC may have received a message to link two or more identifiers, the ones do not identify patients. In order to check that the messages you have sent have been taken into account, you can go to this page (Received patient links) and you will see the list of links and their creation date. When two identifiers are unlinked, the link between them is deleted so you are not able to view it anymore.