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

## What

> Macro (excerpt)
> 
> Enables you to pull out all conditions (diagnoses) 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 Condition resource, using the patient’s national id or PKB public id (with the corresponding system) in the subject search parameter.
>   - *National ID Example: *[https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/Condition?subject:Patient.identifier=https://fhir.nhs.uk/Id/nhs-number%7C9996650251](https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/Condition?subject:Patient.identifier=https://fhir.nhs.uk/Id/nhs-number%7C9996650251)
>   - *Public ID Example:* [https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/Condition?subject:Patient.identifier=http://fhir.patientsknowbest.com/id/public-id%7C84d598e9-0112-4d0f-a829-90da12c6474f](https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/Condition?subject:Patient.identifier=http://fhir.patientsknowbest.com/id/public-id%7C84d598e9-0112-4d0f-a829-90da12c6474f)
> - 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 active conditions (those without an end date): [https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/Condition?subject:Patient.identifier=https://fhir.nhs.uk/Id/nhs-number%7C9996650251&abatement-date:missing=true](https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/Condition?subject:Patient.identifier=https://fhir.nhs.uk/Id/nhs-number%7C9996650251&abatement-date:missing=true)
> - A FHIR bundle is returned to you in json format with all of the patient’s conditions 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 R4 [Condition](https://hl7.org/fhir/R4/condition.html) FHIR resource.  [You can read the full capability statement here.](https://wiki.patientsknowbest.com/space/api/3364389010/Capabilities:+Aggregated+Endpoint#Condition)
> - Read more about how [PKB maps any non-FHIR condition data (HL7 or UI entered) to FHIR](https://wiki.patientsknowbest.com/space/api/3684139009/Aggregated+Condition).

## Example

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

> Macro (excerpt)
> 
> ![image-20250219-164354.png](media://b9fb93d9-d41a-4bfa-8ac2-355e0d9ee45a)

> Macro (excerpt)
> 
> Here’s an example response for pulling all of this patient’s conditions:
> 
> <span style="color: #36b37e">**GET**</span> [https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/Condition?subject:Patient.identifier=http://fhir.patientsknowbest.com/id/public-id|84d598e9-0112-4d0f-a829-90da12c6474f](https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/Condition?subject:Patient.identifier=http://fhir.patientsknowbest.com/id/public-id%7C84d598e9-0112-4d0f-a829-90da12c6474f)
> 
> ```json
> {
>     "resourceType": "Bundle",
>     "meta": {
>         "lastUpdated": "2025-02-19T16:44:45.569+00:00"
>     },
>     "type": "searchset",
>     "total": 20,
>     "link": [
>         {
>             "relation": "self",
>             "url": "/fhir/Condition?subject%3APatient.identifier=https%3A%2F%2Ffhir.nhs.uk%2FId%2Fnhs-number%7C9996650251"
>         }
>     ],
>     "entry": [
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/d89da473-c3ca-39f6-bc1d-6b2ed73cf04e"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/d89da473-c3ca-39f6-bc1d-6b2ed73cf04e",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "d89da473-c3ca-39f6-bc1d-6b2ed73cf04e",
>                 "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": "14253777"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2024-08-19T14:57:36.164+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2024-08-19T14:08:48.000+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/source-text",
>                             "valueString": "Dr Frankie Simpson"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2024-08-19T14:36:02.427069Z"
>                         }
>                     ],
>                     "versionId": "7337229",
>                     "lastUpdated": "2024-08-19T14:57:36.401099Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "e8ce8a2b-6b08-3e03-8feb-eb32dc389ab4",
>                             "display": "Housewold NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "e8ce8a2b-6b08-3e03-8feb-eb32dc389ab4",
>                             "display": "Housewold 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": "Condition/7dec5475-b294-40af-988b-9e2f8e25cec6"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "http://fhir.patientsknowbest.com/structuredefinition/source-organization-time-zone-id",
>                         "valueString": "Europe/London"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134612392"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "coding": [
>                         {
>                             "system": "http://snomed.info/sct",
>                             "code": "44054006",
>                             "display": "Diabetes mellitus"
>                         }
>                     ]
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 }
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/a6eb6264-d41d-3444-9841-f4fab517b1c9"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/a6eb6264-d41d-3444-9841-f4fab517b1c9",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "a6eb6264-d41d-3444-9841-f4fab517b1c9",
>                 "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-08-16T10:44:07.613+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2024-08-16T10:44:07.605+00:00"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2024-08-16T10:44:08.200515Z"
>                         }
>                     ],
>                     "versionId": "7336868",
>                     "lastUpdated": "2024-08-16T10:44:08.200515Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-patient",
>                             "code": "85fcb223-a1ab-3efb-9d5b-376cca520781",
>                             "display": "Mr Charlie Derma"
>                         },
>                         {
>                             "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": "Condition/242af985-81f8-4a08-9ba3-2d24d5b784e5"
>                             }
>                         ]
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134611806"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "text": "Laceration of lower leg"
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 },
>                 "abatementDateTime": "2021-12-29T00:00:00.000+00:00"
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/e86422d0-3e1e-3ead-94dc-4d661529a087"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/e86422d0-3e1e-3ead-94dc-4d661529a087",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "e86422d0-3e1e-3ead-94dc-4d661529a087",
>                 "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-08-16T10:44:40.867+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2024-08-16T10:44:40.860+00:00"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2024-08-16T10:44:41.546461Z"
>                         }
>                     ],
>                     "versionId": "7336869",
>                     "lastUpdated": "2024-08-16T10:44:41.546461Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-patient",
>                             "code": "85fcb223-a1ab-3efb-9d5b-376cca520781",
>                             "display": "Mr Charlie Derma"
>                         },
>                         {
>                             "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": "Condition/48922e48-59c4-4770-a17d-3b6ee6a409c5"
>                             }
>                         ]
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134611807"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "text": "Other specified excision of pituitary gland"
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 },
>                 "abatementDateTime": "2019-12-26T00:00:00.000+00:00"
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/ca61418c-fc59-3c9a-93a4-647eb75da699"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/ca61418c-fc59-3c9a-93a4-647eb75da699",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "ca61418c-fc59-3c9a-93a4-647eb75da699",
>                 "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": "14253777"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2024-08-19T14:57:36.184+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2024-08-19T14:08:48.000+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/source-text",
>                             "valueString": "Ms Poppy Perry"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2024-08-19T14:36:02.429424Z"
>                         }
>                     ],
>                     "versionId": "7337230",
>                     "lastUpdated": "2024-08-19T14:57:36.404074Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "e8ce8a2b-6b08-3e03-8feb-eb32dc389ab4",
>                             "display": "Housewold NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "e8ce8a2b-6b08-3e03-8feb-eb32dc389ab4",
>                             "display": "Housewold 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": "Condition/2572b71c-a692-41e9-a0e1-1f2232ddbc72"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "http://fhir.patientsknowbest.com/structuredefinition/source-organization-time-zone-id",
>                         "valueString": "Europe/London"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134612394"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "coding": [
>                         {
>                             "system": "http://snomed.info/sct",
>                             "code": "93864006",
>                             "display": "Primary malignant neoplasm of lung (Left)"
>                         }
>                     ]
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 }
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/3727824c-4bf0-352e-b453-7cb5c009850b"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/3727824c-4bf0-352e-b453-7cb5c009850b",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "3727824c-4bf0-352e-b453-7cb5c009850b",
>                 "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": "14253777"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2024-08-19T14:57:36.174+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2024-08-19T14:08:48.000+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/source-text",
>                             "valueString": "Dr Thea Taylor"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2024-08-19T14:36:02.414671Z"
>                         }
>                     ],
>                     "versionId": "7337226",
>                     "lastUpdated": "2024-08-19T14:57:36.338075Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "e8ce8a2b-6b08-3e03-8feb-eb32dc389ab4",
>                             "display": "Housewold NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "e8ce8a2b-6b08-3e03-8feb-eb32dc389ab4",
>                             "display": "Housewold 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": "Condition/b762b855-041a-436e-bd10-eedb7b647f42"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "http://fhir.patientsknowbest.com/structuredefinition/source-organization-time-zone-id",
>                         "valueString": "Europe/London"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134612393"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "coding": [
>                         {
>                             "system": "http://snomed.info/sct",
>                             "code": "266261006",
>                             "display": "Raynaud's phenomenon"
>                         }
>                     ]
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 }
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/50cf20cd-afd9-35e1-8548-22b12a1f62c1"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/50cf20cd-afd9-35e1-8548-22b12a1f62c1",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "50cf20cd-afd9-35e1-8548-22b12a1f62c1",
>                 "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-08-16T10:42:56.939+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2024-08-16T10:42:56.929+00:00"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2024-08-16T10:42:57.460236Z"
>                         }
>                     ],
>                     "versionId": "7336866",
>                     "lastUpdated": "2024-08-16T10:42:57.460236Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-patient",
>                             "code": "85fcb223-a1ab-3efb-9d5b-376cca520781",
>                             "display": "Mr Charlie Derma"
>                         },
>                         {
>                             "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": "Condition/8dc59f0b-63ac-4cbe-a4c3-a6b11dbba4dd"
>                             }
>                         ]
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134611804"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "text": "History of threatening violent behaviour toward others"
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 },
>                 "abatementDateTime": "2020-10-06T23:00:00.000+00:00"
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/14e417b0-6b46-39c0-bb30-3cc13de90080"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/14e417b0-6b46-39c0-bb30-3cc13de90080",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "14e417b0-6b46-39c0-bb30-3cc13de90080",
>                 "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-08-16T10:43:38.541+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2024-08-16T10:43:38.533+00:00"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2024-08-16T10:43:38.877776Z"
>                         }
>                     ],
>                     "versionId": "7336867",
>                     "lastUpdated": "2024-08-16T10:43:38.877776Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-patient",
>                             "code": "85fcb223-a1ab-3efb-9d5b-376cca520781",
>                             "display": "Mr Charlie Derma"
>                         },
>                         {
>                             "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": "Condition/d5a1f838-0da6-4f16-8983-55455f7609a9"
>                             }
>                         ]
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134611805"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "text": "Laceration of leg (Right)"
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 },
>                 "abatementDateTime": "2021-06-04T23:00:00.000+00:00"
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/0f6d71fb-ae45-3e55-b3a2-e724e5b8d748"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/0f6d71fb-ae45-3e55-b3a2-e724e5b8d748",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "0f6d71fb-ae45-3e55-b3a2-e724e5b8d748",
>                 "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": "2023-05-16T13:05:13+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2023-05-16T13:05:13+00:00"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2023-05-16T13:05:15.730593Z"
>                         }
>                     ],
>                     "versionId": "2757053",
>                     "lastUpdated": "2023-05-16T13:05:15.730593Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "29c26058-3253-38a8-8f84-0b28f488db2f",
>                             "display": "Royal Dermatology Hospital"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-team",
>                             "code": "78cb6b3b-9eca-3cf5-8638-4c222bdefb87",
>                             "display": "Dermatology"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-practitioner",
>                             "code": "1befd114-3753-38cf-805d-f0837ebbc59e",
>                             "display": "Dr Jake Professional"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "29c26058-3253-38a8-8f84-0b28f488db2f",
>                             "display": "Royal Dermatology Hospital"
>                         },
>                         {
>                             "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": "Condition/1fbdb4d4-09b7-4541-a0cd-7a6509a89c56"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "http://fhir.patientsknowbest.com/structuredefinition/source-organization-time-zone-id",
>                         "valueString": "Europe/London"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "126095737"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "text": "Eczema"
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 },
>                 "onsetDateTime": "2023-01-09T00:00:00+00:00"
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/ee5740b2-9573-32c1-8ef2-7499d47ceb24"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/ee5740b2-9573-32c1-8ef2-7499d47ceb24",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "ee5740b2-9573-32c1-8ef2-7499d47ceb24",
>                 "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": "2023-05-16T12:43:06+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2023-05-16T12:43:06+00:00"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2023-05-16T12:50:04.466102Z"
>                         }
>                     ],
>                     "versionId": "2757038",
>                     "lastUpdated": "2023-05-16T12:50:04.466102Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "29c26058-3253-38a8-8f84-0b28f488db2f",
>                             "display": "Royal Dermatology Hospital"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-team",
>                             "code": "78cb6b3b-9eca-3cf5-8638-4c222bdefb87",
>                             "display": "Dermatology"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-practitioner",
>                             "code": "1befd114-3753-38cf-805d-f0837ebbc59e",
>                             "display": "Dr Jake Professional"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "29c26058-3253-38a8-8f84-0b28f488db2f",
>                             "display": "Royal Dermatology Hospital"
>                         },
>                         {
>                             "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": "Condition/da7d4427-9896-4f6b-86ef-1c552eb8e7de"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "http://fhir.patientsknowbest.com/structuredefinition/source-organization-time-zone-id",
>                         "valueString": "Europe/London"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "126095728"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "text": "Asthma "
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 },
>                 "onsetDateTime": "2023-01-09T00:00:00+00:00"
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/da1ac5f6-2986-307f-8563-ded75bf459fb"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/da1ac5f6-2986-307f-8563-ded75bf459fb",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "da1ac5f6-2986-307f-8563-ded75bf459fb",
>                 "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": "14253777"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2024-08-19T14:57:36.154+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2024-08-19T14:08:48.000+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/source-text",
>                             "valueString": "Prof Alfie Harlan Torres"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2024-08-19T14:36:02.463260Z"
>                         }
>                     ],
>                     "versionId": "7337231",
>                     "lastUpdated": "2024-08-19T14:57:36.406497Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "e8ce8a2b-6b08-3e03-8feb-eb32dc389ab4",
>                             "display": "Housewold NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "e8ce8a2b-6b08-3e03-8feb-eb32dc389ab4",
>                             "display": "Housewold 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": "Condition/1ce99122-070a-4ae2-a1f9-b3a99df2fb98"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "http://fhir.patientsknowbest.com/structuredefinition/source-organization-time-zone-id",
>                         "valueString": "Europe/London"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134612391"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "coding": [
>                         {
>                             "system": "http://snomed.info/sct",
>                             "code": "17741008",
>                             "display": "Acute tonsillitis (Left)"
>                         }
>                     ]
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 },
>                 "onsetDateTime": "2022-12-15T00:00:00.000+00:00"
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/e6c09cb6-9cbb-3ac5-b54a-b0a16b2232a2"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/e6c09cb6-9cbb-3ac5-b54a-b0a16b2232a2",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "e6c09cb6-9cbb-3ac5-b54a-b0a16b2232a2",
>                 "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": "14253777"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2024-08-19T14:57:36.126+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2024-08-19T14:08:48.000+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/source-text",
>                             "valueString": "Prof Harrison Izaiah Hunt"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2024-08-19T14:36:02.420582Z"
>                         }
>                     ],
>                     "versionId": "7337228",
>                     "lastUpdated": "2024-08-19T14:57:36.398024Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "e8ce8a2b-6b08-3e03-8feb-eb32dc389ab4",
>                             "display": "Housewold NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "e8ce8a2b-6b08-3e03-8feb-eb32dc389ab4",
>                             "display": "Housewold 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": "Condition/72d2d3c6-b59d-4856-9261-9bc5cddc4155"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "http://fhir.patientsknowbest.com/structuredefinition/source-organization-time-zone-id",
>                         "valueString": "Europe/London"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134612389"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "coding": [
>                         {
>                             "system": "http://snomed.info/sct",
>                             "code": "73761001",
>                             "display": "Diagnostic colonoscopy"
>                         }
>                     ]
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 },
>                 "onsetDateTime": "2022-01-04T00:00:00.000+00:00"
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/4199ea63-d3d6-3496-82cc-e47f99782776"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/4199ea63-d3d6-3496-82cc-e47f99782776",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "4199ea63-d3d6-3496-82cc-e47f99782776",
>                 "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": "2023-06-13T08:15:57+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2023-06-13T08:15:57+00:00"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2023-06-13T08:15:58.469355Z"
>                         }
>                     ],
>                     "versionId": "5659865",
>                     "lastUpdated": "2023-06-13T08:15:58.469355Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-patient",
>                             "code": "85fcb223-a1ab-3efb-9d5b-376cca520781",
>                             "display": "Mr Charlie Derma"
>                         },
>                         {
>                             "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": "Condition/f798a9ce-c911-4748-a99b-86c7d0187e70"
>                             }
>                         ]
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "133660317"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "text": "Chest Infection"
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 },
>                 "onsetDateTime": "2021-06-12T23:00:00+00:00",
>                 "abatementDateTime": "2021-06-26T23:00:00+00:00"
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/6a64f07c-25d2-387d-a1df-e3cd476cb8b9"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/6a64f07c-25d2-387d-a1df-e3cd476cb8b9",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "6a64f07c-25d2-387d-a1df-e3cd476cb8b9",
>                 "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": "2023-06-19T08:35:46+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2023-06-19T08:35:46+00:00"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2023-06-19T08:35:48.807175Z"
>                         }
>                     ],
>                     "versionId": "5665101",
>                     "lastUpdated": "2023-06-19T08:35:48.807175Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-practitioner",
>                             "code": "347fbdd4-1efa-37f3-b216-83c14e19e0ba",
>                             "display": "Dr Paul GP"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/privacy-label",
>                             "code": "MENTAL_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": "Condition/ab0ab41f-9ea5-4127-8582-d328817e68fd"
>                             }
>                         ]
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "133671370"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "text": "Depression"
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 },
>                 "onsetDateTime": "2020-09-13T23:00:00+00:00"
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/76b0a33e-4da3-3f72-9c12-680642724e54"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/76b0a33e-4da3-3f72-9c12-680642724e54",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "76b0a33e-4da3-3f72-9c12-680642724e54",
>                 "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-08-16T10:41:01.545+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2024-08-16T10:41:01.535+00:00"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2024-08-16T10:41:02.207827Z"
>                         }
>                     ],
>                     "versionId": "7336863",
>                     "lastUpdated": "2024-08-16T10:41:02.207827Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-patient",
>                             "code": "85fcb223-a1ab-3efb-9d5b-376cca520781",
>                             "display": "Mr Charlie Derma"
>                         },
>                         {
>                             "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": "Condition/145b0800-77ce-484e-80dc-61e2bec1ac9f"
>                             }
>                         ]
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134611801"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "text": "Oat cell carcinoma"
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 },
>                 "onsetDateTime": "2020-07-16T23:00:00.000+00:00"
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/bc138a1a-e4d7-364d-86d9-b62e6fcb62c8"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/bc138a1a-e4d7-364d-86d9-b62e6fcb62c8",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "bc138a1a-e4d7-364d-86d9-b62e6fcb62c8",
>                 "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-08-16T10:41:29.662+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2024-08-16T10:41:29.655+00:00"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2024-08-16T10:41:30.537604Z"
>                         }
>                     ],
>                     "versionId": "7336864",
>                     "lastUpdated": "2024-08-16T10:41:30.537604Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-patient",
>                             "code": "85fcb223-a1ab-3efb-9d5b-376cca520781",
>                             "display": "Mr Charlie Derma"
>                         },
>                         {
>                             "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": "Condition/65fb12e4-3ab1-4ae7-a543-071d09b58640"
>                             }
>                         ]
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134611802"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "text": "Alcohol dependence"
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 },
>                 "onsetDateTime": "2020-07-11T23:00:00.000+00:00"
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/2d859e16-aceb-3bed-9d94-cc4a18857d61"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/2d859e16-aceb-3bed-9d94-cc4a18857d61",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "2d859e16-aceb-3bed-9d94-cc4a18857d61",
>                 "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": "14253777"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/version-persisted",
>                             "valueDateTime": "2024-08-19T14:57:36.144+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2024-08-19T14:08:48.000+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/source-text",
>                             "valueString": "Prof Eleanor Jones"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2024-08-19T14:36:02.426254Z"
>                         }
>                     ],
>                     "versionId": "7337227",
>                     "lastUpdated": "2024-08-19T14:57:36.388514Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-organization",
>                             "code": "e8ce8a2b-6b08-3e03-8feb-eb32dc389ab4",
>                             "display": "Housewold NHS Trust"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/connecting-org",
>                             "code": "e8ce8a2b-6b08-3e03-8feb-eb32dc389ab4",
>                             "display": "Housewold 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": "Condition/f3a070c9-92e8-4a4f-a1be-ca11f7419639"
>                             }
>                         ]
>                     },
>                     {
>                         "url": "http://fhir.patientsknowbest.com/structuredefinition/source-organization-time-zone-id",
>                         "valueString": "Europe/London"
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134612390"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "coding": [
>                         {
>                             "system": "http://snomed.info/sct",
>                             "code": "1162521000",
>                             "display": "Broken teeth injury with complication"
>                         }
>                     ]
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 },
>                 "onsetDateTime": "2020-06-30T23:00:00.000+00:00"
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/8bba7185-1d8e-39a9-a009-743744d18469"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/8bba7185-1d8e-39a9-a009-743744d18469",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "8bba7185-1d8e-39a9-a009-743744d18469",
>                 "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-08-16T10:42:16.246+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2024-08-16T10:42:16.238+00:00"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2024-08-16T10:42:17.048295Z"
>                         }
>                     ],
>                     "versionId": "7336865",
>                     "lastUpdated": "2024-08-16T10:42:17.048295Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-patient",
>                             "code": "85fcb223-a1ab-3efb-9d5b-376cca520781",
>                             "display": "Mr Charlie Derma"
>                         },
>                         {
>                             "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": "Condition/c1952136-f71e-491d-a449-3f085b3b327e"
>                             }
>                         ]
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134611803"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "text": "Poor manual dexterity"
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 },
>                 "onsetDateTime": "2020-05-13T23:00:00.000+00:00"
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/574c498e-e334-3de5-b546-e40f53abb491"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/574c498e-e334-3de5-b546-e40f53abb491",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "574c498e-e334-3de5-b546-e40f53abb491",
>                 "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": "2023-06-13T11:00:16+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2023-06-13T11:00:16+00:00"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2023-06-13T08:15:30.133076Z"
>                         }
>                     ],
>                     "versionId": "5659935",
>                     "lastUpdated": "2023-06-13T11:00:19.473177Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-patient",
>                             "code": "85fcb223-a1ab-3efb-9d5b-376cca520781",
>                             "display": "Mr Charlie Derma"
>                         },
>                         {
>                             "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": "Condition/c79264a5-65a4-4b0e-b3d6-70481959dce0"
>                             }
>                         ]
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "133660421"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "text": "Chest Infection"
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 },
>                 "onsetDateTime": "2020-05-04T23:00:00+00:00",
>                 "abatementDateTime": "2020-05-18T23:00:00+00:00"
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/36fb44bd-280e-354b-9089-95eaf1e8ae42"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/36fb44bd-280e-354b-9089-95eaf1e8ae42",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "36fb44bd-280e-354b-9089-95eaf1e8ae42",
>                 "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-08-16T10:40:16.845+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2024-08-16T10:40:16.835+00:00"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2024-08-16T10:40:18.313052Z"
>                         }
>                     ],
>                     "versionId": "7336862",
>                     "lastUpdated": "2024-08-16T10:40:18.313052Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-patient",
>                             "code": "85fcb223-a1ab-3efb-9d5b-376cca520781",
>                             "display": "Mr Charlie Derma"
>                         },
>                         {
>                             "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": "Condition/ead64592-0067-428c-9ed5-9f2763c50411"
>                             }
>                         ]
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "134611799"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "text": "Acute myocardial infarction"
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 },
>                 "onsetDateTime": "2020-01-22T00:00:00.000+00:00"
>             },
>             "search": {
>                 "mode": "match"
>             }
>         },
>         {
>             "link": [
>                 {
>                     "relation": "self",
>                     "url": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/7d5606ba-c5d3-3264-baa0-8eb7f71abd7b"
>                 }
>             ],
>             "fullUrl": "https://sandboxaggregated.fhir-api.sandbox.patientsknowbest.com/Condition/7d5606ba-c5d3-3264-baa0-8eb7f71abd7b",
>             "resource": {
>                 "resourceType": "Condition",
>                 "id": "7d5606ba-c5d3-3264-baa0-8eb7f71abd7b",
>                 "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": "2023-06-19T08:45:07+00:00"
>                         },
>                         {
>                             "url": "http://fhir.patientsknowbest.com/structuredefinition/recorded-date",
>                             "valueDateTime": "2023-06-19T08:45:07+00:00"
>                         },
>                         {
>                             "url": "ex:createdAt",
>                             "valueInstant": "2023-06-19T08:45:07.813658Z"
>                         }
>                     ],
>                     "versionId": "5665124",
>                     "lastUpdated": "2023-06-19T08:45:07.813658Z",
>                     "security": [
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/source-practitioner",
>                             "code": "347fbdd4-1efa-37f3-b216-83c14e19e0ba",
>                             "display": "Dr Paul GP"
>                         },
>                         {
>                             "system": "http://fhir.patientsknowbest.com/codesystem/privacy-label",
>                             "code": "SEXUAL_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": "Condition/0a4f01dc-3a5b-44de-8b7a-c73088bb5597"
>                             }
>                         ]
>                     }
>                 ],
>                 "identifier": [
>                     {
>                         "system": "http://fhir.patientsknowbest.com/id/menudata-legacy-identifier",
>                         "value": "133671376"
>                     }
>                 ],
>                 "category": [
>                     {
>                         "coding": [
>                             {
>                                 "system": "http://terminology.hl7.org/CodeSystem/condition-category",
>                                 "code": "problem-list-item"
>                             }
>                         ]
>                     }
>                 ],
>                 "code": {
>                     "text": "Chlamydia"
>                 },
>                 "subject": {
>                     "reference": "Patient/85fcb223-a1ab-3efb-9d5b-376cca520781"
>                 },
>                 "onsetDateTime": "2017-04-19T23:00:00+00:00",
>                 "abatementDateTime": "2017-08-19T23:00:00+00:00"
>             },
>             "search": {
>                 "mode": "match"
>             }
>         }
>     ]
> }
> ```


> Macro (excerpt)
> 
> ## Aggregated Condition supported search parameters
> 
> ```
> {
>                             "name": "identifier",
>                             "definition": "/SearchParameter/Condition.identifier",
>                             "type": "token"
>                         },
>                         {
>                             "name": "onset-date",
>                             "definition": "/SearchParameter/Condition.onset-date",
>                             "type": "date"
>                         },
>                         {
>                             "name": "category",
>                             "definition": "/SearchParameter/Condition.category",
>                             "type": "token"
>                         },
>                         {
>                             "name": "verification-status",
>                             "definition": "/SearchParameter/Condition.verification-status",
>                             "type": "token"
>                         },
>                         {
>                             "name": "recorded-date",
>                             "definition": "/SearchParameter/Condition.recorded-date",
>                             "type": "date"
>                         },
>                         {
>                             "name": "onset-age",
>                             "definition": "/SearchParameter/Condition.onset-age",
>                             "type": "quantity"
>                         },
>                         {
>                             "name": "stage",
>                             "definition": "/SearchParameter/Condition.stage",
>                             "type": "token"
>                         },
>                         {
>                             "name": "abatement-string",
>                             "definition": "/SearchParameter/Condition.abatement-string",
>                             "type": "string"
>                         },
>                         {
>                             "name": "evidence-detail",
>                             "definition": "/SearchParameter/Condition.evidence-detail",
>                             "type": "reference"
>                         },
>                         {
>                             "name": "asserter",
>                             "definition": "/SearchParameter/Condition.asserter",
>                             "type": "reference"
>                         },
>                         {
>                             "name": "body-site",
>                             "definition": "/SearchParameter/Condition.body-site",
>                             "type": "token"
>                         },
>                         {
>                             "name": "evidence",
>                             "definition": "/SearchParameter/Condition.evidence",
>                             "type": "token"
>                         },
>                         {
>                             "name": "code",
>                             "definition": "/SearchParameter/Condition.code",
>                             "type": "token"
>                         },
>                         {
>                             "name": "abatement-date",
>                             "definition": "/SearchParameter/Condition.abatement-date",
>                             "type": "date"
>                         },
>                         {
>                             "name": "abatement-age",
>                             "definition": "/SearchParameter/Condition.abatement-age",
>                             "type": "quantity"
>                         },
>                         {
>                             "name": "onset-info",
>                             "definition": "/SearchParameter/Condition.onset-info",
>                             "type": "string"
>                         },
>                         {
>                             "name": "severity",
>                             "definition": "/SearchParameter/Condition.severity",
>                             "type": "token"
>                         },
>                         {
>                             "name": "encounter",
>                             "definition": "/SearchParameter/Condition.encounter",
>                             "type": "reference"
>                         },
>                         {
>                             "name": "patient",
>                             "definition": "/SearchParameter/Condition.patient",
>                             "type": "reference"
>                         },
>                         {
>                             "name": "clinical-status",
>                             "definition": "/SearchParameter/Condition.clinical-status",
>                             "type": "token"
>                         },
>                         {
>                             "name": "subject",
>                             "definition": "/SearchParameter/Condition.subject",
>                             "type": "reference"
>                         }
> ```