FHIR Artifacts > Structure Definition: MessageHeader Profile

Structure Definition: MessageHeader Profile

Canonical URL:http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-MessageHeader

Simplifier project page: MessageHeader

Derived from: MessageHeader (R4)

Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work

Differential View

idΣ1..1System.String
versionIdΣ0..1id
lastUpdatedΣ0..1instant
sourceΣ0..1uri
profileS Σ1..*canonical(StructureDefinition)
securityΣ0..*CodingBinding
tagΣ0..*Coding
url1..1System.StringFixed Value
systemS Σ0..1uriFixed Value
versionΣ0..1string
codeS Σ0..1code
displayS Σ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
url1..1System.StringFixed Value
useΣ ?!0..1codeBinding
systemS Σ0..1uri
versionΣ0..1string
codeS Σ0..1code
displayS Σ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
systemS Σ1..1uri
valueS Σ1..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(Organization)
url1..1System.StringFixed Value
codeS
eventUriuri
systemS Σ0..1uriFixed Value
versionΣ0..1string
codeS Σ0..1codeBinding
displayS Σ0..1string
userSelectedΣ0..1boolean
nameS Σ0..1string
targetS Σ I0..1Reference(Device)
endpointS Σ1..1url
receiverS Σ I0..1Reference(PractitionerRole)
senderΣ I0..1Reference(Practitioner | PractitionerRole | Organization)
entererΣ I0..1Reference(Practitioner | PractitionerRole)
authorS Σ I1..1Reference(PractitionerRole)
nameS Σ0..1string
softwareS Σ0..1string
versionS Σ0..1string
systemS Σ I0..1codeBinding
valueS Σ0..1string
useS Σ ?!0..1codeBinding
rankS Σ0..1positiveInt
periodΣ I0..1Period
endpointS Σ1..1url
responsibleΣ I0..1Reference(Practitioner | PractitionerRole | Organization)
systemS Σ0..1uri
versionΣ0..1string
codeS Σ0..1code
displayS Σ0..1string
userSelectedΣ0..1boolean
textS Σ0..1string
identifierΣ1..1id
codeΣ1..1codeBinding
detailsΣ I0..1Reference(OperationOutcome)
focusS Σ I1..*Reference(ServiceRequest | Task | Patient | Appointment | Communication)
definitionΣ0..1canonical(MessageDefinition)

Hybrid View

idΣ1..1System.String
versionIdΣ0..1id
lastUpdatedΣ0..1instant
sourceΣ0..1uri
profileS Σ1..*canonical(StructureDefinition)
securityΣ0..*CodingBinding
tagΣ0..*Coding
url1..1System.StringFixed Value
systemS Σ0..1uriFixed Value
versionΣ0..1string
codeS Σ0..1code
displayS Σ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
url1..1System.StringFixed Value
useΣ ?!0..1codeBinding
systemS Σ0..1uri
versionΣ0..1string
codeS Σ0..1code
displayS Σ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
systemS Σ1..1uri
valueS Σ1..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(Organization)
url1..1System.StringFixed Value
codeS
eventUriuri
systemS Σ0..1uriFixed Value
versionΣ0..1string
codeS Σ0..1codeBinding
displayS Σ0..1string
userSelectedΣ0..1boolean
nameS Σ0..1string
targetS Σ I0..1Reference(Device)
endpointS Σ1..1url
receiverS Σ I0..1Reference(PractitionerRole)
senderΣ I0..1Reference(Practitioner | PractitionerRole | Organization)
entererΣ I0..1Reference(Practitioner | PractitionerRole)
authorS Σ I1..1Reference(PractitionerRole)
nameS Σ0..1string
softwareS Σ0..1string
versionS Σ0..1string
systemS Σ I0..1codeBinding
valueS Σ0..1string
useS Σ ?!0..1codeBinding
rankS Σ0..1positiveInt
periodΣ I0..1Period
endpointS Σ1..1url
responsibleΣ I0..1Reference(Practitioner | PractitionerRole | Organization)
systemS Σ0..1uri
versionΣ0..1string
codeS Σ0..1code
displayS Σ0..1string
userSelectedΣ0..1boolean
textS Σ0..1string
identifierΣ1..1id
codeΣ1..1codeBinding
detailsΣ I0..1Reference(OperationOutcome)
focusS Σ I1..*Reference(ServiceRequest | Task | Patient | Appointment | Communication)
definitionΣ0..1canonical(MessageDefinition)

