Skip to content

MessageHeader Profile

Canonical../StructureDefinition/nexus-emr-core-messageheader
Statusdraft (experimental) · 1.26.0
BaseMessageHeader (constraint)
SourceFSH · JSON

Nexus EMR profile for MessageHeader -- the routing envelope on an eReferral message bundle, consumed by the gateway's operation-routing middleware. Infrastructure rather than clinical content: no effective date, and R4 gives it no identifier element. First pass: the event vocabulary is not settled.

Elements / Details

Every element this profile touches, with its full definition. Element names in the tables link here.

MessageHeader

Short Nexus EMR MessageHeader Core
Definition The header of a FHIR message bundle: what event it represents, who sent it, who it is for, and what it is about. Used to route inbound eReferral traffic. Carries no clinical content of its own -- the content is in the bundle's other entries, pointed at by focus.
Cardinality 0..*
Invariants dom-2, dom-3, dom-4, dom-5, dom-6, messageheader-routable

MessageHeader.id

Short Logical id of this artifact
Definition The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
Comments The only time that a resource does not have an id is when it is being submitted to the server using a create operation.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

MessageHeader.meta

Short Metadata about the resource
Definition The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
Cardinality 0..1
Type Meta
Invariants ele-1

MessageHeader.meta.id

Short Unique id for inter-element referencing
Definition Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

MessageHeader.meta.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

MessageHeader.meta.versionId

Short Version specific identifier
Definition The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted.
Comments The server assigns this value, and ignores what the client specifies, except in the case that the server is imposing version integrity on updates/deletes.
Cardinality 0..1
Type id
Invariants ele-1

MessageHeader.meta.lastUpdated

Short When the resource version last changed
Definition When the resource last changed - e.g. when the version changed.
Comments This value is always populated except when the resource is first being created. The server / resource manager sets this value; what a client provides is irrelevant. This is equivalent to the HTTP Last-Modified and SHOULD have the same value on a read interaction.
Cardinality 0..1
Type instant
Invariants ele-1

MessageHeader.meta.source

Short Identifies EMR instance & pipeline version the resource came from
Definition A URI that identifies the EMR pipeline and version from which this resource originated. This tells you which EMR instance (recommend using the instance identifier), and the version of the pipeline code/transformations.
Comments In the provenance resource, this corresponds to Provenance.entity.what[x]. The exact use of the source (and the implied Provenance.entity.role) is left to implementer discretion. Only one nominated source is allowed; for additional provenance details, a full Provenance resource should be used. This element can be used to indicate where the current master source of a resource that has a canonical URL if the resource is no longer hosted at the canonical URL.
Cardinality 0..1
Type uri
Must Support yes
Invariants ele-1

MessageHeader.meta.profile

Short Profiles this resource claims to conform to
Definition A list of profiles (references to StructureDefinition resources) that this resource claims to conform to. The URL is a reference to StructureDefinition.url.
Comments It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time. The list of profile URLs is a set.
Cardinality 0..*
Type canonical
Invariants ele-1

MessageHeader.meta.security

Short Security Labels applied to this resource
Definition Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.
Comments The security labels can be updated without changing the stated version of the resource. The list of security labels is a set. Uniqueness is based the system/code, and version and display are ignored.
Cardinality 0..*
Type Coding
Binding security-labels (extensible)
Invariants ele-1

MessageHeader.meta.tag

Short Tags applied to this resource
Definition Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.
Comments The tags can be updated without changing the stated version of the resource. The list of tags is a set. Uniqueness is based the system/code, and version and display are ignored.
Cardinality 0..*
Type Coding
Binding common-tags (example)
Invariants ele-1

MessageHeader.implicitRules

Short A set of rules under which this content was created
Definition A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.
Comments Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.
Cardinality 0..1
Type uri
Modifier yes — This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation
Invariants ele-1

MessageHeader.language

Short Language of the resource content
Definition The base language in which the resource is written.
Comments Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).
Cardinality 0..1
Type code
Binding languages (preferred)
Invariants ele-1

MessageHeader.text

Short Narrative
Definition A human-readable narrative summary of the NexusEmrCoreMessageHeader resource for human interpretation.
Comments Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a "text blob" or where text is additionally entered raw or narrated and encoded information is added later.
Cardinality 0..1
Type Narrative
Must Support yes
Invariants ele-1
Also called narrative, html, xhtml, display

MessageHeader.contained

Short Contained, inline Resources
Definition These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.
Comments This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.
Cardinality 0..*
Type Resource
Also called inline resources, anonymous resources, contained resources

MessageHeader.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

