FHIR Release 3 (STU) Current Build
This page is part of FHIR STU 3 (v3.0.1) in it's permanent home (it will always be available at this URL). It has been superceded by R4 . For a full list of available versions, see the Directory of published versions .

2.48 Resource MessageDefinition - Content

Infrastructure And Messaging Work Group Maturity Level : 0 1   Draft Trial Use Security Category : Anonymous 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 CapabilityStatement , itself and MessageHeader .

This resource does not implement any patterns.

Structure

Name Flags Card. Type Description & Constraints doco
. . MessageDefinition I TU DomainResource A resource that defines a type of message that can be exchanged between systems
+ Warning: Name should be usable as an identifier for the module by machine processing applications such as code generation
Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension
. . . url Σ 0..1 uri Logical URI to reference this message definition (globally unique) Business Identifier for a given MessageDefinition
. . . identifier Σ 0..1 0..* Identifier Additional identifier Primary key for the message definition on a given server
. . . version Σ 0..1 string Business version of the message definition
. . . name Σ I 0..1 string Name for this message definition (computer friendly)
. . . title Σ 0..1 string Name for this message definition (human friendly)
. . . replaces Σ 0..* canonical ( MessageDefinition ) 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 this was 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 Context 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 Reference canonical ( MessageDefinition ) Definition this one is based on
. . . parent Σ 0..* Reference canonical ( ActivityDefinition | PlanDefinition ) Protocol/workflow this is part of
. . replaces . event[x] Σ 0..* 1..1 Reference ( MessageDefinition ) Takes Event code or link to the place of EventDefinition
MessageEvent ( Example )
. . . . event eventCoding Coding Σ
. . . . eventUri 1..1 Coding uri Event type MessageEvent ( Example )
. . . category Σ 0..1 code Consequence consequence | Currency currency | Notification notification
MessageSignificanceCategory ( Required )
. . . focus Σ I 0..* BackboneElement Resource(s) that are the subject of the event
+ Rule: Max must be postive int or *
. . . . code Σ 1..1 code Type of resource
ResourceType ( Required )
. . . . profile 0..1 Reference canonical ( StructureDefinition ) Profile that must be adhered to by focus
. . . . min Σ 0..1 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 boolean code Is a response required? always | on-error | never | on-success
messageheader-response-request ( Required )
. . . allowedResponse 0..* BackboneElement Responses to this message
. . . . message 1..1 Reference canonical ( MessageDefinition ) Reference to allowed message definition response
. . . . situation 0..1 markdown When should this response be used
. . . graph 0..* canonical ( GraphDefinition ) Canonical reference to a GraphDefinition

doco Documentation for this format

UML Diagram ( Legend )

