We are facing issue while booking the appointment. We are following the standard process of calling the “Retrieve Appointment (A038, FHIR STU3)” API to fetch available slots before attempting to book an appointment. However, we have encountered intermittent issues where sometimes the booking is successful, but other times we receive the following error response:
{
“meta”: {
“profile”: [
“FHIR Reference Server eRS-OperationOutcome-1”
]
},
“resourceType”: “OperationOutcome”,
“issue”: [
{
“severity”: “error”,
“code”: “business-rule”,
“details”: {
“coding”: [
{
“code”: “INAPPROPRIATE_SLOT”,
“system”: “FHIR Reference Server eRS API Error Code”,
“display”: “The slot provided is not suitable”
}
]
},
“diagnostics”: “The slot provided is not suitable. Perform a Slot Search with the current Search Criteria to progress”
}
]
}
Why a slot might be considered “inappropriate” after being retrieved as available?
Please provide the X-Correlation-ID of an example request (or examples) where this error was returned. We can then look into it further for you.
It is possible that between finding the slot and attempting to book it that the slot has been taken by someone else. If you can provide tracing IDs we can look into it further.
There is also a chance this relates to Commissioning. Please ensure the value provided in the NHSD-eRS-Comm-Rule-Org header on A015 is the value retrieved from A005 from Extension-eRS-Commissioning-Rule-Org-1. If the wrong value is provided it is possible A015 returns a slot that isn’t applicable in the context of the Referral.
Thanks for the information @mkumar. I can see the issue now.
The Referral identified by UBRN 000049792437 is ROUTINE Priority, but your are call to A015 is asking for URGENT appointment slots.
This means A015 will return both URGENT and ROUTINE slots (2WW > URGENT > ROUTINE).
The slot selected for booking (25668997) is an URGENT slot. An URGENT slot cannot be booked to a ROUTINE referral request.
When searching for slots using A015 you should provide the priority of the referral request in the appointmentType query parameter to ensure you only receive slots that are appropriate for the referral.