FHIR CI-Build

This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions icon

2.16 Resource MessageDefinition - Content

Infrastructure And Messaging icon Work GroupMaturity Level: 1 Trial UseSecurity Category: Anonymous Compartments: No 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.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. MessageDefinition 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
Interfaces Implemented: CanonicalResource
... url ΣC 0..1 uri The cannonical URL for a given MessageDefinition
+ Warning: URL should not contain | or # - these characters make processing canonical references problematic
... identifier Σ 0..* Identifier Business Identifier for a given MessageDefinition

... version Σ 0..1 string Business version of the message definition
.... versionAlgorithmString string
.... versionAlgorithmCoding Coding
... name ΣC 0..1 string Name for this message definition (computer friendly)
... title ΣT 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
Binding: PublicationStatus (Required)
... experimental Σ 0..1 boolean For testing purposes, not real usage
... date Σ 1..1 dateTime Date last changed
... publisher ΣT 0..1 string Name of the publisher/steward (organization or individual)
... contact Σ 0..* ContactDetail Contact details for the publisher

... description ΣT 0..1 markdown Natural language description of the message definition
... useContext Σ 0..* UsageContext The context that the content is intended to support

... jurisdiction ΣXD 0..* CodeableConcept Intended jurisdiction for message definition (if applicable)
Binding: Jurisdiction ValueSet (Extensible)

... purpose ΣT 0..1 markdown Why this message definition is defined
... copyright T 0..1 markdown Use and/or publishing restrictions
... copyrightLabel T 0..1 string Copyright holder and year(s)
... base Σ 0..1 canonical(MessageDefinition) Definition this one is based on
... parent Σ 0..* canonical(ActivityDefinition | PlanDefinition) Protocol/workflow this is part of

... event[x] Σ 1..1 Event code or link to the EventDefinition
Binding: MessageEvent (Example)
.... eventCoding Coding
.... eventUri uri
... category Σ 0..1 code consequence | currency | notification
Binding: Message Significance Category (Required)
... focus ΣC 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
Binding: Resource Types (Required)
.... profile 0..1 canonical(StructureDefinition) Profile that must be adhered to by focus
.... min Σ 1..1 unsignedInt Minimum number of focuses of this type
.... max C 0..1 string Maximum number of focuses of this type
... responseRequired 0..1 code always | on-error | never | on-success
Binding: messageheader-response-request (Required)
... allowedResponse 0..* BackboneElement Responses to this message

.... message 1..1 canonical(MessageDefinition) Reference to allowed message definition response
.... situation 0..1 markdown When should this response be used
... graph 0..1 canonical(GraphDefinition) Canonical reference to a GraphDefinition

doco Documentation for this format icon

See the Extensions for this resource

UML Diagram (Legend)