MessageDefinition ( DomainResource ) An absolute URI The business identifier that is used to identify this message definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this message definition is (or will be) published. The URL SHOULD include the major version of reference the message definition. For more information see [Technical MessageDefinition and Business Versions](resource.html#versions) *is* expected to be consistent from server to server url : uri [0..1] A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance identifier : Identifier [0..1] [0..*] The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence version : string [0..1] A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation name : string [0..1] A short, descriptive, user-friendly title for the message definition title : string [0..1] A MessageDefinition that is superseded by this definition replaces : canonical [0..*] « MessageDefinition » The status of this message definition. Enables tracking the life-cycle of the content (this element modifies the meaning of other elements) status : code [1..1] « The lifecycle status of a Value Set or Concept Map. an artifact. (Strength=Required) PublicationStatus ! » A boolean Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing), education/evaluation/marketing) and is not intended to be used for genuine usage (this element modifies the meaning of other elements) experimental : boolean [0..1] The date (and optionally time) when the message definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes date : dateTime [1..1] The name of the individual or organization or individual that published the message definition publisher : string [0..1] Contact details to assist a user in finding and communicating with the publisher contact : ContactDetail [0..*] A free text natural language description of the message definition from a consumer's perspective description : markdown [0..1] The content was developed with a focus and intent of supporting the contexts that are listed. These terms contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate message definition instances useContext : UsageContext [0..*] A legal or geographic region in which the message definition is intended to be used jurisdiction : CodeableConcept [0..*] « Countries and regions within which this artifact is targeted for use use. (Strength=Extensible) Jurisdiction ValueSet + » Explaination Explanation of why this message definition is needed and why it has been designed as it has purpose : markdown [0..1] A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition copyright : markdown [0..1] The MessageDefinition that is the basis for the contents of this resource base : Reference canonical [0..1] « MessageDefinition » Identifies a protocol or workflow that this MessageDefinition represents a step in parent : Reference canonical [0..*] « ActivityDefinition | PlanDefinition » A MessageDefinition that is superseded by this definition Event code or link to the EventDefinition replaces event[x] : Reference [0..*] MessageDefinition A coded identifier of a supported messaging event event Type : [1..1] « Coding [1..1] | uri ; One of the message events defined as part of this version of FHIR. (Strength=Example) MessageEvent ?? » The impact of the content of the message category : code [0..1] « The impact of the content of a message. (Strength=Required) MessageSignificanceCategory ! » Indicates Declare at a message definition level whether a response is required for this message or only upon error or success, or never responseRequired : boolean code [0..1] « HL7-defined table of codes which identify conditions under which acknowledgments are required to be returned in response to a message. (Strength=Required) messageheader-response-request ! » Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [[[GraphDefinition]]] that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources graph : canonical [0..*] « GraphDefinition » Focus The kind of resource that must be the focus for this message code : code [1..1] « One of the resource types defined as part of this version of FHIR. (Strength=Required) ResourceType ! » A profile that reflects constraints for the focal resource (and potentially for related resources) profile : Reference canonical [0..1] « StructureDefinition » Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition min : unsignedInt [0..1] [1..1] Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition max : string [0..1] AllowedResponse A reference to the message definition that must be adhered to by this supported response message : Reference canonical [1..1] « MessageDefinition » Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses) situation : markdown [0..1] Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge focus [0..*] Indicates what types of messages may be sent as an application-level response to this message allowedResponse [0..*]

XML Template

<MessageDefinition xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <
 <</identifier>

 <url value="[uri]"/><!-- 0..1 Business Identifier for a given MessageDefinition -->
 <identifier><!-- 0..* Identifier Primary key for the message definition on a given server --></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>

 <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>
 <</parent>
 <</replaces>
 <</event>
 <

 <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>
  <

  <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 always | on-error | never | on-success -->

 <allowedResponse>  <!-- 0..* Responses to this message -->
  <</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>
 <graph><!-- 0..* canonical(GraphDefinition) Canonical reference to a GraphDefinition --></graph>

</MessageDefinition>

JSON Template

{doco
  "resourceType" : "MessageDefinition",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "
  "

  "url" : "<uri>", // Business Identifier for a given MessageDefinition
  "identifier" : [{ Identifier }], // Primary key for the message definition on a given server

  "version" : "<string>", // Business version of the message definition
  "

  "name" : "<string>", // C? Name for this message definition (computer friendly)

  "title" : "<string>", // Name for this message definition (human friendly)
  "replaces" : [{ canonical(MessageDefinition) }], // 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(MessageDefinition) }, // Definition this one is based on
  "parent" : [{ canonical(ActivityDefinition|PlanDefinition) }], // 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(StructureDefinition) }, // 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>", // always | on-error | never | on-success

  "allowedResponse" : [{ // Responses to this message
    "

    "message" : { canonical(MessageDefinition) }, // R!  Reference to allowed message definition response

    "situation" : "<markdown>" // When should this response be used
  }]

  }],
  "graph" : [{ canonical(GraphDefinition) }] // Canonical reference to a GraphDefinition

}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco
[ 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:
  fhir:

  fhir:MessageDefinition.url [ uri ]; # 0..1 Business Identifier for a given MessageDefinition
  fhir:MessageDefinition.identifier [ Identifier ], ... ; # 0..* Primary key for the message definition on a given server

  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:
  fhir:
  fhir:

  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:

  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:

  fhir:MessageDefinition.purpose [ markdown ]; # 0..1 Why this message definition is defined

  fhir:MessageDefinition.copyright [ markdown ]; # 0..1 Use and/or publishing restrictions
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  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:
    fhir:

    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:

  fhir:MessageDefinition.responseRequired [ code ]; # 0..1 always | on-error | never | on-success

  fhir:MessageDefinition.allowedResponse [ # 0..* Responses to this message
    fhir:

    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
  ], ...;
  fhir:MessageDefinition.graph [ canonical(GraphDefinition) ], ... ; # 0..* Canonical reference to a GraphDefinition

]

