A008 Service Identifier filter returns 404 for REFERRALS_FOR_REVIEW

I am using both Postman and swagger to test the implementation of the A008 Referrals for Review API. According the the SCHEME there is a “service” filter to allow the use of service identifier. Using the example value of 11012, only 404 is returned.

here is the following curl

curl -X 'POST' \
  'https://sandbox.api.service.nhs.uk/referrals/FHIR/STU3/ReferralRequest/$ers.fetchworklist' \
  -H 'accept: application/fhir+json' \
  -H 'NHSD-End-User-Organisation-ODS: R69' \
  -H 'NHSD-eRS-Business-Function: SERVICE_PROVIDER_CLINICIAN' \
  -H 'X-Correlation-ID: 11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA' \
  -H 'Content-Type: application/fhir+json' \
  -d '{
  "resourceType": "Parameters",
  "meta": {
    "profile": [
      "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-Parameters-1"
    ]
  },
  "parameter": [
    {
      "name": "listType",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralListSelector-1",
            "code": "REFERRALS_FOR_REVIEW"
          }
        ]
      }
    },
    {
      "name": "service",
      "valueReference": {
        "identifier":{
         "system": "http://fhir.nhs.net/Id/ers-service",
          "value": "11012" }
       }
    }
  ]
}'

Hi Peter,

Thanks for getting in touch.
You mentioned Referrals for Review API.

Just to confirm, are you using the e-Referral Service - FHIR API here?

I can confirm that the Review API is e-Referral Service - FHIR API - NHS Digital which gives this swagger example https://digital.nhs.uk/developer/api-catalogue/e-referral-service-fhir.trythisapi#/default/a008-retrieve-worklist

which I have set the NHSD-eRS-Business-Function as SERVICE_PROVIDER_CLINICIAN and removed the NHSD-eRS-On-Behalf-Of-User-ID.

Altering the body to add

,
        {
            "name": "service",
            "valueIdentifier": {
                "system": "http://fhir.nhs.net/Id/ers-service",
                "value": "11012"
            }
        }

Hi @peter.agambar - I have asked our technical team (e-RS FHIR API technical team) to let me know the cause of the 404. I’ll let you know as soon as I can what is said.

Thanks, Jamie.

Hi @peter.agambar - checking with tech team - they advise that only the Examples listed in the Documentation will work with the sandbox.

For filters, for A008 specifically, the sandbox has been populated with the ‘Filter by specialty’ and ‘Filter by clinician’ examples you can find in the Examples section.

If you try those, as they are documented - they should work. Let us know how that goes.

We will write up an improvement ticket to return a sandbox error instead of a 404, in this scenario though, since a 404 doesn’t help you identify that the issue is the (by design) limits of the sandbox. Hopefully a sandbox error (explaining that only certain examples are supported) will be a better user experience going forward.

I’ve replied to your email to look at next steps generally - if we get you into Integration environment for e-RS FHIR API via APIM you’ll be able to filter by anything your solution requires (anything that e-RS FHIR API can do in production), assuming the underlying test data has been created and is in an appropriate state. Let’s discuss via email.

1 Like