---
title: "Extract Appointments"
canonical: "https://wiki.patientsknowbest.com/space/api/4650074113/Extract%20Appointments"
format: markdown
---
> Macro (toc)

## What

> Macro (excerpt)
> 
> Enables you to pull out all appointments sent from any source.  See the [Validation and Business rules](https://wiki.patientsknowbest.com/space/api/3364388935/Aggregated#Validation-and-business-rules) section for further details on what is included in the Aggregated endpoint.

## Prerequisites

> Macro (excerpt-include)



## How to

> Macro (excerpt)
> 
> - With a valid token, call the base URL with the Appointment resource, using the patient’s identifier (with the corresponding system) in the actor search parameter to pull back all of a patient’s appointments you have access to in PKB.
>   - *National ID Example: *[https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/Appointment?actor:Patient.identifier=https://fhir.nhs.uk/Id/nhs-number%7C9571270652](https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/Appointment?actor:Patient.identifier=https://fhir.nhs.uk/Id/nhs-number%7C9571270652)
>   - *PKB Public ID Example:* [https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/Appointment?actor:Patient.identifier=http://fhir.patientsknowbest.com/id/public-id%7C1d4a8b2d-f885-499f-ba51-50600312f316](https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/Appointment?actor:Patient.identifier=http://fhir.patientsknowbest.com/id/public-id%7C1d4a8b2d-f885-499f-ba51-50600312f316)
> - You can add other supported search parameters onto that request to meet your specific use case.  See the [FHIR R4 Search](https://hl7.org/fhir/R4/search.html#3.1.1) page for further information.
>   - Example pulling back all of a patient’s appointments that were on the 10th of Jan 2023 or more recent (greater than or equal to): [https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/Appointment?actor:Patient.identifier=http://fhir.patientsknowbest.com/id/public-id%7C4298ff2a-c34d-4a2a-b0bd-8732080b4c41&date=ge2023-01-10](https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/Appointment?actor:Patient.identifier=http://fhir.patientsknowbest.com/id/public-id%7C4298ff2a-c34d-4a2a-b0bd-8732080b4c41&date=ge2023-01-10)
> - A FHIR bundle is returned to you in json format with all of the patient’s appointments that are in their PKB record.

> Macro (excerpt)
> 
> ## Useful links
> 
> - Further information on [connectivity and endpoints](https://wiki.patientsknowbest.com/space/api/4348444939/FHIR+API+-+Network+Connectivity).
> - PKB uses the [Appointment](https://hl7.org/fhir/R4/appointment.html) FHIR resource.  [You can read the full capability statement here.](https://wiki.patientsknowbest.com/space/api/3364389010/Capabilities:+Aggregated+Endpoint#Appointment)
> - Read more about how [PKB maps any non-FHIR appointment data (HL7 or UI entered) to FHIR](https://wiki.patientsknowbest.com/space/api/3365077229/Aggregated+Appointment).

## **Example**

Here is a test patient’s Appointments in the PKB UI:

> Macro (excerpt)
> 
> ![image-20250219-143845.png](media://3f145b04-430b-4b2e-a9fa-11da6ec28caa)

> Macro (excerpt)
> 
> Here’s an example response for pulling all of this patient’s appointments that have a date of the 10th of January 2023 or more recent:
> 
> <span style="color: #36b37e">**GET**</span>** **[https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/Appointment?actor:Patient.identifier=http://fhir.patientsknowbest.com/id/public-id%7C4298ff2a-c34d-4a2a-b0bd-8732080b4c41&date=ge2023-01-10](https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/Appointment?actor:Patient.identifier=http://fhir.patientsknowbest.com/id/public-id%7C4298ff2a-c34d-4a2a-b0bd-8732080b4c41&date=ge2023-01-10)
> 
> ```json
> {
>     "resourceType": "Bundle",
>     "meta": {
>         "lastUpdated": "2025-02-19T14:20:24.299+00:00"
>     },
>     "type": "searchset",
>     "total": 12,
>     "link": [
>         {
>             "relation": "self",
>             "url": "/fhir/Appointment?actor%3APatient.identifier=http%3A%2F%2Ffhir.patientsknowbest.com%2Fid%2Fpublic-id%7Cfabe4b31-13f0-4375-abb6-7bcd2e8b66c1&date=ge2023-01-10"
>         }
>     ],
>     "entry": [
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/2ef90537-b91f-3323-8654-06d63ea03802"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/2ef90537-b91f-3323-8654-06d63ea03802",
>             "resource": {
>                 "resourceType": "Appointment",
>                 "id": "2ef90537-b91f-3323-8654-06d63ea03802",
>                 "meta": {
>                     "extension": [
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/uploaded-data-id",
>                             "valueString": "14456543"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2025-01-31T10:09:31.000+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-last-updated",
>                             "valueDateTime": "2025-01-31T10:09:31.000+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2025-01-31T10:09:52.434+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/last-updated-source",
>                             "valueString": "ehrmigrated"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/access-route",
>                             "valueCoding": {
>                                 "system": "http://fhir.patientsknowbest.com/codesystem/access-route",
>                                 "code": "HL7_API",
>                                 "display": "Integration (HL7)"
>                             }
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2025-01-31T10:09:53.028198Z"
>                         }
>                     ],
>                     "versionId": "7713695",
>                     "lastUpdated": "2025-01-31T10:09:53.028198Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "9351bf7f-ece1-3dc9-9ade-1015d8ab1018",
>                             "display": "NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "9351bf7f-ece1-3dc9-9ade-1015d8ab1018",
>                             "display": "NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/privacy-label",
>                             "code": "GENERAL_HEALTH"
>                         }
>                     ]
>                 },
>                 "extension": [
>                     {
>                         "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream",
>                         "extension": [
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-source-id",
>                                 "valueString": "ehrmigrated"
>                             },
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-resource-id",
>                                 "valueString": "Appointment/76997055-bfbc-4f1b-a14b-d69225c147c3"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link",
>                         "valueUrl": "https://sandbox.patientsknowbest.com/nhs-login/login?phrPath=%2Fdiary%2FviewAppointment.action%3FuniqueId%3D2ef90537-b91f-3323-8654-06d63ea03802%26style%3Dnhs-england"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134702243"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/common-identifier",
>                         "value": "bc10f51e-27b0-4dcc-9666-d577a7a51056"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/external-identifier",
>                         "value": "c7a147b7-5762-4cc1-b401-b4bed0061157"
>                     }
>                 ],
>                 "status": "booked",
>                 "serviceType": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "HBUQ",
>                                 "code": "K"
>                             }
>                         ]
>                     }
>                 ],
>                 "specialty": [
>                     {
>                         "coding": [
>                             {
>                                 "code": "Rheumatology",
>                                 "display": "Rheumatology"
>                             }
>                         ]
>                     }
>                 ],
>                 "appointmentType": {
>                     "coding": [
>                         {
>                             "display": "Checkup"
>                         }
>                     ]
>                 },
>                 "start": "2025-08-05T04:05:00.000+00:00",
>                 "end": "2025-08-05T05:05:00.000+00:00",
>                 "comment": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi non mi mauris. Sed volutpat, enim feugiat luctus iaculis, lorem massa varius enim, eu rutrum tellus nulla ut erat. Cras quis mi eu mi cursus scelerisque at vel odio. Vestibulum congue vestibulum nisi, ut aliquam urna aliquam non. Quisque pellentesque ante eu vulputate vulputate. Nullam auctor commodo neque tempus suscipit. Nullam id interdum neque. Maecenas et feugiat lorem. Morbi cursus eleifend suscipit.",
>                 "participant": [
>                     {
>                         "actor": {
>                             "reference": "Patient/d420ed8e-da59-38b7-8114-7bb61080e44a",
>                             "display": "Miss Doris Davies"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "display": "Ms Rosie Sloane Stevens (Doctor)"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "type": "Location",
>                             "display": "Room 8"
>                         },
>                         "status": "accepted"
>                     }
>                 ]
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/e8f92876-0983-3b08-9d2f-036020672aa9"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/e8f92876-0983-3b08-9d2f-036020672aa9",
>             "resource": {
>                 "resourceType": "Appointment",
>                 "id": "e8f92876-0983-3b08-9d2f-036020672aa9",
>                 "meta": {
>                     "extension": [
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/uploaded-data-id",
>                             "valueString": "14456534"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2025-01-31T10:04:02.000+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-last-updated",
>                             "valueDateTime": "2025-01-31T10:04:02.000+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2025-01-31T10:05:11.301+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/last-updated-source",
>                             "valueString": "ehrmigrated"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/access-route",
>                             "valueCoding": {
>                                 "system": "http://fhir.patientsknowbest.com/codesystem/access-route",
>                                 "code": "HL7_API",
>                                 "display": "Integration (HL7)"
>                             }
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2025-01-31T10:05:11.914288Z"
>                         }
>                     ],
>                     "versionId": "7713690",
>                     "lastUpdated": "2025-01-31T10:05:11.914288Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "9351bf7f-ece1-3dc9-9ade-1015d8ab1018",
>                             "display": "NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "9351bf7f-ece1-3dc9-9ade-1015d8ab1018",
>                             "display": "NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/privacy-label",
>                             "code": "GENERAL_HEALTH"
>                         }
>                     ]
>                 },
>                 "extension": [
>                     {
>                         "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream",
>                         "extension": [
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-source-id",
>                                 "valueString": "ehrmigrated"
>                             },
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-resource-id",
>                                 "valueString": "Appointment/6281bc3a-2048-4371-abfa-546aeb72908e"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link",
>                         "valueUrl": "https://sandbox.patientsknowbest.com/nhs-login/login?phrPath=%2Fdiary%2FviewAppointment.action%3FuniqueId%3De8f92876-0983-3b08-9d2f-036020672aa9%26style%3Dnhs-england"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134702231"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/common-identifier",
>                         "value": "02928745-a708-4e23-bf8e-687a26cc6110"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/external-identifier",
>                         "value": "30be23fc-c814-4cce-96a0-824082c68d89"
>                     }
>                 ],
>                 "status": "booked",
>                 "serviceType": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "p",
>                                 "code": "z"
>                             }
>                         ]
>                     }
>                 ],
>                 "specialty": [
>                     {
>                         "coding": [
>                             {
>                                 "code": "Neurology",
>                                 "display": "Neurology"
>                             }
>                         ]
>                     }
>                 ],
>                 "appointmentType": {
>                     "coding": [
>                         {
>                             "display": "Routine"
>                         }
>                     ]
>                 },
>                 "start": "2025-07-05T04:05:00.000+00:00",
>                 "end": "2025-07-05T05:05:00.000+00:00",
>                 "comment": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi non mi mauris. Sed volutpat, enim feugiat luctus iaculis, lorem massa varius enim, eu rutrum tellus nulla ut erat. Cras quis mi eu mi cursus scelerisque at vel odio. Vestibulum congue vestibulum nisi, ut aliquam urna aliquam non. Quisque pellentesque ante eu vulputate vulputate. Nullam auctor commodo neque tempus suscipit. Nullam id interdum neque. Maecenas et feugiat lorem. Morbi cursus eleifend suscipit.",
>                 "participant": [
>                     {
>                         "actor": {
>                             "reference": "Patient/d420ed8e-da59-38b7-8114-7bb61080e44a",
>                             "display": "Miss Doris Davies"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "display": "Dr Joey White (Doctor)"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "type": "Location",
>                             "display": "Room 4"
>                         },
>                         "status": "accepted"
>                     }
>                 ]
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/f538d72e-2393-3504-8498-e1ea906f96fe"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/f538d72e-2393-3504-8498-e1ea906f96fe",
>             "resource": {
>                 "resourceType": "Appointment",
>                 "id": "f538d72e-2393-3504-8498-e1ea906f96fe",
>                 "meta": {
>                     "extension": [
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/uploaded-data-id",
>                             "valueString": "14456532"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2025-01-31T10:03:36.000+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-last-updated",
>                             "valueDateTime": "2025-01-31T10:03:36.000+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2025-01-31T10:03:39.501+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/last-updated-source",
>                             "valueString": "ehrmigrated"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/access-route",
>                             "valueCoding": {
>                                 "system": "http://fhir.patientsknowbest.com/codesystem/access-route",
>                                 "code": "HL7_API",
>                                 "display": "Integration (HL7)"
>                             }
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2025-01-31T10:03:40.762785Z"
>                         }
>                     ],
>                     "versionId": "7713689",
>                     "lastUpdated": "2025-01-31T10:03:40.762785Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "9351bf7f-ece1-3dc9-9ade-1015d8ab1018",
>                             "display": "NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "9351bf7f-ece1-3dc9-9ade-1015d8ab1018",
>                             "display": "NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/privacy-label",
>                             "code": "GENERAL_HEALTH"
>                         }
>                     ]
>                 },
>                 "extension": [
>                     {
>                         "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream",
>                         "extension": [
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-source-id",
>                                 "valueString": "ehrmigrated"
>                             },
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-resource-id",
>                                 "valueString": "Appointment/dce65e19-d5f6-4095-9b1a-fb67e3d47486"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link",
>                         "valueUrl": "https://sandbox.patientsknowbest.com/nhs-login/login?phrPath=%2Fdiary%2FviewAppointment.action%3FuniqueId%3Df538d72e-2393-3504-8498-e1ea906f96fe%26style%3Dnhs-england"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134702229"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/common-identifier",
>                         "value": "34c84e93-dd7e-44c0-9681-c99cadf3afa2"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/external-identifier",
>                         "value": "e7568ab9-e8c5-454f-a86f-87bbd72c183a"
>                     }
>                 ],
>                 "status": "booked",
>                 "serviceType": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "W",
>                                 "code": "7k4y"
>                             }
>                         ]
>                     }
>                 ],
>                 "specialty": [
>                     {
>                         "coding": [
>                             {
>                                 "code": "Immunology",
>                                 "display": "Immunology"
>                             }
>                         ]
>                     }
>                 ],
>                 "appointmentType": {
>                     "coding": [
>                         {
>                             "display": "Checkup"
>                         }
>                     ]
>                 },
>                 "start": "2025-06-05T04:05:00.000+00:00",
>                 "end": "2025-06-05T05:05:00.000+00:00",
>                 "comment": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi non mi mauris. Sed volutpat, enim feugiat luctus iaculis, lorem massa varius enim, eu rutrum tellus nulla ut erat. Cras quis mi eu mi cursus scelerisque at vel odio. Vestibulum congue vestibulum nisi, ut aliquam urna aliquam non. Quisque pellentesque ante eu vulputate vulputate. Nullam auctor commodo neque tempus suscipit. Nullam id interdum neque. Maecenas et feugiat lorem. Morbi cursus eleifend suscipit.",
>                 "participant": [
>                     {
>                         "actor": {
>                             "reference": "Patient/d420ed8e-da59-38b7-8114-7bb61080e44a",
>                             "display": "Miss Doris Davies"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "display": "Dr Poppy Cox (Doctor)"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "type": "Location",
>                             "display": "Room 5"
>                         },
>                         "status": "accepted"
>                     }
>                 ]
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/1ff577ee-9fb2-32a8-8623-4e5c820c6dbe"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/1ff577ee-9fb2-32a8-8623-4e5c820c6dbe",
>             "resource": {
>                 "resourceType": "Appointment",
>                 "id": "1ff577ee-9fb2-32a8-8623-4e5c820c6dbe",
>                 "meta": {
>                     "extension": [
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/uploaded-data-id",
>                             "valueString": "14459653"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2025-02-03T10:07:36.000+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-last-updated",
>                             "valueDateTime": "2025-02-03T10:07:36.000+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2025-02-03T10:11:03.064+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/last-updated-source",
>                             "valueString": "ehrmigrated"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/access-route",
>                             "valueCoding": {
>                                 "system": "http://fhir.patientsknowbest.com/codesystem/access-route",
>                                 "code": "HL7_API",
>                                 "display": "Integration (HL7)"
>                             }
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2025-02-03T10:08:05.314551Z"
>                         }
>                     ],
>                     "versionId": "7714217",
>                     "lastUpdated": "2025-02-03T10:11:04.434226Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "aa37aa94-8685-3ab5-9fed-bc16bc77395b",
>                             "display": "Hull University Teaching Hospitals NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "aa37aa94-8685-3ab5-9fed-bc16bc77395b",
>                             "display": "Hull University Teaching Hospitals NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/privacy-label",
>                             "code": "GENERAL_HEALTH"
>                         }
>                     ]
>                 },
>                 "extension": [
>                     {
>                         "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream",
>                         "extension": [
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-source-id",
>                                 "valueString": "ehrmigrated"
>                             },
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-resource-id",
>                                 "valueString": "Appointment/cafee151-aeba-4163-8c66-5ddcf14942e8"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link",
>                         "valueUrl": "https://sandbox.patientsknowbest.com/nhs-login/login?phrPath=%2Fdiary%2FviewAppointment.action%3FuniqueId%3D1ff577ee-9fb2-32a8-8623-4e5c820c6dbe%26style%3Dnhs-england"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134703605"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/common-identifier",
>                         "value": "9939f158-a7fa-4be0-8fd1-27f59871d9bd"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/external-identifier",
>                         "value": "2966fa50-fabf-4271-a283-906ce2e8961f"
>                     }
>                 ],
>                 "status": "booked",
>                 "serviceType": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "r",
>                                 "code": "H"
>                             }
>                         ]
>                     }
>                 ],
>                 "specialty": [
>                     {
>                         "coding": [
>                             {
>                                 "code": "Neurology",
>                                 "display": "Neurology"
>                             }
>                         ]
>                     }
>                 ],
>                 "appointmentType": {
>                     "coding": [
>                         {
>                             "display": "Emergency"
>                         }
>                     ]
>                 },
>                 "start": "2025-06-01T04:05:00.000+00:00",
>                 "end": "2025-04-01T05:05:00.000+00:00",
>                 "comment": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi non mi mauris. Sed volutpat, enim feugiat luctus iaculis, lorem massa varius enim, eu rutrum tellus nulla ut erat. Cras quis mi eu mi cursus scelerisque at vel odio. Vestibulum congue vestibulum nisi, ut aliquam urna aliquam non. Quisque pellentesque ante eu vulputate vulputate. Nullam auctor commodo neque tempus suscipit. Nullam id interdum neque. Maecenas et feugiat lorem. Morbi cursus eleifend suscipit.",
>                 "participant": [
>                     {
>                         "actor": {
>                             "reference": "Patient/d420ed8e-da59-38b7-8114-7bb61080e44a",
>                             "display": "Miss Doris Davies"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "display": "Ms Abigail Jones (Doctor)"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "type": "Location",
>                             "display": "Room 13"
>                         },
>                         "status": "accepted"
>                     }
>                 ]
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/2b43d343-1e83-3349-b209-f7ddc44643ed"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/2b43d343-1e83-3349-b209-f7ddc44643ed",
>             "resource": {
>                 "resourceType": "Appointment",
>                 "id": "2b43d343-1e83-3349-b209-f7ddc44643ed",
>                 "meta": {
>                     "extension": [
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/uploaded-data-id",
>                             "valueString": "14456527"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2025-01-31T09:59:42.000+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-last-updated",
>                             "valueDateTime": "2025-01-31T09:59:42.000+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2025-01-31T09:59:45.512+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/last-updated-source",
>                             "valueString": "ehrmigrated"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/access-route",
>                             "valueCoding": {
>                                 "system": "http://fhir.patientsknowbest.com/codesystem/access-route",
>                                 "code": "HL7_API",
>                                 "display": "Integration (HL7)"
>                             }
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2025-01-31T09:59:46.061964Z"
>                         }
>                     ],
>                     "versionId": "7713684",
>                     "lastUpdated": "2025-01-31T09:59:46.061964Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "9351bf7f-ece1-3dc9-9ade-1015d8ab1018",
>                             "display": "NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "9351bf7f-ece1-3dc9-9ade-1015d8ab1018",
>                             "display": "NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/privacy-label",
>                             "code": "GENERAL_HEALTH"
>                         }
>                     ]
>                 },
>                 "extension": [
>                     {
>                         "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream",
>                         "extension": [
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-source-id",
>                                 "valueString": "ehrmigrated"
>                             },
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-resource-id",
>                                 "valueString": "Appointment/d3fb4071-4374-47c7-a72b-8a1c457abada"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link",
>                         "valueUrl": "https://sandbox.patientsknowbest.com/nhs-login/login?phrPath=%2Fdiary%2FviewAppointment.action%3FuniqueId%3D2b43d343-1e83-3349-b209-f7ddc44643ed%26style%3Dnhs-england"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134702227"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/common-identifier",
>                         "value": "bdb8d1e0-0306-4fa0-a629-eb8b93217937"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/external-identifier",
>                         "value": "042bf956-6915-49ca-a146-e60049a98543"
>                     }
>                 ],
>                 "status": "booked",
>                 "serviceType": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "f",
>                                 "code": "y3qr"
>                             }
>                         ]
>                     }
>                 ],
>                 "specialty": [
>                     {
>                         "coding": [
>                             {
>                                 "code": "Endocrinology",
>                                 "display": "Endocrinology"
>                             }
>                         ]
>                     }
>                 ],
>                 "appointmentType": {
>                     "coding": [
>                         {
>                             "display": "Routine"
>                         }
>                     ]
>                 },
>                 "start": "2025-05-05T04:05:00.000+00:00",
>                 "end": "2025-05-05T05:05:00.000+00:00",
>                 "comment": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi non mi mauris. Sed volutpat, enim feugiat luctus iaculis, lorem massa varius enim, eu rutrum tellus nulla ut erat. Cras quis mi eu mi cursus scelerisque at vel odio. Vestibulum congue vestibulum nisi, ut aliquam urna aliquam non. Quisque pellentesque ante eu vulputate vulputate. Nullam auctor commodo neque tempus suscipit. Nullam id interdum neque. Maecenas et feugiat lorem. Morbi cursus eleifend suscipit.",
>                 "participant": [
>                     {
>                         "actor": {
>                             "reference": "Patient/d420ed8e-da59-38b7-8114-7bb61080e44a",
>                             "display": "Miss Doris Davies"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "display": "Dr Anakin Peterson (Doctor)"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "type": "Location",
>                             "display": "Room 4"
>                         },
>                         "status": "accepted"
>                     }
>                 ]
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/c0fd8fe1-089c-388f-9c5e-5d8f25a1593a"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/c0fd8fe1-089c-388f-9c5e-5d8f25a1593a",
>             "resource": {
>                 "resourceType": "Appointment",
>                 "id": "c0fd8fe1-089c-388f-9c5e-5d8f25a1593a",
>                 "meta": {
>                     "extension": [
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/uploaded-data-id",
>                             "valueString": "14459634"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2025-02-03T10:04:20.000+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-last-updated",
>                             "valueDateTime": "2025-02-03T10:04:20.000+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2025-02-03T10:06:31.296+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/last-updated-source",
>                             "valueString": "ehrmigrated"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/access-route",
>                             "valueCoding": {
>                                 "system": "http://fhir.patientsknowbest.com/codesystem/access-route",
>                                 "code": "HL7_API",
>                                 "display": "Integration (HL7)"
>                             }
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2025-02-03T10:04:31.774230Z"
>                         }
>                     ],
>                     "versionId": "7714204",
>                     "lastUpdated": "2025-02-03T10:06:32.192044Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "aa37aa94-8685-3ab5-9fed-bc16bc77395b",
>                             "display": "Hull University Teaching Hospitals NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "aa37aa94-8685-3ab5-9fed-bc16bc77395b",
>                             "display": "Hull University Teaching Hospitals NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/privacy-label",
>                             "code": "GENERAL_HEALTH"
>                         }
>                     ]
>                 },
>                 "extension": [
>                     {
>                         "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream",
>                         "extension": [
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-source-id",
>                                 "valueString": "ehrmigrated"
>                             },
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-resource-id",
>                                 "valueString": "Appointment/59624872-5b85-40b0-8e6d-032577237ac1"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link",
>                         "valueUrl": "https://sandbox.patientsknowbest.com/nhs-login/login?phrPath=%2Fdiary%2FviewAppointment.action%3FuniqueId%3Dc0fd8fe1-089c-388f-9c5e-5d8f25a1593a%26style%3Dnhs-england"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134703592"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/common-identifier",
>                         "value": "b417c752-25bd-4786-9ce6-298143e3b807"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/external-identifier",
>                         "value": "97995193-a153-4c93-8403-9ee7fc92c15a"
>                     }
>                 ],
>                 "status": "booked",
>                 "serviceType": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "x",
>                                 "code": "9X72"
>                             }
>                         ]
>                     }
>                 ],
>                 "specialty": [
>                     {
>                         "coding": [
>                             {
>                                 "code": "Neurology",
>                                 "display": "Neurology"
>                             }
>                         ]
>                     }
>                 ],
>                 "appointmentType": {
>                     "coding": [
>                         {
>                             "display": "Emergency"
>                         }
>                     ]
>                 },
>                 "start": "2025-05-01T04:05:00.000+00:00",
>                 "end": "2025-04-01T05:05:00.000+00:00",
>                 "comment": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi non mi mauris. Sed volutpat, enim feugiat luctus iaculis, lorem massa varius enim, eu rutrum tellus nulla ut erat. Cras quis mi eu mi cursus scelerisque at vel odio. Vestibulum congue vestibulum nisi, ut aliquam urna aliquam non. Quisque pellentesque ante eu vulputate vulputate. Nullam auctor commodo neque tempus suscipit. Nullam id interdum neque. Maecenas et feugiat lorem. Morbi cursus eleifend suscipit.",
>                 "participant": [
>                     {
>                         "actor": {
>                             "reference": "Patient/d420ed8e-da59-38b7-8114-7bb61080e44a",
>                             "display": "Miss Doris Davies"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "display": "Ms Amy Long (Doctor)"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "type": "Location",
>                             "display": "Room 7"
>                         },
>                         "status": "accepted"
>                     }
>                 ]
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/27c4df1d-fd83-34ba-9e63-213ff483711a"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/27c4df1d-fd83-34ba-9e63-213ff483711a",
>             "resource": {
>                 "resourceType": "Appointment",
>                 "id": "27c4df1d-fd83-34ba-9e63-213ff483711a",
>                 "meta": {
>                     "extension": [
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/uploaded-data-id",
>                             "valueString": "14459732"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2025-02-03T11:27:11.000+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-last-updated",
>                             "valueDateTime": "2025-02-03T11:27:11.000+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2025-02-03T11:27:32.883+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/last-updated-source",
>                             "valueString": "ehrmigrated"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/access-route",
>                             "valueCoding": {
>                                 "system": "http://fhir.patientsknowbest.com/codesystem/access-route",
>                                 "code": "HL7_API",
>                                 "display": "Integration (HL7)"
>                             }
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2025-02-03T11:27:34.096518Z"
>                         }
>                     ],
>                     "versionId": "7714262",
>                     "lastUpdated": "2025-02-03T11:27:34.096518Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "aa37aa94-8685-3ab5-9fed-bc16bc77395b",
>                             "display": "Hull University Teaching Hospitals NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "aa37aa94-8685-3ab5-9fed-bc16bc77395b",
>                             "display": "Hull University Teaching Hospitals NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/privacy-label",
>                             "code": "GENERAL_HEALTH"
>                         }
>                     ]
>                 },
>                 "extension": [
>                     {
>                         "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream",
>                         "extension": [
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-source-id",
>                                 "valueString": "ehrmigrated"
>                             },
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-resource-id",
>                                 "valueString": "Appointment/6ca11191-ad0a-433b-9db6-f0ef1d91c9ee"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link",
>                         "valueUrl": "https://sandbox.patientsknowbest.com/nhs-login/login?phrPath=%2Fdiary%2FviewAppointment.action%3FuniqueId%3D27c4df1d-fd83-34ba-9e63-213ff483711a%26style%3Dnhs-england"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134703644"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/common-identifier",
>                         "value": "43eb37c9-90cd-4b6d-9d39-23797372535b"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/external-identifier",
>                         "value": "c29a7adf-09c4-4825-9b03-44eaedd1a73b"
>                     }
>                 ],
>                 "status": "booked",
>                 "serviceType": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "4x3",
>                                 "code": "sbT"
>                             }
>                         ]
>                     }
>                 ],
>                 "specialty": [
>                     {
>                         "coding": [
>                             {
>                                 "code": "Cardiology",
>                                 "display": "Cardiology"
>                             }
>                         ]
>                     }
>                 ],
>                 "appointmentType": {
>                     "coding": [
>                         {
>                             "display": "Routine"
>                         }
>                     ]
>                 },
>                 "start": "2025-04-04T04:05:00.000+00:00",
>                 "end": "2025-04-04T05:05:00.000+00:00",
>                 "comment": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi non mi mauris. Sed volutpat, enim feugiat luctus iaculis, lorem massa varius enim, eu rutrum tellus nulla ut erat. Cras quis mi eu mi cursus scelerisque at vel odio. Vestibulum congue vestibulum nisi, ut aliquam urna aliquam non. Quisque pellentesque ante eu vulputate vulputate. Nullam auctor commodo neque tempus suscipit. Nullam id interdum neque. Maecenas et feugiat lorem. Morbi cursus eleifend suscipit.",
>                 "participant": [
>                     {
>                         "actor": {
>                             "reference": "Patient/d420ed8e-da59-38b7-8114-7bb61080e44a",
>                             "display": "Miss Doris Davies"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "display": "Mrs Alivia Piper Griffiths (Doctor)"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "type": "Location",
>                             "display": "Room 9"
>                         },
>                         "status": "accepted"
>                     }
>                 ]
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/52190b4e-160c-3393-8cfe-c3e89ec9ba28"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/52190b4e-160c-3393-8cfe-c3e89ec9ba28",
>             "resource": {
>                 "resourceType": "Appointment",
>                 "id": "52190b4e-160c-3393-8cfe-c3e89ec9ba28",
>                 "meta": {
>                     "extension": [
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/uploaded-data-id",
>                             "valueString": "14459728"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2025-02-03T11:26:49.000+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-last-updated",
>                             "valueDateTime": "2025-02-03T11:26:49.000+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2025-02-03T11:26:56.541+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/last-updated-source",
>                             "valueString": "ehrmigrated"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/access-route",
>                             "valueCoding": {
>                                 "system": "http://fhir.patientsknowbest.com/codesystem/access-route",
>                                 "code": "HL7_API",
>                                 "display": "Integration (HL7)"
>                             }
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2025-02-03T11:26:57.686462Z"
>                         }
>                     ],
>                     "versionId": "7714256",
>                     "lastUpdated": "2025-02-03T11:26:57.686462Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "aa37aa94-8685-3ab5-9fed-bc16bc77395b",
>                             "display": "Hull University Teaching Hospitals NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "aa37aa94-8685-3ab5-9fed-bc16bc77395b",
>                             "display": "Hull University Teaching Hospitals NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/privacy-label",
>                             "code": "GENERAL_HEALTH"
>                         }
>                     ]
>                 },
>                 "extension": [
>                     {
>                         "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream",
>                         "extension": [
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-source-id",
>                                 "valueString": "ehrmigrated"
>                             },
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-resource-id",
>                                 "valueString": "Appointment/ed7a4460-935b-4041-a4aa-058f30d603d2"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link",
>                         "valueUrl": "https://sandbox.patientsknowbest.com/nhs-login/login?phrPath=%2Fdiary%2FviewAppointment.action%3FuniqueId%3D52190b4e-160c-3393-8cfe-c3e89ec9ba28%26style%3Dnhs-england"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134703637"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/common-identifier",
>                         "value": "b2a862f8-b008-4306-9373-37cfbd9132ad"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/external-identifier",
>                         "value": "f9bf2247-fc25-4850-a097-ecd54dc60aa6"
>                     }
>                 ],
>                 "status": "booked",
>                 "serviceType": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "8XVg",
>                                 "code": "ck"
>                             }
>                         ]
>                     }
>                 ],
>                 "specialty": [
>                     {
>                         "coding": [
>                             {
>                                 "code": "Rheumatology",
>                                 "display": "Rheumatology"
>                             }
>                         ]
>                     }
>                 ],
>                 "appointmentType": {
>                     "coding": [
>                         {
>                             "display": "Walkin"
>                         }
>                     ]
>                 },
>                 "start": "2025-04-01T04:05:00.000+00:00",
>                 "end": "2025-04-01T05:05:00.000+00:00",
>                 "comment": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi non mi mauris. Sed volutpat, enim feugiat luctus iaculis, lorem massa varius enim, eu rutrum tellus nulla ut erat. Cras quis mi eu mi cursus scelerisque at vel odio. Vestibulum congue vestibulum nisi, ut aliquam urna aliquam non. Quisque pellentesque ante eu vulputate vulputate. Nullam auctor commodo neque tempus suscipit. Nullam id interdum neque. Maecenas et feugiat lorem. Morbi cursus eleifend suscipit.",
>                 "participant": [
>                     {
>                         "actor": {
>                             "reference": "Patient/d420ed8e-da59-38b7-8114-7bb61080e44a",
>                             "display": "Miss Doris Davies"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "display": "Prof Sariah Lacey Annika Owen (Doctor)"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "type": "Location",
>                             "display": "Room 27"
>                         },
>                         "status": "accepted"
>                     }
>                 ]
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/41ae2a0f-f122-38cf-9a42-6d01f8c2e36d"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/41ae2a0f-f122-38cf-9a42-6d01f8c2e36d",
>             "resource": {
>                 "resourceType": "Appointment",
>                 "id": "41ae2a0f-f122-38cf-9a42-6d01f8c2e36d",
>                 "meta": {
>                     "extension": [
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/uploaded-data-id",
>                             "valueString": "14459629"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2025-02-03T10:02:05.000+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-last-updated",
>                             "valueDateTime": "2025-02-03T10:02:05.000+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2025-02-03T10:02:14.972+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/last-updated-source",
>                             "valueString": "ehrmigrated"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/access-route",
>                             "valueCoding": {
>                                 "system": "http://fhir.patientsknowbest.com/codesystem/access-route",
>                                 "code": "HL7_API",
>                                 "display": "Integration (HL7)"
>                             }
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2025-02-03T10:02:15.943482Z"
>                         }
>                     ],
>                     "versionId": "7714198",
>                     "lastUpdated": "2025-02-03T10:02:15.943482Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "aa37aa94-8685-3ab5-9fed-bc16bc77395b",
>                             "display": "Hull University Teaching Hospitals NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "aa37aa94-8685-3ab5-9fed-bc16bc77395b",
>                             "display": "Hull University Teaching Hospitals NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/privacy-label",
>                             "code": "GENERAL_HEALTH"
>                         }
>                     ]
>                 },
>                 "extension": [
>                     {
>                         "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream",
>                         "extension": [
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-source-id",
>                                 "valueString": "ehrmigrated"
>                             },
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-resource-id",
>                                 "valueString": "Appointment/e8276158-051b-4ba8-969a-5f76e5723916"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link",
>                         "valueUrl": "https://sandbox.patientsknowbest.com/nhs-login/login?phrPath=%2Fdiary%2FviewAppointment.action%3FuniqueId%3D41ae2a0f-f122-38cf-9a42-6d01f8c2e36d%26style%3Dnhs-england"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134703590"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/common-identifier",
>                         "value": "9e0ef517-2a41-43cd-b8cb-4ab4eaee1ecf"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/external-identifier",
>                         "value": "ec64592f-caf8-43f0-87e0-e8e32bdabbb8"
>                     }
>                 ],
>                 "status": "booked",
>                 "serviceType": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "S",
>                                 "code": "J"
>                             }
>                         ]
>                     }
>                 ],
>                 "specialty": [
>                     {
>                         "coding": [
>                             {
>                                 "code": "Radiology",
>                                 "display": "Radiology"
>                             }
>                         ]
>                     }
>                 ],
>                 "appointmentType": {
>                     "coding": [
>                         {
>                             "display": "Emergency"
>                         }
>                     ]
>                 },
>                 "start": "2025-03-06T05:05:00.000+00:00",
>                 "end": "2025-03-06T06:05:00.000+00:00",
>                 "comment": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi non mi mauris. Sed volutpat, enim feugiat luctus iaculis, lorem massa varius enim, eu rutrum tellus nulla ut erat. Cras quis mi eu mi cursus scelerisque at vel odio. Vestibulum congue vestibulum nisi, ut aliquam urna aliquam non. Quisque pellentesque ante eu vulputate vulputate. Nullam auctor commodo neque tempus suscipit. Nullam id interdum neque. Maecenas et feugiat lorem. Morbi cursus eleifend suscipit.",
>                 "participant": [
>                     {
>                         "actor": {
>                             "reference": "Patient/d420ed8e-da59-38b7-8114-7bb61080e44a",
>                             "display": "Miss Doris Davies"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "display": "Mrs Remy Barnes (Doctor)"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "type": "Location",
>                             "display": "Room 2"
>                         },
>                         "status": "accepted"
>                     }
>                 ]
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/163f211e-d2f1-3e59-a7f7-0ca90e2494d6"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/163f211e-d2f1-3e59-a7f7-0ca90e2494d6",
>             "resource": {
>                 "resourceType": "Appointment",
>                 "id": "163f211e-d2f1-3e59-a7f7-0ca90e2494d6",
>                 "meta": {
>                     "extension": [
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/uploaded-data-id",
>                             "valueString": "14459750"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2025-02-03T11:29:04.000+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-last-updated",
>                             "valueDateTime": "2025-02-03T11:29:04.000+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2025-02-03T11:30:53.107+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/last-updated-source",
>                             "valueString": "ehrmigrated"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/access-route",
>                             "valueCoding": {
>                                 "system": "http://fhir.patientsknowbest.com/codesystem/access-route",
>                                 "code": "HL7_API",
>                                 "display": "Integration (HL7)"
>                             }
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2025-02-03T11:30:54.498283Z"
>                         }
>                     ],
>                     "versionId": "7714272",
>                     "lastUpdated": "2025-02-03T11:35:34.742027Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "aa37aa94-8685-3ab5-9fed-bc16bc77395b",
>                             "display": "Hull University Teaching Hospitals NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "aa37aa94-8685-3ab5-9fed-bc16bc77395b",
>                             "display": "Hull University Teaching Hospitals NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/privacy-label",
>                             "code": "GENERAL_HEALTH"
>                         }
>                     ]
>                 },
>                 "extension": [
>                     {
>                         "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream",
>                         "extension": [
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-source-id",
>                                 "valueString": "ehrmigrated"
>                             },
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-resource-id",
>                                 "valueString": "Appointment/91347f31-607e-4340-bed4-2fc559c72d94"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link",
>                         "valueUrl": "https://sandbox.patientsknowbest.com/nhs-login/login?phrPath=%2Fdiary%2FviewAppointment.action%3FuniqueId%3D163f211e-d2f1-3e59-a7f7-0ca90e2494d6%26style%3Dnhs-england"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134703649"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/common-identifier",
>                         "value": "001c3fbf-1d2c-4651-8338-4fd4320dc4a8"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/external-identifier",
>                         "value": "ccca01f7-0dd2-4af4-a7f1-59c89fe50090"
>                     }
>                 ],
>                 "status": "cancelled",
>                 "serviceType": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "6c",
>                                 "code": "w"
>                             }
>                         ]
>                     }
>                 ],
>                 "specialty": [
>                     {
>                         "coding": [
>                             {
>                                 "code": "Cardiology",
>                                 "display": "Cardiology"
>                             }
>                         ]
>                     }
>                 ],
>                 "appointmentType": {
>                     "coding": [
>                         {
>                             "display": "Followup"
>                         }
>                     ]
>                 },
>                 "start": "2025-03-03T05:05:00.000+00:00",
>                 "end": "2025-03-03T06:05:00.000+00:00",
>                 "comment": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi non mi mauris. Sed volutpat, enim feugiat luctus iaculis, lorem massa varius enim, eu rutrum tellus nulla ut erat. Cras quis mi eu mi cursus scelerisque at vel odio. Vestibulum congue vestibulum nisi, ut aliquam urna aliquam non. Quisque pellentesque ante eu vulputate vulputate. Nullam auctor commodo neque tempus suscipit. Nullam id interdum neque. Maecenas et feugiat lorem. Morbi cursus eleifend suscipit.",
>                 "participant": [
>                     {
>                         "actor": {
>                             "reference": "Patient/d420ed8e-da59-38b7-8114-7bb61080e44a",
>                             "display": "Miss Doris Davies"
>                         },
>                         "status": "declined"
>                     },
>                     {
>                         "actor": {
>                             "display": "Dr Elliott Shiloh Griffin (Doctor)"
>                         },
>                         "status": "declined"
>                     },
>                     {
>                         "actor": {
>                             "type": "Location",
>                             "display": "Room 7"
>                         },
>                         "status": "declined"
>                     }
>                 ]
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/1e376a8f-c6ab-3d95-8d05-65e861998a86"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/1e376a8f-c6ab-3d95-8d05-65e861998a86",
>             "resource": {
>                 "resourceType": "Appointment",
>                 "id": "1e376a8f-c6ab-3d95-8d05-65e861998a86",
>                 "meta": {
>                     "extension": [
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/access-route",
>                             "valueCoding": {
>                                 "system": "http://fhir.patientsknowbest.com/codesystem/access-route",
>                                 "code": "HL7_API",
>                                 "display": "Integration (HL7)"
>                             }
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/uploaded-data-id",
>                             "valueString": "14373178"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2024-11-28T11:54:45.398+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2024-11-28T11:54:40.000+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-last-updated",
>                             "valueDateTime": "2024-11-28T11:54:40.000+00:00"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2024-11-28T11:54:46.254200Z"
>                         }
>                     ],
>                     "versionId": "7698269",
>                     "lastUpdated": "2024-11-28T11:55:23.530274Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "aa37aa94-8685-3ab5-9fed-bc16bc77395b",
>                             "display": "Hull University Teaching Hospitals NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "aa37aa94-8685-3ab5-9fed-bc16bc77395b",
>                             "display": "Hull University Teaching Hospitals NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/privacy-label",
>                             "code": "GENERAL_HEALTH"
>                         }
>                     ]
>                 },
>                 "extension": [
>                     {
>                         "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream",
>                         "extension": [
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-source-id",
>                                 "valueString": "ehrmigrated"
>                             },
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-resource-id",
>                                 "valueString": "Appointment/54fcfd91-3b60-4b09-9116-5efb5da6fd75"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link",
>                         "valueUrl": "https://sandbox.patientsknowbest.com/nhs-login/login?phrPath=%2Fdiary%2FviewAppointment.action%3FuniqueId%3D1e376a8f-c6ab-3d95-8d05-65e861998a86%26style%3Dnhs-england"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134678867"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/common-identifier",
>                         "value": "6b8884d1-7c69-4eb5-8547-0a5033298a3f"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/external-identifier",
>                         "value": "4b191dea-7181-4b45-bbfa-c340ac55301d"
>                     }
>                 ],
>                 "status": "cancelled",
>                 "specialty": [
>                     {
>                         "coding": [
>                             {
>                                 "code": "Cardiology",
>                                 "display": "Cardiology"
>                             }
>                         ]
>                     }
>                 ],
>                 "appointmentType": {
>                     "coding": [
>                         {
>                             "display": "Cardiology Appointment"
>                         }
>                     ]
>                 },
>                 "start": "2024-12-01T10:01:00.000+00:00",
>                 "comment": "From the main East Riding Community Hospital entrance, follow the corridor down (just) past the main lift area.  We are on Level 2 of the Cardiology Treatment Centre, opposite the League of Friends. You can also contact us about your appointment on 01234 567 890",
>                 "participant": [
>                     {
>                         "actor": {
>                             "reference": "Patient/d420ed8e-da59-38b7-8114-7bb61080e44a",
>                             "display": "Miss Doris Davies"
>                         },
>                         "status": "declined"
>                     },
>                     {
>                         "actor": {
>                             "display": "Dr Achilles Van Collins (Doctor)"
>                         },
>                         "status": "declined"
>                     },
>                     {
>                         "actor": {
>                             "type": "Location",
>                             "display": "Room 1, The treatment Centre, Hull."
>                         },
>                         "status": "declined"
>                     }
>                 ]
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/91b4289f-43ab-332f-8570-64ff05e46b63"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Appointment/91b4289f-43ab-332f-8570-64ff05e46b63",
>             "resource": {
>                 "resourceType": "Appointment",
>                 "id": "91b4289f-43ab-332f-8570-64ff05e46b63",
>                 "meta": {
>                     "extension": [
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/access-route",
>                             "valueCoding": {
>                                 "system": "http://fhir.patientsknowbest.com/codesystem/access-route",
>                                 "code": "WEBAPP",
>                                 "display": "PKB website"
>                             }
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2024-04-15T13:41:04.178+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2024-04-15T13:41:04.177+00:00"
>                         },
>                         {
>                             "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-last-updated",
>                             "valueDateTime": "2024-04-15T13:41:04.177+00:00"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2024-04-15T13:41:04.844001Z"
>                         }
>                     ],
>                     "versionId": "6934348",
>                     "lastUpdated": "2024-04-15T13:41:04.844001Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-patient",
>                             "code": "d420ed8e-da59-38b7-8114-7bb61080e44a",
>                             "display": "Miss Doris Davies"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/privacy-label",
>                             "code": "GENERAL_HEALTH"
>                         }
>                     ]
>                 },
>                 "extension": [
>                     {
>                         "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream",
>                         "extension": [
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-source-id",
>                                 "valueString": "ehrmigrated"
>                             },
>                             {
>                                 "url": "https://fhir.patientsknowbest.com/structuredefinition/upstream-resource-id",
>                                 "valueString": "Appointment/e012f6c8-b50e-4569-a6a7-79bc25d3d2fc"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link",
>                         "valueUrl": "https://sandbox.patientsknowbest.com/nhs-login/login?phrPath=%2Fdiary%2FviewAppointment.action%3FuniqueId%3D91b4289f-43ab-332f-8570-64ff05e46b63%26style%3Dnhs-england"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134571465"
>                     },
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/common-identifier",
>                         "value": "22a75e3c-0dcc-4d1f-a0fb-8212d99a82cc"
>                     }
>                 ],
>                 "status": "booked",
>                 "appointmentType": {
>                     "coding": [
>                         {
>                             "display": "Blood test "
>                         }
>                     ]
>                 },
>                 "start": "2024-08-21T10:00:00.000+00:00",
>                 "participant": [
>                     {
>                         "actor": {
>                             "reference": "Patient/d420ed8e-da59-38b7-8114-7bb61080e44a",
>                             "display": "Miss Doris Davies"
>                         },
>                         "status": "accepted"
>                     },
>                     {
>                         "actor": {
>                             "type": "Location",
>                             "display": "Gp Practice "
>                         },
>                         "status": "accepted"
>                     }
>                 ]
>             }
>         }
>     ]
> }
> ```

> Macro (excerpt)
> 
> ## Aggregated Appointment supported search parameters
> 
> ```json
> {
>                             "name": "location",
>                             "definition": "/SearchParameter/Appointment.location",
>                             "type": "reference"
>                         },
>                         {
>                             "name": "patient",
>                             "definition": "/SearchParameter/Appointment.patient",
>                             "type": "reference"
>                         },
>                         {
>                             "name": "service-type",
>                             "definition": "/SearchParameter/Appointment.service-type",
>                             "type": "token"
>                         },
>                         {
>                             "name": "upstream-last-updated",
>                             "definition": "/SearchParameter/Appointment.upstream-last-updated",
>                             "type": "date"
>                         },
>                         {
>                             "name": "practitioner",
>                             "definition": "/SearchParameter/Appointment.practitioner",
>                             "type": "reference"
>                         },
>                         {
>                             "name": "reason-reference",
>                             "definition": "/SearchParameter/Appointment.reason-reference",
>                             "type": "reference"
>                         },
>                         {
>                             "name": "actor",
>                             "definition": "/SearchParameter/Appointment.actor",
>                             "type": "reference"
>                         },
>                         {
>                             "name": "appointment-type",
>                             "definition": "/SearchParameter/Appointment.appointment-type",
>                             "type": "token"
>                         },
>                         {
>                             "name": "service-category",
>                             "definition": "/SearchParameter/Appointment.service-category",
>                             "type": "token"
>                         },
>                         {
>                             "name": "status",
>                             "definition": "/SearchParameter/Appointment.status",
>                             "type": "token"
>                         },
>                         {
>                             "name": "specialty",
>                             "definition": "/SearchParameter/Appointment.specialty",
>                             "type": "token"
>                         },
>                         {
>                             "name": "identifier",
>                             "definition": "/SearchParameter/Appointment.identifier",
>                             "type": "token"
>                         },
>                         {
>                             "name": "reason-code",
>                             "definition": "/SearchParameter/Appointment.reason-code",
>                             "type": "token"
>                         },
>                         {
>                             "name": "based-on",
>                             "definition": "/SearchParameter/Appointment.based-on",
>                             "type": "reference"
>                         },
>                         {
>                             "name": "supporting-info",
>                             "definition": "/SearchParameter/Appointment.supporting-info",
>                             "type": "reference"
>                         },
>                         {
>                             "name": "date",
>                             "definition": "/SearchParameter/Appointment.date",
>                             "type": "date"
>                         },
>                         {
>                             "name": "slot",
>                             "definition": "/SearchParameter/Appointment.slot",
>                             "type": "reference"
>                         },
>                         {
>                             "name": "part-status",
>                             "definition": "/SearchParameter/Appointment.part-status",
>                             "type": "token"
>                         }
> ```