Search loading...

API Hub

Explore and Make use of Nationally Defined Messaging APIs

 

A007: Retrieve Clinical Information (Deprecated)

Status:

Deprecated

This endpoint has been deprecated, meaning you should not use it for new integrations.

Instead, please use our newer e-RS FHIR API solution which is documented here: https://digital.nhs.uk/developer/api-catalogue/e-referral-service-fhir

Description

This API returns a real-time PDF of the clinical referral information for a given UBRN.

Resource URL

Method URL
POST {Base URL}/STU3/v1/ReferralRequest/{ubrn}/$ers.generateCRI
  • {Base URL} (Dev1) = https://api.dev1.ers.ncrs.nhs.uk/ers-api
  • The {ubrn} represents the unique booking reference number of the Advice and Guidance Request for which the caller is obtaining the “Advice and Guidance summary”

Operation Definition

Prerequisite Conditions

INPUT

Request Operation: Header

Field Name Value
XAPI_ASID The “Accredited System ID” issued to the third party
HTTP_X_SESSION_KEY The session key generated by the Create Session endpoint (A001)

Request Operation: Parameters

Name Cardinality Type Description
UBRN 1..1 Identifier The identifier for the Clinical Referral Information for a Referral Request
(Provided in the URL string)

Example URI

https://api.dev1.ers.ncrs.nhs.uk/ers-api/STU3/v1/ReferralRequest/000000098880/$ers.generateCRI

Example Request Header

"XAPI_ASID" : "999000000045",
"HTTP_X_SESSION_KEY" : "pro-api-session:e96357b1-298d-4159-ac58-a8953c3262c6"

Example Request Body

There is no body required for this request, the UBRN must be provided in the URL.

OUTPUT

Response: Success

If successful, a real-time PDF of the clinical referral information is returned for the given UBRN with the response code 200 (OK).

Example Response Header

"X_ERS_TRANSACTION_ID" : "c1b10960-980c-4eba-873b-188d0eb13d6b-1"
"Content-Disposition" : "attachment; filename=\"000000098880_Clinical_Information_Summary_20200325135641.pdf\"",
"Content-Type" : "application/pdf"
"Content-Length" : "3926"

Example Response Body

The binary of the file is returned: Example Clinical Information Summary.pdf

Response: Failure

If an error occurs, the relating HTTP status code will be returned in the header.

Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below:

OutcomeKey Description Suggested Diagnostic
NO_RELATIONSHIP The SPC user (or if SPCA, SPC user they are “on behalf of”) is not a workgroup member for the current booked-to service at the logged-in organisation No legitimate relationship exists with this referral, check workgroup permissions.
NO_SUCH_REQUEST A referral with the specified UBRN does not exist. The referral may have been archived or soft-deleted, check your records.
INVALID_REQUEST_TYPE The UBRN is not associated with an appointment request. The referral may be another type of request, e.g. advice and guidance or a draft request which cannot be retrieved.
INVALID_REQUEST_STATE The referral request is not in the correct state. The referral must have a booked appointment and referral clinical information attached.
NO_CLINICAL_INFO There is no clinical information associated with the referral. Upload / attach referral clinical information to the referral.

All content is available under the Open Government Licence v3.0, except where otherwise stated