> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metriport.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MessageDefinition

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

## Properties

| Name                | Required | Type                                                               | Description                                                  |
| ------------------- | -------- | ------------------------------------------------------------------ | ------------------------------------------------------------ |
| url                 | No       | uri                                                                | Business Identifier for a given MessageDefinition            |
| identifier          | No       | [Identifier](/medical-api/fhir/data-types/identifier)\[]           | Primary key for the message definition on a given server     |
| version             | No       | string                                                             | Business version of the message definition                   |
| name                | No       | string                                                             | Name for this message definition (computer friendly)         |
| title               | No       | string                                                             | Name for this message definition (human friendly)            |
| replaces            | No       | canonical\[]                                                       | Takes the place of                                           |
| status              | Yes      | code                                                               | draft / active / retired / unknown                           |
| experimental        | No       | boolean                                                            | For testing purposes, not real usage                         |
| date                | Yes      | dateTime                                                           | Date last changed                                            |
| publisher           | No       | string                                                             | Name of the publisher (organization or individual)           |
| contact             | No       | [ContactDetail](/medical-api/fhir/data-types/contactdetail)\[]     | Contact details for the publisher                            |
| description         | No       | markdown                                                           | Natural language description of the message definition       |
| useContext          | No       | [UsageContext](/medical-api/fhir/data-types/usagecontext)\[]       | The context that the content is intended to support          |
| jurisdiction        | No       | [CodeableConcept](/medical-api/fhir/data-types/codeableconcept)\[] | Intended jurisdiction for message definition (if applicable) |
| purpose             | No       | markdown                                                           | Why this message definition is defined                       |
| copyright           | No       | markdown                                                           | Use and/or publishing restrictions                           |
| base                | No       | canonical                                                          | Definition this one is based on                              |
| parent              | No       | canonical\[]                                                       | Protocol/workflow this is part of                            |
| event\[x]           | Yes      | [Coding](/medical-api/fhir/data-types/coding), uri                 | Event code or link to the EventDefinition                    |
| category            | No       | code                                                               | consequence / currency / notification                        |
| focus               | No       | MessageDefinitionFocus                                             | Resource(s) that are the subject of the event                |
| - id                | No       | string                                                             | Unique id for inter-element referencing                      |
| - extension         | No       | [Extension](/medical-api/fhir/data-types/extension)\[]             | Additional content defined by implementations                |
| - modifierExtension | No       | [Extension](/medical-api/fhir/data-types/extension)\[]             | Extensions that cannot be ignored even if unrecognized       |
| - code              | Yes      | code                                                               | Type of resource                                             |
| - profile           | No       | canonical                                                          | Profile that must be adhered to by focus                     |
| - min               | Yes      | unsignedInt                                                        | Minimum number of focuses of this type                       |
| - max               | No       | string                                                             | Maximum number of focuses of this type                       |
| responseRequired    | No       | code                                                               | always / on-error / never / on-success                       |
| allowedResponse     | No       | MessageDefinitionAllowedResponse                                   | Responses to this message                                    |
| - id                | No       | string                                                             | Unique id for inter-element referencing                      |
| - extension         | No       | [Extension](/medical-api/fhir/data-types/extension)\[]             | Additional content defined by implementations                |
| - modifierExtension | No       | [Extension](/medical-api/fhir/data-types/extension)\[]             | Extensions that cannot be ignored even if unrecognized       |
| - message           | Yes      | canonical                                                          | Reference to allowed message definition response             |
| - situation         | No       | markdown                                                           | When should this response be used                            |
| graph               | No       | canonical\[]                                                       | Canonical reference to a GraphDefinition                     |

## Search Parameters

| Name                  | Type      | Description                                                                              | Expression                         |
| --------------------- | --------- | ---------------------------------------------------------------------------------------- | ---------------------------------- |
| context               | token     | A use context assigned to the message definition                                         | MessageDefinition.useContext.value |
| context-quantity      | quantity  | A quantity- or range-valued use context assigned to the message definition               | MessageDefinition.useContext.value |
| context-type          | token     | A type of use context assigned to the message definition                                 | MessageDefinition.useContext.code  |
| date                  | date      | The message definition publication date                                                  | MessageDefinition.date             |
| description           | string    | The description of the message definition                                                | MessageDefinition.description      |
| 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          |
| context-type-quantity | composite | A use context type and quantity- or range-based value assigned to the message definition | MessageDefinition.useContext       |
| context-type-value    | composite | A use context type and value assigned to the message definition                          | MessageDefinition.useContext       |
| identifier            | token     | External identifier for the message definition                                           | MessageDefinition.identifier       |
| category              | token     | The behavior associated with the message                                                 | MessageDefinition.category         |
| 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       |
| parent                | reference | A resource that is the parent of the definition                                          | MessageDefinition.parent           |

## Inherited Properties

| Name              | Required | Type                                                   | Description                                            |
| ----------------- | -------- | ------------------------------------------------------ | ------------------------------------------------------ |
| id                | No       | string                                                 | Logical id of this artifact                            |
| meta              | No       | [Meta](/medical-api/fhir/data-types/meta)              | Metadata about the resource                            |
| implicitRules     | No       | uri                                                    | A set of rules under which this content was created    |
| language          | No       | code                                                   | Language of the resource content                       |
| text              | No       | [Narrative](/medical-api/fhir/data-types/narrative)    | Text summary of the resource, for human interpretation |
| contained         | No       | Resource\[]                                            | Contained, inline Resources                            |
| extension         | No       | [Extension](/medical-api/fhir/data-types/extension)\[] | Additional content defined by implementations          |
| modifierExtension | No       | [Extension](/medical-api/fhir/data-types/extension)\[] | Extensions that cannot be ignored                      |

To view the FHIR specification for this resource, see [MessageDefinition](https://www.hl7.org/fhir/StructureDefinition/MessageDefinition).
