I had a really confusing problem in last week , In my mobile application i put loading indicator to notify user about waiting until all data loaded to that page. ( waiting for rendering the component data) So basically i was searching a way to add waiting functionality inside my…

I was stuck in a error which saying “Attempted to assign to readonly property” when i tried to add new element in the clone object of the redux state.I used spread operator , And it work properly in the emulator ( in my case ) . …

Project — Enhancements of Attachments Module.

Primary mentor : @mksd ( Dimitri R)
Backup mentor : Muhammad Ahmed Memon , chine zoheir
Student: Ridmal Madushanka
Project wiki: Link


OpenMRS is an open source configurable software platform that provides health facilities with the ability to customize their electronic medical records (EMR)…

In this week i mainly focus on the mock testing with Mokito for Attachment Resource DoSearch() method. I finish the implementation of the do Search method with some modifications such as create separate context independent search method inside the AttachmentResource which will help to fetch the Attachments using AttachmentService based…

In this week i did some Modifications to the ATT-24 issue. We mistakenly used includeRetired for includeVoided parameter in the java API implementation. So all the occurrences of includeRetired are modified to the includeVoided.

And I started to research on mock testing for Attachment resource for test the search() method. Because After discussion with my mentor he decided to go for mock Testing which can be used to implement test cases without any dependency.Some existing implementation can be found here ( In Bahmni-core module ). And I did some modifications to the ATT-27 issue and able to close the issue.

In this week I did some modifications in ATT-27 after review of my mentor. I modify separate test cases for upload method ( Attachment upload ) to test attachment upload with encounter , visit and without any encounter or visit.

And most importantly i created my mid term presentation which described the progress of my works in GSOC program. And i continue my research on OWA modification. And I started to implement the doSearch method in Attachment resource which will help to fetch the attachments from the rest services. It fetch the the data using Attachment Java API and user able to fetch ( search) Attachments based on the several parameters such as Patient, encounter , visit etc. And also user will able to fetch the encounter less attachment using rest services.

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)

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.

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.

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. …

Ridmal Madushanka

Software engineer at 99x Technology

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store