A007 - returns error

Hi Team,

We have patients on worklists in INT environment, calling the A008 Worklist call brings them back and can also pull attachments etc.

However, when calling the A007, we encounter an error:

{
  "fault": {
    "faultstring": "Content-Length is missing",
    "detail": {
      "errorcode": "messaging.adaptors.http.flow.LengthRequired"
    }
  }
}

The content length does not form part of the expect query as per: https://digital.nhs.uk/developer/api-catalogue/e-referral-service-fhir#post-/STU3/ReferralRequest/-ubrn-/$ers.generateCRI

Has anyone experienced a similar issue with this or is there a resolution?

Thanks

Hi @integration_uk,

If you can provide your Application ID and an example X-Correlation-ID for an affected request we can look into this for you.

Thanks,

Adam.

Hi Adam,

Thanks for picking this up, i’ve just generated a fresh test details below:

APP ID: f095941d-f948-46e7-bbe6-0a01defa6e85
X-Correlation-ID: 47B8CC17-A448-42A0-AAAF-D60F570E55CB

Time of test: Nov 8, 2024 14:54:26.780

Thank you,
Chris

Hi @integration_uk,

I can see two requests with X-Correlation-ID = 47B8CC17-A448-42A0-AAAF-D60F570E55CB.

  1. 08/11/2024 14:54:25.015 - GET Binary/47a348d5-41fc-44de-88d0-b1b77dcc5ae0 - Returned HTTP 200 (OK)
  2. 08/11/2024 14:54:26.432 - GET ReferralRequest/000049792305 - Returned HTTP 200 (OK)

These don’t appear to be calling A007 (i.e. POST ReferralRequest/{ubrn}/$ers.generateCRI)?

From our logs it looks like you have made 29 requests today all of which resulted in a HTTP 200 (OK) response.

Regards,

Adam.

Hi Adam,

I’ve just validated the url endpoint to ensure it is online from our sending application and just resent a fresh test:

url: https://int.api.service.nhs.uk/referrals/FHIR/STU3/ReferralRequest/000049790893/$ers.generateCRI

x-correlation-id: 6770B01C-0E2E-4967-9075-F8F474CD9D33

Are you able to see this request and the response which came back?

{
  "fault": {
    "faultstring": "Content-Length is missing",
    "detail": {
      "errorcode": "messaging.adaptors.http.flow.LengthRequired"
    }
  }
}

Many thanks

Issue has been resolved. As we were sending a POST request that did not require a message body, this was being set to empty by our outgoing API.

Setting this to an empty payload: ‘{ }’ resolved the error and the expected PDF is returned.

Sharing the solution in case anybody else encounters the above.