DSTU2

This page is part of the FHIR Specification (v1.0.2: DSTU 2). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

6.11 Resource MessageHeader - Content

FHIR Infrastructure Work GroupMaturity Level: 2Compartments: Device, Practitioner

The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.

6.11.1 Scope and Usage

The MessageHeader resource is defined in order to support Messaging using FHIR resources. The principle usage of the MessageHeader resource is when messages are exchanged. However, as a resource that can be used with the RESTful framework, the MessageHeader resource has the normal resource end-point ([base-url]/Message), which is used to manage a set of static messages resources. This could be used to make an archive of past messages available. Creating or updating Message resources in this fashion does not represent the actual occurrence of any event, nor can it trigger any logic associated with the actual event. It is just for managing a set of message resources.

6.11.2 Resource Content

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. MessageHeader ΣDomainResourceA resource that describes a message that is exchanged between systems
... timestamp Σ1..1instantTime that the message was sent
... event ?! Σ1..1CodingCode for the event this message represents
MessageEvent (Preferred)
... response ?! Σ0..1BackboneElementIf this is a reply to prior message
.... identifier Σ1..1idId of original message
.... code ?! Σ1..1codeok | transient-error | fatal-error
ResponseType (Required)
.... details Σ0..1Reference(OperationOutcome)Specific list of hints/warnings/errors
... source Σ1..1BackboneElementMessage Source Application
.... name Σ0..1stringName of system
.... software Σ0..1stringName of software running the system
.... version Σ0..1stringVersion of software running
.... contact Σ0..1ContactPointHuman contact for problems
.... endpoint Σ1..1uriActual message source address or id
... destination Σ0..*BackboneElementMessage Destination Application(s)
.... name Σ0..1stringName of system
.... target Σ0..1Reference(Device)Particular delivery destination within the destination
.... endpoint Σ1..1uriActual destination address or id
... enterer Σ0..1Reference(Practitioner)The source of the data entry
... author Σ0..1Reference(Practitioner)The source of the decision
... receiver Σ0..1Reference(Practitioner | Organization)Intended "real-world" recipient for the data
... responsible Σ0..1Reference(Practitioner | Organization)Final responsibility for event
... reason Σ0..1CodeableConceptCause of event
Example Message Reason Codes (Example)
... data Σ0..*Reference(Any)The actual content of the message

doco Documentation for this format

UML Diagram

MessageHeader (DomainResource)The time that the message was senttimestamp : instant [1..1]Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value "http://hl7.org/fhir/message-events" (this element modifies the meaning of other elements)event : Coding [1..1] « One of the message events defined as part of FHIR. (Strength=Preferred)MessageEvent? »The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensionsenterer : Reference [0..1] « Practitioner »The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensionsauthor : Reference [0..1] « Practitioner »Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficientreceiver : Reference [0..1] « Practitioner|Organization »The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible partyresponsible : Reference [0..1] « Practitioner|Organization »Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this messagereason : CodeableConcept [0..1] « Reason for event occurrence (Strength=Example)Example Message Reason ?? »The actual data of the message - a reference to the root/focus class of the eventdata : Reference [0..*] « Any »ResponseThe id of the message that this message is a response toidentifier : id [1..1]Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not (this element modifies the meaning of other elements)code : code [1..1] « The kind of response to a message (Strength=Required)ResponseType! »Full details of any issues found in the messagedetails : Reference [0..1] « OperationOutcome »MessageSourceHuman-readable name for the source systemname : string [0..1]May include configuration or other information useful in debuggingsoftware : string [0..1]Can convey versions of multiple systems in situations where a message passes through multiple handsversion : string [0..1]An e-mail, phone, website or other contact point to use to resolve issues with message communicationscontact : ContactPoint [0..1]Identifies the routing target to send acknowledgements toendpoint : uri [1..1]MessageDestinationHuman-readable name for the target systemname : string [0..1]Identifies the target end system in situations where the initial message transmission is to an intermediary systemtarget : Reference [0..1] « Device »Indicates where the message should be routed toendpoint : uri [1..1]Information about the message that this message is a response to. Only present if this message is a response (this element modifies the meaning of other elements)response[0..1]The source application from which this message originatedsource[1..1]The destination application which the message is intended fordestination[0..*]

XML Template

