OpenMRS Module Management OWA

Kailayapathy Suthagar
4 min readJun 2, 2017

Week 1 [May 31,2017 — June 06, 2017]

During the Community Bonding period, I have started to work some parts on the project. Because I believe, I can learn a lot of tech stuff before the coding period. I am new to OpenMRS and I want to get familiar with those OpenMRS Environment.

So I used OpenMRS talk and IRC to communicate with my Mentors Daniel Kayiwa,Wyclif Luyima and OpenMRS Community.

I need strong JS knowledge to develop Open Web Apps. Mostly I familiar with JavaScript and jQuery for more than two years. But I am not good with AngularJS. I analyzedsome developed OWA for OpenMRS, Most of them are developed with AngularJS instead of ReactJS. So I decided to move with AngularJS because I can raise some help from those OWA creators if I have in the future developments.

So I started to work with AngularJS and got practice with Angular Controllers, Directives and Services. It’s very easy to develop web projects and easy to learn also :-). At the same time, I wanted to practice with OpenMRS web services. So I worked with REST API documentations and REST Java Modules to get some idea about the data process. I can learn everything quickly and It was very easy for me because, I been with Web Development for a long term.

My mentors suggested me to work with Module Management at the begging of the Project. So I started working on Module Management Module. The Project goals are,

  1. Implement all functionalities in the Manage Module to Open Web App.
  2. List all the installed Modules and allow admin users to control the Modules using Start, Stop and Unload actions.
  3. View the Installed module’s details with required Module’s.
  4. Upload Modules(.omod File) to the OpenMRS Server and Start uploaded Module
  5. Search the modules from OpenMRS Modules Repo and Install to the OpenMRS Server
  6. Check installed modules updates
  7. Start All modules functionalities

I started working on project step by step. InitiallyI tried to list all the installed modules. I used OpenMRS REST API to retrieve all the Installed modules details. I used Module Resource (openmrs/ws/rest/v1/module/)to achieve this task.

Darius Jazayeri suggested me to make some changes with Module Status and action buttons in the module Management parts. So I made some required changes with my development. Finally I can list all the modules with required data. You can see the updated UI here,

Installed Modules details with current status

Installed Module information isn’t available in the existing module. So users can’t get all details about the module including aware of modules and required modules. So I developed another page to display the selected module details.

OpenHMIS Inventory Module Details

After this goal, I moved to upload modules part. I struggled for along time to resolve some errors with file submissions and REST calls. I worked with Google and Stack-overflow to get back the solutions. I will update the Module Upload architecture and REST Calls with another POST.

User can upload OpenMRS(.omod File) Modules using this section and can able to trace the problems with Module Uploading easily with this OWA.

Blank Module Upload Page

It may take some time to upload and start the Module. So user want to wait until the process finish :D

Module Uploading UI Part — Waiting for the Server Response

After the module upload, This section will show the Module details and messages (Success or Error Messages) though this UI part.

Module Uploaded and started successfully

Sometime, Uploaded module will not start because of the required modules problems. User can trace the required modules for the uploaded module startup using this UI part

UI illustrates about the Startup problem of the uploaded module

Some time, The file may be wrong with required elements. In this case also, user will get some error messages while uploading.

UI illustrates about the Module File Problem.

I have completed the uploading section and moved to module search Section.

It will be like live search Angular development and I want to use online Module repo. So I analyze dthe previous module and got the request URL — https://modules.openmrs.org/modulus/modules/findModules?.

Search and install Modules

Install part in this Search section is pending and I will complete it with in some days. So there are few goals to complete this section. That are,

  1. Action Management
  2. Check installed modules updates
  3. Start All modules functionalities

Through this development, I got a lot of knowledgeable of AngularJS, REST, Request Headers, Data Mapping, XML to JSON Parsing, Java.

I will continue the development to complete this section as soon as possible :-)

--

--

Kailayapathy Suthagar

Software Engineer @ Sysco Labs, Google Summer of Code Intern @ OpenMRS