Snapshot View

idΣ1..1System.String
versionIdΣ0..1id
lastUpdatedΣ0..1instant
sourceΣ0..1uri
profileS Σ1..*canonical(StructureDefinition)
securityΣ0..*CodingBinding
tagΣ0..*Coding
url1..1System.StringFixed Value
systemS Σ0..1uriFixed Value
versionΣ0..1string
codeS Σ0..1code
displayS Σ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
url1..1System.StringFixed Value
useΣ ?!0..1codeBinding
systemS Σ0..1uri
versionΣ0..1string
codeS Σ0..1code
displayS Σ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
systemS Σ1..1uri
valueS Σ1..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(Organization)
url1..1System.StringFixed Value
codeS
eventUriuri
systemS Σ0..1uriFixed Value
versionΣ0..1string
codeS Σ0..1codeBinding
displayS Σ0..1string
userSelectedΣ0..1boolean
nameS Σ0..1string
targetS Σ I0..1Reference(Device)
endpointS Σ1..1url
receiverS Σ I0..1Reference(PractitionerRole)
senderΣ I0..1Reference(Practitioner | PractitionerRole | Organization)
entererΣ I0..1Reference(Practitioner | PractitionerRole)
authorS Σ I1..1Reference(PractitionerRole)
nameS Σ0..1string
softwareS Σ0..1string
versionS Σ0..1string
systemS Σ I0..1codeBinding
valueS Σ0..1string
useS Σ ?!0..1codeBinding
rankS Σ0..1positiveInt
periodΣ I0..1Period
endpointS Σ1..1url
responsibleΣ I0..1Reference(Practitioner | PractitionerRole | Organization)
systemS Σ0..1uri
versionΣ0..1string
codeS Σ0..1code
displayS Σ0..1string
userSelectedΣ0..1boolean
textS Σ0..1string
identifierΣ1..1id
codeΣ1..1codeBinding
detailsΣ I0..1Reference(OperationOutcome)
focusS Σ I1..*Reference(ServiceRequest | Task | Patient | Appointment | Communication)
definitionΣ0..1canonical(MessageDefinition)

Table View

MessageHeader..
MessageHeader.id1..
MessageHeader.meta1..
MessageHeader.meta.profile1..
MessageHeader.extension..
MessageHeader.extensionExtension0..*
MessageHeader.extension.value[x]..
MessageHeader.extension.value[x].coding..
MessageHeader.extension.value[x].coding.system..
MessageHeader.extension.value[x].coding.code..
MessageHeader.extension.value[x].coding.display..
MessageHeader.extensionExtension0..
MessageHeader.extension.value[x]..
MessageHeader.extension.value[x].type..
MessageHeader.extension.value[x].type.coding..
MessageHeader.extension.value[x].type.coding.system..
MessageHeader.extension.value[x].type.coding.code..
MessageHeader.extension.value[x].type.coding.display..
MessageHeader.extension.value[x].system1..
MessageHeader.extension.value[x].value1..
MessageHeader.extensionExtension0..1
MessageHeader.extension.value[x]..
MessageHeader.extension.value[x].code..
MessageHeader.event[x]1..1
MessageHeader.event[x]Coding..
MessageHeader.event[x].system..
MessageHeader.event[x].code..
MessageHeader.event[x].display..
MessageHeader.destination1..
MessageHeader.destination.name..
MessageHeader.destination.target..
MessageHeader.destination.endpoint..
MessageHeader.destination.receiverReference(PractitionerRole)..
MessageHeader.authorReference(PractitionerRole)1..
MessageHeader.source..
MessageHeader.source.name..
MessageHeader.source.software..
MessageHeader.source.version..
MessageHeader.source.contact..
MessageHeader.source.contact.system..
MessageHeader.source.contact.value..
MessageHeader.source.contact.use..
MessageHeader.source.contact.rank..
MessageHeader.source.endpoint..
MessageHeader.reason..
MessageHeader.reason.coding..
MessageHeader.reason.coding.system..
MessageHeader.reason.coding.code..
MessageHeader.reason.coding.display..
MessageHeader.reason.text..
MessageHeader.focusReference(ServiceRequest | Task | Patient | Appointment | Communication)1..


