Versions Compared

Key

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

...

  • parameter[0]

    • name = "target"

    • use = "in"

    • min = 1

    • max = “500“

    • type = "Reference(Patient|Organization)"

    • documentation = “the target references can be either represented as a URL reference or through the use of an identifier representing the national health number. If a target is represented twice, only one request will be created per API call.“

  • parameter[1]

    • name = "teamId"

    • use = "in"

    • min = 1

    • max = "1"

    • type = "Identifier"

    parameter[2]

    • name = “additionalIdentifier”

    • use = “in”

    • min = 0

    • max = “1”

    • type = “Identifier”

  • parameter[32]

    • name = "request"

    • use = "out"

    • min = 0

    • max = "*"

    • type = "Reference(ServiceRequest)"

...

  1. Generate an access token by following the OAuth 2.0 walkthrough

    1. This example assumes you have been granted an access token of: aaaaa-bbbbb

  2. Confirm the ID of the team. You can request this from the PKB support team (available via API in the future).

    1. This example assumes you have a team ID (x-team-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

    2. If you do not include a national ID, the questionnaire will be sent to every patient in the team represented by the team ID.

  4. Confirm the ID of the Questionnaire

    1. To find the Questionnaire ID of the questionnaire you would like to send, query the Questionnaire endpoint with your teamcode and, optionally, the questionnaire title. This will return a bundle of Questionnaire resources that you have access to. Take the ID of the Questionnaire resource that you are interested in.

    2. This example assumes a Questionnaire ID of: bd17e556-20e3-4f01-8078-30e5f675b0f2

  5. Make the call as detailed below, replacing the access token, x-team-id, NHS number, and Questionnaire ID with your own values

    1. The questionnaire request will be created and an email will be sent to the patient containing a link to the questionnaire.

    2. If the patient’s PKB record does not have an email address, given name, family name and date of birth, they will not be sent a questionnaire. If the request contains more than one NHS number, patients with an email address, given name, family name and date of birth will still receive a questionnaire. The response from the API call will contain the patients that did not receive a questionnaire.

...

curl -X POST --header "Accept: application/fhir+json" --header "Content-Type: application/fhir+json" --header "Authorization: Bearer aaaaa-bbbbb" --header “x-team-id: 235a397b-1ae8-4755-9c77-1a0e2fbc5314” "FHIRWALL_URL/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\":\"teamIdadditionalIdentifier\", \"valueStringvalueIdentifier\":{ \“235a397b-1ae8-4755-9c77-1a0e2fbc5314\”} }, { \"name\":\"additionalIdentifier\", \"valueIdentifier\":{ \"system\":\"\"system\":\"https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/ServiceRequest\", \"value\":\"12345\" } } ] }"

...

curl -X POST --header "Accept: application/fhir+json" --header "Content-Type: application/fhir+json" --header "Authorization: Bearer aaaaa-bbbbb" --header “x-team-id: 235a397b-1ae8-4755-9c77-1a0e2fbc5314” "FHIRWALL_URL/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\":\"teamId\", \"valueString\":{\“235a397b-1ae8-4755-9c77-1a0e2fbc5314\”} }, { \"name\":\"additionalIdentifier\", \"valueIdentifier\":{ \"system\":\"https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/ServiceRequest\", \"value\":\"12345\" } } ] }"

...

This section will contain the search parameters that can be used to retrieve Questionnaire resources and an example workflow.

Organisations will need to provide teamId when searching for Questionnaire resources.

Code Block
GET [baseURL]/Questionnaire?teamId=235a397b-1ae8-4755-9c77-1a0e2fbc5314

The following search parameters can be used to search for Questionnaire resources:

...

  1. Generate an access token by following the OAuth 2.0 walkthrough

    1. This example assumes you have been granted an access token of: aaaaa-bbbbb

  2. Confirm the ID of the team. You can request this from the PKB support team (available via API in the future).

    1. This example assumes you have a team ID (x-team-id) of: 235a397b-1ae8-4755-9c77-1a0e2fbc5314

  3. Make the call as detailed below, replacing the access token and teamId token and x-team-id with your own values.

  4. A bundle of Questionnaire resources will be returned

...

This section will contain the search parameters that can be used to retrieve QuestionnaireResponse resources and an example workflow. Organisations will need to provide teamId when searching for Questionnaire resources.

Code Block
GET [baseURL]/QuestionnaireResponse?teamId=235a397b-1ae8-4755-9c77-1a0e2fbc5314

The following search parameters can be used to search for QuestionnaireResponse resources:

...

  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 team. You can request this from the PKB support team (available via API in the future).

    1. This example assumes you have a team ID (x-team-id) of: 235a397b-1ae8-4755-9c77-1a0e2fbc5314

  3. Confirm the Patient’s NHS number

    1. The example below assumes a patient with a Patient resource ID of 3d8afd18-0844-459a-b3c2-355d02e54c0a

  4. Make the call as detailed below, replacing the access token, x-team-id and search parameters with your own values

  5. A bundle of QuestionnaireResponse resources will be returned

...

  1. Follow the above steps in ‘How to trigger a questionnaire request using national ID’, including the business identifier as the additionalIdentifier in the body of the API call. This example assumes a business identifier of 12345

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

  3. Confirm the ID of the team. You can request this from the PKB support team (available via API in the future).

    1. This example assumes you have a team ID (x-team-id) of: 235a397b-1ae8-4755-9c77-1a0e2fbc5314

  4. Confirm the Questionnaire reference

    1. The example below assumes a reference of: Questionnaire/f1a841f1-6f3a-43fc-830f-e1417b4ff13d

  5. Confirm the business identifier

    1. The business identifier in this example was set in step 1 as 12345

  6. Make the call as detailed below, replacing the access token, x-team-id, and search parameters with your own

  7. A bundle of QuestionnaireResponse resources will be returned

...