HL7v2 to FHIR R4 mapping
ADT → Patient + Encounter
PID → Patient
| HL7v2 | FHIR R4 | Notes |
|---|---|---|
| PID-3.1 | identifier[].value | Local MRN |
| PID-3.4 | identifier[].system | Assigning authority as URN |
| PID-3 (national ID) | identifier[] | Separate entry with national system URI |
| PID-5.1 | name[0].family | Family name |
| PID-5.2 | name[0].given[0] | Given name |
| PID-5.3 | name[0].given[1] | Middle name |
| PID-7 | birthDate | YYYYMMDD → YYYY-MM-DD |
| PID-8 | gender | M→male, F→female, U→unknown, A→other |
| PID-11.1 | address[0].line[0] | Street address |
| PID-11.3 | address[0].city | |
| PID-11.4 | address[0].state | |
| PID-11.5 | address[0].postalCode | |
| PID-11.6 | address[0].country | ISO 3166-1 alpha-2 |
| PID-13 | telecom[{system:phone}] | |
| PID-19 | identifier[{system:ssn}] | US SSN if present |
| MSH-4 | managingOrganization | Via JamFR resolution |
| MPI golden ID | link[type=refer] | Via JamMPI resolution |
PV1 → Encounter
| HL7v2 | FHIR R4 |
|---|---|
| PV1-2 | class (IMP=inpatient, AMB=ambulatory, ER=emergency) |
| PV1-3.1 | location[0].location.display (ward) |
| PV1-3.2 | location[0].location.display (room/bed) |
| PV1-7 | participant[{type:ATND}] (attending provider) |
| PV1-8 | participant[{type:REF}] (referring provider) |
| PV1-44 | period.start (admission datetime) |
| PV1-45 | period.end (discharge datetime, A03 only) |
| PV1-4 | priority (E=emergency, U=urgent, R=routine) |
ORU → Observation + DiagnosticReport
OBX → Observation
| HL7v2 | FHIR R4 | Notes |
|---|---|---|
| OBX-3 | code | LOINC preferred; translated by JamTS if local |
| OBX-5 (NM) | valueQuantity | Numeric result |
| OBX-5 (ST) | valueString | String result |
| OBX-5 (CWE) | valueCodeableConcept | Coded result |
| OBX-6 | valueQuantity.unit + valueQuantity.code | UCUM unit |
| OBX-7 | referenceRange[0].text | Reference range string |
| OBX-8 | interpretation | H→high, L→low, N→normal, A→abnormal |
| OBX-11 | status | F→final, P→preliminary, C→corrected |
| OBX-14 | effectiveDateTime | Observation datetime |
| OBX-16 | performer[0] | Responsible observer |
OBR → DiagnosticReport
| HL7v2 | FHIR R4 |
|---|---|
| OBR-4 | code (panel LOINC code) |
| OBR-7 | effectiveDateTime |
| OBR-22 | issued (result available datetime) |
| OBR-25 | status |
RXE → MedicationRequest
| HL7v2 | FHIR R4 |
|---|---|
| RXE-2 | medicationCodeableConcept (translated to RxNorm by JamTS) |
| RXE-3 | dosageInstruction[0].doseAndRate[0].doseQuantity.value |
| RXE-4 | dosageInstruction[0].doseAndRate[0].doseQuantity.unit |
| RXE-7 | dispenseRequest.quantity |
| RXE-10 | dispenseRequest.numberOfRepeatsAllowed |
| ORC-1 | intent (NW=order, CA=cancel, DC=discontinue) |
| ORC-12 | requester (ordering provider) |