OpenMRS Planet

July 17, 2018

Jeyasumangala Rasanayagam

Second Evaluations

GSoC 2018: Week 9[July 9, 2018 — July 15, 2018]

Last week was our second evaluation period of the Google Summer of Code 2018. We need to submit the video presentation about our project and it’s information and demonstration in order to pass the second evaluation. I attach my video presentation here,

And I I have already started to work on the following task, List of Providers, once the user clicks on a row in the table, user should be able to see more detailed page about the provider. (Who created this provider? Which unit this provider is being assigned to work? Top 10 patients who was recently worked with this provider.)

This is similar to the Diagnosis report improvements which I done at very first time. So I thought to follow those conventions and elements to improve the List of Providers report also. These are the new elements which will be added into this report,

  1. Provider Information in the header
  2. Which unit this provider is being assigned to work
  3. Top 10 patient information who was recently worked with this provider
  4. Usual bar chart in the bottom of the report (Count of patients vs date)

by Jeyasumangala Rasanayagam at July 17, 2018 01:06 PM

Prabodh Kotasthane

Week 9 – Second Evaluations done!

This past week, I completed and passed my second evaluations. We all were needed to submit a presentation to OpenMRS community. I completed both the evaluations and presentation on time. Now the remaining major tasks in the final phase are migration from xml based configuration to annotation based configuration, testing the untested code. Also we are planning to migrate to Spring Security OAuth2 2.x release. As a bonus deliverable, we are planning to build an OWA which will facilitate the functionality of SMART apps to the latest OpenMRS Reference Application. I have started to plan things out and will start working on these in the coming week.

That’s all for now! Happy coding! 🙂

by Prabodh Kotasthane at July 17, 2018 09:34 AM

Samuel Male

Week 9

Hi all,

This is the 9th week since the game started. If you missed out about last week's update, you could want to check it out here .

Work Done this week

This was the week were I had my second evaluation. I was making ends meet to seeing myself pass the evaluation. And do you what, I passed the evaluation and thanks to my mentors 😊 

Currently, the module codebase ain't found in the Openmrs repo. Its still within my repo but Steven told me we will just transit it later to the Openmrs repo. So I couldn't use JIRA for PM. But just as a good practice, I came up with a Trello dashboard(MPD) to help me keep track of progress.

So currently I have been working on Mapping Concepts and 85% of the work is complete.
After that I will proceed to Mapping OBS. Note that these are all subtasks for Adding Support for Encounters as a Resource.

Challenges Encountered

I have faced a challenge of Mapping Concepts since they are soo wide and have a complex hierarchy.
I need your tech support in this. But what I believe is that my current implementation(pending) will be able to give the expected performance. What confuses me is "I wonder how to distinguish a Concept from the dictionary from a customized one! "

Otherwise, I expect significant progress due this week.


Samuel Male

by Male Samuel ( at July 17, 2018 09:31 AM

Ridmal Liyanagamge

GSOC 2018 OpenMRS — week 9

In this week also i worked with the ATT-27 issue which is modify the Attachment REST end point for file upload to Allow the upload attachments based on the specific encounter. And i do some modifictions to the current implementation and add exception handling inside the upload method.

Since my mentor was busy in last week, i was not able to start a new work ( waiting for his review for my previous work). But i dis some research about OWA ( Open Web App ). Because my next task is to Segerate attachment UI to an OWA. Challenges of this task is that integrate OWA to open MRS main dashborad since attachment module need to be displayed in two places in the Open MRS dashboard. ( Clinician Facing Patient Dashboard and on the Visits & Encounters Patient Dashboard)

by Ridmal Madushanka at July 17, 2018 04:10 AM

Suthagar Kailayapathy

Second Evaluations — Google Summer of Code 2018

Week 9 [ July 10, 2018 — July 16, 2018]

According to the Google Summer of Code 2018, Last week was the second evaluations period. So we all need to complete that evaluation within the end of that week to pass the Google Summer of Code program.

Along with the OpenMRS, I need to prepare a Video Presentation which carries the project information and demonstrations of my project. Have a look at my video presentations to get an abstract view of my GSoC project :-)

Project Implementation

Last week, I faced an issue with the Daemon threads in OpenMRS. There are few Daemon threads which are working in the background to carry some workloads of the OpenMRS and those are doing some works like,

  1. Manage the schedule works and perform the actions
  2. Clean the reports from the instance memory
  3. Collect the patient view information and recent encounters

Since the Daemon thread is common for the whole system, OpenMRS defined a Daemon thread user who can work like an actual user to get approval from the OpenMRS access controls. But the Daemon thread user was fixed to create with a given user UUID.

So when the location based access control module tried to catch those requests from the Daemon thread user, it can’t identify the location information for the user. So it blocked the response and send the null response instead of the actual response. So the daemon thread component failed to collect the recent patient view information and the recent encounters.

After some discussions with my mentor Daniel and backup mentor Wyclif, we have decided to skip the location restrictions for the Daemon thread user. So I have added the fixes for those issues and completed that work. Please refer this discussion if you need more information,

Could not fetch the UserContext for a getPatientByUuid() Call from EMRAPI module

View the location information in the patient dashboard

Then I have worked to add the location information to the patient dashboard. The users without administrator privilege couldn’t access the patients from other locations. So they can identify the patient location from the OpenMRS header. But the System Administrator can handle the patients from all locations. So he need the location information for the patients in the Patient dashboard. The final view will be like this,

And then, I have worked on these followin tickets as well,

by Kailayapathy Suthagar at July 17, 2018 03:38 AM

July 16, 2018

Isuranga Perera

GSoC @OpenMRS 9th week

We had the 2nd evaluation this week. By the end of this week I was able to complete the first phase of the project which was to develop subscriptions management module which allows the user to create, modify & delete subscriptions made by the user.

In addition to that I was able to implement a module to read Bahmni atom feed. In the upcoming week I will integerate Java Spark microservice framework with the module so that it can be run as a service which expose endpoints to register and trigger subscriptions.

by Isuranga Perera at July 16, 2018 06:11 PM

Piyush Kundnani

GSoC with OpenMRS Week 9

Hello World! This has been a rather interesting week. Happy to let you know that I passed the second evaluation thanks to my mentor. I was lacking behind schedule since I just joined as a full time employee at a company which hardly left me with any time. But thankfully I discussed this issue with my mentor and we were able to trim down some not very important requirements from the project. With whatever time i could spare, I first read a little about testing on the openmrs wiki. Later had a look at the existing test classes used in other openmrs modules. I also finally manually tested the controllers to verify that they were working as expected. Thats all for the update. Thanks for reading.

GSoC with OpenMRS Week 9 was originally published in piyush.kundnani on Medium, where people are continuing the conversation by highlighting and responding to this story.

by Piyush Kundnani at July 16, 2018 05:26 PM

Eunice Amoh

Ninth Week Of GSoC @ OpenMRS

After the second evaluations, my next target is now implementing the demo client which use generated SDK to invoke the OpenMRS FHIR APIs. I have gone through the code of the generated SDK for Java and understand the APIs which required to be called from the demo client. Now I’m going to start a sample project which wraps the SDK to write the client.

Demo Client Flow

Above diagram shows the interconnections between the components when writing the demo client. I’m planning to complete the demo client by next week.

by Eunice Amoh at July 16, 2018 02:11 PM

July 15, 2018

