...
{ "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.
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 (PKB clinical team)
The example below assumes you have an Organization ID of: 235a397b-1ae8-4755-9c77-1a0e2fbc5314
Confirm the national ID of the Patient, you can do so by searching it using their NHS numberpatient
The example below assumes you have an Patient ID of: ca9db36c-1b77-4d12-9246-d78fa5d13e8cone Patient with the following NHS number: 5193233945
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 IDConfirm if the practitioner wants to be notified about the patient filling up a response by email
The example below assumes the practitioner does not want to be notified, so the Notification flag is set to EMAIL_NOTIFICATION_DISABLED
Confirm the additional external business identifier you want to add to the request. This identifier must be FHIR compliant.
The example below assumes the identifier is the following identifier: {"
system
: https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/ServiceRequest
value: 294672281
Make the call as detailed below, replacing the access token, Organization ID, Patient national ID, Questionnaire ID, Practitioner ID and optional internal ID , Notification flag and additional identifier with your own values
The questionnaire request will be created and communications will be sent to the Patient through PKB UI.
...
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-request" --data "{ \"resourceType\":\"Parameters\", \"parameter\":[ { \"name\":\"target\", \"valueReference\":{ \"identifier\":{ \"system\":\"Parametershttps://fhir.nhs.uk/Id/nhs-number\", \"parametervalue\":[\"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-uuidhttps://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/ServiceRequest\", \"value\":\"id-value294672281\" } } ] }"
Pretty-printed request body
...
Code Block |
---|
{ "resourceType":"Parameters", "parameter":[ { "resourceTypename":"Parameterstarget", "parametervalueReference":[{ "identifier":{ "namesystem":"target",https://fhir.nhs.uk/Id/nhs-number", "valueReferencevalue":{"5193233945" "reference":"Patient/ca9db36c-1b77-4d12-9246-d78fa5d13e8c"} } }, { "name":"requestor", "valueReference":{ "reference":"Practitioner/bdaa24d0-3cd5-469c-aa69-db676fa31bbe"469c-aa69-db676fa31bbe" } }, { "name":"notificationFlag", } "valueCode":"EMAIL_NOTIFICATION_DISABLED" }, { "name":"additionalIdentifier", "valueIdentifier":{ "system":"org-uuidhttps://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.
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
Make the call as detailed below, replacing the access token, both Organization IDs, Patient ID, Questionnaire ID and Practitioner ID with your own values
The questionnaire requests will be created and communications will be sent to all the Patients in the Organization through PKB UI.
...
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
...