SHMA is a web application to tackle the medication nonadherence problem in patients in the US.
The goal was to developed system architecture and a working prototype for displaying the patient drug intake compliance information.
How might we encourage and help patients to take their medications?
Developed subscription service to monitor patient’s medication-taking activities using REST and Core asp.net APIs and CosmosDB for the backend. We used Rasberry pi to capture the video of medication taking activity. We were a team of 4 people. I worked on the web API, API to database connectivity and configuring Azure COSMOS database.
Crucial features of the application were -
- Records compliance data using a video sensor
- Sends concerned data to the relative stakeholders
- Provides reminders.
- Gives voice-based instruction about medicines.
Client: University of Washington
My Role: Application Developer and System Architect
Tools: Azure IoT Suite, Asp.net API, Cosmos DB
Timeline: Feb 2018 -Mar 2018
Check the code on Github
50% US population is medication nonadherence causes 125,000 deaths per year (Reference)
Common reasons for patients non-adherence is -
- forget to take medicine,
- lack of knowledge,
- fear of side effects,
- misunderstand verbal instructions.
- Patients - Person who will be monitored for drug compliance.
- Doctor - Person who will add/update the prescription in the system.
- Caregiver - Person who monitors if a patient is complying with drug compliance and will answer their concerns, can be a family member or nurse.
- Patients dependent on financially - Person/entity who will buy the system for the patient, can be a family member, insurance provider or government support.
- Drug store - Will be responsible for a refill of the drug dispenser based on the doctor’s prescription.
- System Admin - Provides customer support for ‘how to do queries’. Manages technical tasks such as security updates, new features release, etc.
We wrote the user stories for all the involved stakeholders of the system to understand the functional requirements.
Usability and Accessibility of the application
- UX and UI should be intuitive, easy to use and designed based on human-centric design
- The user interface for healthcare providers should be similar to currently used medical systems
- Tutorials and “how to do” videos should be created to make it easier for customers to use the system
- A website should be available in top 10 different languages
- People with disabilities should be able to use the website
High-Level System Overview
This is a general block diagram for the complete system with the presentation, service, and database layer. We hosted the system on the cloud.
Data flow diagram
Patient Information Management Module
The most important service is Patient Information Management. We implemented a part of this service in our prototype. It uses the REST API to communicate with the user interface and compliance records. This module is responsible for storing patient-related data. The screen records the patient's video and sends it to the local processor. The processor associated with the Azure IoT suite then sends the result to the patient info component. It analyzes all the compliance data, saves it in the database, and expose the API to all the clients.
We also designed the Drug Refilling Management service. This service identifies when the inventory of drug dispenser is low. The device then sends a notification through Azure IoT suite to request pharmacy to refill drugs.
We require the patient to be compliant with the system, we will have a camera to monitor whether the patient takes the drug or base on the drug-taking schedule. However, sending the recording video through the internet to the server occupies too many resources.
1. Therefore, our first architecture decision was to design a fat client using a local video processing center which finishes the video data analysis locally and only sends the true or false result to the center server on the cloud.
2. The 2nd decision was the client-server model, the user will use either web app or mobile app to request services which are on the cloud.
3. We used Service Oriented Architecture to keep the functionality more independent and easy communication between components of the system so we used RESTFUL API. The client can request different services through HTML.
4. We also use event-driven architecture. When a patient didn’t take drugs according to the schedule several times, the patient management service will send a notification to the Compliance notification system, and this system will send alert to the doctor and caregiver.
The diagram shows the complete system implementation using Azure IoT suite
- We were a team of four people and we efficiently divided the work matching interest and capabilities of each team member. Which helped us to pull the project smoothly within given timeframe.
- Learned new technologies such as handling API, managing cloud system.
- Designing a system from architecture(which is an abstract model) to the actual implementation was a great learning experience.