Harisu Fanyui

Week nine

Mid Term Evaluation

This week begin with me continuing to fix the reviews that my mentor made during the previous week. I continued the reviews until even by the end of the week the work was still hanging on the review as along the line i encountered a blocker which was about writing a test and the test was time sensitive as such creating a data set was difficult. This i had addressed in the previous week by moving these test into the userDAOTest and everything worked fine but as a result of the reviews, I had to as well migrate these test from the DAO to the service layer. This is where the algorithm which i used in the DAO for writing the test did not hold as the Logincredential which i am supposed to use was not available in the service layer. I did fixed all the other sections of the reviews but this was a blocker as it took more time debugging and actually letting me learn alot from the process. By the end of the week i had a call with my mentor and he left me with some hints and stategies on how to combat the blocker.


By the beginning of monday i received a mail from google telling me the  second phase of the evaluation is open i just continued fixing my reviews and On Wednesday,
i took some time out and fill the evaluation form for my mentor as shown above and was anxiously waiting for the result of the second phase. By Friday i had my normal and usual weekly call with my mentor where i laid out the blocker that is disturbing me and he gave me some walk around.

Success Message

Then by Evening I received a mail from google notifying me that i have successfully passed the second term evaluation

by Harisu fanyui ( at July 15, 2018 08:53 PM

Dileka Weerasuriya

Google Summer of Code 2018 with OpenMRS

9th week of Coding

The 9th week of the program was really important as the 2nd evaluation was scheduled. I engaged in improving the scheduled task in muzimacore module which creates summary reports for each patient in a cohort.

I installed reporting compatibility module so that cohorts could be built. Next I had to add a concept dictionary so that I could add Obs for a patient.

Once a report configuration is created by the user(i.e-mapping a cohort with report definition) the scheduled task of creating patient reports take over.

Introduction to the Report Generation Task

  1. The process is started everyday at 00:00 hrs, and it first gets all the report configurations from the database and loops through each one of them.
  2. It loops through each patient belonging to the cohort of the report configuration.
  3. The task then checks for any in-completed reports belonging to that particular patient in the generated reports table. If any are found, the report is generated and saved as a “completed” report(setting the status column to “complete”)
  4. The task next checks for new Obs for that patient since 00:00 hrs last day and generates a new report only if any are added.
  5. If no previous reports of that patient are found, the task creates a new report (This would happen for the very first run of the task).

Currently I am engaging in testing the scheduled task. I hope to configure the muzima android app so it could consume these reports and render it to the mobile user 😃.

by Dileka Madushan at July 15, 2018 08:43 AM

Chathuranga Muthukuda

Improving security features

Hello guys,
During the past week, I have been busy with implementing a way where the system detects the changes in user credentials and log out the current user if something changes. This task is related to security features which are assigned as the objectives of this years summer of code project.

It looks like we have to find the most efficient way of implementing this since the way I have proposed in my prosal may lead to some performance issues because running a separate service which is continuously requesting logging details in the background can consume a lot of resources from the device.

Currently, I'm discussing with my supervisor the best ways we can achieve this and soon will complete this and then I can move into the last security task and so on.

So I guess that's all I have to say regarding previous week and let's meet next week with more details.

by chathuranga ( at July 15, 2018 04:56 AM

July 09, 2018

Suthagar Kailayapathy

Allow users to edit the patient location through the patient dashboard

Week 8 [Jul 03, 2018 — July 09, 2018]

I have successfully completed the following tasks and the pull requests were merged with the main repository.

  1. LBAC-4 : Create basic module structure for the project
  2. LBAC-3 : Assign patients to locations on registration

And started to work on LBAC-5 : Allow to edit the patient’s locations through the patient dashboard. The user can assign the locations to the patient through the patient registration dashboard. Since there is no way to edit the patient location directly. So we decided to provide an action method which can be triggered from the patient dashboard to edit the patient location.

There will be a link called “Edit Patient Location”, listed in the General Actions section in the patient dashboard. The user can click that link to edit the patient location attribute. When he enters to the edit location section,

  • The existing location value will be selected by default if the patient already contains a location attribute
  • The session location will be selected by default if the patient doesn’t contain a location attribute.

The edit location section will be useful for these reasons,

  1. To switch the patient location from one location to another location
  2. To assign the patient location for the existing patients

You can follow this talk forum to get more discussions about this section since I faced some issues while working on this sample.

How to create a fragment which can support to edit from Patient Dashboard?

After this ticket, I started to work on these following tickets,

  1. LBAC-7 : Select the session location as default to the fragment location selector.
  2. LBAC-8 : Failed to filer the patients who listed in the findPatients page before searching.

by Kailayapathy Suthagar at July 09, 2018 08:34 PM

Prabodh Kotasthane

Week 8 – Successful SMART apps run! Ready for second evaluations!

So here comes the good news, I am successfully able to run SMART apps from SMART apps gallery. After some bug fixes and code changes, now the module is properly able to run SMART apps from SMART gallery. Me and Sanatt thought of  successfully migrating the module to Spring Security OAuth2 2.x version before the second evaluations but for now we have postponed the plan. I am now ready for my second evaluations and I will be now preparing a presentation for the OpenMRS community regarding the work I have done, so far, on the module. Also I am aiming now at making configuration changes and writing tests for the code. Then looking forward to give time to Bonus deliverables.

Wish me luck for the second evaluations and see you all next week! 🙂

by Prabodh Kotasthane at July 09, 2018 07:53 PM

Isuranga Perera

GSoC @OpenMRS 8th week

This week I involved in completing all frontend and backend operations related to the subscription management. In addition to adding new subscriptions, users can modify existing subscriptions as well.

Following are the UIs implemented related to subscription management.

View Subscriptions Created by the User
Create New Subscriptions Screen
Search Patient Screen

At the 3rd phase(final phase) of the project, I will be implementing a microservice to read the atom feed and trigger in-app notifications.

by Isuranga Perera at July 09, 2018 05:58 PM

Ridmal Liyanagamge

GSOC 2018 OpenMRS — week 8

In this week i worked with the ATT-27 issue which is modify the Attachment REST end point for file upload to Allow the upload attachments based on the specific encounter.Main tasks of this ticket is

  1. ensure that it would be possible to specify an encounter parameter to choose which encounter to hook the attachment to.

2. If both the visit and encounter parameter are provided together then an IllegalRequestExceptionshould be thrown if the encounter does not belong to the visit.

And i created a required unit test for test the modified attachment REST end point.

by Ridmal Madushanka at July 09, 2018 05:55 PM

Jeyasumangala Rasanayagam

Improvements to the Number of Visit Notes

GSoC 2018: Week 8[ July 3, 2018 — July 8, 2018]

During the last week, I completed the following tickets.

  1. RA-1508, BIR-9 — Create and Improve Number of Visits with visit type for given location and date report. It is improved with some features.
  • Users should able to get the visit report for all locations or a given location.
  • Bar chart should be added into the bottom of the report as usual.
  • Add support to include the active visits into the report
  • Total Number of visits grouped by visit types.
Without Active visits
With Active Visits

And I worked on the task “ Number of visits notes views should have to changed in way to provide more information to the user.”

  1. RA-1509, BIR-10 — Create and improve Number of Visit Notes with visit type for given location and date report. I added some improvements for the visit notes report.
  • User can get the total Number of visit notes grouped by visit types.
  • Users should able to get the visit notes report for all locations or a given location.
  • Bar chart added into the bottom of the report as usual.
  • Users can include and exclude the active visits in the visit notes report
  • Changed the end Date selection to support current day end. So users can get the reports up to current day end including active visits
Before without any improvements
After including improvements
After including improvements

Check in with another report!.

by Jeyasumangala Rasanayagam at July 09, 2018 02:57 PM

Milan Karunarathne

Code Progress with Director for the Merge UI

At the begin of the week, I tested my Previous implementation “Search by Error Registration by Error type” on OpenMRS version 1.11.5. So I just step up my testing environment with OpenMRS core version 1.11.5 on my machine with my mentor help. After doing that I just configured Muzima core module with muzima forms, in that configurations, I had face unable to upload Muzima forms due to some bug on the current module. Finally, I upload a form with the guide of my mentor. I just note down what are the steps I did for the setup testing/development environment, I think it would help to the new developers who are the developers engaged with muzima core development in the future. 🙂

After setting up the environment I tested my implementation for my mentor’s DB dump. As my mentor said there was duplication in my implementation. So I tried hard to fixed this issue. And make some changes as the guide my mentor. Even that not fixed, So I just move my next ticket. 😦

My next implementation is “Adding button for the Error Registrations as Direct to the Merge UI” from this implementation user can move from error UI into merge UI for merging conflicted patient registration or create another new patient registration. This merge button if Patient Error registration error occurred by merge conflicted. Otherwise, there is no merge button on the error UI. It will prevent confused user when it appearing for other data. 🙂 When I implementing those feature  I used Angularjs technology as my mentor advice. When starting work with Angularjs, It little bit hard to work on it, because this is the first time I work with Angularjs. However, Angularjs has several inbuilt advantages. When the registration error happened by a patient with similar characteristics user can see the merge button as shown on the figure.

Screenshot from 2018-07-09 15-12-35

After finishing that implementation, I start my implementation on another ticket which is Initial Patient Merge UI. Next week I’ll work on this issue. There are three major implementations,

  • Retrieve Successfully Registered Patient registration from OpenMRS table (by considering merge conflict error).
  • Data shows on two different UI.
  • Adding functionality for UI.

Pull request for “Adding button for the Error Registrations as Direct to the Merge UI“,

by milankarunarathne at July 09, 2018 01:13 PM

Samuel Male

Week 8

Hi all,

This is the 8th week since I started work on  Merge Patient Data project. I'm very excited to inform you dear reader that we currently have a working module in place, unless otherwise.

Work done this week

Generally, I capitalized from the front end.

  • Audition

  • I managed to put in place a page that lists down all audits that are available. Basically an audit is a brief accountability of what really happened in a given MPD Operation(Export/Import).

    I also put came up with a details page for a give audit.

  • Configuration

  • I also managed to do some work on the Configuration management. MPD Configurations are managed using JSON scripts. One configures on which Resources he/she requires in a given Operation.

    How to use the Module

    The module is User friendly though its recommended to use the default configurations. Just change the 'localinstanceId' field to the Id of your server for Identification.
    Currently the module codebase isn't included in the Openmrs repo, so you could clone it from here and build it to get the .omod file. 
    Install the module on your server and move to the Merge Patient Data dashboard and there you set to go. I'm pretty sure you wanna give it a try 😛

    Whats Pending

    Currently, I'm planning to add support for the Encounter and Observation Resources and then Adding Unit Test Cases for the Utility classes I haven't tested. 

    I extend my sincere gratitude to the entire Openmrs community. Thanks for the support to see that the module actually works. I also thank you my dear reader, thanks for the concern and the follow up.

    Samuel Male

by Male Samuel ( at July 09, 2018 11:22 AM

Eunice Amoh

Eight Week of GSoC @ OpenMRS

This is a very productive week as I complete both the backend implementation of SDK generation with the front end implementation of the feature. I also added test cases for this feature. Finally all the pull requests are merged now after fixing the review comments.

Building Blocks of SDK Generation

Above diagram showcase the building blocs of the SDK generation. Swagger SDK generation library is used to generate the SDKs for different languages. I have used the existing swagger definition generator to populate the swagger definition for APIs that supported from the FHIR module. This definition inserted to SDK generation library along with the language that SDK should generated. I have implemented a API which wraps the underline SDK generation API which then call from the front end to download the SDK. User can select preferred language to generate the SDk which can be used to build applications on top of OpenMRS FHIR API by importing the generated SDK.

Following screenshots shows the functionality of the feature.

Generate SDK Option in Swagger Documentation Page
Popup view to generate SDK
Successful Operation Indication Popup

The SDK for the preferred language will be generated and download to the target machine which contains the zip archive name with the format of OPENMRS-FHIR-CLIENT_{language}.zip.

This will following pull requests are merged.

Front end implementation

FM-247 Add Swagger SDK generation frontend implementation by eunice18 · Pull Request #157 · openmrs/openmrs-module-fhir

Add all language support with tests

FM-246 Add all language support and tests by eunice18 · Pull Request #158 · openmrs/openmrs-module-fhir

Next task is to write demo project using java SDK to showcase the usefulness of the feature.

by Eunice Amoh at July 09, 2018 01:31 AM

July 08, 2018

Harisu Fanyui

Week 8

Today i started by Migrating the User activation key to the login credential Object, this is as a result of the design discussion i had last week with my mentor and the reason is to abstract the activation key from being return in the User object and instead return it in the LoginCredential object. This process entails migrating the fields, methods and carrying out the mapping for the LoginCredential object. Which these i took care of. immediately i did this i noticed a failing test which is that of getUserByActivation Key this is a sure case and of course normal as the user object does not have the activation key any longer.

I added the setActivationKey method to persist the created token and hashed to form the activation Key. This came up after the refactoring of the user object by sending the activation key to the LoginCredential Object. After successfully completing the above i made a pull request and from the feedback i got just the very same day i started updating and explaining why i did what i did to my mentor i also made an error of exposing one core method which is not supposed to have been exposed to the api ie LoginCredential, I added a method getLoginCredential that returned the LoginCredential associated with a particular token And thanks to my mentor i Removed it from the service layer but left it at the DAO layer. I also had to write the test for the newly added methods that i introduced and this was a handy part of the work as the algorithm i implemented for the checking creation and checking of the token is based on the system current time stamp. So getting data set for such a test that runs using the system timestamp and has an expiry date is not and easy or in fact a possible thing. So I resulted to writing the test in the DAO that will do the testing for the methods that i added. I successful wrote these test and tested them and they all worked as expected. I therefore made a commit with these changes here .This marked the end of the week.

Also i noticed and had a hard time trying to connect with my mentor for our usual weekly conversation which usually takes place on uberconference. The reason for this was not that obvious as Usual i know and assume everything will be OK till the faithful moment when it was the time for the meeting to begin. I logged into the platform and Got this weird message from uberconference saying my browser doesn't have access to my microphone i thought it was something not that difficult to fix so in a haste i went to the setting of my browser and checked and everything was OK. I changed browser from chrome to windows edge. and i still got the same error. I googled how to set allow access for my browser to use my phone and all attempted solutions did not work. So all this while i couldn't get in contact with my mentor and finally the time for the meeting got over without me succeeding in fixing the error. Then I let it go and still not knowing what was the issue. I wasn't having a peace of mind. Then i kept reflecting on possible reasons and by Saturday. I noticed it actually was the cable of my headset that internally wasn't working so i changed headset and boom everything came back to normal.

by Harisu fanyui ( at July 08, 2018 08:51 PM

Dileka Weerasuriya

Google Summer of Code 2018 with OpenMRS

8th week of Coding

The start of this week was a landmark of my project, because I had to complete development in the muzima core module and then move to the development in muzima android app.

I tried to complete the scheduled task to generate reports for patients with in this week. But I ran into a dead end when rendering the output for each report request. The report generation is implemented as an asynchronous task in the reporting module. So waiting until the task report is generated was a problem.

The generated patient reports by the muzima core module should then be displayed in the muzima mobile app. In the muzima app I first tried to add the following interface changes.

I must thank in heaps to my mentor Samuel Mbuga and Bernard Mokaya who helped a lot to begin working in the muzima app.

by Dileka Madushan at July 08, 2018 09:51 AM

Chathuranga Muthukuda

8th week of GSoC

The second evaluations deadlines are closing and everyone including myself being busy working with the tasks related to our projects. This week I have been busy with creating a methodology where the database of the application is encrypted using the details derived from the username and password of the user.
previously the encryption key was generated using a random key generated using the Android key generator API and the new approach is somewhat more secure than the previous one.
Apart from the username and password, I have also added the timestamp of the date and time to the key so it will be more secure. The newly created encryption process is as follows

Coming week  I will also have to create a short presentation regarding the things I have done up to now to demonstrate in talks thread. That's all for now and see you all in next week with new exciting stuff.

by chathuranga ( at July 08, 2018 03:49 AM

July 03, 2018

Milan Karunarathne

Error Search and Search API implementation

In this week I worked hard on the pull request of the search error function. Actually, In this week I just plant to just complete this improvement and go to the next step of the development. However, I have to work more on the issue, due to it give some issues. After getting review by my mentor I just try to getting Message Content from the Another data table which stores the messages for the error register.

I had busy with some changing on the implementation and make few commits on the pull request. Before that commit, I spend more time to test those search enhancement for the different searching parameters. It’s some time-consuming process and I want to find an easy way to testing.

Next tasks
  • In the next step, I will work on the API implementation of the Patient Merge when conflict happened when patient registration.
  • Implement UI for the opening UI for the merging task.

by milankarunarathne at July 03, 2018 07:25 PM

July 02, 2018

Jeyasumangala Rasanayagam

Improvements to the Number of Visits Report

GSoC 2018 : Week 7 [June 25, 2018 — July 02, 2018]

Last week I worked with several tasks to improve the built-in reports module. The major task was improving the number of visits report by adding some more informations to the report.

The actual number of visits report only provides the number of visit among for given date period. User couldn’t get any more details from this report.

Actual report before changes

I have decided to add some more details to this report. Those are,

  • Total Number of visits grouped by visit types.
  • Users should able to get the visit report for all locations or a given location.
  • Bar chart should be added into the bottom of the report as usual.

- OpenMRS Issues

Other Tasks

Along with the above task, I have worked with this following tasks as well,

  1. BIR-7 : Add Number of Discharges for all Locations Reports to the Module
  2. BIR-8 : Add Number of Transfers Report for all Locations to the Module

by Jeyasumangala Rasanayagam at July 02, 2018 05:59 PM

Suthagar Kailayapathy

Adding restrictions to the users to view the patient without location

Week 7 [Jun 26, 2018 — July 02, 2018]

While working on assigning the locations for the users, there was a problem with adding the location attributes for existing users who haven’t location attribute. So I need to provide a way to assign the locations for existing users.

No one can view the patients who haven’t location attribute since I have added the AOP advise to getPatients() base method. So I need to add some ways to provide a solution to assign the location attributes for existing users.

I have discussed some ideas with my mentor to address this issue. Some of those ideas,

  • Creating a new location called “Assign patient location attribute”. Show all the patients who haven’t location attribute to the user if the user points to this location
  • Create a special privilege called “Edit patient location attribute” in the system. If the user has this privilege, then show the patients who haven’t location attribute
  • If the user contains System Administrator role, then show the patients who haven’t location attribute.

After a long discussion, We have decided to go for System Administrator (considering KISS — Keep it simple, stupid Principle :-p ) option since he should manage the system to update the location attributes for existing users.

Along with this work, I’m working on editing facility for patient locations from the patient dashboard. We decided to add a general action called “Edit location” to the patient dashboard. It will redirect to edit the patient locations fragment.

[LBAC-5] Allow to edit the patient's locations though patient dashboard - OpenMRS Issues

by Kailayapathy Suthagar at July 02, 2018 05:02 PM

Piyush Kundnani

GSOC with OpenMRS week 7

Hello World! This was the 7th week of GSOC and we are almost half way there. To start with I discussed with my mentor how I could manage my project, divide it into meaningful tasks, etc. as the project was a little out of track. Later this week, I completed implementation of all the controllers and will try complete the testing in the coming 2 weeks before the next assessment which is due next friday. That is it for the updates. Will keep posted in case of any interesting developments.

Thanks for reading!

GSOC with OpenMRS week 7 was originally published in piyush.kundnani on Medium, where people are continuing the conversation by highlighting and responding to this story.

by Piyush Kundnani at July 02, 2018 03:31 PM

Ridmal Liyanagamge

GSOC 2018 OpenMRS — week 7

After successfully finish the java API my mentor will decide to start the work with Attachment resource and assign some work for me.

  1. First one is to modify the Attachment upload method by adding new part to upload the attachments based on the encounters. ( Existing Web service is required visits to upload the attachments )
  2. Create the do search method for Attachments which will used the developed java API to fetch the attachments based on the parameters given by the user.

In this ween i started to work on this two parts and unable to complete in this week because i was in the hospital for 4 days. And my mentor was very flexible at that time and give me some extra time to complete my tasks.

by Ridmal Madushanka at July 02, 2018 03:19 PM

Eunice Amoh

Seventh Week of GSoC @ OpenMRS

This week, I was little busy with my exam. I informed this to the mentor. Since I have completed the main feature, I’m currently working on improving the user interface and provide support to generate the SDK for all the languages. My goal is to complete this during the next week and complete the task with the testing.

Follow image shows latest languages which support by the Swagger SDK generation library.

Latest supported client and server side SDK languages

After completing the main task by next week, I’ll work on sample Java base SDK which will demonstrate the capability of the generated SDK.

by Eunice Amoh at July 02, 2018 02:36 PM

Isuranga Perera

GSoC @OpenMRS 7th week

This week I worked on adding referential integrity constraints, other missing database tables and newly added privileges to liquibase file which will be take effect at the time of omod initialization.

In addition to that I worked on implementing omod operations and other backend operations to create and fetch subscriptions.

I have to work on writing test cases for the previous tickets as well. That’s all for this week… :)

by Isuranga Perera at July 02, 2018 02:18 PM

Prabodh Kotasthane

Week 7 – Conformance Statement done, work on SMART apps stuck!

A good news from the past week is that my work on SMART’S Conformance Statement is finished successfully. However, I am presently stuck on successful run of the SMART app which i took from SMART app gallery. After finishing my work on conformance statement, I saw some errors coming from FHIR module which are need debugging. I am presently working on it.


Also, me and Sanatt decided to first write tests for the controllers, rather than focussing on configuration for now. I will take care of annotations based configuration after second evaluations.


See y’all next week and wish me luck for completing my work for the second evaluations soon. 🙂

by Prabodh Kotasthane at July 02, 2018 10:22 AM

Chathuranga Muthukuda

Finalizing the UI improvements

Hi people, It's been a busy week for me since I have to prepare for my final year research Viva which is happening in the coming week. Due to the preparations, I couldn't commit much time to the developments but within the time available I have done some tasks related to correcting and finalizing the improvements I have done to the UI in the application.

Some of those include finding redundant codes related to RangedEditText and the Native SeekBar.And I have also replaced all the EditTexts with the Android provided Native Text Input Layout to give the user a better interaction with the application.

After completing my academic works I'm expecting to move into the security-related tasks within next weeks. That is the update for now and see you all later.

by chathuranga ( at July 02, 2018 04:45 AM

July 01, 2018

Harisu Fanyui

Week Seven

Monday beginning of week 7.
 I started this week freshly after having my pull request merged during the week that just passed, I Needed to move to new things and I went straing to the Openmrs webservice to consume the methods that i just added, During t he process of adding this method, I Tried accessing the methods which i added into core and non of them was available , i tried compiling and it failed then i realized it is not sync with the core during the build so i had to after some googling and seeking for help on the irc channel resulted to the option of me sending and email to my mentor for help in addressing the concern. I therefore got a reply with instructions on how i can do to get pass this blocker. I quickly implimented as i was told and there i went with build success.

After having a sucessful build, 
 Now i went straight away to adding the functionality i was about to add. Immediately i started i noticed I was alsmost exposing the alot of logic to the rest webservice which shoud have been done onthe openmrs-core i immediately left and went back to core where i implimented a service method setUserActivation key so the clients will only need to post to the url and no have to do some logic in their side. I added all and the logic required and i was left with sending email with the token that the user provided.

I also after haven implimented this feature i made a commit and sent a link of the commit to my mentor after he looked at it, he replied with some reasons feedback which i took in to consideration, I was also told to wait and untill we discuss on the pattern for how i should go ahead before i continue. I waited and by thursday i had a call with him via Uberconference where we discussed analysed and came to the conclusion on what and how i should continue with the work. My mentor gave some suggestions which had to do with the way password update is currently implimented and using the userCredential object rather than the user object which i innitially used. I had to use the remaining period of the week familiarizing with the portions of code he asked me to review.
This marked the end of week 7 and i left with the follwing work in mind to accomplish. ie Finalize the creation and hasing of reset token and then i make a pull request. after which i make a different pull request this time around with sending email as the major work done in the pull request.

by Harisu fanyui ( at July 01, 2018 11:07 PM

Samuel Male

week 7

Hi folks,

Its now seven weeks down the road since I begun working on the Merge Patient Data Module.
I think I have been slow with progress. This has been cause of some inevitable blockers. However, lots of work has been done this week.

Work Done

  • I set up my dev environment on a new Platform(mac OSX). Though my performance decreased, I spent sleepless nights configuring stuff and getting used to the platform.

  • More development. Last week I had a bug that blocked me for a while. I'm serializing the data using the  gson library. However I was facing a challenge dealing with generic types. I realized I invested more time trying to fix the bug than moving forward.

Suggested Solution

Just for the use case of serialization of data, I just implemented a dataStore
public class MPDStore {
 public MPDStore() {}
 List<Patient> patients;
 List<Location> locations;
 List types = new ArrayList<>(); 
 public List getTypes() { 
 return types; 
 public void setTypes(List types) { 
 this.types = types; 
 public List getPatients() { 
 return patients; 
 public void setPatients(List patients) { 
 this.patients = patients; 
 public List getLocations() { 
 return locations; 
 public void setLocations(List locations) { 
 this.locations = locations; 
 public void addType(MergeAbleDataCategory type) { 

With this model, the module perfectly exports and imports Patient data from one Openmrs instance to another.
Currently I'm working on the audition of the module Operations. I anticipate that this won't take me long then I proceed to the Configuration Services.

I'm looking forward to finishing with both the Audit and Configuration Service implementation by 9th this month.

By the way I'm excited to inform you that the module currently offers the basic functionality inline with the project objectives though more work is still needed at the UI to improve the end User Experience.

by Male Samuel ( at July 01, 2018 07:45 PM

Dileka Weerasuriya

Google Summer of Code 2018 with OpenMRS

7th week of Coding

This week was one of the busiest week as I was required to complete generation of summary reports in openMRS webapp.

First I created controllers which are capable of mapping a cohort with report designs and display them in interfaces that I created last week. I achieved this task with the help of controllers created previously by early programmers. Skills in AngularJs made this work easier 😆.

Then I had the task of creating back-end functionality to add scheduled task to generate summary reports according to each report configuration added by the user in the following interface.

For this task I had to add dependency of reporting-api to muzimacore module which consumed most of the time in the task 😞

The following link would be very useful for anyone of you who would want to know available versions of jars in openMRS 😰.

Once the dependencies are all sorted out, I am now coding the scheduler task which should be capable of generating a summary report for each patient in a cohort if Obs of that patent are changed. The relevant controllers in openMRS reporting module helped me to get started with implementing the required functionality.

by Dileka Madushan at July 01, 2018 09:08 AM

June 26, 2018

Milan Karunarathne

GSoC code progress with Hibernate

In this week I worked with Hibernate. Criteria API is one of advantage API for my current work on GSoC.

Hibernate – Criteria

Hibernate provides alternate ways of manipulating objects and in turn data available in RDBMS tables. One of the methods is Criteria API, which allows you to build up a criteria query object programmatically where you can apply filtration rules and logical conditions.

The Hibernate Session interface provides createCriteria() method, which can be used to create a Criteria object that returns instances of the persistence object’s class when your application executes a criteria query. [1]

I were implemented ORM in hibrenate for the patient error registrations by using method of the Criteria api. “.eq” will give error registrations with the same ID. “.in” will give multiple exact matches of the error registrations and it’s messages.

public List<ErrorData> getPagedErrorData(final String search, final Integer pageNumber, final Integer pageSize) {
    List<ErrorData> errorMessages = errorMessageData(final String search, final Integer pageNumber, final Integer pageSize)
    // Integer[] errorMessageIds = new Integer[]{};
    ArrayList<Integer> errorMessageIds = new ArrayList<>();
    for(ErrorMessage errorMessage : errorMessages){
        if (StringUtils.contains(errorMessage.getMessage(), search)){
    if (errorMessageIds.size() > 0){
        return errorDataDao.getPagedData(search, pageNumber, pageSize, (Integer[]) errorMessageIds.toArray());
    return errorDataDao.getPagedData(search, pageNumber, pageSize);

Next week I will start our merge patient registration UI for the muzima core module and It’s API.


by milankarunarathne at June 26, 2018 03:26 AM

June 25, 2018

Prabodh Kotasthane

Week 6 – Added Support with Reference Application

This past week I added support for OAuth module with Reference Application 2.7. There were some errors which were solved. Now the module works fine with reference application. Presently, I am working on the correct standard response of the Conformance Statement of the SMART app’s authorization request.This coming week, I am planning to finish my work on conformance statement and start my work on the annotation based configuration for spring. Hope I will finish these goals soon.


See y’all next week! 🙂 😀

by Prabodh Kotasthane at June 25, 2018 06:22 PM

Isuranga Perera

GSoC @OpenMRS 6th week

This week I was involved in fixing some issues associated with database tables. In addition to that I worked on liquibase.xml file which create required tables, insert privilege data to tables enforce referential integrity.

At the time of installing omod, it checks whether all changes in liquibase.xml file are added to the platform. If not it add all changes to the OpenMRS platform.

In addition to above changes I created a seperate JIRA component for notifications module and create some tasks(some were already fixed). You can find all the task related to the project here.

by Isuranga Perera at June 25, 2018 05:46 PM

Suthagar Kailayapathy

Touching the Target of Phase — 1 for Location Based access control to the Patients

Week 6 [June 19, 2018 — June 25, 2018]

After a very deep and large code review on my pull request, I was able to conclude my works on Assigning Locations for Patients task.

Every day, My mentor provides some new comments and reviews for my changes and helped me a lot to make a clean code. Actually, we spent around two days to take a decision about a method name as well. So I wonder about the code quality and cleanliness of this module. I was able to learn some new ideas and techniques through this large code review. Thanks, @daniel for your great time and guidance.

Along with my project, I wanted to create the documentation and explain the steps to run this implementation. So I created a OpenMRS Wiki documentation with all steps needed to run this module, and Registration App Configuration. I wanted to make some edits after according to the comments from my mentor.

by Kailayapathy Suthagar at June 25, 2018 05:33 PM

Jeyasumangala Rasanayagam

Adding More details to Transfers and Discharges reports

GSoC 2018 : Week 6 [ June 18, 2018 — June 24, 2018]

Last week I finished some PR,

  1. Create number of discharges for all locations report. (RA — 1505)
  2. Create Number of transfers for all locations report. (RA-1506)
  3. Adding number of Discharges for all locations report. This contain the implementation for number of discharges.
  4. Adding Number of Transfers for all locations report.

by Jeyasumangala Rasanayagam at June 25, 2018 05:26 PM

Piyush Kundnani

GSOC with OpenMRS week 6

Hello World! This week I was working on the remaining controllers. I also looked into request body annotation and integrated it whereever I could in my modulue. Later I was trying to test the controllers I had already written. I started with trying to setup a remote debugger with openmrs-sdk in my ide. The setup went well but intellij failed to connect to openmrs sdk for some unknown reasons. Another way i could think of is logging at every step, but that is tedious. I talked to my mentor and he has suggested me some testing framework which I am yet to explore. Thats all for the week.

Thanks for Reading!

GSOC with OpenMRS week 6 was originally published in piyush.kundnani on Medium, where people are continuing the conversation by highlighting and responding to this story.

by Piyush Kundnani at June 25, 2018 04:21 PM

Samuel Male

Week 6

Hi folks,

Like I said in the preceding week my machine was down. Actually I purchased another machine. I'm struggling with my dev environment setup and adopting to a new platform that's OSx.

Today I had a physical meetup with my mentor( Senkomago Stephen) at Kololo Uganda. We had lunch together, he advised  me on better/recommended development practices as required by GSoC. I have loved this guy, he is very motivating and resourceful.

Project Progress

To be honest, for this week I have done less as expected by last week's objectives. The module currently downloads/exports data but I started with the Patient domain as a Resource. I also tried to implement the import part of it. Just like you know in development, we always hit upon bugs. There is this logical bug that took me almost 2 days to hunt down and understand. I use the gson library for serialization and de-serialization of data. Serialization is quite straight obvious. I love all the magic with this library. But as data goes complex, de-serialization is quite complicated That when your dealing with generic Classes/domains.
public interface Resource {
    // Some logic goes here

public class Patient implements Resource {
    //Patient Resource logic

public class Location implements Resource {
    //Location Resource logic

public void dummyTest() {
Patient patient = new Patient();
Location location = new Location();

//Add the Resources to a Collection
HashMap resourceMap = new HashMap();
resourceMap.add("Patient", patient);
resourceMap.add("Location", location);

String data = gson.toJson(resourceMap); // Works fine

HashMap deserializedObj = gson.fromJson(data, HashMap.class);

//Attempt getting a Patient object.
Object patientResource = deserializedObj.get("Patient");
Patient patient = (Patient) patientResource; //Ooopppss, this throws an //Exception."ClassCastException : gson.internal.LinkedTreeMap cannot be cast to Patient.class"


That's basically my current blocker. I googled around it and I'm planning to implement manual handlers. I you have a better and quick work around, feel free comment it here or get me on talk and ping me (@samuel34) . We could resolve this an the module would start working at all ends. Then I work on  the Configuration part of it.


Samuel Male.

by Male Samuel ( at June 25, 2018 12:55 PM

June 24, 2018

Harisu Fanyui

Week Six

Week 6 of google summer of code.

This week began not different from the other ones but as it enfolds it showed to be one of a kind as the entire activities of the week turned around monotonous and with me perfecting the one and only single task. that of fixing and finalizing the pull request i made and making sure that all the content with respect to my gsoc project that relate to the openMRS-core have been fixed and merged to the set up repository located Passwordreset. Addressing the core issues meant the beginning of a new dawn for me as the next phase will completely depend on the functionality just added to the core to function. As the week commenced and went further i keep receiving reviews and fixing them day after day and it went further until i finally before the week went to and end addressed all the issues and got my pull request merged. In the process of fixing the reviews and writing test for the added code i had some hard times as some of the tests were failing and debugging them at the time, fixing and testing them was taking a lot of time since i was traditionally running the test using maven command line tool to do the compilation and testing and this had to run through all the various test which took a lot of time and some times when am unfortunate, the test fails which means all the time spent in debugging compiling and testing was wasted. This kept happening for some time and i saw it not helping so i asked if there is a better option for doing the testing without having to run all the test and my mentor responded and told me i could build and test individual test using my ide. From here I noticed a drastic increase in the rate at which i could operate since i don't have to bother waiting for all the test to compile.  was taking  of the  core have been address before the week goes to the end.

by Harisu fanyui ( at June 24, 2018 09:51 PM

Ridmal Liyanagamge

GSOC 2018 OpenMRS — week 6

So in this week i was able to finish the Java API which was a main part of the ATT-24 issue in attachment module and it is merged to master branch of attachment module by my mentor. Mainly in this week i resolved some errors occurred in the unit tests of Attachment API.

There was a major error which was occurred because of the mismatch between actual attachments and expected attachments in the some unit tests.Both two list got same attachments but they are not in correct order. So first i had to found the methods which was occurred that error and tried several approaches to solve the error. But after discussion with my mentor we decided to sort the expected attachments ( which were fetching from the Attachment API) in every test methods Based on the date time parameter.Also there were minor modifications in the Attachment API to complete before finalize the API and i was able to finish those modifications in this week.

by Ridmal Madushanka at June 24, 2018 05:37 PM

Eunice Amoh

Sixth Week of GSoC @ OpenMRS

This week I have worked on fixing the comments on my pull request and implement the front end to generate the swagger SDK. I have to learn spring front end development methods to work on this feature. During the end of this week, I was able to download the swagger SDK from the front end.

Popup Dialog to Generate SDK

I have created pull request for front end developments in Currently I’m working improving the user interface. After completing these two tasks, I’m planning to add tests for the implemented functionality.

by Eunice Amoh at June 24, 2018 09:29 AM

Chathuranga Muthukuda

WOW it's almost the 6th week

Hello everyone..WOW it's almost the 6th week in the GSoC and I'm in the edge of completing UI related improvements and with the help of my mentor, I think I can complete almost everything within the coming week.
In the previous week, I have successfully completed the Charts display optimizations and I had some spare time to move into the other task too which is related to some internal UI component called RangedEditText.

The above image shows the changes I have done to the Charts display fragment. In nutshell, I have just moved the child component of the previously existed ExpandableListView by opening it on a new Activity. It makes the whole TabView activity lite and run smooth.
Within next week I hope to conclude all the UI related tasks and then move into the Security tasks under the guidance of my mentor Shivang.I guess that ll be all for now.Catch you all later.

by chathuranga ( at June 24, 2018 04:06 AM

June 23, 2018

Dileka Weerasuriya

Google Summer of Code 2018 with OpenMRS

6th week of Coding

In the last week I had finalized all the designs with my mentor so that implementation could begin soon 😅. As we planned, the coding started this week! I started with changes in the openMRS webapp first before muzima mobile application is modified.

My first task was to produce the user interfaces with in the muzima-core module. Skills of HTML and AngularJS 1 helped me to achive this task after few days of work 😆.

Then I started to add required back-end functionality for each user interface. First I needed to come up with a database change which was implemented under the guidance of my mentor Samuel Mbuga 😃.

by Dileka Madushan at June 23, 2018 06:10 PM

June 19, 2018

Chathuranga Muthukuda

UI improvements continues

Hello folks,

After completing the progress Dialog improvements I have moved into the Charts section in the Patient's Dashboard. The current Chart section is quite a mess and it makes the whole tab layout as I promised in my proposal I have created a separate activity and migrated the expandable Listview component to there.
Now when a user clicked on a particular vital the request will open a new activity and show the relevant chart to the user in there.
Currently, I'm optimizing the chart displaying activity and hopes to complete it in this week
That's the wrap for previous week and let's meet next week with some more interesting news.

See ya

by chathuranga ( at June 19, 2018 01:05 AM

Milan Karunarathne

First Evaluation

This is the final week of the GSoC first phase. Every students and mentors were completed their evaluation in the week. At the end of week, I had completed my first evaluation of the GSoC project and got a email about my first evaluation completed. I was really happy about that. I would like to thank my mentors and Their valuable feedback for me.

In this week I were busy on the Muzima api development for the enhance searching function from the database access by the hibrenate framework.

by milankarunarathne at June 19, 2018 12:41 AM

June 18, 2018

Suthagar Kailayapathy

First Evaluations — GSoC 2018

Week 5[June 12,2018 — June 18, 2018]

I am very happy to say that, I have completed my first evaluations for the Google Summer of Code 2018 since I have manged to work on my tasks in the given time peroid with a huge help of my Mentor.

Thanks to the community for a big support to get this success of the first evaluations. I was asked some questions based on my project and the involvements which are categozied into four categories such as “About you”, “Communication”, “Experience”, and “Anything else to Google” during the first evaluations.

After the evaluation period, I received a mail with the Evaluation results. Yes !!! I have passed successfully and recived the feedback from my mentor about the progress.


Project — Current Status

We are very busy on working with access location management for patients. I am still working on this following pull request to complete the initial given use case,

  1. Person attributes are stored normally using the patient registration form which you have configured as such.
  2. When I log in a certain location, i should only see those patients whose person attribute point to that location.

LBAC-3 Added implementation for assigning the patients to the locations on registration by suthagar23 · Pull Request #4 · openmrs/openmrs-module-locationbasedaccess

I have implemented a Advise class using AOP methods to wrap the getPatient() and getPatients() methods to restrict the patient search method.

  • When we enter to the patient search page, It will automatically display some rows of the patients which are from mostRecentRegistrationEncounters. Those mostRecentRegistrationEncounters is fetched using the getPatient(id) method.
  • Then when we are start to search for the patients, the patient search page start to fetch the patient through the REST API, then its depend on the getPatients() method.

So I wanted to track those two methods to restrict the patient search based on the access locations.

Following link is the wiki page which contains the App definition for location selection fragment of the patient registration dashboard.

Adding Location Selection to the Patient Registration App - Documentation - OpenMRS Wiki

by Kailayapathy Suthagar at June 18, 2018 06:06 PM

Jeyasumangala Rasanayagam

GSoC 2018 : Week 5[ June 11, 2018 — June 17, 2018]

I am excited!. I passed in first evaluation. Yes! We finished our first evaluation. My mentor give me a positive opinion and he told me to update my daily progress as I was not active during my exam periods( Third and fourth week).

During the 5th week, I completed some tasks:

  • BIR-3 : HashRouter added to the module instead of BrowserRouter
  • BIR-4 : Add Number of Registration for all Locations to the Module
  • BIR-5 : Added implementation to change the view of the bar chart
  • RA-1501 : Added Number of Registrations for all locations Report

And I planned to start the next objective, “Number of Admissions/Discharges/Transfers views should have to changed in way to provide more information to the user”.

by Jeyasumangala Rasanayagam at June 18, 2018 06:02 PM

Jude Niroshan

Google Summer of Code 2018 — Passed the First Evaluation

It’s not just another day I’m just checking my inbox. It was the first day of the week soon after the first evaluation ended in Google Summer of Code 2018. This grabbed my attention as soon as I opened up my inbox.

Frankly, I couldn’t perform my best in last couple of week with some of the assignment submissions and final exams at college. But I was able to manage both my work. There are lot to complete in the project.

My mentor told me the importance of the documentation and why I should do it at the time of writing the code itself. He has even mentioned it in the evaluation feedback.

I was able to learn how to write the documentation using doxygen. It is a tool for python and C++ documentation generation. I actually didn’t know about it earlier. Thanks to my mentor Tommaso, now I know what it can do.

by Jude Niroshan at June 18, 2018 05:25 PM

Eunice Amoh

Fifth Week of GSoC @ OpenMRS

After several hours of coding, I was able to generate the Swagger SDK from the REST API. I have added a new API, which allow users to generate the swagger SDK for given language.

The REST API can be access from below URL.


This API accepts the language which swagger SDK should be generate. I’m currently working on implementing the front end user interface which allow users to generate the SDK from the UI.

Relevant pull request is added in

From next week, I will be able to write a detail blogpost about the feature with the user interface.

by Eunice Amoh at June 18, 2018 05:08 PM

Piyush Kundnani

GSoC with OpenMRS — Week 5 Coding Phase

Hello World! This week was our first evaluation and we were supposed to submit our work to our mentors. I am happy that I have passed the first evaluation. I have already started to work on the targets for my second evaluation. I studied the form schema controller in detail, also had to look into some spring annotation in detail to understand what is actually happening in the code. Most of my time this week went into understanding the code, reading about spring annotations etc. This week I will try to finish the rest of the controllers and start writing tests and testing the controllers. Thanks for reading!

GSoC with OpenMRS — Week 5 Coding Phase was originally published in piyush.kundnani on Medium, where people are continuing the conversation by highlighting and responding to this story.

by Piyush Kundnani at June 18, 2018 04:31 PM

Prabodh Kotasthane

Week 5 – First evaluations completed

This week was filled with fun and new things. The week started with students and mentors completing first evaluations of their respective mentors and students. Then I went on a five days holiday. I was not able to work for hours this week but I was in contact with Sanatt. We discussed about how to integrate functionality of scopes and launch context. We also decided to make sure that the module runs error-free when we run it with reference application.

The week ended on a positive note where I received mail from GSoC that I have successfully passed my first evaluations. Now I am refreshed and ready for the next phase of coding. This week I am planning to make sure that the module runs against some sample applications from the SMART app gallery. Also verify that the module runs fine with the reference application.


See you all next week! 😀

by Prabodh Kotasthane at June 18, 2018 12:41 PM

Isuranga Perera

GSoC @OpenMRS 5th week

This is the end of the 5th week of GSoC coding period. I got my first evaluation completed. I was really happy to have a poitive feesback from my mentor. I would like to make this a chance to thank him for the support and guidance provided so far.

This week I recieved JIRA & Trello boards for the project. In addition to that I was able to integrate Bahmni styling to the OWA module.

by Isuranga Perera at June 18, 2018 11:48 AM

Samuel Male

Week 5

Hi folks,

For this week, I got number of blockers, my machine was down and we had power shortage in my home area. But however, I tried to nab a few of this week's objectives(check down here).

What the module can currently do.

Currently, the module can download or export Patient data in an encrypted format but depending on default configurations.

Steps followed
  • Build the module with "mvn install" (src :- mergepatientdata);
  • Install the module on Reff App 2.x;
  • Move to the module dashboard;
  • Click the export button;
    • This will trigger the whole process, collects all Patient data, encrypts it and a download is automatically triggered. 
  • NB:- Currectly the module supports only Patient and Location as a Resource. I think next week I will add support for other Resources.
More about the dev work this week
  • I looked through my codebase as a module, did some code cleaning and Implemented logging for debugging purposes. 
  • I refactored my Resource Services to a better implementation. 
  • I think as for now I finished with the export logic. Exporting works good, However I haven't tested it with a big dataset ☹️.
  • Written lots of lines of code and Utility methods.
  • And by the way, I successfully completed my first evaluation with Google and Passed 😃
Next week( week 6 ) Expectations

   NB:- I have kept pushing objectives from one week to another which I want to stop this week ☺️
  • I expect to get done with the importing/merging logic from the UI point of view.
    • Need to add a dialog box where one can drag and drop or browse to the ".mpd" file
    • Test whether the entire API can really merge MPD data.
  • Need to also work on the Configuration support from the UI.
    • I think I will add another GSP page that will contain the congs
    • I think I will use the gridJs Library at the front end for indexing, paging, validation etc..
If it doesn't challenge me, then I won't help me. I think I will be strong enough to stand all this. 


Samuel Male

by Male Samuel ( at June 18, 2018 11:12 AM

June 17, 2018

Ridmal Liyanagamge

GSOC 2018 OpenMRS — week 5

This week ends with a lot of happiness. Because i have passed the first evaluation. And I am really grateful towards my mentor for the positive feedback given by him and thankful for all the support and guidance he have given me to complete my tasks.

So in this week also i have done several tasks in the Attachment API

  1. Added new parameter called “includeIsolated” to getAttachments method in Attachment API which will help to decide isolated Attachments (which are not associated with any encounter or visit ) need to be added to the fetching attachments or not.
  2. Created several unit test cases for fetching attachments with isolated attachments , without isolated attachments based on the “includeIsolated” parameter.Also add new test case for check accuracy of the “includeIsolated” parameter.

And i was little bit stuck with a run time error which was occurred when creating the complex Obs inside the unit tests.But my mentor helped me to solve that error by adding some modifications to the code base by himself.And he inserted an API exception ( type of exception used in OpenMRS ) for handling the return of non -complex obs from the Attachment API. ( which can be occurred because of a misconfiguration)

3. So i created the unit test for verify that an API exception is thrown when the module is misconfigured.

So these are my activities done in the 5th week and i sent those modifications for review.So from the first month of GSOC program, i have learned a lot of new things and i am looking forward to learn more knowledge with putting my full effort to assigned tasks.

by Ridmal Madushanka at June 17, 2018 08:11 PM

Harisu Fanyui

Week Five

 Week Five of gsoc

This week  I continued work on Reviewing the not yet  addressed reviews that were left.

Model change

Then i went further to add to the user table another field by name user activation_key.
This newly added field came up again as a series of discurssion which i had with my mentors and 
 we deemed necessary to instead of having another table to keep track of the token, expiry date, and relate it to 
 the user we should rather introduce another field to the already existing user model and this field 
 have as content, The user token which has been hashed (reversible) also going to use the salt which already
already exist and is used for password hashing. and combined to this hashed token will be the timestamp of
when the request for password reset was made(to be used for knowing if the token has expired or not). The hashed token  which will be of the format Hashed_token:timeStamp (xyt354m8912ghx:1233455612) is a sample of what will be stored in the activation_key field.
The token as noticed is separated from the timestamp by a : this will mark the end of hashed token and the beginning of the timestamp. Hence when the user will submit the token that was sent to him or her via email, the hashing is again done and a pattern match is done against the database for the token if found, then the timestamp is verified to make sure it is not expired. Progress done so far on the work can be found Here. Week ended with the feast of Ramadan which was on Friday and a public holiday.

by Harisu fanyui ( at June 17, 2018 06:36 PM

June 16, 2018

Dileka Weerasuriya

Google Summer of Code 2018 with OpenMRS

5th week of Coding

It’s now been a while since GSoC program has started. The past week has been the 5th week of the program. It’s been so exciting with GSoC 2018 so far 😃.

As I described you in the last weekly blog me and my mentor had been working on coming up with mock-ups before implementing generation of patient clinical reports and integrating the reports in mUzima Android App.

Throughout this week also I engaged in designing the mock-ups under the guidance of my mentor Samuel Mbunga. There were several modifications suggested and I could come up with most of them 😛.

Few of the major concerns

  • Making mock-ups simple to the user
  • Making the mock-ups look similar to the real user interfaces (This is to avoid any confusion that we are not proposing changes to existing use cases, but only for the new ones)
  • Adhering to the work-flows of implemented interfaces in similar use cases.

Following are some of the mock-ups that were modified accordingly.

by Dileka Madushan at June 16, 2018 11:45 AM

June 11, 2018

Milan Karunarathne

Go forward with Coding

At the begin, I have faced a problem with creating a data set which is generated Error when creating a registration on the mUzmia module. After discussed with my mentor we tried to create a new dataset from the data registration with the help of the android simulation, app of the mUzima.

There was not any cohort report to download when Configuring the simulated mobile app. Therefore, I just configure OpenMRS instance to cohort report. Even I tried to configure cohort report It gives null point exception on spring framework when I creating cohort report. With the help of my mentor, I follow the steps to create cohort and getting hands dirty with those configurations. Muzima registration form can be downloaded from the repository.

After creating a registration, from the mUzima mobile application and sent it to the Queue data of the OpenMRS instance to process and insert into the registration. It fails every time with the same error. The error was registration was failed on mod 30 validation. Then I had to read more about Luhn algorithm and after getting knowledge about it. I manage issue on the registration. At the final able to create a relevant dataset with errors as I expected.

Especially I would like to thanks, my mentors. Thanks, both of you for the great help

by milankarunarathne at June 11, 2018 11:45 PM