Hi all,
Reading the documentation around the A020 (upload file to document store) - it takes in an optional NHSD-ERS-Referral-ID (ubrn) to almost “pre-associate” an upload with an existing referral.
The maintain referral letter call (A012) documentation then says " only documents that have a NHSD-eRS-Referral-ID
can be associated using this end point." and “This endpoint can be used to associate attachments to a referral that has no existing referral letter attachments”
To allow for the best error handling and to prevent unnecessary creation of referral entries, our workflow is to first upload the documents (easier to cater for failures at this point) and then only create the referral and associate those documents.
Reading the documentation - it appears like this should work, however we are getting errors on the A012 (Maintain) call (unprocessable-entity) - but if the referral is created first and then we do the upload and maintain it works fine.
The documentation in A020 also states " 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."
What we are trying is to pre-upload the documents for a (not yet existing) request we are about to create (provided all the uploads succeed)
I am just wondering if the upload-first work-flow is supported? The information seems a little vague or perhaps I am reading it in too much of a hopeful manner?