Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel2

Query for the date of last data point for patients by BSN

Example request

Example response

Query for the date of last data point for patients by PKB UUID

Example request

Example response

Generate an invitation token for a specific patient

Example request

Example response

Search for laboratory results, returning at most 1 per day

Example request

Create a new patient record

Success

Example request

Example response

Failure

Example request

Example response

Check the current user's purview

Example request

Check whether a specific document has been read

Example request

Example response

Check the status of a specific patient

Example request

Example response

Trigger a questionnaire request for a specific Patient as a System client

Example request

Example response

Trigger questionnaire requests for all Patients in a team as a System client

Example request

Example response

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.

Example request

...

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.

Example request

{ "resourceType": "Parameters", "parameter": [ { "name": "patientIdentifier", "valueIdentifier": { "system": "http://fhir.nl/fhir/NamingSystem/bsn", "value": "974189273" } }, { "name": "patientIdentifier", "valueIdentifier": { "system": "http://fhir.nl/fhir/NamingSystem/bsn", "value": "995604381" } } ] }

Example response

{ "resourceType" : "Parameters", "parameter" : [ { "name" : "lastDataPointsResult", "part" : [ { "name" : "patientIdentifier", "valueIdentifier": { "system": "http://fhir.nl/fhir/NamingSystem/bsn ", "value": "974189273" }, "lastRecordUpdate" :"2020-08-01T09:57:34.2112Z" } ] }, { "name" : "lastDataPointsResult", "part" : [ { "name" : "patientIdentifier", "valueIdentifier": { "system": "http://fhir.nl/fhir/NamingSystem/bsn ", "value": "995604381" } } ] }

Example response

{ "resourceType, "lastRecordUpdate" :"Parameters", "parameter" : [ { "name" : "lastDataPointsResult", "part2020-08-01T09:57:34.2112Z" } ] } ] }

Query for the date of last data point for patients by PKB UUID

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.

Example request

{ "resourceType": "Parameters", "parameter": [ { "name": "patientIdentifier", "valueIdentifier": { "system": "http://fhir.nl/fhir/NamingSystem/bsn urn:uuid:cd97da65-0aa4-43a6-b695-cfd0c6f3267d", "value": "974189273" }, "lastRecordUpdate" :"2020-08-01T09:57:34.2112Z" } ] 3d8afd18-0844-459a-b3c2-355d02e54c0a" } }, { "name": "lastDataPointsResultpatientIdentifier", "partvalueIdentifier": [ { "namesystem": "patientIdentifierurn:uuid:cd97da65-0aa4-43a6-b695-cfd0c6f3267d", "valueIdentifiervalue": { "system": "http://fhir.nl/fhir/NamingSystem/bsn ", "value": "995604381" }, "lastRecordUpdate" :"2020-08-01T09:57:34.2112Z" } ] } ] }

Query for the date of last data point for patients by PKB UUID

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.

Example request

{ "resourceType": "Parameters", "parameter": [ { "name": "patientIdentifier", "valueIdentifier": { "system": "urn:uuid:cd97da65-0aa4-43a6-b695-cfd0c6f3267d", "value": "3d8afd18-0844-459a-b3c2-355d02e54c0a" } }, "f8a1836e-c171-4b33-b8d7-f3f059b63eab" } } ] }

Example response

{ "resourceType" : "Parameters", "parameter" : [ { "name" : "lastDataPointsResult", "part" : [ { "name" : "patientIdentifier", "valueIdentifier": { "system": "urn:uuid:cd97da65-0aa4-43a6-b695-cfd0c6f3267d", "value": "3d8afd18-0844-459a-b3c2-355d02e54c0a" }, "lastRecordUpdate" :"2020-08-01T09:57:34.2112Z" } ] }, { "name" : "lastDataPointsResult", "part" : [ { "name" : "patientIdentifier", "valueIdentifier": { "system": "urn:uuid:cd97da65-0aa4-43a6-b695-cfd0c6f3267d", "value": "f8a1836e-c171-4b33-b8d7-f3f059b63eab" } } ] }

Example response

{ "resourceType, "lastRecordUpdate" :"Parameters", "parameter" : [ { "name" : "lastDataPointsResult", "part" : [ { "name" : "patientIdentifier", "valueIdentifier": { "system": "urn:uuid:cd97da65-0aa4-43a6-b695-cfd0c6f3267d", "value": "3d8afd18-0844-459a-b3c2-355d02e54c0a" }, "lastRecordUpdate" :"2020-08-01T09:57:2020-08-01T09:57:34.2112Z" } ] } , { "name" : "lastDataPointsResult", "part" : [ { "name" : "patientIdentifier", "valueIdentifier": { "system": "urn:uuid:cd97da65-0aa4-43a6-b695-cfd0c6f3267d", "value": "f8a1836e-c171-4b33-b8d7-f3f059b63eab" }, "lastRecordUpdate" :"2020-08-01T09:57:34.2112Z" } ] } ] }

Generate an invitation token for a specific patient

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.

curl -X POST --header "Accept: application/fhir+json" --header "Content-Type: application/fhir+json" --header "Authorization: ] }

Generate an invitation token for a specific patient

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

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

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\" } } ] }"

...

{ "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": "patientTokens", "part": [ { "name": "patientIdentifier", "valueIdentifier": { "system": "https://fhir.nhs.uk/Id/nhs-number", "value": "9999999999" } }, { "name": "code", "valueString": "aaaaaaaaaa" }, { "name": "token", "valueString": "bbbbbbbbbb" }, { "name": "expiry", "valueDatetime": "2021-01-01T09:29:23.356+00:00" } ] } ] }

Search for laboratory results, returning at most 1 per day

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.

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"

Create a new patient record

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.

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.

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\"}] }"

Pretty-printed request body

Code Block
{

  "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"

    }

  ]

}

Example response

Status: 200 OK

Body: Empty

Failure

Example request

Code Block
{

  "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": "02"

      }]

    }

    }],

    "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"

  }]

}

