FHIR questionnaires are a standardized way of representing clinical questionnaires. They are used in a variety of healthcare settings, including hospitals, clinics, and home health agencies. Beside containing the questions and structured answers (value types and value options), the also defined hide/show logic and validation statements. FHIR Questionnaires are used to collect a diversity of contents in relation to the patient. Examples include:
A bot or ussd app could be used to collect patient history information. This could help to ensure that all patients are asked the same questions, and that no important information is missed.
A bot could be used to provide education to patients. This could help patients to understand their condition and how to manage it.
A bot could be used to collect feedback from patients. This could help to improve the quality of care and patient satisfaction.
As of August 2023, PSI extensively uses conversational chatbots to collect information directly from clients. In some cases we also make use of USSD sessions, for which we run short questionnaires. For chatbots, the flow of those conversations is defined in system like RapidPro, and the answers are stored on a FHIR backend, as a QuestionnaireResponse resource. But in most cases we currently (Aug 2023) don’t have the associated Questionnaire, which means that the metadata is missing.
Proposed solution (Sept 2023)
In the context of being able to support future chatbot and USSD implementations which runs part of their flow as structured conversations , we will use a FHIR Questionnaire Flow Engine that can:
Use any FHIR Questionnaire to run a sequence of question/answers as part of a Bot or USSD app
Validate the user input in accordance to the constraints for the related Question Item
Return the next question as part of the API response body
have a final outputs on the form of a FHIR QuestionnaireResponse resource, based on the answer provided.
This service should be self-contained, usable by USSD and Bot implementations.
It should be possible to deploy as a node.js service or a OpenHIM mediator.
Inputs
Initialization: FHIR Questionnaire JSON (http or file), session id
Flow/input: session id, user’s input.
Outputs
Flow/output: Next Question/ validation error current question.
Final output: QuestionnaireResponse JSON