{"openapi":"3.0.3","info":{"title":"Clinical Prescription Tracker API","description":"## Overview\nUse this API for real-time tracking of Electronic Prescription Service (EPS) prescriptions. It gives details about prescription status, dispensing progress and other essential prescription information. \n\n## Who can use this API\nThis API is only available to be used by the Prescription Tracker at the moment, which is being tested with pharmacies from September 2025.\n\nThe Prescription Tracker API will be made available more widely in the future.\n\n## Access modes\nThis API only supports [user-restricted access](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis), meaning we authenticate the end user.\n\nThis API is for Healthcare worker access only and follows the [CIS2 separate authentication and authorisation](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/user-restricted-restful-apis-nhs-cis2-separate-authentication-and-authorisation).\n\n## API Status and Roadmap\nThis API is [in development](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses), meaning the API will soon be available for testing via a sandbox service or an integration environment - but we expect to make breaking changes based on developer feedback.\n\n## Service level\nThis API is a Silver Plus service, meaning it is operational and supported 24 hours a day, 365 days a year.\n\nSee [service levels](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels) for more details.\n\n## Technology\nThis API is [RESTful](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#basic-rest).\n\nIt conforms to the [FHIR](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#fhir) global standard for health care data exchange, specifically to [FHIR R4 (v4.0.1)](https://hl7.org/fhir/r4/).\n\nIt includes some country-specific FHIR extensions, which are built against FHIR UK Core, specifically [UK Core R4 (v4.0.1)](https://simplifier.net/HL7FHIRUKCoreR4/).\n\nYou do not need to know much about FHIR to use this API. The API only supports POST requests containing FHIR messages.\n\nFHIR APIs are just RESTful APIs that follow specific rules.\nThese rules mean:\n* resource names are capitalised and singular, for example `/Bundle` not `/bundle`\n* array names are singular, for example `line` not `lines` for address lines\n* data items that are country specific and not included in the FHIR global base resources are usually wrapped in an `extension` object\n\nThere are [libraries and software development kits](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir-libraries-and-sdks) available to help with FHIR API integration.\n\n## Network Access\nThis API is available on the internet. For more details see [Network access for APIs](https://digital.nhs.uk/developer/guides-and-documentation/network-access-for-apis).\n\n## Errors\nWe use standard HTTP status codes to show whether an API request succeeded or not.\nThey are usually in the range:\n\n* 200 to 299 if it succeeded, including code 202 if it was accepted by an API that needs to wait for further action\n* 400 to 499 if it failed because of a client error by your application\n* 500 to 599 if it failed because of an error on our server\n\nErrors specific to each API are shown in the Endpoints section, under Response. See our [reference guide](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#http-status-codes) for more on errors.\n\n## Open Source\nYou might find the following [open source](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#open-source) resources useful:\n\n| Resource                          | Description                                                                                                  | Links                                                                                                                                                     |\n|-----------------------------------|--------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| FHIR libraries and SDKs           | Various open source libraries for integrating with FHIR APIs.                                                | [FHIR libraries and SDKs](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir-libraries-and-sdks)              |\n| Prescription Tracker API | Source code for the Prescription Tracker API.                                                       | [GitHub](https://github.com/NHSDigital/electronic-prescription-service-clinical-prescription-tracker)                                                     |\n\n## Environment and testing\n| Environment      | Base URL                                                               |\n|------------------|------------------------------------------------------------------------|\n| Sandbox          | `https://sandbox.api.service.nhs.uk/clinical-prescription-tracker`     |\n| Integration test | `https://int.api.service.nhs.uk/clinical-prescription-tracker`         |\n| Production       | `https://api.service.nhs.uk/clinical-prescription-tracker`             |\n\n### Sandbox testing\nOur [sandbox environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#sandbox-testing):\n\n* is for early developer testing\n* only covers a limited set of scenarios\n* is stateless, so it does not actually persist any updates\n* is open access, so does not allow you to test authorisation\n\nFor details of sandbox testing, or to try out the sandbox using our \"Try this API\" feature, see the documentation for each endpoint.\n\n### Integration testing\nOur [integration test environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing):\n\n* is for formal integration testing\n* is stateful, so persists updates\n* includes authorisation, with [smartcard](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/nhs-smartcards-for-developers) and non-smartcard options\n\nFor more details see [integration testing with our RESTful APIs](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing-with-our-restful-apis).\n\n## Onboarding\nThis page will be updated with onboarding information when this API is available to be used externally.\n\n## Related APIs\n* [Electronic Prescriptions Service](https://digital.nhs.uk/developer/api-catalogue/electronic-prescription-service-fhir): the national service for creating and dispensing prescriptions across health and social care.\n* [Prescriptions for Patients](https://digital.nhs.uk/developer/api-catalogue/prescriptions-for-patients): the national service to retrieve prescriptions data for individual patients from the Electronic Prescription Service (EPS), for use in patient-facing applications.\n","contact":{"name":"Clinical Prescription Tracker API Support","url":"https://digital.nhs.uk/developer/help-and-support","email":"api.management@nhs.net"},"version":"v1.8.7-beta"},"servers":[{"url":"https://sandbox.api.service.nhs.uk/clinical-prescription-tracker"}],"paths":{"/RequestGroup":{"get":{"summary":"Prescription search","description":"## Overview\nThis returns a list of prescriptions for a given prescriptionId or nhsNumber.\n\nIt is possible that no results are returned when no prescriptions can be found that match the provided identifier.\n\nprescriptionId or nhsNumber should be provided, not both.\n","operationId":"clinical-prescription-tracker-bundle","parameters":[{"name":"prescriptionId","in":"query","description":"The Prescription ID to search prescriptions for. Please ensure to url encode this value, as + is a valid prescription ID checksum character but is a reserved character in query parameters, otherwise it will be interpreted as a space and will result in an invalid checksum error.","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string"}},{"name":"nhsNumber","in":"query","description":"The NHS Number to search prescriptions for.","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#application-restricted-apis).\n","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","format":"^Bearer\\ [[:ascii:]]+$","example":"Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM"}},{"name":"nhsd-session-urid","in":"header","description":"The user role ID (URID) for the current session. Also known as a user role profile ID (URPID).\n\nThis field is optional.\n","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"pattern":"^[0-9]+$","type":"string","example":"555254240100"}},{"name":"nhsd-organization-uuid","in":"header","description":"The users organization ID (UOID) for the current session.\n","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","example":"555254240100"}},{"name":"nhsd-session-jobrole","in":"header","description":"The users job role code for the current session.\n","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","example":"S0030:G0100:R0570"}},{"name":"X-Request-ID","in":"header","description":"A globally unique identifier (GUID) for the request, which we use to de-duplicate repeated requests and to trace the request if you contact our helpdesk.\n\nMust be a universally unique identifier (UUID) (ideally version 4).\n\nMirrored back in a response header.\n\nRequired in all environments except sandbox.\n","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","type":"string","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}},{"name":"X-Correlation-ID","in":"header","description":"An optional ID which you can use to track transactions across multiple systems. It can have any value, but we recommend avoiding `.` characters.\n\nMirrored back in a response header.\n","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}}],"responses":{"200":{"description":"Successful search.","content":{"application/fhir+json":{"schema":{"required":["resourceType","type","total","entry"],"type":"object","properties":{"resourceType":{"enum":["Bundle"],"type":"string","description":"The resource type."},"type":{"enum":["searchset"],"type":"string","description":"Indicates the purpose of this bundle - how it is intended to be used."},"total":{"type":"integer","description":"If search, the total number of matches."},"entry":{"type":"array","items":{"oneOf":[{"required":["fullUrl","search","resource"],"type":"object","properties":{"fullUrl":{"type":"string"},"search":{"required":["mode"],"type":"object","properties":{"mode":{"type":"string"}}},"resource":{"required":["resourceType","identifier","subject","status","intent","authoredOn","extension"],"type":"object","properties":{"resourceType":{"enum":["RequestGroup"],"type":"string","description":"The resource type."},"identifier":{"type":"array","items":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/prescription-order-number"],"type":"string","description":"A coded type for the identifier that can be used to determine which identifier to use for a specific purpose."},"value":{"type":"string","description":"The value that is unique."}},"description":"An identifier - identifies some entity uniquely and unambiguously."},"description":"The short form prescription ID."},"subject":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}},"description":"A reference to the patient the prescription is for."},"status":{"enum":["active","completed"],"type":"string","description":"The current state of the request. For request groups, the status reflects the status of all the requests in the group."},"intent":{"enum":["order","instance-order","reflex-order"],"type":"string","description":"Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain."},"authoredOn":{"type":"string","description":"The date the prescription was created.","format":"date-time"},"extension":{"type":"array","items":{"oneOf":[{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-EPS-PrescriptionStatusHistory"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"extension":{"type":"array","items":{"oneOf":[{"required":["url","valueCoding"],"type":"object","properties":{"url":{"enum":["status"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/EPS-task-business-status"],"type":"string","description":"Identity of the terminology system."},"code":{"enum":["0000","0001","0002","0003","0004","0005","0006","0007","0008","0009","9000","9001","9005"],"type":"string","description":"Symbol in syntax defined by the system."},"display":{"enum":["Awaiting Release Ready","To be Dispensed","With Dispenser","With Dispenser - Active","Expired","Cancelled","Dispensed","Not Dispensed","Claimed","No-Claimed","Repeat Dispense future instance","Prescription future instance","Cancelled future instance"],"type":"string","description":"Representation defined by the system."}},"description":"A reference to a code defined by a terminology system."}}},{"required":["valueCoding"],"type":"object","properties":{"url":{"enum":["cancellationReason"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/medicationrequest-status-reason"],"type":"string"},"code":{"enum":["0001","0002","0003","0004","0005","0006","0007","0008","0009"],"type":"string"},"display":{"enum":["Prescribing Error","Clinical contra-indication","Change to medication treatment regime","Clinical grounds","At the Patients request","At the Pharmacists request","Notification of Death","Patient deducted - other reason","Patient deducted - registered with new practice"],"type":"string"}}}}}]},"description":"Additional content defined by implementations."}},"description":"The prescription status."},{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation"],"type":"string"},"extension":{"type":"array","items":{"oneOf":[{"required":["url","valueInteger"],"type":"object","properties":{"url":{"enum":["numberOfRepeatsAllowed"],"type":"string"},"valueInteger":{"type":"integer"}}},{"required":["url","valueInteger"],"type":"object","properties":{"url":{"enum":["numberOfRepeatsIssued"],"type":"string"},"valueInteger":{"type":"integer"}}}]}}},"description":"Medication repeat information."},{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-PendingCancellation"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"extension":{"type":"array","items":{"oneOf":[{"required":["url","valueBoolean"],"type":"object","properties":{"url":{"enum":["prescriptionPendingCancellation"],"type":"string"},"valueBoolean":{"type":"boolean","description":"Value of 'true' or 'false'."}},"description":"Source of the definition for the extension code - a logical name or a URL."},{"required":["url","valueBoolean"],"type":"object","properties":{"url":{"enum":["lineItemPendingCancellation"],"type":"string"},"valueBoolean":{"type":"boolean","description":"Value of 'true' or 'false'."}},"description":"Source of the definition for the extension code - a logical name or a URL."}]},"description":"Additional content defined by implementations."}},"description":"Pending cancellation information"}]},"description":"Additional information related to the prescription."}},"description":"A FHIR RequestGroup representing a prescription"}}},{"required":["fullUrl","search","resource"],"type":"object","properties":{"fullUrl":{"type":"string"},"search":{"required":["mode"],"type":"object","properties":{"mode":{"type":"string"}}},"resource":{"required":["resourceType","identifier"],"type":"object","properties":{"resourceType":{"enum":["Patient"],"type":"string","description":"The resource type."},"identifier":{"maxItems":1,"minItems":1,"type":"array","items":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/nhs-number"],"type":"string"},"value":{"type":"string","description":"The value that is unique."}},"description":"An identifier - identifies some entity uniquely and unambiguously."},"description":"An identifier for this patient."},"name":{"maxItems":1,"minItems":1,"type":"array","items":{"type":"object","properties":{"prefix":{"type":"array","items":{"type":"string"},"description":"Parts that come before the name."},"suffix":{"type":"array","items":{"type":"string"},"description":"Parts that come after the name."},"given":{"type":"array","items":{"type":"string"},"description":"Given names (not always 'first'). Includes middle names."},"family":{"type":"string","description":"Family name (often called 'Surname')."}},"description":"Name of a human - parts and usage."},"description":"A name associated with the patient."}}}}}]},"description":"Entry in the bundle - will have a resource or information."}},"description":"A container for a collection of resources."}}}},"4XX":{"description":"An error occurred as follows:\n\n| HTTP status | Error code          | Description                                                                                                                               |\n| ----------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |\n| 400         | `value`             | The server was unable to process the request.                                                                                             |\n| 404         | `not-found`         | The server was unable to find the specified resource.                                                                                     |\n| 408         | `timeout`           | The server has timed out whilst processing the request.                                                                                   |\n\nAny errors will be included in the returned OperationOutcome (below).\n","content":{"application/fhir+json":{"schema":{"required":["resourceType","issue"],"type":"object","properties":{"resourceType":{"enum":["OperationOutcome"],"type":"string","description":"The resource type."},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","description":"When the resource version last changed."}},"description":"Metadata about the resource."},"issue":{"minItems":1,"type":"array","items":{"required":["code","severity","details"],"type":"object","properties":{"code":{"enum":["value","forbidden","not-found","exception","timeout"],"type":"string","description":"Error or warning code."},"severity":{"enum":["error","fatal","warning","information"],"type":"string","description":"Indicates whether the issue indicates a variation from successful processing."},"diagnostics":{"type":"string","description":"Additional diagnostic information about the issue."},"details":{"required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/http-error-codes"],"type":"string","description":"Identity of the terminology system."},"code":{"enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","REC_TIMEOUT","SERVER_ERROR","TIMEOUT"],"type":"string","description":"Symbol in syntax defined by the system."},"display":{"enum":["400: The Server was unable to process the request.","401: The Server deemed you unauthorized to make this request","403: Failed to Authenticate with the Server.","404: The Server was unable to find the specified resource.","408: The server has timed out whilst processing the request.","500: The Server has encountered an error processing the request."],"type":"string","description":"A representation of the meaning of the code in the system."}}},"description":""}},"description":"Additional details about the error."}}},"description":"An error, warning, or information message that results from a system action"}},"description":"A collection of error, warning, or information messages that result from a system action."}}}},"5XX":{"description":"An error occurred as follows:\n\n| HTTP status | Error code          | Description                                                                                                                               |\n| ----------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |\n| 500         | `exception`         | The Server has encountered an error processing the request.                                                                               |\n\nAny errors will be included in the returned OperationOutcome (below).\n","content":{"application/fhir+json":{"schema":{"required":["resourceType","issue"],"type":"object","properties":{"resourceType":{"enum":["OperationOutcome"],"type":"string","description":"The resource type."},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","description":"When the resource version last changed."}},"description":"Metadata about the resource."},"issue":{"minItems":1,"type":"array","items":{"required":["code","severity","details"],"type":"object","properties":{"code":{"enum":["value","forbidden","not-found","exception","timeout"],"type":"string","description":"Error or warning code."},"severity":{"enum":["error","fatal","warning","information"],"type":"string","description":"Indicates whether the issue indicates a variation from successful processing."},"diagnostics":{"type":"string","description":"Additional diagnostic information about the issue."},"details":{"required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/http-error-codes"],"type":"string","description":"Identity of the terminology system."},"code":{"enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","REC_TIMEOUT","SERVER_ERROR","TIMEOUT"],"type":"string","description":"Symbol in syntax defined by the system."},"display":{"enum":["400: The Server was unable to process the request.","401: The Server deemed you unauthorized to make this request","403: Failed to Authenticate with the Server.","404: The Server was unable to find the specified resource.","408: The server has timed out whilst processing the request.","500: The Server has encountered an error processing the request."],"type":"string","description":"A representation of the meaning of the code in the system."}}},"description":""}},"description":"Additional details about the error."}}},"description":"An error, warning, or information message that results from a system action"}},"description":"A collection of error, warning, or information messages that result from a system action."}}}}},"deprecated":false,"security":[{"nhs-cis2-aal3":[]}]}},"/RequestGroup/{prescriptionId}":{"get":{"summary":"Retrieve prescription details","description":"## Overview\nUse this endpoint to return the details of a prescription for a given prescriptionId.\n","operationId":"prescription-details-bundle","parameters":[{"name":"prescriptionId","in":"path","description":"The EPS Prescription ID.","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string"}},{"name":"issueNumber","in":"query","description":"The issue number of the prescription for eRDs","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful retrieval.","content":{"application/fhir+json":{"schema":{"required":["resourceType","type","total","entry"],"type":"object","properties":{"resourceType":{"enum":["Bundle"],"type":"string","description":"The resource type."},"type":{"enum":["searchset"],"type":"string","description":"Indicates the purpose of this bundle - how it is intended to be used."},"total":{"type":"integer","description":"If search, the total number of matches."},"entry":{"type":"array","items":{"oneOf":[{"required":["fullUrl","search","resource"],"type":"object","properties":{"fullUrl":{"type":"string"},"search":{"required":["mode"],"type":"object","properties":{"mode":{"type":"string"}}},"resource":{"required":["resourceType","id","identifier","intent","author","authoredOn","subject","action"],"type":"object","properties":{"resourceType":{"enum":["RequestGroup"],"type":"string","description":"The resource type."},"identifier":{"type":"array","items":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/prescription-order-number"],"type":"string","description":"A coded type for the identifier that can be used to determine which identifier to use for a specific purpose."},"value":{"type":"string","description":"The value that is unique."}},"description":"An identifier - identifies some entity uniquely and unambiguously."},"description":"The short form prescription ID."},"subject":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}},"description":"A reference to the patient the prescription is for."},"status":{"enum":["active","completed"],"type":"string","description":"The current state of the request. For request groups, the status reflects the status of all the requests in the group."},"intent":{"enum":["order","instance-order","reflex-order"],"type":"string","description":"Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain."},"authoredOn":{"type":"string","description":"The date the prescription was created.","format":"date-time"},"id":{"type":"string","description":"Logical id of this artifact"},"author":{"type":"object","properties":{"identifier":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/ods-organization-code"],"type":"string"},"value":{"type":"string"}}}},"description":"The ODS code of the organization that authored the prescription."},"extension":{"type":"array","items":{"oneOf":[{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-EPS-PrescriptionStatusHistory"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"extension":{"type":"array","items":{"oneOf":[{"required":["url","valueCoding"],"type":"object","properties":{"url":{"enum":["status"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/EPS-task-business-status"],"type":"string","description":"Identity of the terminology system."},"code":{"enum":["0000","0001","0002","0003","0004","0005","0006","0007","0008","0009","9000","9001","9005"],"type":"string","description":"Symbol in syntax defined by the system."},"display":{"enum":["Awaiting Release Ready","To be Dispensed","With Dispenser","With Dispenser - Active","Expired","Cancelled","Dispensed","Not Dispensed","Claimed","No-Claimed","Repeat Dispense future instance","Prescription future instance","Cancelled future instance"],"type":"string","description":"Representation defined by the system."}},"description":"A reference to a code defined by a terminology system."}}},{"required":["valueCoding"],"type":"object","properties":{"url":{"enum":["cancellationReason"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/medicationrequest-status-reason"],"type":"string"},"code":{"enum":["0001","0002","0003","0004","0005","0006","0007","0008","0009"],"type":"string"},"display":{"enum":["Prescribing Error","Clinical contra-indication","Change to medication treatment regime","Clinical grounds","At the Patients request","At the Pharmacists request","Notification of Death","Patient deducted - other reason","Patient deducted - registered with new practice"],"type":"string"}}}}}]},"description":"Additional content defined by implementations."}},"description":"The prescription status."},{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation"],"type":"string"},"extension":{"type":"array","items":{"oneOf":[{"required":["url","valueInteger"],"type":"object","properties":{"url":{"enum":["numberOfRepeatsAllowed"],"type":"string"},"valueInteger":{"type":"integer"}}},{"required":["url","valueInteger"],"type":"object","properties":{"url":{"enum":["numberOfRepeatsIssued"],"type":"string"},"valueInteger":{"type":"integer"}}}]}}},"description":"Medication repeat information."},{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-PendingCancellation"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"extension":{"type":"array","items":{"oneOf":[{"required":["url","valueBoolean"],"type":"object","properties":{"url":{"enum":["prescriptionPendingCancellation"],"type":"string"},"valueBoolean":{"type":"boolean","description":"Value of 'true' or 'false'."}},"description":"Source of the definition for the extension code - a logical name or a URL."},{"required":["url","valueBoolean"],"type":"object","properties":{"url":{"enum":["lineItemPendingCancellation"],"type":"string"},"valueBoolean":{"type":"boolean","description":"Value of 'true' or 'false'."}},"description":"Source of the definition for the extension code - a logical name or a URL."}]},"description":"Additional content defined by implementations."}},"description":"Pending cancellation information"},{"required":["url","valueCoding"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionType"],"type":"string"},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/prescription-type"],"type":"string"},"code":{"enum":["0101","0104","0105","0108","0113","0114","0116","0117","0124","0125","1001","1004","1005","1008","1013","1014","1016","1017","1024","1025","0201","0204","0205","0208","0213","0214","0216","0217","0224","0225","2001","2004","2005","2008","2013","2014","2016","2017","2024","2025","0501","0504","0505","0508","0513","0514","0516","0517","0524","0525","5001","5004","5005","5008","5013","5014","5016","5017","5024","5025"],"type":"string"},"display":{"enum":["Primary Care Prescriber - Medical Prescriber","Primary Care Prescriber - Nurse Independent/Supplementary prescriber","Primary Care Prescriber - Community Practitioner Nurse prescriber","Primary Care Prescriber - Pharmacist Independent/Supplementary prescriber","Primary Care Prescriber - Optometrist Independent/Supplementary prescriber","Primary Care Prescriber - Podiatrist/Chiropodist Independent/Supplementary prescriber","Primary Care Prescriber - Radiographer Independent/Supplementary prescribe","Primary Care Prescriber - Physiotherapist Independent/Supplementary prescriber","Primary Care Prescriber - Dietician Supplementary prescriber","Primary Care Prescriber - Paramedic Independent/Supplementary prescriber","Outpatient Community Prescriber - Medical Prescriber","Outpatient Community Prescriber - Nurse Independent/Supplementary prescribe","Outpatient Community Prescriber - Community Practitioner Nurse prescriber","Outpatient Community Prescriber - Pharmacist Independent/Supplementary prescribe","Outpatient Community Prescriber - Optometrist Independent/Supplementary prescriber","Outpatient Community Prescriber - Podiatrist/Chiropodist Independent/Supplementary","Outpatient Community Prescriber - Radiographer Independent/Supplementary prescriber","Outpatient Community Prescriber - Physiotherapist Independent/Supplementary prescriber","Outpatient Community Prescriber - Dietician Supplementary prescriber","Outpatient Community Prescriber - Paramedic Independent/Supplementary prescriber","Primary Care Prescriber - Medical Prescriber (Wales)","Primary Care Prescriber - Nurse Independent/Supplementary prescriber (Wales)","Primary Care Prescriber - Community Practitioner Nurse prescriber (Wales)","Primary Care Prescriber - Pharmacist Independent/Supplementary prescriber (Wales)","Primary Care Prescriber - Optometrist Independent/Supplementary prescriber (Wales)","Primary Care Prescriber - Podiatrist/Chiropodist Independent/Supplementary prescriber (Wales)","Primary Care Prescriber - Radiographer Independent/Supplementary prescriber (Wales)","Primary Care Prescriber - Physiotherapist Independent/Supplementary prescriber (Wales)","Primary Care Prescriber - Dietician Supplementary prescriber (Wales)","Primary Care Prescriber - Paramedic Independent/Supplementary prescriber (Wales)","Outpatient Community Prescriber - Medical Prescriber (Wales)","Outpatient Community Prescriber - Nurse Independent/Supplementary prescriber (Wales)","Outpatient Community Prescriber - Community Practitioner Nurse prescriber (Wales)","Outpatient Community Prescriber - Pharmacist Independent/Supplementary prescriber (Wales)","Outpatient Community Prescriber - Optometrist Independent/Supplementary prescriber (Wales)","Outpatient Community Prescriber - Podiatrist/Chiropodist Independent/Supplementary (Wales)","Outpatient Community Prescriber - Radiographer Independent/Supplementary prescriber (Wales)","Outpatient Community Prescriber - Physiotherapist Independent/Supplementary prescriber (Wales)","Outpatient Community Prescriber - Dietician Supplementary prescriber (Wales)","Outpatient Community Prescriber - Paramedic Independent/Supplementary prescriber (Wales)","Primary Care Prescriber - Medical Prescriber (IOM)","Primary Care Prescriber - Nurse Independent/Supplementary prescriber (IOM)","Primary Care Prescriber - Community Practitioner Nurse prescriber (IOM)","Primary Care Prescriber - Pharmacist Independent/Supplementary prescriber (IOM)","Primary Care Prescriber - Optometrist Independent/Supplementary prescriber (IOM)","Primary Care Prescriber - Podiatrist/Chiropodist Independent/Supplementary prescriber (IOM)","Primary Care Prescriber - Radiographer Independent/Supplementary prescriber (IOM)","Primary Care Prescriber - Physiotherapist Independent/Supplementary prescriber (IOM)","Primary Care Prescriber - Dietician Supplementary prescriber (IOM)","Primary Care Prescriber - Paramedic Independent/Supplementary prescriber (IOM)","Outpatient Community Prescriber - Medical Prescriber (IOM)","Outpatient Community Prescriber - Nurse Independent/Supplementary prescriber (IOM)","Outpatient Community Prescriber - Community Practitioner Nurse prescriber (IOM)","Outpatient Community Prescriber - Pharmacist Independent/Supplementary prescriber (IOM)","Outpatient Community Prescriber - Optometrist Independent/Supplementary prescriber (IOM)","Outpatient Community Prescriber - Podiatrist/Chiropodist Independent/Supplementary (IOM)","Outpatient Community Prescriber - Radiographer Independent/Supplementary prescriber (IOM)","Outpatient Community Prescriber - Physiotherapist Independent/Supplementary prescriber (IOM)","Outpatient Community Prescriber - Dietician Supplementary prescriber (IOM)","Outpatient Community Prescriber - Paramedic Independent/Supplementary prescriber (IOM)"],"type":"string"}}}}},{"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionNonDispensingReason"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/medicationdispense-status-reason"],"type":"string"},"code":{"enum":["0001","0002","0003","0004","0005","0006","0007","0008","0009","0010","0011"],"type":"string"},"display":{"enum":["Not required as instructed by the patient","Clinically unsuitable","Owings note issued to patient","Prescription cancellation","Prescription cancellation due to death","Illegal NHS prescription","Prescribed out of scope item","Item or prescription expired","Not allowed on FP10","Patient did not collect medication","Patient purchased medication over the counter"],"type":"string"}}}},"description":"The prescription non dispensing reason"}]},"description":"Additional information related to the prescription."},"action":{"type":"array","items":{"oneOf":[{"required":["title","action"],"type":"object","properties":{"title":{"enum":["Prescription Line Items(Medications)"],"type":"string"},"timingTiming":{"required":["repeat"],"type":"object","properties":{"repeat":{"required":["frequency","period","periodUnit"],"type":"object","properties":{"frequency":{"enum":[1],"type":"integer"},"period":{"type":"integer"},"periodUnit":{"enum":["d"],"type":"string"}}}}},"action":{"type":"array","items":{"required":["resource"],"type":"object","properties":{"resource":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}}}}}}}},{"required":["title","action"],"type":"object","properties":{"title":{"enum":["Prescription status transitions"],"type":"string"},"action":{"type":"array","items":{"required":["title","timingDateTime","code","participant"],"type":"object","properties":{"title":{"enum":["Prescription upload successful","Release Request successful","Nominated Release Request successful","Dispense notification successful","Dispense claim successful","Prescription Reset request successful","Administrative update successful","Administrative Action Update Successful","Prescription/item was cancelled","Prescription/item was not cancelled. With dispenser. Marked for cancellation","Subsequent cancellation","Dispense proposal return successful","Dispense Withdrawal successful","Rebuild Dispense History successful","Updated by Urgent Admin Batch worker","Updated by Routine Admin Batch worker","Updated by Non-Urgent Admin Batch worker","Updated by Document Batch worker"],"type":"string"},"timingDateTime":{"type":"string","format":"date-time"},"code":{"type":"array","items":{"oneOf":[{"required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/EPS-task-business-status"],"type":"string","description":"Identity of the terminology system."},"code":{"enum":["0000","0001","0002","0003","0004","0005","0006","0007","0008","0009","9000","9001","9005"],"type":"string","description":"Symbol in syntax defined by the system."},"display":{"enum":["Awaiting Release Ready","To be Dispensed","With Dispenser","With Dispenser - Active","Expired","Cancelled","Dispensed","Not Dispensed","Claimed","No-Claimed","Repeat Dispense future instance","Prescription future instance","Cancelled future instance"],"type":"string","description":"Representation defined by the system."}},"description":"A reference to a code defined by a terminology system."}}}},{"required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"required":["system","code"],"type":"object","properties":{"system":{"enum":["https://tools.ietf.org/html/rfc4122"],"type":"string"},"code":{"type":"string"}}}}}}]}},"participant":{"type":"array","items":{"required":["extension"],"type":"object","properties":{"extension":{"type":"array","items":{"required":["url","valueReference"],"type":"object","properties":{"url":{"enum":["http://hl7.org/fhir/5.0/StructureDefinition/extension-RequestOrchestration.action.participant.typeReference"],"type":"string"},"valueReference":{"required":["identifier"],"type":"object","properties":{"identifier":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/ods-organization-code"],"type":"string"},"value":{"type":"string"}}}}}}}}}}},"action":{"type":"array","items":{"required":["resource"],"type":"object","properties":{"resource":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}}}}}}}}}}}]}}},"description":"A FHIR RequestGroup representing a prescription."}}},{"required":["fullUrl","search","resource"],"type":"object","properties":{"fullUrl":{"type":"string"},"search":{"required":["mode"],"type":"object","properties":{"mode":{"type":"string"}}},"resource":{"required":["resourceType","id","identifier","gender","birthDate"],"type":"object","properties":{"resourceType":{"enum":["Patient"],"type":"string","description":"The resource type."},"identifier":{"maxItems":1,"minItems":1,"type":"array","items":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/nhs-number"],"type":"string"},"value":{"type":"string","description":"The value that is unique."}},"description":"An identifier - identifies some entity uniquely and unambiguously."},"description":"An identifier for this patient."},"name":{"maxItems":1,"minItems":1,"type":"array","items":{"type":"object","properties":{"prefix":{"type":"array","items":{"type":"string"},"description":"Parts that come before the name."},"suffix":{"type":"array","items":{"type":"string"},"description":"Parts that come after the name."},"given":{"type":"array","items":{"type":"string"},"description":"Given names (not always 'first'). Includes middle names."},"family":{"type":"string","description":"Family name (often called 'Surname')."}},"description":"Name of a human - parts and usage."},"description":"A name associated with the patient."},"id":{"type":"string"},"gender":{"enum":["male","female","other","unknown"],"type":"string"},"birthDate":{"type":"string","format":"date"},"address":{"type":"array","items":{"required":["text","type","use"],"type":"object","properties":{"line":{"type":"array","items":{"type":"string"}},"city":{"type":"string"},"district":{"type":"string"},"postalCode":{"type":"string"},"text":{"type":"string"},"type":{"enum":["both"],"type":"string"},"use":{"enum":["home"],"type":"string"}}}}}}}},{"required":["fullUrl","search","resource"],"type":"object","properties":{"fullUrl":{"type":"string"},"search":{"required":["mode"],"type":"object","properties":{"mode":{"type":"string"}}},"resource":{"required":["resourceType","id","identifier","subject","status","intent","requester","groupIdentifier","medicationCodeableConcept","courseOfTherapyType","dispenseRequest","dosageInstruction","substitution","extension"],"type":"object","properties":{"resourceType":{"enum":["MedicationRequest"],"type":"string","description":"The resource type."},"id":{"type":"string","description":"Temporary id for this resource within the context of this request (not related to longer term identifiers such as short-form prescription id)"},"identifier":{"type":"array","items":{"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/prescription-order-item-number"],"type":"string"},"value":{"type":"string"}}}},"subject":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}},"description":"A reference to the patient the prescription is for."},"status":{"enum":["active","cancelled","completed","stopped"],"type":"string"},"statusReason":{"required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/medicationrequest-status-reason"],"type":"string"},"code":{"enum":["0001","0002","0003","0004","0005","0006","0007","0008","0009"],"type":"string"},"display":{"enum":["Prescribing Error","Clinical contra-indication","Change to medication treatment regime","Clinical grounds","At the Patients request","At the Pharmacists request","Notification of Death","Patient deducted - other reason","Patient deducted - registered with new practice"],"type":"string"}}}}}},"intent":{"enum":["order","instance-order","reflex-order"],"type":"string","description":"Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain."},"requester":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}}},"performer":{"required":["identifier"],"type":"object","properties":{"identifier":{"type":"array","items":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/ods-organization-code"],"type":"string"},"value":{"type":"string"}}}}}},"groupIdentifier":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/prescription-order-number"],"type":"string"},"value":{"type":"string"}}},"medicationCodeableConcept":{"required":["text"],"type":"object","properties":{"text":{"type":"string"}}},"courseOfTherapyType":{"required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["http://terminology.hl7.org/CodeSystem/medicationrequest-course-of-therapy"],"type":"string"},"code":{"enum":["acute","continuous","continuous-repeat-dispensing"],"type":"string"},"display":{"enum":["Short course (acute) therapy","Continuous long term therapy","Continuous long term (repeat dispensing)"],"type":"string"}}}}}},"dispenseRequest":{"required":["quantity"],"type":"object","properties":{"quantity":{"required":["value","unit"],"type":"object","properties":{"value":{"type":"integer"},"unit":{"type":"string"}}},"performer":{"required":["identifier"],"type":"object","properties":{"identifier":{"type":"array","items":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/ods-organization-code"],"type":"string"},"value":{"type":"string"}}}}}},"extension":{"type":"array","items":{"required":["url","valueCoding"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-DM-PerformerSiteType"],"type":"string"},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/dispensing-site-preference"],"type":"string"},"code":{"enum":["P1","P2","P3","0004"],"type":"string"},"display":{"enum":["Other (e.g. Community Pharmacy)","Appliance Contractor","Dispensing Doctor","None"],"type":"string"}}}}}}}},"dosageInstruction":{"type":"array","items":{"required":["text"],"type":"object","properties":{"text":{"type":"string"}}}},"substitution":{"required":["allowedBoolean"],"type":"object","properties":{"allowedBoolean":{"enum":[false],"type":"boolean"}}},"extension":{"type":"array","items":{"oneOf":[{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-EPS-DispensingInformation"],"type":"string"},"extension":{"type":"array","items":{"required":["url","valueCoding"],"type":"object","properties":{"url":{"enum":["dispenseStatus"],"type":"string"},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/medicationdispense-type"],"type":"string"},"code":{"enum":["0001","0002","0003","0004","0005","0006","0007","0008"],"type":"string"},"display":{"enum":["Item fully dispensed","Item not dispensed","Item dispensed - partial","Item not dispensed - owing","Item Cancelled","Expired","Item to be dispensed","Item with dispenser"],"type":"string"}}}}}}}},{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-PendingCancellation"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"extension":{"type":"array","items":{"oneOf":[{"required":["url","valueBoolean"],"type":"object","properties":{"url":{"enum":["prescriptionPendingCancellation"],"type":"string"},"valueBoolean":{"type":"boolean","description":"Value of 'true' or 'false'."}},"description":"Source of the definition for the extension code - a logical name or a URL."},{"required":["url","valueBoolean"],"type":"object","properties":{"url":{"enum":["lineItemPendingCancellation"],"type":"string"},"valueBoolean":{"type":"boolean","description":"Value of 'true' or 'false'."}},"description":"Source of the definition for the extension code - a logical name or a URL."}]},"description":"Additional content defined by implementations."}},"description":"Pending cancellation information"},{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionStatusHistory"],"type":"string"},"extension":{"type":"array","items":{"oneOf":[{"required":["url","valueCoding"],"type":"object","properties":{"url":{"enum":["status"],"type":"string"},"valueCoding":{"required":["system","code"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/task-businessStatus-nppt"],"type":"string"},"code":{"enum":["With Pharmacy","With Pharmacy - Preparing Remainder","Ready to Collect","Ready to Collect - Partial","Collected","Dispatched","Not Dispensed","Ready to Dispatch","Ready to Dispatch - Partial"],"type":"string"}}}}},{"required":["url","valueDateTime"],"type":"object","properties":{"url":{"enum":["statusDate"],"type":"string"},"valueDateTime":{"type":"string","format":"date-time"}}}]}}}}]}}}}}},{"required":["fullUrl","search","resource"],"type":"object","properties":{"fullUrl":{"type":"string"},"search":{"required":["mode"],"type":"object","properties":{"mode":{"type":"string"}}},"resource":{"required":["resourceType","id","identifier","subject","status","performer","type","authorizingPrescription","medicationCodeableConcept","quantity","extension"],"type":"object","properties":{"resourceType":{"enum":["MedicationDispense"],"type":"string","description":"The resource type."},"id":{"type":"string","description":"Temporary id for this resource within the context of this request (not related to longer term identifiers such as short-form prescription id)"},"identifier":{"type":"array","items":{"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/prescription-order-item-number"],"type":"string"},"value":{"type":"string"}}}},"subject":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}},"description":"A reference to the patient the prescription is for."},"status":{"enum":["in-progress","unknown"],"type":"string"},"statusReasonCodeableConcept":{"required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/medicationdispense-status-reason"],"type":"string"},"code":{"enum":["0001","0002","0003","0004","0005","0006","0007","0008","0009","0010","0011"],"type":"string"},"display":{"enum":["Not required as instructed by the patient","Clinically unsuitable","Owings note issued to patient","Prescription cancellation","Prescription cancellation due to death","Illegal NHS prescription","Prescribed out of scope item","Item or prescription expired","Not allowed on FP10","Patient did not collect medication","Patient purchased medication over the counter"],"type":"string"}}}}}},"performer":{"type":"array","items":{"required":["actor"],"type":"object","properties":{"actor":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}}}}}},"type":{"type":"object","properties":{"coding":{"type":"array","items":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/medicationdispense-type"],"type":"string"},"code":{"enum":["0001","0002","0003","0004","0005","0006","0007","0008"],"type":"string"},"display":{"enum":["Item fully dispensed","Item not dispensed","Item dispensed - partial","Item not dispensed - owing","Item Cancelled","Expired","Item to be dispensed","Item with dispenser"],"type":"string"}}}}}},"authorizingPrescription":{"type":"array","items":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}}}},"medicationCodeableConcept":{"required":["text"],"type":"object","properties":{"text":{"type":"string"}}},"quantity":{"required":["value","unit"],"type":"object","properties":{"value":{"type":"integer"},"unit":{"type":"string"}}},"dosageInstruction":{"type":"array","items":{"required":["text"],"type":"object","properties":{"text":{"type":"string"}}}},"extension":{"type":"array","items":{"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-EPS-TaskBusinessStatus"],"type":"string"},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/EPS-task-business-status"],"type":"string","description":"Identity of the terminology system."},"code":{"enum":["0000","0001","0002","0003","0004","0005","0006","0007","0008","0009","9000","9001","9005"],"type":"string","description":"Symbol in syntax defined by the system."},"display":{"enum":["Awaiting Release Ready","To be Dispensed","With Dispenser","With Dispenser - Active","Expired","Cancelled","Dispensed","Not Dispensed","Claimed","No-Claimed","Repeat Dispense future instance","Prescription future instance","Cancelled future instance"],"type":"string","description":"Representation defined by the system."}},"description":"A reference to a code defined by a terminology system."}},"description":"The prescription status."}}}}}},{"required":["fullUrl","search","resource"],"type":"object","properties":{"fullUrl":{"type":"string"},"search":{"required":["mode"],"type":"object","properties":{"mode":{"type":"string"}}},"resource":{"required":["resourceType","id","organization"],"type":"object","properties":{"resourceType":{"enum":["PractitionerRole"],"type":"string","description":"The resource type."},"id":{"type":"string"},"organization":{"required":["identifier"],"type":"object","properties":{"identifier":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/ods-organization-code"],"type":"string"},"value":{"type":"string"}}}}}}}}}]},"description":"Entry in the bundle - will have a resource or information."}},"description":"A container for a collection of resources."}}}},"4XX":{"description":"An error occurred as follows:\n\n| HTTP status | Error code          | Description                                                                                               |\n| ----------- | ------------------- | ----------------------------------------------------------------------------------------------------------|\n| 400         | `value`             | Missing values or invalid JSON in request.                                                                |\n| 401         | `processing`        | Missing or invalid OAuth 2.0 bearer token in request.                                                     |\n| 404         | `not-found`         | Prescription not found.                                                                                   |\n| 408         | `timeout`           | Request timed out.                                                                                        |\n\nThe error code will be included in the returned OperationOutcome (below).\n","content":{"application/fhir+json":{"schema":{"required":["resourceType","issue"],"type":"object","properties":{"resourceType":{"enum":["OperationOutcome"],"type":"string","description":"The resource type."},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","description":"When the resource version last changed."}},"description":"Metadata about the resource."},"issue":{"minItems":1,"type":"array","items":{"required":["code","severity","details"],"type":"object","properties":{"code":{"enum":["value","forbidden","not-found","exception","timeout"],"type":"string","description":"Error or warning code."},"severity":{"enum":["error","fatal","warning","information"],"type":"string","description":"Indicates whether the issue indicates a variation from successful processing."},"diagnostics":{"type":"string","description":"Additional diagnostic information about the issue."},"details":{"required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/http-error-codes"],"type":"string","description":"Identity of the terminology system."},"code":{"enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","REC_TIMEOUT","SERVER_ERROR","TIMEOUT"],"type":"string","description":"Symbol in syntax defined by the system."},"display":{"enum":["400: The Server was unable to process the request.","401: The Server deemed you unauthorized to make this request","403: Failed to Authenticate with the Server.","404: The Server was unable to find the specified resource.","408: The server has timed out whilst processing the request.","500: The Server has encountered an error processing the request."],"type":"string","description":"A representation of the meaning of the code in the system."}}},"description":""}},"description":"Additional details about the error."}}},"description":"An error, warning, or information message that results from a system action"}},"description":"A collection of error, warning, or information messages that result from a system action."}}}},"5XX":{"description":"An error occurred as follows:\n\n| HTTP status | Error code          | Description                                                                                                                               |\n| ----------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |\n| 500         | `exception`         | The Server has encountered an error processing the request.                                                                               |\n\nAny errors will be included in the returned OperationOutcome (below).\n","content":{"application/fhir+json":{"schema":{"required":["resourceType","issue"],"type":"object","properties":{"resourceType":{"enum":["OperationOutcome"],"type":"string","description":"The resource type."},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","description":"When the resource version last changed."}},"description":"Metadata about the resource."},"issue":{"minItems":1,"type":"array","items":{"required":["code","severity","details"],"type":"object","properties":{"code":{"enum":["value","forbidden","not-found","exception","timeout"],"type":"string","description":"Error or warning code."},"severity":{"enum":["error","fatal","warning","information"],"type":"string","description":"Indicates whether the issue indicates a variation from successful processing."},"diagnostics":{"type":"string","description":"Additional diagnostic information about the issue."},"details":{"required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/http-error-codes"],"type":"string","description":"Identity of the terminology system."},"code":{"enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","REC_TIMEOUT","SERVER_ERROR","TIMEOUT"],"type":"string","description":"Symbol in syntax defined by the system."},"display":{"enum":["400: The Server was unable to process the request.","401: The Server deemed you unauthorized to make this request","403: Failed to Authenticate with the Server.","404: The Server was unable to find the specified resource.","408: The server has timed out whilst processing the request.","500: The Server has encountered an error processing the request."],"type":"string","description":"A representation of the meaning of the code in the system."}}},"description":""}},"description":"Additional details about the error."}}},"description":"An error, warning, or information message that results from a system action"}},"description":"A collection of error, warning, or information messages that result from a system action."}}}}},"deprecated":false,"security":[{"nhs-cis2-aal3":[]}]}}},"components":{"schemas":{"prescriptionSearchBundle":{"required":["resourceType","type","total","entry"],"type":"object","properties":{"resourceType":{"enum":["Bundle"],"type":"string","description":"The resource type."},"type":{"enum":["searchset"],"type":"string","description":"Indicates the purpose of this bundle - how it is intended to be used."},"total":{"type":"integer","description":"If search, the total number of matches."},"entry":{"type":"array","items":{"oneOf":[{"required":["fullUrl","search","resource"],"type":"object","properties":{"fullUrl":{"type":"string"},"search":{"required":["mode"],"type":"object","properties":{"mode":{"type":"string"}}},"resource":{"required":["resourceType","identifier","subject","status","intent","authoredOn","extension"],"type":"object","properties":{"resourceType":{"enum":["RequestGroup"],"type":"string","description":"The resource type."},"identifier":{"type":"array","items":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/prescription-order-number"],"type":"string","description":"A coded type for the identifier that can be used to determine which identifier to use for a specific purpose."},"value":{"type":"string","description":"The value that is unique."}},"description":"An identifier - identifies some entity uniquely and unambiguously."},"description":"The short form prescription ID."},"subject":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}},"description":"A reference to the patient the prescription is for."},"status":{"enum":["active","completed"],"type":"string","description":"The current state of the request. For request groups, the status reflects the status of all the requests in the group."},"intent":{"enum":["order","instance-order","reflex-order"],"type":"string","description":"Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain."},"authoredOn":{"type":"string","description":"The date the prescription was created.","format":"date-time"},"extension":{"type":"array","items":{"oneOf":[{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-EPS-PrescriptionStatusHistory"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"extension":{"type":"array","items":{"oneOf":[{"required":["url","valueCoding"],"type":"object","properties":{"url":{"enum":["status"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/EPS-task-business-status"],"type":"string","description":"Identity of the terminology system."},"code":{"enum":["0000","0001","0002","0003","0004","0005","0006","0007","0008","0009","9000","9001","9005"],"type":"string","description":"Symbol in syntax defined by the system."},"display":{"enum":["Awaiting Release Ready","To be Dispensed","With Dispenser","With Dispenser - Active","Expired","Cancelled","Dispensed","Not Dispensed","Claimed","No-Claimed","Repeat Dispense future instance","Prescription future instance","Cancelled future instance"],"type":"string","description":"Representation defined by the system."}},"description":"A reference to a code defined by a terminology system."}}},{"required":["valueCoding"],"type":"object","properties":{"url":{"enum":["cancellationReason"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/medicationrequest-status-reason"],"type":"string"},"code":{"enum":["0001","0002","0003","0004","0005","0006","0007","0008","0009"],"type":"string"},"display":{"enum":["Prescribing Error","Clinical contra-indication","Change to medication treatment regime","Clinical grounds","At the Patients request","At the Pharmacists request","Notification of Death","Patient deducted - other reason","Patient deducted - registered with new practice"],"type":"string"}}}}}]},"description":"Additional content defined by implementations."}},"description":"The prescription status."},{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation"],"type":"string"},"extension":{"type":"array","items":{"oneOf":[{"required":["url","valueInteger"],"type":"object","properties":{"url":{"enum":["numberOfRepeatsAllowed"],"type":"string"},"valueInteger":{"type":"integer"}}},{"required":["url","valueInteger"],"type":"object","properties":{"url":{"enum":["numberOfRepeatsIssued"],"type":"string"},"valueInteger":{"type":"integer"}}}]}}},"description":"Medication repeat information."},{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-PendingCancellation"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"extension":{"type":"array","items":{"oneOf":[{"required":["url","valueBoolean"],"type":"object","properties":{"url":{"enum":["prescriptionPendingCancellation"],"type":"string"},"valueBoolean":{"type":"boolean","description":"Value of 'true' or 'false'."}},"description":"Source of the definition for the extension code - a logical name or a URL."},{"required":["url","valueBoolean"],"type":"object","properties":{"url":{"enum":["lineItemPendingCancellation"],"type":"string"},"valueBoolean":{"type":"boolean","description":"Value of 'true' or 'false'."}},"description":"Source of the definition for the extension code - a logical name or a URL."}]},"description":"Additional content defined by implementations."}},"description":"Pending cancellation information"}]},"description":"Additional information related to the prescription."}},"description":"A FHIR RequestGroup representing a prescription"}}},{"required":["fullUrl","search","resource"],"type":"object","properties":{"fullUrl":{"type":"string"},"search":{"required":["mode"],"type":"object","properties":{"mode":{"type":"string"}}},"resource":{"required":["resourceType","identifier"],"type":"object","properties":{"resourceType":{"enum":["Patient"],"type":"string","description":"The resource type."},"identifier":{"maxItems":1,"minItems":1,"type":"array","items":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/nhs-number"],"type":"string"},"value":{"type":"string","description":"The value that is unique."}},"description":"An identifier - identifies some entity uniquely and unambiguously."},"description":"An identifier for this patient."},"name":{"maxItems":1,"minItems":1,"type":"array","items":{"type":"object","properties":{"prefix":{"type":"array","items":{"type":"string"},"description":"Parts that come before the name."},"suffix":{"type":"array","items":{"type":"string"},"description":"Parts that come after the name."},"given":{"type":"array","items":{"type":"string"},"description":"Given names (not always 'first'). Includes middle names."},"family":{"type":"string","description":"Family name (often called 'Surname')."}},"description":"Name of a human - parts and usage."},"description":"A name associated with the patient."}}}}}]},"description":"Entry in the bundle - will have a resource or information."}},"description":"A container for a collection of resources."},"operationOutcome":{"required":["resourceType","issue"],"type":"object","properties":{"resourceType":{"enum":["OperationOutcome"],"type":"string","description":"The resource type."},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","description":"When the resource version last changed."}},"description":"Metadata about the resource."},"issue":{"minItems":1,"type":"array","items":{"required":["code","severity","details"],"type":"object","properties":{"code":{"enum":["value","forbidden","not-found","exception","timeout"],"type":"string","description":"Error or warning code."},"severity":{"enum":["error","fatal","warning","information"],"type":"string","description":"Indicates whether the issue indicates a variation from successful processing."},"diagnostics":{"type":"string","description":"Additional diagnostic information about the issue."},"details":{"required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/http-error-codes"],"type":"string","description":"Identity of the terminology system."},"code":{"enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","REC_TIMEOUT","SERVER_ERROR","TIMEOUT"],"type":"string","description":"Symbol in syntax defined by the system."},"display":{"enum":["400: The Server was unable to process the request.","401: The Server deemed you unauthorized to make this request","403: Failed to Authenticate with the Server.","404: The Server was unable to find the specified resource.","408: The server has timed out whilst processing the request.","500: The Server has encountered an error processing the request."],"type":"string","description":"A representation of the meaning of the code in the system."}}},"description":""}},"description":"Additional details about the error."}}},"description":"An error, warning, or information message that results from a system action"}},"description":"A collection of error, warning, or information messages that result from a system action."},"clinicalViewBundle":{"required":["resourceType","type","total","entry"],"type":"object","properties":{"resourceType":{"enum":["Bundle"],"type":"string","description":"The resource type."},"type":{"enum":["searchset"],"type":"string","description":"Indicates the purpose of this bundle - how it is intended to be used."},"total":{"type":"integer","description":"If search, the total number of matches."},"entry":{"type":"array","items":{"oneOf":[{"required":["fullUrl","search","resource"],"type":"object","properties":{"fullUrl":{"type":"string"},"search":{"required":["mode"],"type":"object","properties":{"mode":{"type":"string"}}},"resource":{"required":["resourceType","id","identifier","intent","author","authoredOn","subject","action"],"type":"object","properties":{"resourceType":{"enum":["RequestGroup"],"type":"string","description":"The resource type."},"identifier":{"type":"array","items":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/prescription-order-number"],"type":"string","description":"A coded type for the identifier that can be used to determine which identifier to use for a specific purpose."},"value":{"type":"string","description":"The value that is unique."}},"description":"An identifier - identifies some entity uniquely and unambiguously."},"description":"The short form prescription ID."},"subject":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}},"description":"A reference to the patient the prescription is for."},"status":{"enum":["active","completed"],"type":"string","description":"The current state of the request. For request groups, the status reflects the status of all the requests in the group."},"intent":{"enum":["order","instance-order","reflex-order"],"type":"string","description":"Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain."},"authoredOn":{"type":"string","description":"The date the prescription was created.","format":"date-time"},"id":{"type":"string","description":"Logical id of this artifact"},"author":{"type":"object","properties":{"identifier":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/ods-organization-code"],"type":"string"},"value":{"type":"string"}}}},"description":"The ODS code of the organization that authored the prescription."},"extension":{"type":"array","items":{"oneOf":[{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-EPS-PrescriptionStatusHistory"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"extension":{"type":"array","items":{"oneOf":[{"required":["url","valueCoding"],"type":"object","properties":{"url":{"enum":["status"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/EPS-task-business-status"],"type":"string","description":"Identity of the terminology system."},"code":{"enum":["0000","0001","0002","0003","0004","0005","0006","0007","0008","0009","9000","9001","9005"],"type":"string","description":"Symbol in syntax defined by the system."},"display":{"enum":["Awaiting Release Ready","To be Dispensed","With Dispenser","With Dispenser - Active","Expired","Cancelled","Dispensed","Not Dispensed","Claimed","No-Claimed","Repeat Dispense future instance","Prescription future instance","Cancelled future instance"],"type":"string","description":"Representation defined by the system."}},"description":"A reference to a code defined by a terminology system."}}},{"required":["valueCoding"],"type":"object","properties":{"url":{"enum":["cancellationReason"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/medicationrequest-status-reason"],"type":"string"},"code":{"enum":["0001","0002","0003","0004","0005","0006","0007","0008","0009"],"type":"string"},"display":{"enum":["Prescribing Error","Clinical contra-indication","Change to medication treatment regime","Clinical grounds","At the Patients request","At the Pharmacists request","Notification of Death","Patient deducted - other reason","Patient deducted - registered with new practice"],"type":"string"}}}}}]},"description":"Additional content defined by implementations."}},"description":"The prescription status."},{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation"],"type":"string"},"extension":{"type":"array","items":{"oneOf":[{"required":["url","valueInteger"],"type":"object","properties":{"url":{"enum":["numberOfRepeatsAllowed"],"type":"string"},"valueInteger":{"type":"integer"}}},{"required":["url","valueInteger"],"type":"object","properties":{"url":{"enum":["numberOfRepeatsIssued"],"type":"string"},"valueInteger":{"type":"integer"}}}]}}},"description":"Medication repeat information."},{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-PendingCancellation"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"extension":{"type":"array","items":{"oneOf":[{"required":["url","valueBoolean"],"type":"object","properties":{"url":{"enum":["prescriptionPendingCancellation"],"type":"string"},"valueBoolean":{"type":"boolean","description":"Value of 'true' or 'false'."}},"description":"Source of the definition for the extension code - a logical name or a URL."},{"required":["url","valueBoolean"],"type":"object","properties":{"url":{"enum":["lineItemPendingCancellation"],"type":"string"},"valueBoolean":{"type":"boolean","description":"Value of 'true' or 'false'."}},"description":"Source of the definition for the extension code - a logical name or a URL."}]},"description":"Additional content defined by implementations."}},"description":"Pending cancellation information"},{"required":["url","valueCoding"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionType"],"type":"string"},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/prescription-type"],"type":"string"},"code":{"enum":["0101","0104","0105","0108","0113","0114","0116","0117","0124","0125","1001","1004","1005","1008","1013","1014","1016","1017","1024","1025","0201","0204","0205","0208","0213","0214","0216","0217","0224","0225","2001","2004","2005","2008","2013","2014","2016","2017","2024","2025","0501","0504","0505","0508","0513","0514","0516","0517","0524","0525","5001","5004","5005","5008","5013","5014","5016","5017","5024","5025"],"type":"string"},"display":{"enum":["Primary Care Prescriber - Medical Prescriber","Primary Care Prescriber - Nurse Independent/Supplementary prescriber","Primary Care Prescriber - Community Practitioner Nurse prescriber","Primary Care Prescriber - Pharmacist Independent/Supplementary prescriber","Primary Care Prescriber - Optometrist Independent/Supplementary prescriber","Primary Care Prescriber - Podiatrist/Chiropodist Independent/Supplementary prescriber","Primary Care Prescriber - Radiographer Independent/Supplementary prescribe","Primary Care Prescriber - Physiotherapist Independent/Supplementary prescriber","Primary Care Prescriber - Dietician Supplementary prescriber","Primary Care Prescriber - Paramedic Independent/Supplementary prescriber","Outpatient Community Prescriber - Medical Prescriber","Outpatient Community Prescriber - Nurse Independent/Supplementary prescribe","Outpatient Community Prescriber - Community Practitioner Nurse prescriber","Outpatient Community Prescriber - Pharmacist Independent/Supplementary prescribe","Outpatient Community Prescriber - Optometrist Independent/Supplementary prescriber","Outpatient Community Prescriber - Podiatrist/Chiropodist Independent/Supplementary","Outpatient Community Prescriber - Radiographer Independent/Supplementary prescriber","Outpatient Community Prescriber - Physiotherapist Independent/Supplementary prescriber","Outpatient Community Prescriber - Dietician Supplementary prescriber","Outpatient Community Prescriber - Paramedic Independent/Supplementary prescriber","Primary Care Prescriber - Medical Prescriber (Wales)","Primary Care Prescriber - Nurse Independent/Supplementary prescriber (Wales)","Primary Care Prescriber - Community Practitioner Nurse prescriber (Wales)","Primary Care Prescriber - Pharmacist Independent/Supplementary prescriber (Wales)","Primary Care Prescriber - Optometrist Independent/Supplementary prescriber (Wales)","Primary Care Prescriber - Podiatrist/Chiropodist Independent/Supplementary prescriber (Wales)","Primary Care Prescriber - Radiographer Independent/Supplementary prescriber (Wales)","Primary Care Prescriber - Physiotherapist Independent/Supplementary prescriber (Wales)","Primary Care Prescriber - Dietician Supplementary prescriber (Wales)","Primary Care Prescriber - Paramedic Independent/Supplementary prescriber (Wales)","Outpatient Community Prescriber - Medical Prescriber (Wales)","Outpatient Community Prescriber - Nurse Independent/Supplementary prescriber (Wales)","Outpatient Community Prescriber - Community Practitioner Nurse prescriber (Wales)","Outpatient Community Prescriber - Pharmacist Independent/Supplementary prescriber (Wales)","Outpatient Community Prescriber - Optometrist Independent/Supplementary prescriber (Wales)","Outpatient Community Prescriber - Podiatrist/Chiropodist Independent/Supplementary (Wales)","Outpatient Community Prescriber - Radiographer Independent/Supplementary prescriber (Wales)","Outpatient Community Prescriber - Physiotherapist Independent/Supplementary prescriber (Wales)","Outpatient Community Prescriber - Dietician Supplementary prescriber (Wales)","Outpatient Community Prescriber - Paramedic Independent/Supplementary prescriber (Wales)","Primary Care Prescriber - Medical Prescriber (IOM)","Primary Care Prescriber - Nurse Independent/Supplementary prescriber (IOM)","Primary Care Prescriber - Community Practitioner Nurse prescriber (IOM)","Primary Care Prescriber - Pharmacist Independent/Supplementary prescriber (IOM)","Primary Care Prescriber - Optometrist Independent/Supplementary prescriber (IOM)","Primary Care Prescriber - Podiatrist/Chiropodist Independent/Supplementary prescriber (IOM)","Primary Care Prescriber - Radiographer Independent/Supplementary prescriber (IOM)","Primary Care Prescriber - Physiotherapist Independent/Supplementary prescriber (IOM)","Primary Care Prescriber - Dietician Supplementary prescriber (IOM)","Primary Care Prescriber - Paramedic Independent/Supplementary prescriber (IOM)","Outpatient Community Prescriber - Medical Prescriber (IOM)","Outpatient Community Prescriber - Nurse Independent/Supplementary prescriber (IOM)","Outpatient Community Prescriber - Community Practitioner Nurse prescriber (IOM)","Outpatient Community Prescriber - Pharmacist Independent/Supplementary prescriber (IOM)","Outpatient Community Prescriber - Optometrist Independent/Supplementary prescriber (IOM)","Outpatient Community Prescriber - Podiatrist/Chiropodist Independent/Supplementary (IOM)","Outpatient Community Prescriber - Radiographer Independent/Supplementary prescriber (IOM)","Outpatient Community Prescriber - Physiotherapist Independent/Supplementary prescriber (IOM)","Outpatient Community Prescriber - Dietician Supplementary prescriber (IOM)","Outpatient Community Prescriber - Paramedic Independent/Supplementary prescriber (IOM)"],"type":"string"}}}}},{"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionNonDispensingReason"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/medicationdispense-status-reason"],"type":"string"},"code":{"enum":["0001","0002","0003","0004","0005","0006","0007","0008","0009","0010","0011"],"type":"string"},"display":{"enum":["Not required as instructed by the patient","Clinically unsuitable","Owings note issued to patient","Prescription cancellation","Prescription cancellation due to death","Illegal NHS prescription","Prescribed out of scope item","Item or prescription expired","Not allowed on FP10","Patient did not collect medication","Patient purchased medication over the counter"],"type":"string"}}}},"description":"The prescription non dispensing reason"}]},"description":"Additional information related to the prescription."},"action":{"type":"array","items":{"oneOf":[{"required":["title","action"],"type":"object","properties":{"title":{"enum":["Prescription Line Items(Medications)"],"type":"string"},"timingTiming":{"required":["repeat"],"type":"object","properties":{"repeat":{"required":["frequency","period","periodUnit"],"type":"object","properties":{"frequency":{"enum":[1],"type":"integer"},"period":{"type":"integer"},"periodUnit":{"enum":["d"],"type":"string"}}}}},"action":{"type":"array","items":{"required":["resource"],"type":"object","properties":{"resource":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}}}}}}}},{"required":["title","action"],"type":"object","properties":{"title":{"enum":["Prescription status transitions"],"type":"string"},"action":{"type":"array","items":{"required":["title","timingDateTime","code","participant"],"type":"object","properties":{"title":{"enum":["Prescription upload successful","Release Request successful","Nominated Release Request successful","Dispense notification successful","Dispense claim successful","Prescription Reset request successful","Administrative update successful","Administrative Action Update Successful","Prescription/item was cancelled","Prescription/item was not cancelled. With dispenser. Marked for cancellation","Subsequent cancellation","Dispense proposal return successful","Dispense Withdrawal successful","Rebuild Dispense History successful","Updated by Urgent Admin Batch worker","Updated by Routine Admin Batch worker","Updated by Non-Urgent Admin Batch worker","Updated by Document Batch worker"],"type":"string"},"timingDateTime":{"type":"string","format":"date-time"},"code":{"type":"array","items":{"oneOf":[{"required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/EPS-task-business-status"],"type":"string","description":"Identity of the terminology system."},"code":{"enum":["0000","0001","0002","0003","0004","0005","0006","0007","0008","0009","9000","9001","9005"],"type":"string","description":"Symbol in syntax defined by the system."},"display":{"enum":["Awaiting Release Ready","To be Dispensed","With Dispenser","With Dispenser - Active","Expired","Cancelled","Dispensed","Not Dispensed","Claimed","No-Claimed","Repeat Dispense future instance","Prescription future instance","Cancelled future instance"],"type":"string","description":"Representation defined by the system."}},"description":"A reference to a code defined by a terminology system."}}}},{"required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"required":["system","code"],"type":"object","properties":{"system":{"enum":["https://tools.ietf.org/html/rfc4122"],"type":"string"},"code":{"type":"string"}}}}}}]}},"participant":{"type":"array","items":{"required":["extension"],"type":"object","properties":{"extension":{"type":"array","items":{"required":["url","valueReference"],"type":"object","properties":{"url":{"enum":["http://hl7.org/fhir/5.0/StructureDefinition/extension-RequestOrchestration.action.participant.typeReference"],"type":"string"},"valueReference":{"required":["identifier"],"type":"object","properties":{"identifier":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/ods-organization-code"],"type":"string"},"value":{"type":"string"}}}}}}}}}}},"action":{"type":"array","items":{"required":["resource"],"type":"object","properties":{"resource":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}}}}}}}}}}}]}}},"description":"A FHIR RequestGroup representing a prescription."}}},{"required":["fullUrl","search","resource"],"type":"object","properties":{"fullUrl":{"type":"string"},"search":{"required":["mode"],"type":"object","properties":{"mode":{"type":"string"}}},"resource":{"required":["resourceType","id","identifier","gender","birthDate"],"type":"object","properties":{"resourceType":{"enum":["Patient"],"type":"string","description":"The resource type."},"identifier":{"maxItems":1,"minItems":1,"type":"array","items":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/nhs-number"],"type":"string"},"value":{"type":"string","description":"The value that is unique."}},"description":"An identifier - identifies some entity uniquely and unambiguously."},"description":"An identifier for this patient."},"name":{"maxItems":1,"minItems":1,"type":"array","items":{"type":"object","properties":{"prefix":{"type":"array","items":{"type":"string"},"description":"Parts that come before the name."},"suffix":{"type":"array","items":{"type":"string"},"description":"Parts that come after the name."},"given":{"type":"array","items":{"type":"string"},"description":"Given names (not always 'first'). Includes middle names."},"family":{"type":"string","description":"Family name (often called 'Surname')."}},"description":"Name of a human - parts and usage."},"description":"A name associated with the patient."},"id":{"type":"string"},"gender":{"enum":["male","female","other","unknown"],"type":"string"},"birthDate":{"type":"string","format":"date"},"address":{"type":"array","items":{"required":["text","type","use"],"type":"object","properties":{"line":{"type":"array","items":{"type":"string"}},"city":{"type":"string"},"district":{"type":"string"},"postalCode":{"type":"string"},"text":{"type":"string"},"type":{"enum":["both"],"type":"string"},"use":{"enum":["home"],"type":"string"}}}}}}}},{"required":["fullUrl","search","resource"],"type":"object","properties":{"fullUrl":{"type":"string"},"search":{"required":["mode"],"type":"object","properties":{"mode":{"type":"string"}}},"resource":{"required":["resourceType","id","identifier","subject","status","intent","requester","groupIdentifier","medicationCodeableConcept","courseOfTherapyType","dispenseRequest","dosageInstruction","substitution","extension"],"type":"object","properties":{"resourceType":{"enum":["MedicationRequest"],"type":"string","description":"The resource type."},"id":{"type":"string","description":"Temporary id for this resource within the context of this request (not related to longer term identifiers such as short-form prescription id)"},"identifier":{"type":"array","items":{"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/prescription-order-item-number"],"type":"string"},"value":{"type":"string"}}}},"subject":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}},"description":"A reference to the patient the prescription is for."},"status":{"enum":["active","cancelled","completed","stopped"],"type":"string"},"statusReason":{"required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/medicationrequest-status-reason"],"type":"string"},"code":{"enum":["0001","0002","0003","0004","0005","0006","0007","0008","0009"],"type":"string"},"display":{"enum":["Prescribing Error","Clinical contra-indication","Change to medication treatment regime","Clinical grounds","At the Patients request","At the Pharmacists request","Notification of Death","Patient deducted - other reason","Patient deducted - registered with new practice"],"type":"string"}}}}}},"intent":{"enum":["order","instance-order","reflex-order"],"type":"string","description":"Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain."},"requester":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}}},"performer":{"required":["identifier"],"type":"object","properties":{"identifier":{"type":"array","items":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/ods-organization-code"],"type":"string"},"value":{"type":"string"}}}}}},"groupIdentifier":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/prescription-order-number"],"type":"string"},"value":{"type":"string"}}},"medicationCodeableConcept":{"required":["text"],"type":"object","properties":{"text":{"type":"string"}}},"courseOfTherapyType":{"required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["http://terminology.hl7.org/CodeSystem/medicationrequest-course-of-therapy"],"type":"string"},"code":{"enum":["acute","continuous","continuous-repeat-dispensing"],"type":"string"},"display":{"enum":["Short course (acute) therapy","Continuous long term therapy","Continuous long term (repeat dispensing)"],"type":"string"}}}}}},"dispenseRequest":{"required":["quantity"],"type":"object","properties":{"quantity":{"required":["value","unit"],"type":"object","properties":{"value":{"type":"integer"},"unit":{"type":"string"}}},"performer":{"required":["identifier"],"type":"object","properties":{"identifier":{"type":"array","items":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/ods-organization-code"],"type":"string"},"value":{"type":"string"}}}}}},"extension":{"type":"array","items":{"required":["url","valueCoding"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-DM-PerformerSiteType"],"type":"string"},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/dispensing-site-preference"],"type":"string"},"code":{"enum":["P1","P2","P3","0004"],"type":"string"},"display":{"enum":["Other (e.g. Community Pharmacy)","Appliance Contractor","Dispensing Doctor","None"],"type":"string"}}}}}}}},"dosageInstruction":{"type":"array","items":{"required":["text"],"type":"object","properties":{"text":{"type":"string"}}}},"substitution":{"required":["allowedBoolean"],"type":"object","properties":{"allowedBoolean":{"enum":[false],"type":"boolean"}}},"extension":{"type":"array","items":{"oneOf":[{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-EPS-DispensingInformation"],"type":"string"},"extension":{"type":"array","items":{"required":["url","valueCoding"],"type":"object","properties":{"url":{"enum":["dispenseStatus"],"type":"string"},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/medicationdispense-type"],"type":"string"},"code":{"enum":["0001","0002","0003","0004","0005","0006","0007","0008"],"type":"string"},"display":{"enum":["Item fully dispensed","Item not dispensed","Item dispensed - partial","Item not dispensed - owing","Item Cancelled","Expired","Item to be dispensed","Item with dispenser"],"type":"string"}}}}}}}},{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-PendingCancellation"],"type":"string","description":"Source of the definition for the extension code - a logical name or a URL."},"extension":{"type":"array","items":{"oneOf":[{"required":["url","valueBoolean"],"type":"object","properties":{"url":{"enum":["prescriptionPendingCancellation"],"type":"string"},"valueBoolean":{"type":"boolean","description":"Value of 'true' or 'false'."}},"description":"Source of the definition for the extension code - a logical name or a URL."},{"required":["url","valueBoolean"],"type":"object","properties":{"url":{"enum":["lineItemPendingCancellation"],"type":"string"},"valueBoolean":{"type":"boolean","description":"Value of 'true' or 'false'."}},"description":"Source of the definition for the extension code - a logical name or a URL."}]},"description":"Additional content defined by implementations."}},"description":"Pending cancellation information"},{"required":["url","extension"],"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionStatusHistory"],"type":"string"},"extension":{"type":"array","items":{"oneOf":[{"required":["url","valueCoding"],"type":"object","properties":{"url":{"enum":["status"],"type":"string"},"valueCoding":{"required":["system","code"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/task-businessStatus-nppt"],"type":"string"},"code":{"enum":["With Pharmacy","With Pharmacy - Preparing Remainder","Ready to Collect","Ready to Collect - Partial","Collected","Dispatched","Not Dispensed","Ready to Dispatch","Ready to Dispatch - Partial"],"type":"string"}}}}},{"required":["url","valueDateTime"],"type":"object","properties":{"url":{"enum":["statusDate"],"type":"string"},"valueDateTime":{"type":"string","format":"date-time"}}}]}}}}]}}}}}},{"required":["fullUrl","search","resource"],"type":"object","properties":{"fullUrl":{"type":"string"},"search":{"required":["mode"],"type":"object","properties":{"mode":{"type":"string"}}},"resource":{"required":["resourceType","id","identifier","subject","status","performer","type","authorizingPrescription","medicationCodeableConcept","quantity","extension"],"type":"object","properties":{"resourceType":{"enum":["MedicationDispense"],"type":"string","description":"The resource type."},"id":{"type":"string","description":"Temporary id for this resource within the context of this request (not related to longer term identifiers such as short-form prescription id)"},"identifier":{"type":"array","items":{"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/prescription-order-item-number"],"type":"string"},"value":{"type":"string"}}}},"subject":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}},"description":"A reference to the patient the prescription is for."},"status":{"enum":["in-progress","unknown"],"type":"string"},"statusReasonCodeableConcept":{"required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/medicationdispense-status-reason"],"type":"string"},"code":{"enum":["0001","0002","0003","0004","0005","0006","0007","0008","0009","0010","0011"],"type":"string"},"display":{"enum":["Not required as instructed by the patient","Clinically unsuitable","Owings note issued to patient","Prescription cancellation","Prescription cancellation due to death","Illegal NHS prescription","Prescribed out of scope item","Item or prescription expired","Not allowed on FP10","Patient did not collect medication","Patient purchased medication over the counter"],"type":"string"}}}}}},"performer":{"type":"array","items":{"required":["actor"],"type":"object","properties":{"actor":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}}}}}},"type":{"type":"object","properties":{"coding":{"type":"array","items":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/medicationdispense-type"],"type":"string"},"code":{"enum":["0001","0002","0003","0004","0005","0006","0007","0008"],"type":"string"},"display":{"enum":["Item fully dispensed","Item not dispensed","Item dispensed - partial","Item not dispensed - owing","Item Cancelled","Expired","Item to be dispensed","Item with dispenser"],"type":"string"}}}}}},"authorizingPrescription":{"type":"array","items":{"required":["reference"],"type":"object","properties":{"reference":{"type":"string"}}}},"medicationCodeableConcept":{"required":["text"],"type":"object","properties":{"text":{"type":"string"}}},"quantity":{"required":["value","unit"],"type":"object","properties":{"value":{"type":"integer"},"unit":{"type":"string"}}},"dosageInstruction":{"type":"array","items":{"required":["text"],"type":"object","properties":{"text":{"type":"string"}}}},"extension":{"type":"array","items":{"type":"object","properties":{"url":{"enum":["https://fhir.nhs.uk/StructureDefinition/Extension-EPS-TaskBusinessStatus"],"type":"string"},"valueCoding":{"required":["system","code","display"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/CodeSystem/EPS-task-business-status"],"type":"string","description":"Identity of the terminology system."},"code":{"enum":["0000","0001","0002","0003","0004","0005","0006","0007","0008","0009","9000","9001","9005"],"type":"string","description":"Symbol in syntax defined by the system."},"display":{"enum":["Awaiting Release Ready","To be Dispensed","With Dispenser","With Dispenser - Active","Expired","Cancelled","Dispensed","Not Dispensed","Claimed","No-Claimed","Repeat Dispense future instance","Prescription future instance","Cancelled future instance"],"type":"string","description":"Representation defined by the system."}},"description":"A reference to a code defined by a terminology system."}},"description":"The prescription status."}}}}}},{"required":["fullUrl","search","resource"],"type":"object","properties":{"fullUrl":{"type":"string"},"search":{"required":["mode"],"type":"object","properties":{"mode":{"type":"string"}}},"resource":{"required":["resourceType","id","organization"],"type":"object","properties":{"resourceType":{"enum":["PractitionerRole"],"type":"string","description":"The resource type."},"id":{"type":"string"},"organization":{"required":["identifier"],"type":"object","properties":{"identifier":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/ods-organization-code"],"type":"string"},"value":{"type":"string"}}}}}}}}}]},"description":"Entry in the bundle - will have a resource or information."}},"description":"A container for a collection of resources."}},"parameters":{"BearerAuthorization":{"name":"Authorization","in":"header","description":"An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#application-restricted-apis).\n","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","format":"^Bearer\\ [[:ascii:]]+$","example":"Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM"}},"RoleId":{"name":"nhsd-session-urid","in":"header","description":"The user role ID (URID) for the current session. Also known as a user role profile ID (URPID).\n\nThis field is optional.\n","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"pattern":"^[0-9]+$","type":"string","example":"555254240100"}},"OrganizationId":{"name":"nhsd-organization-uuid","in":"header","description":"The users organization ID (UOID) for the current session.\n","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","example":"555254240100"}},"JobRoleCode":{"name":"nhsd-session-jobrole","in":"header","description":"The users job role code for the current session.\n","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","example":"S0030:G0100:R0570"}},"RequestID":{"name":"X-Request-ID","in":"header","description":"A globally unique identifier (GUID) for the request, which we use to de-duplicate repeated requests and to trace the request if you contact our helpdesk.\n\nMust be a universally unique identifier (UUID) (ideally version 4).\n\nMirrored back in a response header.\n\nRequired in all environments except sandbox.\n","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","type":"string","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}},"CorrelationID":{"name":"X-Correlation-ID","in":"header","description":"An optional ID which you can use to track transactions across multiple systems. It can have any value, but we recommend avoiding `.` characters.\n\nMirrored back in a response header.\n","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}}},"securitySchemes":{"nhs-cis2-aal3":{"$ref":"https://proxygen.ptl.api.platform.nhs.uk/components/securitySchemes/nhs-cis2-aal3"}}},"x-nhsd-apim":{"target":{"type":"external","healthcheck":"/_status","url":"https://cpt-api-v1-8-7-beta.int.eps.national.nhs.uk","security":{"type":"mtls","secret":"clinical-tracker-mtls-1"}},"access":[{"title":"User Restricted","grants":{"nhs-cis2-aal3":[]},"visible":true}],"ratelimiting":{"proxy":{"timeunit":"minute","limit":20000},"app-default":{"timeunit":"minute","limit":20000}},"monitoring":true,"temporary":false,"target-identity":[{"name":"cis2-uuid","header":"nhsd-identity-uuid"},{"name":"cis2-urid","header":"nhsd-session-urid"}],"depflag":false,"productidcheck":false},"x-spec-publication":{"operation-order":[{"operations":[{"method":"GET","path":"/RequestGroup"}]}]}}