Changes since DSTU2 R3

MessageDefinition
MessageDefinition.status
  • Change value set from http://hl7.org/fhir/ValueSet/publication-status|4.0.0 to http://hl7.org/fhir/ValueSet/publication-status|4.1.0
MessageDefinition.category
  • Change value set from http://hl7.org/fhir/ValueSet/message-significance-category|4.0.0 to http://hl7.org/fhir/ValueSet/message-significance-category|4.1.0
MessageDefinition.focus.code
  • Change value set from http://hl7.org/fhir/ValueSet/resource-types|4.0.0 to http://hl7.org/fhir/ValueSet/resource-types|4.1.0
MessageDefinition.responseRequired
  • Change value set from http://hl7.org/fhir/ValueSet/messageheader-response-request|4.0.0 to http://hl7.org/fhir/ValueSet/messageheader-response-request|4.1.0

This resource did not exist in Release 2 See the Full Difference for further information

This analysis is available as XML or JSON .

See R3 <--> R4 Conversion Maps (status = 3 tests that all execute ok. All tests pass round-trip testing and 2 r3 resources are invalid (0 errors). )

Structure

Name Flags Card. Type Description & Constraints doco
. . MessageDefinition I TU DomainResource A resource that defines a type of message that can be exchanged between systems
+ Warning: Name should be usable as an identifier for the module by machine processing applications such as code generation
Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension
. . . url Σ 0..1 uri Logical URI to reference this message definition (globally unique) Business Identifier for a given MessageDefinition
. . . identifier Σ 0..1 0..* Identifier Additional identifier Primary key for the message definition on a given server
. . . version Σ 0..1 string Business version of the message definition
. . . name Σ I 0..1 string Name for this message definition (computer friendly)
. . . title Σ 0..1 string Name for this message definition (human friendly)
. . . replaces Σ 0..* canonical ( MessageDefinition ) 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 this was 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 Context 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 Reference canonical ( MessageDefinition ) Definition this one is based on
. . . parent Σ 0..* Reference canonical ( ActivityDefinition | PlanDefinition ) Protocol/workflow this is part of
. . replaces . event[x] Σ 0..* 1..1 Reference ( MessageDefinition ) Takes Event code or link to the place of EventDefinition
MessageEvent ( Example )
. . . . event eventCoding Coding Σ
. . . . eventUri 1..1 Coding uri Event type MessageEvent ( Example )
. . . category Σ 0..1 code Consequence consequence | Currency currency | Notification notification
MessageSignificanceCategory ( Required )
. . . focus Σ I 0..* BackboneElement Resource(s) that are the subject of the event
+ Rule: Max must be postive int or *
. . . . code Σ 1..1 code Type of resource
ResourceType ( Required )
. . . . profile 0..1 Reference canonical ( StructureDefinition ) Profile that must be adhered to by focus
. . . . min Σ 0..1 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 boolean code Is a response required? always | on-error | never | on-success
messageheader-response-request ( Required )
. . . allowedResponse 0..* BackboneElement Responses to this message
. . . . message 1..1 Reference canonical ( MessageDefinition ) Reference to allowed message definition response
. . . . situation 0..1 markdown When should this response be used
. . . graph 0..* canonical ( GraphDefinition ) Canonical reference to a GraphDefinition

doco Documentation for this format

UML Diagram ( Legend )

