Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ Cancellation is documented for completeness. The technical functionality for can

Steps to cancel:

* Perform a [GET](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#get-/Appointment/-id-) operation using the id of the appointment to /Appointment/\{id\}. Alternatively, if the .id is not known, a search of the Registry can be undertaken with [GET DocumentReference](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#get-/DocumentReference) (searchset bundle) and selecting the Service and Appointment.id to create the read request of the Appointment resource by .id. NB: If a match cannot be performed using this method, the process of cancelling must be done manually.
* Set the Appointment.status value to "cancelled". NB - It is also permissible to update .reasonCode in the request but no other element.
* Perform a [GET](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#get-/Appointment/-id-) operation using the .id of the appointment to /Appointment/\{id\}. Alternatively, if the .id is not known, a search of the Registry can be undertaken following the {{pagelink:core-StandardPattern-document-reference-Sender-1.3.1, text: Document Reference Standard Pattern - Sender}}. NB: If a match cannot be obtained using this method the process of updating must be performed manually
* Set the Appointment.status value to "cancelled". NB - It is also permissible to update .reasonCode in the request but no other element
* Perform a [PUT](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#put-/Appointment/-id-) operation using the id of the appointment to /Appointment/\{id\}
* Once processed, the Receiver of the booking must [DELETE](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#delete-/DocumentReference/-id-) the pointer in the central Registry, as described in {{pagelink:core-StandardPattern-document-reference-Receiver-1.3.1, text: Document Reference Standard Pattern - Receiver}}

resource returned:
```json
Expand Down Expand Up @@ -81,7 +82,7 @@ Request body:
```json
{
"resourceType": "Appointment",
"id":"aca94bdb-2e38-4399-9ece-2ba083ce65b5"
"id":"aca94bdb-2e38-4399-9ece-2ba083ce65b5",
"meta": {
"lastUpdated": "2024-01-11T16:01:30.8185338+00:00",
"profile": [
Expand Down Expand Up @@ -110,5 +111,3 @@ Request body:
```

<img src="https://raw.githubusercontent.com/NHSDigital/NHSDigital-FHIR-BookingAndReferrals/main/BaRS-Images/SequenceDiagrams/BaRS_Foundation_Cancel.drawio.svg" ></img>

Once the appointment is cancelled, the Receiver is responsible for managing the pointer in the central Registry, as described in {{pagelink:core-StandardPattern-document-reference-1.3.1, text: Document Reference Standard Pattern}}.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ If undertaking a booking within the context of an Application, the guidance stat
* Confirm BaRS [Capabilities](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#get-/metadata)
* [Request Available slots](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#get-/Slot)
* Select a slot
* Perform a [PUT](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#post-/Appointment) operation to complete the booking NB: the returned Appointment.id for future operations
* Perform a [POST](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#post-/Appointment) operation to complete the booking NB: the returned Appointment.id for future operations
* Once processed, the Receiver of the booking must makes a [POST](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#post-/DocumentReference) request to create a pointer in the central Registry, as described in {{pagelink:core-StandardPattern-document-reference-Receiver-1.3.1, text: Document Reference Standard Pattern - Receiver}}

Request Body

Expand Down Expand Up @@ -52,8 +53,4 @@ Request Body
}
```

<img src="https://raw.githubusercontent.com/NHSDigital/NHSDigital-FHIR-BookingAndReferrals/main/BaRS-Images/SequenceDiagrams/BaRS_Foundation_Book.drawio.svg" ></img>

Once the appointment is created, the Receiver is responsible for managing the pointer in the central Registry, as described in {{pagelink:core-StandardPattern-document-reference-1.3.1, text: Document Reference Standard Pattern}}.


<img src="https://raw.githubusercontent.com/NHSDigital/NHSDigital-FHIR-BookingAndReferrals/main/BaRS-Images/SequenceDiagrams/BaRS_Foundation_Book.drawio.svg" ></img>
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,29 @@ topic: core-StandardPattern-appointment-Introduction-1.3.1
# Standard Pattern - Appointments

<div markdown="span" class="alert alert-warning" role="alert"><i class="fa fa-warning"></i><b>Important: Release information</b>
<p>This Section of the Implementation Guide is currently a preview, in an Alpha state and subject to change.</p>
<p>This Section of the Implementation Guide is currently a preview, in an Alpha state and subject to change. Only Internal NHSE programmes are currently permitted to build against this release. If you are interested in building against this documentation, please, contact the BaRS Team <bookingandreferralstandard@nhs.net> </p>
</div>

## Introduction

The [BaRS API](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir) suite can be used where there is no specific use-case supported by the {{pagelink:Home/Applications/BaRS-Applications, text:Applications}} to fulfil generic Appointment workflows, referred to as Appointment Management Foundation. This section outlines the functionality supported, workflows involved and how these correspond with the [API Specification](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0).

This includes using {{pagelink:core-StandardPattern-document-reference-1.3.1, text: DocumentReference Standard Pattern}} to write pointers for Appointments to a central respository, commonly referred to as the Registry.
This includes using {{pagelink:core-StandardPattern-document-reference-1.3.1, text: DocumentReference Standard Pattern}} to write pointers for bookings to a central respository, commonly referred to as the Registry.

The Appointment Management Foundation is based on {{pagelink:design-core-1.3.1, text:BaRS Core}} and an understanding of the central tenets is essential before beginning. This includes: -
* {{pagelink:core-EndToEndWorkflow-1.3.1, text:End to end workflow }} - how Senders and Receivers, interacting through the central Proxy, negotiate compatibility and engage
* {{pagelink:core-EndToEndWorkflow-ServiceDiscovery-1.3.1, text:Service Discovery }} - every workflow must include the resolution of a receiving Service Identifier
* {{pagelink:core-Security-1.3.1, text:Authentication and Authorisation }} - the central Proxy will handle Authentication but Authorisation is handled by Receivers
* {{pagelink:onboarding, text:Onboarding to environments }} - getting access to the central Proxy. This differs for Senders (OAuth) and Receivers (mTLS)

There are four functions that are required surrounding appointments. This section will provide information on how to meet them using the Appointment Resource.
The key functions surrounding appointment bookings are listed below. This section will provide information on how to meet them using the Appointment Resource.

* The ability to book an appointment.
* The ability to cancel an appointment.
* The ability to update an appointment.
* The ability to rebook an appointment.
The ability to -
* book
* update
* cancel
* reschedule
* rebook

## Interface

Expand All @@ -39,7 +41,8 @@ The following table describes how the BaRS API accomodates these four capabiliti
| [Get Slots](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#get-/Slot) | /Slots | GET | Obtain a list of available booking slots from a specified receiving system using the [GET /Slots endpoint](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#get-/Slot) |
| [Book](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#post-/Appointment) | /Appointment or /$process-message | POST | This will be a POST operation, with a BaRS Application /$process-message is typically used, outside of supported use cases /Appointment is adopted.|
| [Cancel](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#put-/Appointment/-id-) | /Appointment/\{id\} | PUT| The cancel of a booking will be setting the status of the appointment to "cancelled". Cancel is also possible using /$process-message |
| [Update](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#put-/Appointment/-id-) | /Appointment/\{id\} | PUT / PATCH| An update to an appointment will be a direct update to the existing resource |
| [Update](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#put-/Appointment/-id-) | /Appointment/\{id\} | PUT| An update to an appointment will be a direct update to the existing resource |
| [Reschedule](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#put-/Appointment/-id-) | /Appointment/\{id\} | PATCH| An update the slot against an appointment, altering to the existing resource |
| [Rebook](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#post-/Appointment) | Composite of Cancel and then Book | Composite | Requesting a new booking and then cancelling the existing one will constitute a rebook |


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,45 +13,7 @@ Steps to perform a rebook:

* {{pagelink:core-StandardPattern-appointment-cancel-1.3.1, text:Cancel existing booking}}
* {{pagelink:core-StandardPattern-appointment-booking-1.3.1, text:Rebook, following the initial booking workflow}}
* Once processed, the Receiver of the new booking must makes a [POST](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#post-/DocumentReference) request to create a new pointer in the central Registry, as described in {{pagelink:core-StandardPattern-document-reference-Receiver-1.3.1, text: Document Reference Standard Pattern - Receiver}}

Request Body

```json
{
"resourceType": "Appointment",
"id":"1ed510f2-df15-45b7-8852-8adfb0fcf4f3",
"meta": {
"lastUpdated": "2024-01-11T15:01:30.8185338+00:00",
"profile": [
"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Appointment"
]
},
"status": "booked",
"slot": [
{
"reference": "Slot/deb4c4b3-870b-4599-84df-5e54cef7afda"
}
],
"description": "Reason for calling",
"start": "2024-02-12T12:30:30+00:00",
"end": "2024-02-12T12:40:30+00:00",
"created": "2024-10-08T15:01:30+00:00",
"participant": [
{
"actor": {
"reference": "Patient/788660eb-d2c9-4773-abd4-318484673fb2"
},
"status": "accepted"
}
],
"replaces": [
{
"reference": "Appointment/aca94bdb-2e38-4399-9ece-2ba083ce65b5"
}
]
}
```

<img src="https://raw.githubusercontent.com/NHSDigital/NHSDigital-FHIR-BookingAndReferrals/main/BaRS-Images/SequenceDiagrams/BaRS_Foundation_ReBook.drawio.svg" ></img>

Once the appointment is rebooked, the Receiver is responsible for managing the pointer in the central Registry, as described in {{pagelink:core-StandardPattern-document-reference-1.3.1, text: Document Reference Standard Pattern }}.
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ The Reschedule operation supports amending the slot a booking is made against. T

Steps to Reschedule:

* Perform a [GET](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#get-/Appointment/-id-) operation using the id of the appointment to /Appointment/\{id\}. Alternatively, if the .id is not known, a search of the Registry can be undertaken with [GET DocumentReference](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#get-/DocumentReference) (searchset bundle) and selecting the Service and Appointment.id to create the read request of the Appointment resource by .id. NB: If a match cannot be performed using this method, the processing of updating must be done manually.
* Ensure the booking is still active by chekcing the .status
* {{pagelink:core-EndToEndWorkflow-ServiceDiscovery-1.3.1, text:Select the **same** service}} to reschedule the booking with
* Confirm BaRS [Capabilities](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#get-/metadata)
* [Request Available slots](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#get-/Slot)
* Perform a [GET](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#get-/Appointment/-id-) operation using the .id of the appointment to /Appointment/\{id\}. Alternatively, if the .id is not known, a search of the Registry can be undertaken following the {{pagelink:core-StandardPattern-document-reference-Sender-1.3.1, text: Document Reference Standard Pattern - Sender}}. NB: If a match cannot be obtained using this method the process of updating must be performed manually
* [Request Available slots](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#get-/Slot) from the service
* Select a new slot
* Update the resource with the new slot. NB: Only the .slot element of the resource must be updated
* Perform a [PATCH](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#patch-/Appointment/-id-) operation using the id of the appointment to /Appointment/\{id\}
* Once processed, the Receiver of the booking must [update (PUT)](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#put-/DocumentReference/-id-) the pointer in the central Registry, as described in {{pagelink:core-StandardPattern-document-reference-Receiver-1.3.1, text: Document Reference Standard Pattern - Receiver}}


In this example the Appointment resource is with the existing slot, and updated with the newly selected slot.
Expand Down Expand Up @@ -85,5 +83,3 @@ Request Body
}
```
<img src="https://raw.githubusercontent.com/NHSDigital/NHSDigital-FHIR-BookingAndReferrals/main/BaRS-Images/SequenceDiagrams/BaRS_Foundation_Update.drawio.svg" ></img>

Once the appointment is rescheduled, the Receiver is responsible for managing the pointer in the central Registry, as described in {{pagelink:core-StandardPattern-document-reference-1.3.1, text: Document Reference Standard Pattern }}.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ topic: core-StandardPattern-appointment-update-1.3.1

Steps to update:

* Perform a [GET](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#get-/Appointment/-id-) operation using the id of the appointment to /Appointment/\{id\}. Alternatively, if the .id is not known, a search of the Registry can be undertaken with [GET DocumentReference](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#get-/DocumentReference) (searchset bundle) and selecting the Service and Appointment.id to create the read request of the Appointment resource by .id. NB: If a match cannot be performed using this method, the processing of updating must be done manually.
* Update the Appointment resource as required. There is only currently support to alter .status and .reasonCode. NB: The .slot element of the resource must not be updated, if an alternative slot is required either the {{pagelink:core-StandardPattern-appointment-reschedule-1.3.1, text:Reschedule}} or {{pagelink:core-StandardPattern-appointment-rebook-1.3.1, text:Rebook}} processes must be followed.
* Perform a [GET](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#get-/Appointment/-id-) operation using the .id of the appointment to /Appointment/\{id\}. Alternatively, if the .id is not known, a search of the Registry can be undertaken following the {{pagelink:core-StandardPattern-document-reference-Sender-1.3.1, text: Document Reference Standard Pattern - Sender}}. NB: If a match cannot be obtained using this method the process of updating must be performed manually
* Update the Appointment resource as required. There is only currently support to alter .status and .reasonCode. NB: The .slot element of the resource must not be updated, if an alternative slot is required either the {{pagelink:core-StandardPattern-appointment-reschedule-1.3.1, text:Reschedule}} or {{pagelink:core-StandardPattern-appointment-rebook-1.3.1, text:Rebook}} processes must be followed
* Perform a [PUT](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#put-/Appointment/-id-) operation using the id of the appointment to /Appointment/\{id\}

resource returned:
Expand Down Expand Up @@ -79,5 +79,3 @@ Request Body
}
```
<img src="https://raw.githubusercontent.com/NHSDigital/NHSDigital-FHIR-BookingAndReferrals/main/BaRS-Images/SequenceDiagrams/BaRS_Foundation_Update.drawio.svg" ></img>

Once the appointment is updated, the Receiver is responsible for managing the pointer in the central Registry, as described in {{pagelink:core-StandardPattern-document-reference-1.3.1, text: Document Reference Standard Pattern}}.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ topic: core-StandardPattern-document-reference-Introduction-1.3.1

## Introduction

In version 1.1.0 of the BaRS API Specification, functionality was added to accommodate the use of pointers (DocumentReference resources), to locate existing bookings and referrals.
There is functionality in BaRS to accommodate the use of pointers (DocumentReference resources), to locate existing bookings and referrals from a central Registy.

The FHIR DocumentReference resource allows you to reference and locate clinical documents or resources. This section will walk you through the process of using a FHIR DocumentReference to find a resource's location and retrieve it.
This section will walk you through the process of using FHIR DocumentReferences, from the central Registry, to find and retrieve bookings and referrals held at Receiver services.

The BaRS API acts as a gateway to the National Record Locator FHIR API for BaRS enabled Services. In the image below the BaRS API is interacted with by Consumers and Producers.
* Consumer - Queries the API for existing DocumentReferences for use in finding existing Bookings and Referrals. This is usually a BaRS [Sender](https://simplifier.net/guide/nhsbookingandreferralstandard/Home/Design/BaRS-Core?version=current#Core-functionality-requirements).
* Producer - Posts and maintains DocumentReferences for Bookings and Referrals that they have received. This is invariably the BaRS [Receiver](https://simplifier.net/guide/nhsbookingandreferralstandard/Home/Design/BaRS-Core?version=current#Core-functionality-requirements).
The BaRS API acts as a gateway to the National Record Locator (NRL) FHIR API, for BaRS enabled Services. In the image below the BaRS API is called by Consumers and Producers.
* Consumer - Queries the API for existing DocumentReferences for use in finding existing Bookings and Referrals. Usually a BaRS [Sender](https://simplifier.net/guide/nhsbookingandreferralstandard/Home/Core/1.3.0/Core-Functionality-Requirements).
* Producer - Posts and maintains DocumentReferences for Bookings and Referrals that they have received. Usually a BaRS [Receiver](https://simplifier.net/guide/nhsbookingandreferralstandard/Home/Core/1.3.0/Core-Functionality-Requirements).

<img src="https://raw.githubusercontent.com/NHSDigital/NHSDigital-FHIR-BookingAndReferrals/main/BaRS-Images/DocumentReference/NRLF Via BaRS-1.1.0.svg" width="1200"></img>
Loading
Loading