MessageDefinition (DomainResource) +CanonicalResourceThe business identifier that is used to reference the MessageDefinition and *is* expected to be consistent from server to serverurl : 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 instanceidentifier : Identifier [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 sequenceversion : string [0..1]Indicates the mechanism used to compare versions to determine which is more currentversionAlgorithm[x] : DataType [0..1] « string|Coding; null (Strength=Extensible) VersionAlgorithm+ »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 generationname : string [0..1] « This element has or is affected by some invariantsC »A short, descriptive, user-friendly title for the message definitiontitle : string [0..1]A MessageDefinition that is superseded by this definitionreplaces : 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] « null (Strength=Required)PublicationStatus! »A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usageexperimental : boolean [0..1]The date (and optionally time) when the message definition was last significantly changed. The date must change 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 changesdate : dateTime [1..1]The name of the organization or individual responsible for the release and ongoing maintenance of the message definitionpublisher : string [0..1]Contact details to assist a user in finding and communicating with the publishercontact : ContactDetail [0..*]A free text natural language description of the message definition from a consumer's perspectivedescription : markdown [0..1]The content was developed with a focus and intent of supporting the contexts that are listed. These 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 instancesuseContext : UsageContext [0..*]A legal or geographic region in which the message definition is intended to be usedjurisdiction : CodeableConcept [0..*] « null (Strength=Extensible)JurisdictionValueSet+ »Explanation of why this message definition is needed and why it has been designed as it haspurpose : 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 definitioncopyright : markdown [0..1]A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')copyrightLabel : string [0..1]The MessageDefinition that is the basis for the contents of this resourcebase : canonical [0..1] « MessageDefinition »Identifies a protocol or workflow that this MessageDefinition represents a step inparent : canonical [0..*] « ActivityDefinition|PlanDefinition »Event code or link to the EventDefinitionevent[x] : DataType [1..1] « Coding|uri; null (Strength=Example)MessageEvent?? »The impact of the content of the messagecategory : code [0..1] « null (Strength=Required)MessageSignificanceCategory! »Declare at a message definition level whether a response is required or only upon error or success, or neverresponseRequired : 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)MessageheaderResponseRequest! »Graph is Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a GraphDefinition that it controls what additional resources are to be added to the Bundle when building the message. The GraphDefinition can also specify profiles that apply to the various resourcesgraph : canonical [0..1] « GraphDefinition »FocusThe kind of resource that must be the focus for this messagecode : code [1..1] « null (Strength=Required)ResourceType! »A profile that reflects constraints for the focal resource (and potentially for related resources)profile : 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 MessageDefinitionmin : unsignedInt [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 MessageDefinitionmax : string [0..1] « This element has or is affected by some invariantsC »AllowedResponseA reference to the message definition that must be adhered to by this supported responsemessage : 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 mergefocus[0..*]Indicates what types of messages may be sent as an application-level response to this messageallowedResponse[0..*]

XML Template

<MessageDefinition xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 0..1 The cannonical URL for a given MessageDefinition -->
 <identifier><!-- 0..* Identifier Business Identifier for a given MessageDefinition --></identifier>
 <version value="[string]"/><!-- 0..1 Business version of the message definition -->
 <versionAlgorithm[x]><!-- 0..1 string|Coding How to compare versions --></versionAlgorithm[x]>
 <name value="[string]"/><!-- I 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/steward (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 -->
 <copyrightLabel value="[string]"/><!-- 0..1 Copyright holder and year(s) -->
 <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]"/><!-- I 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><!-- 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..1 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>", // The cannonical URL for a given MessageDefinition
  "identifier" : [{ Identifier }], // Business Identifier for a given MessageDefinition
  "version" : "<string>", // Business version of the message definition
  // versionAlgorithm[x]: How to compare versions. One of these 2:
  "versionAlgorithmString" : "<string>",
  "versionAlgorithmCoding" : { Coding },
  "name" : "<string>", // I 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/steward (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
  "copyrightLabel" : "<string>", // Copyright holder and year(s)
  "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>" // I 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:url [ uri ] ; # 0..1 The cannonical URL for a given MessageDefinition
  fhir:identifier  ( [ Identifier ] ... ) ; # 0..* Business Identifier for a given MessageDefinition
  fhir:version [ string ] ; # 0..1 Business version of the message definition
  # versionAlgorithm[x] : 0..1 How to compare versions. One of these 2
    fhir:versionAlgorithm [  a fhir:string ; string ]
    fhir:versionAlgorithm [  a fhir:Coding ; Coding ]
  fhir:name [ string ] ; # 0..1 I Name for this message definition (computer friendly)
  fhir:title [ string ] ; # 0..1 Name for this message definition (human friendly)
  fhir:replaces  ( [ canonical(MessageDefinition) ] ... ) ; # 0..* Takes the place of
  fhir:status [ code ] ; # 1..1 draft | active | retired | unknown
  fhir:experimental [ boolean ] ; # 0..1 For testing purposes, not real usage
  fhir:date [ dateTime ] ; # 1..1 Date last changed
  fhir:publisher [ string ] ; # 0..1 Name of the publisher/steward (organization or individual)
  fhir:contact  ( [ ContactDetail ] ... ) ; # 0..* Contact details for the publisher
  fhir:description [ markdown ] ; # 0..1 Natural language description of the message definition
  fhir:useContext  ( [ UsageContext ] ... ) ; # 0..* The context that the content is intended to support
  fhir:jurisdiction  ( [ CodeableConcept ] ... ) ; # 0..* Intended jurisdiction for message definition (if applicable)
  fhir:purpose [ markdown ] ; # 0..1 Why this message definition is defined
  fhir:copyright [ markdown ] ; # 0..1 Use and/or publishing restrictions
  fhir:copyrightLabel [ string ] ; # 0..1 Copyright holder and year(s)
  fhir:base [ canonical(MessageDefinition) ] ; # 0..1 Definition this one is based on
  fhir:parent  ( [ canonical(ActivityDefinition|PlanDefinition) ] ... ) ; # 0..* Protocol/workflow this is part of
  # event[x] : 1..1 Event code  or link to the EventDefinition. One of these 2
    fhir:event [  a fhir:Coding ; Coding ]
    fhir:event [  a fhir:uri ; uri ]
  fhir:category [ code ] ; # 0..1 consequence | currency | notification
  fhir:focus ( [ # 0..* Resource(s) that are the subject of the event
    fhir:code [ code ] ; # 1..1 Type of resource
    fhir:profile [ canonical(StructureDefinition) ] ; # 0..1 Profile that must be adhered to by focus
    fhir:min [ unsignedInt ] ; # 1..1 Minimum number of focuses of this type
    fhir:max [ string ] ; # 0..1 I Maximum number of focuses of this type
  ] ... ) ;
  fhir:responseRequired [ code ] ; # 0..1 always | on-error | never | on-success
  fhir:allowedResponse ( [ # 0..* Responses to this message
    fhir:message [ canonical(MessageDefinition) ] ; # 1..1 Reference to allowed message definition response
    fhir:situation [ markdown ] ; # 0..1 When should this response be used
  ] ... ) ;
  fhir:graph [ canonical(GraphDefinition) ] ; # 0..1 Canonical reference to a GraphDefinition
]

