Skip to content

SSCR FHIR Guidelines

Dave Henderson edited this page Aug 7, 2019 · 1 revision

SIDer Shared Care Record - Record Locate and Retrieve using CareConnect API - General Guidance

Introduction

The SIDeR Summary Care Record (SSCR) provides an interface to view patient information that may be held on multiple systems, under one single system. This is achieved by using the CareConnect API which is based on FHIR STU3. With SSCR, users are able to access and display 6 different types of patient information. These are:

  • Patient Demographics
  • Encounters
  • Medication
  • Allergies and Intolerances
  • Conditions
  • Documents

SSCR will return all the data available for the patient, across any organisation that has shared a CareConnect API endpoint and permitted access to their patient data for inclusion within the SSCR.

FHIR Resources

The FHIR standard uses ‘resources’ which are a collection of data models that use data items to create a complete object that relates to a specific area of healthcare. For those who are familiar with database design, a resource could be a table and the data item a field. Within SSCR, the following FHIR resources are used:

CareConnect API

The CareConnect project uses FHIR resources and constrains these to make them more specific health and social care, providing a set of building blocks for all developers to use, providing the ability for disparate systems to become interoperable through the use of a common standard. CareConnect has been developed with NHS Digital, GP suppliers, clinicians and other healthcare developers under the INTEROPen umbrella, making it a truly collaborative process.

Value Sets and CodeSystems

FHIR can use lists of codes to support a data item, and this is achieved by using value sets and codesystems.

Value Set

A value set is a list of codes for a specific use case, for example a list of contact types (telephone, fax, email). These are derived from a code system which maintains the list of codes. More detailed information on valuesets can be found at www.hl7.org/fhir/terminologies-valuesets.html

Code Systems

Where FHIR requires the use of coded values, a code system is used. A code system may use a fixed set of values defined within the FHIR specification, but can also use external codes from a terminology or ontology such as SNOMED CT or CTV3. Codesystems are reference in FHIR using a url.

More detailed information on codesystems can be found at www.hl7.org/fhir/terminologies.html

Data Types

Code

Values are taken from a controlled list. E.g. patient.gender allows male, female, other and unknown values. No other values are valid. This data type also has a binding strength which dictates if you can change values.
See bindings below. More information can be found at http://hl7.org/fhir/stu3/datatypes.html#code

CodeableConcept

Similar to code, but the values are from a terminology or ontology which controls the values, such as LOINC or SNOMED CT. A CodeableConcept will use a valueset to reference to the codesystem which provides the codes for that concept.
Bindings are applied to the valueset. More information can be found at http://hl7.org/fhir/stu3/datatypes.html#codeableconcept

Bindings

A binding strength is used to control what implementers can do with the values provided in the valueset. There are 4 binding strengths:

  • Example – Valueset is provided as a guide. Can use any values you wish.
  • Preferred – Recommended that the valueset provided is used, but can be replaced if a valid use case exists.
  • Extensible – Existing valueset is used, but can include additional values if existing one does not provide a complete set.
  • Required – Valueset must be used and included values cannot be added to, but values can be omitted.

More information can be found at http://hl7.org/fhir/STU3/terminologies.html#strength

SSCR Interactions

Each of the resources will require the implementation of search parameters to return the data stored within Cross Care in a FHIR JSON format that will be determined by the CareConnect ‘profiles’ that provide the design model for each resource. This will include the cardinality, data type, bindings, valuesets and codesystems that are used.

Once the existence of a patient in Cross Care is confirmed via the patient search, additional searches using CareConnect API will be performed in an attempt to retrieve any additional data stored for the patient that falls under the SSCR supported resource types mentioned earlier.

Patient

CareConnect Patient Search Interaction

GET [baseUrl]/Patient?identifier=https://fhir.nhs.uk/Id/nhs-number|9876543211&birthdate=1974-04-25

Return all Patient resources with NHS Number of 9876543210 and birth date is 2011.1.15

This search can have 3 possible outcomes, which will determine how SSCR proceeds:

  • No match – Don’t search for further data about patient
  • >1 result – Possible duplicate patient. Warning given and no further search performed for data.
  • 1 result – Retrieve available data for patient

The patient search MUST return the data in FHIR JSON format. An example of a patient record is detailed below.

Patient Search Result