JSON View

{
    "resourceType": "StructureDefinition",
    "id": "ca-on-eReferral-profile-MessageHeader",
    "url": "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-MessageHeader",
    "version": "1.0.1",
    "name": "EReferralMessageHeader",
    "title": "MessageHeader",
    "status": "draft",
    "description": "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.\nTo enable sending system insert its own identifiers into API submitted eReferral, and have that returned with subsequent messages, an extension is created on the MessageHeader.identifier element for referral id.",
    "fhirVersion": "4.0.1",
    "kind": "resource",
    "abstract": false,
    "type": "MessageHeader",
    "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MessageHeader",
    "derivation": "constraint",
    "differential": {
        "element":  [
            {
                "id": "MessageHeader.id",
                "path": "MessageHeader.id",
                "min": 1
            },
            {
                "id": "MessageHeader.meta",
                "path": "MessageHeader.meta",
                "min": 1,
                "mustSupport": true
            },
            {
                "id": "MessageHeader.meta.profile",
                "path": "MessageHeader.meta.profile",
                "comment": "#### **_` FOR eREFERRAL USAGE: The meta.profile = http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-MessageHeader|1.0.1 `_**\n\nIt 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.",
                "min": 1,
                "mustSupport": true
            },
            {
                "id": "MessageHeader.extension",
                "path": "MessageHeader.extension",
                "slicing": {
                    "discriminator":  [
                        {
                            "type": "value",
                            "path": "url"
                        }
                    ],
                    "rules": "open"
                }
            },
            {
                "id": "MessageHeader.extension:RoutingOptions",
                "path": "MessageHeader.extension",
                "sliceName": "RoutingOptions",
                "min": 0,
                "max": "*",
                "type":  [
                    {
                        "code": "Extension",
                        "profile":  [
                            "http://ehealthontario.ca/fhir/StructureDefinition/ext-routing-options"
                        ]
                    }
                ],
                "mustSupport": true
            },
            {
                "id": "MessageHeader.extension:RoutingOptions.value[x]",
                "path": "MessageHeader.extension.value[x]",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.extension:RoutingOptions.value[x].coding",
                "path": "MessageHeader.extension.value[x].coding",
                "mustSupport": true,
                "binding": {
                    "strength": "extensible",
                    "valueSet": "http://ehealthontario.ca/fhir/ValueSet/ereferral-source-types"
                }
            },
            {
                "id": "MessageHeader.extension:RoutingOptions.value[x].coding.system",
                "path": "MessageHeader.extension.value[x].coding.system",
                "fixedUri": "http://ehealthontario.ca/fhir/CodeSystem/ereferral-source-types",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.extension:RoutingOptions.value[x].coding.code",
                "path": "MessageHeader.extension.value[x].coding.code",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.extension:RoutingOptions.value[x].coding.display",
                "path": "MessageHeader.extension.value[x].coding.display",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.extension:ReferralIdentifier",
                "path": "MessageHeader.extension",
                "sliceName": "ReferralIdentifier",
                "min": 0,
                "type":  [
                    {
                        "code": "Extension",
                        "profile":  [
                            "http://ehealthontario.ca/fhir/StructureDefinition/ext-referral-identifier"
                        ]
                    }
                ],
                "mustSupport": true
            },
            {
                "id": "MessageHeader.extension:ReferralIdentifier.value[x]",
                "path": "MessageHeader.extension.value[x]",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.extension:ReferralIdentifier.value[x].type",
                "path": "MessageHeader.extension.value[x].type",
                "mustSupport": true,
                "binding": {
                    "strength": "extensible",
                    "valueSet": "http://ehealthontario.ca/fhir/ValueSet/ereferral-source-types"
                }
            },
            {
                "id": "MessageHeader.extension:ReferralIdentifier.value[x].type.coding",
                "path": "MessageHeader.extension.value[x].type.coding",
                "mustSupport": true,
                "binding": {
                    "strength": "extensible",
                    "valueSet": "http://ehealthontario.ca/fhir/ValueSet/ereferral-source-types"
                }
            },
            {
                "id": "MessageHeader.extension:ReferralIdentifier.value[x].type.coding.system",
                "path": "MessageHeader.extension.value[x].type.coding.system",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.extension:ReferralIdentifier.value[x].type.coding.code",
                "path": "MessageHeader.extension.value[x].type.coding.code",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.extension:ReferralIdentifier.value[x].type.coding.display",
                "path": "MessageHeader.extension.value[x].type.coding.display",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.extension:ReferralIdentifier.value[x].system",
                "path": "MessageHeader.extension.value[x].system",
                "min": 1,
                "mustSupport": true
            },
            {
                "id": "MessageHeader.extension:ReferralIdentifier.value[x].value",
                "path": "MessageHeader.extension.value[x].value",
                "min": 1,
                "mustSupport": true
            },
            {
                "id": "MessageHeader.extension:ContentType",
                "path": "MessageHeader.extension",
                "sliceName": "ContentType",
                "min": 0,
                "max": "1",
                "type":  [
                    {
                        "code": "Extension",
                        "profile":  [
                            "http://ehealthontario.ca/fhir/StructureDefinition/ext-content-type"
                        ]
                    }
                ],
                "mustSupport": true
            },
            {
                "id": "MessageHeader.extension:ContentType.value[x]",
                "path": "MessageHeader.extension.value[x]",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.extension:ContentType.value[x].code",
                "path": "MessageHeader.extension.value[x].code",
                "mustSupport": true,
                "binding": {
                    "strength": "extensible",
                    "valueSet": "https://ehealthontario.ca/fhir/ValueSet/content-type"
                }
            },
            {
                "id": "MessageHeader.event[x]",
                "path": "MessageHeader.event[x]",
                "slicing": {
                    "discriminator":  [
                        {
                            "type": "type",
                            "path": "$this"
                        }
                    ],
                    "ordered": false,
                    "rules": "closed"
                },
                "min": 1,
                "max": "1"
            },
            {
                "id": "MessageHeader.event[x]:eventCoding",
                "path": "MessageHeader.event[x]",
                "sliceName": "eventCoding",
                "type":  [
                    {
                        "code": "Coding"
                    }
                ],
                "mustSupport": true,
                "binding": {
                    "strength": "extensible",
                    "valueSet": "http://ehealthontario.ca/fhir/ValueSet/message-event-code"
                }
            },
            {
                "id": "MessageHeader.event[x]:eventCoding.system",
                "path": "MessageHeader.event[x].system",
                "fixedUri": "https://ehealthontario.ca/fhir/CodeSystem/message-event-code",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.event[x]:eventCoding.code",
                "path": "MessageHeader.event[x].code",
                "mustSupport": true,
                "binding": {
                    "strength": "extensible",
                    "valueSet": "http://ehealthontario.ca/fhir/ValueSet/message-event-code"
                }
            },
            {
                "id": "MessageHeader.event[x]:eventCoding.display",
                "path": "MessageHeader.event[x].display",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.destination",
                "path": "MessageHeader.destination",
                "min": 1,
                "mustSupport": true
            },
            {
                "id": "MessageHeader.destination.name",
                "path": "MessageHeader.destination.name",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.destination.target",
                "path": "MessageHeader.destination.target",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.destination.endpoint",
                "path": "MessageHeader.destination.endpoint",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.destination.receiver",
                "path": "MessageHeader.destination.receiver",
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile":  [
                            "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-PractitionerRole"
                        ],
                        "aggregation":  [
                            "referenced"
                        ]
                    }
                ],
                "mustSupport": true
            },
            {
                "id": "MessageHeader.author",
                "path": "MessageHeader.author",
                "min": 1,
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile":  [
                            "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-PractitionerRole"
                        ],
                        "aggregation":  [
                            "referenced"
                        ]
                    }
                ],
                "mustSupport": true
            },
            {
                "id": "MessageHeader.source",
                "path": "MessageHeader.source",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.source.name",
                "path": "MessageHeader.source.name",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.source.software",
                "path": "MessageHeader.source.software",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.source.version",
                "path": "MessageHeader.source.version",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.source.contact",
                "path": "MessageHeader.source.contact",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.source.contact.system",
                "path": "MessageHeader.source.contact.system",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.source.contact.value",
                "path": "MessageHeader.source.contact.value",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.source.contact.use",
                "path": "MessageHeader.source.contact.use",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.source.contact.rank",
                "path": "MessageHeader.source.contact.rank",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.source.endpoint",
                "path": "MessageHeader.source.endpoint",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.reason",
                "path": "MessageHeader.reason",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.reason.coding",
                "path": "MessageHeader.reason.coding",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.reason.coding.system",
                "path": "MessageHeader.reason.coding.system",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.reason.coding.code",
                "path": "MessageHeader.reason.coding.code",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.reason.coding.display",
                "path": "MessageHeader.reason.coding.display",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.reason.text",
                "path": "MessageHeader.reason.text",
                "mustSupport": true
            },
            {
                "id": "MessageHeader.focus",
                "path": "MessageHeader.focus",
                "min": 1,
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile":  [
                            "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-ServiceRequest",
                            "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-Task",
                            "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-Patient",
                            "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-Appointment",
                            "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-Communication"
                        ],
                        "aggregation":  [
                            "referenced"
                        ]
                    }
                ],
                "mustSupport": true
            }
        ]
    }
}

