Change appointment
Manage referral
Review referral requests

Available actions for user (A029, FHIR STU3)

Overview

This endpoint allows an authenticated e-RS user to check ahead of performing an action, whether or not the action is permitted. This endpoint performs a search for available and supported actions that can be currently performed, by the current e-RS user on a specific referral. When a permitted action is returned, the e-RS user could immediately attempt to perform a permitted action.

You SHOULD NOT cache the list of available user actions returned because this endpoint gives the current actions for the current e-RS user, for the referral in context and is therefore, transient; a future call for a different e-RS user, referral, or at a different point in time, might result in a different set of actions, leading to potential failure flows.

Supported security patterns

  • Healthcare worker, user-restricted access
  • Application-restricted, unattended access

Pre-requisites

Application-restricted, unattended access

In order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.

Supported action:

  • Record Review Outcome
  • Cancel Referral

Healthcare worker, user-restricted access

In order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:

  • REFERRING_CLINICIAN
  • REFERRING_CLINICIAN_ADMIN
  • SERVICE_PROVIDER_CLINICIAN
  • SERVICE_PROVIDER_CLINICIAN_ADMIN

You should obtain a Unique Booking Reference Number (UBRN) before using this endpoint, as the current UBRN version is required.

Use case

As an authenticated user

I want to know what actions I might currently perform on a referral prior to attempting to do so

So that I can review my options, and do not try to persist a prohibited action

Important information about using this endpoint

This endpoint can be used to check permitted actions on a referral. Only a select number of results will be returned for which a corresponding action can be performed via the API. Not all actions are currently supported.

As a referrer, the actions returned can include:

  • Cancel Directly Booked Appointment
  • Cancel Referral
  • Create Appointment
  • Change Shortlist
  • Change Shortlist and Send for Triage

As a service provider, the actions returned can include:

  • Record Review Outcome
  • Cancel Referral

Related endpoints

To retrieve pertinent details relating to a referral:

  • Use [[HYPERLINK_A005]] to retrieve the details of the referral, UBRN and UBRN version.

Below is a list of actions that could be returned by calling [[HYPERLINK_A029]]

  • Use [[HYPERLINK_A028]] to record a review outcome based on the available clinical information and attachments.
  • Use [[HYPERLINK_A016]] to Book, or if unable, Defer, an appointment to a specific service on the current shortlist, or to make a triage deferral by sending an appointment to a triage service.
  • Use [[HYPERLINK_A031]] to change the shortlist of bookable services on an existing referral.

Sandbox test scenarios

You can test the following scenarios in our sandbox environment

ScenarioRequest
No "action" is availablefocus=ReferralRequest/000000070000/_history/6, intent=proposal, status=ready
"Record Review Outcome" is availablefocus=ReferralRequest/000000070001/_history/6, intent=proposal, status=ready
"Create Appointment" is availablefocus=ReferralRequest/000000070002/_history/6, intent=proposal, status=ready
"Change Shortlist" is availablefocus=ReferralRequest/000000070003/_history/6, intent=proposal, status=ready
"Change Shortlist and Send for Triage" is availablefocus=ReferralRequest/000000070004/_history/6, intent=proposal, status=ready
"Cancel Referral" is availablefocus=ReferralRequest/000000070005/_history/6, intent=proposal, status=ready
"Cancel Directly Booked Appointment" is availablefocus=ReferralRequest/000000070006/_history/6, intent=proposal, status=ready
get/STU3/Task

Query parameters

focusstring required
Example:ReferralRequest/000000070000/_history/6

The component describing the ReferralRequest for which the task list is requested for.

Pattern:

ReferralRequest/{ubrn}/_history/{version}

  • The ubrn represents the unique booking reference number of the referral request
  • The version is the version of the referral request (only the most current version will be accepted)
intent'proposal' required
Example:proposal

Value must be set to proposal

status'ready' required
Example:ready

The status of the task, value must be set to ready

Headers

Authorizationstring ^Bearer\ [[:ascii:]]+$ required
Example:Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM

An OAuth 2.0 bearer token.

Required in all environments except sandbox.

NHSD-End-User-Organisation-ODSstring required
Example:R69

The ODS code of the caller's Organisation

NHSD-eRS-Business-Function'REFERRING_CLINICIAN' | 'REFERRING_CLINICIAN_ADMIN' | 'REFERRING_ADMIN' | 'COMMISSIONER' | 'SERVICE_PROVIDER_CLINICIAN_ADMIN' | 'SERVICE_PROVIDER_CLINICIAN' | 'SERVICE_PROVIDER_ADMIN' | 'INFORMATION_ANALYST' | 'BOOKING_MANAGER' | 'ADDITIONAL_REQUIREMENTS_MANAGER' required
Example:SERVICE_PROVIDER_CLINICIAN_ADMIN

The e-RS Business Function of the caller

NHSD-eRS-On-Behalf-Of-User-IDstring
Example:021600556514

The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO).

"On behalf of" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC).

Where an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.

X-Correlation-IDstring
Example:11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA

Arbitrary string value provided by API Consumer

Tends to be unique, but does not have to be

Returned, unchanged, in the response

Response

Bundle containing list of available tasks

Changes

No recorded changes to this endpoint across all 1 revision of this API.