Example response

Code Block
{

    "resourceType": "OperationOutcome",

    "id": "5b392b1e-350b-4793-88b6-53b3d4df5cab",

    "issue": [

        {

            "severity": "error",

            "code": "invalid",

            "diagnostics": "NHS number identifier is not verified"

        }

    ]

}

...

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

...

31"

Check the current user's purview

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.

curl -X GET --header "Accept: application/fhir+json" --header "Authorization: Bearer aaaaa-bbbbb" "https://sandbox.patientsknowbest.com/fhir/Consent/$purview"

Check whether a specific document has been read

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

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

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/DocumentReference/$read-receipt-query" --data "{ \"resourceType\": \"Parameters\", \"parameter\": [ { \"name\": \"documentIdentifier\", \"valueString\": \"97a25402-622b-47e0-b650-bbbd08de4daf\" } ] }"

...

{ "resourceType": "Parameters", "parameter": [ { "name": "documentIdentifier", "valueString": "97a25402-622b-47e0-b650-bbbd08de4daf" } ] }

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" : "read_receipt", "part" : [ { "name" : "documentIdentifier", "valueString" : "97a25402-622b-47e0-b650-bbbd08de4daf" }, { "name" : "read", "valueBoolean" : true } ] } ] }

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

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

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\" } } ] }"

...

{ "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.

...

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" : "patientStatusdeceased", "partvalueBoolean" : [ false }, { "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" } ] } ] }

Trigger a questionnaire request for a specific Patient as a System client

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

    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.

curl -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/Questionnaire/bd17e556-20e3-4f01-8078-30e5f675b0f2/$send-questionnaire-request" --data "{\"resourceType\":\"Parameters\",\"parameter\":["dateOfBirth", "valueDate" : "1920-01-01" } ] } ] }

Trigger a questionnaire request for specific Patient as a System client using national id

This example demonstrates how to trigger a questionnaire request for a specific Patient using its national ID. It also uses optional parameters to disable email notification on questionnaire response and adds an external business identifier for the request.

  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 Organization ID of: 235a397b-1ae8-4755-9c77-1a0e2fbc5314

  3. Confirm the national ID of the patient

    1. The example below assumes you have one Patient with the following NHS number: 5193233945

  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. Confirm if the practitioner wants to be notified about the patient filling up a response by email

    1. The example below assumes the practitioner does not want to be notified, so the Notification flag is set to EMAIL_NOTIFICATION_DISABLED

  7. Confirm the additional external business identifier you want to add to the request. This identifier must be FHIR compliant.

    1. The example below assumes the identifier is the following:

      1. system: https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/ServiceRequest

      2. value: 294672281

  8. Make the call as detailed below, replacing the access token, Organization ID, Patient national ID, Questionnaire ID, Practitioner ID, Notification flag and additional identifier 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.

curl -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/Questionnaire/bd17e556-20e3-4f01-8078-30e5f675b0f2/$send-questionnaire-request" --data "{ \"resourceType\":\"Parameters\", \"parameter\":[ { \"name\":\"target\", \"valueReference\":{ \"identifier\":{ \"system\":\"https://fhir.nhs.uk/Id/nhs-number\", \"value\":\"5193233945\" } } }, { \"name\":\"requestor\", \"valueReference\":{ \"reference\":\"Practitioner/bdaa24d0-3cd5-469c-aa69-db676fa31bbe\" } }, { \"name\":\"notificationFlag\", \"valueCode\":\"EMAIL_NOTIFICATION_DISABLED\" }, { \"name\":\"targetadditionalIdentifier\", \"valueReferencevalueIdentifier\":{ \"referencesystem\":\"Patient/ca9db36c-1b77-4d12-9246-d78fa5d13e8c\"}},{\"namehttps://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/ServiceRequest\", \"value\":\"requestor294672281\" ,\"valueReference\":{\"reference\":\"Practitioner/bdaa24d0-3cd5-469c-aa69-db676fa31bbe\"}},{\"name\":\"additionalIdentifier\",\"valueIdentifier\":{\"system\":\"org-uuid\",\"value\":\"id-value\"}}]}

Pretty-printed request body

...

} } ] }"

