A042 API - does it always return PDF documents?

When calling A042 (Retrieve Attachment) for the referral documents returned in A005 (retrieve referral request), does A042 only return PDF format documents? I.e. does NHS Digital convert referral documents in other formats e.g. .docx, JPEG etc into PDF format before returning them in A042 responses?

1 Like

Hello Rinaldo,

In the Sandbox example, it states that a successful responses will always return the same example PDF file. Therefore, if you are using the Sandbox example you will only be returned the same PDF file.

NHS Digital does not convert referral documents into other formats such as .docx, .JPEG etc. prior to returning the response.

In Upload file to document store (A020, FHIR STU3) there is a list of all acceptable file formats.

The files can then only be downloaded as they have been uploaded, for example:

If a .JPEG file has been uploaded, then only a .JPEG file can be downloaded. This can not be converted into another file format.

If you want to test using the full range of supported file types then you can do so in the Integration Environment which gives you access to a real e-RS instance. If you haven’t already please complete the registration form to gain access.

Thanks,
Balal

In sandbox, A042 always returns a sample PDF (for testing only).
In production/integration, A042 returns the attachment in its original format.
NHS Digital does not convert files (e.g. DOCX, JPEG) into PDF.
So the format you get is exactly what was originally uploaded.