Details the Book an Appointment functionality required
Important: Site under development by NHS Digital, It is advised not to develop against these specifications until a formal announcement has been made.
Use case
Important: The Appointment Management capability pack is aimed at administration of a patient’s appointments. Initially the capability has been restricted to booking appointments.
Prerequisites
- The consumer SHALL have previously traced the patient’s NHS Number using the Personal Demographics Service or an equivalent service.
- Identify the HealthcareService Id.
- Identify the FHIR endpoint of the HealthcareService.
- i.e. the consumer SHALL have previously resolved the organisation’s FHIR® endpoint base URL through the Spine Directory Service
Process/flow
- Create an
Appointment
for the chosenSlot
andPatient
resources.
Security
- utilises TLS Mutual Authentication for system level authorization.
- utilises a JSON Web Token (JWT) to transmit clinical Consumer system identity and authorisation details.
Request operation
FHIR® relative request
POST /Appointment
Payload request body
Consumer systems:
- SHALL send an
Appointment
resource that conforms to the CareConnect-Appointment-1 profile.
The following data elements are mandatory (that is, data MUST be present):
- a participant with an actor of type patient, providing details of the patient.
- the status identifying the appointment as “booked”.
- the slot reference(s) as supplied by the provider system of one or more slots to be booked.
Error handling
Provider systems:
- SHALL return a http status “422” with an error message “DUPLICATE_REJECTED” when an appointment can not be booked because the referenced slots within the appointment resource no longer have the status
free
, if for example the slot has already been booked since it was returned as free from a “search for free slots”. - SHALL return an
Operation Outcome
resource that provides additional detail when one or more request fields are corrupt or a specific business rule/constraint is breached.
For example:
- one or more of the requested
Slot
resources does not exist or already has astatus
of busy (the selected Slot may have been booked since the Slot was last returned).
Request response
Response headers
Provider systems are not expected to add any specific headers beyond that described in the HTTP and FHIR® standards.
Payload response body
Provider systems:
- SHALL return a
201
Created HTTP status code on successful execution of the operation. - SHALL return an
Appointment
resource that conform to the CareConnect-Appointment-1 profile.
Example
A reference to an optional DocumentReference is included in the example as a contained resource.
{
"resourceType": "Appointment",
"id": "123123",
"meta": {
"profile": [
"https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1"
]
},
"contained": [
{
"resourceType": "DocumentReference",
"id": "123444",
"identifier": {
"system": "uuid",
"value": "A709A442-3CF4-476E-8377-376500E829C9"
},
"status": "current",
"type": {
"coding": [
{
"system": "urn:oid:2.16.840.1.113883.2.1.3.2.4.18.17",
"code": "POCD_MT200001GB02",
"display": "Integrated Urgent Care Report"
}
]
},
"indexed": "2018-12-20T09:43:41+11:00",
"content": [
{
"attachment": {
"contentType": "application/hl7-v3+xml",
"language": "en"
}
}
]
}
],
"contained": [
{
"resourceType": "Patient",
"id": "199999",
"meta": {
"profile": [ "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Patient-1" ]
},
"identifier": [
{
"extension": [
{
"url": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-NHSNumberVerificationStatus-1",
"valueCodeableConcept": {
"coding": [
{
"system": "https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-NHSNumberVerificationStatus-1",
"code": "01",
"display": "Number present and verified"
}
]
}
}
],
"use": "official",
"system": "https://demographics.spineservices.nhs.uk/",
"value": "1231231234"
}
],
"name": [
{
"use": "official",
"prefix": "Mr",
"given": "Mike",
"family": "Smith"
}
],
"telecom": [
{
"system": "phone",
"value": "01234 567 890",
"use": "home",
}
],
"gender": "male",
"birthDate": "1974-12-25",
"address": [
{
"use": "home",
"text": "123 High Street, Leeds LS1 4HR",
"line": [
"123 High Street",
"Leeds"
],
"city": "Leeds",
"postalCode": "LS1 4HR"
}
]
}
],
"status": "booked",
"supportingInformation": [
{
"reference": "DocumentReference/123444"
}
],
"description": "Free text description.",
"slot": [
{
"reference": "Slot/1",
"display": "Slot 1"
}
],
"created": "2017-10-09T13:48:41+01:00",
"comment": "Free text comment.",
"participant": [
{
"actor": {
"reference": "Patient/199999",
"display": "Mr Mike Smith"
},
"required": "required"
"status": "accepted"
}
]
}