Query for the date of last data point for patients by BSN
Query for the date of last data point for patients by PKB UUID
Generate an invitation token for a specific patient
Search for laboratory results, returning at most 1 per day
Check the current user's purview
Check whether a specific document has been read
Check the status of a specific patient
Trigger a questionnaire request for a specific Patient as a System client
Trigger questionnaire requests for all Patients in a team as a System client
Query for the date of last data point for patients by BSN
Note: whilst every effort has been made to ensure that the examples are correct and useful, they do not form part of the official specification.
...
Generate an access token by following the OAuth 2.0 walkthrough
The example below assumes you have been granted an access token of: eyJhbGxxxx
Confirm the ID of the Organization
The example below assumes you have an ID of: 235a397b-1ae8-4755-9c77-1a0e2fbc5314
Confirm the NHS number of the patient
The example below assumes an NHS number of: 9999999999
...
curl -X POST --header "Accept: application/fhir+json" --header "Content-Type: application/fhir+json" --header "Authorization: Bearer eyJhbGxxxx" --header "X-Org-Public-Id: 235a397b-1ae8-4755-9c77-1a0e2fbc5314" "https://sandbox.patientsknowbest.com/fhir/Organization/$generate-invitation-tokens" --data "{ \"resourceType\": \"Parameters\", \"parameter\": [ { \"name\": \"patientIdentifier\", \"valueIdentifier\": { \"system\": \"https://fhir.nhs.uk/Id/nhs-number\", \"value\": \"9999999999\" } } ] }"
...
Generate an access token by following the OAuth 2.0 walkthrough
The example below assumes you have been granted an access token of: aaaaa-bbbbb
Confirm the Patient reference of the Patient you are interested in
The example below assumes a reference of: Patient/3d8afd18-0844-459a-b3c2-355d02e54c0a
Confirm the start of the date range you are interested in, and whether the date is inclusive (ge) or exclusive (gt)
The example below assumes a start date of: ge2018-01-01
Confirm the end of the date range you are interested in, and whether the date is inclusive (le) or exclusive (lt)
The example below assumes an end date of: le2018-12-31
Make the call as detailed below, replacing the access token and search parameters with your own values
The matching Consent resources will be returned in the search results
...
curl -X GET --header "Accept: application/fhir+json" --header "Authorization: Bearer aaaaa-bbbbb" "https://sandbox.patientsknowbest.com/fhir/Observation/$group?category=http://fhir.patientsknowbest.com/codesystem/observation-category|LABORATORY&patient=Patient/3d8afd18-0844-459a-b3c2-355d02e54c0a&date=ge2018-01-01&date=le2018-12-31"
...
Generate an access token by following the OAuth 2.0 walkthrough
The example below assumes you have been granted an access token of: eyJhbGxxxx
Confirm the ID of the Organization
The example below assumes you have an ID of: 235a397b-1ae8-4755-9c77-1a0e2fbc5314
Confirm the contents of the Patient resource
Make the call as detailed below, replacing the access token, organisation ID and Patient resource with your own values
...
curl -X POST --header "Accept: application/fhir+json" --header "Content-Type: application/fhir+json" --header "Authorization: Bearer eyJhbGxxxx" --header "X-Org-Public-Id: 235a397b-1ae8-4755-9c77-1a0e2fbc5314" "https://sandbox.patientsknowbest.com/phr-fhir/Patient/$process-message" --data "{ \"resourceType\": \"Patient\", \"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\" }] } }], \"system\": \"https://fhir.nhs.uk/Id/nhs-number\", \"value\": \"9999999999\" }], \"name\": [{ \"family\": \"Doe\", \"given\": [\"John\"], \"prefix\": [\"Mr\"] }], \"telecom\": [ { \"system\": \"phone\", \"value\": \"07123456789\" }, { \"system\": \"email\", \"value\": \"john.smith@example.com\" } ], \"gender\": \"male\", \"birthDate\": \"1990-01-02\", \"address\": [{ \"line\": [\"1 Main Street\", \"The Place\"], \"city\": \"London\", \"postalCode\": \"CB11BC\" }], \"extension\": [{\"url\": \"http://fhir.patientsknowbest.com/structuredefinition/team-alias\", \"valueString": \"team_alias_a\"}, {\"url\": \"http://fhir.patientsknowbest.com/structuredefinition/team-alias\", \"valueString\": \"team_alias_b\"}] }"
...
Generate an access token by following the OAuth 2.0 walkthrough
The example below assumes you have been granted an access token of: aaaaa-bbbbb
Make the call as detailed below, replacing the access token with your own value
Your purview will be returned in the operation response
...
Generate an access token by following the OAuth 2.0 walkthrough
The example below assumes you have been granted an access token of: eyJhbGxxxx
Confirm the ID of the Organization
The example below assumes you have an ID of: 235a397b-1ae8-4755-9c77-1a0e2fbc5314
Confirm the identifier of the document
The example below assumes an identifier of: 97a25402-622b-47e0-b650-bbbd08de4daf
...
Generate an access token by following the OAuth 2.0 walkthrough
The example below assumes you have been granted an access token of: eyJhbGxxxx
Confirm the ID of the Organization
The example below assumes you have an ID of: 235a397b-1ae8-4755-9c77-1a0e2fbc5314
Confirm the NHS number of the patient
The example below assumes an NHS number of: 9999999999
...
curl -X POST --header "Accept: application/fhir+json" --header "Content-Type: application/fhir+json" --header "Authorization: Bearer eyJhbGxxxx" --header "X-Org-Public-Id: 235a397b-1ae8-4755-9c77-1a0e2fbc5314" "https://sandbox.patientsknowbest.com/fhir/Patient/$status-query" --data "{ \"resourceType\": \"Parameters\", \"parameter\": [ { \"name\": \"patientIdentifier\", \"valueIdentifier\": { \"system\": \"https://fhir.nhs.uk/Id/nhs-number\", \"value\": \"9999999999\" } } ] }"
...
Generate an access token by following the OAuth 2.0 walkthrough
The example below assumes you have been granted an access token of: aaaaa-bbbbb
Confirm the ID of the Organization
The example below assumes you have an Organization ID of: 235a397b-1ae8-4755-9c77-1a0e2fbc5314
Confirm the ID of the Patient, you can do so by searching it using their NHS number
The example below assumes you have an Patient ID of: ca9db36c-1b77-4d12-9246-d78fa5d13e8c
Confirm the ID of the Questionnaire, you can do so by using the Questionnaire Search
The example below assumes a Questionnaire ID of: bd17e556-20e3-4f01-8078-30e5f675b0f2
Confirm the ID of the practitioner on behalf of which the communications will be sent to the patient through PKB
This currently needs to be provided by PKB, the example below assumes a practitioner ID of: bdaa24d0-3cd5-469c-aa69-db676fa31bbe
If you wish to add an optional Identifier to the Questionnaire Request that will be created during the operation, confirm through your own system the corresponding ID
The example below assumes the following identifier: {"system":"org-uuid","value":"id-value"}
...
Generate an access token by following the OAuth 2.0 walkthrough
The example below assumes you have been granted an access token of: aaaaa-bbbbb
Confirm the ID of the Organization (organisation)
The example below assumes you have an organisation ID of: 235a397b-1ae8-4755-9c77-1a0e2fbc5314
Confirm the ID of the Organization (team)
The example below assumes you have an team ID of: ca9db36c-1b77-4d12-9246-d78fa5d13e8c
Confirm the ID of the Questionnaire, you can do so by using the Questionnaire Search
The example below assumes a Questionnaire ID of: bd17e556-20e3-4f01-8078-30e5f675b0f2
Confirm the ID of the practitioner on behalf of which the communications will be sent to the patient through PKB
This currently needs to be provided by PKB, the example below assumes a practitioner ID of: bdaa24d0-3cd5-469c-aa69-db676fa31bbe
...