Usage

A MessageHeader resource with a unique id and appropriate eventCoding, source.endpoint, destination.endpoint and focus SHALL be the first entry in each message Bundle.

The MessageHeader is used to convey the purpose of the message (i.e.: eventCoding), to direct the receiver toward the information acted upon (i.e.: focus) and to support message routing.

Notes

.id

  • used to uniquely identify a message
  • populate this element with a UUID each time a message is created
  • note: a FHIR message contains two identifiers that are unique within the message stream, rules:
    • a MessageHeader.id (this element) SHALL be assigned when the message is created
    • a Bundle.id SHALL be assigned each time the message is sent

.meta.profile

  • used to declare conformance to this profile
  • populate with the fixed value: http://ehealthontario.ca/fhir/StructureDefinition/input/profiles/ca-on-eReferral-profile-MessageHeader-v-11.json|1.0.0

.extension:RoutingOptions

  • used to communicate referral source type information to support referral processes with automated referral processing rules
  • for "add-servicerequest" messsages, this element SHALL be populated with the same value as ServiceRequest.extension:RoutingOptions if present
  • see requisition for more informaiton

.extension:ReferralIdentifier

  • used in cases where multiple connected referrals are made simultaneously (i.e. a requisition
  • in these cases:
    • multiple ServiceRequests SHALL be referenced in MessageHeader.focus
    • each of the ServiceRequests in MessageHeader.focus SHALL have the same identifier in ServiceRequest.requisition
    • the identifier used in ServiceRequest.requisition SHALL also be used to populate this element
  • Note that additional requisition apply to requisitions

.extension:ContentType

  • used to distinguish between messages used for clinical purposes, and messages used for analytics
  • MAY be populated with a code of Clinical or Analytical
  • Message Bundles not containing this extension SHALL be considered clinical

.eventCoding

  • used to convey the business event that triggered the message
  • SHALL be populated with a code from MessageEventCode and coding system

.destination.endpoint

  • used to enable message routing through an intermediary
  • SHALL be populated with either:
    • a literal URL that identifies the addresses to which the message should be delivered, or
    • a logical URI (i.e. non-dereferenceable) known to the intermediary.

.destination.receiver

  • used to reference the receiver (PractitionerRole) of the request referral or consult

.author

.source.endpoint

  • used to enable message routing of responses through an intermediary
  • SHALL be populated with either:
    • a literal URL that identifies the addresses to which the message should be delivered, or
    • a logical URI (i.e. non-dereferenceable) known to the intermediary.

.response

  • indicates that a message is a response to a request message (with status)
  • if used:
    • .response.identifier SHALL be populated with the MessageHeader.id of the message to which this message is a response
    • .response.code SHALL be populated with a valid ResponseType
    • .response.details MAY be provided in a referenced OperationOutcome included in the Bundle

.focus

  • identifies the information acted upon when the message was triggered
  • SHALL include a reference to a ServiceRequest, Task, Appointment, Communication that:
  • a MessageHeader SHALL include only a single instance of focus on messages used to transmit event information between and RMS Source and RMS Target (either direction)
  • a MessageHeader SHALL include multiple instances of focus when needed to transmit a full snapshot of referral information including Appointment information.