Message ADT_A02 in FHIR

Which segments of ADT_A02 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_A02 in HL7 v2 2.8
Resources produced
BundleMessageHeaderProvenancePatientAccountObservationCareTeamEncounterBasicCoverage
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]
Observation[1]
If IF PD1-7 VALUED
ROLafter PID
RolePatient[1]
If IF ROL-3.1 EQUALS "PP" AND ROL-3.3 EQUALS "HL70443"
CareTeam[1]
If IF ROL-3.3 EQUALS "HL70443" AND ROL-3.1 IS NOT "PP"When the ROL includes entries with roles in Table HL70443 other than "PP", then they may be candidates for CareTeam, but not all. That is implementation specific.
PRTafter PID
Participation InformationPatient[1]
If IF PRT-4 IS "PP"
CareTeam[1]
If IF PRT-4 IS IN ("AD", "AP", "ARI", "AT", "CP", "FHCP", "OP", "PH", "PP", "PRI", "RP", "RT", "VP", "PO")
Patient VisitEncounter[1]
Basic
If IF PV1-43 VALUED
Patient[1]
Coverage[1]
If IF PV1-20 VALUE
Patient Visit - Additional InformationEncounter[1]
ROLafter PV1
RoleEncounter[1]
OBXOBSERVATION
Observation/resultObservation[3]
If IF OBX-5 LST.count LESS THAN OR EQUALS 1 OR OBX-2 IS "NA"
Observation[3]
If IF OBX-5 LST.count GREATER THAN 1 AND OBX-2 IS NOT "NA"