{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 1,
  "entry": [
    {
      "resource": {
        "resourceType": "Patient",
        "id": "1094",
        "meta": {
          "lastUpdated": "2019-07-14T08:36:54.091+00:00",
          "profile": [
            "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-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"
                    }
                  ]
                }
              }
            ],
            "system": "https://fhir.nhs.uk/Id/nhs-number",
            "value": "9876543211"
          },
          {
            "system": "https://fhir.leedsth.nhs.uk/Id/HospiceIdentifier",
            "value": "1094"
          }
        ],
        "active": true,
        "name": [
          {
            "use": "official",
            "family": "Ryan",
            "given": [
              "Rochelle"
            ],
            "prefix": [
              "Miss"
            ]
          }
        ],
        "telecom": [
          {
            "system": "phone",
            "value": "(0113) 615 2646",
            "use": "home"
          },
          {
            "system": "email",
            "value": "RocRyan@stmargarets.org",
            "use": "home"
          }
        ],
        "gender": "female",
        "birthDate": "1974-04-25",
        "address": [
          {
            "use": "home",
            "type": "both",
            "line": [
              "29 Asket Avenue"
            ],
            "city": "Leeds",
            "district": "West Yorkshire",
            "postalCode": "LS14 1JF"
          }
        ],
        "contact": [
          {
            "relationship": [
              {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/v2/0131",
                    "code": "N",
                    "display": "Next-of-kin"
                  }
                ]
              }
            ],
            "name": {
              "use": "usual",
              "text": "Rhys James"
            },
            "telecom": [
              {
                "system": "phone",
                "value": "01935475122"
              }
            ]
          }
        ]
      }
    }
  ]
}

This is the expected format for a CareConnect patient search. The patient resource is returned inside a bundle ‘searchset’ type. When searching a FHIR resource, results are always returned in a bundle resource, unless a unique ID is used where only one result is possible.

This is a minimal example, which could be stripped down even further, although I’d recommend this as an absolute minimum. You can include additional data such as address and contact details. This is the flexibility that we have using CareConnect in that only certain data items are mandated and everything else is optional.

If you have restricted patients, then the data returned can be tailored accordingly, or indicate patient exists.

Encounter

CareConnect Encounter Search Interaction

GET [baseUrl]/Encounter?patient.identifier=https://fhir.nhs.uk/Id/nhs-number|9876543211

Return all Encounter resources for Patient with a NHS Number of 9876543211

Condition Search Results

{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 4,
  "link": [
    {
      "relation": "self",
      "url": "https://sider.ydh.nhs.uk/3_0_1/Encounter?patient=9449303789"
    }
  ],
  "entry": [
    {
      "fullUrl": "https://sider.ydh.nhs.uk/3_0_1/Encounter/9999-99999-1",
      "resource": {
        "resourceType": "Encounter",
        "id": "9999-99999-1",
        "meta": {
          "lastUpdated": "2018-07-25T10:46:08",
          "profile": [
            "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Encounter-1"
          ]
        },
        "status": "finished",
        "class": {
          "display": "outpatient"
        },
        "type": [
          {
            "coding": [
              {
                "system": "https://fhir.nhs.uk/STU3/CodeSystem/DCH-Specialty-1",
                "code": "320",
                "display": "CARDIOLOGY"
              }
            ]
          }
        ],
        "subject": {
          "reference": "https://sider.ydh.nhs.uk/3_0_1/patient/9876543211"
        },
        "period": {
          "start": "2018-07-25T10:31:08"
        }
      }
    },
    {
      "fullUrl": "https://sider.ydh.nhs.uk/3_0_1/Encounter/9999-99999-4",
      "resource": {
        "resourceType": "Encounter",
        "id": "9999-99999-4",
        "meta": {
          "lastUpdated": "2019-03-29T15:00:00",
          "profile": [
            "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Encounter-1"
          ]
        },
        "status": "finished",
        "class": {
          "display": "outpatient"
        },
        "type": [
          {
            "coding": [
              {
                "system": "https://fhir.nhs.uk/STU3/CodeSystem/DCH-Specialty-1",
                "code": "320",
                "display": "CARDIOLOGY"
              }
            ]
          }
        ],
        "subject": {
          "reference": "https://sider.ydh.nhs.uk/3_0_1/patient/9876543211"
        },
        "period": {
          "start": "2019-03-29T14:30:00"
        }
      }
    }
  ]
}

MedicationStatement

CareConnect MedicationStatement Search

GET [baseUrl]/MedicationStatement?patient.identifier=https://fhir.nhs.uk/Id/nhs-number|9876543211

Return all MedicationStatement resources for Patients with a NHS Number of 9876543211

Example MedicationStatement Search Results

