Server (Cells) Design
Space shortcuts
Space Tools
Skip to end of metadata
Go to start of metadata

A patient may have more than one identifier in different source systems and will be given a single unique i2b2 identifier. All of these identifiers are grouped together in the XML Patient Data Object (PDO) in the <pid_set> and are also added to the PATIENT_MAPPING table in the database. A similar process occurs for encounters from different systems grouped together in the <eid_set> in the PDO and in the ENCOUNTER_MAPPING table in the database.
The patient and event mapping tables link the values used in the i2b2 database to their counterparts in the source systems from which the identifiers came. The PATIENT_MAPPING and ENCOUNTER_MAPPING tables are populated by existing hive numbers when the database is created; they are also updated as new patients and encounters are added. Each patient number corresponds to a row in the patient table and each encounter or event has a row in the ENCOUNTER_MAPPING table. The following examples review different scenarios for adding data to the mapping tables.

  • The examples refer to the PATIENT_MAPPING table, but can be applied to the ENCOUNTER_MAPPING table in the same way; i.e. PATIENT_NUM is to PATIENT_IDE as ENCOUNTER_NUM is to ENCOUNTER_IDE.

Encrypted identifiers are indicated by appending '_e' to the name of the source system. For example, if the identifier is an encrypted number from Massachusetts General Hospital, the source will be 'MGH_e'.
The scenarios below refer to both the XML objects in the PDO and to the dimension and mapping tables in the database. PATIENT_NUM is the column name for the i2b2 identifier in the database and corresponds to the value of <patient_id> when the source is 'HIVE'.
Below is a generic <pid_set> from the XML Patient Data Object (PDO).
<patient_id source="source">value</patient_id>
<patient_map_id source="source" status="A">value</patient_map_id>
<patient_map_id source="source" status="A">value</patient_map_id >


The following cases describe possible scenarios for different combinations of <patient_id> source and value and <patient_id_map> source and value for both the <pid> and the <patient> objects. An id source and its value are both needed to determine the parameters inserted into the mapping tables. These two fields are called the source / value pair. The patient_id in the <pid> must have the same source / value pair as in the <patient> object and the rest of the PDO. There may be multiple <patient_map_ids> in one <pid>, with each one representing a different source system and identifier value for the same patient.
The mapping process requires checking to see if the source / value pairs for <patient_id> and <patient_map_id> already exist in the i2b2 hive and then following the appropriate scenario below. The dates associated with the object must also be checked in order to determine the most recent values.

  • No labels