MessageHeader.modifierExtension

Short Extensions that cannot be ignored
Definition May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Requirements Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Modifier yes — Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them
Invariants ele-1, ext-1
Also called extensions, user content

MessageHeader.event[x]

Short The event this message represents (the routing key)
Definition 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://terminology.hl7.org/CodeSystem/message-events". Alternatively uri to the EventDefinition.
Requirements Drives the behavior associated with this message.
Comments ⚠ FIRST PASS -- no binding. R4 offers a choice of Coding or uri, and each eReferral partner brings its own event vocabulary; binding a local set now would make conformant partner traffic non-conformant. Consumers MUST handle both the Coding and the uri form -- reading only eventCoding silently fails to route a partner using eventUri. What this estate itself sends is a Coding under eHealth Ontario's event system, declared at ../fhir/NamingSystem-OnMessageEventCodeNS.md so that meeting it is recognition rather than a lookup that fails. That declaration deliberately does NOT bind this element: it says what our own outbound traffic carries, and a partner remains free to send a code, or a system, that this specification has never named.
Cardinality 1..1
Type Coding, uri
Must Support yes
Binding message-events (example)
Invariants ele-1

MessageHeader.destination

Short The intended receiver(s)
Definition The destination application which the message is intended for.
Requirements Indicates where message is to be sent for routing purposes. Allows verification of "am I the intended recipient".
Comments There SHOULD be at least one destination, but in some circumstances, the source system is unaware of any particular destination system.
Cardinality 0..*
Type BackboneElement
Must Support yes
Invariants ele-1

MessageHeader.destination.id

Short Unique id for inter-element referencing
Definition Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

MessageHeader.destination.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

MessageHeader.destination.modifierExtension

Short Extensions that cannot be ignored even if unrecognized
Definition May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Requirements Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Modifier yes — Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
Invariants ele-1, ext-1
Also called extensions, user content, modifiers

MessageHeader.destination.name

Short Name of system
Definition Human-readable name for the target system.
Requirements May be used for routing of response and/or to support audit.
Cardinality 0..1
Type string
Invariants ele-1

MessageHeader.destination.target

Short Particular delivery destination within the destination
Definition Identifies the target end system in situations where the initial message transmission is to an intermediary system.
Requirements Supports multi-hop routing.
Cardinality 0..1
Type Reference(Device)
Invariants ele-1

MessageHeader.destination.endpoint

Short The receiver's endpoint
Definition Indicates where the message should be routed to.
Requirements Identifies where to route the message.
Comments The id may be a non-resolvable URI for systems that do not use standard network-based addresses.
Cardinality 1..1
Type url
Must Support yes
Invariants ele-1

MessageHeader.destination.receiver

Short Intended "real-world" recipient for the data
Definition Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.
Requirements Allows routing beyond just the application level.
Cardinality 0..1
Type Reference(Practitioner | PractitionerRole | Organization)
Invariants ele-1

MessageHeader.sender

Short The organization or person responsible for the message content
Definition Identifies the sending system to allow the use of a trust relationship.
Requirements Allows routing beyond just the application level.
Comments Distinct from source, which is the technical sending system. sender is who is accountable for the content -- for inbound partner traffic this is usually an Organization.
Cardinality 0..1
Type Reference(Practitioner Profile | PractitionerRole Profile | Organization Profile)
Must Support yes
Invariants ele-1

MessageHeader.enterer

Short The source of the data entry
Definition The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.
Requirements Need to know for audit/traceback requirements and possibly for authorization.
Comments Usually only for the request but can be used in a response.
Cardinality 0..1
Type Reference(Practitioner | PractitionerRole)
Invariants ele-1

MessageHeader.author

Short The source of the decision
Definition The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.
Requirements Need to know for audit/traceback requirements and possibly for authorization.
Comments Usually only for the request but can be used in a response.
Cardinality 0..1
Type Reference(Practitioner | PractitionerRole)
Invariants ele-1

MessageHeader.source

Short The system that sent the message
Definition The source application from which this message originated.
Requirements Allows replies, supports audit.
Cardinality 1..1
Type BackboneElement
Must Support yes
Invariants ele-1

MessageHeader.source.id

Short Unique id for inter-element referencing
Definition Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

MessageHeader.source.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

MessageHeader.source.modifierExtension

Short Extensions that cannot be ignored even if unrecognized
Definition May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Requirements Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Modifier yes — Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
Invariants ele-1, ext-1
Also called extensions, user content, modifiers

MessageHeader.source.name

Short Human-readable name of the sending system
Definition Human-readable name for the source system.
Requirements May be used to support audit.
Cardinality 0..1
Type string
Must Support yes
Invariants ele-1

