Third-Party Integrations
Patients Know Best provides HL7 and custom REST APIs to enable our supported partners to send data into a patient record. The specific workflow to be followed and APIs to be used will be dependent on the nature of the application or device requiring integration. The key factors in determining this will be:
Whether the data is being sent directly from either:
An application on a mobile device
From a server where data is collected and stored by the partner from their application or device and the patient NHS number is known.
The data that the partner wishes to add to patient records within PKB.
Whether PKB currently has support for direct integration of a device via Validic (a third-party partner of PKB that provides us with direct integration support for some devices).
Below you will find an overview of the general integration plan for integrating directly with an application or from a back-end server where the NHS number of the patient is known. Whilst these are the two most common integration scenarios, it is not unusual when integrating with a partner that a “hybrid” solution needs to be found. The PKB integrations team provides support during the scoping and requirements phase to ensure the most appropriate integration workflow is defined for each of our integrating partners.
Sending data directly from an application
Where an integrating partner has a requirement to send data directly from an application (e.g an app on a mobile device) this is generally achieved using the PKB custom REST APIs, using patient-granted permissions.
Simplified standard workflow:
Development is provided within the application that enables a patient to “link” their application account with their PKB account, by means of PKB OAuth 2.0 authentication and authorisation to grant permission for a third party to interact with their PKB record.
Once the patient grants permission, access and refresh tokens can be generated to enable interaction with the PKB custom REST APIs.
Users APIs are used to extract patient demographic detail (e.g. NHS number, PKB public id) to enable the sending in of data points.
Specific custom REST API used to send patient data (e.g. measurement)*
There may be instances where the use of the custom REST APIs to send in data points is either not feasible or appropriate. In this situation the integrating partner will use HL7 messages to send in patient data points. This can be supported in one of two ways:
The integrating partner is provided with HL7 partner credentials to enable the sending of data on behalf of an existing customer. For example, Partner A has sent data on behalf of PKB Customer A.
This will require the partner to supply a PKB-provided alias within each HL7 message header to denote which customer they are sending data on behalf of.
The partner is set up in PKB as a “no access” organisation to enable them to send in data directly as themselves, without the ability to manage patient records as a customer would.
The method chosen will determine what is shown to the patient as being the source of the information they see in their PKB record.
Sending data from a partner server with a known NHS number
When a partner stores data from a device or application for a patient with a known NHS number on their own server, the sending of that data to PKB is commonly achieved through the use of the PKB HL7 APIs. An example of this could be where there is a professional dashboard that is used alongside or instead of a patient application.
The standard workflow generally follows the below steps:
Patients Know Best will provide partner HL7 credentials to enable the sending of data into PKB.
An NHS organisation grants permission for that partner to post data on their behalf.
Before sending data, a recommended step is for the partner to check for the existence of the patient record within PKB using the HL7 A19 query. If the record does not already exist, the partner can then create this for the organisation using the demographic details they hold, assuming these are sufficient for record creation (minimum of first name, last name, NHS number and DOB).
Data can then be posted to the users record, using the NHS number as the identifier, for the range of data points available via HL7 APIs.
For device integrations, these would typically be measurements via ORUs.
However, where the device is producing additional information outside of coded data, such as advice plans, reports or documentation, this may be sent via MDMs as a document or structured care plan as well as any coded information collected.
The full range of data that can be posted this way can be found via the HL7 link above, and PKB would work alongside the partner and the customer to define the specific scope and data requirements..
An example of an integration using partner credentials to post measurement data is Current Health; see our manual here for the UI experience of this workflow.
For further questions about Partnering with PKB please get in touch with the Patients Know Best partnership team on partnerships@patientsknowbest.com.