Google Summer of Code with OpenMRS — Final Report

Jude Niroshan
Aug 22, 2017 · 5 min read

OpenMRS is an open source community driven software which can be used in clinical environments(specially for resource constrained). It has many functionalities and it is widely used across millions of users. As there are many users, product has different variants for different use cases. Typically those are known as distributions. OpenMRS keeps a general purpose distribution called Reference Application. This distribution comes with a modern UIs and most essential modules which needs to have for any clinic to manage the work.

It was suggested that to include reports which are out of the box for Reference Application which gives a better picture about the system data. So, this idea has turned out to be a Google Summer of Code project in 2017.

Project:

Built-in reports for Reference Application

Overview:

Final Presentation (OpenMRS talk thread post):

Project Goals:

  • Define reports inside the OpenMRS server
  • Access those reports through Reporting REST API
  • Create a new Open Web App
  • Visualize Data through charts

Basic Reports

  • Number or Visits
  • Number of Patient Registrations
  • Number of Admissions/Transfers/Discharges per service area
  • Number of Visit Notes
  • List of Diagnosis’s made and quantity
  • List of Providers (grouped by active/retired)
  • List of Users (grouped by active/retired)
  • List of new Patient Registrations
  • Patient Visit Report

Implementation in brief

Before starting any work, knowledge about the reporting module is essential to this project. The best time for this was the Community Bonding period. Within this period, basic reports were created by simply using the reporting module. This is purely a functional task which involved no coding work. This led the developer to get a clear picture of the existing module functionalities and how it should be used in order to achieve the project goals.

This was communicated in the first meeting with the mentors.

Defining reports inside the server would give a clear idea on what needs to be achieved. Therefore, development work was started by defining the reports inside reference application module. Once the module has deployed into a OpenMRS server, those defined reports has to be created automatically. It was realized that those report definitions actually needs to resides within the Reference MetaData module rather than Reference Application module. So, those developments were moved to this module.

Server side commits — ReferenceMetaData module:


Client side — Open Web App:

Once this has completed, it was time to create a new Open Web App to access those reports and display them with rich graphical interface. This new web app makes calls through reporting REST API in the OpenMRS server.

Problems faced while development:

There was a build problem I was facing while implementing the unit tests.


I have spent some weeks struggling on getting the created_date into a cohort definition. Finally with the help from Mike Seaton I was able to find a solution.


When I was fetching the report data through Reporting REST API, I was facing some other problems to get the proper report data.


Passing Location as a parameter to some of my reports through Reporting REST had an issue. My mentor Rafal helped me to get through this problem.


Mid-term presentation

Basic Reports:

These are the report interfaces which are implemented inside the openmrs-owa-built-in-reports


I would like to take this moment for say a big thanks to my mentor Rafal Korytkowski who gave me this wonderful opportunity to become a GSoC student and work on this cool project.

Also special thanks goes out to Akshika Wijesundara who supported me in lot of ways to get into this position. Without him, I wouldn’t have the privilege of becoming a GSoC student.

)

Jude Niroshan

Written by

Undergraduate at SLIIT | Google Summer of Code student