Retrieve advice and guidance conversation (A025, FHIR STU3)
Overview
Use this endpoint to retrieve the advice and guidance conversation between the referring organisation and service providing organisation.
A conversation takes the form of messages between a referrer (seeking advice) and a provider or specialist. Messages can include file attachments. These must be retrieved via [[HYPERLINK_A042]]
Read our building healthcare software guide for detailed information.
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 the advice and guidance request. For service provider users, you may have identified the UBRN via [[HYPERLINK_A023]].
You need to use [[HYPERLINK_A024]] to retrieve the summary of an advice and guidance request. This will importantly include the latest version of the request which must be used.
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
Use case
As an authenticated user or application
I need to retrieve the conversation that is present on an advice and guidance request
So that I can review the conversation and potentially contribute further to it.
Important notes
The conversation returned includes links to any attachments associated with the conversation. This can be done via endpoint [[HYPERLINK_A006]]. Note, dependent on how attachments were added they may be linked to the Advice and Guidance summary instead of the conversation. These may be retrieved from [[HYPERLINK_A024]].
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 existing data-access 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. The conversation also gets included in the form of a PDF file returned by [[HYPERLINK_A007]].
In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. Attachments are only made available once an uploaded file has been validated and successfully malware scanned. A request to retrieve an attachment that is not available for download will result in an error being returned. See [[HYPERLINK_A042]] for more information.
The availability status of an attachment can be retrieved via any endpoint that returns an eRS-AvailabilityStatus-1 code in the success response, including [[HYPERLINK_A025]]. The eRS-AvailabilityStatus-1 code can return one of four possible values, as detailed below.
| eRS-AvailabilityStatus-1 code | Description / Guidance |
|---|---|
| AVAILABLE | The file is available for download. |
| PENDING | The file is being scanned and cannot be retrieved. Wait at least 5 minutes before checking its availability again. |
| THREATS_FOUND | The file has been quarantined after detecting a threat and cannot be retrieved.<br>Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. |
| VALIDATION_FAILED | The file has failed validation and cannot be retrieved.<br>Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. Validation can fail because the:<ul><li>content type of the file is not supported</li><li>content type of the file does not correlate with the file extension</li><li>file provided is too large and is not supported by e-RS.</li></ul> |
Related endpoints
After using this endpoint:
- Use [[HYPERLINK_A006]] to retrieve any attachments associated with the advice and guidance request.
- (For service provider users) Use [[HYPERLINK_A026]] to respond to the referrer supplying advice or requesting further information.
- (For service provider users) Use [[HYPERLINK_A027]] to convert the advice and guidance request into a referral. This is only possible if the referrer has authorised the provider to do so.
Use [[HYPERLINK_A043]] to generate a PDF file overview relating to an advice and guidance request.
Sandbox test scenarios
You can test the following scenarios in our sandbox environment
| Scenario | Request |
|---|---|
| Single message from referrer | based-on=CommunicationRequest/000000070000/_history/1 |
| One message each way | based-on=CommunicationRequest/000000070000/_history/2 |
| Attachment present in each direction | based-on=CommunicationRequest/000000070001/_history/6 |
| Multi-way conversation | based-on=CommunicationRequest/000000070002/_history/1 |
| Attachment uploaded from RCS before A&G creation | based-on=CommunicationRequest/000000070003/_history/7 |
| Attachment files unavailable for download | based-on=CommunicationRequest/000000070004/_history/3 |
Query parameters
The component describing the CommunicationRequest for which the communication is requested for.
Pattern:
CommunicationRequest/{ubrn}/_history/{version}
- The ubrn represents the unique booking reference number of the Advice and Guidance Request for which the caller is obtaining the 'Advice and Guidance Conversation'
- The version is the version of the A&G Request to be retrieved (only the most current version will be retrievable)
Suppliers must request includes they rely on. The default includes behaviour is subject to change.
Please note that '_include' query parameter can be supplied multiple times for example:
GET /STU3/Communication ?based-on=CommunicationRequest/{ubrn}/_history/{version} &_include=Communication:requester-practitionerrole:PractitionerRole &_include=Communication:sender-practitionerrole:PractionerRole &_include=Communication:content-reference:DocumentReference
Headers
The ODS code of the caller's Organisation.
Not allowed for application-restricted access.
Required for user-restricted access.
The e-RS Business Function of the caller.
Not allowed for application-restricted access.
Required for user-restricted access.
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.
Not allowed for application-restricted access.
Required for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.
Parameters
Response
e-RS Communication Request (advice and guidance summary)
Changes
No recorded changes to this endpoint across all 1 revision of this API.