{
  "resourceType": "StructureDefinition",
  "meta": {
    "lastUpdated": "2023-07-28T00:00:00+00:00"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "phx"
    }
  ],
  "url": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-MedicationRequest-1",
  "version": "1.7.0",
  "name": "CareConnect-GPC-MedicationRequest-1",
  "status": "active",
  "date": "2024-01-22T11:39:06.3872207+00:00",
  "publisher": "HL7 UK",
  "description": "This MedicationRequest Resource represents an order for both supply of the medication and the instructions for administration of the medication to a patient.",
  "copyright": "Copyright © 2020 HL7 UK\r\n\r\nLicensed 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\r\n\r\nhttp://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless 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.\r\n\r\nHL7® FHIR® standard Copyright © 2011+ HL7\r\n\r\nThe HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at\r\n\r\nhttps://www.hl7.org/fhir/license.html",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "MedicationRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MedicationRequest.meta.profile",
        "path": "MedicationRequest.meta.profile",
        "min": 1
      },
      {
        "id": "MedicationRequest.extension",
        "path": "MedicationRequest.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.extension:repeatInformation",
        "path": "MedicationRequest.extension",
        "sliceName": "repeatInformation",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-MedicationRepeatInformation-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.extension:repeatInformation.extension:numberOfRepeatPrescriptionsAllowed",
        "path": "MedicationRequest.extension.extension",
        "sliceName": "numberOfRepeatPrescriptionsAllowed",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.extension:repeatInformation.extension:numberOfRepeatPrescriptionsIssued",
        "path": "MedicationRequest.extension.extension",
        "sliceName": "numberOfRepeatPrescriptionsIssued",
        "mustSupport": false
      },
      {
        "id": "MedicationRequest.extension:repeatInformation.extension:authorisationExpiryDate",
        "path": "MedicationRequest.extension.extension",
        "sliceName": "authorisationExpiryDate",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.extension:statusReason",
        "path": "MedicationRequest.extension",
        "sliceName": "statusReason",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-MedicationStatusReason-1"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.extension:prescriptionType",
        "path": "MedicationRequest.extension",
        "sliceName": "prescriptionType",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-PrescriptionType-1"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.identifier",
        "path": "MedicationRequest.identifier",
        "min": 1
      },
      {
        "id": "MedicationRequest.identifier.system",
        "path": "MedicationRequest.identifier.system",
        "min": 1
      },
      {
        "id": "MedicationRequest.identifier.value",
        "path": "MedicationRequest.identifier.value",
        "min": 1
      },
      {
        "id": "MedicationRequest.basedOn",
        "path": "MedicationRequest.basedOn",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-MedicationRequest-1"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.groupIdentifier",
        "path": "MedicationRequest.groupIdentifier",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.groupIdentifier.assigner",
        "path": "MedicationRequest.groupIdentifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Organization-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.status",
        "path": "MedicationRequest.status",
        "min": 1
      },
      {
        "id": "MedicationRequest.medication[x]",
        "path": "MedicationRequest.medication[x]",
        "type": [
          {
            "code": "CodeableConcept"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Medication-1"
          }
        ],
        "binding": {
          "strength": "example",
          "valueSetUri": "http://hl7.org/fhir/ValueSet/medication-codes"
        }
      },
      {
        "id": "MedicationRequest.subject",
        "path": "MedicationRequest.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.context",
        "path": "MedicationRequest.context",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Encounter-1"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.authoredOn",
        "path": "MedicationRequest.authoredOn",
        "min": 1
      },
      {
        "id": "MedicationRequest.requester",
        "path": "MedicationRequest.requester",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.requester.agent",
        "path": "MedicationRequest.requester.agent",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Organization-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.requester.onBehalfOf",
        "path": "MedicationRequest.requester.onBehalfOf",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Organization-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.recorder",
        "path": "MedicationRequest.recorder",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.reasonReference",
        "path": "MedicationRequest.reasonReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Condition-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Observation-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.note",
        "path": "MedicationRequest.note",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.note.author[x]",
        "path": "MedicationRequest.note.author[x]",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
          },
          {
            "code": "string"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.dosageInstruction",
        "path": "MedicationRequest.dosageInstruction",
        "min": 1
      },
      {
        "id": "MedicationRequest.dosageInstruction.text",
        "path": "MedicationRequest.dosageInstruction.text",
        "min": 1
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding:snomedCT",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding",
        "sliceName": "snomedCT",
        "max": "1"
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding:snomedCT.extension",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding:snomedCT.extension:snomedCTDescriptionID",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding.extension",
        "sliceName": "snomedCTDescriptionID",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid"
          }
        ]
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding:snomedCT.system",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding:snomedCT.version",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding:snomedCT.code",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding.code",
        "min": 1
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding:snomedCT.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding.display",
        "min": 1
      },
      {
        "id": "MedicationRequest.dosageInstruction.patientInstruction",
        "path": "MedicationRequest.dosageInstruction.patientInstruction",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding",
        "path": "MedicationRequest.dosageInstruction.route.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:snomedCT",
        "path": "MedicationRequest.dosageInstruction.route.coding",
        "sliceName": "snomedCT",
        "max": "1",
        "binding": {
          "strength": "preferred",
          "description": "A code from the SNOMED Clinical Terminology UK coding system that describes the e-Prescribing route of administration.",
          "valueSetReference": {
            "reference": "https://fhir.nhs.uk/STU3/ValueSet/CareConnect-MedicationDosageRoute-1"
          }
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:snomedCT.extension",
        "path": "MedicationRequest.dosageInstruction.route.coding.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:snomedCT.extension:snomedCTDescriptionID",
        "path": "MedicationRequest.dosageInstruction.route.coding.extension",
        "sliceName": "snomedCTDescriptionID",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid"
          }
        ]
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:snomedCT.system",
        "path": "MedicationRequest.dosageInstruction.route.coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:snomedCT.version",
        "path": "MedicationRequest.dosageInstruction.route.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:snomedCT.code",
        "path": "MedicationRequest.dosageInstruction.route.coding.code",
        "min": 1
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:snomedCT.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationRequest.dosageInstruction.route.coding.display",
        "min": 1
      },
      {
        "id": "MedicationRequest.dispenseRequest",
        "path": "MedicationRequest.dispenseRequest",
        "min": 1
      },
      {
        "id": "MedicationRequest.dispenseRequest.validityPeriod",
        "path": "MedicationRequest.dispenseRequest.validityPeriod",
        "min": 1
      },
      {
        "id": "MedicationRequest.dispenseRequest.validityPeriod.start",
        "path": "MedicationRequest.dispenseRequest.validityPeriod.start",
        "min": 1
      },
      {
        "id": "MedicationRequest.dispenseRequest.quantity",
        "path": "MedicationRequest.dispenseRequest.quantity",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.quantity.extension",
        "path": "MedicationRequest.dispenseRequest.quantity.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.dispenseRequest.quantity.extension:quantityText",
        "path": "MedicationRequest.dispenseRequest.quantity.extension",
        "sliceName": "quantityText",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-MedicationQuantityText-1"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.expectedSupplyDuration",
        "path": "MedicationRequest.dispenseRequest.expectedSupplyDuration",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.expectedSupplyDuration.value",
        "path": "MedicationRequest.dispenseRequest.expectedSupplyDuration.value",
        "min": 1
      },
      {
        "id": "MedicationRequest.dispenseRequest.expectedSupplyDuration.comparator",
        "path": "MedicationRequest.dispenseRequest.expectedSupplyDuration.comparator",
        "max": "0"
      },
      {
        "id": "MedicationRequest.dispenseRequest.expectedSupplyDuration.system",
        "path": "MedicationRequest.dispenseRequest.expectedSupplyDuration.system",
        "min": 1,
        "fixedUri": "http://unitsofmeasure.org"
      },
      {
        "id": "MedicationRequest.dispenseRequest.expectedSupplyDuration.code",
        "path": "MedicationRequest.dispenseRequest.expectedSupplyDuration.code",
        "min": 1,
        "binding": {
          "strength": "required",
          "description": "A unit of time (units from UCUM).",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/units-of-time"
          }
        }
      },
      {
        "id": "MedicationRequest.dispenseRequest.performer",
        "path": "MedicationRequest.dispenseRequest.performer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Organization-1"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.priorPrescription",
        "path": "MedicationRequest.priorPrescription",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-MedicationRequest-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.detectedIssue",
        "path": "MedicationRequest.detectedIssue",
        "mustSupport": true
      }
    ]
  }
}