{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 4,
  "link": [
    {
      "relation": "self",
      "url": "https://sider.ydh.nhs.uk/3_0_1/MedicationStatement?patient=9449303789"
    }
  ],
  "entry": [
    {
      "fullUrl": "https://sider.ydh.nhs.uk/3_0_1/MedicationStatement/11",
      "resource": {
        "resourceType": "MedicationStatement",
        "id": "11",
        "meta": {
          "lastUpdated": "2019-03-12T14:14:33.809+00:00",
          "profile": [
            "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-MedicationStatement-1"
          ]
        },
        "status": "active",
        "medicationReference": {
          "reference": "#8"
        },
        "subject": {
          "reference": "https://sider.ydh.nhs.uk/3_0_1/Patient/9876543211"
        },
        "taken": "unk",
        "dosage": [
          {
            "text": "one in the morning"
          }
        ],
        "contained": [
          {
            "resourceType": "Medication",
            "id": "8",
            "meta": {
              "lastUpdated": "2018-09-23T08:52:11.525+00:00",
              "profile": [
                "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Medication-1"
              ]
            },
            "code": {
              "text": "Furosemide 20mg tablets"
            }
          }
        ]
      }
    },
    {
      "fullUrl": "https://sider.ydh.nhs.uk/3_0_1/MedicationStatement/12",
      "resource": {
        "resourceType": "MedicationStatement",
        "id": "12",
        "meta": {
          "lastUpdated": "2019-03-12T14:14:33.809+00:00",
          "profile": [
            "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-MedicationStatement-1"
          ]
        },
        "status": "active",
        "medicationReference": {
          "reference": "#9"
        },
        "subject": {
          "reference": "https://sider.ydh.nhs.uk/3_0_1/Patient/9876543211"
        },
        "taken": "unk",
        "dosage": [
          {
            "text": "one in the morning"
          }
        ],
        "contained": [
          {
            "resourceType": "Medication",
            "id": "9",
            "meta": {
              "lastUpdated": "2018-09-23T08:52:11.525+00:00",
              "profile": [
                "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Medication-1"
              ]
            },
            "code": {
              "text": "Lisinopril 10mg tablets"
            }
          }
        ]
      }
    },
    {
      "fullUrl": "https://sider.ydh.nhs.uk/3_0_1/MedicationStatement/13",
      "resource": {
        "resourceType": "MedicationStatement",
        "id": "13",
        "meta": {
          "lastUpdated": "2019-03-12T14:14:33.809+00:00",
          "profile": [
            "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-MedicationStatement-1"
          ]
        },
        "status": "active",
        "medicationReference": {
          "reference": "#3"
        },
        "subject": {
          "reference": "https://sider.ydh.nhs.uk/3_0_1/Patient/9876543211"
        },
        "taken": "unk",
        "dosage": [
          {
            "text": "one in the morning"
          }
        ],
        "contained": [
          {
            "resourceType": "Medication",
            "id": "3",
            "meta": {
              "lastUpdated": "2018-09-23T08:52:11.525+00:00",
              "profile": [
                "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Medication-1"
              ]
            },
            "code": {
              "text": "Aspirin 75mg tablets"
            }
          }
        ]
      }
    },
    {
      "fullUrl": "https://sider.ydh.nhs.uk/3_0_1/MedicationStatement/20",
      "resource": {
        "resourceType": "MedicationStatement",
        "id": "20",
        "meta": {
          "lastUpdated": "2019-03-12T14:14:33.809+00:00",
          "profile": [
            "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-MedicationStatement-1"
          ]
        },
        "status": "active",
        "medicationReference": {
          "reference": "#16"
        },
        "subject": {
          "reference": "https://sider.ydh.nhs.uk/3_0_1/Patient/9876543211"
        },
        "taken": "unk",
        "dosage": [
          {
            "text": "once daily"
          }
        ],
        "contained": [
          {
            "resourceType": "Medication",
            "id": "16",
            "meta": {
              "lastUpdated": "2018-09-23T08:52:11.525+00:00",
              "profile": [
                "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Medication-1"
              ]
            },
            "code": {
              "text": "Sitagliptin 50mg tablets"
            }
          }
        ]
      }
    }
  ]
}

AllergyIntollerance

**CareConnect AllergyIntollerance Search

GET [baseUrl]/AllergyIntolerance?patient.identifier=https://fhir.nhs.uk/Id/nhs-number|9876543211

Return all AllergyIntolerance resources for Patients with a NHS Number of 9876543211

AllergyIntollerance Search Results

