This page is part of the FHIR Specification (v3.3.0: R4 Ballot 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
Infrastructure And Messaging Work Group | Maturity Level: 1 | Draft | Compartments: Not linked to any defined compartments |
Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.
Implementers should be familiar with the messaging concepts and descriptions found in Messaging using FHIR Resources before working with this resource.
This resource is referenced by CapabilityStatement and MessageHeader
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
MessageDefinition | D | DomainResource | A resource that defines a type of message that can be exchanged between systems Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension | |
url | Σ | 0..1 | uri | Canonical identifier for this message definition, represented as a URI (globally unique) |
identifier | Σ | 0..1 | Identifier | Additional identifier for the message definition |
version | Σ | 0..1 | string | Business version of the message definition |
name | Σ | 0..1 | string | Name for this message definition (computer friendly) |
title | Σ | 0..1 | string | Name for this message definition (human friendly) |
replaces | Σ | 0..* | canonical | Takes the place of |
status | ?!Σ | 1..1 | code | draft | active | retired | unknown PublicationStatus (Required) |
experimental | ?!Σ | 0..1 | boolean | For testing purposes, not real usage |
date | Σ | 1..1 | dateTime | Date last changed |
publisher | Σ | 0..1 | string | Name of the publisher (organization or individual) |
contact | Σ | 0..* | ContactDetail | Contact details for the publisher |
description | Σ | 0..1 | markdown | Natural language description of the message definition |
useContext | Σ | 0..* | UsageContext | The context that the content is intended to support |
jurisdiction | Σ | 0..* | CodeableConcept | Intended jurisdiction for message definition (if applicable) Jurisdiction ValueSet (Extensible) |
purpose | Σ | 0..1 | markdown | Why this message definition is defined |
copyright | 0..1 | markdown | Use and/or publishing restrictions | |
base | Σ | 0..1 | canonical | Definition this one is based on |
parent | Σ | 0..* | canonical | Protocol/workflow this is part of |
event[x] | Σ | 1..1 | Event code or link to the EventDefinition MessageEvent (Example) | |
eventCoding | Coding | |||
eventUri | uri | |||
category | Σ | 0..1 | code | Consequence | Currency | Notification MessageSignificanceCategory (Required) |
focus | ΣI | 0..* | BackboneElement | Resource(s) that are the subject of the event + Max must be postive int or * |
code | Σ | 1..1 | code | Type of resource ResourceType (Required) |
profile | 0..1 | canonical | Profile that must be adhered to by focus | |
min | Σ | 1..1 | unsignedInt | Minimum number of focuses of this type |
max | I | 0..1 | string | Maximum number of focuses of this type |
responseRequired | 0..1 | code | Response circumstances messageheader-response-request (Required) | |
allowedResponse | 0..* | BackboneElement | Responses to this message | |
message | 1..1 | canonical | Reference to allowed message definition response | |
situation | 0..1 | markdown | When should this response be used | |
Documentation for this format |
UML Diagram (Legend)
XML Template
<MessageDefinition xmlns="http://hl7.org/fhir"> <!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <url value="[uri]"/><!-- 0..1 Canonical identifier for this message definition, represented as a URI (globally unique) --> <identifier><!-- 0..1 Identifier Additional identifier for the message definition --></identifier> <version value="[string]"/><!-- 0..1 Business version of the message definition --> <name value="[string]"/><!-- 0..1 Name for this message definition (computer friendly) --> <title value="[string]"/><!-- 0..1 Name for this message definition (human friendly) --> <replaces><!-- 0..* canonical(MessageDefinition) Takes the place of --></replaces> <status value="[code]"/><!-- 1..1 draft | active | retired | unknown --> <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage --> <date value="[dateTime]"/><!-- 1..1 Date last changed --> <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) --> <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact> <description value="[markdown]"/><!-- 0..1 Natural language description of the message definition --> <useContext><!-- 0..* UsageContext The context that the content is intended to support --></useContext> <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for message definition (if applicable) --></jurisdiction> <purpose value="[markdown]"/><!-- 0..1 Why this message definition is defined --> <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions --> <base><!-- 0..1 canonical(MessageDefinition) Definition this one is based on --></base> <parent><!-- 0..* canonical(ActivityDefinition|PlanDefinition) Protocol/workflow this is part of --></parent> <event[x]><!-- 1..1 Coding|uri Event code or link to the EventDefinition --></event[x]> <category value="[code]"/><!-- 0..1 Consequence | Currency | Notification --> <focus> <!-- 0..* Resource(s) that are the subject of the event --> <code value="[code]"/><!-- 1..1 Type of resource --> <profile><!-- 0..1 canonical(StructureDefinition) Profile that must be adhered to by focus --></profile> <min value="[unsignedInt]"/><!-- 1..1 Minimum number of focuses of this type --> <max value="[string]"/><!-- 0..1 Maximum number of focuses of this type --> </focus> <responseRequired value="[code]"/><!-- 0..1 Response circumstances --> <allowedResponse> <!-- 0..* Responses to this message --> <message><!-- 1..1 canonical(MessageDefinition) Reference to allowed message definition response --></message> <situation value="[markdown]"/><!-- 0..1 When should this response be used --> </allowedResponse> </MessageDefinition>
JSON Template
{ "resourceType" : "MessageDefinition", // from Resource: id, meta, implicitRules, and language // from DomainResource: text, contained, extension, and modifierExtension "url" : "<uri>", // Canonical identifier for this message definition, represented as a URI (globally unique) "identifier" : { Identifier }, // Additional identifier for the message definition "version" : "<string>", // Business version of the message definition "name" : "<string>", // Name for this message definition (computer friendly) "title" : "<string>", // Name for this message definition (human friendly) "replaces" : ["<canonical>"], // Takes the place of "status" : "<code>", // R! draft | active | retired | unknown "experimental" : <boolean>, // For testing purposes, not real usage "date" : "<dateTime>", // R! Date last changed "publisher" : "<string>", // Name of the publisher (organization or individual) "contact" : [{ ContactDetail }], // Contact details for the publisher "description" : "<markdown>", // Natural language description of the message definition "useContext" : [{ UsageContext }], // The context that the content is intended to support "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for message definition (if applicable) "purpose" : "<markdown>", // Why this message definition is defined "copyright" : "<markdown>", // Use and/or publishing restrictions "base" : "<canonical>", // Definition this one is based on "parent" : ["<canonical>"], // Protocol/workflow this is part of // event[x]: Event code or link to the EventDefinition. One of these 2: "eventCoding" : { Coding }, "eventUri" : "<uri>", "category" : "<code>", // Consequence | Currency | Notification "focus" : [{ // Resource(s) that are the subject of the event "code" : "<code>", // R! Type of resource "profile" : "<canonical>", // Profile that must be adhered to by focus "min" : "<unsignedInt>", // R! Minimum number of focuses of this type "max" : "<string>" // C? Maximum number of focuses of this type }], "responseRequired" : "<code>", // Response circumstances "allowedResponse" : [{ // Responses to this message "message" : "<canonical>", // R! Reference to allowed message definition response "situation" : "<markdown>" // When should this response be used }] }
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> . [ a fhir:MessageDefinition; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from Resource: .id, .meta, .implicitRules, and .language # from DomainResource: .text, .contained, .extension, and .modifierExtension fhir:MessageDefinition.url [ uri ]; # 0..1 Canonical identifier for this message definition, represented as a URI (globally unique) fhir:MessageDefinition.identifier [ Identifier ]; # 0..1 Additional identifier for the message definition fhir:MessageDefinition.version [ string ]; # 0..1 Business version of the message definition fhir:MessageDefinition.name [ string ]; # 0..1 Name for this message definition (computer friendly) fhir:MessageDefinition.title [ string ]; # 0..1 Name for this message definition (human friendly) fhir:MessageDefinition.replaces [ canonical(MessageDefinition) ], ... ; # 0..* Takes the place of fhir:MessageDefinition.status [ code ]; # 1..1 draft | active | retired | unknown fhir:MessageDefinition.experimental [ boolean ]; # 0..1 For testing purposes, not real usage fhir:MessageDefinition.date [ dateTime ]; # 1..1 Date last changed fhir:MessageDefinition.publisher [ string ]; # 0..1 Name of the publisher (organization or individual) fhir:MessageDefinition.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher fhir:MessageDefinition.description [ markdown ]; # 0..1 Natural language description of the message definition fhir:MessageDefinition.useContext [ UsageContext ], ... ; # 0..* The context that the content is intended to support fhir:MessageDefinition.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for message definition (if applicable) fhir:MessageDefinition.purpose [ markdown ]; # 0..1 Why this message definition is defined fhir:MessageDefinition.copyright [ markdown ]; # 0..1 Use and/or publishing restrictions fhir:MessageDefinition.base [ canonical(MessageDefinition) ]; # 0..1 Definition this one is based on fhir:MessageDefinition.parent [ canonical(ActivityDefinition|PlanDefinition) ], ... ; # 0..* Protocol/workflow this is part of # MessageDefinition.event[x] : 1..1 Event code or link to the EventDefinition. One of these 2 fhir:MessageDefinition.eventCoding [ Coding ] fhir:MessageDefinition.eventUri [ uri ] fhir:MessageDefinition.category [ code ]; # 0..1 Consequence | Currency | Notification fhir:MessageDefinition.focus [ # 0..* Resource(s) that are the subject of the event fhir:MessageDefinition.focus.code [ code ]; # 1..1 Type of resource fhir:MessageDefinition.focus.profile [ canonical(StructureDefinition) ]; # 0..1 Profile that must be adhered to by focus fhir:MessageDefinition.focus.min [ unsignedInt ]; # 1..1 Minimum number of focuses of this type fhir:MessageDefinition.focus.max [ string ]; # 0..1 Maximum number of focuses of this type ], ...; fhir:MessageDefinition.responseRequired [ code ]; # 0..1 Response circumstances fhir:MessageDefinition.allowedResponse [ # 0..* Responses to this message fhir:MessageDefinition.allowedResponse.message [ canonical(MessageDefinition) ]; # 1..1 Reference to allowed message definition response fhir:MessageDefinition.allowedResponse.situation [ markdown ]; # 0..1 When should this response be used ], ...; ]
Changes since R3
MessageDefinition | |
MessageDefinition.replaces |
|
MessageDefinition.base |
|
MessageDefinition.parent |
|
MessageDefinition.event[x] |
|
MessageDefinition.focus.profile |
|
MessageDefinition.focus.min |
|
MessageDefinition.responseRequired |
|
MessageDefinition.allowedResponse.message |
|
See the Full Difference for further information
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
MessageDefinition | D | DomainResource | A resource that defines a type of message that can be exchanged between systems Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension | |
url | Σ | 0..1 | uri | Canonical identifier for this message definition, represented as a URI (globally unique) |
identifier | Σ | 0..1 | Identifier | Additional identifier for the message definition |
version | Σ | 0..1 | string | Business version of the message definition |
name | Σ | 0..1 | string | Name for this message definition (computer friendly) |
title | Σ | 0..1 | string | Name for this message definition (human friendly) |
replaces | Σ | 0..* | canonical | Takes the place of |
status | ?!Σ | 1..1 | code | draft | active | retired | unknown PublicationStatus (Required) |
experimental | ?!Σ | 0..1 | boolean | For testing purposes, not real usage |
date | Σ | 1..1 | dateTime | Date last changed |
publisher | Σ | 0..1 | string | Name of the publisher (organization or individual) |
contact | Σ | 0..* | ContactDetail | Contact details for the publisher |
description | Σ | 0..1 | markdown | Natural language description of the message definition |
useContext | Σ | 0..* | UsageContext | The context that the content is intended to support |
jurisdiction | Σ | 0..* | CodeableConcept | Intended jurisdiction for message definition (if applicable) Jurisdiction ValueSet (Extensible) |
purpose | Σ | 0..1 | markdown | Why this message definition is defined |
copyright | 0..1 | markdown | Use and/or publishing restrictions | |
base | Σ | 0..1 | canonical | Definition this one is based on |
parent | Σ | 0..* | canonical | Protocol/workflow this is part of |
event[x] | Σ | 1..1 | Event code or link to the EventDefinition MessageEvent (Example) | |
eventCoding | Coding | |||
eventUri | uri | |||
category | Σ | 0..1 | code | Consequence | Currency | Notification MessageSignificanceCategory (Required) |
focus | ΣI | 0..* | BackboneElement | Resource(s) that are the subject of the event + Max must be postive int or * |
code | Σ | 1..1 | code | Type of resource ResourceType (Required) |
profile | 0..1 | canonical | Profile that must be adhered to by focus | |
min | Σ | 1..1 | unsignedInt | Minimum number of focuses of this type |
max | I | 0..1 | string | Maximum number of focuses of this type |
responseRequired | 0..1 | code | Response circumstances messageheader-response-request (Required) | |
allowedResponse | 0..* | BackboneElement | Responses to this message | |
message | 1..1 | canonical | Reference to allowed message definition response | |
situation | 0..1 | markdown | When should this response be used | |
Documentation for this format |
XML Template
<MessageDefinition xmlns="http://hl7.org/fhir"> <!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <url value="[uri]"/><!-- 0..1 Canonical identifier for this message definition, represented as a URI (globally unique) --> <identifier><!-- 0..1 Identifier Additional identifier for the message definition --></identifier> <version value="[string]"/><!-- 0..1 Business version of the message definition --> <name value="[string]"/><!-- 0..1 Name for this message definition (computer friendly) --> <title value="[string]"/><!-- 0..1 Name for this message definition (human friendly) --> <replaces><!-- 0..* canonical(MessageDefinition) Takes the place of --></replaces> <status value="[code]"/><!-- 1..1 draft | active | retired | unknown --> <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage --> <date value="[dateTime]"/><!-- 1..1 Date last changed --> <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) --> <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact> <description value="[markdown]"/><!-- 0..1 Natural language description of the message definition --> <useContext><!-- 0..* UsageContext The context that the content is intended to support --></useContext> <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for message definition (if applicable) --></jurisdiction> <purpose value="[markdown]"/><!-- 0..1 Why this message definition is defined --> <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions --> <base><!-- 0..1 canonical(MessageDefinition) Definition this one is based on --></base> <parent><!-- 0..* canonical(ActivityDefinition|PlanDefinition) Protocol/workflow this is part of --></parent> <event[x]><!-- 1..1 Coding|uri Event code or link to the EventDefinition --></event[x]> <category value="[code]"/><!-- 0..1 Consequence | Currency | Notification --> <focus> <!-- 0..* Resource(s) that are the subject of the event --> <code value="[code]"/><!-- 1..1 Type of resource --> <profile><!-- 0..1 canonical(StructureDefinition) Profile that must be adhered to by focus --></profile> <min value="[unsignedInt]"/><!-- 1..1 Minimum number of focuses of this type --> <max value="[string]"/><!-- 0..1 Maximum number of focuses of this type --> </focus> <responseRequired value="[code]"/><!-- 0..1 Response circumstances --> <allowedResponse> <!-- 0..* Responses to this message --> <message><!-- 1..1 canonical(MessageDefinition) Reference to allowed message definition response --></message> <situation value="[markdown]"/><!-- 0..1 When should this response be used --> </allowedResponse> </MessageDefinition>
JSON Template
{ "resourceType" : "MessageDefinition", // from Resource: id, meta, implicitRules, and language // from DomainResource: text, contained, extension, and modifierExtension "url" : "<uri>", // Canonical identifier for this message definition, represented as a URI (globally unique) "identifier" : { Identifier }, // Additional identifier for the message definition "version" : "<string>", // Business version of the message definition "name" : "<string>", // Name for this message definition (computer friendly) "title" : "<string>", // Name for this message definition (human friendly) "replaces" : ["<canonical>"], // Takes the place of "status" : "<code>", // R! draft | active | retired | unknown "experimental" : <boolean>, // For testing purposes, not real usage "date" : "<dateTime>", // R! Date last changed "publisher" : "<string>", // Name of the publisher (organization or individual) "contact" : [{ ContactDetail }], // Contact details for the publisher "description" : "<markdown>", // Natural language description of the message definition "useContext" : [{ UsageContext }], // The context that the content is intended to support "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for message definition (if applicable) "purpose" : "<markdown>", // Why this message definition is defined "copyright" : "<markdown>", // Use and/or publishing restrictions "base" : "<canonical>", // Definition this one is based on "parent" : ["<canonical>"], // Protocol/workflow this is part of // event[x]: Event code or link to the EventDefinition. One of these 2: "eventCoding" : { Coding }, "eventUri" : "<uri>", "category" : "<code>", // Consequence | Currency | Notification "focus" : [{ // Resource(s) that are the subject of the event "code" : "<code>", // R! Type of resource "profile" : "<canonical>", // Profile that must be adhered to by focus "min" : "<unsignedInt>", // R! Minimum number of focuses of this type "max" : "<string>" // C? Maximum number of focuses of this type }], "responseRequired" : "<code>", // Response circumstances "allowedResponse" : [{ // Responses to this message "message" : "<canonical>", // R! Reference to allowed message definition response "situation" : "<markdown>" // When should this response be used }] }
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> . [ a fhir:MessageDefinition; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from Resource: .id, .meta, .implicitRules, and .language # from DomainResource: .text, .contained, .extension, and .modifierExtension fhir:MessageDefinition.url [ uri ]; # 0..1 Canonical identifier for this message definition, represented as a URI (globally unique) fhir:MessageDefinition.identifier [ Identifier ]; # 0..1 Additional identifier for the message definition fhir:MessageDefinition.version [ string ]; # 0..1 Business version of the message definition fhir:MessageDefinition.name [ string ]; # 0..1 Name for this message definition (computer friendly) fhir:MessageDefinition.title [ string ]; # 0..1 Name for this message definition (human friendly) fhir:MessageDefinition.replaces [ canonical(MessageDefinition) ], ... ; # 0..* Takes the place of fhir:MessageDefinition.status [ code ]; # 1..1 draft | active | retired | unknown fhir:MessageDefinition.experimental [ boolean ]; # 0..1 For testing purposes, not real usage fhir:MessageDefinition.date [ dateTime ]; # 1..1 Date last changed fhir:MessageDefinition.publisher [ string ]; # 0..1 Name of the publisher (organization or individual) fhir:MessageDefinition.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher fhir:MessageDefinition.description [ markdown ]; # 0..1 Natural language description of the message definition fhir:MessageDefinition.useContext [ UsageContext ], ... ; # 0..* The context that the content is intended to support fhir:MessageDefinition.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for message definition (if applicable) fhir:MessageDefinition.purpose [ markdown ]; # 0..1 Why this message definition is defined fhir:MessageDefinition.copyright [ markdown ]; # 0..1 Use and/or publishing restrictions fhir:MessageDefinition.base [ canonical(MessageDefinition) ]; # 0..1 Definition this one is based on fhir:MessageDefinition.parent [ canonical(ActivityDefinition|PlanDefinition) ], ... ; # 0..* Protocol/workflow this is part of # MessageDefinition.event[x] : 1..1 Event code or link to the EventDefinition. One of these 2 fhir:MessageDefinition.eventCoding [ Coding ] fhir:MessageDefinition.eventUri [ uri ] fhir:MessageDefinition.category [ code ]; # 0..1 Consequence | Currency | Notification fhir:MessageDefinition.focus [ # 0..* Resource(s) that are the subject of the event fhir:MessageDefinition.focus.code [ code ]; # 1..1 Type of resource fhir:MessageDefinition.focus.profile [ canonical(StructureDefinition) ]; # 0..1 Profile that must be adhered to by focus fhir:MessageDefinition.focus.min [ unsignedInt ]; # 1..1 Minimum number of focuses of this type fhir:MessageDefinition.focus.max [ string ]; # 0..1 Maximum number of focuses of this type ], ...; fhir:MessageDefinition.responseRequired [ code ]; # 0..1 Response circumstances fhir:MessageDefinition.allowedResponse [ # 0..* Responses to this message fhir:MessageDefinition.allowedResponse.message [ canonical(MessageDefinition) ]; # 1..1 Reference to allowed message definition response fhir:MessageDefinition.allowedResponse.situation [ markdown ]; # 0..1 When should this response be used ], ...; ]
Changes since DSTU2
MessageDefinition | |
MessageDefinition.replaces |
|
MessageDefinition.base |
|
MessageDefinition.parent |
|
MessageDefinition.event[x] |
|
MessageDefinition.focus.profile |
|
MessageDefinition.focus.min |
|
MessageDefinition.responseRequired |
|
MessageDefinition.allowedResponse.message |
|
See the Full Difference for further information
Alternate definitions: Master Definition XML + JSON, XML Schema/Schematron + JSON Schema, ShEx (for Turtle) + see the extensions & the dependency analysis
Path | Definition | Type | Reference |
---|---|---|---|
MessageDefinition.status | The lifecycle status of an artifact. | Required | PublicationStatus |
MessageDefinition.jurisdiction | Countries and regions within which this artifact is targeted for use | Extensible | Jurisdiction ValueSet |
MessageDefinition.event[x] | One of the message events defined as part of this version of FHIR. | Example | Message Events |
MessageDefinition.category | The impact of the content of a message. | Required | MessageSignificanceCategory |
MessageDefinition.focus.code | One of the resource types defined as part of this version of FHIR. | Required | Resource Types |
MessageDefinition.responseRequired | Response definition | Required | messageheader-response-request |
Search parameters for 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 |
category | token | The behavior associated with the message | MessageDefinition.category | |
date | date | The message definition publication date | MessageDefinition.date | |
description | string | The description of the message definition | MessageDefinition.description | |
event | token | The event that triggers the message or link to the event definition. | MessageDefinition.event | |
focus | token | A resource that is a permitted focus of the message | MessageDefinition.focus.code | |
identifier | token | External identifier for the message definition | MessageDefinition.identifier | |
jurisdiction | token | Intended jurisdiction for the message definition | MessageDefinition.jurisdiction | |
name | string | Computationally friendly name of the message definition | MessageDefinition.name | |
publisher | string | Name of the publisher of the message definition | MessageDefinition.publisher | |
status | token | The current status of the message definition | MessageDefinition.status | |
title | string | The human-friendly name of the message definition | MessageDefinition.title | |
url | uri | The uri that identifies the message definition | MessageDefinition.url | |
version | token | The business version of the message definition | MessageDefinition.version |