You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specification/components/stu3/schemas/endpoints/a006-retrieve-attachment.yaml
+23-7Lines changed: 23 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
+
deprecated: true
1
2
security:
2
3
- bearerAuth: []
3
4
description: |
4
5
## Overview
5
-
6
+
**This endpoint has now been deprecated please use [[HYPERLINK_A042]] instead.**
7
+
6
8
Use this endpoint to retrieve a file that is attached to a referral or advice request.
7
9
8
10
## Supported security patterns
@@ -11,19 +13,31 @@ description: |
11
13
12
14
13
15
## 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.
16
19
17
-
### Healthcare worker, user-restricted access
20
+
#### Healthcare worker, user-restricted access
18
21
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:
19
22
- `REFERRING_CLINICIAN`
20
23
- `REFERRING_CLINICIAN_ADMIN`
21
24
- `SERVICE_PROVIDER_CLINICIAN`
22
25
- `SERVICE_PROVIDER_CLINICIAN_ADMIN`
23
26
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.
25
33
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
27
41
28
42
A referral pathway in e-RS can be made up of more than one UBRN.
29
43
For example, a referral is booked and seen in a general knee clinical assessment service (UBRN #1),
@@ -38,6 +52,8 @@ description: |
38
52
39
53
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.
40
54
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
+
41
57
## Use case
42
58
43
59
As an authenticated user
@@ -50,7 +66,7 @@ description: |
50
66
51
67
You can retrieve a clinical information summary for a referral using [[HYPERLINK_A007]].
| 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>
0 commit comments