Refer patient
Request advice
Arrange appointment
Arrange triage

Upload file to document store (A020, FHIR STU3)

Overview

Use this endpoint to upload a file containing clinical information to e-RS ready to be associated with a referral, an advice and guidance request or an advice and guidance response.

Supported security patterns

  • Healthcare worker, user-restricted access

Pre-requisites

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

You can only upload file formats that are supported by e-RS. Currently, the supported file formats are:

File typeFile extension(s)
Plain Text.txt
PDF.pdf
XML Text.xml
RTF Text.rtf, .rtx
Basic Audio.au
MPEG audio layer 3.mp3
PNG Image.png
GIF Image.gif
JPEG Image.jpg, .jpe, .jpeg
TIFF Image.tif, .tiff
MPEG Video.mpg, .mpeg, .mpe
MSWORD.doc, .docx
DICOM.dcm

Currently, the maximum file size supported by e-RS is 5MB.

Use case

As an authenticated user

I need to upload a referral letter or other clinical information file to e-RS

So that I can associate the file with an existing referral or advice and guidance request.

Important notes

This endpoint only performs the file upload and does not associate it with a referral. The uploaded file must be explicitly associated with a referral by, for example, using [[HYPERLINK_A012]].

The resulting URL within e-RS for the uploaded file is returned in the 'Location' header of the response.

Request header NHSD-eRS-Referral-ID - the ID (typically the UBRN) of the referral which the documents are intended for - is non-mandatory, but must be provided if this file is to be attached to an existing request.

Related endpoints

You can associate the uploaded file with a specific referral using:

  • [[HYPERLINK_A012]]
  • [[HYPERLINK_A022]]
  • [[HYPERLINK_A028]]

You can associate the uploaded file with a specific advice and guidance request using:

  • [[HYPERLINK_A044]]
  • [[HYPERLINK_A026]]
  • [[HYPERLINK_A027]]
post/STU3/Binary

Headers

NHSD-eRS-File-Namestring required
Example:test.txt

The name of file being uploaded, including the extension

NHSD-eRS-Referral-IDstring
Example:000000070000

The ID (typically the UBRN) of the referral which the documents are intended for. This must be provided if this file is to be attached to an existing request.

Parameters

#/paths/~1STU3~1Task/get/parameters/0 — unresolved $ref
#/paths/~1STU3~1Task/get/parameters/1 — unresolved $ref
#/paths/~1STU3~1Task/get/parameters/2 — unresolved $ref
#/paths/~1STU3~1Task/get/parameters/3 — unresolved $ref
#/paths/~1STU3~1Task/get/parameters/4 — unresolved $ref

Response

201 (Created) - success response with no body

Changes

No recorded changes to this endpoint across all 1 revision of this API.