release
Name | Url |
---|---|
Task-release | https://fhir.nhs.uk/OperationDefinition/Task-release-message |
Invocations
URL: [base]/Task/$release
This operation changes content
Parameters (In)
Name | Cardinality | Type | Documentation |
group-identifier | 0..1 | Identifier | The short-form-prescription-id (token) of the prescription. Used for releasing Patient prescriptions |
owner | 1..1 | Organization | The organization (pharmacy) downloading the prescriptions. Used for releasing Nominated Pharmacy prescriptions |
status | 1..1 | code | Status from ValueSet http://hl7.org/fhir/valueset-task-status.html Use: accepted |
agent | 1..1 | PractitionerRole | The professional submitting the release request |
Return Values (Out)
Name | Cardinality | Type | Documentation |
return | 1..1 | Bundle | A FHIR Bundle (type=searchset) which contains prescription-order FHIR Messages which match the search parameters. An empty search will still return a FHIR Bundle but with no entries. |
Only one of the parameters group-identifier and owner MUST be provided. This operation performs both a query on the message queue and updates the status of returned prescriptions.
{ "resourceType": "OperationDefinition", "id": "Task-release-message", "meta": { "lastUpdated": "2019-11-01T09:29:23.356+11:00" }, "url": "https://fhir.nhs.uk/OperationDefinition/Task-release-message", "version": "4.0.1", "name": "ReleaseTask", "status": "draft", "kind": "operation", "date": "2020-11-13T09:29:23+11:00", "publisher": "NHS Digital", "contact": [ { "telecom": [ { "system": "email", "value": "interoperabilityteam@nhs.net" } ] } ], "description": "Use this endpoint to download prescriptions from Spine before it is dispensed. You can download a single prescription using the prescription's ID, or download up to 25 prescriptions (per request) nominated to a dispenser using the dispenser's ODS code.", "affectsState": true, "code": "release", "comment": "Only one of the parameters group-identifier and owner MUST be provided. This operation performs both a query on the message queue and updates the status of returned prescriptions.", "resource": [ "Task" ], "system": false, "type": true, "instance": false, "outputProfile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Bundle-SearchSet", "parameter": [ { "name": "group-identifier", "use": "in", "min": 0, "max": "1", "documentation": "The short-form-prescription-id (token) of the prescription. Used for releasing Patient prescriptions", "type": "Identifier" }, { "name": "owner", "use": "in", "min": 1, "max": "1", "documentation": "The organization (pharmacy) downloading the prescriptions. Used for releasing Nominated Pharmacy prescriptions", "type": "Organization" }, { "name": "status", "use": "in", "min": 1, "max": "1", "documentation": "Status from ValueSet http://hl7.org/fhir/valueset-task-status.html Use: accepted", "type": "code" }, { "name": "agent", "use": "in", "min": 1, "max": "1", "documentation": "The professional submitting the release request", "type": "PractitionerRole" }, { "name": "return", "use": "out", "min": 1, "max": "1", "documentation": "A FHIR Bundle (type=searchset) which contains prescription-order FHIR Messages which match the search parameters. An empty search will still return a FHIR Bundle but with no entries.", "type": "Bundle" } ] }
<OperationDefinition xmlns="http://hl7.org/fhir"> <id value="Task-release-message" /> <meta> <lastUpdated value="2019-11-01T09:29:23.356+11:00" /> </meta> <url value="https://fhir.nhs.uk/OperationDefinition/Task-release-message" /> <version value="4.0.1" /> <name value="ReleaseTask" /> <status value="draft" /> <kind value="operation" /> <date value="2020-11-13T09:29:23+11:00" /> <publisher value="NHS Digital" /> <contact> <telecom> <system value="email" /> <value value="interoperabilityteam@nhs.net" /> </telecom> </contact> <description value="Use this endpoint to download prescriptions from Spine before it is dispensed. You can download a single prescription using the prescription's ID, or download up to 25 prescriptions (per request) nominated to a dispenser using the dispenser's ODS code." /> <affectsState value="true" /> <code value="release" /> <comment value="Only one of the parameters group-identifier and owner MUST be provided. This operation performs both a query on the message queue and updates the status of returned prescriptions." /> <resource value="Task" /> <system value="false" /> <type value="true" /> <instance value="false" /> <outputProfile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-Bundle-SearchSet" /> <parameter> <name value="group-identifier" /> <use value="in" /> <min value="0" /> <max value="1" /> <documentation value="The short-form-prescription-id (token) of the prescription. Used for releasing Patient prescriptions" /> <type value="Identifier" /> </parameter> <parameter> <name value="owner" /> <use value="in" /> <min value="1" /> <max value="1" /> <documentation value="The organization (pharmacy) downloading the prescriptions. Used for releasing Nominated Pharmacy prescriptions" /> <type value="Organization" /> </parameter> <parameter> <name value="status" /> <use value="in" /> <min value="1" /> <max value="1" /> <documentation value="Status from ValueSet http://hl7.org/fhir/valueset-task-status.html Use: accepted" /> <type value="code" /> </parameter> <parameter> <name value="agent" /> <use value="in" /> <min value="1" /> <max value="1" /> <documentation value="The professional submitting the release request" /> <type value="PractitionerRole" /> </parameter> <parameter> <name value="return" /> <use value="out" /> <min value="1" /> <max value="1" /> <documentation value="A FHIR Bundle (type=searchset) which contains prescription-order FHIR Messages which match the search parameters. An empty search will still return a FHIR Bundle but with no entries." /> <type value="Bundle" /> </parameter> </OperationDefinition>
group-identifier
group-identifier
is used to download a single prescription. This is called a Patient Release Request. This group identifier (also known as prescription token or the prescription short form id) is either retrieved via the Task API
Prescription Tracker API
or is presented to the pharmacy to the pharmacy by the patient (on paper or patient App).
Patient Release Request
{ "name": "group-identifier", "valueIdentifier": { "system": "https://fhir.nhs.uk/Id/prescription-order-number", "value": "82D996-C81010-11DB12" } },
owner
An Organization resource representing the pharmacy downloading the prescription.
{ "name": "owner", "resource": { "resourceType": "Organization", "id": "organization", "identifier": [ { "system": "https://fhir.nhs.uk/Id/ods-organization-code", "value": "VNE51" } ], "address": [ { "city": "West Yorkshire", "use": "work", "line": [ "17 Austhorpe Road", "Crossgates", "Leeds" ], "postalCode": "LS15 8BA" } ], "active": true, "type": [ { "coding": [ { "system": "https://fhir.nhs.uk/CodeSystem/organisation-role", "code": "182", "display": "PHARMACY" } ] } ], "name": "The Simple Pharmacy", "telecom": [ { "system": "phone", "use": "work", "value": "0113 3180277" } ] } }
accept
The only value to be used is accepted
. This is for consistency with NHSDigital-Task and for future use.
{ "name": "status", "valueCode": "accepted" },
agent
This is a NHSDigital-PractitionerRole resource.
GMC Reference Number MUST NOT be used as a Practitioner identifier
An example of a unattended $release payload.
{ "resourceType": "Parameters", "id": "ee778f88-e1aa-49b0-8cbc-77d54c65ef9e", "parameter": [ { "name": "status", "valueCode": "accepted" }, { "name": "agent", "resource": { "resourceType": "PractitionerRole", "id": "16708936-6397-4e03-b84f-4aaa790633e0", "identifier": [ { "system": "https://fhir.nhs.uk/Id/sds-role-profile-id", "value": "555086415105" } ], "practitioner": { "identifier": { "system": "https://fhir.nhs.uk/Id/sds-user-id", "value": "3415870201" }, "display": "Jackie Clark" }, "code": [ { "coding": [ { "system": "https://fhir.nhs.uk/CodeSystem/NHSDigital-SDS-JobRoleCode", "code": "S0030:G0100:R0620" } ] } ], "telecom": [ { "system": "phone", "value": "02380798431", "use": "work" } ] } }, { "name": "owner", "resource": { "resourceType": "Organization", "id": "organization", "identifier": [ { "system": "https://fhir.nhs.uk/Id/ods-organization-code", "value": "VNE51" } ], "address": [ { "city": "West Yorkshire", "use": "work", "line": [ "17 Austhorpe Road", "Crossgates", "Leeds" ], "postalCode": "LS15 8BA" } ], "active": true, "type": [ { "coding": [ { "system": "https://fhir.nhs.uk/CodeSystem/organisation-role", "code": "182", "display": "PHARMACY" } ] } ], "name": "The Simple Pharmacy", "telecom": [ { "system": "phone", "use": "work", "value": "0113 3180277" } ] } } ] }
An example of a attended $release payload.
{ "resourceType": "Parameters", "id": "66bc43c6-b803-4593-96c9-44c62f4613f4", "parameter": [ { "name": "status", "valueCode": "accepted" }, { "name": "agent", "resource": { "resourceType": "PractitionerRole", "id": "16708936-6397-4e03-b84f-4aaa790633e0", "practitioner": { "identifier": { "system": "https://fhir.nhs.uk/Id/sds-user-id", "value": "1231234" }, "display": "Jackie Clark" }, "code": [ { "coding": [ { "system": "https://fhir.nhs.uk/CodeSystem/NHSDigital-SDS-JobRoleCode", "code": "S0030:G0100:R0620" } ] } ], "telecom": [ { "system": "phone", "value": "02380798431", "use": "work" } ] } }, { "name": "owner", "resource": { "resourceType": "Organization", "id": "organization", "identifier": [ { "system": "https://fhir.nhs.uk/Id/ods-organization-code", "value": "VNE51" } ], "address": [ { "city": "West Yorkshire", "use": "work", "line": [ "17 Austhorpe Road", "Crossgates", "Leeds" ], "postalCode": "LS15 8BA" } ], "active": true, "type": [ { "coding": [ { "system": "https://fhir.nhs.uk/CodeSystem/organisation-role", "code": "182", "display": "PHARMACY" } ] } ], "name": "The Simple Pharmacy", "telecom": [ { "system": "phone", "use": "work", "value": "0113 3180277" } ] } } ] }