Mapping HL7v2 ORU^R01 to US Core Observation: Field Reference
Vital signs panel (BP, HR, temperature, SpO2). Maps the first OBX (systolic BP) into a US Core Vital Signs Observation; pair with extra rules per OBX as needed.
Field-by-field mapping
Every rule in the Interoperall template is shown below: the source field, the FHIR target path it populates, and the transform applied. This table is generated from the live template, so it matches exactly what runs when you fork it.
| Source | FHIR path | Transform |
|---|---|---|
| (literal "final") | Observation.status | Copied directly |
| (literal "vital-signs") | Observation.category[0].coding[0].code | Copied directly |
| (literal "http://terminology.hl7.org/CodeSystem/observation-category") | Observation.category[0].coding[0].system | Copied directly |
| (literal "Vital Signs") | Observation.category[0].coding[0].display | Copied directly |
| OBX-3.1 | Observation.code.coding[0].code | Copied directly |
| OBX-3.2 | Observation.code.coding[0].display | Copied directly |
| (literal "http://loinc.org") | Observation.code.coding[0].system | Copied directly |
| OBX-5 | Observation.valueQuantity.value | Copied directly |
| OBX-6.1 | Observation.valueQuantity.unit | Copied directly |
| OBX-6.1 | Observation.valueQuantity.code | Copied directly |
| (literal "http://unitsofmeasure.org") | Observation.valueQuantity.system | Copied directly |
| OBX-7 | Observation.referenceRange[0].text | Copied directly |
| OBR-7 | Observation.effectiveDateTime | Date reformat %Y%m%d%H%M%S → %Y-%m-%dT%H:%M:%S |
Source HL7v2 message
The sample input this template is designed to handle:
MSH|^~\&|VITALS|HOSP|REC|REC|20240115160000||ORU^R01|MSGCTRL4444|P|2.5.1
PID|1||MRN12345^^^EPIC^MR||DOE^JOHN^A||19800101|M
OBR|1|||VITALS^Vital Signs Panel^L|||20240115155500
OBX|1|NM|8480-6^Systolic BP^LN||128|mm[Hg]|90-120|H|||F
OBX|2|NM|8462-4^Diastolic BP^LN||82|mm[Hg]|60-80|H|||F
OBX|3|NM|8867-4^Heart rate^LN||76|/min|60-100|N|||F
OBX|4|NM|8310-5^Body temperature^LN||37.0|Cel|36.5-37.5|N|||F
OBX|5|NM|59408-5^Oxygen saturation^LN||98|%|95-100|N|||FCommon gotchas
- HL7v2 identifiers (PID-3) carry an assigning authority and ID type in later components. FHIR needs an `identifier.system` (a URI/OID), so you must map your local authority to a real, stable system URI, not just copy the code.
- HL7v2 dates are `YYYYMMDD` (or `YYYYMMDDHHMMSS`); FHIR `date`/`dateTime` need ISO-8601 (`YYYY-MM-DD`). A date-format transform is required or validation will reject the value.
- Coded fields (gender, status, units) almost always need a value-set lookup. HL7v2 `M`/`F` is not the same token as FHIR `male`/`female`, and an unmapped code should fall back rather than pass through raw.
- Repeating segments (multiple OBX, multiple PID-11 address repetitions) map to FHIR arrays. A single template rule targets one array index, so duplicate the rules (or iterate) for additional repetitions.
Target profile
This mapping targets http://hl7.org/fhir/us/core/StructureDefinition/us-core-vital-signs. After mapping, validate the output against the profile — the template populates the Must Support elements, but required elements missing from your source data will still fail. Score it against US Core.
Frequently asked questions
How do I map an HL7v2 ORU^R01 message to a FHIR Observation?
Parse the ORU^R01 message into segments, then map each relevant field to its FHIR path: identifiers and coded values need value-set lookups, and HL7v2 date fields need reformatting to ISO-8601. The field table on this page lists every source-to-target rule used by the Interoperall template, which you can fork and run in the Mapping Builder.
Which segments does the ORU^R01 → Observation mapping read?
It reads the OBX and OBR segments. Other segments in the message are left unmapped unless you add rules for them.
Is this Observation mapping US Core compliant?
It targets http://hl7.org/fhir/us/core/StructureDefinition/us-core-vital-signs. The template populates the elements US Core marks as Must Support, but you should always validate the output against the profile. Required elements that are absent in your source data will still fail.
Can I customize this mapping?
Yes. Fork the template in the Mapping Builder to get an editable copy, then add, remove, or re-target rules, for example to handle repeating segments, extra identifiers, or a different value set.