{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "relation": "self",
      "url": "https://sider.ydh.nhs.uk/3_0_1/AllergyIntolerance?patient=9876543211"
    }
  ],
  "entry": [
    {
      "fullUrl": "https://sider.ydh.nhs.uk/3_0_1/AllergyIntolerance/4",
      "resource": {
        "resourceType": "AllergyIntolerance",
        "id": "4",
        "meta": {
          "lastUpdated": "2018-09-14T08:39:57.876+00:00",
          "profile": [
            "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-AllergyIntolerance-1"
          ]
        },
        "clinicalStatus": "inactive",
        "verificationStatus": "confirmed",
        "code": {
          "text": "No Known Allergies"
        },
        "patient": {
          "reference": "https://sider.ydh.nhs.uk/3_0_1/Patient/9876543211"
        },
        "assertedDate": "2017-10-18T00:00:00+00:00"
      }
    }
  ]
}

Where a patient has multiple allergies and intolerances, there will be multiple entries within the bundle. Each entry begins with a fullUrl.

Condition

CareConnect Condition Search

GET [baseUrl]/Condition?patient.identifier=https://fhir.nhs.uk/Id/nhs-number|9876543210

Return all Condition resources for Patients with a NHS Number of 9876543210

Condition Search Results

{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 3,
  "link": [
    {
      "relation": "self",
      "url": "https://sider.ydh.nhs.uk/3_0_1/Condition?patient=9876543210"
    }
  ],
  "entry": [
    {
      "fullUrl": "https://sider.ydh.nhs.uk/3_0_1/Condition/1",
      "resource": {
        "resourceType": "Condition",
        "id": "1",
        "meta": {
          "lastUpdated": "2018-12-06T13:43:58.403+00:00",
          "profile": [
            "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Condition-1"
          ]
        },
        "clinicalStatus": "active",
        "code": {
          "text": "Chronic obstructive lung disease (disorder)"
        },
        "subject": {
          "reference": "https://sider.ydh.nhs.uk/3_0_1/Patient/9876543210"
        },
        "assertedDate": "2018-11-29T14:16:55+00:00"
      }
    },
    {
      "fullUrl": "https://sider.ydh.nhs.uk/3_0_1/Condition/2",
      "resource": {
        "resourceType": "Condition",
        "id": "2",
        "meta": {
          "lastUpdated": "2018-12-06T13:43:58.403+00:00",
          "profile": [
            "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Condition-1"
          ]
        },
        "clinicalStatus": "resolved",
        "code": {
          "text": "Rupture of appendix (disorder)"
        },
        "subject": {
          "reference": "https://sider.ydh.nhs.uk/3_0_1/Patient/9876543210"
        }
      }
    },
    {
      "fullUrl": "https://sider.ydh.nhs.uk/3_0_1/Condition/3",
      "resource": {
        "resourceType": "Condition",
        "id": "3",
        "meta": {
          "lastUpdated": "2018-12-06T13:43:58.403+00:00",
          "profile": [
            "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Condition-1"
          ]
        },
        "clinicalStatus": "resolved",
        "code": {
          "text": "Fracture of radius AND ulna (disorder)"
        },
        "subject": {
          "reference": "https://sider.ydh.nhs.uk/3_0_1/Patient/9876543210"
        }
      }
    }
  ]
}

DocumentReference

CareConnect DocumentReference Search

GET [baseUrl]/DocumentReference?patient.identifier=https://fhir.nhs.uk/Id/nhs-number|9876543210

Return all DocumentReference resources for Patients with a NHS Number of 9876543210

DocumentReference Search Results

{
  "resourceType": "Bundle",
  "id": "3418b3ca-e263-439e-a2a6-37c225e0f2bf",
  "type": "searchset",
  "total": 2,
  "entry": [
    {
      "fullUrl": "https://sider.sompar.nhs.uk/siderservice.svc/test/documentreference/9876543210 ",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "688b2665-d3a5-4664-a2a3-04c074ae77f5",
        "meta": {
          "profile": [
          ],
          "lastUpdated": "2018-07-01T13:11:33Z"
        },
        "status": "current",
        "type": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "310854009",
              "display": "Housing report"
            }
          ]
        },
        "subject": {
          "identifier": {
            "system": "https://fhir.nhs.uk/Id/nhs-number",
            "value": "9449303789"
          }
        },
        "created": "2018-10-24",
        "indexed": "2019-04-01T23:11:33+10:00",
        "content": [
          {
            "attachment": {
              "title": "Housing report"
            }
          }
        ]
      }
    },
    {
      "fullUrl": "https://sider.sompar.nhs.uk/siderservice.svc/test/documentreference/9876543210",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "2dc224a4-7e02-4851-a55e-c93d01788012",
        "meta": {
          "profile": [
          ],
          "lastUpdated": "2018-09-11T13:11:33Z"
        },
        "status": "current",
        "type": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "186065003",
              "display": "Power of attorney medical report"
            }
          ]
        },
        "subject": {
          "identifier": {
            "system": "https://fhir.nhs.uk/Id/nhs-number",
            "value": "9449303789"
          }
        },
        "created": "2018-07-24",
        "indexed": "2019-02-16T13:11:33+10:00",
        "content": [
          {
            "attachment": {
              "title": "Power of attorney medical report"
            }
          }
        ]
      }
    }
  ]
}

