Advanced Questionnaires


What are Advanced Questionnaires?

PKB’s questionnaires feature is being updated to make it easier for clinical teams to gather information from their patients, including patients who have a PKB record but are not yet registered. The new questionnaires feature is coming soon.

The new questionnaires will have both an improved UI for patients completing the questionnaires and improved functionality for clinical teams to customise the questionnaires; such as calculated fields, questionnaire scoring, branching, and coded data.

This page outlines the new features that are introduced by Advanced Questionnaires and the phases of development.



Questionnaire scoring allows clinical teams to send scored questionnaires, such as the PHQ9, to patients. These scored questionnaires will apply simple calculations to patients' responses and generate an overall score, which can be viewed in the questionnaire response or retrieved via our APIs.


A PHQ-9 questionnaire, displaying the calculated score as a field at the bottom of the questionnaire


Organisations can configure sections of questionnaires to be displayed conditionally to patients, based on their answers to previous questions. For example, showing a set of pregnancy-related questions to a patient only after they had responded ‘Yes’ to a question asking if they are pregnant.

A set of mood-related questions being displayed to a user after they responded to an earlier question

Coded data

Questions in Advanced Questionnaires can be mapped to clinical codes. For example, a question asking a patient for their blood pressure can be mapped to the clinical code for blood pressure.


questionnaire showing the coded data fields
extract from the FHIR R4 Questionnaire resource with coded data fields (LOINC codes) in the questionnaire


When PKB creates the questionnaire template, we can add a clinical code for a question and/or a list of coded answer options. Organisations can then extract the relevant coded fields into their local systems via the FHIR R4 Questionnaire resource (see image above). The questionnaire questions are linked to the relevant responses in the QuestionnaireResponse resource via the ‘linkId’.

In a later development phase, PKB will map the coded data from questionnaires to other FHIR resources, e.g. measurements -> Observations resource. This would mean the measurements will be visible in the questionnaire response and also in the Measurements section of PKB.

Questionnaire scores can also be mapped to clinical codes where appropriate. For example, the score generated from a PHQ-9 depression questionnaire could be mapped to the SNOMED code for that score.

Mandatory questions

Organisations will be able to set individual questionnaire questions as mandatory, meaning the patient will not be able to submit the questionnaire if they are not complete. This will reduce time spent by clinical teams communicating with the patient if an important field is left unanswered. The patient will see an error message if they click Submit on a form with unanswered mandatory questions.


The error message shown to a patient if they submit a questionnaire with an unanswered mandatory question


Patients will be able to save their questionnaire in draft form and exit the questionnaire, before returning later and carrying on where they left off.

When a patient clicks ‘Save and close’ on a questionnaire, they will be directed back to the PKB home screen (if logged in) or the PKB login screen. Draft questionnaires will have an associated questionnaire response with a status of ‘In progress’.

When a patient returns to the questionnaire, they can continue completing the questionnaire and their previous responses will be saved. When the patient clicks ‘Submit’, the associated questionnaire response will have a status of ‘Completed’.


Embedded images

Organisations will be able to embed images in questionnaires. Clinical teams can use images in questionnaires to guide the patient how to answer the questions and provide additional information and context to the questions.


An image showing a ‘Pain measurement scale’ in a Pain Assessment questionnaire


Patient-uploaded images

Patients will be able to upload images in response to questions in questionnaires. This can be used by clinical teams, for example, when collecting information about the patient, where they can upload a photograph of themselves, or for uploading images related to their health such as injuries or skin rashes.

 A question asking a patient to upload a photograph of themselves, which is displayed on the questionnaire once it has been uploaded.


Sending questionnaires to unregistered patients

Patients will be able to complete questionnaires without first registering for PKB, as long as they have a PKB record that contains an email address.

Unregistered patients will be sent an email explaining that they have been sent a questionnaire, which contains a link to the questionnaire. When they click on the link, they will be asked to provide their date of birth. This is to confirm they are the patient that the questionnaire has been sent to..

Once the date of birth check is complete, the patient is taken to the questionnaire.

When the patient clicks ‘Save and close’ or ‘Submit’, they are redirected to a confirmation page, with instructions about how to register. The completed questionnaire is saved in their PKB record even if they do not go on to register.


Development Plan

APIs (Phase 1)

The first phase of development for advanced questionnaires, which is due to be completed in October 2023, will make new FHIR API endpoints available. Clinical teams will be able to use these endpoints to send questionnaires to patients and retrieve their responses. The patient’s answers, as well as the questionnaires themselves, will be stored in our database and can be retrieved as Questionnaire and QuestionnaireResponse FHIR resources.

Whilst clinical teams will be able to send advanced questionnaires and retrieve responses once we have released the new API endpoints, the new questionnaires will not be immediately available in PKB’s UI. When questionnaires are triggered via the API, patients will receive an email notification containing a link to complete the questionnaire. Once the patient has completed the questionnaire, they will be directed to a landing page which confirms they have completed the questionnaire. For unregistered patients, this page will have an option for them to register via NHS login.

Unregistered patients will have the option of registering via NHS login after completing their questionnaire


Functionality relating to existing PKB questionnaires will not be affected by these changes.

Next steps

In the months after making the new Advanced Questionnaire API endpoints available, we will introduce important Advanced Questionnaire functionality into the UI. This includes:

  • Patients will be able to view new questionnaire requests in their record, as well as continue answering questionnaires that they have not finished and viewing completed questionnaires. Patients will be able to start or continue questionnaires directly from the Events & messages page.

  • Patients, professionals and coordinators will be able to trigger an Advanced Questionnaire via the UI

  • Professionals and coordinators will be able to export Advanced Questionnaire responses via the UI

We expect this functionality to be available in early 2024.


An advanced questionnaire in the Events & messages section



Future work

We will then move onto development of other features related to Advanced Questionnaires, including:

  • Making the QuestionnaireResponse available via our APIs as a PDF

  • Allowing organisations to retrieve a link to an Advanced Questionnaire, so that it can be sent to patients via SMS

  • Allowing carers to complete Advanced Questionnaires on behalf of patients

  • Allowing patients and professionals to send secure messages about an Advanced Questionnaire