GSoC Updates Week 5

This week was a real successful one.

Right now it is possible import templates into the system and have them displayed on the user interface.


Also the REST API for MRRT templates is working fine, here is a response to the url, http://localhost:8080/openmrs/ws/rest/v1/mrrtreporttemplate/15d6ab6b-56a7-4c2e-8c56-47e77d4c1012?v=full


Currently i am working on resolving all mentors comments on pull request, PR-304 so that i can be merged.


Why Should Students Contribute To Opensource Projects?

At SMCONFB16 which was on the 18th of June 2016, I saw a lot of skepticism from people especially students about getting involved with open source projects. Their concerns were centered around the point, “How do you make money from it, if you give it for free?”.

There are obviously a lot of benefits to anyone contributing to open source projects but this blog post is targeted towards students and especially the ones in a computer science related field of study.

First I would like to say that most of us don’t do it for the money but for the love of it. And contributing to open source is a way of giving back to the community. I know you’d say love alone cannot put food on our tables at least thats what the girls say. But I would like to let you know that as a student there are actually a lot of benefits of contributing to open source projects including financial.

I think the most valuable asset of been part of an open source project is the experience and skills you’ll acquire. Not everything can be taught in class. Open source gives you the opportunity to practice and master software engineering skills taught in class and even learn new things. These include communication skills, project management skills, leadership skills and how to work in teams. You’ll also learn how to use popular software engineering tools like git. Experience gained from open source will help you in your future jobs since most of the tools used in open source projects will be the same you’ll use in your jobs. In open source you get to learn from very talented people who are also volunteering their time to create software and mentor others. You also get to learn about things like convention and culture of a community. You might be the best developer but if you don’t follow a community’s culture, you will not go far in that community.

We usually need internships to master what was taught in class and also learn new things. But getting an internship to work on what you love doing is not very easy. Considering the fact that our environment is made of mostly startups and very little or no giant tech companies, our options for internships are limited because most of this startups will not do what you want. That is, the work that the startup is investing in may not be of interest to you. For example one of my friends loves to do his internship in Artificial Intelligence but how many startups can he find doing that? As a startup, I want to start making money fast so that i can pay my bills, pay my developers and also get something from it. Hence I will always go for the thing that will make it to the market very fast and start selling. As a result most startups do only web development and mobile development using Ionic(if they do any mobile programming at all), since these are easier and can make it to the market very fast. But how many of us actually like building websites or building hybrid apps?  With open source, you have the liberty to choose what you want to work on. There are open source projects for almost any computer science related field for example, Web development, frontend javascript, database, backend, design, compilers, operating systems, systems programming, network security, etc. Hence finding what you love to work on is just a matter of few Google searches.

Your open source contributions will increase your chances of getting your dream job. When you contribute to an open source project, you don’t need to tell employers what you’ve done. You just tell them to Google search your name(that was a joke you obviously have to tell them even if they already know ). Your reputation as an open  source developer will always precede you. Most of our dream jobs will require an experience level of at least 3 years. But after you just graduate, that is something you’ll lack. So you can make up for that by working on big open source projects while you are still a student.

Open source will connect you to the right people. While working on open source projects you get to make a lot of friends. I don’t mean friends that you play football with or go get drunk with(yes you’ll get that too and thats awesome too) but i mean influential friends that can help you attain the level you want in life. Friends that will give  you the advice you never knew existed. Friends that will open your eyes to the opportunities you are ignorant of. Friends that will connect  you to other friends and soon you’ll become a testimony. I mean it, you will be talking with people that others can only read about on the Internet or watch on TV.

That been said, open source is not only about learning and meeting people or increasing your chances of getting jobs. As a student, you can actually make a lot of money as and open source developer. A lot of you are familiar with Google Summer of Code(GSoC) program where Google pays students  $5500 to work on open source projects. For the past years about 30 students from Buea have had the privilege to be part of this program and if you ask from them they’ll tell you that, this is an opportunity you should never miss.  I can vote for this because am a GSoCer my self. Imaging getting paid $5500 to work on something you have passion for. Being a GSoCer will not only benefit you financial but also all the above points will be part of your benefits. GSoC is not the only open source internship out there. You can see more of such internships from this blog post, summer-internships-for-open-source-enthusiasts. The  open source organizations you contribute to may also end up employing you.