Changes from both R4 and R4B

MessageDefinition
MessageDefinition.versionAlgorithm[x]
  • Added Element
MessageDefinition.copyrightLabel
  • Added Element
MessageDefinition.focus.code
  • Remove codes CatalogEntry, DeviceUseStatement, DocumentManifest, DomainResource, EffectEvidenceSynthesis, Media, MedicinalProduct, MedicinalProductAuthorization, MedicinalProductContraindication, MedicinalProductIndication, MedicinalProductIngredient, MedicinalProductInteraction, MedicinalProductManufactured, MedicinalProductPackaged, MedicinalProductPharmaceutical, MedicinalProductUndesirableEffect, RequestGroup, ResearchDefinition, ResearchElementDefinition, Resource, RiskEvidenceSynthesis, SubstanceSpecification
  • Add codes ActorDefinition, AdministrableProductDefinition, ArtifactAssessment, BiologicallyDerivedProductDispense, Citation, ClinicalUseDefinition, ConditionDefinition, DeviceAlert, DeviceAssociation, DeviceDispense, DeviceUsage, EncounterHistory, EvidenceReport, FormularyItem, GenomicStudy, ImagingSelection, Ingredient, InsuranceProduct, InventoryItem, InventoryReport, ManufacturedItemDefinition, MedicinalProductDefinition, MolecularDefinition, NutritionIntake, NutritionProduct, PackagedProductDefinition, Permission, PersonalRelationship, RegulatedAuthorization, RequestOrchestration, Requirements, SubscriptionStatus, SubscriptionTopic, SubstanceDefinition, TestPlan, Transport
MessageDefinition.graph
  • Max Cardinality changed from * to 1

See the Full Difference for further information

This analysis is available for R4 as XML or JSON and for R4B as XML or JSON.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. MessageDefinition 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
Interfaces Implemented: CanonicalResource
... url ΣC 0..1 uri The cannonical URL for a given MessageDefinition
+ Warning: URL should not contain | or # - these characters make processing canonical references problematic
... identifier Σ 0..* Identifier Business Identifier for a given MessageDefinition

... version Σ 0..1 string Business version of the message definition
.... versionAlgorithmString string
.... versionAlgorithmCoding Coding
... name ΣC 0..1 string Name for this message definition (computer friendly)
... title ΣT 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
Binding: PublicationStatus (Required)
... experimental Σ 0..1 boolean For testing purposes, not real usage
... date Σ 1..1 dateTime Date last changed
... publisher ΣT 0..1 string Name of the publisher/steward (organization or individual)
... contact Σ 0..* ContactDetail Contact details for the publisher

... description ΣT 0..1 markdown Natural language description of the message definition
... useContext Σ 0..* UsageContext The context that the content is intended to support

... jurisdiction ΣXD 0..* CodeableConcept Intended jurisdiction for message definition (if applicable)
Binding: Jurisdiction ValueSet (Extensible)

... purpose ΣT 0..1 markdown Why this message definition is defined
... copyright T 0..1 markdown Use and/or publishing restrictions
... copyrightLabel T 0..1 string Copyright holder and year(s)
... base Σ 0..1 canonical(MessageDefinition) Definition this one is based on
... parent Σ 0..* canonical(ActivityDefinition | PlanDefinition) Protocol/workflow this is part of

