GSoC Coding Week 2 updates

Project progress report

For this week due to school mid-semester exams, i did not do much but now am finished with exams (until july when i will be writing final semester exams).

For this week i was suppose to be working on how to make the system support templates at the backend. I think i almost completed this despite exam distractions but code still needs to be tested and mentors still need to give their review.

Below is a list of things i accomplished

  • Installed the openmrs eclipse unit test plugin to help me generate test cases
  • Researched on possible java libraries to parse html 5 compatible files. Found jsoup. You can know more about jsoup form their website https://jsoup.org/
  • Looked at xforms module to understand how it stores forms and data entered inside the forms. I learnt that, every form is stored in the filesystem as an xml file and the database only stores metadata of forms. Also, when data is entered using these xforms, another xml file is created that has data entered. In collaboration with @teleivo, we decided that we will use a similar approach but instead of xml files we will follow the MRRT specification of using html 5(awaiting @judy thoughts on this ). You can view this discussion here on talk
  • Went through the mrrt doc multiple times to understand what objects and methods i will be creating to handle templates
  • Created MRRTReportTemplates.java for template objects and went ahead and created all services and DAOs following the openmrs convention and that used in the radiology module. Created MRRTReportTemplateParser.java, MRRTReportTemplateValidator.java, MRRTReportTemplateManager.java etc. The rest of the files can be found on this commit
  • Implemented my mrrt template parser. Using the jsoup library, i extracted metadata from the mrrt html file and stored them inside mrrt template object i created. Wrote unit test for parser to make sure it works. Still to add some more unit test to cover other scenarios like; invalid templates formats, missing templates, etc.
  • Created an mrrt template manager that basically calls the parser to parse the template file and initialize a template object and if no errors are encountered, the parsed file is copied to the openmrs application data directory and then store the template object containing metadata inside the database.
  • Created some skeleton classes to help me model project. All skeleton classes will have a well tested implementation before the end of today.
  • Used openmrs unit plugin to create test cases(some have no implementation yet but will before the end of today) for all classes i created even the skeleton classes. This will remind me to provide valid implementation for all skeleton classes i created since project will not build if these test don’t pass.

Next plans:

Before the end of today June 5, 2016 all skeleton classes will have implementation and test cases updated to test these implementation.

Next week from Monday June 6 to Friday June 10 2016, i will be working on the jsp and controllers to implement the templates tab on the legacyui interface. And from there i can test from the ui, my changes so far.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s