Examples

Check the status of a specific patient

This example demonstrates how to check the status of a single, specific patient based on their NHS number.
  1. Generate an access token by following the OAuth 2.0 walkthrough
    1. The example below assumes you have been granted an access token of: aaaaa-bbbbb
  2. Confirm the ID of the Organization
    1. The example below assumes you have an ID of: 235a397b-1ae8-4755-9c77-1a0e2fbc5314
  3. Confirm the NHS number of the patient
    1. The example below assumes an NHS number of: 9999999999
  4. Make the call as detailed below, replacing the access token, organisation ID and NHS number with your own values
  5. The status information will be returned

Example request

This example is written for sandbox.patientsknowbest.com; replace the URL as needed if you are connecting to a different environment.

ExampleDetails
Absolute URLhttps://sandbox.patientsknowbest.com/fhir/Patient/$status-query
curlcurl -X POST --header "Accept: application/fhir+json" --header "Content-Type: application/fhir+json" --header "Authorization: Bearer aaaaa-bbbbb" --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\" } } ] }"

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.
{ "resourceType": "Parameters", "parameter": [ { "name": "patientIdentifier", "valueIdentifier": { "system": "https://fhir.nhs.uk/Id/nhs-number", "value": "9999999999" } } ] }

Example response

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.
{ "resourceType" : "Parameters", "parameter" : [ { "name" : "patientStatus", "part" : [ { "name" : "patientIdentifier", "valueIdentifier": { "system": "https://fhir.nhs.uk/Id/nhs-number", "value": "9999999999" } }, { "name" : "registered", "valueBoolean" : true }, { "name" : "deceased", "valueBoolean" : false }, { "name" : "dateOfBirth", "valueDate" : "1920-01-01" } ] } ] }

Comments