A good example of a testimony of contributing to open source is Nyah Check. Most of us know him. If you don’t just google search his name. Due to his contributions to open source, he has done GSoC 3 times and has also traveled out of this country more than 4 times without him spending a dime. Recently he’s traveled to the US twice in 1 month to attend conferences. And while at the conferences he gets to meet a lot of influential people in the tech community.

There are obviously a lot more benefits of contributing to open source projects, but if the above don’t inspire you, then there is no need for me to continue further. For those of you that have been inspired, I encourage you to go to and learn about new & interesting projects. Browse projects on GitHub. Or read about GSoC.  There are a lot of articles about how to get started with open source but if you want something that is not already published, all you need do is leave a comment.

GSoC Coding Week 4 updates

This week was a great one. I made much progress compared to previous weeks. As of now you can import MRRT templates from the UI. These templates are properly parsed and meta data stored in a table(radiology_report_template) in the database. This was committed here can now import templates from ui . See screenshot below


My next step is to try to use REST to get report templates from the system and display them on the interface and also look into how to render these templates. I already implemented a rest resource for templates, you can see that in this commit Added Link to my complete pull request is PR-304

GSoC Coding Week 3 updates

The third week of GSoC is over and here is my report.

This week i had a blocker with the radiology module. “mvn clean install” was freezing and I had to kill it to make it stop. I even opened a thread about it on talk. I had input from my mentor and different members of the community like @dkayiwa and @maany. But it was only resolved on Thursday  9 June by @teleivo(my mentor). After that i could continue with my work but could not meet the objectives I had set out for this week. But hopefully next week will be more fruitful. But I learnt a lot while trying to resolve the blocker with the radiology code. I learnt a lot about spring framework and asked a lot of questions from my mentor who was very helpful. Here is my pull request for this week.

Also spent some time responding to comments on my pull request and resolving them as soon as possible.

I have already created the tab for report templates but still need to provide it with data to display. Next week I will be working on a REST API for the report templates resource which will handle getAll and pagination.

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
  • 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 for template objects and went ahead and created all services and DAOs following the openmrs convention and that used in the radiology module. Created,, 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.

GSoC Coding Week 1 updates

And so the first week of GSoC coding period is finally over and here is my report. First let me give a brief overview of what I am trying to achieve for GSoC.

Currently, for radiologist to create reports using the OpenMRS radiology module, they have to fill in a textarea from the webapp which is stored inside the database as a string. But this is very limiting. Radiologist typically use templates(which are html forms) to create their reports. So I am trying to give radiologists the ability to use these templates from within the OpenMRS Radiology Module and also they should be able to create these templates them self from the UI. So as you can see the problems am trying to solve here is how these html templates will be stored, rendered and how reports will be stored after creating them using these templates.


  • Explore OpenMRS XForms to understand how it works with forms since i will be applying similar knowledge to work with radiology report templates
  • Together with mentors decide on how to store these html templates either as HTML or xml and how report that will be saved in the system from these templates
  • Start implementing template management, specifically how to store, retrieve and delete templates.


  • Explored how XForms module works with forms and even looked at some of the code to understand how things are done on the backend.
  • Realized that xforms creates xml files for every form and also creates xml file with data to hold data entered through the form. Proposed this to my mentors and we said we will do something similar. That is, we’ll store xml files for every template and another to hold report data. But later I was having second thoughts on this aproach. This is because MRRT radiology report templates are perfectly valid html files and converting them to xml files and storing them locally just to reconvert them some how back to html when rendering them in the web interface seems to be to much work for nothing. I mean we could just store these html files as they are which will make it easier to render on the webapp and if later we need export a version of the template that is compatible with xforms, we can just parse this html files and generate proper xforms version.
  • Proposed a change to our initial design agreement. Still waiting for approval from mentors.
  • Started working on how to support report templates inside the radiology module. The jira ticket for this is RAD-272
  • I created a skeleton of some classes that will handle templates and can be found here on GitHub
  • Explored some opensource libraries to parse html documents and came up with jsoup. Am exploring it now, still to discuss it with mentors to see if they have a better idea.


  • Well this is not really an issue but my progress is a little bit slow due school CAs(Continous Assesments)

Next steps

  • Continue with the exploration of the jsoup library
  • Fill in implementation for the skeleton classes i’ve created above
  • Make sure RAD-272 is completed and system is able to work with templates
  • Continue with school CAs