<MessageHeader xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <timestamp value="[instant]"/><!-- 1..1 Time that the message was sent -->
 <event><!-- 1..1 Coding Code for the event this message represents --></event>
 <response>  <!-- 0..1 If this is a reply to prior message -->
  <identifier value="[id]"/><!-- 1..1 Id of original message -->
  <code value="[code]"/><!-- 1..1 ok | transient-error | fatal-error -->
  <details><!-- 0..1 Reference(OperationOutcome) Specific list of hints/warnings/errors --></details>
 </response>
 <source>  <!-- 1..1 Message Source Application -->
  <name value="[string]"/><!-- 0..1 Name of system -->
  <software value="[string]"/><!-- 0..1 Name of software running the system -->
  <version value="[string]"/><!-- 0..1 Version of software running -->
  <contact><!-- 0..1 ContactPoint Human contact for problems --></contact>
  <endpoint value="[uri]"/><!-- 1..1 Actual message source address or id -->
 </source>
 <destination>  <!-- 0..* Message Destination Application(s) -->
  <name value="[string]"/><!-- 0..1 Name of system -->
  <target><!-- 0..1 Reference(Device) Particular delivery destination within the destination --></target>
  <endpoint value="[uri]"/><!-- 1..1 Actual destination address or id -->
 </destination>
 <enterer><!-- 0..1 Reference(Practitioner) The source of the data entry --></enterer>
 <author><!-- 0..1 Reference(Practitioner) The source of the decision --></author>
 <receiver><!-- 0..1 Reference(Practitioner|Organization) Intended "real-world" recipient for the data --></receiver>
 <responsible><!-- 0..1 Reference(Practitioner|Organization) Final responsibility for event --></responsible>
 <reason><!-- 0..1 CodeableConcept Cause of event --></reason>
 <data><!-- 0..* Reference(Any) The actual content of the message --></data>
</MessageHeader>

JSON Template