MessageDefinition ( DomainResource ) An absolute URI The business identifier that is used to identify this message definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this message definition is (or will be) published. The URL SHOULD include the major version of reference the message definition. For more information see [Technical MessageDefinition and Business Versions](resource.html#versions) *is* expected to be consistent from server to server url : uri [0..1] A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance identifier : Identifier [0..1] [0..*] The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence version : string [0..1] A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation name : string [0..1] A short, descriptive, user-friendly title for the message definition title : string [0..1] A MessageDefinition that is superseded by this definition replaces : canonical [0..*] « MessageDefinition » The status of this message definition. Enables tracking the life-cycle of the content (this element modifies the meaning of other elements) status : code [1..1] « The lifecycle status of a Value Set or Concept Map. an artifact. (Strength=Required) PublicationStatus ! » A boolean Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing), education/evaluation/marketing) and is not intended to be used for genuine usage (this element modifies the meaning of other elements) experimental : boolean [0..1] The date (and optionally time) when the message definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes date : dateTime [1..1] The name of the individual or organization or individual that published the message definition publisher : string [0..1] Contact details to assist a user in finding and communicating with the publisher contact : ContactDetail [0..*] A free text natural language description of the message definition from a consumer's perspective description : markdown [0..1] The content was developed with a focus and intent of supporting the contexts that are listed. These terms contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate message definition instances useContext : UsageContext [0..*] A legal or geographic region in which the message definition is intended to be used jurisdiction : CodeableConcept [0..*] « Countries and regions within which this artifact is targeted for use use. (Strength=Extensible) Jurisdiction ValueSet + » Explaination Explanation of why this message definition is needed and why it has been designed as it has purpose : markdown [0..1] A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition copyright : markdown [0..1] The MessageDefinition that is the basis for the contents of this resource base : Reference canonical [0..1] « MessageDefinition » Identifies a protocol or workflow that this MessageDefinition represents a step in parent : Reference canonical [0..*] « ActivityDefinition | PlanDefinition » A MessageDefinition that is superseded by this definition Event code or link to the EventDefinition replaces event[x] : Reference [0..*] MessageDefinition A coded identifier of a supported messaging event event Type : [1..1] « Coding [1..1] | uri ; One of the message events defined as part of this version of FHIR. (Strength=Example) MessageEvent ?? » The impact of the content of the message category : code [0..1] « The impact of the content of a message. (Strength=Required) MessageSignificanceCategory ! » Indicates Declare at a message definition level whether a response is required for this message or only upon error or success, or never responseRequired : boolean code [0..1] « HL7-defined table of codes which identify conditions under which acknowledgments are required to be returned in response to a message. (Strength=Required) messageheader-response-request ! » Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [[[GraphDefinition]]] that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources graph : canonical [0..*] « GraphDefinition » Focus The kind of resource that must be the focus for this message code : code [1..1] « One of the resource types defined as part of this version of FHIR. (Strength=Required) ResourceType ! » A profile that reflects constraints for the focal resource (and potentially for related resources) profile : Reference canonical [0..1] « StructureDefinition » Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition min : unsignedInt [0..1] [1..1] Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition max : string [0..1] AllowedResponse A reference to the message definition that must be adhered to by this supported response message : Reference canonical [1..1] « MessageDefinition » Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses) situation : markdown [0..1] Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge focus [0..*] Indicates what types of messages may be sent as an application-level response to this message allowedResponse [0..*]

XML Template

<MessageDefinition xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <
 <</identifier>

 <url value="[uri]"/><!-- 0..1 Business Identifier for a given MessageDefinition -->
 <identifier><!-- 0..* Identifier Primary key for the message definition on a given server --></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>

 <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>
 <</parent>
 <</replaces>
 <</event>
 <

 <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>
  <

  <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 always | on-error | never | on-success -->

 <allowedResponse>  <!-- 0..* Responses to this message -->
  <</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>
 <graph><!-- 0..* canonical(GraphDefinition) Canonical reference to a GraphDefinition --></graph>

</MessageDefinition>

JSON Template

{doco
  "resourceType" : "MessageDefinition",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "
  "

  "url" : "<uri>", // Business Identifier for a given MessageDefinition
  "identifier" : [{ Identifier }], // Primary key for the message definition on a given server

  "version" : "<string>", // Business version of the message definition
  "

  "name" : "<string>", // C? Name for this message definition (computer friendly)

  "title" : "<string>", // Name for this message definition (human friendly)
  "replaces" : [{ canonical(MessageDefinition) }], // 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(MessageDefinition) }, // Definition this one is based on
  "parent" : [{ canonical(ActivityDefinition|PlanDefinition) }], // 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(StructureDefinition) }, // 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>", // always | on-error | never | on-success

  "allowedResponse" : [{ // Responses to this message
    "

    "message" : { canonical(MessageDefinition) }, // R!  Reference to allowed message definition response

    "situation" : "<markdown>" // When should this response be used
  }]

  }],
  "graph" : [{ canonical(GraphDefinition) }] // Canonical reference to a GraphDefinition

}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco
[ 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:
  fhir:

  fhir:MessageDefinition.url [ uri ]; # 0..1 Business Identifier for a given MessageDefinition
  fhir:MessageDefinition.identifier [ Identifier ], ... ; # 0..* Primary key for the message definition on a given server

  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:
  fhir:
  fhir:

  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:

  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:

  fhir:MessageDefinition.purpose [ markdown ]; # 0..1 Why this message definition is defined

  fhir:MessageDefinition.copyright [ markdown ]; # 0..1 Use and/or publishing restrictions
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  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:
    fhir:

    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:

  fhir:MessageDefinition.responseRequired [ code ]; # 0..1 always | on-error | never | on-success

  fhir:MessageDefinition.allowedResponse [ # 0..* Responses to this message
    fhir:

    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
  ], ...;
  fhir:MessageDefinition.graph [ canonical(GraphDefinition) ], ... ; # 0..* Canonical reference to a GraphDefinition

]

