{
  "resourceType": "StructureDefinition",
  "id": "England-Bundle-PharmacyHubToSpoke",
  "url": "https://fhir.nhs.uk/England/StructureDefinition/England-Bundle-PharmacyHubToSpoke",
  "version": "0.1.0",
  "name": "EnglandBundlePharmacyHubToSpoke",
  "title": "England Bundle Pharmacy Hub To Spoke",
  "status": "draft",
  "date": "2025-12-04T00:00:00+00:00",
  "publisher": "NHS England",
  "contact": [
    {
      "name": "NHS England",
      "telecom": [
        {
          "system": "email",
          "value": "interoperabilityteam@nhs.net",
          "use": "work",
          "rank": 1
        }
      ]
    }
  ],
  "description": "Transaction Bundle Definition",
  "purpose": "Documents the requirements for Hub to Spoke Pharmacy transactions",
  "copyright": "Copyright © 2024+ NHS England 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",
  "kind": "resource",
  "abstract": false,
  "type": "Bundle",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle.type",
        "path": "Bundle.type",
        "fixedCode": "transaction"
      },
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "profile",
              "path": "resolve()"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Bundle.entry:Task",
        "path": "Bundle.entry",
        "sliceName": "Task",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:Task.resource",
        "path": "Bundle.entry.resource",
        "comment": "The `Task.status` SHOULD be fixed to `completed` or `failed`",
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Task"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:MedicationDispense",
        "path": "Bundle.entry",
        "sliceName": "MedicationDispense",
        "comment": "The hub pharmacy implementation will decide on how MedicationDispense resources are bundled. For example; sent individually in separate bundles, bundles grouped by patient, or bundles containing multiple dispensed items for multiple patients.",
        "min": 1
      },
      {
        "id": "Bundle.entry:MedicationDispense.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-MedicationDispense"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:Organisation",
        "path": "Bundle.entry",
        "sliceName": "Organisation",
        "definition": "Must provide the name and address of the performing hub pharmacy.",
        "comment": "Must provide the name and address of the requesting spoke pharmacy.",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:Organisation.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      }
    ]
  }
}