{
  "resourceType": "StructureDefinition",
  "id": "England-RequestGroup",
  "url": "https://fhir.nhs.uk/StructureDefinition/England-RequestGroup",
  "version": "0.1.0",
  "name": "EnglandRequestGroup",
  "title": "England RequestGroup",
  "status": "draft",
  "date": "2025-04-03",
  "publisher": "NHS England",
  "contact": [
    {
      "name": "NHS England",
      "telecom": [
        {
          "system": "email",
          "value": "interoperabilityteam@nhs.net",
          "use": "work",
          "rank": 1
        }
      ]
    }
  ],
  "description": "This profile defines the NHS England constraints and extensions on the International FHIR resource [RequestGroup](https://hl7.org/fhir/R4/requestgroup.html).",
  "purpose": "This profile is used to group collection of related resources (wrapper) to be embodied as a single message. E.g, collection of MedicationRequest resources to represent a prescription.",
  "copyright": "Copyright &#169; 2025+ NHS England Licensed under the Apache License, Version 2.0 (the \\&quot;License\\&quot;); 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 \\&quot;AS IS\\&quot; 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&#174; FHIR&#174; standard Copyright &#169; 2011+ HL7 The HL7&#174; FHIR&#174; 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": "RequestGroup",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/RequestGroup",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "RequestGroup.extension:NHSBSAprescriptionType",
        "path": "RequestGroup.extension",
        "sliceName": "NHSBSAprescriptionType",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionType"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "RequestGroup.extension:prescriptionPendingCancellation",
        "path": "RequestGroup.extension",
        "sliceName": "prescriptionPendingCancellation",
        "short": "An extension use to record if a prescription or any of its line items is pending cancellation.",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.nhs.uk/StructureDefinition/Extension-PendingCancellation"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "RequestGroup.extension:prescriptionStatusHistory",
        "path": "RequestGroup.extension",
        "sliceName": "prescriptionStatusHistory",
        "short": "Dispensing Prescription Status",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionStatusHistory"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "RequestGroup.extension:repeatInformation",
        "path": "RequestGroup.extension",
        "sliceName": "repeatInformation",
        "short": "An extension use to record both the instance and the maximum number of repeat allowed for a prescription.",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "RequestGroup.action.participant",
        "path": "RequestGroup.action.participant",
        "constraint": [
          {
            "key": "nhse-requsetgrp-001",
            "requirements": "Only one of RequestGroup.action.participant or RequestGroup.action.participant.extension:participantR5 can be populated at a time.",
            "severity": "error",
            "human": "If extension-ParticipantType R5 Backport is used then RequestGroup.action.participant  SHALL be empty.",
            "expression": "RequestGroup.action.participant.empty() or RequestGroup.action.participant.extension('http://hl7.org/fhir/5.0/StructureDefinition/extension-RequestOrchestration.action.participant.typeReference').empty()"
          }
        ]
      },
      {
        "id": "RequestGroup.action.participant.extension:participantR5",
        "path": "RequestGroup.action.participant.extension",
        "sliceName": "participantR5",
        "short": "An extension use to record the type of a participant designated to perform an action.",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/5.0/StructureDefinition/extension-RequestOrchestration.action.participant.typeReference"
            ]
          }
        ],
        "isModifier": false
      }
    ]
  }
}