... event[x] Σ 1..1 Event code or link to the EventDefinition
Binding: MessageEvent (Example)
.... eventCoding Coding
.... eventUri uri
... category Σ 0..1 code consequence | currency | notification
Binding: Message Significance Category (Required)
... focus ΣC 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
Binding: Resource Types (Required)
.... profile 0..1 canonical(StructureDefinition) Profile that must be adhered to by focus
.... min Σ 1..1 unsignedInt Minimum number of focuses of this type
.... max C 0..1 string Maximum number of focuses of this type
... responseRequired 0..1 code always | on-error | never | on-success
Binding: messageheader-response-request (Required)
... allowedResponse 0..* BackboneElement Responses to this message

.... message 1..1 canonical(MessageDefinition) Reference to allowed message definition response
.... situation 0..1 markdown When should this response be used
... graph 0..1 canonical(GraphDefinition) Canonical reference to a GraphDefinition

doco Documentation for this format icon

See the Extensions for this resource

UML Diagram (Legend)

MessageDefinition (DomainResource) +CanonicalResourceThe business identifier that is used to reference the MessageDefinition and *is* expected to be consistent from server to serverurl : 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 instanceidentifier : Identifier [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 sequenceversion : string [0..1]Indicates the mechanism used to compare versions to determine which is more currentversionAlgorithm[x] : DataType [0..1] « string|Coding; null (Strength=Extensible) VersionAlgorithm+ »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 generationname : string [0..1] « This element has or is affected by some invariantsC »A short, descriptive, user-friendly title for the message definitiontitle : string [0..1]A MessageDefinition that is superseded by this definitionreplaces : 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] « null (Strength=Required)PublicationStatus! »A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usageexperimental : boolean [0..1]The date (and optionally time) when the message definition was last significantly changed. The date must change 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 changesdate : dateTime [1..1]The name of the organization or individual responsible for the release and ongoing maintenance of the message definitionpublisher : string [0..1]Contact details to assist a user in finding and communicating with the publishercontact : ContactDetail [0..*]A free text natural language description of the message definition from a consumer's perspectivedescription : markdown [0..1]The content was developed with a focus and intent of supporting the contexts that are listed. These 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 instancesuseContext : UsageContext [0..*]A legal or geographic region in which the message definition is intended to be usedjurisdiction : CodeableConcept [0..*] « null (Strength=Extensible)JurisdictionValueSet+ »Explanation of why this message definition is needed and why it has been designed as it haspurpose : 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 definitioncopyright : markdown [0..1]A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')copyrightLabel : string [0..1]The MessageDefinition that is the basis for the contents of this resourcebase : canonical [0..1] « MessageDefinition »Identifies a protocol or workflow that this MessageDefinition represents a step inparent : canonical [0..*] « ActivityDefinition|PlanDefinition »Event code or link to the EventDefinitionevent[x] : DataType [1..1] « Coding|uri; null (Strength=Example)MessageEvent?? »The impact of the content of the messagecategory : code [0..1] « null (Strength=Required)MessageSignificanceCategory! »Declare at a message definition level whether a response is required or only upon error or success, or neverresponseRequired : 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)MessageheaderResponseRequest! »Graph is Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a GraphDefinition that it controls what additional resources are to be added to the Bundle when building the message. The GraphDefinition can also specify profiles that apply to the various resourcesgraph : canonical [0..1] « GraphDefinition »FocusThe kind of resource that must be the focus for this messagecode : code [1..1] « null (Strength=Required)ResourceType! »A profile that reflects constraints for the focal resource (and potentially for related resources)profile : 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 MessageDefinitionmin : unsignedInt [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 MessageDefinitionmax : string [0..1] « This element has or is affected by some invariantsC »AllowedResponseA reference to the message definition that must be adhered to by this supported responsemessage : 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 mergefocus[0..*]Indicates what types of messages may be sent as an application-level response to this messageallowedResponse[0..*]

XML Template

<MessageDefinition xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 0..1 The cannonical URL for a given MessageDefinition -->
 <identifier><!-- 0..* Identifier Business Identifier for a given MessageDefinition --></identifier>
 <version value="[string]"/><!-- 0..1 Business version of the message definition -->
 <versionAlgorithm[x]><!-- 0..1 string|Coding How to compare versions --></versionAlgorithm[x]>
 <name value="[string]"/><!-- I 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/steward (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 -->
 <copyrightLabel value="[string]"/><!-- 0..1 Copyright holder and year(s) -->
 <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]"/><!-- I 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><!-- 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..1 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>", // The cannonical URL for a given MessageDefinition
  "identifier" : [{ Identifier }], // Business Identifier for a given MessageDefinition
  "version" : "<string>", // Business version of the message definition
  // versionAlgorithm[x]: How to compare versions. One of these 2:
  "versionAlgorithmString" : "<string>",
  "versionAlgorithmCoding" : { Coding },
  "name" : "<string>", // I 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/steward (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
  "copyrightLabel" : "<string>", // Copyright holder and year(s)
  "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>" // I 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:url [ uri ] ; # 0..1 The cannonical URL for a given MessageDefinition
  fhir:identifier  ( [ Identifier ] ... ) ; # 0..* Business Identifier for a given MessageDefinition
  fhir:version [ string ] ; # 0..1 Business version of the message definition
  # versionAlgorithm[x] : 0..1 How to compare versions. One of these 2
    fhir:versionAlgorithm [  a fhir:string ; string ]
    fhir:versionAlgorithm [  a fhir:Coding ; Coding ]
  fhir:name [ string ] ; # 0..1 I Name for this message definition (computer friendly)
  fhir:title [ string ] ; # 0..1 Name for this message definition (human friendly)
  fhir:replaces  ( [ canonical(MessageDefinition) ] ... ) ; # 0..* Takes the place of
  fhir:status [ code ] ; # 1..1 draft | active | retired | unknown
  fhir:experimental [ boolean ] ; # 0..1 For testing purposes, not real usage
  fhir:date [ dateTime ] ; # 1..1 Date last changed
  fhir:publisher [ string ] ; # 0..1 Name of the publisher/steward (organization or individual)
  fhir:contact  ( [ ContactDetail ] ... ) ; # 0..* Contact details for the publisher
  fhir:description [ markdown ] ; # 0..1 Natural language description of the message definition
  fhir:useContext  ( [ UsageContext ] ... ) ; # 0..* The context that the content is intended to support
  fhir:jurisdiction  ( [ CodeableConcept ] ... ) ; # 0..* Intended jurisdiction for message definition (if applicable)
  fhir:purpose [ markdown ] ; # 0..1 Why this message definition is defined
  fhir:copyright [ markdown ] ; # 0..1 Use and/or publishing restrictions
  fhir:copyrightLabel [ string ] ; # 0..1 Copyright holder and year(s)
  fhir:base [ canonical(MessageDefinition) ] ; # 0..1 Definition this one is based on
  fhir:parent  ( [ canonical(ActivityDefinition|PlanDefinition) ] ... ) ; # 0..* Protocol/workflow this is part of
  # event[x] : 1..1 Event code  or link to the EventDefinition. One of these 2
    fhir:event [  a fhir:Coding ; Coding ]
    fhir:event [  a fhir:uri ; uri ]
  fhir:category [ code ] ; # 0..1 consequence | currency | notification
  fhir:focus ( [ # 0..* Resource(s) that are the subject of the event
    fhir:code [ code ] ; # 1..1 Type of resource
    fhir:profile [ canonical(StructureDefinition) ] ; # 0..1 Profile that must be adhered to by focus
    fhir:min [ unsignedInt ] ; # 1..1 Minimum number of focuses of this type
    fhir:max [ string ] ; # 0..1 I Maximum number of focuses of this type
  ] ... ) ;
  fhir:responseRequired [ code ] ; # 0..1 always | on-error | never | on-success
  fhir:allowedResponse ( [ # 0..* Responses to this message
    fhir:message [ canonical(MessageDefinition) ] ; # 1..1 Reference to allowed message definition response
    fhir:situation [ markdown ] ; # 0..1 When should this response be used
  ] ... ) ;
  fhir:graph [ canonical(GraphDefinition) ] ; # 0..1 Canonical reference to a GraphDefinition
]