MessageHeader.source.software

Short Name of software running the system
Definition May include configuration or other information useful in debugging.
Requirements Supports audit and possibly interface engine behavior.
Cardinality 0..1
Type string
Invariants ele-1

MessageHeader.source.version

Short Version of software running
Definition Can convey versions of multiple systems in situations where a message passes through multiple hands.
Requirements Supports audit and possibly interface engine behavior.
Cardinality 0..1
Type string
Invariants ele-1

MessageHeader.source.contact

Short Human contact for problems
Definition An e-mail, phone, website or other contact point to use to resolve issues with message communications.
Requirements Allows escalation of technical issues.
Cardinality 0..1
Type ContactPoint
Invariants ele-1

MessageHeader.source.endpoint

Short The sender's endpoint (where replies go)
Definition Identifies the routing target to send acknowledgements to.
Requirements Identifies where to send responses, may influence security permissions.
Comments The id may be a non-resolvable URI for systems that do not use standard network-based addresses.
Cardinality 1..1
Type url
Must Support yes
Invariants ele-1

MessageHeader.responsible

Short The party accountable for the message
Definition 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 party.
Requirements Need to know for audit/traceback requirements and possibly for authorization.
Comments Usually only for the request but can be used in a response.
Cardinality 0..1
Type Reference(Practitioner Profile | PractitionerRole Profile | Organization Profile)
Must Support yes
Invariants ele-1

MessageHeader.reason

Short Cause of event
Definition Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.
Requirements Need to be able to track why resources are being changed and report in the audit log/history of the resource. May affect authorization.
Cardinality 0..1
Type CodeableConcept
Binding message-reason-encounter (example)
Invariants ele-1

MessageHeader.response

Short Present when this message is a response to an earlier one
Definition Information about the message that this message is a response to. Only present if this message is a response.
Cardinality 0..1
Type BackboneElement
Must Support yes
Invariants ele-1

MessageHeader.response.id

Short Unique id for inter-element referencing
Definition Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

MessageHeader.response.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

MessageHeader.response.modifierExtension

Short Extensions that cannot be ignored even if unrecognized
Definition May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Requirements Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Modifier yes — Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
Invariants ele-1, ext-1
Also called extensions, user content, modifiers

MessageHeader.response.identifier

Short The id of the message being answered (R4 type id, NOT an Identifier)
Definition The MessageHeader.id of the message to which this message is a response.
Requirements Allows receiver to know what message is being responded to.
Comments ⚠ Type trap. Despite the element name, this is R4 primitive id, not an Identifier datatype -- so it is a bare string constrained to [A-Za-z0-9\-\.]{1,64}. A urn:uuid:... value is invalid (colons are not permitted), and a system+value object will not parse. It holds the plain id of the message this one responds to. Cross-boundary correlation with a partner's own message identifier therefore cannot ride here; use Bundle.identifier on the enclosing message bundle for that.
Cardinality 1..1
Type id
Must Support yes
Invariants ele-1

MessageHeader.response.code

Short ok | transient-error | fatal-error
Definition Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.
Requirements Allows the sender of the acknowledge message to know if the request was successful or if action is needed.
Comments A partner reporting fatal-error has REJECTED the referral. A consumer that ignores this element will show a submitted referral as in-flight indefinitely.
Cardinality 1..1
Type code
Must Support yes
Binding response-code (required)
Invariants ele-1

MessageHeader.response.details

Short Specific list of hints/warnings/errors
Definition Full details of any issues found in the message.
Requirements Allows the sender of the message to determine what the specific issues are.
Comments This SHALL be contained in the bundle. If any of the issues are errors, the response code SHALL be an error.
Cardinality 0..1
Type Reference(OperationOutcome)
Invariants ele-1

MessageHeader.focus

Short The resource(s) this message concerns
Definition The actual data of the message - a reference to the root/focus class of the event.
Requirements Every message event is about actual data, a single resource, that is identified in the definition of the event, and perhaps some or all linked resources.
Comments Points at the other entries in the message bundle -- typically a ServiceRequest or Task for an eReferral, plus the Patient. These are intra-bundle references and resolve within the bundle, NOT against the server, which is the usual reason a naive resolver reports them missing.
Cardinality 0..*
Type Reference(Resource)
Must Support yes
Invariants ele-1

MessageHeader.definition

Short Link to the definition for this message
Definition Permanent link to the MessageDefinition for this message.
Requirements Allows sender to define the expected contents of the message.
Cardinality 0..1
Type canonical
Invariants ele-1