FemTech Reminder for InterSystems FHIR Contest
Introduction
Today in the modern society and fast life, women priorities include not just caring about family and kids, but also building business and career, leaving no time to care about her health and regularly checkups, often not suspecting about developing health issues.
According to research by leading healthcare organizations, early diagnostics and observation may significantly reduce risks of severe women health problems.
Our project helps to solve this problem and allows the user to receive reminders about regular visits to the clinic. We have developed notification system which connects to FHIR data storage, analyses patient’s data, and gives a prompt notification to visit a doctor.
Summary
This system is a set of components: the server part based on InterSystems IRIS for Health, a cloud-based FHIR server, and two client parts: - telegram bot-reminder and Web GUI.
The server part analyses patient’s data and send a notification to visit a doctor or to do laboratory examinations via the telegram bot. Administrators use web-based GUI interface to configure recommendations.
Map mind
When brainstorming the solution to apply for this contest, our team came up with the following possible use cases for a female health reminder application, and divided them into three levels: top level (blue) describes actors (WHO?), middle layer (yellow) describes use cases (WHAT?) and third level (pink) describes tasks (HOW?)
Application Layout
- you go to GUI
- create a new recommendation
- go into the telegram bot
- enter your data
- get a recomendations
BOT
* you can go on the bot link and use it
bot
GUI
* and also you can go on the GUI link and use it
gui
Video
youtube
Features
- configuration of age-based recommendations;
- sending age-based, diagnosis-based notifications and planned appointments;
- list of recommendations from WHO;
- self-registration of end users in the telegram bot;
- binding users to their medical records at FHIR server;
- view registered patients and notification log via GUI-interface.
Recommendation
Read related documentations: fhir
Description of system
The server part contains the following business components
Business Services:
- TelegramIn - receive messages from telegram bot
- Notify - self-schedule service to check for patient notifications
Business Processes:
- CheckPatient - check presence of user’s medical records on FHIR server;
- Alert - handle errors and alerts in IRIS production;
- NotifyPatient - determine recommendations for user notification;
- TelegramRouter - route incoming messages from telegram-bot and send commands to another process/operation.
Business Operations:
- OperationFHIROut - send FHIR requests;
- TelegramOut - send messages to a telegram bot.
How to run
ZPM deployment
You need to install web-server with https (for telegram bot webhook) or implement the necessary access to the local computer through a service such as
ngrok.com
-
Install InterSystems IRIS for Health Community install
-
Add FEMTECHREMINDER namespace
- Add SSL server config for Telegram Bot WebHook and SSL client config
-
Install a Foundation and HTTP Service for FEMTECHREMINDER
Management Portal -> Health -> Installer Wizard
Press “Activate” link for activate Foundation
Management Portal -> Health -> Service Registry
-
Install ZPM
-
Install FEMTECHREMINDER package by ZPM
zpm "install femtech-reminder"
-
Setup production
Open production
Check settings:
FTR.Production.Service.TelegramIn:
FTR.Production.Operation.FHIROut:
Operation.TelegramOut:
- HTTP Server (api.telegram.org)
- HTTP Port (443)
- URL (/bot)
- BotToken (979906407:…TZK)
- SSL Configuration (sslclient)
Docker deployment from github
- You should clone this repo
git clone https://github.com/banksiaglobal/femtech-reminder.git
- Open a terminal in this directory and run:
docker compose up
Check points 3, 4, 7 of ZPM Deployment.
To view Production go to:
Production
Setup FHIR Server
- Sign up in Cloud Portal on portal.live.isccloud.io (portal.live.isccloud.io)
- Once you confirm your email and log into portal, you will get redirected to Deployments page. Let’s click “Create Deployment” button to create deployment.
- Select and create FHIR Accelerator Service with default parameters and set the unique name for deployment. (Screen here taken from live cloud portal but actually we have created deployment on test, need to think about right version for it).
- Once deployment is created and running, click on it and go to “Data Management” menu, and select “Bundle Operations” tab. This is where we can populate server with sample patient databases. At now we upload and import ‘Synthea Population ~50’ bundle.
- Go to the Credentials page and create new API Key and new Server User credentials and save it for IRIS
- Now we have fully set up our FHIR server! Go to the Overview page and at the FHIR Details section will be shown Api Key and OAuth 2.0 Endpoints that we can use next in IRIS for working with requests
Setup telegram-bot
Create telegram-bot:
Open a Telegram messenger, log into your account or create a new one.
- Enter @BotFather in the search box and select a bot
-
Click «Start» to activate BotFather bot
-
Enter and send the /newbot command
- Give the name to the bot - customers will see this name when communicating with the bot. And the nickname bot - it will be possible to find a bot in Telegram. Nickname should be unique, do not repeat existing in the base and end with the word «bot»
You will need a token to connect the bot to InterSystems IRIS. Copy the token value and proceed to the last item. The token looks something like 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11, but we’ll use simply in this document instead.
- Add the necessary commands to your bot. Enter the /setcommands and select the bot you want to set the list of commands in the offered format.
You will need a token to connect the bot to InterSystems IRIS. Copy the token value and proceed to the last item. The token looks something like 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11, but we’ll use simply in this document instead.
Set up Production
Connection telegram-bot to InterSystems IRIS:
- Set a WebHook for your Bot is to issue a GET request to the Bot API (it’s enough to open an url in your browser).
Call the setWebHook method in the Bot API via the following url:
https://api.telegram.org/bot<your token>/setWebhook?url=<url_to_send_updates_to>
- Setup the Basic Settings of operation that will send messages to the telegram bot.
HTTP Server: api.telegram.org
HTTP Port: 443
URL: /bot
BotToken: <your token>
Telegram-bot interaction tools
Commands:
- /start - initiation of work with bot;
- /stop - log off user from system;
- /help - show all commands;
- /registration - initialization of the regression process;
- /next_notification - send the following recommendation note;
User from FHIR for test:
User User 2000-01-01
Charise827 Balistreri607 2001-11-07
Visual trace
Example visual trace of command /next_notification
FHIR Data Source
Frontend
This project was generated with Angular CLI version 14.1.2.
Development server
- you should clone this repo
git clone https://github.com/banksiaglobal/femtech-reminder.git
cd angular/src/app
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The application will automatically reload if you change any of the source files.
Thanks
We thank InterSystems for an opportunity to work on important present-day female issues
About authors
We are the team of Banksia Global company and we always are opened for something new and interesting
We hope that our bot-reminder open-source project will help our colleagues to innovate and solve complex healthcare issues to help women to feel good and stay healthy