Changes since DSTU2 Release 3

MessageDefinition
MessageDefinition.status
  • Change value set from http://hl7.org/fhir/ValueSet/publication-status|4.0.0 to http://hl7.org/fhir/ValueSet/publication-status|4.1.0
MessageDefinition.category
  • Change value set from http://hl7.org/fhir/ValueSet/message-significance-category|4.0.0 to http://hl7.org/fhir/ValueSet/message-significance-category|4.1.0
MessageDefinition.focus.code
  • Change value set from http://hl7.org/fhir/ValueSet/resource-types|4.0.0 to http://hl7.org/fhir/ValueSet/resource-types|4.1.0
MessageDefinition.responseRequired
  • Change value set from http://hl7.org/fhir/ValueSet/messageheader-response-request|4.0.0 to http://hl7.org/fhir/ValueSet/messageheader-response-request|4.1.0

This resource did not exist in Release 2 See the Full Difference for further information

This analysis is available as XML or JSON .

See R3 <--> R4 Conversion Maps (status = 3 tests that all execute ok. All tests pass round-trip testing and 2 r3 resources are invalid (0 errors). )

 

Alternate See the Profiles & Extensions and the alternate definitions: Master Definition ( XML , + JSON ), , XML Schema / Schematron (for ) + JSON Schema , ShEx (for Turtle ) + see the extensions , the spreadsheet version & the dependency analysis a

Path Definition Type Reference
MessageDefinition.status The lifecycle status of a Value Set or Concept Map. an artifact. Required PublicationStatus
MessageDefinition.jurisdiction Countries and regions within which this artifact is targeted for use use. Extensible Jurisdiction ValueSet
MessageDefinition.event 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 HL7-defined table of codes which identify conditions under which acknowledgments are required to be returned in response to a message. Required messageheader-response-request

id Level Location Description Expression
msd-0 Warning (base) Name should be usable as an identifier for the module by machine processing applications such as code generation name.matches('[A-Z]([A-Za-z0-9_]){0,254}')
md-1 : On MessageDefinition.focus: Rule MessageDefinition.focus Max must be postive int or * ( expression on MessageDefinition.focus: max='*' or (max.toInteger() > 0) )

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
context token A use context assigned to the message definition (MessageDefinition.useContext.value as CodeableConcept)
context-quantity quantity A quantity- or range-valued use context assigned to the message definition (MessageDefinition.useContext.value as Quantity) | (MessageDefinition.useContext.value as Range)
context-type token A type of use context assigned to the message definition MessageDefinition.useContext.code
context-type-quantity composite A use context type and quantity- or range-based value assigned to the message definition On MessageDefinition.useContext:
  context-type: code
  context-quantity: value.as(Quantity) | value.as(Range)
context-type-value composite A use context type and value assigned to the message definition On MessageDefinition.useContext:
  context-type: code
  context: value.as(CodeableConcept)
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
parent reference A resource that is the parent of the definition MessageDefinition.parent
( PlanDefinition , ActivityDefinition )
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