Electronic Prescription Service (EPS) Implementation Guide

release

Release (download) a prescription by a dispensing system.

Name Url
Task-release https://fhir.nhs.uk/OperationDefinition/Task-release-message

Invocations

URL: [base]/Task/$release

This operation changes content

Parameters (In)

NameCardinalityTypeDocumentation
group-identifier0..1Identifier

The short-form-prescription-id (token) of the prescription. Used for releasing Patient prescriptions

owner1..1Organization

The organization (pharmacy) downloading the prescriptions. Used for releasing Nominated Pharmacy prescriptions

status1..1code

Status from ValueSet http://hl7.org/fhir/valueset-task-status.html Use: accepted

agent1..1PractitionerRole

The professional submitting the release request

Return Values (Out)

NameCardinalityTypeDocumentation
return1..1Bundle

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.",
"Task"
],
"system": false,
"type": true,
"instance": false,
"outputProfile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Bundle-SearchSet",
{
"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" />
<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" />
<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" />
<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>
<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>
<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>
<name value="agent" />
<use value="in" />
<min value="1" />
<max value="1" />
<documentation value="The professional submitting the release request" />
<type value="PractitionerRole" />
</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>

Input Parameters

group-identifier

The group-identifier (also known as the prescription short form id) is used to download a single prescription. Omit when requesting nominated prescriptions for the dispensing site.

{
    "name": "group-identifier",
    "valueIdentifier": {
        "system": "https://fhir.nhs.uk/Id/prescription-order-number",
        "value": "82D996-C81010-11DB12"
    }
}

owner

The owner is an Organization resource representing the dispensing site downloading the prescription(s). A valid contact telephone number must be provided as this is made visible to the prescribing system if a request to cancel the prescription is unsuccessful due to being downloaded by the dispenser.

{
    "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"
            }
        ]
    }
}

status

The status is a fixed value of accepted.

{
    "name": "status",
    "valueCode": "accepted"
}

agent

The agent must be a PractitionerRole resource, representing the end user triggering the release request. The Role Profile ID, User ID and Job Role Code are available from the CIS2 authenticated session.

{
"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"
        }
    ]
    }
}

back to top