HL7 v2 → FHIR R4 mapping reference
Which FHIR R4 resource does each HL7 v2 segment become — and what happens to the fields that don’t map cleanly? This is the runnable reference: every example is produced by a real converter you can paste your own messages into.
HL7 v2 segments map to FHIR R4 resources: PID→Patient, PV1→Encounter, OBX→Observation, DG1→Condition, AL1→AllergyIntolerance, RXE→MedicationRequest, RXA→Immunization, IN1→Coverage, NK1→RelatedPerson. Paste a full message into the converter to see the whole bundle.
Segment → resource map
| HL7 v2 segment | FHIR R4 resource | What it carries |
|---|---|---|
| MSH | Bundle / MessageHeader | Message envelope |
| PID | Patient | Demographics, identifiers, race/ethnicity (US Core) |
| PV1 | Encounter | Visit, class, participants |
| DG1 | Condition | Diagnosis |
| OBX | Observation | Results, value[x], reference range, interpretation |
| OBR | DiagnosticReport / ServiceRequest | Order / report |
| AL1 | AllergyIntolerance | Allergy + reaction |
| RXE | MedicationRequest | Encoded pharmacy order |
| RXA | Immunization | Administration (VXU) |
| IN1 | Coverage | Insurance |
| NK1 | RelatedPerson | Next of kin |
Field-by-field guides
More segment guides are being added. Need one now? Run the message in the converter — it maps every segment it recognizes and surfaces the rest.
Why this reference is different
- It runs. Every example here is produced by the real engine — and you can paste your own message into the same tool.
- It’s honest about loss. Where a field can’t be mapped, we show it in a “needs review” panel instead of pretending it converted cleanly.
- Your data stays put. The converter is 100% client-side — you can paste a real message with real PHI, which you cannot safely do in a server-side converter.
Zkeleton builds conversion and data infrastructure for healthcare. This converter is free, runs entirely in your browser, and never sends a message anywhere — we keep it open because clean data plumbing should be a commodity, not a toll.