{
  "resourceType": "Bundle",
  "id": "e7c01000-2985-4e0e-b7c7-008292733cda",
  "meta": {
    "lastUpdated": "2020-01-30T10:40:37.456+00:00"
  },
  "type": "searchset",
  "total": 13,
  "link": [
    {
      "relation": "self",
      "url": "https://health-interoperability-test.nottscc.gov.uk/CareDataService/v2/Patient?_format=json&_revinclude=Task%3Afor&_revinclude=ReferralRequest%3Asubject&_revinclude=EpisodeOfCare%3Apatient&_revinclude=Flag%3Asubject&_revinclude=Procedure%3Asubject&_revinclude=Device%3Apatient&_revinclude=RelatedPerson%3Apatient&_revinclude=CareTeam%3Asubject&identifier=https%3A%2F%2Ffhir.nhs.uk%2FId%2Fnhs-number%7C9994449877"
    }
  ],
  "entry": [
    {
      "fullUrl": "https://health-interoperability-test.nottscc.gov.uk/CareDataService/v2/Patient/101539520",
      "resource": {
        "resourceType": "Patient",
        "id": "101539520",
        "meta": {
          "profile": [
            "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-Patient-1"
          ]
        },
        "identifier": [
          {
            "extension": [
              {
                "url": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-NHSNumberVerificationStatus-1",
                "valueCodeableConcept": {
                  "coding": [
                    {
                      "system": "https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-NHSNumberVerificationStatus-1",
                      "code": "01",
                      "display": "Number present and verified"
                    }
                  ]
                }
              }
            ],
            "use": "official",
            "system": "https://fhir.nhs.uk/Id/nhs-number",
            "value": "9994449877"
          }
        ],
        "name": [
          {
            "use": "official",
            "text": "Testcommunityfifty Testpatient",
            "family": "Testpatient",
            "given": [
              "Testcommunityfifty"
            ]
          }
        ],
        "gender": "male",
        "birthDate": "1967-06-06",
        "address": [
          {
            "use": "home",
            "text": "44a Sir John Robinson Way,  Arnold, Nottingham, NG5 6DB",
            "line": [
              "44a Sir John Robinson Way",
              "Arnold",
              "Nottingham"
            ],
            "postalCode": "NG5 6DB"
          }
        ]
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "https://health-interoperability-test.nottscc.gov.uk/CareDataService/v2/Procedure/03dba7a6-d3de-4b1f-a286-4ce742f7a36b",
      "resource": {
        "resourceType": "Procedure",
        "id": "03dba7a6-d3de-4b1f-a286-4ce742f7a36b",
        "meta": {
          "profile": [
            "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-Procedure-1"
          ]
        },
        "status": "in-progress",
        "category": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "299751000000102",
              "display": "Social services procedure"
            }
          ],
          "text": "Primary Support Reason"
        },
        "subject": {
          "reference": "Patient/101539520"
        },
        "performedPeriod": {
          "start": "2017-04-01"
        },
        "reasonCode": [
          {
            "extension": [
              {
                "url": "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/Extension-CDS-PrimarySupportReasonFlag",
                "valueBoolean": "true"
              }
            ],
            "coding": [
              {
                "system": "hhttps://fhir.nottinghamshire.gov.uk/STU3/codesystem/CDS-SocialCareSupportReason",
                "code": "mental-health",
                "display": "Mental Health Support"
              },
              {
                "system": "https://nottscc.gov.uk/service_user_group",
                "display": "Mental Health Support"
              },
              {
                "system": "https://nottscc.gov.uk/service_user_sub_group",
                "display": "Mental Health Support"
              }
            ],
            "text": "Mental Health Support"
          }
        ]
      },
      "search": {
        "mode": "include"
      }
    },
    {
      "fullUrl": "https://health-interoperability-test.nottscc.gov.uk/CareDataService/v2/Flag/3653ff7b-4d18-4892-9903-bade2fc23131",
      "resource": {
        "resourceType": "Flag",
        "id": "3653ff7b-4d18-4892-9903-bade2fc23131",
        "meta": {
          "profile": [
            "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-Flag-1"
          ]
        },
        "status": "active",
        "code": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "514331000000104",
              "display": "Referral to safeguarding adults team"
            }
          ],
          "text": "Referral to safeguarding adults team"
        },
        "subject": {
          "reference": "Patient/101539520"
        },
        "period": {
          "start": "2019-03-04"
        }
      },
      "search": {
        "mode": "include"
      }
    },
    {
      "fullUrl": "https://health-interoperability-test.nottscc.gov.uk/CareDataService/v2/Device/2766fd1c-d0d1-461a-b448-b070106725a2",
      "resource": {
        "resourceType": "Device",
        "id": "2766fd1c-d0d1-461a-b448-b070106725a2",
        "meta": {
          "profile": [
            "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CDS-Device"
          ]
        },
        "type": {
          "text": "Keysafe"
        },
        "patient": {
          "reference": "Patient/101539520"
        },
        "note": [
          {
            "text": "Keysafe by back door (not main front door)"
          }
        ]
      },
      "search": {
        "mode": "include"
      }
    },
    {
      "fullUrl": "https://health-interoperability-test.nottscc.gov.uk/CareDataService/v2/Device/bbf2702c-41b0-4aac-a3b8-bb86c43d906g",
      "resource": {
        "resourceType": "Device",
        "id": "bbf2702c-41b0-4aac-a3b8-bb86c43d906g",
        "meta": {
          "profile": [
            "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CDS-Device"
          ]
        },
        "type": {
          "text": "Lifeline Alarm"
        },
        "patient": {
          "reference": "Patient/101539520"
        },
        "note": [
          {
            "text": "Optional note about Lifeline alarm"
          }
        ]
      },
      "search": {
        "mode": "include"
      }
    },
    {
      "fullUrl": "https://health-interoperability-test.nottscc.gov.uk/CareDataService/v2/EpisodeOfCare/ae04b8ea-f27b-4702-9967-3e6c0b711036",
      "resource": {
        "resourceType": "EpisodeOfCare",
        "id": "ae04b8ea-f27b-4702-9967-3e6c0b711036",
        "meta": {
          "profile": [
            "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-EpisodeOfCare-1"
          ]
        },
        "contained": [
          {
            "resourceType": "Organization",
            "id": "cds-organization-a",
            "meta": {
              "profile": [
                "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-Organization-1"
              ]
            },
            "type": [
              {
                "text": "Local Authority"
              }
            ],
            "name": "Nottinghamshire County Council",
            "contact": [
              {
                "purpose": {
                  "text": "Adult Social Care Enquiries"
                },
                "telecom": [
                  {
                    "system": "phone",
                    "value": "0115 984 2222",
                    "use": "work"
                  }
                ]
              }
            ]
          }
        ],
        "status": "active",
        "type": [
          {
            "id": "6683",
            "coding": [
              {
                "system": "https://fhir.nottinghamshire.gov.uk/STU3/codesystem/CDS-SocialCarePackageDetailCategory",
                "code": "package-name",
                "display": "Package Name"
              }
            ],
            "text": "Gemini Exclusive Care_NwkSher_AP_2"
          },
          {
            "id": "381",
            "coding": [
              {
                "system": "https://fhir.nottinghamshire.gov.uk/STU3/codesystem/CDS-SocialCarePackageDetailCategory",
                "code": "package-type",
                "display": "Package Type"
              }
            ],
            "text": "Adults Home Support"
          }
        ],
        "patient": {
          "reference": "Patient/101539520"
        },
        "managingOrganization": {
          "reference": "#cds-organization-a"
        },
        "period": {
          "start": "2019-03-11"
        }
      },
      "search": {
        "mode": "include"
      }
    },
    {
      "fullUrl": "https://health-interoperability-test.nottscc.gov.uk/CareDataService/v2/EpisodeOfCare/cb22b5b2-179c-4f8b-96ba-266b3f7c5a48",
      "resource": {
        "resourceType": "EpisodeOfCare",
        "id": "cb22b5b2-179c-4f8b-96ba-266b3f7c5a48",
        "meta": {
          "profile": [
            "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-EpisodeOfCare-1"
          ]
        },
        "contained": [
          {
            "resourceType": "Organization",
            "id": "cds-organization-b",
            "meta": {
              "profile": [
                "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-Organization-1"
              ]
            },
            "type": [
              {
                "text": "Local Authority"
              }
            ],
            "name": "START Internal Supplier",
            "contact": [
              {
                "purpose": {
                  "text": "Adult Social Care Enquiries"
                },
                "telecom": [
                  {
                    "system": "phone",
                    "value": "0115 984 2222",
                    "use": "work"
                  }
                ]
              }
            ]
          }
        ],
        "status": "finished",
        "type": [
          {
            "id": "6841",
            "coding": [
              {
                "system": "https://fhir.nottinghamshire.gov.uk/STU3/codesystem/CDS-SocialCarePackageDetailCategory",
                "code": "package-name",
                "display": "Package Name"
              }
            ],
            "text": "START"
          },
          {
            "id": "369",
            "coding": [
              {
                "system": "https://fhir.nottinghamshire.gov.uk/STU3/codesystem/CDS-SocialCarePackageDetailCategory",
                "code": "package-type",
                "display": "Package Type"
              }
            ],
            "text": "Reablement Service"
          }
        ],
        "patient": {
          "reference": "Patient/101539520"
        },
        "managingOrganization": {
          "reference": "#cds-organization-b"
        },
        "period": {
          "start": "2018-12-29",
          "end": "2019-02-03"
        }
      },
      "search": {
        "mode": "include"
      }
    },
    {
      "fullUrl": "https://health-interoperability-test.nottscc.gov.uk/CareDataService/v2/ReferralRequest/3a16c7bd-17f7-4810-bb41-fb3e97650660",
      "resource": {
        "resourceType": "ReferralRequest",
        "id": "3a16c7bd-17f7-4810-bb41-fb3e97650660",
        "meta": {
          "profile": [
            "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-ReferralRequest-1"
          ]
        },
        "contained": [
          {
            "resourceType": "Practitioner",
            "id": "cds-practitioner-gp",
            "meta": {
              "profile": [
                "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-Practitioner-1"
              ]
            },
            "name": [
              {
                "text": "Dr Hannah Smith"
              }
            ]
          },
          {
            "resourceType": "Organization",
            "id": "cds-organization-s",
            "meta": {
              "profile": [
                "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-Organization-1"
              ]
            },
            "name": "Riverside Surgery"
          }
        ],
        "status": "active",
        "intent": "plan",
        "type": {
          "text": "GP Referral"
        },
        "subject": {
          "reference": "Patient/101539520"
        },
        "authoredOn": "2019-03-24T08:10:16+00:00",
        "requester": {
          "agent": {
            "reference": "#cds-practitioner-gp"
          },
          "onBehalfOf": {
            "reference": "#cds-organization-s"
          }
        },
        "description": "The patient has complained about difficultly getting dressed in a morning."
      },
      "search": {
        "mode": "include"
      }
    },
    {
      "fullUrl": "https://health-interoperability-test.nottscc.gov.uk/CareDataService/v2/ReferralRequest/3a16c7bd-17f7-4810-bb41-fe3e97650660",
      "resource": {
        "resourceType": "ReferralRequest",
        "id": "3a16c7bd-17f7-4810-bb41-fe3e97650660",
        "meta": {
          "profile": [
            "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-ReferralRequest-1"
          ]
        },
        "contained": [
          {
            "resourceType": "Practitioner",
            "id": "cds-practitioner-a",
            "meta": {
              "profile": [
                "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-Practitioner-1"
              ]
            },
            "name": [
              {
                "text": "IDT Nurse"
              }
            ]
          },
          {
            "resourceType": "Organization",
            "id": "cds-organization-c",
            "meta": {
              "profile": [
                "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-Organization-1"
              ]
            },
            "name": "Nottingham Hospital"
          }
        ],
        "status": "completed",
        "intent": "plan",
        "type": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "715591000000108",
              "display": "Hospital Discharge Notification to Social Care"
            }
          ],
          "text": "Hospital Discharge Notification to Social Care"
        },
        "subject": {
          "reference": "Patient/101539520"
        },
        "authoredOn": "2018-12-24T08:10:16+00:00",
        "requester": {
          "agent": {
            "reference": "#cds-practitioner-a"
          },
          "onBehalfOf": {
            "reference": "#cds-organization-c"
          }
        },
        "description": "The patient was admitted due to a fall and will require some reablement support on discharge."
      },
      "search": {
        "mode": "include"
      }
    },
    {
      "fullUrl": "https://health-interoperability-test.nottscc.gov.uk/CareDataService/v2/Task/d53f2ed0-aa9d-4c86-9359-c77c3fc591e7",
      "resource": {
        "resourceType": "Task",
        "id": "d53f2ed0-aa9d-4c86-9359-c77c3fc591e7",
        "meta": {
          "profile": [
            "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-Task"
          ]
        },
        "contained": [
          {
            "resourceType": "Practitioner",
            "id": "cds-practitioner-contact",
            "meta": {
              "profile": [
                "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-Practitioner-1"
              ]
            },
            "name": [
              {
                "text": "Hannah Smith"
              }
            ],
            "telecom": [
              {
                "system": "phone",
                "value": "0115 917 5544",
                "use": "work"
              }
            ]
          }
        ],
        "basedOn": [
          {
            "reference": "ReferralRequest/3a16c7bd-17f7-4810-bb41-fe3e97650660"
          }
        ],
        "status": "completed",
        "intent": "plan",
        "code": {
          "id": "696",
          "coding": [
            {
              "system": "https://fhir.nottinghamshire.gov.uk/STU3/codesystem/CDS-SocialCareTaskDetailCategory",
              "code": "task-name",
              "display": "Task Name"
            }
          ],
          "text": "Occupational Therapy Assessment"
        },
        "for": {
          "reference": "Patient/101539520"
        },
        "executionPeriod": {
          "start": "2018-12-27",
          "end": "2018-12-29"
        },
        "owner": {
          "reference": "#cds-practitioner-contact"
        },
        "output": [
          {
            "type": {
              "coding": [
                {
                  "system": "https://fhir.nottinghamshire.gov.uk/STU3/codesystem/CDS-SocialCareTaskOutcomeType",
                  "code": "outcome-summary",
                  "display": "Outcome Summary"
                }
              ],
              "text": "Outcome Summary"
            },
            "valueString": "START Package Commissioned"
          }
        ]
      },
      "search": {
        "mode": "include"
      }
    },
    {
      "fullUrl": "https://health-interoperability-test.nottscc.gov.uk/CareDataService/v2/RelatedPerson/007bb927-9e35-4f8f-b478-cf7ab04f8056",
      "resource": {
        "resourceType": "RelatedPerson",
        "id": "007bb927-9e35-4f8f-b478-cf7ab04f8056",
        "meta": {
          "profile": [
            "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-RelatedPerson-1"
          ]
        },
        "identifier": [
          {
            "use": "official",
            "system": "https://fhir.nhs.uk/Id/nhs-number",
            "value": "9111111720"
          }
        ],
        "patient": {
          "reference": "Patient/101539520"
        },
        "relationship": {
          "coding": [
            {
              "system": "http://CareDataService/RelatedPerson/relationship-type",
              "display": "Wife"
            },
            {
              "system": "http://CareDataService/RelatedPerson/relationship-flag",
              "display": "Next Of Kin"
            },
            {
              "system": "http://CareDataService/RelatedPerson/relationship-flag",
              "display": "Carer"
            }
          ]
        },
        "name": [
          {
            "use": "official",
            "text": "Test-16 Patient",
            "family": "Patient",
            "given": [
              "Test-16"
            ]
          }
        ],
        "birthDate": "1964-04-03"
      },
      "search": {
        "mode": "include"
      }
    },
    {
      "fullUrl": "https://health-interoperability-test.nottscc.gov.uk/CareDataService/v2/CareTeam/3653ff7b-4d18-4892-9903-bade2fc12345",
      "resource": {
        "resourceType": "CareTeam",
        "id": "3653ff7b-4d18-4892-9903-bade2fc12345",
        "meta": {
          "profile": [
            "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-CareTeam-1"
          ]
        },
        "contained": [
          {
            "resourceType": "Practitioner",
            "id": "pr1",
            "name": [
              {
                "family": "Key-OT-Worker",
                "given": [
                  "Orlando"
                ]
              }
            ],
            "telecom": [
              {
                "system": "phone",
                "value": "0115 917 5678",
                "use": "work"
              }
            ]
          },
          {
            "resourceType": "Practitioner",
            "id": "pr2",
            "name": [
              {
                "family": "Key-SocialWorker",
                "given": [
                  "Sara"
                ]
              }
            ],
            "telecom": [
              {
                "system": "phone",
                "value": "0115 917 1234",
                "use": "work"
              }
            ]
          }
        ],
        "category": [
          {
            "coding": [
              {
                "system": "http://hl7.org/fhir/care-team-category",
                "code": "longitudinal"
              }
            ]
          }
        ],
        "name": "Social Care Team",
        "subject": {
          "reference": "Patient/101539520"
        },
        "participant": [
          {
            "role": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "106328005",
                  "display": "Social worker"
                }
              ],
              "text": "Key Social Worker"
            },
            "member": {
              "reference": "#pr2"
            }
          },
          {
            "role": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "309427003",
                  "display": "Social services occupational therapist"
                }
              ],
              "text": "Key OT Worker"
            },
            "member": {
              "reference": "#pr1"
            }
          }
        ]
      },
      "search": {
        "mode": "include"
      }
    },
    {
      "fullUrl": "https://health-interoperability-test.nottscc.gov.uk/CareDataService/v2/OperationOutcome/CDS-search-outcome",
      "resource": {
        "resourceType": "OperationOutcome",
        "id": "CDS-search-outcome",
        "issue": [
          {
            "severity": "warning",
            "code": "incomplete",
            "diagnostics": "Failed to return 1 Task resource due to internal errors",
            "expression": [
              "Task"
            ]
          },
          {
            "severity": "warning",
            "code": "incomplete",
            "diagnostics": "Failed to return 2 ReferralRequest resources due to internal errors",
            "expression": [
              "ReferralRequest"
            ]
          }
        ]
      },
      "search": {
        "mode": "outcome"
      }
    }
  ]
}