Segment MSH in FHIR
How segment MSH (Message Header) becomes FHIR R4 resources, from the HL7 Version 2 to FHIR guide.
- HL7 v2 definition
- Definition of MSH in HL7 v2 2.8
- Maps
- Provenance (Operator)Provenance (Source)BundleEncounterMessageHeaderProvenance (Transformation)
- Used in messages
- ADT_A01ADT_A02ADT_A05ADT_A06ADT_A09ADT_A11ADT_A17MDM_T02OML_O21ORM_O01ORU_R01SIU_S12VXU_V04
To ProvenanceOperator2 rows
| HL7 v2 source | v2 type | FHIR element | FHIR type | Conditions and notes |
|---|---|---|---|---|
MSH-4Sending Facility | HD | agent.who(Organization) | Reference(Organization) | If IF MSH-22 NOT VALUED |
MSH-22Sending Responsible Organization | XON | agent.who(Organization) | Reference(Organization) |
To ProvenanceSource15 rows
| HL7 v2 source | v2 type | FHIR element | FHIR type | Conditions and notes |
|---|---|---|---|---|
MSHwhole segment | entity[1].what(DocumentReference.content.attachment.url) | when you hold on to/persist the v2 message in a data store | ||
MSHwhole segment | entity[1].what(DocumentReference.content.attachment.data) | when you do not hold on to/persist the v2 message in a data storeValue /v2.txt or v2.xml into base 64/ | ||
MSHwhole segment | entity[1].what(DocumentReference.status) | when you do not hold on to/persist the v2 message in a data storeValue "current" | ||
MSHwhole segment | entity[1].role | Value "source" | ||
MSH-3Sending Application | HD | entity[2].what(Device.identifier) | Reference(Device) | If IF MSH-3 AND MSH-24 VALUED |
MSH-3Sending Application | HD | entity[2].role | code | If IF MSH-3 AND MSH-24 VALUEDValue "source" |
MSH-4Sending Facility | HD | agent[1].who(Organization) | Reference(Organization) | If IF MSH-22 NOT VALUED |
MSH-4Sending Facility | HD | agent[1].type.coding.code | code | If IF MSH-22 NOT VALUEDValue "author" |
MSH-4Sending Facility | HD | agent[1].type.coding.system | uri | If IF MSH-22 NOT VALUEDValue "http://terminology.hl7.org/CodeSystem/provenance-participant-type" |
MSH-7Date/Time Of Message | DTM | recorded | ||
MSH-7Date/Time Of Message | DTM | occurred | ||
MSH-9Message Type | MSG | activity.coding.display | string | Value "message - "+MSG.1+"^"+MSG.2+"^"+MSG.3 |
MSH-22Sending Responsible Organization | XON | agent[2].who(Organization) | Reference(Organization) | |
MSH-22Sending Responsible Organization | XON | agent[2].type.coding.code | code | Value "author" |
MSH-22Sending Responsible Organization | XON | agent[2].type.coding.system | uri | Value "http://terminology.hl7.org/CodeSystem/provenance-participant-type" |
To Bundle4 rows
| HL7 v2 source | v2 type | FHIR element | FHIR type | Conditions and notes |
|---|---|---|---|---|
MSHwhole segment | type | code | Value "message" | |
MSH-7Date/Time Of Message | DTM | timestamp | instant | |
MSH-10Message Control Id | ST | identifier.value | string | |
MSH-10Message Control Id | ST | identifier.system | uri | Value /to be determined by the implementer/ |
To Encounter1 rows
| HL7 v2 source | v2 type | FHIR element | FHIR type | Conditions and notes |
|---|---|---|---|---|
MSH-9Message Type | MSG | status | code | Code map encounter-status |
To MessageHeader22 rows
| HL7 v2 source | v2 type | FHIR element | FHIR type | Conditions and notes |
|---|---|---|---|---|
MSH-3Sending Application | HD | source[1] | ||
MSH-3Sending Application | HD | source[1].endpoint | uri | If IF MSH-24 NOT VALUED |
MSH-4Sending Facility | HD | sender(Organization) | Reference(Organization) | |
MSH-5Receiving Application | HD | destination[1].target(Device) | Reference(Device) | |
MSH-5Receiving Application | HD | destination[1].name | name | If IF MSH-25 VALUED |
MSH-5Receiving Application | HD | destination[1].endpoint | url | If IF MSH-25 NOT VALUED |
MSH-6Receiving Facility | HD | destination[1].receiver(Organization) | Reference(Organization) | If IF MSH-23 NOT VALUED |
MSH-8Security | ST | meta.security | string | |
MSH-9Message Type | MSG | eventCoding | Coding | |
MSH-11Processing Id | PT | meta | meta | |
MSH-17Country Code | ID | sender(Organization.address.country) | string | Code map iso-3166-1 |
MSH-19Principal Language Of Message | CWE | language | code | Code map unspecified_mapping |
MSH-22Sending Responsible Organization | XON | responsible(Organization) | Reference(Organization) | |
MSH-23Receiving Responsible Organization | XON | destination[1].receiver(Organization) | Reference(Organization) | |
MSH-24Sending Network Address | HD | source | string | |
MSH-24Sending Network Address | HD | source.endpoint.extension.url | uri | If IF MSH-24 NOT VALUED AND MSH-3 NOT VALUEDValue "http://hl7.org/fhir/R4/extension-data-absent-reason.html" |
MSH-24Sending Network Address | HD | source.endpoint.extension.valueCode | code | If IF MSH-24 NOT VALUED AND MSH-3 NOT VALUEDValue "unknown" |
MSH-25Receiving Network Address | HD | destination[1] | uri | |
MSH-25Receiving Network Address | HD | destination[1].endpoint.extension.url | uri | If IF MSH-25 NOT VALUED AND MSH-5 NOT VALUEDValue "http://hl7.org/fhir/R4/extension-data-absent-reason.html" |
MSH-25Receiving Network Address | HD | destination[1].endpoint.extension.valueCode | code | If IF MSH-25 NOT VALUED AND MSH-5 NOT VALUEDValue "unknown" |
MSH-26 | CWE | meta.security[2] | Coding | Code map unspecified_mapping |
MSH-27 | CWE | meta.security[2] | Coding | Code map unspecified_mapping |
To ProvenanceTransformation11 rows
| HL7 v2 source | v2 type | FHIR element | FHIR type | Conditions and notes |
|---|---|---|---|---|
MSHwhole segment | activity.coding.code | Value "v2-fhir-transformation" | ||
MSHwhole segment | activity.coding.system | Value "http://hl7.org/fhir/uv/v2mappings/CodeSystem/provenance-activity-type-v2-to-fhir" | ||
MSHwhole segment | recorded | Value /timestamp of tranformation/ | ||
MSHwhole segment | policy | Value /uri of the policy governing transformation of the v2 to FHIR/ | ||
MSHwhole segment | agent[1].type.coding.code | string | Value "assembler" | |
MSHwhole segment | agent[1].type.coding.system | url | Value "http://terminology.hl7.org/CodeSystem/provenance-participant-type" | |
MSHwhole segment | agent[1].who(Organization|Device) | Reference(Organization|Device) | Value /the organization owning or device performing the transformation by the mapping tool/ | |
MSHwhole segment | entity[1].what(DocumentReference.content.attachment.url) | when you hold on to/persist the v2 message in a data store | ||
MSHwhole segment | entity[1].what(DocumentReference.content.attachment.data) | when you do not hold on to/persist the v2 message in a data storeValue /v2.txt or v2.xml into base 64/ | ||
MSHwhole segment | entity[1].what(DocumentReference.status) | Value "current" | ||
MSHwhole segment | entity[1].role | Value "source" |
