Issue Regarding Update appointment (A034, FHIR STU3)

We are working on the Update appointment (A034, FHIR STU3) API. When we are updating the appointment we are using the below curl request -

curl --location --request PUT ‘https://int.api.service.nhs.uk/referrals/FHIR/STU3/Appointment/948196153
–header ‘accept: application/fhir+json’
–header ‘content-type: application/fhir+json’
–header ‘if-match: W/“0”’
–header ‘nhsd-end-user-organisation-ods: E82665’
–header ‘nhsd-ers-business-function: REFERRING_CLINICIAN’
–header ‘Authorization: Bearer f1hOhFkK5O71DnoPCa4JBE9MH8El’
–data ‘{
“id”: “948196153”,
“meta”: {
“versionId”: “0”,
“profile”: [
FHIR Reference Server eRS-Appointment-1”,
HL7 UK FHIR Reference Server
]
},
“language”: “en”,
“resourceType”: “Appointment”,
“status”: “cancelled”,
“reason”: [
{
“coding”: [
{
“system”: “https://int.api.service.nhs.uk/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON”,
“code”: “PATIENT_ILL”
}
]
}
],
“description”: “e-Referral Appointment”,
“incomingReferral”: [
{
“reference”: “ReferralRequest/000049792221/_history/6”
}
],
“participant”: [
{
“actor”: {
“identifier”: {
“system”: “http://fhir.nhs.net/Id/ers-service”,
“value”: “6708762”
}
},
“status”: “accepted”
},
{
“actor”: {
“identifier”: {
“system”: “http://fhir.nhs.net/Id/nhs-number”,
“value”: “9651258829”
}
},
“status”: “accepted”
},
{
“type”: {
“coding”: [
{
“system”: “Valueset-encounter-participant-type - FHIR v5.0.0”,
“code”: “CON”
}
]
},
“actor”: {
“identifier”: {
“system”: “http://fhir.nhs.net/Id/sds-user-id”,
“value”: “100258351989”
}
},
“status”: “accepted”
}
]
}’

I’m encountering an issue while working with a FHIR Appointment resource that is resulting in an error regarding a missing mandatory field. The error returned is as follows:
{
“meta”: {
“profile”: [
FHIR Reference Server eRS-OperationOutcome-1
]
},
“resourceType”: “OperationOutcome”,
“issue”: [
{
“severity”: “error”,
“code”: “required”,
“details”: {
“coding”: [
{
“code”: “MISSING_VALUE”,
“system”: “FHIR Reference Server eRS API Error Code”,
“display”: “A mandatory input field is missing”
}
]
},
“diagnostics”: “‘reason’ is mandatory, but was not supplied”
}
]
}

Please help regarding this issue.

Hi @mkumar,

It is unable to find the “reason” as the system provided isn’t as expected.

You provided:
https://int.api.service.nhs.uk/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON

But we expect:
https://int.api.service.nhs.uk/referrals/FHIR/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON

See Environments and testing for environment base paths.

Regards,

Adam.

Thanks @adam.oldfield, the error is resolved.