HL7 Version 2 to FHIR
1.0.0-ballot - ballot International flag

HL7 Version 2 to FHIR, published by HL7 International / Orders and Observations. This guide is not an authorized publication; it is the continuous build for version 1.0.0-ballot built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/v2-to-fhir/ and changes regularly. See the Directory of published versions

ConceptMap: Segment MSH to MessageHeader Map (Experimental)

Official URL: http://hl7.org/fhir/uv/v2mappings/segment-msh-to-messageheader Version: 1.0.0-ballot
Active as of 2024-12-20 Computable Name: SegmentMSHToMessageHeader

Copyright/Legal: Copyright (c) 2020, HL7 International, Inc., All Rights Reserved.

This ConceptMap represents a mapping from the HL7 V2 Segment MSH to the FHIR MessageHeader Resource.

This ConceptMap represents the mapping from the HL7 V2 MSH Segment to the FHIR MessageHeader Resource. See also the FHIR Shorthand or the CSV Source.

HL7 v2Condition (IF True, args)HL7 FHIRComments
Sort OrderIdentifierNameData TypeCardinality - MinCardinality - MaxComputable ANTLRComputable FHIRPathNarrativeFHIR AttributeExtensionData TypeCardinality - MinCardinality - MaxData Type MappingVocabulary Mapping
(IS, ID, CE, CEN, CWE)
Assignment
1MSH-1Field SeparatorST11Field separators are not used in FHIR. Either XML or JSON or ....
2MSH-2Encoding CharactersST11Encoding characters are not used in FHIR.
3MSH-3Sending ApplicationHD01MessageHeader.source11HD[MessageHeader.source-name]
3MSH-3Sending ApplicationHD01IF MSH-24 NOT VALUEDMessageHeader.source.endpointMessageHeader.uri11HD[MessageHeader.source-endpoint]We believe that if MSH-24 is vaued, although it is rarely valued, it contains better information for the MessageHeader.source.endpoint. However, one may either still want to use MSH-3 in total or a combination of content from MSH-3 and MSH-24. That is a local implementation decision to adjust the mapping accordingly. Example: MSH|^~%|LAB^2.16.840.1.113883.3.987.1^ISO|... Example: MSH|^~%|LAB|… If both MSH-3 and MSH-24 are not valued, which is valid, then the implementer needs to resolve whether to assign this a known value since they know the context, or add the data absent reason extension to provide a reason and satisfies the mandatory FHIR attribute rules. Note that the use of the data-absent-reason extension may result in a FHIR resource that is not usable by the recipient.
4MSH-4Sending FacilityHD01MessageHeader.sender(MessageHeader.Organization)Reference(MessageHeader.Organization)01HD[Organization]
5MSH-5Receiving ApplicationHD01MessageHeader.destination.target(MessageHeader.Device)Reference(MessageHeader.Device)01HD[Device]Example: MSH...|RH^2.16.840.1.113883.632.3^ISO|...
5MSH-5Receiving ApplicationHD01IF MSH-25 VALUEDMessageHeader.destinationHD[MessageHeader.destination-name]
5MSH-5Receiving ApplicationHD01IF MSH-25 NOT VALUEDMessageHeader.destinationHD[MessageHeader.destination-endpoint]
6MSH-6Receiving FacilityHD0-1IF MSH-23 NOT VALUEDMessageHeader.destination.receiver(MessageHeader.Organization)Reference(MessageHeader.Organization)01HD[Organization]
7MSH-7Date/Time of MessageDTM11If a message is always conveyed in a Bundle, then Bundle.timestamp could work. However, Bundle.timestamp may be better used to reflect the conversion. See https://chat.fhir.org/#narrow/stream/179188-v2-to.20FHIR/topic/MessageHeader.2Etimestamp for a discussion on this topic.
7MSH-7Date/Time of MessageDTM11
8MSH-8SecurityST01meta.securityMessageHeader.string0-1
9MSH-9Message TypeMSG11MessageHeader.eventCodingMessageHeader.Coding01MSG[Coding]
10MSH-10Message Control IDST11Need a gForge to request a MessageHeader.identifier (https://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_item_id=20704&start=0) Note that if a message is part of a batch, then the MSH goes to a "sub-bundle".. Note that as messages switch from V2 to FHIR and the response back from FHIR to V2, the "mapping engine" needs to track the actual MSH.10.00.00 value and Bundle.identifier value to connect responses correctly.
11MSH-11Processing IDPT11MessageHeader.metaMessageHeader.meta0-1PT[Meta]
12MSH-12Version IDVID11We agreed that the version of the v2 message that was used to transform into FHIR is addressed through Provenance. Either the Provenance instance representing the original message can include in Provenance.entity.what a binary of the total original message, or the proposed MessageHeader.identifier containing MSH-10 provides the link to the original message.
13MSH-13Sequence NumberNM01
14MSH-14Continuation PointerST01There is no continuation pointer concept in FHIR. When a continuation is used, the mapper needs to continue to obtain the additional data that is defined in the mappings.
15MSH-15Accept Acknowledgment TypeID01This field is not mapped as there is no continuation of a system level acknowledgement request beyond the mapping engine. Any subsequent acknowledgement methods would be performed in the applicable subsequent transport methods.
16MSH-16Application Acknowledgment TypeID01Interacting with the recipient on what type/level or validation is asked to be reported and it is not yet clear what the appropriate mechanism is, e.g., using interactions using Task (as it is more application level interactions) and/or HTTP header and/or other mechanisms. Note that the MSH-16 values are typically pre-determined through an implementation guide. Until then we encourage implementers to share feedback on how they are planning to address this that we can consider for inclusion
17MSH-17Country CodeID01MessageHeader.sender(MessageHeader.Organization.address.country)MessageHeader.string01CountryCode
18MSH-18Character SetID0-1extension??-characterSet
19MSH-19Principal Language Of MessageCWE01MessageHeader.languageMessageHeader.code01CWE[Code]PrincipalLanguageOfMessageThis does only cover the MessageHeader resource. Need to have clarity that if other resources that are part of the message that do not have Resource.meta.language valued, then it is assumed to follow MessageHeader.meta.language?? Doesn't seem RESTful, so what is the default for Resource.meta.language?
20MSH-20Alternate Character Set Handling SchemeID01
21MSH-21Message Profile IdentifierEI0-1extension??-v2ProfileID.uriMessageHeader.uri01Need to support multiple profiles. Also, comment on implicitRules is highly idealistic.
21MSH-21Message Profile IdentifierEI0-1extension??-v2ProfileID.valueStringMessageHeader.string11
22MSH-22Sending Responsible OrganizationXON01MessageHeader.responsible(MessageHeader.Organization)Reference(MessageHeader.Organization)01XON[Organization]
23MSH-23Receiving Responsible OrganizationXON01MessageHeader.destination.receiver(MessageHeader.Organization)Reference(MessageHeader.Organization)0-1XON[Organization]This is an alternate representation of MSH-6. The local implementation needs to determine whech components of HD vs. XON to be used and whether it may even yield a separate Organization reference.
24MSH-24Sending Network AddressHD01MessageHeader.sourceMessageHeader.string01HD[MessageHeader.source-endpoint]We believe that if MSH-24 is vaued, although it is rarely valued, it contains better information for the MessageHeader.source.endpoint. However, one may either still want to use MSH-3 in total or a combination of content from MSH-3 and MSH-24. That is a local implementation decision to adjust the mapping accordingly.
24MSH-24Sending Network AddressHD01IF MSH-24 NOT VALUED AND MSH-3 NOT VALUEDMessageHeader.source.endpoint.extension.urlMessageHeader.uri01"http://hl7.org/fhir/R4/extension-data-absent-reason.html"
24MSH-24Sending Network AddressHD01IF MSH-24 NOT VALUED AND MSH-3 NOT VALUEDMessageHeader.source.endpoint.extension.valueCodeMessageHeader.code01"unknown"If both MSH-3 and MSH-24 are not valued, which is valid, then the implementer needs to resolve whether to assign this a known value since they know the context, or add the data absent reason extension to provide a reason and satisfies the mandatory FHIR attribute rules. Note that the use of the data-absent-reason extension may result in a FHIR resource that is not usable by the recipient.
25MSH-25Receiving Network AddressHD01MessageHeader.destinationMessageHeader.uri0-1HD[MessageHeader.destination-endpoint]We believe that if MSH-25 is vaued, although it is rarely valued, it contains better information for the MessageHeader.source.endpoint. However, one may either still want to use MSH-5 in total or a combination of content from MSH-5 and MSH-25. That is a local implementation decision to adjust the mapping accordingly.
25MSH-25Receiving Network AddressHD01IF MSH-25 NOT VALUED AND MSH-5 NOT VALUEDMessageHeader.destination.endpoint.extension.urlMessageHeader.uri0-1"http://hl7.org/fhir/R4/extension-data-absent-reason.html"
25MSH-25Receiving Network AddressHD01IF MSH-25 NOT VALUED AND MSH-5 NOT VALUEDMessageHeader.destination.endpoint.extension.valueCodeMessageHeader.code0-1"unknown"
26MSH-26Security Classification TagCWE01meta.securityMessageHeader.Coding0-1CWE[Coding]ConfidentialityClassification
27MSH-27Security Handling InstructionsCWE0-1meta.securityMessageHeader.Coding0-1CWE[Coding]SecurityLabelHandlingInstructions
28MSH-28Special Access Restriction InstructionsST0-1

Generated Narrative: ConceptMap segment-msh-to-messageheader

Mapping from MSH to MessageHeader


Group 1 Mapping from unspecified code system to unspecified code system

Source CodeRelationshipTarget CodeComment
MSH-3 (Sending Application)is equivalent tosource[1]
MSH-3 (Sending Application)is equivalent tosource[1].endpointWe believe that if MSH-24 is vaued, although it is rarely valued, it contains better information for the MessageHeader.source.endpoint. However, one may either still want to use MSH-3 in total or a combination of content from MSH-3 and MSH-24. That is a local implementation decision to adjust the mapping accordingly. Example: MSH|^~%|LAB^2.16.840.1.113883.3.987.1^ISO|... Example: MSH|^~%|LAB|… If both MSH-3 and MSH-24 are not valued, which is valid, then the implementer needs to resolve whether to assign this a known value since they know the context, or add the data absent reason extension to provide a reason and satisfies the mandatory FHIR attribute rules. Note that the use of the data-absent-reason extension may result in a FHIR resource that is not usable by the recipient.\
MSH-4 (Sending Facility)is equivalent tosender(Organization)
MSH-5 (Receiving Application)is equivalent todestination[1].target(Device)Example: MSH...|RH^2.16.840.1.113883.632.3^ISO|...
MSH-5 (Receiving Application)is equivalent todestination[1]
MSH-5 (Receiving Application)is equivalent todestination[1]
MSH-6 (Receiving Facility)is equivalent todestination[1].receiver(Organization)
MSH-8 (Security)is equivalent tometa.security
MSH-9 (Message Type)is equivalent toeventCoding
MSH-11 (Processing ID)is equivalent tometa
MSH-17 (Country Code)is equivalent tosender(Organization.address.country)
MSH-19 (Principal Language Of Message)is equivalent tolanguageThis does only cover the MessageHeader resource. Need to have clarity that if other resources that are part of the message that do not have Resource.meta.language valued, then it is assumed to follow MessageHeader.meta.language?? Doesn't seem RESTful, so what is the default for Resource.meta.language?
MSH-22 (Sending Responsible Organization)is equivalent toresponsible(Organization)
MSH-23 (Receiving Responsible Organization)is equivalent todestination[1].receiver(Organization)This is an alternate representation of MSH-6. The local implementation needs to determine whech components of HD vs. XON to be used and whether it may even yield a separate Organization reference.
MSH-24 (Sending Network Address)is equivalent tosourceWe believe that if MSH-24 is vaued, although it is rarely valued, it contains better information for the MessageHeader.source.endpoint. However, one may either still want to use MSH-3 in total or a combination of content from MSH-3 and MSH-24. That is a local implementation decision to adjust the mapping accordingly.
MSH-24 (Sending Network Address)is equivalent tosource.endpoint.extension.url
MSH-24 (Sending Network Address)is equivalent tosource.endpoint.extension.valueCodeIf both MSH-3 and MSH-24 are not valued, which is valid, then the implementer needs to resolve whether to assign this a known value since they know the context, or add the data absent reason extension to provide a reason and satisfies the mandatory FHIR attribute rules. Note that the use of the data-absent-reason extension may result in a FHIR resource that is not usable by the recipient.
MSH-25 (Receiving Network Address)is equivalent todestination[1]We believe that if MSH-25 is vaued, although it is rarely valued, it contains better information for the MessageHeader.source.endpoint. However, one may either still want to use MSH-5 in total or a combination of content from MSH-5 and MSH-25. That is a local implementation decision to adjust the mapping accordingly.
MSH-25 (Receiving Network Address)is equivalent todestination[1].endpoint.extension.url
MSH-25 (Receiving Network Address)is equivalent todestination[1].endpoint.extension.valueCode
MSH-26 (Security Classification Tag)is equivalent tometa.security[2]
MSH-27 (Security Handling Instructions)is equivalent tometa.security[2]

Notes: