Hello e-RS Team,
When we are updating the appointment we are passing below JSON{
“id”: “948185773”,
“meta”: {
“versionId”: “1”,
“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/000049765227/_history/6”
}
],
“participant”: [
{
“actor”: {
“identifier”: {
“system”: “http://fhir.nhs.net/Id/ers-service”,
“value”: “6709596”
},
“display”: “CardioVascular”
},
“status”: “accepted”
},
{
“actor”: {
“identifier”: {
“system”: “http://fhir.nhs.net/Id/nhs-number”,
“value”: “9728338449”
}
},
“status”: “accepted”
}
]
}
and facing the error below
{“meta”:{“profile”:[“https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1"]},“resourceType”:“OperationOutcome”,“issue”:[{“severity”:“error”,“code”:“required”,“details”:{“coding”:[{“code”:“MISSING_VALUE”,“system”:“https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1”,“display”:"A mandatory input field is missing”}]},“diagnostics”:“‘participant[2]’ is mandatory, but was not supplied for ‘cancel’”}]}
Please guide us to resolve the issue.
When updating an appointment the Appointment resource must match the Appointment resource being updated. The only fields that can differ are the reason, comment, status, slot, start and end - these are the fields that need to be changed to perform a cancellation.
Please check if the Appointment is booked to a slot with a named clinician? If so the Appointment must have the clinician as a participant and this participant must be included when updating the appointment.
See “Booking with Named clinician” request example on ## A016 - Book or defer appointment for an example of an Appointment with a named clinician.
Hello @adam.oldfield,
Could you please share the sample JSON for the Update Appointment (A034) API.
Hi @supplier,
If the booking was to a slot with a named clinician then this clinician must be included in the Appointment participant list when cancelling. As mentioned above the A016 example details how to create an appointment with a named clinician.
Something like the following (replacing the sds-user-id as appropriate):
{
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/ValueSet/encounter-participant-type",
"code": "CON"
}
]
},
"actor": {
"identifier": {
"system": "http://fhir.nhs.net/Id/sds-user-id",
"value": "021600556514"
}
},
"status": "accepted"
}
hi @adam.oldfield , We have tried earlier but facing
receiving below error :-
{
“meta”: {
“profile”: [
“FHIR Reference Server eRS-OperationOutcome-1”
]
},
“resourceType”: “OperationOutcome”,
“issue”: [
{
“severity”: “error”,
“code”: “business-rule”,
“details”: {
“coding”: [
{
“code”: “INAPPROPRIATE_VALUE”,
“system”: “FHIR Reference Server eRS API Error Code”,
“display”: “Inappropriate value”
}
]
},
“diagnostics”: “‘participant[2].actor.identifier.value’ value cannot be updated”
}
]
}
Can you please post request and response details for each step in the flow? Including URL, request headers/payload, response headers/payload.
Including:
- A015 - Retrieve appointment slots
- A016 - Book or defer appointment
- A034 - Update appointment
Thanks.
Hello @adam.oldfield I have pasted the endpoints request body and response body
RetrieveAppointmentSlot (A015)
`Integration URL:- https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot?schedule.actor%3AHealthcareService=6709699&appointmentType=ROUTINE&status=free&_count=5&page=1
Retrieve Appointment Slot API Headers:- [{“key”:“X-Request-ID”,“response”:“fdc0d36d-408c-4b36-ab63-7b6372252fa5”},{“key”:“Event-Date-and-Time”,“response”:“2024-03-04 06:09:38.SSS”},{“key”:“Unique-User-Identifier”,“response”:“555290241101”},{“key”:“NHS-Number”,“response”:“9728338449”},{“key”:“Unique-Booking-Reference-Number”,“response”:“000049775698”},{“key”:“NHSD-End-User-Organisation-ODS”,“response”:“D82626”},{“key”:“NHSD-eRS-Business-Function”,“response”:“REFERRING_CLINICIAN”},{“key”:“NHSD-eRS-Comm-Rule-Org”,“response”:“R68”}]
Response Body:- {“Request”:{“AllowedDecompressionMethods”:[0,2,1],“AlwaysMultipartFormData”:false,“JsonSerializer”:null,“XmlSerializer”:null,“Body”:null,“ResponseWriter”:null,“AdvancedResponseWriter”:null,“UseDefaultCredentials”:false,“Parameters”:[{“Name”:“Authorization”,“Value”:“Bearer awMS65ulGRvqw2xy6GKJoyeQhvOo”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Accept”,“Value”:“application/fhir+json”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Correlation-ID”,“Value”:“7bb01629-8058-4feb-b935-b2736362e49c”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Request-ID”,“Value”:“fdc0d36d-408c-4b36-ab63-7b6372252fa5”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Event-Date-and-Time”,“Value”:“2024-03-04 06:09:38.SSS”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Unique-User-Identifier”,“Value”:“555290241101”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“NHS-Number”,“Value”:“9728338449”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Unique-Booking-Reference-Number”,“Value”:“000049775698”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“NHSD-End-User-Organisation-ODS”,“Value”:“D82626”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“NHSD-eRS-Business-Function”,“Value”:“REFERRING_CLINICIAN”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“NHSD-eRS-Comm-Rule-Org”,“Value”:“R68”,“Type”:3,“DataFormat”:2,“ContentType”:null}],“Files”:,“Method”:0,“Resource”:null,“RequestFormat”:1,“RootElement”:null,“OnBeforeDeserialization”:{“Method”:{“Name”:“<.ctor>b__4_0”,“AssemblyName”:“RestSharp, Version=106.11.7.0, Culture=neutral, PublicKeyToken=598062e77f915f75”,“ClassName”:“RestSharp.RestRequest+<>c”,“Signature”:“Void <.ctor>b__4_0(RestSharp.IRestResponse)”,“Signature2”:“System.Void <.ctor>b__4_0(RestSharp.IRestResponse)”,“MemberType”:8,“GenericArguments”:null},“Target”:{}},“OnBeforeRequest”:{“Method”:{“Name”:“<.ctor>b__4_1”,“AssemblyName”:“RestSharp, Version=106.11.7.0, Culture=neutral, PublicKeyToken=598062e77f915f75”,“ClassName”:“RestSharp.RestRequest+<>c”,“Signature”:“Void <.ctor>b__4_1(RestSharp.IHttp)”,“Signature2”:“System.Void <.ctor>b__4_1(RestSharp.IHttp)”,“MemberType”:8,“GenericArguments”:null},“Target”:{}},“DateFormat”:null,“XmlNamespace”:null,“Credentials”:null,“Timeout”:0,“ReadWriteTimeout”:0,“Attempts”:1},“ContentType”:“application/fhir+json”,“ContentLength”:-1,“ContentEncoding”:“”,“Content”:“{"id":"97de7a70-b22a-425b-8582-45bce2e6ba3b","meta":{"lastUpdated":"2024-03-04T06:09:39.267Z","profile":["http://hl7.org/fhir/STU3/StructureDefinition/Bundle\“]},\“resourceType\”:\“Bundle\”,\“type\”:\“searchset\”,\“total\”:97,\“link\”:[{\“relation\”:\“self\”,\“url\”:\“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot?schedule.actor%3AHealthcareService=6709699&appointmentType=ROUTINE&_count=5&status=free&_include=Slot%3Aschedule&page=1\”},{\“relation\”:\“next\”,\“url\”:\“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot?schedule.actor%3AHealthcareService=6709699&appointmentType=ROUTINE&_count=5&status=free&_include=Slot%3Aschedule&page=2\”}],\“entry\”:[{\“fullUrl\”:\“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot/25316342\”,\“resource\”:{\“id\”:\“25316342\”,\“meta\”:{\“profile\”:[\“https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1\”]},\“resourceType\”:\“Slot\”,\“identifier\”:[{\“system\”:\“https://fhir.nhs.uk/Id/alternative-slot\”,\“value\”:\“2403160003450820010120\”}],\“schedule\”:{\“reference\”:\“Schedule/6709699-100258351989\”},\“status\”:\“free\”,\“start\”:\“2024-03-16T08:20:00.000Z\”,\“end\”:\“2024-03-16T08:39:00.000Z\”},\“search\”:{\“mode\”:\“match\”}},{\“fullUrl\”:\“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot/25316435\”,\“resource\”:{\“id\”:\“25316435\”,\“meta\”:{\“profile\”:[\“https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1\”]},\“resourceType\”:\“Slot\”,\“identifier\”:[{\“system\”:\“https://fhir.nhs.uk/Id/alternative-slot\”,\“value\”:\“2403170003450820010120\”}],\“schedule\”:{\“reference\”:\“Schedule/6709699-100258351989\”},\“status\”:\“free\”,\“start\”:\“2024-03-17T08:20:00.000Z\”,\“end\”:\“2024-03-17T08:39:00.000Z\”},\“search\”:{\“mode\”:\“match\”}},{\“fullUrl\”:\“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot/25316407\”,\“resource\”:{\“id\”:\“25316407\”,\“meta\”:{\“profile\”:[\“https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1\”]},\“resourceType\”:\“Slot\”,\“identifier\”:[{\“system\”:\“https://fhir.nhs.uk/Id/alternative-slot\”,\“value\”:\“2403180003450820010120\”}],\“schedule\”:{\“reference\”:\“Schedule/6709699-100258351989\”},\“status\”:\“free\”,\“start\”:\“2024-03-18T08:20:00.000Z\”,\“end\”:\“2024-03-18T08:39:00.000Z\”},\“search\”:{\“mode\”:\“match\”}},{\“fullUrl\”:\“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot/25316347\”,\“resource\”:{\“id\”:\“25316347\”,\“meta\”:{\“profile\”:[\“https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1\”]},\“resourceType\”:\“Slot\”,\“identifier\”:[{\“system\”:\“https://fhir.nhs.uk/Id/alternative-slot\”,\“value\”:\“2403190003450820010120\”}],\“schedule\”:{\“reference\”:\“Schedule/6709699-100258351989\”},\“status\”:\“free\”,\“start\”:\“2024-03-19T08:20:00.000Z\”,\“end\”:\“2024-03-19T08:39:00.000Z\”},\“search\”:{\“mode\”:\“match\”}},{\“fullUrl\”:\“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot/25316460\”,\“resource\”:{\“id\”:\“25316460\”,\“meta\”:{\“profile\”:[\“https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1\”]},\“resourceType\”:\“Slot\”,\“identifier\”:[{\“system\”:\“https://fhir.nhs.uk/Id/alternative-slot\”,\“value\”:\“2403200003450820010120\”}],\“schedule\”:{\“reference\”:\“Schedule/6709699-100258351989\”},\“status\”:\“free\”,\“start\”:\“2024-03-20T08:20:00.000Z\”,\“end\”:\“2024-03-20T08:39:00.000Z\”},\“search\”:{\“mode\”:\“match\”}},{\“fullUrl\”:\“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Schedule/6709699-100258351989\”,\“resource\”:{\“id\”:\“6709699-100258351989\”,\“meta\”:{\“profile\”:[\“https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Schedule-1\”]},\“resourceType\”:\“Schedule\”,\“identifier\”:[{\“system\”:\“https://fhir.nhs.uk/Id/ers-schedule\”,\“value\”:\“6709699-100258351989\”}],\“actor\”:[{\“identifier\”:{\“system\”:\“http://fhir.nhs.net/Id/ers-service\”,\“value\”:\“6709699\”}},{\“identifier\”:{\“system\”:\“http://fhir.nhs.net/Id/sds-user-id\”,\“value\”:\“100258351989\”}}]},\“search\”:{\“mode\”:\“include\”}}]}”,“StatusCode”:200,“IsSuccessful”:true,“StatusDescription”:”",“ResponseUri”:“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot?schedule.actor%3AHealthcareService=6709699&appointmentType=ROUTINE&status=free&_count=5&page=1",“Server”:“”,“Cookies”:[],“Headers”:[{“Name”:“Transfer-Encoding”,“Value”:“chunked”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Connection”,“Value”:“keep-alive”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Content-Type-Options”,“Value”:“nosniff”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-XSS-Protection”,“Value”:"1; mode=block”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Pragma”,“Value”:“no-cache”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Frame-Options”,“Value”:“DENY”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Strict-Transport-Security”,“Value”:“max-age=31536000; includeSubDomains”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Kong-Upstream-Latency”,“Value”:“83”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Kong-Proxy-Latency”,“Value”:“0”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Kong-Request-Id”,“Value”:“e40bf554a722981e109db02336307238”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Request-ID”,“Value”:“11916a9a-0a03-441e-962e-1f70f59efdc2-1”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Correlation-ID”,“Value”:“7bb01629-8058-4feb-b935-b2736362e49c”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Cache-Control”,“Value”:“no-cache, no-store, max-age=0, must-revalidate”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Content-Type”,“Value”:“application/fhir+json”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Date”,“Value”:“Mon, 04 Mar 2024 06:09:39 GMT”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Expires”,“Value”:“0”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Via”,“Value”:“kong/3.5.0”,“Type”:3,“DataFormat”:2,“ContentType”:null}],“ResponseStatus”:1,“ErrorMessage”:null,“ErrorException”:null,“ProtocolVersion”:{“Major”:1,“Minor”:1,“Build”:-1,“Revision”:-1,“MajorRevision”:-1,“MinorRevision”:-1}}`
BookOrDeferAppointment (A016)
Request Body :- {
“id”: “appointment”,
“meta”: {
“profile”: [
“FHIR Reference Server eRS-Appointment-1”,
“HL7 UK FHIR Reference Server”
]
},
“language”: “en”,
“resourceType”: “Appointment”,
“status”: “booked”,
“description”: “e-Referral Appointment”,
“start”: “2024-03-16T08:20:00Z”,
“end”: “2024-03-16T08:39:00Z”,
“slot”: [
{
“reference”: “Slot/25316342”
}
],
“incomingReferral”: [
{
“reference”:“ReferralRequest/000049775698/_history/4”
}
],
“participant”: [
{“actor”: {
“identifier”: {
“system”: “http://fhir.nhs.net/Id/ers-service”,
“value”: “6709699”
}
},
“status”: “accepted”
},
{
“actor”: {
“identifier”: {
“system”: “http://fhir.nhs.net/Id/nhs-number”,
“value”: “9728338449”
}
},
“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”
}
]
}
Integration URL:- https://int.api.service.nhs.uk/referrals/FHIR/STU3/Appointment
Book or Defer Appointment API Headers:- [{“key”:“X-Request-ID”,“response”:“fdc0d36d-408c-4b36-ab63-7b6372252fa5”},{“key”:“Event-Date-and-Time”,“response”:“2024-03-04 06:09:51.SSS”},{“key”:“Unique-User-Identifier”,“response”:“555290241101”},{“key”:“NHS-Number”,“response”:“9728338449”},{“key”:“Unique-Booking-Reference-Number”,“response”:“000049775698”},{“key”:“NHSD-End-User-Organisation-ODS”,“response”:“D82626”},{“key”:“NHSD-eRS-Business-Function”,“response”:“REFERRING_CLINICIAN”}]
Reponse Body :-
{“Request”:{“AllowedDecompressionMethods”:[0,2,1],“AlwaysMultipartFormData”:false,“JsonSerializer”:null,“XmlSerializer”:null,“Body”:{“ContentType”:null,“Name”:“application/fhir+json”,“Value”:“{\r\n "id": "appointment",\r\n "meta": {\r\n "profile": [\r\n "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1\”,\r\n "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1\“\r\n ]\r\n }, \r\n "language": "en",\r\n "resourceType": "Appointment",\r\n "status": "booked",\r\n "description": "e-Referral Appointment",\r\n "start": "2024-03-16T08:20:00Z",\r\n "end": "2024-03-16T08:39:00Z",\r\n "slot": [\r\n {\r\n "reference": "Slot/25316342"\r\n }\r\n ],\r\n "incomingReferral": [\r\n {\r\n "reference":"ReferralRequest/000049775698/_history/4"\r\n }\r\n ],\r\n "participant": [\r\n {"actor": {\r\n "identifier": {\r\n "system": "http://fhir.nhs.net/Id/ers-service\”,\r\n "value": "6709699"\r\n } \r\n },\r\n "status": "accepted"\r\n },\r\n {\r\n "actor": {\r\n "identifier": {\r\n "system": "http://fhir.nhs.net/Id/nhs-number\“,\r\n "value": "9728338449"\r\n }\r\n },\r\n "status": "accepted"\r\n },\r\n {\r\n "type": {\r\n "coding": [\r\n {\r\n "system": "Valueset-encounter-participant-type - FHIR v5.0.0”,\r\n "code": "CON"\r\n }\r\n ]\r\n },\r\n "actor": {\r\n "identifier": {\r\n "system": "http://fhir.nhs.net/Id/sds-user-id\“,\r\n "value": "100258351989"\r\n }\r\n },\r\n "status": "accepted"\r\n }\r\n ]\r\n }”},“ResponseWriter”:null,“AdvancedResponseWriter”:null,“UseDefaultCredentials”:false,“Parameters”:[{“Name”:“application/fhir+json”,“Value”:“{\r\n "id": "appointment",\r\n "meta": {\r\n "profile": [\r\n "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1\”,\r\n "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1\“\r\n ]\r\n }, \r\n "language": "en",\r\n "resourceType": "Appointment",\r\n "status": "booked",\r\n "description": "e-Referral Appointment",\r\n "start": "2024-03-16T08:20:00Z",\r\n "end": "2024-03-16T08:39:00Z",\r\n "slot": [\r\n {\r\n "reference": "Slot/25316342"\r\n }\r\n ],\r\n "incomingReferral": [\r\n {\r\n "reference":"ReferralRequest/000049775698/_history/4"\r\n }\r\n ],\r\n "participant": [\r\n {"actor": {\r\n "identifier": {\r\n "system": "http://fhir.nhs.net/Id/ers-service\”,\r\n "value": "6709699"\r\n } \r\n },\r\n "status": "accepted"\r\n },\r\n {\r\n "actor": {\r\n "identifier": {\r\n "system": "http://fhir.nhs.net/Id/nhs-number\“,\r\n "value": "9728338449"\r\n }\r\n },\r\n "status": "accepted"\r\n },\r\n {\r\n "type": {\r\n "coding": [\r\n {\r\n "system": "Valueset-encounter-participant-type - FHIR v5.0.0”,\r\n "code": "CON"\r\n }\r\n ]\r\n },\r\n "actor": {\r\n "identifier": {\r\n "system": "http://fhir.nhs.net/Id/sds-user-id\“,\r\n "value": "100258351989"\r\n }\r\n },\r\n "status": "accepted"\r\n }\r\n ]\r\n }”,“Type”:4,“DataFormat”:2,“ContentType”:null},{“Name”:“Authorization”,“Value”:“Bearer cwSHRlE22wBRT1tVNuCCtErnJbuu”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Accept”,“Value”:“application/fhir+json”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Correlation-ID”,“Value”:“2e112975-0a7f-4855-b44f-84ef537c4c4e”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Request-ID”,“Value”:“fdc0d36d-408c-4b36-ab63-7b6372252fa5”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Event-Date-and-Time”,“Value”:“2024-03-04 06:09:51.SSS”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Unique-User-Identifier”,“Value”:“555290241101”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“NHS-Number”,“Value”:“9728338449”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Unique-Booking-Reference-Number”,“Value”:“000049775698”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“NHSD-End-User-Organisation-ODS”,“Value”:“D82626”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“NHSD-eRS-Business-Function”,“Value”:“REFERRING_CLINICIAN”,“Type”:3,“DataFormat”:2,“ContentType”:null}],“Files”:,“Method”:1,“Resource”:null,“RequestFormat”:1,“RootElement”:null,“OnBeforeDeserialization”:{“Method”:{“Name”:“<.ctor>b__4_0”,“AssemblyName”:“RestSharp, Version=106.11.7.0, Culture=neutral, PublicKeyToken=598062e77f915f75”,“ClassName”:“RestSharp.RestRequest+<>c”,“Signature”:“Void <.ctor>b__4_0(RestSharp.IRestResponse)”,“Signature2”:“System.Void <.ctor>b__4_0(RestSharp.IRestResponse)”,“MemberType”:8,“GenericArguments”:null},“Target”:{}},“OnBeforeRequest”:{“Method”:{“Name”:“<.ctor>b__4_1”,“AssemblyName”:“RestSharp, Version=106.11.7.0, Culture=neutral, PublicKeyToken=598062e77f915f75”,“ClassName”:“RestSharp.RestRequest+<>c”,“Signature”:“Void <.ctor>b__4_1(RestSharp.IHttp)”,“Signature2”:“System.Void <.ctor>b__4_1(RestSharp.IHttp)”,“MemberType”:8,“GenericArguments”:null},“Target”:{}},“DateFormat”:null,“XmlNamespace”:null,“Credentials”:null,“Timeout”:0,“ReadWriteTimeout”:0,“Attempts”:1},“ContentType”:“application/fhir+json”,“ContentLength”:-1,“ContentEncoding”:“”,“Content”:“{"id":"948188457","meta":{"versionId":"0","profile":["https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1\",\“https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1\”]},\“language\”:\“en\”,\“resourceType\”:\“Appointment\”,\“status\”:\“booked\”,\“description\”:\"e-Referral Appointment","start":"2024-03-16T08:20:00.000Z","end":"2024-03-16T08:39:00.000Z","slot":[{"reference":"Slot/25316342"}],"created":"2024-03-04T06:09:57.772Z","incomingReferral":[{"reference":"ReferralRequest/000049775698/_history/6"}],"participant":[{"actor":{"identifier":{"system":"http://fhir.nhs.net/Id/ers-service\“,\“value\”:\“6709699\”},\“display\”:\“cardioVascular1\”},\“status\”:\“accepted\”},{\“actor\”:{\“identifier\”:{\“system\”:\“http://fhir.nhs.net/Id/nhs-number\”,\“value\”:\“9728338449\”}},\“status\”:\“accepted\”},{\“type\”:{\“coding\”:[{\“code\”:\“CON\”,\“system\”:\“http://hl7.org/fhir/ValueSet/encounter-participant-type\”}]},\“actor\”:{\“identifier\”:{\“system\”:\“http://fhir.nhs.net/Id/sds-user-id\”,\“value\”:\“100258351989\”}},\“status\”:\“accepted\”}]}”,“StatusCode”:201,“IsSuccessful”:true,“StatusDescription”:”",“RawBytes”:“eyJpZCI6Ijk0ODE4ODQ1NyIsIm1ldGEiOnsidmVyc2lvbklkIjoiMCIsInByb2ZpbGUiOlsiaHR0cHM6Ly9maGlyLm5ocy51ay9TVFUzL1N0cnVjdHVyZURlZmluaXRpb24vZVJTLUFwcG9pbnRtZW50LTEiLCJodHRwczovL2ZoaXIuaGw3Lm9yZy51ay9TVFUzL1N0cnVjdHVyZURlZmluaXRpb24vQ2FyZUNvbm5lY3QtQXBwb2ludG1lbnQtMSJdfSwibGFuZ3VhZ2UiOiJlbiIsInJlc291cmNlVHlwZSI6IkFwcG9pbnRtZW50Iiwic3RhdHVzIjoiYm9va2VkIiwiZGVzY3JpcHRpb24iOiJlLVJlZmVycmFsIEFwcG9pbnRtZW50Iiwic3RhcnQiOiIyMDI0LTAzLTE2VDA4OjIwOjAwLjAwMFoiLCJlbmQiOiIyMDI0LTAzLTE2VDA4OjM5OjAwLjAwMFoiLCJzbG90IjpbeyJyZWZlcmVuY2UiOiJTbG90LzI1MzE2MzQyIn1dLCJjcmVhdGVkIjoiMjAyNC0wMy0wNFQwNjowOTo1Ny43NzJaIiwiaW5jb21pbmdSZWZlcnJhbCI6W3sicmVmZXJlbmNlIjoiUmVmZXJyYWxSZXF1ZXN0LzAwMDA0OTc3NTY5OC9faGlzdG9yeS82In1dLCJwYXJ0aWNpcGFudCI6W3siYWN0b3IiOnsiaWRlbnRpZmllciI6eyJzeXN0ZW0iOiJodHRwOi8vZmhpci5uaHMubmV0L0lkL2Vycy1zZXJ2aWNlIiwidmFsdWUiOiI2NzA5Njk5In0sImRpc3BsYXkiOiJjYXJkaW9WYXNjdWxhcjEifSwic3RhdHVzIjoiYWNjZXB0ZWQifSx7ImFjdG9yIjp7ImlkZW50aWZpZXIiOnsic3lzdGVtIjoiaHR0cDovL2ZoaXIubmhzLm5ldC9JZC9uaHMtbnVtYmVyIiwidmFsdWUiOiI5NzI4MzM4NDQ5In19LCJzdGF0dXMiOiJhY2NlcHRlZCJ9LHsidHlwZSI6eyJjb2RpbmciOlt7ImNvZGUiOiJDT04iLCJzeXN0ZW0iOiJodHRwOi8vaGw3Lm9yZy9maGlyL1ZhbHVlU2V0L2VuY291bnRlci1wYXJ0aWNpcGFudC10eXBlIn1dfSwiYWN0b3IiOnsiaWRlbnRpZmllciI6eyJzeXN0ZW0iOiJodHRwOi8vZmhpci5uaHMubmV0L0lkL3Nkcy11c2VyLWlkIiwidmFsdWUiOiIxMDAyNTgzNTE5ODkifX0sInN0YXR1cyI6ImFjY2VwdGVkIn1dfQ==”,“ResponseUri”:“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Appointment",“Server”:“”,“Cookies”:[],“Headers”:[{“Name”:“Transfer-Encoding”,“Value”:“chunked”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Connection”,“Value”:“keep-alive”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Content-Type-Options”,“Value”:“nosniff”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-XSS-Protection”,“Value”:"1; mode=block”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Pragma”,“Value”:“no-cache”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Frame-Options”,“Value”:“DENY”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Strict-Transport-Security”,“Value”:“max-age=31536000; includeSubDomains”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Kong-Upstream-Latency”,“Value”:“5725”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Kong-Proxy-Latency”,“Value”:“1”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Kong-Request-Id”,“Value”:“469a4321b91a352049403f7b096e911b”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Request-ID”,“Value”:“8b188cc5-3dd0-404b-8d4e-a6a0d3341c54-1”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Correlation-ID”,“Value”:“2e112975-0a7f-4855-b44f-84ef537c4c4e”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Cache-Control”,“Value”:“no-cache, no-store, max-age=0, must-revalidate”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Content-Type”,“Value”:“application/fhir+json”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Date”,“Value”:“Mon, 04 Mar 2024 06:09:58 GMT”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Expires”,“Value”:“0”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“ETag”,“Value”:“W/"0"”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Location”,“Value”:“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Appointment/948188457/_history/0",“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Via”,“Value”:“kong/3.5.0”,“Type”:3,“DataFormat”:2,“ContentType”:null}],“ResponseStatus”:1,“ErrorMessage”:null,“ErrorException”:null,“ProtocolVersion”:{“Major”:1,“Minor”:1,“Build”:-1,“Revision”:-1,“MajorRevision”:-1,"MinorRevision”:-1}}
Update Appointment (A034)
Request Body:- {
“id”: “948188457”,
“meta”: {
“versionId”: “1”,
“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”,
“start”: “2024-03-16T08:20:00+00:00”,
“end”: “2024-03-16T08:39:00+00:00”,
“slot”: [
{
“reference”: “Slot/25316342”
}
],
“incomingReferral”: [
{
“reference”: “ReferralRequest/000049775698/_history/6”
}
],
“participant”: [
{
“actor”: {
“identifier”: {
“system”: “http://fhir.nhs.net/Id/ers-service”,
“value”: “6709699”
},
“display”: “CardioVascular1”
},
“status”: “accepted”
},
{
“actor”: {
“identifier”: {
“system”: “http://fhir.nhs.net/Id/nhs-number”,
“value”: “9728338449”
}
},
“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”
}
]
}
IntegrationURL :- https://int.api.service.nhs.uk/referrals/FHIR/STU3/Appointment/948188457
Headers:- Authorization :
Authorization= Bearer vUAExOxuWhSBFxgnA7D95i459PjV
NHSD-End-User-Organisation-ODS= D82626
NHSD-eRS-Business-Function = REFERRING_CLINICIAN
If-Match = W/“6”
id = 948188456
accept = application/fhir+json
X-Request-ID = ceb556c1-0291-47c1-a1f6-533af63cb0e2
Response Body:-
{
“meta”: {
“profile”: [
“FHIR Reference Server eRS-OperationOutcome-1”
]
},
“resourceType”: “OperationOutcome”,
“issue”: [
{
“severity”: “error”,
“code”: “business-rule”,
“details”: {
“coding”: [
{
“code”: “INAPPROPRIATE_VALUE”,
“system”: “FHIR Reference Server eRS API Error Code”,
“display”: “Inappropriate value”
}
]
},
“diagnostics”: “‘meta.versionId’ value cannot be updated”
}
]
}
And if we provide meta version Id same as Retrieve Appointment (A038) then we receive Status 409 Conflict error.
Hi @supplier,
Unfortunately I am finding it difficult to follow the examples you have provided due to the lack of formatting.
However, It seems the only thing failing is the call to update the appointment (i.e. cancel the appointment).
Regarding this please ensure the versionId provided on the update is the same as the current versionId of the appointment.
Please also ensure the “If-Match” header version (e.g. ‘W/“0”’) matches that of the meta.versionId (e.g. 0) in the request payload.
It is unclear if you still see this error. Please confirm.
Regards,
Adam.