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.
- 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.
- Marshalling and Unmarshalling the XML.
- Slow but steady wins the race.
- 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.