Skip to main content

Stage 3 — TRANSFORM

What happens

Hl7v2ToFhirMapper converts the parsed HL7v2 object to FHIR R4 resources. The golden record ID from Stage 2 is stamped on every resource via Patient.link[refer].

PID → Patient

HL7v2 fieldFHIR fieldNotes
PID-3.1identifier[].valueLocal MRN
PID-3.4identifier[].systemFacility URN
PID-5.1name[].familyFamily name
PID-5.2name[].given[]Given name
PID-7birthDateYYYYMMDD → YYYY-MM-DD
PID-8genderM/F/U → male/female/unknown
PID-11address[]Street, city, state, zip
PID-13telecom[]Phone
MSH-4 (via JamFR)managingOrganizationResolved Organization ref
Golden ID (via MPI)link[type=refer]Golden patient reference

PV1 → Encounter

HL7v2 fieldFHIR field
PV1-2class (IMP/AMB/ER)
PV1-3.1location[].location (ward)
PV1-3.2location[].location (room/bed)
PV1-7participant[] (attending provider)
EVN-2period.start
PV1-45period.end (if discharge)

OBX → Observation

HL7v2 fieldFHIR field
OBX-3code (LOINC code)
OBX-5value[x] (numeric, string, coded)
OBX-6valueQuantity.unit
OBX-8interpretation (H/L/N/A/AA/LL/HH)
OBX-11status (F=final, P=preliminary)
OBR-7effectiveDateTime

Terminology translation

When terminology.enabled: true, JamTS translates local codes to canonical systems:

GET /fhir/ConceptMap/$translate?system=urn:br01.local&code=GLU&target=loinc
Host: jamts:8085

This is especially important for OBX-3 local lab codes — most hospital lab systems use internal code systems. Without translation, observations are not queryable by standard LOINC code.

Translation targets configured:

  • Local lab codes → LOINC
  • Local diagnosis codes → ICD-10-CM / ICD-10-WHO
  • Local drug codes → RxNorm / SNOMED CT