Skip to content

Commit 61f559b

Browse files
author
Steve Buxton
committed
[ERSSUP-80435]-[]-[RM29a: OAS changes for Retrieve Attachment]-[SB]
1 parent 90279db commit 61f559b

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

specification/components/stu3/schemas/endpoints/a006-retrieve-attachment.yaml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
deprecated: true
12
security:
23
- bearerAuth: []
34
description: |
45
## Overview
5-
6+
**This endpoint has now been deprecated please use [[HYPERLINK_A042]] instead.**
7+
68
Use this endpoint to retrieve a file that is attached to a referral or advice request.
79
810
## Supported security patterns
@@ -11,19 +13,31 @@ description: |
1113
1214
1315
## Pre-requisites
14-
### Application-restricted access
15-
In order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.
16+
### Authentication
17+
#### Application-restricted access
18+
In order to use this endpoint you must be an authenticated e-RS calling application.
1619
17-
### Healthcare worker, user-restricted access
20+
#### Healthcare worker, user-restricted access
1821
In order to use this endpoint you must be an authenticated e-RS user or application and use one of the following e-RS roles:
1922
- `REFERRING_CLINICIAN`
2023
- `REFERRING_CLINICIAN_ADMIN`
2124
- `SERVICE_PROVIDER_CLINICIAN`
2225
- `SERVICE_PROVIDER_CLINICIAN_ADMIN`
2326
24-
You need to have retrieved the referral via [[HYPERLINK_A005]] to obtain the URLs for its attachments.
27+
### Attachment availability
28+
In order to use this endpoint, the attachment to be retrieved must be available for download. Attachments are only made available once an uploaded file has been validated and successfully scanned for malware. A request to retrieve an attachment that is not available for download will result in a 422 error being returned. See the Response section for further information.
29+
30+
The availability status of an attachment can be retrieved via any endpoint that provides details of an attachment in the success response. Details of the availability statuses that may be returned via these endpoints can be found in the specification for [[HYPERLINK_A005]].
31+
32+
Prior to retrieving an attachment, you will need to have retrieved the referral or advice request the attachment is associated with (via the [[HYPERLINK_A005]] or [[HYPERLINK_A024]], for example). Referrals and advice requests include resolvable URLs to the files currently attached to them, which can be used with this endpoint to retrieve the attachments themselves.
2533
26-
## Important note
34+
### Maximum file size
35+
36+
The [[HYPERLINK_A006]] endpoint allows you to retrieve attachments up to a maximum file size of 5MB (5242880 bytes). Attempting to retrieve a file over this limit will lead to a 422 error being returned. See the Response section for further information. Due to this, prior to calling this endpoint, the size of the attachment being retrieved should first be validated so that this error can be avoided.
37+
38+
Files that are larger than 5MB can be downloaded via the [[HYPERLINK_A042]] endpoint or the e-RS web-based professional application.
39+
40+
## Important notes
2741
2842
A referral pathway in e-RS can be made up of more than one UBRN.
2943
For example, a referral is booked and seen in a general knee clinical assessment service (UBRN #1),
@@ -38,6 +52,8 @@ description: |
3852
3953
Note: It is possible that the initial UBRN may be the only one in the referral pathway to have clinical information and/or attachments associated.
4054
55+
The [[HYPERLINK_A006]] endpoint allows you to retrieve attachments up to a maximum file size of 5MB (5242880 bytes), subject to the attachment being available for download. Attempts to retrieve an attachment that is not available, or exceeds the maximum file size, will lead to a 422 error being returned. See the Response section for further information.
56+
4157
## Use case
4258
4359
As an authenticated user
@@ -50,7 +66,7 @@ description: |
5066
5167
You can retrieve a clinical information summary for a referral using [[HYPERLINK_A007]].
5268
53-
summary: Retrieve attachment (A006, FHIR STU3)
69+
summary: Retrieve attachment (A006, FHIR STU3) [deprecated]
5470
operationId: a006-retrieve-attachment
5571
tags:
5672
- Retrieve clinical information

specification/components/stu3/schemas/responses/retrieveAttachment/422Response.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ description: |
44
55
| Error code | Description |
66
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
7-
| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |
8-
| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |
9-
| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |
7+
| FILE_SIZE_ERROR | The file requested is larger than 5MB (5242880 bytes) so cannot be retrieved via this endpoint. Files larger than 5MB can be downloaded via the [[HYPERLINK_A042]] endpoint or the e-RS web-based professional application. |
8+
| PENDING | The file is being scanned and cannot be retrieved. Wait at least 5 minutes before checking its availability again. |
9+
| THREATS_FOUND | The file has been quarantined after detecting a threat and cannot be retrieved. Contact the organisation that uploaded the file to resolve the issue and get the information you need. Details of who uploaded the file can be retrieved via any endpoint that provides details of an attachment in the success response (via the [[HYPERLINK_A005]] or [[HYPERLINK_A024]] endpoints, for example) |
10+
| VALIDATION_FAILED | The file has failed validation and cannot be retrieved. Contact the organisation that uploaded the file to resolve the issue and get the information you need. Details of who uploaded a file can be retrieved via any endpoint that provides details of an attachment in the success response (via the [[HYPERLINK_A005]] or [[HYPERLINK_A024]] endpoints, for example)<br>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. Note, this indicates that the file size is larger than the system supports as a whole, not the 5MB limit associated with this endpoint</ul>
1011
headers:
1112
X-Correlation-ID:
1213
$ref: '../../headers/response/CorrelationID.yaml'

0 commit comments

Comments
 (0)