GSoC Week:5 — June 26, 2016

GSoC Week:5

This week I have worked mostly on improving documentation, creating a video demonstrating the work done till now and Writing the test cases for the package


The documentation is uploaded on OpenMRS Talk. The video needs some editing and I would be posting it soon. I have made some progress on the the test cases and next week I will be focusing more on it.

In the last meeting, It was decided that we need to improve documentation and wiki.  So in the next week I’ll be working on improving the wiki and writing the test cases.

GSoC Week:4 — June 19, 2016

GSoC Week:4

Week 4 has finally finished and we enter into Mid Term Evaluation week. This week I devoted to write Documentations and test cases.

I wrote a test case for org.openmrs.module.dhisreport.api.adx package. The test cases for the package can be found here.

The following things are implemented :

1.Test connectivity of OpenMRS instance with DHIS2 instance.

2. Import Report Definitions from DHIS2 instance.

3. Map OpenMRS Location with DHIS2 ORG Units.

4. View Mapped OpenMRS locations.

The documentation for these features can be found here.

Next I’ll be preparing a video demonstrating my work.

GSoC week:3 — June 10, 2016

GSoC week:3

In this week, I mostly did research on DHIS2 Report Module API and writing test cases for API.

Few of my finding are as follows:

  1. There are 4 packages with extensive test cases written for them.
  2. 2 Packages help in Marshaling and Unmarshalling. Test cases should be written for them.
  3. Following packages need the test cases to be written for
  • org.openmrs.module.dhisreport.api.adx
  • org.openmrs.module.dhisreport.api.db.hibernate
  • org.openmrs.module.dhisreport.api.dhis
  • org.openmrs.module.dhisreport.api.impl
  • org.openmrs.module.dhisreport.api.importsummary
  • org.openmrs.module.dhisreport.api.syncmodel
  • org.openmrs.module.dhisreport.scheduler

In the next week I’ll be working on writing documentations and test cases.

GSoC Week:2 — June 6, 2016

GSoC Week:2

In this week, I worked on Two tickets which were important features for DHIS2 Report Module. I worked on DRM-23 – Metadata Exchange of Locations and Organization units

and DRM-24 – Show Mapped Locations. The former one is merged and later is in Code-Review Process.

I got to play a lot with DHIS2 Web API and OpenMRS API. My approach to this problem is as follows:

My Approach:

  1. Using DHIS2 WEB API get the ORG Units (XML file with Names and Code Attribute)
  2. Unmarshalling the XML file and make List Of ORG Units.
  3. Get OpenMRS Locations using OpenMRS API.
  4. Create UI to view both OpenMRS Location and DHIS2 ORG Units and create UI for mapping.
  5. Once the mapping is done, the Code attribute of DHIS2 is saved in Code Attribute of Locations,if the later does not exist then create one before setting the value.

In the second ticket, I just showed the mapped location and got the chance to learn a little about HTML and CSS.

I had no blockers this week and my communication with the mentor is regular. Next, I’ll be writing Unit Tests for the module and for that I have created a new Ticket DRM-25 – Writing Test Cases For DHIS Report Module.

I wish to complete writing extensive test cases in this week so that I could start Documenting in next week. I am happy that all my work will be reflected in next release of the module. We have planned to launch the next version at the end of my GSoC project.

I am excited about the release and my main goal from now on is to fix as many bugs as I can and write extensive test cases and fix the code if there are some failing edge cases.

GSoC Week:1 — June 2, 2016

GSoC Week:1

With the end of the 1st week, I have reached my first milestone. I worked on DRM-4 which is the crucial part of this GSoC project. I finished my work and finally the ticket is solved and closed.

Along with DRM-4 , I finished my work on DRM-18 and DRM-7(All merged, Yay! 😀 ).

The aim of this ticket was to import all the report definitions on one click of a button.

My Approach :

I used DHIS2 web API for getting report definition. During community bonding period I went through DHIS2 API and almost all functionalities that were implemented, this helped me in implementing this functionality.

