This is a prototype app for demonstrating a vaccination recommendation tool using a rule engine (stugna-es) and resources from the CH VACD FHIR Implementation Guide.
Try out the latest version of this webapp: https://mhealth-prototyp.github.io/Vaccination/. Use one of the test users from chapter 1.1 to log in.
You might also be interested in the health-professional oriented prototype app, the patient and allergy oriented prototype app and the questionnaire prototype.
- 1 About this prototype webapp
- 2 Pages
- 3 Creating rules
- 4 Install and run the app
- 5 Submit issues
- 6 License
- 7 Changelog
This webapp is intended to serve as a prototype around an use case with FHIR Questionnaires. It is able to connect to the EPD Playground and load a patient's vaccination record. It is also able to fetch predefined rules from an endpoint to give vaccination recommendations.
Since the EPD Playground does not support user roles and authentification, the login is mocked in this prototype. You can use one of the following example users for playing around with the prototype:
Name | Login | Password | Personas |
---|---|---|---|
Noah Gabriel Pichard | noah@pichard.ch | np | As a newborn child, Noahs vaccination record is still empty. |
Verena Brönnimann | verena@broenni.ch | vb | Verena Brönnimann is an elderly woman with a lung condition (COPD Gold 2) |
Susanna Katz | sus@katz.ch | sk | Susanna Katz is a young health professional. |
Bruce Wen | bruce@wen.ch | bw | Bruce Wen is an adult man that works as a bat researcher and thus is exposed to a risk of getting rabies. |
The EPD Playground is a low-threshold "test and play" implementation of a Swiss electronic health record for demonstrating key use cases of mHealth. It is a source of inspiration for developers, managers and healthcare personal in Switzerland. For easier testing, no authentication is needed on the EPD Playground. Learn more on the project page of the EPD Playground.
The Mobile Access Gateway is a FHIR endpoint that allows us to communicate with the EPD Playground using mHealth Profiles.
On the Home page, the vaccination recommendations are displayed.
This page displays the vaccination doccument loaded from the EPD Playground. If the patient has multiple document, the most recent is shown, with the possibility to switch to another document.
Here we can edit the rules or import rules from an endpoint. It also has an interactive diagram displaying how the rule engine facts and the vaccination recommendations are created, with examples from the current patient
On this page we can easily generate a CH VACD Vaccination Record Document, that can then be saved to the EPD Playground or directly be used as the current working document.
The About page shows information about the project, links to the project partners and the number of the app version currently running.
A detailes documentation of how the rules can be created (with examples) is to be found on the website of stugna-es.
When creating rules, we can rely on the following facts:
Name / key | Type | Explanation |
---|---|---|
gender | "male", "female", "other" | The patients gender |
age | integer | The patients age, in completed years |
age_in_months | integer, NULL | The patients age, in completed months, when the age is below two years |
vXXX_last_dose | integer, NULL | Duration since last dose of the given vaccination, in days. |
vXXX_completed | "TRUE", "FALSE" | Wether the vaccination was completed or not |
dXXX_last_dose | integer, NULL | Duration since last vaccination dose for the given target disease, in days. |
dXXX_completed | "TRUE", "FALSE" | Wether the vaccination for the given target disease was completed or not |
dXXX_number_of_doses | integer, NULL | Number of vaccination doses given for the target disease |
rXXX | "TRUE", "FALSE" | Does the given risk apply to the patient? |
vXXX
stands for Vaccinations, where XXX has to be replaced with the coding,code. The same applies for dXXX
for target diseases and rXXX
for risks.
How the rules can be build, is documentet at stugna-es.
There are reserved words, these are: TRUE
, FALSE
, AND
, OR
, NOT
, und LIKE
(all case sensitive). You cannot use these words for variable names.
The rules are defined as followed, making condition
, factName
and factValue
the required fields for a minimal rule.
interface rule
{
// describe condition for adding new fact to system
condition: string;
// name of new fact, which will be added if condition is met. no spaces allowed.
factName: string;
// value of new fact, which will be added if condition is met
factValue: string | number | boolean;
// short fact description for logging
description?: string;
// rule priority, number, optional, default value is 1. low numbers are processed first
priority?: number;
// optional field with default values for missing facts. not working with precondition
missing? string;
// option string field with the same syntax as condition.
precondition?: string;
// name of new fact, which will be added if condition is not met. no spaces allowed. needs factValueElse if present.
factNameElse?: string;
// value of new fact, which will be added if condition is not met. needs factNameElse if present.
factValueElse?: string | number | boolean;
// Each value dictates when to halt the evaluation of subsequent rules as documented in the link above
final?: 1 | 2 | 3;
// after new rule adding, rules check procedure starts automatically (default: true)
isTrigger?: boolean;
}
Keep care:
- Missing facts are assumed as "TRUE" by default. If you don't want this behaviour, you have to set the parameter
missing: "FALSE"
to the rule. - You cannot use shortened expressions:
fact1 OR fact2
is not the same asfact1 = TRUE OR fact2 = TRUE
.
For helping facts, that should not end up in the end result, we have a convention: These fact names should start with x_
, and are then ignored when displaying the rules to the user.
You can have a look at some rules in the file with the default rules.
Before you can run the app, you need to install the dependencies using the node package manager. Make sure you're in the root folder of the project (that contains package.json
) and run the following command:
npm i
After installing the dependencies, the following command will build the app and start a development server.
npm start
When the server is up and running, you can point your favorite browser to the displayed address to see the app (usually localhost:9000, but this may differ when you're already running other servers).
If you want to deploy the app to a web server, you can run the following command and then just publish the content of the newly created dist
folder.
npm run build
Go to the issue site of the repository to submit an issue: on github.com.
This software is published under a MIT License.
Version | Date | Changes |
---|---|---|
1.0.1 | 2024-10-04 | Update dependencies, fix a bug with language selection and use new version of component library |
1.0.0 | 2023-12-21 | Initial version uploaded to this repository |