Capability Statement

The endpoint MUST implement FHIR REST API capabilities. This returns details about the endpoints capabilities. In SSCR this will indicate which resources are available for sharing by supporting specific resource type and the REST interaction required to return a FHIR payload to the originating system.

Return CapabilityStatement

GET [baseUrl]/metadata

Returns FHIR endpoint capability statement

Example Capability Statement

{
  "resourceType": "CapabilityStatement",
  "version": "1.0",
  "name": "SSCR Capability Statement",
  "status": "active",
  "date": "2019-07-29",
  "publisher": "St Margarets",
  "description": "Reference server that implements SSCR",
  "kind": "instance",
  "fhirVersion": "3.0.1",
  "acceptUnknown": "no",
  "format": [
    "application/fhir+json"
  ],
  "rest": [
    {
      "mode": "server",
      "resource": [
        {
          "type": "Patient",
          "interaction": [
            {
              "code": "search-type"
            }
          ],
          "searchParam": [
            {
              "name": "identifier",
              "type": "token",
              "documentation": "Patient identiifer e.g. NHS Number"
            },
            {
              "name": "birthdate",
              "type": "date",
              "documentation": "The patient's date of birth"
            }
          ]
        },
        {
          "type": "Condition",
          "interaction": [
            {
              "code": "search-type"
            }
          ],
          "searchParam": [
            {
              "name": "identifier",
              "type": "token",
              "documentation": "Patient identiifer e.g. NHS Number"
            },
            {
              "name": "asserted-date",
              "type": "date",
              "documentation": "Date record was believed accurate"
            },
            {
              "name": "clinical-status",
              "type": "token",
              "documentation": "The clinical status of the condition"
            }
          ]
        },
        {
          "type": "MedicationStatement",
          "interaction": [
            {
              "code": "search-type"
            }
          ],
          "searchParam": [
            {
              "name": "identifier",
              "type": "token",
              "documentation": "Patient identiifer e.g. NHS Number"
            },
            {
              "name": "status",
              "type": "date",
              "documentation": "Date record was believed accurate"
            },
            {
              "name": "effective",
              "type": "date",
              "documentation": "Date when patient was taking (or not taking) the medication"
            }
          ]
        },
        {
          "type": "AllergyIntollerance",
          "interaction": [
            {
              "code": "search-type"
            }
          ],
          "searchParam": [
            {
              "name": "Patient",
              "type": "reference",
              "documentation": "Who the sensitivity is for"
            },
            {
              "name": "date",
              "type": "date",
              "documentation": "Date record was believed accurate"
            }
          ]
        },
        {
          "type": "DocumentReference",
          "interaction": [
            {
              "code": "search-type"
            }
          ],
          "searchParam": [
            {
              "name": "Patient",
              "type": "reference",
              "documentation": "Who/what is the subject of the document"
            },
            {
              "name": "created",
              "type": "date",
              "documentation": "Document creation time"
            },
            {
              "name": "status",
              "type": "code",
              "documentation": "Document status"
            }
          ]
        },
        {
          "type": "Encounter",
          "interaction": [
            {
              "code": "search-type"
            }
          ],
          "searchParam": [
            {
              "name": "Patient",
              "type": "reference",
              "documentation": "The identity of a patient to list encounters for"
            },
            {
              "name": "date",
              "type": "date",
              "documentation": "A date within the period the Encounter lasted"
            }
          ]
        }
      ]
    }
  ]
}

Security Considerations

As a provider of shared care data for a patient, security is a vital component of the end to end process that SSCR implements in order to consume provider data. As a provider of such data, the endpoint made available to SSCR MUST be able to process an authentication token in a HTTP header that is sent along with the HTTP request. Tokens are implemented using the JWT standard.

It is the responsibility of the provider to assess tokens and determine if they have originated from a trusted source an that the token is valid.

There are rules that MUST be implemented when processing tokens:

  • Where no authentication token is included, the request MUST be rejected
  • Where an invalid authentication token is included, the request MUST be rejected
  • Where an authentication token does not provide authorisation to execute the request, that request MUST be rejected.