{doco
  "resourceType" : "MessageHeader",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "timestamp" : "<instant>", // R!  Time that the message was sent
  "event" : { Coding }, // R!  Code for the event this message represents
  "response" : { // If this is a reply to prior message
    "identifier" : "<id>", // R!  Id of original message
    "code" : "<code>", // R!  ok | transient-error | fatal-error
    "details" : { Reference(OperationOutcome) } // Specific list of hints/warnings/errors
  },
  "source" : { // R!  Message Source Application
    "name" : "<string>", // Name of system
    "software" : "<string>", // Name of software running the system
    "version" : "<string>", // Version of software running
    "contact" : { ContactPoint }, // Human contact for problems
    "endpoint" : "<uri>" // R!  Actual message source address or id
  },
  "destination" : [{ // Message Destination Application(s)
    "name" : "<string>", // Name of system
    "target" : { Reference(Device) }, // Particular delivery destination within the destination
    "endpoint" : "<uri>" // R!  Actual destination address or id
  }],
  "enterer" : { Reference(Practitioner) }, // The source of the data entry
  "author" : { Reference(Practitioner) }, // The source of the decision
  "receiver" : { Reference(Practitioner|Organization) }, // Intended "real-world" recipient for the data
  "responsible" : { Reference(Practitioner|Organization) }, // Final responsibility for event
  "reason" : { CodeableConcept }, // Cause of event
  "data" : [{ Reference(Any) }] // The actual content of the message
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. MessageHeader ΣDomainResourceA resource that describes a message that is exchanged between systems
... timestamp Σ1..1instantTime that the message was sent
... event ?! Σ1..1CodingCode for the event this message represents
MessageEvent (Preferred)
... response ?! Σ0..1BackboneElementIf this is a reply to prior message
.... identifier Σ1..1idId of original message
.... code ?! Σ1..1codeok | transient-error | fatal-error
ResponseType (Required)
.... details Σ0..1Reference(OperationOutcome)Specific list of hints/warnings/errors
... source Σ1..1BackboneElementMessage Source Application
.... name Σ0..1stringName of system
.... software Σ0..1stringName of software running the system
.... version Σ0..1stringVersion of software running
.... contact Σ0..1ContactPointHuman contact for problems
.... endpoint Σ1..1uriActual message source address or id
... destination Σ0..*BackboneElementMessage Destination Application(s)
.... name Σ0..1stringName of system
.... target Σ0..1Reference(Device)Particular delivery destination within the destination
.... endpoint Σ1..1uriActual destination address or id
... enterer Σ0..1Reference(Practitioner)The source of the data entry
... author Σ0..1Reference(Practitioner)The source of the decision
... receiver Σ0..1Reference(Practitioner | Organization)Intended "real-world" recipient for the data
... responsible Σ0..1Reference(Practitioner | Organization)Final responsibility for event
... reason Σ0..1CodeableConceptCause of event
Example Message Reason Codes (Example)
... data Σ0..*Reference(Any)The actual content of the message

doco Documentation for this format

UML Diagram

MessageHeader (DomainResource)The time that the message was senttimestamp : instant [1..1]Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value "http://hl7.org/fhir/message-events" (this element modifies the meaning of other elements)event : Coding [1..1] « One of the message events defined as part of FHIR. (Strength=Preferred)MessageEvent? »The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensionsenterer : Reference [0..1] « Practitioner »The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensionsauthor : Reference [0..1] « Practitioner »Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficientreceiver : Reference [0..1] « Practitioner|Organization »The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible partyresponsible : Reference [0..1] « Practitioner|Organization »Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this messagereason : CodeableConcept [0..1] « Reason for event occurrence (Strength=Example)Example Message Reason ?? »The actual data of the message - a reference to the root/focus class of the eventdata : Reference [0..*] « Any »ResponseThe id of the message that this message is a response toidentifier : id [1..1]Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not (this element modifies the meaning of other elements)code : code [1..1] « The kind of response to a message (Strength=Required)ResponseType! »Full details of any issues found in the messagedetails : Reference [0..1] « OperationOutcome »MessageSourceHuman-readable name for the source systemname : string [0..1]May include configuration or other information useful in debuggingsoftware : string [0..1]Can convey versions of multiple systems in situations where a message passes through multiple handsversion : string [0..1]An e-mail, phone, website or other contact point to use to resolve issues with message communicationscontact : ContactPoint [0..1]Identifies the routing target to send acknowledgements toendpoint : uri [1..1]MessageDestinationHuman-readable name for the target systemname : string [0..1]Identifies the target end system in situations where the initial message transmission is to an intermediary systemtarget : Reference [0..1] « Device »Indicates where the message should be routed toendpoint : uri [1..1]Information about the message that this message is a response to. Only present if this message is a response (this element modifies the meaning of other elements)response[0..1]The source application from which this message originatedsource[1..1]The destination application which the message is intended fordestination[0..*]

XML Template

<MessageHeader xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <timestamp value="[instant]"/><!-- 1..1 Time that the message was sent -->
 <event><!-- 1..1 Coding Code for the event this message represents --></event>
 <response>  <!-- 0..1 If this is a reply to prior message -->
  <identifier value="[id]"/><!-- 1..1 Id of original message -->
  <code value="[code]"/><!-- 1..1 ok | transient-error | fatal-error -->
  <details><!-- 0..1 Reference(OperationOutcome) Specific list of hints/warnings/errors --></details>
 </response>
 <source>  <!-- 1..1 Message Source Application -->
  <name value="[string]"/><!-- 0..1 Name of system -->
  <software value="[string]"/><!-- 0..1 Name of software running the system -->
  <version value="[string]"/><!-- 0..1 Version of software running -->
  <contact><!-- 0..1 ContactPoint Human contact for problems --></contact>
  <endpoint value="[uri]"/><!-- 1..1 Actual message source address or id -->
 </source>
 <destination>  <!-- 0..* Message Destination Application(s) -->
  <name value="[string]"/><!-- 0..1 Name of system -->
  <target><!-- 0..1 Reference(Device) Particular delivery destination within the destination --></target>
  <endpoint value="[uri]"/><!-- 1..1 Actual destination address or id -->
 </destination>
 <enterer><!-- 0..1 Reference(Practitioner) The source of the data entry --></enterer>
 <author><!-- 0..1 Reference(Practitioner) The source of the decision --></author>
 <receiver><!-- 0..1 Reference(Practitioner|Organization) Intended "real-world" recipient for the data --></receiver>
 <responsible><!-- 0..1 Reference(Practitioner|Organization) Final responsibility for event --></responsible>
 <reason><!-- 0..1 CodeableConcept Cause of event --></reason>
 <data><!-- 0..* Reference(Any) The actual content of the message --></data>
</MessageHeader>

JSON Template

{doco
  "resourceType" : "MessageHeader",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "timestamp" : "<instant>", // R!  Time that the message was sent
  "event" : { Coding }, // R!  Code for the event this message represents
  "response" : { // If this is a reply to prior message
    "identifier" : "<id>", // R!  Id of original message
    "code" : "<code>", // R!  ok | transient-error | fatal-error
    "details" : { Reference(OperationOutcome) } // Specific list of hints/warnings/errors
  },
  "source" : { // R!  Message Source Application
    "name" : "<string>", // Name of system
    "software" : "<string>", // Name of software running the system
    "version" : "<string>", // Version of software running
    "contact" : { ContactPoint }, // Human contact for problems
    "endpoint" : "<uri>" // R!  Actual message source address or id
  },
  "destination" : [{ // Message Destination Application(s)
    "name" : "<string>", // Name of system
    "target" : { Reference(Device) }, // Particular delivery destination within the destination
    "endpoint" : "<uri>" // R!  Actual destination address or id
  }],
  "enterer" : { Reference(Practitioner) }, // The source of the data entry
  "author" : { Reference(Practitioner) }, // The source of the decision
  "receiver" : { Reference(Practitioner|Organization) }, // Intended "real-world" recipient for the data
  "responsible" : { Reference(Practitioner|Organization) }, // Final responsibility for event
  "reason" : { CodeableConcept }, // Cause of event
  "data" : [{ Reference(Any) }] // The actual content of the message
}

 

Alternate definitions: Schema/Schematron, Resource Profile (XML, JSON), Questionnaire

6.11.2.1 Terminology Bindings

PathDefinitionTypeReference
MessageHeader.event One of the message events defined as part of FHIR.Preferredhttp://hl7.org/fhir/valueset/message-eventsMessageEvent
MessageHeader.response.code The kind of response to a messageRequiredResponseType
MessageHeader.reason Reason for event occurrenceExampleExample Message Reason Codes

6.11.3 Notes:

  • The resources referenced by the enterer, author and responsible elements may all be included in the message bundle or left out on the basis that the recipient (and any intermediaries) are able to locate/resolve the resources independently. The former would be suitable for loosely coupled systems, and the latter for tightly coupled systems. The messaging conformance statement for an application may reference a Structure Definition that describes how the bundling occurs
  • The actual content of the data resource is specified for each message event (see the list on the messaging page). Any resources referenced in the data element are always included in the bundle
  • If MessageHeader.source.endpoint and MessageHeader.destination.endpoint, are literal URLs, then they SHOULD identify the addresses to which messages can be delivered. If they are logical URIs (i.e. non-dereferenceable), message delivery intermediaries must know how to deliver the message to the destination application.
  • The author and the receiver are not the actual technical systems - these are the human or organizations that make use of the technical systems
  • A receiver is not obligated to reject messages which do not explicitly identify it as receiver (e.g. a tracker will get messages that are destined for some other system)

6.11.4 Search Parameters

Search parameters for this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.

NameTypeDescriptionPaths
authorreferenceThe source of the decisionMessageHeader.author
(Practitioner)
codetokenok | transient-error | fatal-errorMessageHeader.response.code
datareferenceThe actual content of the messageMessageHeader.data
(Any)
destinationstringName of systemMessageHeader.destination.name
destination-uriuriActual destination address or idMessageHeader.destination.endpoint
entererreferenceThe source of the data entryMessageHeader.enterer
(Practitioner)
eventtokenCode for the event this message representsMessageHeader.event
receiverreferenceIntended "real-world" recipient for the dataMessageHeader.receiver
(Organization, Practitioner)
response-idtokenId of original messageMessageHeader.response.identifier
responsiblereferenceFinal responsibility for eventMessageHeader.responsible
(Organization, Practitioner)
sourcestringName of systemMessageHeader.source.name
source-uriuriActual message source address or idMessageHeader.source.endpoint
targetreferenceParticular delivery destination within the destinationMessageHeader.destination.target
(Device)
timestampdateTime that the message was sentMessageHeader.timestamp