Changes from both R4 and R4B

MessageDefinition
MessageDefinition.versionAlgorithm[x]
  • Added Element
MessageDefinition.copyrightLabel
  • Added Element
MessageDefinition.focus.code
  • Remove codes CatalogEntry, DeviceUseStatement, DocumentManifest, DomainResource, EffectEvidenceSynthesis, Media, MedicinalProduct, MedicinalProductAuthorization, MedicinalProductContraindication, MedicinalProductIndication, MedicinalProductIngredient, MedicinalProductInteraction, MedicinalProductManufactured, MedicinalProductPackaged, MedicinalProductPharmaceutical, MedicinalProductUndesirableEffect, RequestGroup, ResearchDefinition, ResearchElementDefinition, Resource, RiskEvidenceSynthesis, SubstanceSpecification
  • Add codes ActorDefinition, AdministrableProductDefinition, ArtifactAssessment, BiologicallyDerivedProductDispense, Citation, ClinicalUseDefinition, ConditionDefinition, DeviceAlert, DeviceAssociation, DeviceDispense, DeviceUsage, EncounterHistory, EvidenceReport, FormularyItem, GenomicStudy, ImagingSelection, Ingredient, InsuranceProduct, InventoryItem, InventoryReport, ManufacturedItemDefinition, MedicinalProductDefinition, MolecularDefinition, NutritionIntake, NutritionProduct, PackagedProductDefinition, Permission, PersonalRelationship, RegulatedAuthorization, RequestOrchestration, Requirements, SubscriptionStatus, SubscriptionTopic, SubstanceDefinition, TestPlan, Transport