Pretty-printed request body

Code Block
{
  "resourceType":"Parameters",
  "parameter":[
     {
        "name":"target",
         "valueReference":{
            "identifier":{
               "system":"https://fhir.nhs.uk/Id/nhs-number",
               "value":"5193233945"
            }
         }
     },
     {
         "name":"targetrequestor",
         "valueReference":{
            "reference":"PatientPractitioner/ca9db36cbdaa24d0-1b773cd5-4d12469c-9246aa69-d78fa5d13e8cdb676fa31bbe"
         }
      },
      {
         "name":"requestornotificationFlag",
         "valueReferencevalueCode":{

           "reference":"Practitioner/bdaa24d0-3cd5-469c-aa69-db676fa31bbe"

        }"EMAIL_NOTIFICATION_DISABLED"
        },


     {
         "name":"additionalIdentifier",
         "valueIdentifier":{
              "system":"org-uuid",https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/ServiceRequest",
              "value":"id-value294672281"
         }
      }
   ]

}

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.

Code Block
{
    "resourceType":"Parameters",

   "parameter":[

      {
          "name":"request",
          "valueReference":{
             "reference":"ProcedureRequest/2f292349-6893-4813-868b-ec00e8318c8c"

         }

      }
    ]

}

Trigger questionnaire requests for all Patients in a team as a System client using team id

This example demonstrates how to trigger questionnaire requests for all Patients within a team.

  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

  6. Make the call as detailed below, replacing the access token, both Organization IDs,

...

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

curl -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/Questionnaire/bd17e556-20e3-4f01-8078-30e5f675b0f2/$send-questionnaire-request" --data "{\"resourceType\":\"Parameters\",\"parameter\":[{\"name\":\"target\",\"valueReference\":{\"reference\":\"Organization/ca9db36c-1b77-4d12-9246-d78fa5d13e8c\"}},{\"name\":\"requestor\",\"valueReference\":{\"reference\":\"Practitioner/bdaa24d0-3cd5-469c-aa69-db676fa31bbe\"}}]}

Pretty-printed request body

Code Block
{

  "resourceType":"Parameters",

  "parameter":[
      {
         "name":"target",
         "valueReference":{
            "reference":"Organization/ca9db36c-1b77-4d12-9246-d78fa5d13e8c"
         }
      },
      {
         "name":"requestor",
         "valueReference":{
            "reference":"Practitioner/bdaa24d0-3cd5-469c-aa69-db676fa31bbe"

        }

     }

  ]

}

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.

Code Block
{
   "resourceType":"Parameters",
   "parameter":[
      {

        "name":"request",

        "valueReference":{
            "reference":"ProcedureRequest/6a326b8c-d03b-42f5-9e8f-e708ac12a26c"
         }
      },

     {

        "name":"request",
         "valueReference":{
            "reference":"ProcedureRequest/be54a62e-b263-4151-b244-e7e912682c49"
         }

     }

  ]

}

PKB customer sites: deploy | developer | information governance | procurement | manual

© Patients Know Best, Ltd. Registered in England and Wales Number: 6517382. VAT Number: GB 944 9739 67.

...