Mapping HL7v2 RDE^O11 to US Core MedicationRequest: Field Reference
Pharmacy/treatment encoded order. Maps RXE into a MedicationRequest with code, dose, frequency.
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 "active") | MedicationRequest.status | Copied directly |
| (literal "order") | MedicationRequest.intent | Copied directly |
| RXE-2.1 | MedicationRequest.medicationCodeableConcept.coding[0].code | Copied directly |
| RXE-2.2 | MedicationRequest.medicationCodeableConcept.coding[0].display | Copied directly |
| RXE-2.3 | MedicationRequest.medicationCodeableConcept.coding[0].system | Value-set lookup (RXNORM→http://www.nlm.nih.gov/research/umls/rxnorm, RX→http://www.nlm.nih.gov/research/umls/rxnorm; fallback "http://terminology.hl7.org/CodeSystem/v2-0396") |
| RXE-3 | MedicationRequest.dosageInstruction[0].doseAndRate[0].doseQuantity.value | Copied directly |
| RXE-5 | MedicationRequest.dosageInstruction[0].doseAndRate[0].doseQuantity.unit | Copied directly |
Source HL7v2 message
The sample input this template is designed to handle:
MSH|^~\&|PHARM|HOSP|REC|REC|20240115120000||RDE^O11|MSGCTRL7777|P|2.5.1
PID|1||MRN12345^^^EPIC^MR||DOE^JOHN^A||19800101|M
ORC|NW|PLAC1234|FILL5678
RXE|^Q6H^^^^R|209387^Amoxicillin 500mg^RXNORM|500||mg|TABCommon gotchas
- This template performs 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.
Target profile
This mapping targets http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest. 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 RDE^O11 message to a FHIR MedicationRequest?
Parse the RDE^O11 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 RDE^O11 → MedicationRequest mapping read?
It reads the RXE segment. Other segments in the message are left unmapped unless you add rules for them.
Is this MedicationRequest mapping US Core compliant?
It targets http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest. 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 the RDE^O11 mapping?
Yes. Forking gives you an editable copy of all 7 rules, reading the RXE segment. From there you can re-target a path, swap the value set behind a coded field, or add rules for anything this template leaves unmapped.