MessageDefinition.graph
  • Max Cardinality changed from * to 1

See the Full Difference for further information

This analysis is available for R4 as XML or JSON and for R4B as XML or JSON.

 

Additional definitions: Master Definition XML + JSON, XML Schema/Schematron + JSON Schema, ShEx (for Turtle) , the spreadsheet version & the dependency analysis

Path ValueSet Type Documentation
MessageDefinition.versionAlgorithm[x] VersionAlgorithm Extensible

Indicates the mechanism used to compare versions to determine which is more current.

MessageDefinition.status PublicationStatus Required

The lifecycle status of an artifact.

MessageDefinition.jurisdiction JurisdictionValueSet Extensible

This value set defines a base set of codes for country, country subdivision and region for indicating where a resource is intended to be used.

Note: The codes for countries and country subdivisions are taken from ISO 3166 icon while the codes for "supra-national" regions are from UN Standard country or area codes for statistical use (M49) icon.

MessageDefinition.event[x] MessageEvent Example

One of the message events defined as part of this version of FHIR.

MessageDefinition.category MessageSignificanceCategory Required

The impact of the content of a message.

MessageDefinition.focus.code ResourceType Required

Concrete FHIR Resource Types

MessageDefinition.responseRequired MessageheaderResponseRequest (a valid code from messageheader-response-request) Required

HL7-defined table of codes which identify conditions under which acknowledgments are required to be returned in response to a message.

UniqueKeyLevelLocationDescriptionExpression
img cnl-0Warning (base)Name should be usable as an identifier for the module by machine processing applications such as code generationname.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
img cnl-1Warning MessageDefinition.urlURL should not contain | or # - these characters make processing canonical references problematicexists() implies matches('^[^|# ]+$')
img md-1Rule MessageDefinition.focusMax must be postive int or *max='*' or (max.toInteger() > 0)



Search parameters for this resource. See also the full list of search parameters for this resource, and check the Extensions registry for search parameters on extensions related to this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.

Name Type Description Expression In Common
category token The behavior associated with the message MessageDefinition.category
context token A use context assigned to the message definition (MessageDefinition.useContext.value.ofType(CodeableConcept)) 30 Resources
context-quantity quantity A quantity- or range-valued use context assigned to the message definition (MessageDefinition.useContext.value.ofType(Quantity)) | (MessageDefinition.useContext.value.ofType(Range)) 30 Resources
context-type token A type of use context assigned to the message definition MessageDefinition.useContext.code 30 Resources
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.ofType(Quantity) | value.ofType(Range)
30 Resources
context-type-value composite A use context type and value assigned to the message definition On MessageDefinition.useContext:
  context-type: code
  context: value.ofType(CodeableConcept)
30 Resources
date date The message definition publication date MessageDefinition.date 30 Resources
description string The description of the message definition MessageDefinition.description 28 Resources
event token The event that triggers the message or link to the event definition. MessageDefinition.event.ofType(Coding)
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 36 Resources
jurisdiction token Intended jurisdiction for the message definition MessageDefinition.jurisdiction 26 Resources
name string Computationally friendly name of the message definition MessageDefinition.name 27 Resources
publisher string Name of the publisher of the message definition MessageDefinition.publisher 30 Resources
status token The current status of the message definition MessageDefinition.status 36 Resources
title string The human-friendly name of the message definition MessageDefinition.title 27 Resources
url uri The uri that identifies the message definition MessageDefinition.url 35 Resources
version token The business version of the message definition MessageDefinition.version 31 Resources