{
  "resourceType": "StructureDefinition",
  "id": "UKCore-MessageHeader",
  "url": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-MessageHeader",
  "version": "2.1.0",
  "name": "UKCoreMessageHeader",
  "title": "UK Core MessageHeader",
  "status": "active",
  "date": "2022-01-07",
  "publisher": "HL7 UK",
  "contact": [
    {
      "name": "HL7 UK",
      "telecom": [
        {
          "system": "email",
          "value": "secretariat@hl7.org.uk",
          "use": "work",
          "rank": 1
        }
      ]
    },
    {
      "name": "NHS Digital",
      "telecom": [
        {
          "system": "email",
          "value": "interoperabilityteam@nhs.net",
          "use": "work",
          "rank": 2
        }
      ]
    }
  ],
  "description": "Defines the UK Core constraints and extensions on the MessageHeader resource for the minimal set of data to be present in a message header.",
  "purpose": "This profile carries the header data for a message exchange that is either requesting or responding to an action.",
  "copyright": "Copyright © 2021+ HL7 UK Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at  https://www.hl7.org/fhir/license.html.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "MessageHeader",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MessageHeader",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MessageHeader.extension",
        "path": "MessageHeader.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "MessageHeader.extension:messageHeaderInstruction",
        "path": "MessageHeader.extension",
        "sliceName": "messageHeaderInstruction",
        "min": 0,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MessageHeaderInstruction"
            ]
          }
        ]
      },
      {
        "id": "MessageHeader.event[x]",
        "path": "MessageHeader.event[x]",
        "binding": {
          "strength": "extensible",
          "description": "Message event",
          "valueSet": "https://fhir.hl7.org.uk/ValueSet/UKCore-MessageEvent"
        }
      },
      {
        "id": "MessageHeader.destination.target",
        "path": "MessageHeader.destination.target",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Device"
            ]
          }
        ]
      },
      {
        "id": "MessageHeader.destination.target.identifier.assigner",
        "path": "MessageHeader.destination.target.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MessageHeader.destination.receiver",
        "path": "MessageHeader.destination.receiver",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole"
            ]
          }
        ]
      },
      {
        "id": "MessageHeader.destination.receiver.identifier.assigner",
        "path": "MessageHeader.destination.receiver.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MessageHeader.sender",
        "path": "MessageHeader.sender",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner"
            ]
          }
        ]
      },
      {
        "id": "MessageHeader.sender.identifier.assigner",
        "path": "MessageHeader.sender.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MessageHeader.enterer",
        "path": "MessageHeader.enterer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole"
            ]
          }
        ]
      },
      {
        "id": "MessageHeader.enterer.identifier.assigner",
        "path": "MessageHeader.enterer.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MessageHeader.author",
        "path": "MessageHeader.author",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole"
            ]
          }
        ]
      },
      {
        "id": "MessageHeader.author.identifier.assigner",
        "path": "MessageHeader.author.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MessageHeader.responsible",
        "path": "MessageHeader.responsible",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner"
            ]
          }
        ]
      },
      {
        "id": "MessageHeader.responsible.identifier.assigner",
        "path": "MessageHeader.responsible.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MessageHeader.response.details",
        "path": "MessageHeader.response.details",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-OperationOutcome"
            ]
          }
        ]
      },
      {
        "id": "MessageHeader.response.details.identifier.assigner",
        "path": "MessageHeader.response.details.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MessageHeader.focus.identifier.assigner",
        "path": "MessageHeader.focus.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      }
    ]
  }
}