First, I used Chrome’s ARC extension to get the REST call right. I played with headers a little and got the REST call working as desired. I implemented the REST call using java DefaultHttpClient library. Once I got the report definition XML, I Unmarshalled it and saved it in the database properly. The next thing was to send proper messages to the user about the success and failure of the import.

With through testing and minor corrections, I was able to implement this functionality.

Lessons Learned:

  1. Understood the MVC framework as I worked with everything. In this ticket Model: the XML file, View: The success/failure messages and reports , Controller : The controller class and it’s Get and Post methods to manage the import.
  2. Marshalling and Unmarshalling the XML.
  3. Slow but steady wins the race.
  4. One should not ignore the advice of elders, Bran could have saved Hodor’s life and post-life(now that he may be a White Walker ).

After this week’s work, the user can test the connection with DHIS2 and import report definitions.

Next, I’ll be working on DRM-23 and it is yet another important functionality for the module. It is about the mapping OpenMRS locations with DHIS2 ORG Units.

I talk almost every day with my mentor on telegram about the blockers and send a daily progress report to him. Though he has a tight schedule, he ensures that I understood the ticket and provide me with reading resources whenever I am stuck at something. We had Uber conference meeting, where I got the chance to display my work to James and Maurya.

So far I am having my best summer. I hope to keep this momentum going.

My Community Bonding Period Experience. — May 22, 2016

My Community Bonding Period Experience.

GSOC 2016 coding period  will be starting from tomorrow and I am super excited to begin. My experience with community was amazing. The amount of stuff we learn is directly proportional to  our interaction with community.

During this one month of community bonding I was involved with community though scrum meetings. I volunteered as a Scrum Leader and it was great learning experience. I got to know what everyone was working on.

I spent most of the time in going though the Spring Documentation and DHIS2 web-api developers manual. I took a course on Spring Framework and one course on Hibernate framework. I also worked on a Ticket(DRM-7) , which lets user to check connection between OpenMRS and DHIS2.

When I was half way into the community bonding period, I had a meeting with my mentors. Maurya and James refined my ideas about the project objectives. It was a very informative and inspiring session. They encouraged me to ask more questions and get the doubts cleared.

Objectives Of Project (From User’s Perspective) 

  1. Check the connection between OpenMRS and DHIS2.
  2. Click a single button like “Generate and Upload XML”, this will automatically import Report Definition XML from DHIS2 implementation.
  3. User can map his location according to DHIS2 instance.

Objectives Of Project (From My Perspective) 

  1. Implement the features mentioned in above in Objectives Of Project (From User’s Perspective) .
  2.  Work on Module Enhancement Tickets.
  3. Write extensive unit tests for the module.
  4. Documentation of the work.

I will be updating about my project though these blogs on weekly basis. I will continue to participate in scrum meetings and developers meeting.

Looking forward to a great learning experience.

GSoC @ OpenMRS — May 2, 2016

GSoC @ OpenMRS


Contributing to OpenMRS as a GSoC student is a dream come true. I started my journey with OpenMRS in October 2015, initially with a lot of hesitation I asked few questions on IRC. To my surprise, I was warmly welcomed to the community by Daniel Kayiwa and Robby O’Connor. This is where everything begun.

Contributing to OpenMRS is fun and I got to learn a lot of new things like GitHub, Spring, Hibernate and MySQL. It is always a great experience to work with an encouraging and responsive community.
I would like to thank Sandeep Raparthi for being my mentor throughout the process and being a constant source of motivation.

Big thanks to Daniel Kayiwa, Wyclif Luyima , Burke Mamlin ,Michael Downey , Mayank Sharma for their help and guiding me. Special thanks to Sri Maurya Kammamaru for his indispensable support and helping me learn more about the DHIS2 module. I would like to thank DHIS2 community for their help and resources.

Congratulations to all other GSoC students and wish you a great summer ahead.

I am excited to be a part of OpenMRS as a GSoC student. Looking forward to contributing to the project in best of my capacity. 🙂