Message ADT_A09 in FHIR

Which segments of ADT_A09 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 ADT_A09 in HL7 v2 2.8
Resources produced
BundleMessageHeaderProvenancePatientAccountObservationEncounterBasicCoverage
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]
Software SegmentProvenance[1].entity.what(Device)
If the software does represent not the original source system
Provenance[1].entity.what(Device)
If the software represents the original source system
Event TypeProvenance[3]
Provenance[3]
If IF EVN-5 NOT VALUED AND (MSH-22 IS VALUED OR MSH-4 IS VALUED)
Patient IdentificationPatient[1]
Account
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.
Patient Additional DemographicPatient[1]
Patient Additional DemographicObservation[1]
If IF PD1-7 VALUED
Patient VisitEncounter[1]
Basic
If IF PV1-43 VALUED
Patient[1]
Coverage[1]
If IF PV1-20 VALUE
Patient Visit - Additional InformationEncounter[1]
OBXOBSERVATION
Observation/resultObservation[2]
If IF OBX-5 LST.count LESS THAN OR EQUALS 1 OR OBX-2 IS "NA"
Observation[2]
If IF OBX-5 LST.count GREATER THAN 1 AND OBX-2 IS NOT "NA"