---
title: "Retrieve advice and guidance overview PDF (A043, FHIR STU3)"
method: POST
path: "/STU3/CommunicationRequest/{ubrn}/$ers.generateCRI"
tags: ["Retrieve clinical information"]
---

# Retrieve advice and guidance overview PDF (A043, FHIR STU3)

`POST /STU3/CommunicationRequest/{ubrn}/$ers.generateCRI`

## Request

- Base URL: `https://sandbox.api.service.nhs.uk/referrals/FHIR`
- URL: `https://sandbox.api.service.nhs.uk/referrals/FHIR/STU3/CommunicationRequest/{ubrn}/$ers.generateCRI`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nhs/apis/e-referrals-service-api/docs/STU3/CommunicationRequest/:ubrn/$ers.generateCRI/post.ts> (a function with typed inputs; its response is checked against the schema)

## Overview

Use this endpoint to generate a PDF file that summarises an advice and guidance request including the conversation. 
This endpoint cannot be used to obtain a PDF file for a referral request.

## Supported security patterns
- Application-restricted access, unattended access
- Healthcare worker, user-restricted access

## Pre-requisites

You need to use the `Unique Booking Reference Number` (UBRN) of an advice and guidance request.

## Application-restricted 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.

## 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`

## Important note

An advice and guidance request may have been converted to a referral (with the same UBRN), 
and in addition a referral pathway in e-RS can be made up of more than one UBRN. 
As such, it is important that all clinical information is obtained across all the related UBRNs in the pathway. 
These can be identified using [[HYPERLINK_A005]].

If the converted advice and guidance request is referred to a service outside of your organisation, 
the subsequent referral information may not be accessible due to legitimate relationship rules. 
However, the advice and guidance summary ([[HYPERLINK_A024]]), 
attachments ([[HYPERLINK_A006]]), advice and guidance conversation ([[HYPERLINK_A025]]) and 
clinical information ([[HYPERLINK_A043]]) which took place before such a conversion still forms part of the clinical information and can still be retrieved.

## Use case

As an authenticated user or application

I need to retrieve a PDF file overview of the advice and guidance request

So that I can assess its content and decide what further action may be needed.

## Related endpoints
You can retrieve a PDF overview for an advice and guidance request that has been converted to a referral using [[HYPERLINK_A007]].

You can retrieve structured information about advice and guidance using [[HYPERLINK_A024]] and [[HYPERLINK_A025]].

You can retrieve a referral using [[HYPERLINK_A005]].

You can retrieve clinical attachments that are associated with a referral using [[HYPERLINK_A006]].

## Path parameters

- `ubrn` string, required

## Parameters

- `#/paths/~1STU3~1Task/get/parameters/0` (unresolved $ref)
- `#/paths/~1STU3~1Communication/get/parameters/3` (unresolved $ref)
- `#/paths/~1STU3~1Communication/get/parameters/4` (unresolved $ref)
- `#/paths/~1STU3~1Communication/get/parameters/5` (unresolved $ref)
- `#/paths/~1STU3~1Task/get/parameters/4` (unresolved $ref)

## Response `200`

Response contains the binary stream of the advice and guidance overview PDF.

## Other responses

- `401` (unresolved $ref)
- `403` (unresolved $ref)
- `404` (unresolved $ref)
- `406` (unresolved $ref)
- `422`: Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. Check diagnostics property for specific information regarding the error. | Error code | Description | | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | | INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an advice and guidance request. | | PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. | | NO_RELATIONSHIP | The user does not have a legitimate relationship with the advice and guidance request. |
- `429` (unresolved $ref)
- `500` (unresolved $ref)
- `503` (unresolved $ref)

---

[API](https://skmtc.dev/nhs/apis/e-referrals-service-api.md) - [All operations](https://skmtc.dev/nhs/apis/e-referrals-service-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nhs/apis/e-referrals-service-api/revisions/916969ea472f?raw)
