Versions Compared

Key

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

...

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

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

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

...

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

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

  3. 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\":{ \"identifier \":{ \"system\":\"https://fhir-open.nhs.uk/Id/nhs-number\\cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/ServiceRequest\", \"value\":\"5193233945294672281\" } } ] }"

Pretty-printed request body

Code Block
{
  "resourceType":"Parameters",

...

Pretty-printed request body

Code Block
{
  "resourceType":"Parameters",
  "parameter":[
  "parameter":[
     {
        "name":"target",
         "valueReference":{
            "identifier":{
               "system":"https://fhir.nhs.uk/Id/nhs-number",
               "value":"5193233945"
            }
         }
     },
     {
        "name":"targetrequestor",
         "valueReference":{

           "identifierreference":{"Practitioner/bdaa24d0-3cd5-469c-aa69-db676fa31bbe"
        }
      "system":"https://fhir.nhs.uk/Id/nhs-number"},
     {
         "valuename":"5193233945notificationFlag",
            }
    "valueCode":"EMAIL_NOTIFICATION_DISABLED"
    }      },
     {
         "name":"requestoradditionalIdentifier",
         "valueReferencevalueIdentifier":{
              "referencesystem":"Practitioner/bdaa24d0-3cd5-469c-aa69-db676fa31bbe"https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/ServiceRequest",
              "value":"294672281"
         }
      }
  ]
}

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.

...