This page is part of the FHIR Specification (v0.0.82: DSTU 1). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

Messageheader.profile.xml

Profile for messageheader

{
  "resourceType": "Profile",
  "text": {
    "status": "generated",
    "div": "<div><pre>\r\n&lt;<a title=\"The header for a message exchange that is either requesting or responding to an action.  The resource(s) that are the subject of the action as well as other Information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader\"><b>MessageHeader</b></a> xmlns=&quot;http://hl7.org/fhir&quot;&gt; <span style=\"float: right\"><a title=\"Documentation for this format\" href=\"formats.html\"><img alt=\"doco\" src=\"help.png\"/></a></span>\r\n &lt;!-- from <a href=\"resources.html\">Resource</a>: <a href=\"extensibility.html\">extension</a>, <a href=\"extensibility.html#modifierExtension\">modifierExtension</a>, language, <a href=\"narrative.html#Narrative\">text</a>, and <a href=\"references.html#contained\">contained</a> --&gt;\r\n &lt;<a title=\"The identifier of this message.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.identifier\"><b>identifier</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#id\">id</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: navy\">Id of this message</span><span style=\"color: Gray\"> --&gt;</span>\r\n &lt;<a title=\"The time that the message was sent.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.timestamp\"><b>timestamp</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#instant\">instant</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: navy\">Time that the message was sent</span><span style=\"color: Gray\"> --&gt;</span>\r\n &lt;<a title=\"Code that identifies the event this message represents and connects it with it's definition. Events defined as part of the FHIR specification have the system value &quot;http://hl7.org/fhir/message-type&quot; (this element modifies the meaning of other elements)\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.event\"><span style=\"text-decoration: underline\"><b>event</b></span></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: darkgreen\"><a href=\"datatypes.html#Coding\">Coding</a></span> <span style=\"color: navy\"><a style=\"color: navy\" href=\"message-events.html\">Code for the event this message represents</a></span><span style=\"color: Gray\"> --&gt;</span>&lt;/event&gt;\r\n &lt;<a title=\"Information about the message that this message is a response to.  Only present if this message is a response (this element modifies the meaning of other elements)\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.response\"><span style=\"text-decoration: underline\"><b>response</b></span></a>&gt;  <span style=\"color: Gray\">&lt;!-- <span style=\"color: brown\"><b>0..1</b></span> If this is a reply to prior message --&gt;</span>\r\n  &lt;<a title=\"The id of the message that this message is a response to.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.response.identifier\"><b>identifier</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#id\">id</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: navy\">Id of original message</span><span style=\"color: Gray\"> --&gt;</span>\r\n  &lt;<a title=\"Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not (this element modifies the meaning of other elements)\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.response.code\"><span style=\"text-decoration: underline\"><b>code</b></span></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#code\">code</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: navy\"><a style=\"color: navy\" href=\"response-code.html\">ok | transient-error | fatal-error</a></span><span style=\"color: Gray\"> --&gt;</span>\r\n  &lt;<a title=\"Full details of any issues found in the message.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.response.details\"><b>details</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: darkgreen\"><a href=\"references.html#Resource\">Resource</a>(<a href=\"operationoutcome.html#OperationOutcome\">OperationOutcome</a>)</span> <span style=\"color: navy\">Specific list of hints/warnings/errors</span><span style=\"color: Gray\"> --&gt;</span>&lt;/details&gt;\r\n &lt;/response&gt;\r\n &lt;<a title=\"The source application from which this message originated.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.source\"><b>source</b></a>&gt;  <span style=\"color: Gray\">&lt;!-- <span style=\"color: brown\"><b>1..1</b></span> Message Source Application --&gt;</span>\r\n  &lt;<a title=\"Human-readable name for the target system.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.source.name\"><b>name</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#string\">string</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: navy\">Name of system</span><span style=\"color: Gray\"> --&gt;</span>\r\n  &lt;<a title=\"May include configuration or other information useful in debugging.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.source.software\"><b>software</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#string\">string</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: navy\">Name of software running the system</span><span style=\"color: Gray\"> --&gt;</span>\r\n  &lt;<a title=\"Can convey versions of multiple systems in situations where a message passes through multiple hands.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.source.version\"><b>version</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#string\">string</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: navy\">Version of software running</span><span style=\"color: Gray\"> --&gt;</span>\r\n  &lt;<a title=\"An e-mail, phone, website or other contact point to use to resolve issues with message communications.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.source.contact\"><b>contact</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: darkgreen\"><a href=\"datatypes.html#Contact\">Contact</a></span> <span style=\"color: navy\">Human contact for problems</span><span style=\"color: Gray\"> --&gt;</span>&lt;/contact&gt;\r\n  &lt;<a title=\"Identifies the routing target to send acknowledgements to.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.source.endpoint\"><b>endpoint</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#uri\">uri</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: navy\">Actual message source address or id</span><span style=\"color: Gray\"> --&gt;</span>\r\n &lt;/source&gt;\r\n &lt;<a title=\"The destination application which the message is intended for.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.destination\"><b>destination</b></a>&gt;  <span style=\"color: Gray\">&lt;!-- <span style=\"color: brown\"><b>0..*</b></span> Message Destination Application(s) --&gt;</span>\r\n  &lt;<a title=\"Human-readable name for the source system.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.destination.name\"><b>name</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#string\">string</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: navy\">Name of system</span><span style=\"color: Gray\"> --&gt;</span>\r\n  &lt;<a title=\"Identifies the target end system in situations where the initial message transmission is to an intermediary system.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.destination.target\"><b>target</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: darkgreen\"><a href=\"references.html#Resource\">Resource</a>(<a href=\"device.html#Device\">Device</a>)</span> <span style=\"color: navy\">Particular delivery destination within the destination</span><span style=\"color: Gray\"> --&gt;</span>&lt;/target&gt;\r\n  &lt;<a title=\"Indicates where the message should be routed to.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.destination.endpoint\"><b>endpoint</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#uri\">uri</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: navy\">Actual destination address or id</span><span style=\"color: Gray\"> --&gt;</span>\r\n &lt;/destination&gt;\r\n &lt;<a title=\"The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.enterer\"><b>enterer</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: darkgreen\"><a href=\"references.html#Resource\">Resource</a>(<a href=\"practitioner.html#Practitioner\">Practitioner</a>)</span> <span style=\"color: navy\">The source of the data entry</span><span style=\"color: Gray\"> --&gt;</span>&lt;/enterer&gt;\r\n &lt;<a title=\"The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.author\"><b>author</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: darkgreen\"><a href=\"references.html#Resource\">Resource</a>(<a href=\"practitioner.html#Practitioner\">Practitioner</a>)</span> <span style=\"color: navy\">The source of the decision</span><span style=\"color: Gray\"> --&gt;</span>&lt;/author&gt;\r\n &lt;<a title=\"Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.receiver\"><b>receiver</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: darkgreen\"><a href=\"references.html#Resource\">Resource</a>(<a href=\"practitioner.html#Practitioner\">Practitioner</a>|<a href=\"organization.html#Organization\">Organization</a>)</span> <span style=\"color: navy\">\r\n     Intended &quot;real-world&quot; recipient for the data</span><span style=\"color: Gray\"> --&gt;</span>&lt;/receiver&gt;\r\n &lt;<a title=\"The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.responsible\"><b>responsible</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: darkgreen\"><a href=\"references.html#Resource\">Resource</a>(<a href=\"practitioner.html#Practitioner\">Practitioner</a>|<a href=\"organization.html#Organization\">Organization</a>)</span> <span style=\"color: navy\">\r\n     Final responsibility for event</span><span style=\"color: Gray\"> --&gt;</span>&lt;/responsible&gt;\r\n &lt;<a title=\"Coded indication of the cause for the event - indicates  a reason for the occurance of the event that is a focus of this message.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.reason\"><b>reason</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: darkgreen\"><a href=\"datatypes.html#CodeableConcept\">CodeableConcept</a></span> <span style=\"color: navy\"><a style=\"color: navy\" href=\"valueset-message-reason-encounter.html\">Cause of event</a></span><span style=\"color: Gray\"> --&gt;</span>&lt;/reason&gt;\r\n &lt;<a title=\"The actual data of the message - a reference to the root/focus class of the event.\" class=\"dict\" href=\"messageheader-definitions.html#MessageHeader.data\"><b>data</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..*</b></span> <span style=\"color: darkgreen\"><a href=\"references.html#Resource\">Resource</a>(<a href=\"resourcelist.html\">Any</a>)</span> <span style=\"color: navy\">The actual content of the message</span><span style=\"color: Gray\"> --&gt;</span>&lt;/data&gt;\r\n&lt;/MessageHeader&gt;\r\n</pre></div>"
  },
  "name": "messageheader",
  "publisher": "FHIR Project",
  "description": "Basic Profile. The header for a message exchange that is either requesting or responding to an action.  The resource(s) that are the subject of the action as well as other Information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.",
  "status": "draft",
  "date": "2014-09-30",
  "requirements": "Scope and Usage The MessageHeader resource is defined in order to support Messaging using FHIR resources. The principle usage of the MessageHeader resource is when messages are exchanged. However, as a resource that can be used with the RESTful framework, the MessageHeader resource has the normal resource end-point ([base-url]/Message), which is used to manage a set of static messages resources. This could be used to make an archive of past messages available. Creating or updating Message resources in this fashion does not represent the actual occurrence of any event, nor can it trigger any logic associated with the actual event. It is just for managing a set of message resources.",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2"
    }
  ],
  "structure": [
    {
      "type": "MessageHeader",
      "publish": true,
      "element": [
        {
          "path": "MessageHeader",
          "definition": {
            "short": "A resource that describes a message that is exchanged between systems",
            "formal": "The header for a message exchange that is either requesting or responding to an action.  The resource(s) that are the subject of the action as well as other Information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Resource"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "Message"
              },
              {
                "identity": "v2",
                "map": "MSH / MSA / ERR"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.extension",
          "definition": {
            "short": "Additional Content defined by implementations",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false
          }
        },
        {
          "path": "MessageHeader.modifierExtension",
          "definition": {
            "short": "Extensions that cannot be ignored",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false
          }
        },
        {
          "path": "MessageHeader.text",
          "definition": {
            "short": "Text summary of the resource, for human interpretation",
            "formal": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
            "comments": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative.",
            "synonym": [
              "narrative",
              "html",
              "xhtml",
              "display"
            ],
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "isModifier": false
          }
        },
        {
          "path": "MessageHeader.contained",
          "definition": {
            "short": "Contained, inline Resources",
            "formal": "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.",
            "comments": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "synonym": [
              "inline resources",
              "anonymous resources",
              "contained resources"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Resource"
              }
            ],
            "isModifier": false
          }
        },
        {
          "path": "MessageHeader.identifier",
          "definition": {
            "short": "Id of this message",
            "formal": "The identifier of this message.",
            "comments": "This SHALL be unique within the scope of this stream of messages.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "id"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "Message.id"
              },
              {
                "identity": "v2",
                "map": "MSH-10-message control ID"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.timestamp",
          "definition": {
            "short": "Time that the message was sent",
            "formal": "The time that the message was sent.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "instant"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "./creationTime[isNormalDatatype()]"
              },
              {
                "identity": "v2",
                "map": "MSH-7-message date/time"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.event",
          "definition": {
            "short": "Code for the event this message represents",
            "formal": "Code that identifies the event this message represents and connects it with it's definition. Events defined as part of the FHIR specification have the system value \"http://hl7.org/fhir/message-type\".",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isModifier": true,
            "binding": {
              "name": "MessageEvent",
              "isExtensible": true,
              "conformance": "preferred",
              "referenceResource": {
                "reference": "http://hl7.org/fhir/message-events"
              }
            },
            "mapping": [
              {
                "identity": "rim",
                "map": "./payload[classCode=\"CACT\" and moodCode=\"EVN\" and isNormalAct()]/code[isNormalDatatype()]/code"
              },
              {
                "identity": "v2",
                "map": "MSH-9.2-message type.trigger event"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.response",
          "definition": {
            "short": "If this is a reply to prior message",
            "formal": "Information about the message that this message is a response to.  Only present if this message is a response.",
            "min": 0,
            "max": "1",
            "isModifier": true,
            "mapping": [
              {
                "identity": "rim",
                "map": "./conveyedAcknowledgement"
              },
              {
                "identity": "v2",
                "map": "MSA"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.response.extension",
          "definition": {
            "short": "Additional Content defined by implementations",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false
          }
        },
        {
          "path": "MessageHeader.response.modifierExtension",
          "definition": {
            "short": "Extensions that cannot be ignored",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false
          }
        },
        {
          "path": "MessageHeader.response.identifier",
          "definition": {
            "short": "Id of original message",
            "formal": "The id of the message that this message is a response to.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "id"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "./acknowledges.id[isNormalDatatype()]"
              },
              {
                "identity": "v2",
                "map": "MSA-2-message control ID"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.response.code",
          "definition": {
            "short": "ok | transient-error | fatal-error",
            "formal": "Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.",
            "comments": "This is a generic response to the request message. Specific data for the response will be found in MessageHeader.data.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "binding": {
              "name": "ResponseType",
              "isExtensible": false,
              "conformance": "required",
              "referenceResource": {
                "reference": "http://hl7.org/fhir/vs/response-code"
              }
            },
            "mapping": [
              {
                "identity": "rim",
                "map": "./typeCode[isNormalDatatype()]"
              },
              {
                "identity": "v2",
                "map": "MSA-1-acknowledgment code"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.response.details",
          "definition": {
            "short": "Specific list of hints/warnings/errors",
            "formal": "Full details of any issues found in the message.",
            "comments": "This SHALL be contained in the bundle. If any of the issues are errors, the response code SHALL be an error.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/OperationOutcome"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "AcknowledgementDetail or Observation[classCode=\"ALRT\" and moodCode=\"EVN\"]"
              },
              {
                "identity": "v2",
                "map": "ERR"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.source",
          "definition": {
            "short": "Message Source Application",
            "formal": "The source application from which this message originated.",
            "min": 1,
            "max": "1",
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "unique(./communicationFunction[typeCode=\"SND\"])"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.source.extension",
          "definition": {
            "short": "Additional Content defined by implementations",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false
          }
        },
        {
          "path": "MessageHeader.source.modifierExtension",
          "definition": {
            "short": "Extensions that cannot be ignored",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false
          }
        },
        {
          "path": "MessageHeader.source.name",
          "definition": {
            "short": "Name of system",
            "formal": "Human-readable name for the target system.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "unique(./entity[determinerCode=\"INST\" and classCode=\"DEV\"]/name[type='ST' and isNormalDatatype()])"
              },
              {
                "identity": "v2",
                "map": "MSH-3-sending application"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.source.software",
          "definition": {
            "short": "Name of software running the system",
            "formal": "May include configuration or other information useful in debugging.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "unique(./entity[determinerCode=\"INST\" and classCode=\"DEV\"]/softwareName[isNormalDatatype()])"
              },
              {
                "identity": "v2",
                "map": "SFT-3-software product name ( +SFT-1-software vendor organization)"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.source.version",
          "definition": {
            "short": "Version of software running",
            "formal": "Can convey versions of multiple systems in situations where a message passes through multiple hands.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "(Not supported)"
              },
              {
                "identity": "v2",
                "map": "SFT-2-software certified version or release number"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.source.contact",
          "definition": {
            "short": "Human contact for problems",
            "formal": "An e-mail, phone, website or other contact point to use to resolve issues with message communications.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Contact"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "unique(./entity[determinerCode=\"INST\" and classCode=\"DEV\"]/scopesRole[normalRole() and classCode=\"CON\" and layer[classCode=\"PSN\"]/telecom[isNormalDatatype()])"
              },
              {
                "identity": "v2",
                "map": "(MSH-22?)"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.source.endpoint",
          "definition": {
            "short": "Actual message source address or id",
            "formal": "Identifies the routing target to send acknowledgements to.",
            "comments": "The id may be a non-resolvable URI for systems that do not use standard network-based addresses.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "./telecom[isNormalDatatype()]"
              },
              {
                "identity": "v2",
                "map": "MSH-24-sending network address"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.destination",
          "definition": {
            "short": "Message Destination Application(s)",
            "formal": "The destination application which the message is intended for.",
            "comments": "there SHOULD be at least one destination, but in some circumstances, the source system is unaware of any particular destination system.",
            "min": 0,
            "max": "*",
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "./communicationFunction[typeCode=\"RCV\"]"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.destination.extension",
          "definition": {
            "short": "Additional Content defined by implementations",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false
          }
        },
        {
          "path": "MessageHeader.destination.modifierExtension",
          "definition": {
            "short": "Extensions that cannot be ignored",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false
          }
        },
        {
          "path": "MessageHeader.destination.name",
          "definition": {
            "short": "Name of system",
            "formal": "Human-readable name for the source system.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "unique(./entity[determinerCode=\"INST\" and (classCode=(\"DEV\", \"PSN\", \"ORG\"]/name[type='ST' and isNormalDatatype()])"
              },
              {
                "identity": "v2",
                "map": "MSH-5-receiving application"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.destination.target",
          "definition": {
            "short": "Particular delivery destination within the destination",
            "formal": "Identifies the target end system in situations where the initial message transmission is to an intermediary system.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Device"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "unique(./entity[determinerCode=\"INST\" and (classCode=(\"DEV\", \"PSN\", \"ORG\"]"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.destination.endpoint",
          "definition": {
            "short": "Actual destination address or id",
            "formal": "Indicates where the message should be routed to.",
            "comments": "The id may be a non-resolvable URI for systems that do not use standard network-based addresses.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "./telecom"
              },
              {
                "identity": "v2",
                "map": "MSH-25-receiving network address (or MSH-6-receiving facility by implication)"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.enterer",
          "definition": {
            "short": "The source of the data entry",
            "formal": "The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.",
            "comments": "Usually only for the request, but can be used in a response.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Practitioner"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "unique(./controlAct[classCode=\"CACT\" and classCode=\"EVN\" and isNormalAct()]/participation[typeCode=\"ENT\" and isNormalParticipation]/role[classCode=\"ASSIGNED\" and isNormalRole()]/player[isNormalEntity() and classCode=(\"DEV\", \"PSN\") and determinerCode=\"INST\"])"
              },
              {
                "identity": "v2",
                "map": "EVN-5-operator ID / ORC-10-entered by / PRT-5-Participation Person:PRT-4-Participation='EP' / ROL where ROL.3 is EP or ORC.10"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.author",
          "definition": {
            "short": "The source of the decision",
            "formal": "The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.",
            "comments": "Usually only for the request, but can be used in a response.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Practitioner"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "unique(./controlAct[classCode=\"CACT\" and classCode=\"EVN\" and isNormalAct()]/participation[isHighest(priorityCode) and typeCode=\"AUT\" and isNormalParticipation]/role[classCode=\"ASSIGNED\" and isNormalRole()]/player[isNormalEntity() and classCode=(\"DEV\", \"PSN\") and determinerCode=\"INST\"])"
              },
              {
                "identity": "v2",
                "map": "ORC-19-action by / PRT-5-Participation Person:PRT-4-Participation='AUT' / ROL where ROL.3 is IP or ORC.12"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.receiver",
          "definition": {
            "short": "Intended \"real-world\" recipient for the data",
            "formal": "Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Practitioner"
              },
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Organization"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "Not directly supported.  Could be shared using attentionLine.value with an appropriate keyWordText"
              },
              {
                "identity": "v2",
                "map": "PRT-5-Participation Person:PRT-4-Participation='WAYR' / PRT-8-Participation Organization:PRT-4-Participation='WAYR'"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.responsible",
          "definition": {
            "short": "Final responsibility for event",
            "formal": "The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.",
            "comments": "Usually only for the request, but can be used in a response.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Practitioner"
              },
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Organization"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "unique(./controlAct[classCode=\"CACT\" and classCode=\"EVN\" and isNormalAct()]/participation[isHighest(priorityCode) and typeCode=\"RESP\" and isNormalParticipation]/role[classCode=\"ASSIGNED\" and isNormalRole()]/player[isNormalEntity() and classCode=\"PSN\" and determinerCode=\"INST\"] or ./controlAct[classCode=\"CACT\" and classCode=\"EVN\" and isNormalAct()]/participation[isHighest(priorityCode) and typeCode=\"RESP\" and isNormalParticipation]/role[classCode=\"ASSIGNED\" and isNormalRole()]/scoper[isNormalEntity() and classCode=\"ORG\" and determinerCode=\"INST\"])"
              },
              {
                "identity": "v2",
                "map": "ORC-12-ordering provider / \nPRT-5-Participation Person:PRT-4-Participation='OP' / \nPRT-8-Participation Organization:PRT-4-Participation='OP'\n/ ROL where ROL.3 is RO or ORC.11"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.reason",
          "definition": {
            "short": "Cause of event",
            "formal": "Coded indication of the cause for the event - indicates  a reason for the occurance of the event that is a focus of this message.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isModifier": false,
            "binding": {
              "name": "EventReason",
              "isExtensible": true,
              "conformance": "example",
              "referenceResource": {
                "reference": "http://hl7.org/fhir/vs/message-reason-encounter"
              }
            },
            "mapping": [
              {
                "identity": "rim",
                "map": "unique(./controlAct[classCode=\"CACT\" and classCode=\"EVN\" and isNormalAct()]/reasonCode[isNormalDatatype()])"
              },
              {
                "identity": "v2",
                "map": "EVN.4 / ORC.16 / OBR-31-reason for study / BPO-13-BP indication for use / RXO-20-indication / RXE-27-give indication / RXD-21-indication / RXG-22-indication / RXA-19-indication"
              }
            ]
          }
        },
        {
          "path": "MessageHeader.data",
          "definition": {
            "short": "The actual content of the message",
            "formal": "The actual data of the message - a reference to the root/focus class of the event.",
            "comments": "The data is defined where the transaction type is defined. The transaction data is always included in the bundle that is the full message.  Only the root resource is specified.  The resources it references should be contained in the bundle but are not also listed here.  Multiple repetitions are allowed to cater for merges and other situations with multiple focal targets.",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Any"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "unique(./controlAct[classCode=\"CACT\" and classCode=\"EVN\" and isNormalAct()]/participation[typeCode=\"SUBJ\" and isNormalParticipation]/role or ./controlAct[classCode=\"CACT\" and classCode=\"EVN\" and isNormalAct()]/outboundRelationship[typeCode=\"SBJ\" and isNormalActRelatoinship]/target)"
              }
            ]
          }
        }
      ],
      "searchParam": [
        {
          "name": "_id",
          "type": "token",
          "documentation": "The logical resource id associated with the resource (must be supported by all servers)"
        },
        {
          "name": "_language",
          "type": "token",
          "documentation": "The language of the resource"
        }
      ]
    }
  ]
}