Patient Care Aggregator

Get patients referrals, bookings, documents, questionnaires and waiting lists

Changed on

The Wayfinder Patient Care Aggregator CarePlan response will return a FHIR Bundle resource which will contain one CarePlan resource per Waiting List Entry, one CarePlan resource containing all Referrals, Appointments, Documents and Questionnaires and one optional OperationOutcome resource (based on the UK Core FHIR specification) for use by the NHS App to the following specification.

get/aggregator/events

Request

  • Base URL
    https://sandbox.api.service.nhs.uk/patient-care-aggregator-api
  • URL
    https://sandbox.api.service.nhs.uk/patient-care-aggregator-api/aggregator/events
  • Auth
    HTTP bearer

Query parameters

patient:identifierstring required
Example:https://fhir.nhs.uk/Id/nhs-number|9000000009

The patient's NHS number. Expressed as <type>|<value> where <type> must be https://fhir.nhs.uk/Id/nhs-number and <value> must be a valid NHS number.

Headers

X-Correlation-IDstring uuid required
Example:c93e2449-a2ef-4476-ad15-13491036be22

An identifier which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding . characters.

NHSD-ID-Tokenstring byte required
Example:eyJzdWIiOiI4MmEyOTZkMC03NTJjLTRjZjEtOWEwMC03MzgwNmJiMWY4MzMiLCJhdWQiOiJuaHMtb25saW5lIiwia2lkIjoiZjYwZWI0NmZmOGFiZjBiZjllOTE3ZWVlNjA4NmM1ZmE0YTE2MmE1ZCIsImlzcyI6Imh0dHBzOi8vYXV0aC5hb3Muc2lnbmluLm5ocy51ayIsInR5cCI6IkpXVCIsImV4cCI6MTY1NzEwMTY4OCwiaWF0IjoxNjU3MDk4MDg4LCJhbGciOiJSUzUxMiIsImp0aSI6ImZjMzYyZGY0LWRlOWMtNDY1OS1hM2RmLWVmMDEwMDAwZjQ0MCJ9.eyJzdWIiOiI4MmEyOTZkMC03NTJjLTRjZjEtOWEwMC03MzgwNmJiMWY4MzMiLCJiaXJ0aGRhdGUiOiIxOTg1LTA5LTA3IiwibmhzX251bWJlciI6Ijk3MjY3NzkwNTciLCJpc3MiOiJodHRwczovL2F1dGguYW9zLnNpZ25pbi5uaHMudWsiLCJ2dG0iOiJodHRwczovL2F1dGguYW9zLnNpZ25pbi5uaHMudWsvdHJ1c3RtYXJrL2F1dGguYW9zLnNpZ25pbi5uaHMudWsiLCJhdWQiOiJuaHMtb25saW5lIiwiaWRfc3RhdHVzIjoidmVyaWZpZWQiLCJ0b2tlbl91c2UiOiJpZCIsInN1cm5hbWUiOiJDSE9OIiwiYXV0aF90aW1lIjoxNjU3MDk4MDgxLCJ2b3QiOiJQOS5DcC5DZCIsImlkZW50aXR5X3Byb29maW5nX2xldmVsIjoiUDkiLCJleHAiOjE2NTcxMDE2ODgsImlhdCI6MTY1NzA5ODA4OCwiZmFtaWx5X25hbWUiOiJDSE9OIiwianRpIjoiZmMzNjJkZjQtZGU5Yy00NjU5LWEzZGYtZWYwMTAwMDBmNDQwIn0.fEar_s6EaRWj1oWW1Kb_ekYFH2zPOjH4GdixoXKxvc7H7BEAnBt3k9FUMVIg9UD5i-4iu7hUy5p_0BbFZL5mPFFAnW67lAZV2D8FOcHDNunDU64ov5nNsBubHGOotRpExgHBxCF31eHonzzE8g2A7j4mmZJxlJ0MX-qCuF3CRiAc1apI_2ugPEDTFkX53YBNtDg2kDUVDTthCDdg1ylOiHunCurCXMaJSPmOGsac_ltRgYM_fs64MXoLmSNXUvxWa18N4689vipQ9hG4VASQQvPYMkgiynv6oX8ME9RPbBdmlTceeuEXiwLrvXtrU4xZkU3Js1x9DNTkZ96Fg9-yOQ

Valid NHS login ID Token JWT issues from the corresponding enviroment, see Security and authorisation above.

Response

The request was valid and the API was able to request information from the various upstream applications.

There are two possible outcomes:

HTTP statusDescription
200A successful request will return a HTTP status code of 200 OK containing a FHIR Bundle with 0..* CarePlan resources. All upstream systems responded normally.
207If an error occurs with an upstream service the aggregator will return a 207 Multi-status containing a FHIR Bundle with 0..* CarePlan resources and one OperationOutcome with each of the errors listed as issues.
resourceType'Bundle' required

FHIR resource type.

idstring

The X-Correlation-ID from the Request header

type'searchset' required

The type of FHIR bundle.

totalnumber

The total number of matches

Example response

{
  "meta": {
    "versionId": "1.0.0"
  },
  "total": 1,
  "entry": [
    {
      "fullUrl": "https://api.service.nhs.uk/patient-care-aggregator-api/CarePlan/c93e2449-a2ef-4476-ad15-13491036be22",
      "resource": {
        "meta": {
          "lastUpdated": "2023-06-25T00:00:00+00:00"
        },
        "identifier": [
          {
            "value": "RTD~ABC220939220X"
          }
        ],
        "title": "Ophthalmology",
        "subject": {
          "identifier": {
            "value": "9000000009"
          }
        },
        "period": {
          "start": "2022-06-22",
          "end": "2023-10-03",
          "extension": [
            {
              "url": "https://fhir.nhs.uk/StructureDefinition/Extension-PlannedWaitTime",
              "valueDuration": {
                "value": 16,
                "unit": "weeks"
              }
            }
          ]
        },
        "author": {
          "identifier": {
            "value": "R1F"
          },
          "display": "Isle of Wight NHS Trust"
        },
        "activity": [
          {
            "detail": {
              "id": "808993698030",
              "extension": [
                {
                  "valueUrl": "https://refer.nhs.uk/nhslogin?ubrn=808993698030"
                }
              ],
              "description": "Rheumatology - Metabolic Bone (inc Complex and Non-Complex cases) - Freeman - Newcastle FT - RTD",
              "scheduledPeriod": {
                "start": "2023-05-23T10:02:15.960Z",
                "extension": [
                  {
                    "valueDate": "2020-11-19"
                  }
                ]
              },
              "performer": [
                {
                  "identifier": {
                    "value": "RTD"
                  },
                  "display": "THE NEWCASTLE UPON TYNE HOSPITALS NHS FOUNDATION TRUST"
                }
              ]
            }
          }
        ]
      }
    }
  ]
}

Changes

    • info

      removed the VIRTUAL enum value from the ////////////// response property for the response status

    • warning

      added the new TELEPHONE enum value to the ////////////// response property for the response status

    • warning

      added the new VIDEO_CONSULTATION enum value to the ////////////// response property for the response status