Bahmni — Notification on Patient Events

Isuranga Perera
Aug 13, 2018 · 5 min read


  1. A doctor wants to know if one of their patients is revisiting the facility (to provide followup care, because the patient is participating in a research study, etc)


The main objective of this project is to provide ability for healthcare providers to be able to subscribe (unsubscribe) to and get notifications of specific events for patients of their special interest.

  1. (1) doctor sees the patient and orders a lab test, (2) patient goes back to the waiting room, (3) doctor continues seeing more patients out of the queue (i.e. still at hospital in the same consult room, sitting by the computer), (4) lab result is ready, and doctor gets notified, (5) doctor sees the original patient next, before returning to the queue.
  2. (1) doctor sees patient in outpatient clinic in the morning, and orders some lab tests, (2) in the afternoon doctor is rounding in the inpatient wards (i.e. still at the hospital, but somewhere else, not in front of a computer), (3) lab result is ready, and doctor gets notified, (4) doctor advises nurse on what action to take
  3. (1) doctor sees patient, and orders a lab test that takes days to complete, (2) patient goes home, (3) result is ready, doctor is notified, (4) doctor works with registration clerk to track down patient.

Project Design

This project is composed from 2 major components.

Subscriptions Management Module

Subscription management module expose UIs which allows users to create/modify subscriptions for notifications by associating various events (patient visit, lab result arrival etc.)

  1. API — Dao entities and service layer of the application. Expose a set of APIs
  2. OMOD — Expose endpoints to service layer operations. OWA deals with this component
Subscription creation

Feed Reader Microservice

Atom Feed Processor microservice is responsible for polling the atom feed for new notifications(events) and process them in order to identify if there are events that users are subscribed for. To be precise there are 2 layers of filters at the Atom Feed Processor.

  1. Layer 02 — Search for patients involved with the received notification. Notifications are accepted only if the notification relates to a patient to whom users have subscribed for.
  2. This is an optional layer of filtering which associated with lab results. This filtering is called after layer 01 & layer 02 filtering only. This checks if the lab results are normal or not. Notification is accepted only if the lab result is abnormal; otherwise rejected.
Activity flow diagram
  1. JavaSpark Framework
  2. Hibernate
  3. MySQL

Interim Presentation

Interim presentation

Final Project Demonstration

Future Work

This module was developed as a proof of concept. Therefore notifications icon and logic behind it only appears in notifications owa. However this can be easily moved to Bahmni header whenever needed.

Final Words

The community has been quite supportive throughout this time, and I’d like to say thank you all! Plus, we should definitely add more documentation for the resources available — like the UI Commons library.


  1. Subscription management module project repository
  2. Microservice project repository
  3. JIRA board
  4. Project Description