This
page
is
part
of
the
FHIR
Specification
(v5.0.0:
R5
-
STU
v6.0.0-ballot2:
Release
6
Ballot
(2nd
Draft)
(see
Ballot
Notes
).
This
is
the
The
current
published
version
in
it's
permanent
home
(it
will
always
be
available
at
this
URL).
is
5.0.0
.
For
a
full
list
of
available
versions,
see
the
Directory
of
published
versions
.
Page
versions:
R5
R4B
R4
R3
R2
Infrastructure
And
Messaging
Work
Group
|
Maturity Level : 4 | Trial Use | Security Category : Not Classified | Compartments : 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.
The MessageHeader resource is defined in order to support Messaging using FHIR resources . The principal 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]/MessageHeader), 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.
Structure
| Name | Flags | Card. | Type |
Description
&
Constraints
|
|---|---|---|---|---|
|
TU | DomainResource |
A
resource
that
describes
a
message
that
is
exchanged
between
systems
Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension |
|
|
Σ | 1..1 |
Binding: MessageEvent ( Example ) |
|
|
Coding | |||
|
uri | |||
| canonical ( EventDefinition | SubscriptionTopic ) | |||
|
Σ | 0..* | BackboneElement |
Message
destination
application(s)
|
|
Σ | 0..1 |
Actual
destination
address
or
Endpoint
resource
|
|
|
url | |||
|
Reference ( Endpoint ) | |||
|
Σ | 0..1 | string |
Name
of
system
|
|
Σ | 0..1 |
Reference
(
|
|
|
Σ | 1..1 | BackboneElement |
Message
source
application
|
|
Σ | 0..1 |
Actual
source
address
or
Endpoint
resource
|
|
|
url | |||
|
Reference ( Endpoint ) | |||
|
Σ | 0..1 | string |
Name
of
system
|
|
Σ | 0..1 | string |
Name
of
software
running
the
system
|
|
Σ | 0..1 | string |
Version
of
software
running
|
|
Σ | 0..1 | ContactPoint |
Human
contact
for
problems
|
|
Σ | 0..1 |
Reference
(
Device
|
Organization
|
Patient
|
Practitioner
|
PractitionerRole
|
|
|
Σ | 0..1 | CodeableConcept |
Cause
of
event
Binding: Example Message Reason Codes ( Example ) |
|
Σ | 0..1 | BackboneElement |
If
this
is
a
reply
to
prior
message
|
|
Σ | 1..1 | Identifier |
Bundle.identifier
of
original
message
|
|
Σ | 1..1 | code |
ok
|
transient-error
|
fatal-error
Binding: Response Type ( Required ) |
|
Σ | 0..1 | Reference ( OperationOutcome ) |
Specific
list
of
hints/warnings/errors
|
|
Σ | 0..* | Reference ( Any ) |
The
actual
content
of
the
message
|
|
Σ | 0..1 | canonical ( MessageDefinition ) |
Link
to
the
definition
for
this
message
|
Documentation
for
this
format
|
||||
See the Extensions for this resource
UML Diagram ( Legend )
XML Template
<MessageHeader xmlns="http://hl7.org/fhir"><!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension -->
<</event[x]><event[x]><!-- 1..1 Coding|uri|canonical(EventDefinition|SubscriptionTopic) The real world event that triggered this messsage --></event[x]> <destination> <!-- 0..* Message destination application(s) --> <endpoint[x]><!-- 0..1 url|Reference(Endpoint) Actual destination address or Endpoint resource --></endpoint[x]> <name value="[string]"/><!-- 0..1 Name of system --><</target> <</receiver><receiver><!-- 0..1 Reference(Device|Organization|Patient|Practitioner| PractitionerRole|RelatedPerson) Intended "real-world" recipient for the data --></receiver> </destination><</sender> <</author><source> <!-- 1..1 Message source application --> <endpoint[x]><!-- 0..1 url|Reference(Endpoint) Actual source address or Endpoint resource --></endpoint[x]> <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> <sender><!-- 0..1 Reference(Device|Organization|Patient|Practitioner| PractitionerRole) Real world sender of the message --></sender> </source><</responsible><reason><!-- 0..1 CodeableConcept Cause of event --></reason> <response> <!-- 0..1 If this is a reply to prior message --> <identifier><!-- 1..1 Identifier Bundle.identifier of original message --></identifier> <code value="[code]"/><!-- 1..1 ok | transient-error | fatal-error --> <details><!-- 0..1 Reference(OperationOutcome) Specific list of hints/warnings/errors --></details> </response> <focus><!-- 0..* Reference(Any) The actual content of the message --></focus> <definition><!-- 0..1 canonical(MessageDefinition) Link to the definition for this message --></definition> </MessageHeader>
JSON Template
{
"resourceType" : "MessageHeader",
// from Resource: id, meta, implicitRules, and language
// from DomainResource: text, contained, extension, and modifierExtension
" },
")>",
// event[x]: The real world event that triggered this messsage. One of these 3:
"eventCoding" : { Coding },
"eventUri" : "<uri>",
"eventCanonical" : "<canonical(EventDefinition|SubscriptionTopic)>",
"destination" : [{ // Message destination application(s)
// endpoint[x]: Actual destination address or Endpoint resource. One of these 2:
"endpointUrl" : "<url>",
"endpointReference" : { Reference(Endpoint) },
"name" : "<string>", // Name of system
"
"
"receiver" : { Reference(Device|Organization|Patient|Practitioner|
PractitionerRole|RelatedPerson) } // Intended "real-world" recipient for the data
}],
"
"
"source" : { // R! Message source application
// endpoint[x]: Actual source address or Endpoint resource. One of these 2:
"endpointUrl" : "<url>",
"endpointReference" : { Reference(Endpoint) },
"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
"sender" : { Reference(Device|Organization|Patient|Practitioner|
PractitionerRole) } // Real world sender of the message
},
"
"reason" : { CodeableConcept }, // Cause of event
"response" : { // If this is a reply to prior message
"identifier" : { Identifier }, // R! Bundle.identifier of original message
"code" : "<code>", // R! ok | transient-error | fatal-error
"details" : { Reference(OperationOutcome) } // Specific list of hints/warnings/errors
},
"focus" : [{ Reference(Any) }], // The actual content of the message
"definition" : "<canonical(MessageDefinition)>" // Link to the definition for this message
}
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> .[ a fhir:MessageHeader; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from Resource: .id, .meta, .implicitRules, and .language # from DomainResource: .text, .contained, .extension, and .modifierExtension
# . One of these 2 fhir: ] fhir:) ]# event[x] : 1..1 The real world event that triggered this messsage. One of these 3 fhir:event [ a fhir:Coding ; Coding ] fhir:event [ a fhir:uri ; uri ] fhir:event [ a fhir:canonical ; canonical(EventDefinition|SubscriptionTopic) ] fhir:destination ( [ # 0..* Message destination application(s) # endpoint[x] : 0..1 Actual destination address or Endpoint resource. One of these 2 fhir:endpoint [ a fhir:url ; url ] fhir:endpoint [ a fhir:Reference ; Reference(Endpoint) ] fhir:name [ string ] ; # 0..1 Name of systemfhir: fhir:fhir:receiver [ Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ] ; # 0..1 Intended "real-world" recipient for the data ] ... ) ;fhir: fhir:fhir:source [ # 1..1 Message source application # endpoint[x] : 0..1 Actual source address or Endpoint resource. One of these 2 fhir:endpoint [ a fhir:url ; url ] fhir:endpoint [ a fhir:Reference ; Reference(Endpoint) ] fhir:name [ string ] ; # 0..1 Name of system fhir:software [ string ] ; # 0..1 Name of software running the system fhir:version [ string ] ; # 0..1 Version of software running fhir:contact [ ContactPoint ] ; # 0..1 Human contact for problems fhir:sender [ Reference(Device|Organization|Patient|Practitioner|PractitionerRole) ] ; # 0..1 Real world sender of the message ] ;fhir:fhir:reason [ CodeableConcept ] ; # 0..1 Cause of event fhir:response [ # 0..1 If this is a reply to prior message fhir:identifier [ Identifier ] ; # 1..1 Bundle.identifier of original message fhir:code [ code ] ; # 1..1 ok | transient-error | fatal-error fhir:details [ Reference(OperationOutcome) ] ; # 0..1 Specific list of hints/warnings/errors ] ; fhir:focus ( [ Reference(Any) ] ... ) ; # 0..* The actual content of the message fhir:definition [ canonical(MessageDefinition) ] ; # 0..1 Link to the definition for this message ]
Changes from both R4 and R4B
| MessageHeader | |
| MessageHeader.event[x] |
|
| MessageHeader.destination.endpoint[x] |
|
|
|
|
| MessageHeader.source.endpoint[x] |
|
| MessageHeader.source.sender |
|
| MessageHeader.response.identifier |
|
| MessageHeader.destination.target |
|
| MessageHeader.sender |
|
| MessageHeader.enterer |
|
| MessageHeader.author |
|
| MessageHeader.responsible |
|
See the Full Difference for further information
This analysis is available for R4 as XML or JSON and for R4B as XML or JSON .
Structure
| Name | Flags | Card. | Type |
Description
&
Constraints
|
|---|---|---|---|---|
|
TU | DomainResource |
A
resource
that
describes
a
message
that
is
exchanged
between
systems
Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension |
|
|
Σ | 1..1 |
Binding: MessageEvent ( Example ) |
|
|
Coding | |||
|
uri | |||
| canonical ( EventDefinition | SubscriptionTopic ) | |||
|
Σ | 0..* | BackboneElement |
Message
destination
application(s)
|
|
Σ | 0..1 |
Actual
destination
address
or
Endpoint
resource
|
|
|
url | |||
|
Reference ( Endpoint ) | |||
|
Σ | 0..1 | string |
Name
of
system
|
|
Σ | 0..1 |
Reference
(
|
|
|
Σ | 1..1 | BackboneElement |
Message
source
application
|
|
Σ | 0..1 |
Actual
source
address
or
Endpoint
resource
|
|
|
url | |||
|
Reference ( Endpoint ) | |||
|
Σ | 0..1 | string |
Name
of
system
|
|
Σ | 0..1 | string |
Name
of
software
running
the
system
|
|
Σ | 0..1 | string |
Version
of
software
running
|
|
Σ | 0..1 | ContactPoint |
Human
contact
for
problems
|
|
Σ | 0..1 |
Reference
(
Device
|
Organization
|
Patient
|
Practitioner
|
PractitionerRole
|
|
|
Σ | 0..1 | CodeableConcept |
Cause
of
event
Binding: Example Message Reason Codes ( Example ) |
|
Σ | 0..1 | BackboneElement |
If
this
is
a
reply
to
prior
message
|
|
Σ | 1..1 | Identifier |
Bundle.identifier
of
original
message
|
|
Σ | 1..1 | code |
ok
|
transient-error
|
fatal-error
Binding: Response Type ( Required ) |
|
Σ | 0..1 | Reference ( OperationOutcome ) |
Specific
list
of
hints/warnings/errors
|
|
Σ | 0..* | Reference ( Any ) |
The
actual
content
of
the
message
|
|
Σ | 0..1 | canonical ( MessageDefinition ) |
Link
to
the
definition
for
this
message
|
Documentation
for
this
format
|
||||
See the Extensions for this resource
XML Template
<MessageHeader xmlns="http://hl7.org/fhir"><!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension -->
<</event[x]><event[x]><!-- 1..1 Coding|uri|canonical(EventDefinition|SubscriptionTopic) The real world event that triggered this messsage --></event[x]> <destination> <!-- 0..* Message destination application(s) --> <endpoint[x]><!-- 0..1 url|Reference(Endpoint) Actual destination address or Endpoint resource --></endpoint[x]> <name value="[string]"/><!-- 0..1 Name of system --><</target> <</receiver><receiver><!-- 0..1 Reference(Device|Organization|Patient|Practitioner| PractitionerRole|RelatedPerson) Intended "real-world" recipient for the data --></receiver> </destination><</sender> <</author><source> <!-- 1..1 Message source application --> <endpoint[x]><!-- 0..1 url|Reference(Endpoint) Actual source address or Endpoint resource --></endpoint[x]> <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> <sender><!-- 0..1 Reference(Device|Organization|Patient|Practitioner| PractitionerRole) Real world sender of the message --></sender> </source><</responsible><reason><!-- 0..1 CodeableConcept Cause of event --></reason> <response> <!-- 0..1 If this is a reply to prior message --> <identifier><!-- 1..1 Identifier Bundle.identifier of original message --></identifier> <code value="[code]"/><!-- 1..1 ok | transient-error | fatal-error --> <details><!-- 0..1 Reference(OperationOutcome) Specific list of hints/warnings/errors --></details> </response> <focus><!-- 0..* Reference(Any) The actual content of the message --></focus> <definition><!-- 0..1 canonical(MessageDefinition) Link to the definition for this message --></definition> </MessageHeader>
JSON Template
{
"resourceType" : "MessageHeader",
// from Resource: id, meta, implicitRules, and language
// from DomainResource: text, contained, extension, and modifierExtension
" },
")>",
// event[x]: The real world event that triggered this messsage. One of these 3:
"eventCoding" : { Coding },
"eventUri" : "<uri>",
"eventCanonical" : "<canonical(EventDefinition|SubscriptionTopic)>",
"destination" : [{ // Message destination application(s)
// endpoint[x]: Actual destination address or Endpoint resource. One of these 2:
"endpointUrl" : "<url>",
"endpointReference" : { Reference(Endpoint) },
"name" : "<string>", // Name of system
"
"
"receiver" : { Reference(Device|Organization|Patient|Practitioner|
PractitionerRole|RelatedPerson) } // Intended "real-world" recipient for the data
}],
"
"
"source" : { // R! Message source application
// endpoint[x]: Actual source address or Endpoint resource. One of these 2:
"endpointUrl" : "<url>",
"endpointReference" : { Reference(Endpoint) },
"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
"sender" : { Reference(Device|Organization|Patient|Practitioner|
PractitionerRole) } // Real world sender of the message
},
"
"reason" : { CodeableConcept }, // Cause of event
"response" : { // If this is a reply to prior message
"identifier" : { Identifier }, // R! Bundle.identifier of original message
"code" : "<code>", // R! ok | transient-error | fatal-error
"details" : { Reference(OperationOutcome) } // Specific list of hints/warnings/errors
},
"focus" : [{ Reference(Any) }], // The actual content of the message
"definition" : "<canonical(MessageDefinition)>" // Link to the definition for this message
}
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> .[ a fhir:MessageHeader; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from Resource: .id, .meta, .implicitRules, and .language # from DomainResource: .text, .contained, .extension, and .modifierExtension
# . One of these 2 fhir: ] fhir:) ]# event[x] : 1..1 The real world event that triggered this messsage. One of these 3 fhir:event [ a fhir:Coding ; Coding ] fhir:event [ a fhir:uri ; uri ] fhir:event [ a fhir:canonical ; canonical(EventDefinition|SubscriptionTopic) ] fhir:destination ( [ # 0..* Message destination application(s) # endpoint[x] : 0..1 Actual destination address or Endpoint resource. One of these 2 fhir:endpoint [ a fhir:url ; url ] fhir:endpoint [ a fhir:Reference ; Reference(Endpoint) ] fhir:name [ string ] ; # 0..1 Name of systemfhir: fhir:fhir:receiver [ Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ] ; # 0..1 Intended "real-world" recipient for the data ] ... ) ;fhir: fhir:fhir:source [ # 1..1 Message source application # endpoint[x] : 0..1 Actual source address or Endpoint resource. One of these 2 fhir:endpoint [ a fhir:url ; url ] fhir:endpoint [ a fhir:Reference ; Reference(Endpoint) ] fhir:name [ string ] ; # 0..1 Name of system fhir:software [ string ] ; # 0..1 Name of software running the system fhir:version [ string ] ; # 0..1 Version of software running fhir:contact [ ContactPoint ] ; # 0..1 Human contact for problems fhir:sender [ Reference(Device|Organization|Patient|Practitioner|PractitionerRole) ] ; # 0..1 Real world sender of the message ] ;fhir:fhir:reason [ CodeableConcept ] ; # 0..1 Cause of event fhir:response [ # 0..1 If this is a reply to prior message fhir:identifier [ Identifier ] ; # 1..1 Bundle.identifier of original message fhir:code [ code ] ; # 1..1 ok | transient-error | fatal-error fhir:details [ Reference(OperationOutcome) ] ; # 0..1 Specific list of hints/warnings/errors ] ; fhir:focus ( [ Reference(Any) ] ... ) ; # 0..* The actual content of the message fhir:definition [ canonical(MessageDefinition) ] ; # 0..1 Link to the definition for this message ]
Changes from both R4 and R4B
| MessageHeader | |
| MessageHeader.event[x] |
|
| MessageHeader.destination.endpoint[x] |
|
|
|
|
| MessageHeader.source.endpoint[x] |
|
| MessageHeader.source.sender |
|
| MessageHeader.response.identifier |
|
| MessageHeader.destination.target |
|
| MessageHeader.sender |
|
| MessageHeader.enterer |
|
| MessageHeader.author |
|
| MessageHeader.responsible |
|
See the Full Difference for further information
This analysis is available for R4 as XML or JSON and for R4B as XML or JSON .
Additional definitions: Master Definition XML + JSON , XML Schema / Schematron + JSON Schema , ShEx (for Turtle ) + see the extensions , the spreadsheet version & the dependency analysis
| Path | ValueSet | Type | Documentation |
|---|---|---|---|
| MessageHeader.event[x] |
|
Example | |
| MessageHeader.reason | ExampleMessageReasonCodes | Example |
Example Message Reasons. These are the set of codes that might be used an updating an encounter using admin-update. |
| MessageHeader.response.code | ResponseType | Required |
The kind of response to a message. |
Search parameters for this resource. See also the full list of search parameters for this resource , and check the Extensions registry for search parameters on extensions related to this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.
| Name | Type | Description | Expression | In Common |
|
|
token | ok | transient-error | fatal-error | MessageHeader.response.code | |
| destination | string | Name of system | MessageHeader.destination.name | |
| event | token | Code for the event this message represents or link to event definition | MessageHeader.event.ofType(Coding) | MessageHeader.event.ofType(canonical) | |
| focus | reference | The actual content of the message |
MessageHeader.focus
(Any) |
|
| receiver | reference | Intended "real-world" recipient for the data |
MessageHeader.destination.receiver
( Practitioner , Organization , Device , Patient , PractitionerRole , RelatedPerson ) |
|
| response-id | token | Id of original message | MessageHeader.response.identifier | |
| sender | reference | Real world sender of the message |
( Practitioner , Organization , Device , Patient , PractitionerRole ) |
|
| source | string | Name of system | MessageHeader.source.name |