Message ORM_O01 in FHIR

Which segments of ORM_O01 become which FHIR R4 resources in the Bundle, from the HL7 Version 2 to FHIR guide. Groups are shown as they appear in the structure.

HL7 v2 definition
Definition of ORM_O01 in HL7 v2 2.6
Resources produced
BundleMessageHeaderProvenancePatientObservationEncounterBasicCoverageAllergyIntoleranceServiceRequestTaskSupplyRequestMedicationRequest
SegmentNameFHIR elementConditions and notes
Message HeaderBundle
MessageHeader[1]
Provenance[1]
If there is a source in MSH-4, or known based on the configuration.
Provenance[2]
PIDPATIENT
Patient IdentificationPatient[1]
Provenance[4]
If IF PID-33 AND PID-34 VALUEDOne may drop PID-33 from the condition if PID-34 Last Update Facility is still sufficient without a date.
PD1PATIENT
Patient Additional DemographicPatient[1]
Observation[2]
If IF PD1-7 VALUED
PV1PATIENT.VISIT
Patient VisitEncounter[1]
Basic
If IF PV1-43 VALUED
Patient[1]
Coverage[1]
If IF PV1-20 VALUE
PV2PATIENT.VISIT
Patient Visit - Additional InformationEncounter[1]
IN1PATIENT.INSURANCE
InsuranceCoverage[1]
IN2PATIENT.INSURANCE
Insurance Additional InformationCoverage[1]
IN3PATIENT.INSURANCE
Insurance Additional Information, CertificationCoverage[1]
AL1PATIENT
Patient Allergy InformationAllergyIntolerance
ORCORDER
Common OrderServiceRequest[1]
Task[1]
Provenance[2]
OBRORDER_DETAIL.CHOICE
Observation RequestServiceRequest[1]
If IF PID VALUED
SupplyRequest[1]
If IF PID NOT VALUED
RXOORDER_DETAIL.CHOICE
Pharmacy/treatment OrderMedicationRequest
ODSORDER_DETAIL.CHOICE
Dietary Orders, Supplements, And PreferencesSupplyRequest[2]
If IF PID NOT VALUED
NTEORDER_DETAIL
Notes And CommentsServiceRequest[1].note
DG1ORDER_DETAIL
DiagnosisServiceRequest[1].reasonReference(Condition)
OBXORDER_DETAIL.OBSERVATION
Observation/resultObservation[1]
If IF OBX-5 LST.count LESS THAN OR EQUALS 1 OR OBX-2 IS "NA"
Observation[1]
If IF OBX-5 LST.count GREATER THAN 1 AND OBX-2 IS NOT "NA"