GSoC 2019 with OpenMRS: Patient Flags Module OWA
Project: Patient Flags Module OWA
When diagnosing a patient, it is important to know about any current ailment or critical condition the patient might be facing — for example HIV positive, High BP, CD count > 200). The module Patient Flags Module provides a way to highlight or flag patients matching certain criteria (ex: High Risk, CD4 below 200, HIV Positive, Diabetic, etc).
The UI of this module was previously a standard JSP based one. The primary object of this project is to develop an Open Web Application or OWA as a front-end for the module.
The OWA has been developed in React (with Redux for state management), which consumes the Web API which was previously developed by Manimoona Kausar and team.
The Objectives for the Project are:
Primary Goals —
- Build an Open Web Application in React modeled on the current JSP based UI. ☑️
- The OWA should consume the provided Web API and successfully perform GET, POST and DELETE requests. ☑️
- OWA should have an intuitive UI that can display the data fetched from the API and post data to the API.☑️
- Make additional changes to the Web API to enable the above objective. ☑️
- UI should follow OpenMRS style guidelines. ☑️
☑️ — Objective Achieved
Tasks Undertaken to Achieve these goals —
- Initial Project Structure setup, generating scaffolding with Yeoman Generator and upgrading packages ✅
- Manage Patient Flags Component✅
- Edit Flags Modal✅
- Manage Patient Tags Component✅
- Edit Tags Modal✅
- Manage Patient Priorities Component✅
- Edit Priorities Modal✅
- Find Flagged Patients Component✅
- Manage Global Flag Properties — REMOVED
- Use React-Redux for state management✅
- Use openmrs-react components for common components✅
- Use state management to reduce number of API Calls Made✅
- UI Enhancements according to Reference Application style guide✅
- Modify API to meet fetched data requirements✅
- Add UI Element — Page Header with user and location data ⚠️ BUG
- Fix Soft Delete (When trying to delete record from table) ⚠️BUG
- Add UI Element — Breadcrumb 🔴 PENDING
Extra Credit Tasks —
- Add color swatch in Edit Tags Modal ✅
- Add glyphicon support in Tags/Priorities Modal 🏁 PENDING (New Feature)
✅ — Task Completed
🔴 — Task Incomplete
⚠️ — Bug
🏁 — Pending New Feature for future Updates
It gives me great pleasure to acknowledge the fact that in 12 weeks we’ve been able to deliver a working application from scratch. Ultimately we have 2 bugs and a missing UI element which we were unable to implement/fix due to a shortage of time — but we have also planned to fix them before the release of Patient Flags Module version 3.2.0 ( of which the OWA is a part)
Mid Term Demonstration
The following demonstration was presented by me during the Mid-Term evaluation period. It explains the app architecture, project structure, tasks undertaken, Sprint cycles and a demonstration of the application (till then).
The following diagram represents a brief overview of the plan of action undertaken:
The first step to creating the project was to create a basic scaffolding using the Yeoman Generator for OpenMRS. Next we had to update the core dependencies in order to conform to preferred versions required for our project (view package.json file)
Since I was relatively new to React, initially we planned to create the application using vanilla React and after Evaluation 2, incorporate —
openmrs-styleguide for css
The application primarily has 7 components, which we have split as:
1. Component — The tabbed page viewed by the end user.
2. Modal — A corresponding popup window that is used to input new data or modify existing data.
This resulted in creating a total of 4 Component Sets or 4 Pages.
Each Page has the following associated files —
The overall application architecture has been designed in the following manner:
Although the application has several dependencies, a few major ones are listed below for future reference —
The development of the application was broken down into Sprints. In total the sprint cycle included 5 sprints with two break periods in between.
Sprint OpenMRS Talk Threads
GSoC 2019 - Patient Flag OWA - Sprint #1
Hi @rakshir , Congratulations on the start of our very first Sprint for GSoC 2019, Patient Flag Module OWA. Hoping for…
GSoC 2019 - Patient Flag OWA - Sprint #3
Hi @maimoonak and @judeniroshan, Based on the Sprint planning meeting held on 06-07-2019, We are starting Sprint #3…
OpenMRS Talk Thread
We’ve used the OpenMRS Talk thread for the project in order to discuss general and non-sprint related issues and have documented milestones.
GSOC 2019: Patient Flag Module OWA
1st GSoC Weekly Call Held On: 17/05/2019 : 11 AM CDT Participants: @maimoonak, @judeniroshan , @rakshir Minutes of…
Weekly Blog Posts
The following are the weekly blog posts regarding the project. They act to serve as a guide as well — especially for sticky situations such as configuring webpack and the Yeoman generator.
Summer of Code with OpenMRS ❤️
This article essentially serves as a guide to the following questions — What is GSoC? How does it help you? How did you…
GSoC Week 1: Setting Up the OWA
The motivation behind these blogs is not only to serve as a log of all the work done during the week, but also be a…
GSoC Week 2: For the Love of Endpoints
In this week, we take a look at testing the REST endpoints of Patient Flags Module, discuss OpenMRS’ REST architecture…
GSoC Week 3: Our App is Taking Shape 😍
In this week of GSoC, we take a look at some of the API modifications we make in order to support our App. We also see…
GSoC Week 4: Priorities Component
This week of GSoC has focused on the ‘Patient Flags Priority component’, building it’s modals, doing REST calls and…
GSoC Week 5 & Week 6
This blog post explains the happenings of GSoC Weeks 5 & 6. We look at the modifications made to our API code, our…
GSoC Week 7: Flags
In this week of GSoC we take a look at building the Flags component and what it took to get there (Hint: it’s Redux)
GSoC Week 8: Our MVP 😍
In Week 8 of GSoC we developed our MVP or Minimal Viable Product. We also take a look at our OWA as it stands today and…
GSoC Week 9: Reaching Milestones and Looking Ahead
In week 9, we submit our GSoC midterm evaluations & feedback and look ahead to Sprint #5
GSoC Week 10
This week I suddenly had a lot going in my life and suddenly became uber busy. Hence I couldn’t contribute much to…
GSoC Week 11: Wrapping Things Up
In the third last week of GSoC we begin to wrap up our work for the OWA! 😃
OpenMRS Jira Tickets
The following tickets have been created, claimed and worked on in this project —
[OWA] Initial Project Setup
FLAG 45 — Initial project setup, setting up scaffolding, adding requisite dependencies and coding basic controllers for the OWA.
[OWA] 'Manage Tag' Component - REST Service
FLAG-51 [SUB TASK] 'Manage Tag' Component - REST Service & UI
[OWA] 'Manage Global Flags Properties' Component
FLAG- 55 — Build the Manage Global Flag Properties component including the following -
[OWA] 'Manage Flags' Component - REST Service & UI
FLAG 50 — See ticket for description
[OWA] 'Manage Tag' Component - REST Service & UI
FLAG 46 — See ticket for description
[OWA] 'Manage Priority' Component - REST Service & UI
FLAG 47 — See ticket for description
Add 'Display Point' Endpoint to Wiki Documentation
FLAG- 52 — See ticket for description
[OWA] 'Manage Global Flags Properties' Component
FLAG 55 — Build the Manage Global Flag Properties component including the following -
Only a single PR has been made till now — we’ve been commiting to the same PR and plan to squash all the commits before request approval. Currently we’ve been having some issues with the Travis CI build though.
As a part of the project, we’ve prepared a User Guide and a Developer Guide which can be found in the links below —
- Patient Flags Module OWA Project Page
- Patient Flags Module OWA Developer Guide
- Patient Flags Module OWA User Guide
The following future works have been envisioned for the project —
- Fixing of existing bugs/issues (marked in Overview section)
- Creating a better alert generation service.
- Adding support for Managing Global Flag Properties.
- Adding more filter options — filter by Priority color etc.
- Adding glyphicon support in Tags or Priorities.
Thoughts on GSoC
Being a final year student, this was the first and (maybe ?) the last time I’ve participated in GSoC. This was truly a once-in-a-lifetime experience and I’ve never ever faced something as exciting!
OpenMRS has not only shown me that ‘Writing code does indeed saves lives’ but has also given me platform to prove myself. For this, I shall always be indebted to a highly welcoming a nurturing community and especially my mentors, Maimoona Kausar, Jude Niroshan as well as the coordinators, Suthagar and Irene!
Thank you GSoC and OpenMRS! 😄