A042 Attachment Status

Hi

We are in the process of making changes to use A042 rather than A005 for pulling attachments.

Documentation tells us that an attachment can be in one of 4 states:

  1. AVAILABLE - the file is available for download.

  2. PENDING - the file is being scanned and cannot be retrieved.

  3. VALIDATION_FAILED - the file has failed validation and cannot be retrieved.

  4. THREATS_FOUND - the file has been quarantined after detecting a threat and cannot be retrieved.

We have included logic in our processing to only pull referral details if all attachments are in a status of ‘available’. However, that does raise the question of how attachments in a state of ‘validation failed’ and ‘threats found’ will be handled in eRS.

Will files not in an available state be visible to us? Will failed files remain in that state? Will the referrer be prompted to upload again? Will they be removed from eRS?

If the non-available files are not visible, is there any way to tell that all attachments have been processed?

I hope that makes sense.

Thanks.

Hi Phil,

From the API documentation and internal implementation:

Attachments that are not AVAILABLE are still returned when retrieving referral details – they will appear with their AvailabilityStatus (e.g. PENDING, VALIDATION_FAILED, THREATS_FOUND). They just cannot be downloaded until the status is AVAILABLE.

PENDING means the file is still being scanned. The guidance is to wait at least 5 minutes and check again.

VALIDATION_FAILED and THREATS_FOUND are terminal states. The file is moved to a separate quarantine/invalid storage location and will not transition to AVAILABLE.

There is no automatic prompt via the API for the referrer to re-upload. The guidance is to use the attachment metadata (e.g. AttachedBy / AttachedByOrganisation) to contact the uploading organisation if the file is needed.

These files are not removed from eRS – the attachment metadata remains visible on the referral, but the file itself is not downloadable.

You can determine when processing is complete by checking the AvailabilityStatus of each attachment returned. If any are PENDING, scanning is still in progress; if all are AVAILABLE then they are ready for download.

Thanks,

George

Hi George

Many thanks for the update. I do have a couple of additional questions:

  • It seems the expectation is that any VALIDATION_FAILED and THREATS_FOUND documents are reported back to the referrer by individual Trusts - is there a reason why this is not done by eRS? There seems to be potential for introducing a delay to the vetting of the referral, which is a safety concern. How do other Trusts manage this part of the process?
  • For VALIDATION_FAILED and THREATS_FOUND documents, is there an option for the referrer to replace the failed attachments, rather than them remaining in a failed state? This would make it clearer when all attachments were ready to be downloaded.
  • If the answer to the above is no, presumably we will need to have someone download the re-uploaded attachments from eRS and manually upload them into our ePR?
  • For any that are PENDING, guidance is to check again after five minutes. However, I understood that we are limited to calling the API only twice a day. If this is the case, and we have to wait until the next run to check again, does that introduce a safety issue in delaying the download of the referral?

Thanks

Phil