Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This example demonstrates how to generate an invitation token for 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: eyJhbGxxxx

  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

  1. Make the call as detailed below, replacing the access token, organisation ID and NHS number with your own values

    1. The invitation token will be returned

Example request

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

...

This example demonstrates how to query for laboratory results for a specific patient, within a given date range, returning at most 1 resource per day.

  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 Patient reference of the Patient you are interested in

    1. The example below assumes a reference of: Patient/3d8afd18-0844-459a-b3c2-355d02e54c0a

  3. Confirm the start of the date range you are interested in, and whether the date is inclusive (ge) or exclusive (gt)

    1. The example below assumes a start date of: ge2018-01-01

  4. Confirm the end of the date range you are interested in, and whether the date is inclusive (le) or exclusive (lt)

    1. The example below assumes an end date of: le2018-12-31

  5. Make the call as detailed below, replacing the access token and search parameters with your own values

  6. The matching Consent resources will be returned in the search results

Example request

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

...

This example demonstrates how to create a new patient record.

  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: eyJhbGxxxx

  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 contents of the Patient resource

  4. Make the call as detailed below, replacing the access token, organisation ID and Patient resource with your own values

Success

Example request

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

...

This example demonstrates how to execute the Purview operation.

  1. 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

  2. Make the call as detailed below, replacing the access token with your own value

  3. Your purview will be returned in the operation response

Example request

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

...

This example demonstrates how to check whether a single, specific document has been read.

  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: eyJhbGxxxx

  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 identifier of the document

    1. The example below assumes an identifier of: 97a25402-622b-47e0-b650-bbbd08de4daf

  1. Make the call as detailed below, replacing the access token, organisation ID and document ID with your own values

    1. The read indicator will be returned

Example request

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

...

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: eyJhbGxxxx

  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

  1. Make the call as detailed below, replacing the access token, organisation ID and NHS number with your own values

    1. The status information will be returned

Example request

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

...

This example demonstrates how to trigger a questionnaire request for a specific Patient.

  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 (PKB clinical team)

    1. The example below assumes you have an Organization ID of: 235a397b-1ae8-4755-9c77-1a0e2fbc5314

  3. Confirm the ID of the Patient, you can do so by searching it using their NHS number

    1. The example below assumes you have an Patient ID of: ca9db36c-1b77-4d12-9246-d78fa5d13e8c

  4. Confirm the ID of the Questionnaire, you can do so by using the Questionnaire Search

    1. The example below assumes a Questionnaire ID of: bd17e556-20e3-4f01-8078-30e5f675b0f2

  5. Confirm the ID of the practitioner on behalf of which the communications will be sent to the patient through PKB

    1. This currently needs to be provided by PKB, the example below assumes a practitioner ID of: bdaa24d0-3cd5-469c-aa69-db676fa31bbe

  6. 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

    1. The example below assumes the following identifier: {"system":"org-uuid","value":"id-value"}

  1. Make the call as detailed below, replacing the access token, Organization ID, Patient ID, Questionnaire ID, Practitioner ID and optional internal ID with your own values

    1. The questionnaire request will be created and communications will be sent to the Patient through PKB UI.

Example request

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

...

This example demonstrates how to trigger questionnaire requests for all Patients within a team. Please note we currently only support this operation for teams of 50 patients or less.

  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 (organisation)

    1. The example below assumes you have an organisation ID of: 235a397b-1ae8-4755-9c77-1a0e2fbc5314

  3. Confirm the ID of the Organization (team)

    1. The example below assumes you have an team ID of: ca9db36c-1b77-4d12-9246-d78fa5d13e8c

  4. Confirm the ID of the Questionnaire, you can do so by using the Questionnaire Search

    1. The example below assumes a Questionnaire ID of: bd17e556-20e3-4f01-8078-30e5f675b0f2

  5. Confirm the ID of the practitioner on behalf of which the communications will be sent to the patient through PKB

    1. This currently needs to be provided by PKB, the example below assumes a practitioner ID of: bdaa24d0-3cd5-469c-aa69-db676fa31bbe

  1. Make the call as detailed below, replacing the access token, both Organization IDs, Patient ID, Questionnaire ID and Practitioner ID with your own values

    1. The questionnaire requests will be created and communications will be sent to all the Patients in the Organization through PKB UI.

Example request

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

...