OpenMRS Planet

June 08, 2019

Sai Sandeep Mutyala

OpenMRS Atlas GSoC 2019 — Week 2

OpenMRS Atlas GSoC 2019 — Week 2

Week 2 of GSoC mostly consisted of documenting the API, and making API changes and additions. One big update is that whether a user is an admin or not is now stored in the admin.

Documenting the API

The Atlas API document can be found here. A few API changes were made, like /markerSites was updated to /markers. One notable change would be updating the marker POST update route to use PATCH.

Check whether user is Admin

Whether the user is admin or not is checked at login and added to the session variable. Now that a check is established, work on admin privileges can be started.

Types and Versions

Marker types and openmrs versions’ schemas were defined in the db folder, and API was written to retrieve them.

Tickets Solved this week

ATLAS-134, ATLAS-135, ATLAS-137, ATLAS-140

Tickets in Progress

ATLAS-136, ATLAS-139

Important Links

by Sai Sandeep Mutyala at June 08, 2019 11:55 AM

OpenMRS Atlas GSoC 2019 -Week 1

OpenMRS Atlas GSoC 2019 — Week 1

The 1st week of GSoC is almost over, and here’s a summary of my progress. Here’s a youtube video demonstrating the newly added functionality. This week’s work mostly deals with this ticket.

Adding Markers

Users can click on the ‘Add new site’ button, under the user dropdown. This drops a marker on the map. Clicking the marker provides us with an edit option, which gives us a little form. Filling up the form, hitting save creates a marker on the Atlas.

Adding new marker

Editing Markers

Markers belonging to the user can always be edited, or deleted.

Clicking one of your markers reveals an edit button, along with the marker details, and a delete button. Clicking it reveals a form, which updates the marker data.

Marker DetailsEditing a marker

Deleting Markers

Clicking one of your markers reveals an delete button. Clicking the button prompts the user with a confirm message, and on agreeing, deletes the marker.

Deleting a marker

Locate Me

The current location of the user is identified, and zoomed in, to be located on the map.

Locate Me

Edit My Site Button

Since there may be a lot of markers on the map, it may be difficult to identify markers belonging to the user. To assist with this, the ‘Edit my Site’ button under the user drop-down. If the user has multiple sites, then every next click redirects him to the next site.

Edit My Site

Important Links

by Sai Sandeep Mutyala at June 08, 2019 07:26 AM

June 06, 2019

Ayeshmantha Perera

Training and deploying ML models in azure ml service

Today will be focusing about one of machine learning capability azure have provided in order to train your own models using most of the popular machine learning frameworks and deploying them inside docker containers in order to expose your models for serving.

What is Azure Machine Learning service?

Process inside Azure ml service.

With Azure machine Learning service you can develop train test deploy manage and track you’re machine learning model.It supports almost all open source machine learning frameworks and python packages which will be useful on the pipeline of machine learning model building.It Supports rich tools like Jupyter notebooks or the Azure Machine Learning for Visual Studio Code extension. Azure Machine Learning service also includes features that automate model generation and tuning to help you create models with ease, efficiency, and accuracy.

You can train you’re models locally or even on cloud with the compute instances and environments provided by azure.For example Azure Machine Learning Compute and Azure Databricks, and with advanced hyperparameter tuning services, you can build better models faster by using the power of the cloud.

How is Azure Machine Learning service different from Machine Learning Studio?

I wanted to talk a little about this since some people having a little misunderstanding about these two services.Since azure have released data processing capable notebooks in azure ml studio some people think it’s possible to train a model with you’re own code in azure ml studio.It’s not that way, Azure ML Studio is to train you’re model without writing any code.drag-and-drop visual work-space where you can build, test, and deploy machine learning solutions without needing to write code.So it’s easy but if you want you’re own model with own ml framework better to try Azure ml service.

In the next blog will be having a look at a real world scenario on training a model with azure ml service.

by Ayeshmantha Perera at June 06, 2019 06:20 AM

June 04, 2019

Ayeshmantha Perera

GSoC @OpenMRS 1st week

The coding period begins right after the community bonding period and it’s time for all of us to get started with our project work.

I am working on a project to migrate the reference application to bootstrap 4.0 since the style guide already in the application does not support the responsiveness and there’s a actually a need from the community to migrate it in to the latest version of bootstrap.

Setting up the Project

When working on the style migration I clearly identified that it will be task which involves few modules.

After following the wiki on OpenMRS documentation I found out that setting up the OpenMRS sdk would be a good approach for me to get started on the project.Because the modules which involve in the development can be watched and can do the development to have the results in real time.This is clearly documented in OpenMRS and I think it’s a great way for a new developer to get started working on a project.

In the first week of coding period my target was to cover integrating bootstrap 4 to the application and having Login and dashboard page components migrated in to bootstrap 4.

After having the first discussion after the coding period begins with my mentors (Stephen Senkomago, Juliet Wamalwa) I started working on the tasks for the week.

Task 1 :- Migrating the Login Page to Bootstrap 4.

It was bit a tricky to move forward since I had work on migrating all the component’s to bootstrap.I first went through the code base in order to identify from where to get started and identified that Login.gsp page is sitting separately from other files and have to integrate bootstrap 4 separately in to the file.The main concern was to have the pages as same as it is now after migrating to bootstrap 4 but with a modern look and feel.

How it Looked like before the migration.

How it is after the migration .

To have a clear idea please visit here to view the whole change.

Task 2:- Migrating the Header in inner pages to Bootstrap 4.

It was not a task that we discussed to work on but when starting the development I suggested my mentors if we are thinking about having a responsive header for all pages will have to work on this as a starting step.

In this task I worked on bootstrap migration as well JavaScript changes in order to make the header workable on collapse in mobile phones as well.

Before the migration view on a mobile phone.

After the migration view on the mobile phone.

Task 3:- Migrating the Dashboard page to Bootstrap 4.

As discussed with mentors this was also a main task to work on the fist week since with the bootstrap integration the whole dashboard was converting in to a mess and things was not working well.

Had to introduce mobile queries since the buttons which are links to other services that showing in a grid was not easy to handle on the mobile screens.

And as I previously mentioned it is a must to maintain the same view as in the current reference application.

Before the migration view of the dashboard.

After the migration view of the dashboard.

To have a look at all changes follow this link.

This is it and the amazing first week with OpenMRS and a huge thanks to my mentors who were always supporting me.

by Ayeshmantha Perera at June 04, 2019 07:45 PM

Rishav Rakshit

Summer of Code with OpenMRS ❤️

This article essentially serves as a guide to the following questions — What is GSoC? How does it help you? How did you apply? How to chose an organization? What is OpenMRS and what will *you* be working on?


It was the night of 6th May 2019. The results were supposed to be out by 11:30 PM. It was now 11:31 PM and I was about to hit refresh on the GSoC page for one last time and seal my fate.ate. I’ve always wanted to participate in GSoC, but every year I’ve been so overwhelmed and intimidated by it, that I finally decided to take the plunge in my final year of college. So this was the last GSoC I could participate in before I graduate. Furthermore, I had submitted a single proposal to a single organization. Nervous and anxious, I refreshed the ‘Projects’ page for the moment of truth and …


… Yay! My proposal had been accepted into Google Summer of Code 2019 and I would be working with the amazing organization — ‘OpenMRS’ which believes in the motif — ‘Write Code, Save Lives’.

This article essentially serves as a guide to the following questions — What is GSoC? How does it help you? How did you apply? How to chose an organization*? What is OpenMRS and what will *you* be working on? Let’s get started and debug (😝) these questions one by one.

What is GSoC?

Google Summer of Code, often abbreviated as GSoC, is a program funded by Google that encourages students from across to globe to contribute to open source projects. During GSoC, students work with an open source organization on a 3 month programming project during their summer break.

GSoC often serves as a gateway for many students into the open source community and into production grade software development in general.

A Bit about Open Source -

This part is necessary. Before starting out to do something — it is quite necessary for us to understand why we are doing it in the first place. Open source preaches the crowdsourcing of software development — allowing the source code to be readable by the public at large. Open source has several benefits and prominent code bases have come off it — no wonder why even the closed-source behemoth, Microsoft is now in ❤️ with open source [GitHub page].

Microsoft’s recent acquisition of GitHub shows the impact of open source developers

How does GSoC help you?

For budding developers, GSoC really helps you understand the full software development process — from issue tracking to performing bug fixes, writing production grade code, learning about design pattern and finally deployment. Completing GSoC often indicates that you don’t get intimidated by large code bases anymore.

😃 Tip: The stipend, career and chances for a Google interview may be alluring prospects but growing yourself as a developer is what you should really focus on! Helps in the long term :)

How to apply and choosing an organization?

Applications for GSoC usually start in February (although you are advised to start earlier) once the participating organizations are announced. You are expected to chose project(s) in a desired organization(s), be well connected with your project’s mentor(s) and finally submit a proposal on how you plan to work on the selected project. Google allows you to submit at most 3 project proposals from the same or different organizations.

Selecting an Organization:

This section is quite subjective in nature and various from person to person. This year, over 200 organizations participated in GSoC and navigating projects in such a large option pool can be quite challenging.

When selecting my organization and project, I personally had set myself 3 clear cut directives:

  1. The technology stack of the project/organization should be similar to what I already know (*cough* Angular *cough*) 😜. This leads to a flatter learning curve and helps you contribute faster to the code base.
  2. The organization should have clear-cut directives for candidates — it should clearly lay the guidelines according to which one can become a successful GSoC candidate. I feel that this is where OpenMRS really shined through.
  3. As a personal goal, I really wanted to work for a healthcare organization as it is a cause I really connect with ❤️.
😃 Tip: Please do realize that these directives evolved over time as I explored the organizations in GSoC and were not something I started out with on Day 1. Finding a correct fit for you should be your ultimate goal.

Crushing on OpenMRS ❤️


In one of my extensive organization searches I discovered OpenMRS. OpenMRS is an open source medical records system (MRS) platform that was conceived by Regenstrief Institute and Partners In Health, way back in 2004. Today, it is the grand daddy of platforms such as LibreHealth and Bahmni, which started out as forks of OpenMRS.

The OpenMRS community seemed spectacular — it not only welcomed GSoC participants with open arms but also had mechanisms in place such as a proper WIKI, weekly scrum meetings, JIRA for issue tracking and a strong community which was taking the platform forward. Of late, OpenMRS Talk, their online forum, has become my most visited site on the internet! 😝

OpenMRS Talk

I initially started out with setting up the platform and the reference application and having them both running successfully on my local machine. This surprisingly took me a good deal of effort. I next went on to setting up my dev environment, inspecting the code base and finally claiming issues on the JIRA which I felt I could really deliver on. OpenMRS had clear cut requirements — only upon fulfilling these requirements would your proposal be even considered by them.

😃 Tip: Don’t directly jump into fixing bugs or the code base. First learn the ecosystem and how things work at a higher level of abstraction. Then get into the nitty-gritty!

What am I working on?

I discovered this amazing project called the Patient Flags Module. It is one of the modules that integrates with the base platform and allows healthcare personnel to see vital indicators such as patient blood sugar dropping below a certain level, or patient having high BP etc. I shall be developing an open web application or OWA — essentially a front end in React for this module!

Patient Flags Module’s JSP based UI as it stands todayPrototype of what were are trying to achieve in our OWA

I shall be mentored by the veteran OpenMRS Community members, Maimoona Kausar and Jude Niroshan and I am super stoked to work on this exciting project!

Here is me wishing all my GSoC peers a great summer of code and I hope some of these tips were helping for future 2020 GSoCers! ❤️


My GSoC proposal is here :

Summer of Code with OpenMRS ❤️

by Rishav Rakshit at June 04, 2019 07:27 PM

Wandji Collins

Gsoc Week 1: Generating OWA.

The community bonding period is finish and the actual coding period has begun. it’s the first week of the coding period. I started by making a choice of how I’m going to do test and view changes.

So I decided to go with the sdk server, firstly I setup the sdk-server following the steps at Openmrs-sdk then built the present common lab test module using the legacy UI to view all the cases uses in the module

Setting up dependencies

The openmrs owa is being generated using Yo, by installing the Openmrs-owa generator using npm. to do that we first have to setup npm which comes with nodejs (for those who don’t have it install) or check the version by open or terminal with ctrl+t (for linux user) and typing npm --version Or we can install npm here

Now the we have npm install we have to install Yo, still on the terminal you type npm install -g yo and hit Enter, this will install Yo.

We will then have to install the openmrs OWA generator by Running npm install -g @openmrs/generator-openmrs-owa after this step the openmrs generator is completely installed.

Generating the OWA

The OpenMRS OWA Yo generator

After we have successfully install all our dependencies that we need, we can then generate our own OWA

First we start by creating a new directory and naming it using the the openmrs name module convention by

  • Run mkdir openmrs-owa-nameofyourowa like so mkdir openmrs-owa-commonlabtest
  • Next we move into the newly created directory cd openmrs-owa-nameofyourowa that will be cd openmrs-owa-commonlabtest
  • we now run our generator yo @opnemrs/openmrs-owa
  • you will then have to fill the necessary information like
    1. Your app name
    2. Give a description of what the app is all about
    3. Select what kind of openmrs server you running(Enterprise, Standalone or SDK)
    4. The Framework or library you are going to build your app in(React, Angular or React + Redux)
    5. The server URL you will want you app to server from locally
    6. The path to the your app directory
  • After all this the generator will automatically scrafford your app out for you and the install the node-module then you should have something of like this
  • To build the distribution zip file run npm run build:prod
  • npm run build:deploy to deploy to you local server
  • npm run watch for live reload of your app

The openmrs OWA generator provides you with some basic HTML and CSS. it setup the webpack config and also the package.Json file which holds all the dependency versioning of you project. we have currently setup the project

WEEK 2 Commits

  • Integrating openmrs-react-components and reference-app styles
  • Building UI Form for Add attribute type.

by Wandji Collins at June 04, 2019 01:53 AM

June 03, 2019

Rishav Rakshit

GSoC Week 1: Setting Up the OWA

The motivation behind these blogs is not only to serve as a log of all the work done during the week, but also be a helpful guide for anyone else who wants to build an OpenMRS OWA using React in the future!

The Project Currently Resides Here! [GitHub Link]

As mentioned in the last blog post (you can read it here) , our target for GSoC is to build an Open Web Application for the Patient Flags Module using ReactJS and Redux.

But First, What is an OWA?

According to the ‘Mozilla Archive of obsolete content’ (😥 err, this ‘obsolescence’ is a bit debatable) an OWA or ‘Open Web Application’ are webpages that are built using standard web tech like HTML, JS etc. but can also be installed on devices and used offline. This criteria requires these webpages to have pseudo cross-platform functionality. And it is exactly this cross-platform-ness that makes React the perfect candidate to build OWAs with!

Setting up the OWA

For two days, the ghost of Yeoman visited me in my nightmares 😆
  1. Scaffolding:

Step uno to our multi-step extravaganza is to setup a scaffolding. For this, we shall use the Yeoman Generator.

Run the following commands to install the Yeoman Generator (Yo) and setup a basic project structure:

  • Install dependencies: npm install --global yo
  • Install the generator: npm install --global @openmrs/generator-openmrs-owa
  • Create directory for your app: mkdir openmrs-owa-myapp && cd $_
  • Run yo @openmrs/openmrs-owa to scaffold the Open Web App
  • Run npm run build:prod to build distributable zip file
  • Run npm run build:deploy to deploy directly to your local server
  • Run npm run watch for live reloading

Once you’re done, you are pretty much good to go. Scaffolding using Yo sets up the basic HTML & CSS code — gives you a pretty header and body style. More importantly it sets up the webpack config and comes with Browsersync that allows live reload and is super duper trooper important during development.

2. Upgrading: The Problem with Yo for OpenMRS

OpenMRS OWA Generator is pretty old. The generator is in version 0.7.1 and was last published over a year ago. This poses a problem — when you setup your scaffolding using Yo, the packages it sets you up with (see package.json file) are pretty old too (heck it comes with Webpack 1.15!) Hence, for your future metal well-being, it is pretty important to upgrade our dependencies.

You can do it the old fashioned way by upgrading each dependency by hand by running —

npm install <package_name> --save/--save-dev

Or you can use ncu. [Checkout this Stack Overflow link to know more]

😄Tip: Whatever you do, stay away from upgrading to Webpack 4. Not only are there drastic changes to plugin support, but it somehow messes everything up. I literally wasted 2 days trying to figure my mess out. Currently I’m running v3.x — I’ll get back around to this later, upgrade to 4.x and report my results.
This person made me go around in circles too many times. Especially when upgrading to Webpack 4.

3. Avoiding Rookie Mistakes 😞

In the webpack.config.js file you shall find the ‘LOCAL_OWA_FOLDER’ config. Irrespective of operating system, do make sure your path looks similar to this —


4. Project Structure

You can see the project structure evolve here. But I tend to prefer Angular’s modular ‘neat and tidy’ approach as opposed to React’s ‘wild-wild west’ one. Check out this great article by Alexis Mangin to know more about the philosophy behind our future project structure.

Claiming Tickets & Building the Patient Tag Component

Since we are being Agile [check out our Scrum Board], we’ve broken the development into a number of sprints. Each sprint has a duration of 2 weeks.

😄Tip: We are currently undergoing Sprint#1! Check out our progress here.

Currently I’ve claimed tickets — FLAG-45 & FLAG-46. While work on FLAG-45 is complete, we’re 50% through FLAG-46. We’ve successfully setup the project.

We’ve also built the UI for the Tag Component — we’ve written the routes, the modals and ensured data transfer between the component and it’s modal. We’ve used React-Table package and introduced an extremely versatile table generator. We’ve also introduced a new feature — glyphicons to represent various tags along with tag colors. These together are called ‘Indicators’.

TODOs for Week 2 of Sprint#1 —

  1. Integrate reference-app style guide & openmrs-react-components
  2. Test ‘Tag’ endpoint.
  3. Write API service, define DTOs (data transferable objects) and mapping service for the ‘Tag’ component.
  4. Introduce Tabbed-Content in App page.

Here are a few screenshots to demonstrate our progress —

Current Single Page UIEdit Tag Modal (without styling)Populated table showing delete Tag functionality & indicators [ hex representation as well as glyphicons]

The Project Currently Resides Here! [GitHub Link]

by Rishav Rakshit at June 03, 2019 09:52 PM

Reuben Varghese

WEEK -1 Updates [27th May — 2nd June]

WEEK -1 Updates [27th May — 2nd June]

This was my first week working for this edition of GSoC. While I haven’t particularly been happy with the progress, I look forward to more productive weeks in the future, now that I am relatively free and hopefully can focus better on the tasks at hand.

Coming to the tasks that I have begun:

  1. Implement a method to ensure that a fresh page is fetched each time the react page is refreshed: Currently, when refreshing a page, the contents of the page are fetched from the cache. This results in an older version of the website being loaded.
  2. Improving the search algorithm: I am also working on this task simultaneously.

Tasks completed:

  1. Setup the environment
  2. Merged a few pending PRs

Blockers faced:

  1. For some reason, the search functionality is not working locally for me. I am sure this is a silly fix but I am working on getting it up and running.

All in all, it was a slow week due to a lot of reasons but I am positive about a much more productive week ahead :)

by Reuben Varghese at June 03, 2019 08:51 PM

Mithilesh Kohale

Haripriya Reddy

GSoC-Condition List Week 1

GSoC Week 1 came to an end within the blink of an eye

Accomplishments so far

Saving Condition-

Fixed a bug that caused an error while saving condition.Users can now create a condition and save it. The saved conditions are displayed in the manage conditions tab and is stored in the database

Display End Date in Inactive Condition tab-

The date when the status of a condition is changed from active to inactive, is the end date of the condition. When a condition is marked as inactive, the current date is fetched and displayed in the End Date column of Inactive condition tab.

Fixing Labels-

Made minor changes to fix the spelling of labels like Onset date. Onset date was previously spelled as On Set Date.

Editing Conditions

This feature is to enable a user to make changes to an existing condition. On pressing the pencil icon in the actions column of Manage Conditions page, we would be redirected to another page where changes can be made and edited condition can be saved. So far, I built the UI for editing conditions but functionality is yet to be added. I hope to complete it this week.

by Haripriya Reddy at June 03, 2019 02:47 PM

June 02, 2019

Wandji Collins

GSoC community bonding at OpenMRS

After the list of selected have been publish the community bonding period begins.

During community bonding students are expected to get to know their mentors and the work they have to. at this i got to know my mentor attend the introductory call, setup a trello account to track down the workflow of my project. i also got learn about SDK and to use the one used by my organisation (openmrs-sdk) the community bonding was good since i got to see the actual aspect of communicating with both mentors and the community. Building the present module of my project was one of my main concern during this period, but doing so was not easy due to my maven version which i was running (maven 3.6) and had to down grade (maven version 3.2.5) . i also found the community bonding in my organisation very interesting since, i got see daily reminder and information to students and what they are to do as concern the whole program.

The google telegram group brings GSoC students of each year together, to chat and share ideas on their projects. So far i will say i enjoy every little bit of the program and how it goes. After this period of community bonding the actual coding phase one start. Setting up your development environment is a key aspect during community bonding, which i did and my first first task for the the community bonding period was to re-write my proposal since the project assigned to me was not the actual project I went for. Gsoc program i most say have put a lot in me for this short while and I know there is still more am going to learn before the end of the program.

by Wandji Collins at June 02, 2019 10:22 PM

Andrei Stanila

Week 1 of GSoC @OpenMrs

The coding period has begun and it’s time to work on our project.

In this week i tried to shape my work and to setup everything to get the work done. With help from my mentors I created and ran a server using openmrs sdk. Also created an OWA using OWA generator and the OWA use React.

I had some problems with working directly in OWA and testing it. So I created a project in react and started to work there and after i will integrate my components in the OWA with help from my mentors and i will deploy the OWA in the module.

In week 1 and 2 i planned to work on upload widget and thumbnail. I started with the upload widget because i think it is more complex then the thumbnail. The upload widget has a dropzone where you can drop or click to upload files. After you upload a file you get a preview of the file. Also has a textera where you can add description of file and upload button and a button for taking photos with webcam. I did a dropzone from scratch using a div and creating some handler functions (onDrop, onDropLeave etc).

I did some style for dropzone to be similar with the old one. Next i need to set every element in it’s place.

Here are some screenshots how the dropzone looks before and after you drop a file.

Next week i want to finish this component and connect it to the api to make it able to upload the file. Also i want to create the thumbnail component (this will be a clickable photo preview of attachment and when you click it you will see the full version)

Week 1 of GSoC @OpenMrs was originally published in Google Summer of Code 2019 on Medium, where people are continuing the conversation by highlighting and responding to this story.

by Stanila Andrei at June 02, 2019 04:15 PM

Rushikesh Chaudhari

GSoC Journey: week1

After the one month of community bonding, the actual coding period is started from 27th May. In the community bonding period, I talked with the mentors and set milestones for each week.

Following are the main goals I archived in this week😁 :

  1. Perform changes in the Person class, so it will create Lucene indexes.
  2. Create a new module’s skeleton and implement PatientLuceneQuery class in the module.
  3. Create Lucene queries for gender and birthdate search with the help of Lucene API.
What is Lucene and Lucene indexes?
Lucene is a full-text search library in Java which makes it easy to add search functionality to an application or website. Lucene indexes are similar to the inverted index which we normally see in the reference books. In the book’s inverted index, we see that word to page indexing i.e. particular word appears in which pages in the book. In a similar manner, the Lucene library generates the Lucene indexes for the fields present in the database.

OpenMRS’s Lucene API does not directly use Lucene library, It uses Hibernate search API which internally uses Lucene library.

For my 1st goal i.e for creating lucence indexes of Person class, I added the @Indexed annotation to the POJO class of Person. Also, I added the @Field annotation to gender and birthdate member of Person class which tells Hibernate to create a Lucene index for Person class with the fields gender and birthdate.

After that, I created a new PatientLuceneQuery class which consists the Lucene queries for searching the Patient with gender and birthdate. The following are the Lucene queries that are built on top of OpenMRS Lucene APIs:

LuceneQuery<Person> luceneQuery = LuceneQuery
 .newQuery(Person.class, sessionFactory.getCurrentSession(), query, fields);

DateLuceneQuery<Person> luceneQuery = DateLuceneQuery.newQuery(Person.class, sessionFactory.getCurrentSession(),
query, field);

On the next week I’m will create Lucene queries which help to search patients with range of age. 😁

by Rushi Chaudhari at June 02, 2019 04:15 PM

Deepak Prasad

GSoC Journey : 1st Week at OpenMRS

GSoC Journey : 1st Week at OpenMRS

GSoC’s coding period kicked off from 27th May. 2nd June marks the end of 1st week. During the 1st week, I spent some time removing blockers, fixing bugs and implementing the 1st milestone for my proposal — Implementing the Provider Module.

Lets see this in detail.

Provider Module

In short, a Provider is someone that provides medical services to a patient, e.g., doctor, nurse or clerk. The goal is to implement the Provider Module so that we can view what providers are listed under an account, ability to add providers and retire them, etc.

The issue is raised at AC-402 and the Pull Request is at #599. Currently I have been able to get all the Providers related to the account. Also test cases for the have been added.


A blocker was found at AC-613 which is causing the build to fail. The reason maybe the Gradle Play Publisher plugin. We are getting error in google_play.json file due to which our release variants are not being uploaded to the Playstore automatically.


Several bugs were encountered and solved. One of them was getting a notification from Google Console that our app was 32-bit and needed to be converted to 64-bit. An issue was raised on the OpenMRS talk thread.

At first on analyzing the APK, we didn’t find any .so files. But later on I found out the SQLCipher library by Zetetic was not generating its files properly and our APK missed the files generated by it.

Updating the library and fixing the gradle files solved this bug.

What I learned

From learning perspective, it was a great week for me.

  1. Learnt about Gradle Play Publishing library.
  2. Learnt that some libraries were coded in native C++ due to which the need to be made both 32-bit and 64-bit compliant.
  3. End of support of 32-bit apps on Playstore.
  4. Getting hands on MVP Architecture.
  5. Writing test cases using Mockito to increase code coverage.

Target for next week

The target for next week will be removing the blocker and add the features for the Provider Module.

by Deepak Prasad at June 02, 2019 02:41 PM

Rohan Sharma

My GSoC Journey —  week #1

My GSoC Journey — week #1

So after the month-long community bonding period ends, the coding period begins in which students have to start coding their projects and so did I. It all began with a quick meeting with my mentor in which we decided that we will be having week long sprints and would be deciding weekly tasks accordingly. So we planned the tasks for sprint #1 and brainstormed about the intricacies and details of each task and if it was feasible to complete that task in the decided time. So after half an hour or so of the meeting, my goals were all set and I had to start working on them.

The major 3 tasks among the total 8 that I should be sharing were-

  1. Starting a thread on OpenMRS talk for community reviews on designs and making changes accordingly.
  2. Learning about the .gitignore file for Android projects and adding one to my project.
  3. Implement the reviewed design for the splash screen.

Other tasks included initializing the project, pushing the code on git, setting appropriate branches for the project on GitHub and exploring the Docker container service. Also as I am new to Linux I have to keep myself getting more and more familiar with it. Believe me, guys, if you are reading this article and plan on entering the software industry in near future and still using a windows machine please shift to Linux right now. It may be hard at first but soon you'll realize its power and use.

Hence I implemented the above tasks over the week. I opened this thread on OpenMRS talk. I request the reader to give his views on the designs as we can still tweak some of the designs. I learned a lot about what should be and what should not be in your .gitignore file for Android projects. Important highlight~

Earlier I used to add the whole .idea folder to the .gitignore but fellow developers this is not a good practice. Not all the .idea files are useless. Some are important and deserve a space on your git repo.

You can read more about that on this amazing blog. I also implemented the splash screen using Constraint layout so that the screen elements adjust themselves on screens of various sizes.

Now comes the highlight learning of the week-

SSH protocol

As a part of my Linux learning, I learned what SSH is, how it works and even hosted an SSH server on my machine and connected it to a remote machine. I have to say that gave me the hackerman feels 😎. I am still exploring SSH and will soon be writing a blog about it. Till then if you don’t know what SSH is just Google it up and you are good to go.

This week has been amazing. Thanks to my ever supportive mentor Isaac Sears. Looking forward to an amazing journey ahead.

by Rohan Sharma at June 02, 2019 01:30 PM

June 01, 2019

Tendonge Awo-Nasako Ryan

GSOC 2019 Coding Period: Week 1

The Google Summer of Code 2019 coding period kicked off on Monday 27th of May 2019, which was a couple of days ago. Accordingly I begun working on my project, UI for Password reset, and using the OpenMRS Yeoman Generaor, I created a scaffolded OWA which would serve as the basis of my project, using ReactJs as the main Library for this OWA. I also created a github repository containing the code for the scaffolded OpenWeb App. Subsequent commits would be made using this repository.

Also I discussed with my mentor following the production of more detailed mockups(more detailed than the ones in my GSOC application) for what the final user interface should look like, so that we follow a specific guide through out the user interface design and implementation process, knowing that we are working towards a specific goal. This is in progress at the moment.

First week down, entire summer to go. Super excited

by tenas97blog at June 01, 2019 11:39 PM

May 31, 2019

Tawrun Vankineeni

Automating the LBAC module Installation.

Week 01 [May 27, 2019 — June 02, 2019]

Location Based Access Control

I have successfully completed the Task and the pull request was created.

  • LBAC-20: Automating the module installation requirements.

Installation of LBAC requires the Person to have a PersonAttributeType to store the location attribute of the person. A PersonAttribute is an attribute to store the UUID value of an Entity in the corresponding table based on the PersonAttributeType. PersonAttributeType describes the value the attribute is used to store. Example Citizenship, Location, BirthPlace etc..

Every User has user properties. The Location is assigned to a user and stored as a user property. Every User Property for a user are stored using Map Data-Structure as Map<key ,value> the value here is again a UUID point to an entity in the corresponding table, the key (String) is to know the table pointed to.

Here we use constant value as Key to store the location property of the user. OpenMRS provides to maintain a list of global properties in the system. we use this global property value to get the location of a user also the same value can be used for other apps installed in OpenMRS to access the Location of the user.

To Install this Module User has to perform

  1. create a PersonAttributeType describing the person attribute which stores the location information of the patients
  2. Add Global Property used to get the user Location Property value.

Above changes can be done programmatically before installation of the module using BaseModuleActivator class.

You can follow this talk forum to get more discussions about this section

Adding Person Attribute Type through code.

After this ticket, I started to work on

  • LBAC-33: Allowing User to have more than one Location.
User can select Multiple Locations



by VANKINEENI TAWRUN at May 31, 2019 07:29 PM

Rohan Sharma

Beginners guide to Google Summer of Code

So let me guess, you, a university student recently came across the buzz of GSoC. One of your friends, seniors or cousins got accepted into GSoC and they seem extremely happy and on top of the world. Everyone around them is showering loads of best wishes and good luck and they are already planning where to celebrate this achievement. But you, on the other hand, don’t even know what GSoC is…?

Well, in that case, you came to the right place my friend and let’s get you out of this FOMO. To be very precise I will be answering these 6 questions

  1. What is GSoC?
  2. Who all are eligible to participate for it?
  3. What are the benefits of GSoC?
  4. Is GSoC a Google internship?
  5. What skill set is required for it?
  6. (just in case 😉) I am impressed by your article and I want to get started. Where do I start?

What is GSoC?

As per the website

“Google Summer of Code is a global program focused on bringing more student developers into open source software development. Students work with an open source organization on a 3-month programming project during their break from school.”

So first, we need to understand What is Open Source Software?

Open source software is software with source code that anyone can inspect, modify and enhance. It’s free of cost and can be altered by users according to their needs. Let’s take a real-life example. We have Windows and Linux as operating systems. Now you can see what’s inside Linux and even modify it as per your needs(the reason we have numerous Linux distros). Also, you get Linux for free whereas, in the case of Windows, Microsoft just ships you the end product. You cannot see and modify what code gets Windows working and the sad part, you have to pay a hefty amount for it. All this is because Linux is OpenSource and Windows is not.

I believe you have already started loving OpenSource.Open source is what is at the heart of GSoC.

So GSoC is a program where Google brings together students and OpenSource organizations to collaborate over the summers. Students pick projects listed by the organizations on the GSoC website as per their interest and suggest their ideas. If the organization thinks the student is competent enough to complete the project he/she gets selected and works with that organization remotely over the summers.

Who all are eligible to participate for it?

As per the official website

  • You must be at least 18 years of age when you register
  • You must currently be a full or part-time student (or have been accepted and committed to the fall term) at an accredited university as of the date accepted student proposals are announced
  • You must be eligible to work in the country you will reside in during the program
  • You have not already been accepted as a Student in GSoC more than once
  • You must reside in a country that is not currently embargoed by the United States. See Program Rules for more information.

So yeah, if you align by all these rules you are good to go.

What are the benefits of GSoC?

So here comes the part you have been waiting for. I would say that if you are going to enter the software industry after your degree then GSoC could be one of the best things that can happen to you as a student. You get hands-on experience with the industry standards of software development which is something difficult to learn by yourself. The best part is being connected to a mentor. GSoC mentors are people who are highly experienced software developers and believe me my friend, having a constant source of guidance is a prized possession. One very tangible and obvious advantage of participating in GSoC is the stipend that you make while working with amazing people on a great project. Post GSoC, If you are ready to apply for an internship at Google, or once you graduate and wish to apply for a full-time role at Google, Google will provide you with a one-time referral for up to 3 roles. Being a successful GSoC student is in fact, a prestigious achievement. It’s another way to make your resume more impressive. And of course, you get a really cool t-shirt too!

Is GSoC a Google internship?

NO! this a misconception among many people. GSoC is not a Google internship or STEP program or anything else Google runs for its interns. It’s a program where Google is just the mediator between the students and the organizations. One should not claim to be a Google employee if he/she gets accepted for GSoC.

What skill set is required for it?

Hard work, patience, and love for quality code. That’s all you need. If you wanted to hear something like JAVA, C++, etc. then those are just the secondary requirements. If you can code in any general purpose language and you have the will to clear GSoC, see yourself writing articles like these next year ❤️ .

I am impressed by your article and I want to get started. Where do I start?

Well, if this article gets Atleast one person started, I will believe that the purpose of writing this article got served. To get started you need to select any project of your interest of any OpenSource organization that participates in GSoC. You can check the archives. Start contributing to the Project in any way you can and get in contact with the project maintainer.

Let’s keep it short. I won’t go into further details of how to get started. If you liked this article and want me to write a detailed article on the process of how to get started please comment below, I will be more than happy to write one. Also, constructive criticism is most welcome 😄 .

Till then, Valar Morghulis ❤️ .

📝 Read this story later in Journal.

👩‍💻 Wake up every Sunday morning to the week’s most noteworthy stories in Tech waiting in your inbox. Read the Noteworthy in Tech newsletter.

Beginners guide to Google Summer of Code was originally published in Noteworthy - The Journal Blog on Medium, where people are continuing the conversation by highlighting and responding to this story.

by Rohan Sharma at May 31, 2019 03:29 AM

May 26, 2019

Rohan Sharma

Falling in love with Open Source

(my experience contributing to Fossasia)

git push, git pull, issues, pull requests, null pointer exceptions, merge conflicts, gitter, slack, mailing lists, scrums, commits……….and the list never ends. When u dive into the world of Open Source these things become a part of your daily life and you might find some of them intimidating at first, but dear reader as time passes by, you and these difficulties part their ways and you start walking on the path of falling in love with the Open Source world.

Talking about myself I am an android developer who recently fell in love with Open Source and was dying to share his love story. So it all started in summer of 2018. It was the last week of July and summer vacations were on. I was learning android then when I got to know about Fossasia through one of my friends who contributed to the organization. So I grabbed my laptop and started my research which went on from one link to the other, diving through every possible piece of information I could gather. I was really fascinated to see the way the organization promoted and facilitated college students to innovate and build something and how the community didn't work as a community but like a family. So without second thoughts, I decided to become a part of the community. I started exploring GitHub repositories of the organization and found really interesting projects and the first project i chose to work upon was Phimpme-android. So Phimpme is an android based image editing app that provides numerous amazing options to edit images. So I forked the repository, read a bit about git and tried to set up the project on my local machine. You won't believe it, but it took me 2 weeks to remove all errors and successfully get a Gradle build. It won't have taken more than a day hadn’t I been shy and hesitant in asking the mentors about it. This was the mistake I committed and wasted 2 weeks. So dear readers if you are new to open source and reading this please never hesitate in asking questions, we are here to learn and you cannot learn if you don’t ask questions. Now this was my first step and it was bound to be hard and this is the place where maximum people give up. I didn’t, and finally asked the mentors about it, they fixed my issue within an hour. So with all my enthusiasm I started testing the app and found issues and started working on them. Though I initially had problems with git and hated it but with time as you start diving deeper into its functionalities, you will realize that git is the best thing that could happen to mankind (developers :p). Learning from the mistake I committed earlier, I asked the mentors about any problem I was facing, and I was really fascinated to see how willingly they helped a newcomer like me in every way they could. I developed really good relations with the mentors and learned a lot from them, rather I’m still learning. Day by day I started falling in love with the whole process and this journey, though started on a low note has turned out to be a wonderful learning process. It has now been almost 2 months, of me contributing to this organization and I have grown from 1 contribution to 55 and the number is still increasing daily. Believe me, its so good to see yourself among other community members in the project contributors list.

So if you are a student developer or would like to be one, dive into this Open Source world. It has nothing to take from you but a ton to give back to you.

by Rohan Sharma at May 26, 2019 04:41 PM

Mithilesh Kohale

OpenMRS React Components Library

“Our mission is to improve health care delivery in resource-constrained environments by coordinating a global community to create and support this software.”

FA OpenMRS Open Web App implementation will often have unique requirements. OpenMRS React Components Library aims to provide Reusable Components which can then be used to build diverse applications.

During this summer I intend to improve the project & so that it boosts the development & use of OpenMRS OWA.

The Plan

  1. Have a user friendly documentation & demonstration of the components in the project.
  2. Further develop more components such as the Auto-Complete component, Drag & Drop Upload Component etc.
  3. Create a Starter Kit with many configurations possible similar to Create-React-App.
  4. Publish to npm so that it is easily distributable.

During the Community Bonding Period, i am working on creating a demo & documentation for all of the Components.

by Mithilesh Kohale at May 26, 2019 02:51 PM

May 24, 2019

Ayeshmantha Perera

GSoC 19 My Next Journey

I knew about GSoC from 2017.Applied for WSO2 Open Source Organization. But unfortunately the project was not in the finalized list from google for WSO2. It was my final year in the university so nothing to do, 2018 went like a race I was not a university student anymore.But I always wanted to participate at least once.And in the mean time I enrolled in my Masters degree programme so I got the second life line and thought I will never give up on this year GSoC.

OpenMRS is a great opensource organization which has contributors from all around the globe working towards to make human life’s better.From 2018 end I was looking at the organizations which were part of the last year GSoC and I already knew OpenMRS was participating as a Mentor organization for a long time now.As the next step wanted to involve with the community and I was amazed to see the talk forum which is a great example to say OpenMRS is a next level opensource organization.

Contributing to the organization

If you’re thinking about participating in a GSoC Programme this is a must.You have to contribute for the organization that you’re going to contribute.I worked with OCL Client project which is a React Based application and actively under development by Andela with OpenMRS,Also did contributions to the OpenMRS Core and Reporting tool which is again a React based project.Apart from that I participated in few weekly update calls as well.

Next Step writing the proposal

During this period of time you should have selected the project which you’re going to contribute to.And you should start communicating with the mentors to get basic understand about the scope and the tasks that you have to work during the period this will help you to make a great proposal. Make sure to keep in touch with mentors and get the feed back from them.

What to do after submission

I noticed few students who were in threads before the proposal submission and was not after it’s done.This is the actual period which decides weather you’re getting the opportunity or not.Make sure to interact more and work more during this period of time.

After Result Comes

It was June 6th in 2019.After so much waiting I got the email from google.And in the next day we were addressed by OpenMRS on the next steps to work on.Currently we are on the community bonding period.I have started doing some work as well since it will be more easier to manage things before the deadlines.And had meetings with my mentors as well.Looking forward for a great time with OpenMRS

by Ayeshmantha Perera at May 24, 2019 07:55 PM

Tendonge Awo-Nasako Ryan

GSOC 2019: End of Community Bonding

It was an absolute delight for me when I was notified that I’d be taking part in the Google Summer of Code 2019 session with OpenMRS. Having been a member of the OpenMRS community since 2017, I have experienced first hand the beauty of being part of such a wonderful organization, an organization wherein help is always just a click away, where everybody is treated with respect and coding is fun.

My project for the GSOC 2019 session is titled UI for Password Reset. This project would entail building an appropriate user interface for the password reset functionality that was introduced in GSOC 2018, as well as making some modifications to that project. The expected finished product of my project is a complete, effective and responsive Password Reset User Interface.

Over the course of the Community Bonding period, I was in constant contact with my mentors to figure out how to implement this project. Although I am proficient in Angular, my mentor advised me to study React JS as that would likely be the technology to be used for the user interface. I picked up a few courses in React Js on Udemy, and on the ReactJs official website. Although I wont say I am an expert in React as of now, I’d say I am comfortable working with it and would get better eventually.

I am enthusiastic and look forward to these three months of coding and the challenges they shall come with. LETS GET ROLLING!!!

by tenas97blog at May 24, 2019 02:27 PM

Haripriya Reddy

Journey with GSoC 2019 so far…

How I got acquainted with GSoC and OpenMRS

I got to know about GSoC through my faculty in college. I wasn’t really sure how good I was to participate in GSoC, nevertheless thought of giving it a shot. I started to explore about GSoC and its organisations in the month of January and thought OpenMRS to be a platform that would best suit my ideas. I was motivated to contribute to OpenMRS for its motto — “Write Code. Save Lives”. I have never felt lost at any point while working for this community.Whenever I was stuck, I found help and guidance at every nook and corner in the forum. This is the first time I am contributing to an open source organisation and I have never thought this would be so engaging and delightful.

GSoC Selection

The journey begins with understanding the code base of the organisation you choose. Contributing to the organisation is the key aspect of this program. Students interested initially have to fix bugs on the platform and give suggestions by making code reviews. Once the project list is out, students can select the project that interest’s them and seek help from their respective mentors in understanding the project idea. Students willing to participate should submit a proposal containing details on-

  1. How you would implement the project, if you got selected.
  2. Deliverable’s for the GSoC period.
  3. Contributions made to the platform so far.
  4. A brief Self Introduction.

After the submission of the application, students can continue to contribute till the results are out, after which the selected student’s can refine the design and idea of their project by communicating with their mentors.

My Project (Condition List)

Condition list is a list of diagnoses, symptoms, or findings that are being tracked over time (i.e. across encounters). This project is an extension of Bahmni project. The basic framework of the condition list project has already been completed but there is a lot of scope for improvement before the project can be deployed for production. The main objective of this project proposal is, to replenish the project, fix bugs and engage more functionality to it for better user experience.

Link to my project Wiki page-

Tasks accomplished so far

  1. Removed the History_Of functionality which was deemed unnecessary according to the talk —
  2. Modified the Onset date field to accept the past dates instead of future dates.

3. Added labels to the Condition and Onset date fields in the Add new Condition page.

Next steps

  1. Refine the project design and approach with mentors
  2. Fix the error while saving conditions
  3. Improve styling

by Haripriya Reddy at May 24, 2019 09:54 AM

May 23, 2019

Sai Sandeep Mutyala

Rushikesh Chaudhari

Beginning of GSoC 2019 with OpenMRS

Selection in GSoC 2019 is like a miracle for me. I still remember that night, I went to bed and suddenly I heard pop-up sound from my mobile. I got a message from one of my friend “Congrats bro, your proposal get selected for GSoC”. I was so surprised at that moment. I checked the GSoC website for confirmation of my selection.

Selection for GSoC 2019

On the next day, I checked the official list of selected students with their projects on the OpenMRS talk forum and again I got a new surprise there😃 . I assigned for a new project. Yeah !! I also shocked. At that time I was a little bit confused but after some discussion with mentors, I was cleared with my project selection.

How everything started …

I heard about GSoC from my friends and I realized that this is the opportunity which I’m always seeking. I started to collect all the information related to the Google Summer of Code. I found an open source organization which is best for me which is “OpenMRS”.I started learning about OpenMRS software. Initially, it was difficult to understand the working of the software but thanks to the documents created by the OpenMRS developers. It helps me a lot. Slowly I started contributing and I get more familiar with it.

Tips for newbie :If you are new to open source and if you want to start contributing with java, then OpenMRS is the best option for you, cause all members of this community are very helpful and interactive.

What am I working on

I’m working on the Patient Search Criteria module. In this project, I have to create a new module that will provide the different types of search criteria for the patient search. With the help of this module, the user can search the patient not only by name or id but also by gender and age, birthdate.

For this project, I’m getting great guidance from my mentor Kaweesi Joseph and Herbert Yiga sir.

This is the start of the journey and I know, in this journey I will get an awesome new experience 😁 with the community.

by Rushi Chaudhari at May 23, 2019 10:03 AM

Andrei Stanila

GSoC selection phase

I heard about GSoC this year at a presentation about it at my university where GSoC alumns come and tell students about GSoC and dos and don’ts. I’m first year and i was a little fearful because i thought that my knowledge is not enough. In the end of December i started to watch what organizations were part of GSoC 2018 and i found OpenMRS interesting because was an organization with medical scope. I started to talk on the forum, asked a lot of questions and started to understand the code .

Contributing to the organization

This is one of the most important parts. I did some pull request on some existing issues and created some issues with my ideas. One of them was merged in REST module. By contributing you learn how a lot about open source (git, pr conventions, coding style, testing etc).

Proposal period

In this period you have a month to write a pdf where you tell the mentors what you will do in their project if you get selected and you tell them about your self and why you are a good match. I suggest to watch proposals from previous years . It is very important to start early and ask the mentors for feedback. Your first proposal will be a lot different from the last .

After proposal period

After that you have to wait one month to get the result. In this time i suggest to do some research about your project, try to setup your environment and start experimenting with the project. Stay in touch with mentors and community and try to contribute as well. This period is also very important even that it is not in your proposal.


After almost a month, on a specific date, Google send responses to students via email. I got accepted Build new UI for Attachments Module as an OWA project and my task is to build a new UI in REACT and use Jest for testing .

I find React to be a lot of fun. I think that the hardest part is to understand how the deployment is working and to fix the bugs when you try to test your code.

Link to my project wiki page :

GSoC selection phase was originally published in Google Summer of Code 2019 on Medium, where people are continuing the conversation by highlighting and responding to this story.

by Stanila Andrei at May 23, 2019 08:04 AM

Sai Sandeep Mutyala

OpenMRS Atlas GSoC 2019 - Community Bonding Period

Thanks to the mentors of the project, and the community for selecting me for this project, and helping me along the way. I am really thrilled to be working on this project, and can’t wait to get stuff going!

Project Details

OpenMRS Atlas is this really neat web application that allows one to view OpenMRS implementations around the world. Users can add markers that are now viewable on Atlas. Unfortunately, when OpenMRS switched to using LDAP, Atlas started to break, and markers could no longer be created/updated. Older markers started to fade. A Node.js implementation of Atlas to fix this was worked on, in a previous year, but the application could never fully be deployed, due to missing authentication functionality. So the task at hand is to fully deploy Atlas, by adding functioning authentication routes, and additional functionality like admin privileges, downloading images, etc.

OpenMRS Atlas

Work so far

I was pretty busy with my exams until 20th May, so I could scrape little time in between. However, I managed to get an LDAP server running locally, and implemented a login page, with Cintia’s help. The changes can be found here:

Short video of what I’ve done:

Getting LDAP running locally

  • Clone the repository openmrs-contrib-ansible-docker-compose
  • Navigate to files/ldap-stg
  • After making sure that your default docker-machine is running, type in the following command to create a server with a bunch of test users.
docker-compose up -d
  • The users’ description can be found in the files present in the bootstrap folder.

Implementing Login

Cintia pointed out that the openmrs-contrib-id repo’s implementation of authentication is pretty similar to what we’d like Atlas to have. I had to create a simple login page but copying most of the LDAP code from id’s repo, and calling the authenticate function from the login route did the trick.

Next Steps

  • As I borrowed code from elsewhere, I will have to clean it up and organize the borrowed file properly.
  • Implement sessions to hold the authenticated user’s data.
  • Add some CSS to the login page... I think that can wait.

by Sai Sandeep Mutyala at May 23, 2019 03:17 AM

May 22, 2019

Tawrun Vankineeni

Google Summer of Code

GSoC Selection Experience

Google Summer of Code at OpenMRS

For a long time, I was intrested in Open Source but didn’t have much aware of the Summer of Code program and not able to make my proposal in GSoC’18. I wasn’t confirm of whether to take part or not in this program till the end of January’19. But, This time I have gone through many blogs regardings GSoC, had friend sugesstions and Finally made through ..

Project Selection

I have decided to participate in GSoC in February, went through the organization's page of Google Summer of Code. I was interested in contributing to an Android Project or in Spring since I am comfortable. Finally, I decided to work on Nigeria TeleMedicine App of OpenMRS ORG.

Contributing to the Organization

Gone through the Summer Of Code Page of Organization to know more about the project, org and expectations from students. Nigeria TeleMedicine is Android to be built from the beginning, so I started contributing to the OpenMRS Android Client Project after spending a lot of time going through the code and getting with it. The community here is very helpful we use OpenMRS talk where developers can post their questions about either about the project or ORG and we can help fellow developers answering.

OpenMRS Talk

Project Proposal

Most Important one is Finally here. Gone through previous proposals of seniors, friends and online blogs how to write a proposal. Shared Draft proposal with the mentor through the Summer of Code website. As I am comfortable with Spring I have submitted proposal for Location Based Access Control Phase 2 too as my second option of the same org.

After Proposal Period

Continued contributing to the project, while busy with my Semester Exams. Its good to contribute to the project in between proposal submission and results announced.

Results Announced

Google announced the results of GSoC’19 on 6th May and I am delighted to share that I got Selected :). I got selected for the project which was my second option. Still Happy, Summer Sorted. I will be working on Location Based Access Control Phase 2 as my GSoC summer Project.



by VANKINEENI TAWRUN at May 22, 2019 04:31 PM

May 08, 2019

Deepak Prasad

How to get a GSoC Internship

One of the biggest achievement for a student is getting a GSoC Internship. It is recognized internationally and has a great reputation. Being selected in Google Summer of Code ’19 under OpenMRS is one of the best things that happened in my life.

Google Summer of Code ’19 is celebrating 15 years today. Abbreviated as GSoC, its idea came directly from Google’s founders, Sergey Brin and Larry Page. It is an international annual program, first held from May to August 2005, in which Google awards stipends, which depends on the purchasing power parity of the country the student’s university belongs to, to all students who successfully complete a requested free and open-source software coding project during the summer. The program is open to university students aged 18 or over.

I will be working with OpenMRS which is a collaborative open-source project to develop software to support the delivery of health care in developing countries. OpenMRS is founded on the principles of openness and sharing of ideas, software and strategies for deployment and use.

Lets dive straight into the details and steps for submitting your proposals to GSoC.


GSoC doesn’t require any special pre-requisites. But you should know version control such as Git and have some knowledge about the Github platform as most of the projects are stored and developed on Github.

Make Linux your daily driver and get as much hands-on the OS as possible.

Choosing a right Organisation and Project

Generally GSoC announces Organisation’s list by end of February. There are many organisations that take part in GSoC every year. You can start as early as October-November, take a look at the Organisations that took part earlier that year and the projects that they completed.

You can also start after Organisations’ list being announced during Feb-end. Try to start as early as possible. Get in communication with the mentors, get active on their IRC, introduce yourself and participate in discussions.

Choose a project that inspires you and that aligns with your technical knowledge. It will be in best interest for both you and the organisation. Suppose you have been developing Android Apps, there will be definitely some organisations that will be working in that particular tech-stack too.

If you are applying after the announcement of Organisations’ list, don’t start learning a new tech-stack just to work on particular project. It will ruin your chances for selection as someone with a superior knowledge may take that project away from you.

Contributing to the Organisation

Your contributions to the Organisation matters the most to the mentors. Get familiar with their product, use it on a daily basis.

You will definitely encounter some bugs, errors and can suggest improvements to the product. Also there will be multiple Pull Requests open, do some code reviews and go through the code base. Also try to tackle the issues reported by other members.

Some tips are:

  1. Do code reviews.
  2. Never open Pull Request without asking mentors.
  3. Always create a branch for a particular issue you are working on.
  4. Keep your master branch clean.
  5. Respond to your mentors and fellow contributors promptly, atleast once a day.
  6. Be regular.
  7. Communicate properly within the organisation. Communication and Soft skills also play an important role in selection.

Creating an amazing Proposal

Some of the important points while creating your proposal should be

  1. Abstract
  2. Deliverables
  3. Time-Line for deliverables
  4. Details of the Implementation of the deliverables
  5. A little introduction of yourself, like a resume
  6. Your past contributions to this organisation (links to your code reviews and Pull Requests)
  7. Submit a draft as soon as possible. Don’t wait for the last day.
  8. Ask for review on your proposal by your mentors.
  9. Change your proposal accordingly on the inputs by mentors.

You can view my proposal for OpenMRS for GSoC ’19 here.

Post Submission

It is very important to continue being active and keep contributing to the organisation after submitting your project. An inactive member is considered as a red flag and may ruin your chances of being selected.

Keep on filing new issues, work on your deliverables, do code reviews and make yourself active on their platform.

Remember, your interest, perseverance and a keen interest to learn will put you high on the priority of the mentors. These are some qualities that determine that a student successfully completes his project during the coding time.

After Result Declaration

If you have been successful, a big congrats to you. Keep this elated state of mind until the completion of the project. Various chat groups will be formed that will have fellow students from all the organisations. Introduce yourself there, keep checking for new announcements. Also keep participating in the weekly calls in your organisation, get in touch with other students in your organisation and create a healthy environment.

If you haven’t been selected, don’t let this weigh you down. You still have a very solid understanding of how the organisation works, its culture and overall you will have your contributions to the organisation. This should be the main motto of getting in Open Source. Try to be an active member of the organisation and apply again next year. You will have a massive upper-hand over other participants. Gain more knowledge and skills and prove yourself worthy once again next year.

by Deepak Prasad at May 08, 2019 08:03 PM

May 05, 2019

Ayeshmantha Perera

What is Edge Detection Convolutional Neural Network’s (CNN’s) edge detection.

(Multi-Class image classification step by step guide part 3)

So in the previous story on transfer learning(Transfer Learning) there was a missing part to be covered before proceeding that was edge detection.So what are edges.

So basically edges are sudden changes of discontinuities in an image. Significant transitions in an image are called as edges.Edge detection is the first phase of image recognition. Edge is useful because it marks the boundaries and divides of plane, object or appearance from other places things.An edge consists of pixels with the intensity variations of gray tones which are different from their neighbor pixels.Shape information of an image is enclosed in edges. So as the first step in image recognition we try to find edges of an image

Types of edges

  • Horizontal edges
  • Vertical Edges
  • Diagonal Edges

There’s two approaches for edge detection one is gradient based and second is Laplacian based.

Gradient based is using the first order derivative of the image.The first order derivatives are very sensitive to noise and produce thick edges.

First order derivatives

1. Roberts filtering: diagonal edge gradients, susceptible to fluctations. Gives no information about edge orientation and works best with binary images.
2. Prewitt filter: The Prewitt operator is a discrete differentiation operator which functions similar to the Sobel operator, by computing the gradient for the image intensity function. Makes use of the maximum directional gradient. As compared to Sobel, the Prewitt masks are simpler to implement but are very sensitive to noise.
3. Sobel filter: Detects edges are where the gradient magnitude is high.This makes the Sobel edge detector more sensitive to diagonal edge than horizontal and vertical edges.
Sobel and Prewitt methods are very effectively providing good edge maps.
4. Frei-Chen method: Frei and Chen have adapted the Sobel’s model and proposed a pair of isotropic operator which makes K = SQRT(2) . This makes the gradient for horizontal, vertical, and diagonal edges the same at the edge center. The isotropic smoothed weighting operator proposed by Frei and Chen can easily pick up subtle edge detail and produce thinner edge lines, but it also increase the possibility of erroneously detect noise as real edge points.
5.Kirsch compass kernel: Is a non-linear edge detector that finds the maximum edge strength in a few predetermined directions. Kirsch edge operators have been proposed for image segmentation of mammographic images.
6. Robinson compass filtering: Similar to the Kirsch masks, with mask coefficients of 0, 1, and 2.
Kirsch and Robinson methods require more time for calculation and their results are not better than the ones produced by Sobel and Prewitt methods.
7. Nevatia / Babu: detects edges in various degree increments

In the laplacian method images using second order derivatives.which identifies significant spatial change, an edge is detected. 2nd Order Derivative operators are more sophisticated methods towards automatized edge detection, however, still very noise-sensitive.

So that’s on edge detection.Thank you

by Ayeshmantha Perera at May 05, 2019 06:18 PM

April 29, 2019

Reuben Varghese

OpenMRS Reference Application 2.9.0 released!

It’s a moment of joy for the openmrs community as we announce the long awaited OpenMRS Reference Application 2.9.0 release. Its built on the OpenMRS Platform version 2.1.3 with several bug fixes and new features included.

Please see the release notes for more information. As always, if you find any bugs, feel free to report them in our ticket tracking system.

You may download this release using this link.

Reference Application 2.9.0 has been a great community effort and I would like to congratulate and raise a toast to all the developers, testers and the contributors for their amazing efforts in making this release possible. Kindly accept my sincere appreciation and maintain the same spirit as we save more lives!!!

Reuben Varghese

Release Manager

by Reuben Varghese at April 29, 2019 08:03 PM

April 26, 2019

Deepak Prasad

Implementing Night/Dark Mode to Existing/New Android app

We will not go into details of why we should be implementing night/dark mode. We shall straight dive into details of how to implement this.

Day-Night mode with Icons/Text changing colors with theme.

Step 1

Add a custom theme to styles.xml file.

Here the Base application theme is defined by default or is the old application theme that your app used earlier.

The Custom application theme is using Android’s default DayNight mode as parent and will help us in configuring the Dark/Night Mode.

Step 2

Change theme parameter of each Activity in the Manifest file to AppTheme.DayNight.

Step 3

We have now successfully added Night mode to our app. For the theme to take effect, we need to add the following lines to every Activity’s onResume function:

// for enabling night mode
// for disabling night mode
// for enabling night mode in auto mode
// for enabling night mode while following system settings

Changing Icons’ color with changing theme

There may be some icons which also need to change colors with the change in theme.

Icons inverting colors as per theme

For this we will be using Vector Drawables.

Create a new vector drawable for the existing icon and add attribute android:fillColor as shown below.

Further we can also add a Toggle to change theme in the Settings of the App using SharedPreferences. An example is shown here.

Adding toggle for Night Mode.

Link to CryptoTrack : Playstore

by Deepak Prasad at April 26, 2019 08:23 AM

April 22, 2019

Harisu Fanyui

Algorithm Design A Call For Concern To Software Engineers

Algorithms in its entirety are often misunderstood and misinterpreted by most of the software engineers or developers. Technically every software or program you develop does use an algorithm and in most cases brute-force that is the obvious solution and at times the easiest. In computer science and software engineering, the concern is in solving problems and any problem that needs to be solved requires a solution in a finite amount of time and using the smallest amount of resources as possible.  In this post is the discussion about the importance and need for a software engineer to be able and capable of designing a good algorithm in his or her software development lifetime. This post will also go further to demonstrate on the side effects that you as a developer have without basic knowledge of algorithms,
 the software that you build and the community that uses the software you build.

Importance of good algorithm design.

  1. Algorithm design is important because They make your program fly, by fly we mean the experience your users will perceive when interacting with your program will be amazing. You will also have a reduction in cost(in terms of money and resource ie money you will otherwise use for purchasing high-cost equipment to gain the advantage the efficient algorithm brings
  2. With good algorithm design, you are also certain of the correctness of what your algorithm or program does. You can at any point in time say with certainty what your program is doing and whether it is doing it correctly
  3. You are also going to be able to have an improvement in the efficiency of your program if it is well designed. At this point of efficiency, you can be sure of the time consumptions by your program the memory consumed and the power it consumes. 
As an example let below are three different pseudo code that multiplies two numbers 

function naive(a, b):
x = a
y = b
z = 0
while (x > 0):
z = z + y
x = x - 1
return z
function obvious(a,b):
z = 0
while (a >0)
z += b
return z
function bitwise(a,b):
x = a; y = b
z = 0
while (x > 0):
if x % 2 == 1:
z = z + y
y = y << 1
x = x >> 1
return z
    Generally we know multiplication is continuous adddition. which means
a*b = a+a+a+...+a  btimes
In terms of readability and understanding the first and second algorithm can be straight to the point but the third which does the same thing is a little complex as it involves bitwise manipulation With bigger values the first and second algorithm executes in order of seconds but the third will run in maximum milliseconds meaning it won't even reach 1 second.
The algorithms above can even further be improved to use divide an conquer but as this article was not about analyzing algorithms I will end here with this analysis You can check my next article on the analysis of algorithms for detail explanations of the above algorithms.  So noticing the big difference in the runtime of the two algorithms that do multiplication. it will do you much good to go with the one that runs faster in this case as you benefit from speed.

To the developer/engineer

As a software engineer or developer, Not only does having the skills for developing algorithm important to the software that you build but it has a great impact on your personality and the way you do thins.
  • With this skill, you are going to gain a critical thinking ability which will otherwise won't have have been possible. You will find yourself solving problems you would have termed impossible just simply because you lack the mindset of thinking properly. This can go further to reiterate the reason why big tech companies will need you to go through a type of algorithm in order for you to gain employment with them. This is necessary because a keen look into the world now you notice everything is moving to the hands of the developers so even the lives of others are dependent on the actions and behavior of the software.

  • Algorithm design needs to be considered very highly by developers but its rather unfortunate and is the last thing that most newbies and some developers think of. These developers care less an example of such is someone who goes into web development and for example, using WordPress all he or she cares about is getting the website or whatever he or she wants out there by installing a thousand plugins some of them not even used and so long as he can install it he just pile them up. The resulting software becomes a junk of plugins and libraries That's if the choice of these were not well taken care of.  So it's not just about getting the work done but. Effects of poor algorithm and software design on Humans and society.
  • Good algorithm design spares you to time to carry out maintenance as well as the nightmare of rushing as a result of a phone call or notification due to a system crash or failure.

To society

The disaster caused by this can be enormous to the society since the day to day functioning of the society is entirely becoming dependent on software. A typical example will be 
  1. An inefficient facial recognition software used by the armed forces. This can lead to the software detecting a regular citizen as a criminal this is just for the minor case though there are worst scenarios that lead to death and more environmental disaster 
  2. Airplane crash. A malfunction in the software of an airplane will consequently result in a crash. software sending error signal in respect to airplane results in a crash.

There are even many other challenges that can result due to the poor design of algorithms and software.


The take-home message from this post is that developers and engineers should keep at the forefront of their software development skills the task of always developing even better algorithms and know software is not all about it working but a lot more is entailed. Better knowledge and application of algorithms will change the face of software development and developers as a whole. As a recommendation There are platforms that can shape the way you think, see, program and write code that conforms to algorithm best practices example of those are Hackerrank, Codechef, Kattis Topcoder, etc. As well as knowledge of mathematics will be very useful both of this help you reason and think about problems in a different way.

by Harisu Fanyui ( at April 22, 2019 05:55 AM

April 18, 2019

Ayush Goyal

The article is very nice, just a piece of small advice, try using GitHub Gist or any other service…

The article is very nice, just a piece of small advice, try using GitHub Gist or any other service while adding code snippets, it helps a lot with code readability.

by Ayush Goyal at April 18, 2019 08:31 PM

March 27, 2019

Ayush Goyal

Thank you for such kind words.

Thank you for such kind words. Thats a very good suggestion but I guess mentioning the specific version while installing will be much better.

Also, it is highly recommend to not use the outdated versions.

by Ayush Goyal at March 27, 2019 03:50 PM

March 18, 2019

Deepak Prasad

Firestore Arrays, Lists and Sub-collections

Firestore doesn't support storing sub-collections into Objects as List<Object> nor does it support operations on sub-collections to filter current documents.

Sample Firestore Database

Consider the example in the picture above. It has Orders as collections and each Order needs to have Quotations (from many retailers).

Suppose we need to filter if a certain Retailer (say retailer_one) has submitted a quotation or not. Firestore doesn’t allow to perform queries on subcollections to filter out parent documents.

Also the “quotations” subcollections are not automatically stored in a ArrayList.

Filter Parent Collection using Sub — collections

To perform this operation, we need a to perform some simple hacks and reconstruct our Data.

Consider this scenario : We want to filter if retailerJohn has added a quotation or not to the current order.

We can add a field “hasJohnQuoted” and set it to true whenever John quotes this order.

Also we can create a Firestore Arrays( demonstrated below ) and append to the array all the retailers who have quoted the order.

Firestore Arrays and Maps

To store a Sub-collection, we can use Firestore Arrays and store Maps in them. Consider the following example.

A sample Sub-collection in Array with Maps as elements

Firestore has two Operations on Arrays — arrayUnion and arrayRemove. Below is an example of arrayUnion where a new quotations is created and added to the existing quotations Array.

Here is and example of arrayRemove where an existing quotation is removed from the quotations Array.

I hope this tutorial helps you in some way or other. Feel free to give some feedback.

Thanks for reading.

by Deepak Prasad at March 18, 2019 06:26 PM

February 24, 2019

Deepak Prasad

Firebase Firestore Using View Models and LiveData

Firebase Firestore Using View Models and LiveData (Kotlin, Android)

Here we will see how to use the MVVM architecture to use Firebase Firestore as backend. We will try to operate our Database requests using View Model and a Repository.

Step 1

Add Dependencies.

In your project level gradle file, under buildscript -> dependencies, add Google Services

classpath ''

In your app level gradle file, under dependencies, add Firebase dependencies

// Firebase Core
implementation ''
implementation ''

Step 2

Now we will create a Model. We will try to add different addresses to Firestore. A sample Address Model is given below.

Step 3

Now create the Firebase repository to manage the database.

Now we have created access to saving , getting and deleting addresses in the Firestore database.

Step 4

Create FirestoreViewModel that extends ViewModel. This will store all the data related to Activities and Fragments.

Now we have created the ViewModel for Firestore. We can now call the needed functions from our Activity or Fragment.

Step 5

Call the needed functions from FirestoreViewModel in the following way:

Get FirestoreViewModel in this way:

val firestoreViewModel = ViewModelProviders.of(appContext)

Get all the addresses:

firestoreViewModel.getSavedAddresses().observe(this, Observer { it->
savedAddresses = it


Add a new Address to Firestore


Delete an existing address from Firestore


So, this was a quick way to use ViewModels for Firestore Database operation.

by Deepak Prasad at February 24, 2019 08:56 AM

February 22, 2019

Deepak Prasad

Getting GPS location using FusedLocationProvider and LiveData easily in background (Kotlin…

Getting GPS location using FusedLocationProvider and LiveData easily in background (Kotlin, Android)

Getting GPS location is one of the most important and necessary aspects of developing apps in Android.

For a brief overview, we will be trying to get GPS location in such a way that we do not need to write the boilerplate code every time we try to access the location. Also, we will be using Singleton pattern to save the instance of FusedLocationProvider to avoid it being instantiated every time we try and fetch location.

LiveData will help us observe the location every time an update is received. Also it fully coordinates with the lifecycle of its parent (Activity, Fragments).

Step 1

Add permissions in the manifest.

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

Step 2

Create your LocationUtils class and add an instance variable of FusedLocationProviderClient.

private var fusedLocationProviderClient: FusedLocationProviderClient ?= null

Step 3

Using Singleton pattern, get the instance of the above FusedLocationProviderClient variable.

// using singleton pattern to get the locationProviderClient
fun getInstance(appContext: Context): FusedLocationProviderClient{
if(fusedLocationProviderClient == null)
fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(appContext)
return fusedLocationProviderClient!!

Now we have created the instance of FusedLocationProvider. Only one such instance will exist.

Step 4

Add another instance variable of type MutableLiveData<Location>.

private var location : MutableLiveData<Location> = MutableLiveData()

Create a function that returns the above location variable.

fun getLocation() : LiveData<Location> {
.addOnSuccessListener {loc: Location? ->
location.value = loc


return location

Full Code:

class LocationUtils{

private var fusedLocationProviderClient: FusedLocationProviderClient ?= null
private var location : MutableLiveData<Location> = MutableLiveData()

// using singleton pattern to get the locationProviderClient
fun getInstance(appContext: Context): FusedLocationProviderClient{
if(fusedLocationProviderClient == null)
fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(appContext)
return fusedLocationProviderClient!!

fun getLocation() : LiveData<Location> {
.addOnSuccessListener {loc: Location? ->
location.value = loc


return location


Step 5

Get the location in an Activity or Fragment in the following manner:

LocationUtils().getLocation().observe(this, Observer {loc: Location? ->
location = loc!!
// Yay! location recived. Do location related work here
    Log.i(TAG,"Location: ${location.latitude}  ${location.longitude}")


Therefore, we get our location easliy.

Note: This is my first post on Medium. Forgive me if any errors might have crept in. Feel free to give any feedback .

Thank You for reading.

by Deepak Prasad at February 22, 2019 06:45 PM

February 19, 2019

Ayeshmantha Perera

What is Padding in Convolutional Neural Network’s(CNN’s) padding

(Multi-Class image classification step by step guide part 4)

So what is padding and why padding holds a main role in building the convolution neural net.

So when it come to convolving as we discussed on the previous posts the image will get shrinked and if we take a neural net with 100’s of layers on it.Oh god it will give us a small small image after filtered in the end.

And also if we just take a 3 by 3 filter on top of gray scale image and do the convolving what will happen.So I decided to put an image to make it easy for who ever reads this.

So if you take this gray scale image.The pixel in the corner will only get covers one time but if you take the middle pixel it will get covered more than once basically what does that means is we have more info on that middle pixel so these are the two main downsides

  1. Shrinking outputs
  2. Loosing information on corners of the image

To overcome this we can introduce Padding to an image.So what is padding

It’s an additional layer that we can add to the border of an image.For an example see the figure below there one more layer added to the 4*4 image and now it has converted in to 5*5 image

So now there is more frame that covers the edge pixels of an image cool.More info more accuracy that’s how neural net works so we have more info now we can get more accuracy doneeeeeee.But well apart from that now we are getting an end image that is larger than the original okays now still the shrinking will happen but we can get kind of a good image than going forward like before without the padding.Cool so that’s how padding works.

by Ayeshmantha Perera at February 19, 2019 03:32 AM

January 12, 2019

Ayush Goyal

January 06, 2019

Gayan Weerakutti

Install Unity3D on Linux

I’ve been running Unity on my Debian machine, and I’m pretty amazed by how well everything works, though it is not listed as an officially supported distro. It should also work for any other distro, Ubuntu, Fedora and the like.

The preferred way of installing Unity on Linux is by first installing Unity Hub.

Install & Run Unity Hub on Linux

You can find the Unity Hub setup file in here:

You can also refer to Unity Hub sub-forum in to make sure that you’re downloading the latest available version.

Once downloaded, you may need to give execute permission to the UnityHubSetup.AppImage

cd /path/to/download/dir
sudo chmod +x UnityHubSetup.AppImage

Then run the setup file. Either run it from the terminal or just open the file from a file manager.

Install Unity from Unity Hub

Running Unity Hub

In the Installs section of Unity Hub application, you can choose a preferred version of Unity that you want to install. Unity Hub will automatically download and install it for you. Unity Hub also helps us to easily switch between different versions of Unity.

Unity Crash

If your Unity crashes, most probably your graphics driver is to blame.

If you have an Intel graphic card that is 2007 or newer, try uninstalling xserver-xorg-video-intel Your system will then default to use the builtin modesetting driver instead.

dpkg -l xserver-xorg-video-intel
sudo apt-get purge xserver-xorg-video-intel

If that still not fix your issue, try asking in the forums.

If it’s not a known issue, you could also send a bug report, which will open an issue in Issue Tracker and Unity team will get back to you.

I’ve been running Unity on my Debian machine, and I’m pretty amazed by how well everything works, though it is not listed as an officially supported distro. It should also work for any other distro, Ubuntu, Fedora and the like.

by Gayan Weerakutti at January 06, 2019 05:02 PM

Ridmal Liyanagamge

How to clone a deep object in react-native

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 ) . But when it comes to real devices it don’t work.

const userData = {… reduxState.UserData}

So i was searching for the solution. And this spread operator cannot clone “deep objects”. What i meant by the “deep objects”. Here is one example for Deep object.

example for deep Object.

So what we gonna do ?

I found many alternative from the Internet for this problem. But the the best option is lodash CloneDeep method. :) .It can be very costly option which will take some time to execute. But it can perfectly clone the deep object and help to handle read only objects.(Mainly you work with redux states)

import _ from “lodash”;

Var newObject = _.cloneDeep(deepObj);

newObject will be a exact clone of the deep Object and it will be not equal to the deepObj.

by Ridmal Madushanka at January 06, 2019 01:38 PM

January 01, 2019

Wandji Collins

its a journey of a thousand miles.

I start today,   paying  interest to the open-source field. it’s a Tuesday 1st January, 2019, So I begin this journey looking towards my point of interest. Am happy taking this step. its won’t be easy that i see already. But am not going stop neither will I give up.

Looking forward  to contributing to open-source.

by Wandji Collins at January 01, 2019 02:38 AM

December 15, 2018

Ayeshmantha Perera

Construct HTML fragments as Java objects using Apache Juneau

Construct HTML fragments Atom feeds Swagger documents using Apache Juneau

What is Apache Juneau


Apache Juneau is a set of open source modules for marshaling POJOs to a wide variety of content types using a common framework, and for creating sophisticated self-documenting REST interfaces and microservices quickly and with very little code.Modules of the single cohesive Java ecosystem can be find here

As the definition says the module Apache Juneau MARSHALL is handling core process on marshaling POJOS.A tech guide on this module can be find here,

I will be focusing about the another core module in Apache Juneau which used construct Html fragments as Java objects.This is call as juneau-dto.

This module is a separate core module which can be used as a separate juneau module on you’re Java projects.It has 3 ways introduced to integrate with you’re java projects.

1.Maven Dependency


2. Java Library


3.OSGi Module


It has provided several libraries that allows you to serialize commonly used documents.

  • HTML5
  • Atom
  • Cognos
  • JSON-Schema
  • Swagger 2.0

Usage of HTML5 DTOs to generate HTML5 documents and fragments.

import static org.apache.juneau.dto.html5.HtmlBuilder.*;
Object mainJsp =
input("text").name("first_name").value("apache"), br(),
input("text").name("last_name").value("juneau"), br(),
button("submit", "Submit"),
button("reset", "Reset")
String html = HtmlSerializer.DEFAULT.serialize(mainJsp);


<form action="main.jsp" method="GET">
<input type="text" name="first_name" value="apache"/><br/>
<input type="text" name="last_name" value="juneau"/><br/>
<button type="submit">Submit</button>
<button type="reset">Reset</button>

And not only converting to HTML5 documents.It can serialize HTML5 beans using JsonSerializers to clean JSON objects.

String html =  JsonSerializer.create().simple().sq().build().serialize(mainJsp);



With the use of ATOM DTOs and XML serializer Atom feeds which are developed according to Atom standards can be generated.All Atom feeds that generates are well-formed XML documents with Atom predefined element types.

import static org.apache.juneau.dto.atom.AtomBuilder.*;
Feed feed =
feed("", "Juneau ATOM specification", "2018-12-15T08:52:05Z")
.title("Example apache Juneau feed")
.subtitle(text("html").text("Describes <em>stuff</em> about Juneau"))
link("alternate", "text/html", "")
link("self", "application/atom+xml","http://juneau.apache.")
.rights("Copyright (c) 2016, Apache Foundation")
.authors(new Person("Juneau_Commiter"))
entry(",2013:1.2345", "Juneau ATOM specification snapshot", "2016-01-02T03:04:05Z")
.text("<div><p><i>[Update: Juneau supports ATOM.]</i></p></div>")


<title>Example apache Juneau feed</title>
<link href="" hreflang="en" rel="alternate" type="text/html"/>
<link href="" rel="self" type="application/atom+xml"/>
<rights>Copyright (c) 2016, Apache Foundation</rights>
<subtitle type="html">Describes <em>stuff</em> about Juneau</subtitle>
<title>Juneau ATOM specification snapshot</title>
<content lang="en" base="" type="xhtml"> <div><p><i>[Update: Juneau supports ATOM.]</i></p></div></content>

And another use case is generating Swagger documents.

The following is an example Swagger document from the Swagger website.

import static org.apache.juneau.dto.swagger.SwaggerBuilder.*;
Swagger swagger = swagger()
info("Swagger Petstore", "1.0.0")
.description("This is a sample server Petstore server.")
license("Apache 2.0").url("")
.path("/pet", "post",
.summary("Add a new pet to the store")
.consumes(MediaType.JSON, MediaType.XML)
.produces(MediaType.JSON, MediaType.XML)
parameterInfo("body", "body")
.description("Pet object that needs to be added to the store")
.response(405, responseInfo("Invalid input"))
// Serialize to Swagger/JSON
String swaggerJson = JsonSerializer.DEFAULT_READABLE.serialize(swagger);


"swagger": "2.0",
"info": {
"title": "Swagger Petstore",
"description": "This is a sample server Petstore server.",
"version": "1.0.0",
"termsOfService": "",
"contact": {
"email": ""
"license": {
"name": "Apache 2.0",
"url": ""
"paths": {
"/pet": {
"post": {
"tags": [
"summary": "Add a new pet to the store",
"description": "",
"operationId": "addPet",
"consumes": [
"produces": [
"parameters": [
"in": "body",
"name": "body",
"description": "Pet object that needs to be added to the store",
"required": true
"responses": {
"405": {
"description": "Invalid input"

Like wise juneau-dto module will help you on Constructing Html5 , Swagger and many more.This is a single core module in Apache Juneau.Tech world giants like IBM and Salesforce are using Apache Juneau because of the ability it has as a cohesive framework that allows developers to marshal POJOs (Plain Old Java Objects) and develop REST (Representational State Transfer) microservices and APIs..Since the project is opensource any one can contribute to improve it.



by Ayeshmantha Perera at December 15, 2018 04:38 AM

December 02, 2018

Robby OˈConnor

OpenMRS Worldwide Summit 2015 Wrapup

    I have been around the OpenMRS Community in one form or another since 2008 when Burke Mamlin and Paul Biondich came by the Java IRC channel on freenode to recruit for Google Summer of Code and I was drawn by the fact that I could write code that saved lives. I went on to do the first two of my three Google Summer of Code stints with OpenMRS. My first Google Summer of Code was under Burke Mamlin and Ben Wolfe; my second was under Mike Seaton and Darius Jazayeri. Recently, I am currently Manager of Identity Systems, and also am a member of the OpenMRS Infrastructure Team and am having a blast.

   Three weeks ago (8-14 Dec) I got to meet all of my Google Summer of Code mentors but Ben Wolfe in person for the first time at the first annual OpenMRS Worldwide Summit in Singapore. This wasn't even the highlight. OpenMRS is a special community, one which I have yet to encounter anything similar. I was lucky enough and eternally grateful for the OpenMRS Inc. Travel Grant Program, which covered my hotel costs partially so that I could attend this amazing event.

   I arrived in Singapore, quite tired a little bit after 10:00 PM SGT on 6 December, and after getting through immigration and customs and grabbed my checked bags; I grabbed the shuttle for $9 SGD, which is reasonably cheap. 

  I spent most of the day following sleeping off jet lag, and then ran to the mall to troubleshoot what wound up being a case of PEBKAC with my simcard; and then met up with Michael Downey and Kaweesi  and grabbed some food and then headed for a preview of Wonder Full, an amazing water and light show which is amazing to see, the group of us from the summit as a whole went to see it on Friday, 11 December. One of the things that made me chuckle was the crosswalks telling me to wait for the green man...I saw that and snapped a photo as I was headed back to meet up with Michael Downey:

  I volunteered and helped out with registration and general event logistics such as set-up and breakdown each day, as well as helping out with registration. On Tuesday morning, I helped bring things to the event venue (Singapore Management University). Tuesday-Wednesday (8 Dec to 9 Dec) was tutorials, either day-long or half-day. Thursday-Saturday ( 8-12 Dec) was main Conference, with both formal talks and unconference sessions(more round-table discussion), my favorite of which was a cause which I feel strongly about is the Women in Technology session, which was an amazing session. Notes from the talk can be found in the link above. Hearing about the strategic goals of OpenMRS, as well as the the talks about the OpenMRS Governance, which was amazing. 

Photo by James Arbaugh, via OpenMRS Talk
   The lightning talks were amazing. I originally was not going to give a talk since I did not prepare slides, but last second I typed up some notes and gave a talk trying to recruit more people to mentor for Google Code-In, and I feel extremely passionate about this program. This year and last were by far my favorite years! It's exhilarating to look at the work of these students and just be amazed. We are fostering young open source developers, some as young as 13! I got so many compliments from people saying they loved my lightning talk. I just wish more people gave talks. The ones who did, hit it out of the park.
CV6R1e3WcAIsxGd.jpg (600×800)
 Photo Credit: Jan Flowers, via Twitter

   The after-hours activities were a chance to bond with the awesome community. There was an Informal Group Dinner at Maxwell Food Centre, The Pre-Summit BBQ at the Labrador Nature Reserve, Powerpoint Karaoke at Thoughtworks(I went with the "this is going to go bad" theme and it worked...), Chinatown Food Crawl. We also took a trip to the Marina Bay Sands for Wonder Full and a light show by Gardens By The Bay, which you can't get enough of. I had a way better seat for it this time! The after-hours activities were closed out by a fun trip to Little India, followed by a group dinner for those who went. Afterward, some of us headed to the Mustafa Centre and then met up with a group that were enjoying the beautiful Clark Quay night-life; we wound up closing out the night at Life of Liquor (LoL). The after-hours events gave the community a chance to bond.

Little India group shot (Photo from Mayank Sharma)

Photo Credit Hong Phuc Dang

Photo Credit Hong Phuc Dang

Photo Credit Hong Phuc Dang

Photo Credit Hong Phuc Dang
    On Wednesday, 9 December, Burke, Paul, Mayank and I took a walk to the Funan Tech Mall to get the prize for the scavenger hunt and grabbed lunch there. It was amazing to spend time with such amazing people. 
Mayank, Paul, Burke, and myself (from left to right) (from Mayank Sharma)

   One of my favorite moments was when we waiting for the light show at Gardens By the Bay, Burke spotted a kid with a Rubik's cube, pulled his out and well this was the end result, it was about as awkward and funny as it looks. Photo Credit to Mayank Sharma though, this picture needs to be included somewhere official, it's an epic battle, the kid forfeited, so I guess Burke wins by default? It's one of those you had to be there to appreciate it, but hopefully this still works somewhat. 

Photo Credit to Mayank Sharma

  It is also amazing that Mayank Sharma, Michael Downey, and myself (whom form 3/4 of the OpenMRS Infrastructure Team) were able to be together. Ryan Yates was missing sadly. Would have been pretty awesome to have all four of us.

Photo from Mayank Sharma

    I would like to thank OpenMRS, Inc for the Travel Grant to attend. I would also like to thank Michael Downey for the Korean BBQ on Sunday (12 Dec). Though one thing I'm sad about: I never got to try the infamous Durian, the only thing which doesn't seem to a carry a fine, nobody seems to know what actually happens...This sign was found in the MRT station.

by Robert O'Connor ( at December 02, 2018 09:21 AM

November 05, 2018

Jude Niroshan

How OAuth 2.0 works?

OAuth is a specification and it is being used to Authorization of resources for different outside people. We are using OAuth 2.0 as the standard specification by the time of writing this post. OAuth is a very simple workflow which has defined to allow the facility for the resource owner to share resources in a more controlled manner.

Today, almost all the giants in software industry adhere to this specification so that other software systems can easily share resources in between the system.

OAuth 2.0 is a HTTPS-based protocol which enables a resource owner (the end-user), using a user-agent (typically a browser), lets a client (typically an API consumer) access a protected resource on a resource server (typically an API provider) using credentials stored on an authorization server. Access to the protected resource is authorized by an access token.

Clients are assigned secrets that are shared with the authorization server.

1. Authorization Flows

There are 4 flows available.

1.1. Authorization Code flow

The Authorization Code flow is used when the client is a third-party server or web application, which performs the access to the protected resource.

The client does not have access to the resource owner credentials.

The user-agent connects to a URL hosted by the client. The client redirects the user-agent to the authorization server, including information identifying itself (a client id), the request (scope — the permissions being requested), and a URL pointing back to the client (redirect URL — it is referred to as an URI in the spec though it is always a HTTP URL).

The authorization server authorizes the resource owner, and may perform authentication such as username/password verification, and confirmation of the action requested. On success, it directs the user-agent back to the client through the provided redirect URL, adding an authorization code to the URL.

The redirect URL typically points to a server-side script that requests the access token through a POST to the authorization server. The POST is authenticated by the client secret, and provides the authorization code received as proof that the resource owner has indeed authorized the request. The server responds with the access token and an expiration time in the POST response.

1.2. Implicit Grant flow

The Implicit Grant flow is used when the user-agent will access the protected resource directly, such as in a rich web application or a mobile app. The client secret is not used.

The user-agent connects to a URL on the authorization server. This could either be a direct connection, or through a redirect made from the client. The request contains the client id, the request scope, and the redirect URL. If the authorization server passes the request, it performs a redirect to the redirect URL with the access token and expiration time in the fragment (after the hash #).

While the redirect URL points to the client, code inside the client (that is, the server-side app) does not see it. Instead, the URL may be used to load JavaScript that takes the access token from the URL and uses it. Or, a mobile app can capture the redirect, extract the access token and use it in its code, in which case the URL may just point to static content.

1.3. Resource Owner Password Credentials flow

The resource owner password credentials flow is used when the resource owner trusts the client to get its username and password. The client obtains the credentials through other means that are out of scope, then passes them directly to the authorization server to request an access token. This flow can be used to migrate traditional username/password authentication schemes.

1.4. Client Credentials flow

The client credentials flow obtains the access token purely based on the client shared secret.

2. Access to the Protected Resource

Once the client or user-agent (in the implicit grant flow) has the access token, it may use it to access the protected resource. There are 2 standard ways of sending the credentials, though more can be defined.

2.1. Bearer Token

The access token is should be placed in the Authorization HTTP header, and may only be placed in a POST request body, or the GET URL parameters as a fallback option.

2.2. MAC

A cryptographic MAC (Message Authentication Code) is computed using elements of the request and sent in the Authorization header. The Resource Owner computes and compares the MAC upon receiving the request.

The access token may only be placed in the Authorization HTTP header

3. Refresh Tokens

In the Authorization Code and Resource Owner Credentials flows, the authorization server implementation may choose to issue a refresh token. This refresh token may be used to obtain a new access token without requesting authorization again.

by Jude Niroshan at November 05, 2018 06:09 AM

October 11, 2018

Alexis Duque

PhD Defense Presentation Slides

Slides of my PhD defense “Bidirectional Visible Light Communications for the Internet of Things” are available here: slides

I will share the manuscript very soon.

October 11, 2018 04:44 PM

October 10, 2018

Ayush Goyal

Using a GPS module(neo-7m) with Raspberry Pi 3

Recently, I got an opportunity to work on an awesome project which included hardware and software development. The project was about Tractor Telematics. For starters, we needed to track the location of a tractor in real time. So, we the one and only way for it was to use Raspberry Pi and a GPS module. While trying to make things work, I faced a lot of problems in the configuration and there was no one-stop guide for it. Hence, I decided that I will write a blog about how I did it and what problems I faced along with their solutions.

NOTE: All of these steps were done on a Raspberry Pi 3 model B and ublox neo-7m GPS module but it should work on other models too.

Configuring UART

sudo raspi-config

Select -> Interfacing Options

After selecting Interfacing option, select Serial option to enable UART

Then it will ask for login shell to be accessible over Serial, select No shown as follows.

At the end, it will ask for enabling Hardware Serial port, select Yes,

Finally, our UART is enabled for Serial Communication on RX and TX pin of Raspberry Pi 3.

Then, reboot the Raspberry Pi.

Hardware connections

In the GPS module I have there were total 4 connections to be made as follows:

  1. VCC — 5v(pin 2)
  2. GND — Pi’s ground(pin 6)
  3. RX — Pi’s TX
  4. TX — Pi’s RX

Note that Pin 1 is the one facing the memory card slot and Pin2 is just adjacent to it. Refer to following images for better understanding.

GPIO Pins numbering

Installing GPS Applications

sudo apt-get install gpsd gpsd-clients

Now, run the GPSD client

sudo gpsd /dev/ttyS0 -F /var/run/gpsd.sock

Here, ttyS0 is my serial port where GPS data is received, for other Raspberry Pi models this might be different. So, just replace ‘XXX’ in ttyXXX with appropriate name.

Now, type the following code to check the connections.

cat /dev/ttyS0

You should see a continuous stream of data. It is raw GPS data in NMEA format. If you see something like $GPTXT,01,01,01,NMEA unknown msg*58 a lot then check your serial port configuration. If the ‘echo’ option is enabled that will cause this problem. Just do stty -F /dev/ttyS0 -echo to disable echo then cat the gps serial device and those messages should stop.

Now, after this type cgps and you should see something like below.

After some time the data will be shown here.

If the cat command shows data but you get nothing in cgps at all do the following :

  1. Check if port 2947 is open in firewall.
  2. Open the file /etc/default/gps in sudo with any text editor and change DEVICES=”” to DEVICES=”/dev/ttyS0" and then type sudo systemctl restart gpsd

Note : It may take sometime for GPS module to receive data. So it time or anything else is shown in cgps that means configurations are all ok but module is not receiving GPS signals. So, just wait for sometime.

Some troubleshooting steps if cgps does not get a fix

1. Check GPS data stream

cat /dev/ttyS0

You should see the NMEA stream

2. Check GPS data with gpsmon

gpsmon /dev/ttyS0

It should run properly with the data stream

Note : It first two steps didn’t work, check you connections and configurations properly.

3. Run gpsd in debug mode

sudo gpsd /dev/ttyS0 -N -D3 -F /var/run/gpsd.sock

It should say that it is already running

4. Now type the following lines.

sudo systemctl stop gpsd.socket
sudo systemctl disable gpsd.socket

5. Now, launch gpsd again

sudo gpsd /dev/ttyS0 -F /var/run/gpsd.sock

Now, cgps should get a fix and no timeout.

After all the proper configurations, you need to run sudo gpsd /dev/ttyS0 -F /var/run/gpsd.sock every time the pi is rebooted. If you are using it as an IOT project you might want to automate everything.


Create a file at /etc/rc.local

sudo nano /etc/rc.local

Add following contents to the file

#!/bin/sh -e
sudo gpsd /dev/ttyS0 -F /var/run/gpsd.sock
exit 0

This will run our sudo command on every boot.

Using python to get Latitude and Longitude

I used a simple python script to get latitude and longitude from the gps module.

Here, I print the Latitude and Longitude but you can actually do whatever you like with them and later on make this script to run every time on boot using cron job.

To make a cron job first type crontab -e and in the window that appears write the following command.

@reboot cd /home/pi/ && python

Change the path and file name accordingly.

Small Issue

Now, after everything was setup the system was working pretty nice. But after 2–3 trial runs I found that something was crashing and I was not able to get the coordinates on my web server.

Now, there could be only two problems, either the GPS module is not configuring properly on every startup or my internet connection had some issues on boot. After hours of hit-and-try, and trying several permutations and combinations of different things on the internet I did the following to make it work.

I made a shell script and added the following lines of code to it.

sudo gpsd /dev/ttyS0 -F /var/run/gpsd.sock
stty -F /dev/ttyS0 -echo
sudo systemctl stop gpsd.socket
sudo systemctl disable gpsd.socket
sudo killall gpsd
sudo systemctl stop gpsd.socket
sudo systemctl disable gpsd.socket
sudo gpsd /dev/ttyS0 -F /var/run/gpsd.sock
sleep 10s
nohup python /home/pi/ > pylog.test &

Then I made it an executable.

sudo chmod 755 ./

After added it as cronjob to be executed on every startup and everything ran without any problems. My crontab file looked like this.

@reboot cd /home/pi/ && sh

Note : I know some of the lines in are redundant and may not be necessary but due to time crunch I was not able to further test it and make it more simpler. If you are reading this and have a more optimal foolproof solution kindly let me know in the comments or at .

by Ayush Goyal at October 10, 2018 01:03 PM

October 04, 2018

Alexis Duque

PhD Defense on Monday 9th October

After 3 year of intensive at Rtone and in the AGORA of the CITI Lab, I’m proud to announce that I will defend my PhD thesis “Bidirectional Visible Light Communications for the Internet of Things”.

It will take place on Tuesday October 9th starting at 2PM, at the Amphitheater CHAPPE - Department TC, INSA de Lyon, 6 avenue des arts, Villeurbanne.

You can find an abstract of the thesis and the jury in the following.

The jury will be composed of:

  • Emmanuel CHAPUT, Professeur des Universités, INP Toulouse, Rapporteur
  • Anne JULIEN-VERGONJANNE, Professeur des Universités Univ. Limoges, Rapporteur
  • Josep PARADELLS ASPAS, Professeur UPC, Rapporteur
  • Luc CHASSAGNE, Professeur des Universités UVSQ, Examinateur
  • Valeria LOSCRI, Chargé de Recherche INRIA Lille, Examinateur
  • Hervé RIVANO, Professeur des Universités INSA Lyon, Directeur de thèse
  • Razvan STANICA, Maître de Conférences INSA Lyon, co Directeur de thèse


With the exponential growth of the Internet of Things, people now expect every household appliance to be smart and connected. At the same time, smartphones have become ubiquitous in our daily life. Their continuous performance improvement and their compatibility with a broad range of radio protocols as WiFi, Bluetooth Low Energy (BLE) or NFC make them the most convenient way to interact with these smart objects. However, providing wireless connectivity with BLE or NFC means adding an extra chipset and an antenna, increasing the object size and price. Previous works already have demonstrated the possibility of receiving information through visible light using an unmodified smartphone thanks to its camera. Also, LED-to-LED communication for smart devices like toys has been shown previously. However, past efforts in LED to camera communication for IoT device communication have been limited.

In this work, we design LightIoT, a bidirectional visible-light communication (VLC) system between a low-cost, low-power colored LED that is part of an IoT device and an off-the-shelf smartphone. The IoT device is thus able to send and receive information through its LED, while the smartphone uses its camera to receive data and its flashlight to send information. We implement and experimentally evaluate a LED-to-camera VLC system, designed specifically for small LEDs. The proposed solution exploits the rolling shutter effect of unmodified smartphone cameras and an original decoding algorithm, achieving a throughput of nearly 2 kb/s. Based on the insight gained from an extensive experimental study, we model, for the first time in the literature, the LED-to-camera communication channel. We propose a Markov-modulated Bernoulli process model, which allows us to easily study the performance of different message retransmission strategies. We further exploit this model to implement a simulator for LED-to- Camera communications performance evaluation.

In order to achieve bi-directional communications, we evaluate flashlight-to- LED communications using non-rooted smartphones and small LEDs. With these constraints, our implementation achieves a throughput of 30 bits/second. While limited, this is enough for a feed-back channel coming to support the required redundancy mechanisms. Some of these redundancy mechanisms are based on random linear coding, never tested previously in VLC. Therefore, we design and implement, for the first time in the literature, a pseudo random linear coding scheme especially fitted for line-of-sight LED-to-camera conditions. Experimental evaluation highlights that this type of approach increases the goodput up to twice compared to classical retransmission strategies.

Finally, we compare the energy consumption of LightIoT with the one of a BLE module with similar activity. Our results show that using the LED for communication purposes reduces the energy consumption under a normal usage behavior.

October 04, 2018 10:06 AM

October 03, 2018

Jude Niroshan

What is CSRF Double Submit Cookies Pattern

It’s a type of web application vulnerability. At the most basic level, the reason for a CSRF is that browser’s do not understand how to distinguish if an action was performed deliberately by a user (like say by clicking a button on a form, or clicking a hyperlink etc.) or if the user unknowingly performed the action (like say user visited a page from some domain, say, and sent a request to while the user was already logged into

Now let’s replace above with And let’s assume that when a user, logged into, posts a comment on his wall, there is an HTTP GET request that gets sent, of the form say,

https: //

Now let’s assume that the user, while he is still logged in to, visits a page on Now belongs to an attacker where he has coded the following on

Now as soon as the user’s browser loads the contents of this page on, a request also gets sent to as :

https: //

because the browser tries to render the img tag. To do so it needs to fetch the resource specified in src and hence it sends the above HTTP GET request. So essentially the attacker could actually submit a request to on behalf of the user without him actually knowing this.

Now what could have potentially prevented this attack ?

If only there was some way to identify if the request was made by the user intentionally. So to do this, anti-CSRF token came into the picture. It is just a random, unique string generated by the server ( in our example above) and sent over to the user and set in the browser of the user as a cookie. Now for every request involving some sensitive action (like posting a comment in our facebook example above) the browser will send this random string also along with the request and the server before performing the action would verify if the random string is the one that it had sent to the browser or not.

The idea is that this random string will not be known to the attacker. So even if the attacker creates a img src as shown above, and the user visits, the action (of posting a comment in our example above) will not be performed, because for the action to be performed, apart from the URL, an additional thing is also required, which is the random string, which the attacker does not have.

But setting this random string in a cookie again has a HUGE flaw

Because of the way cookies are designed and the way in which browsers handle cookies, setting this random string (the anti-CSRF token) in the cookie will not serve our purpose. By design, cookies are automatically sent to the server with every request that the client makes to that server (simply put, and details ommited for simplicity. For more details refer : RFC2965)

So, in our example above, the attacker does not really need to know the random string. The posting comment action will still be completed because as soon as the user visits and loads the post comment URL (as explained above) the random anti-CSRF token (present in the cookie) will automatically accompany the request.

So what is the solution then ?

Instead of putting the anti-CSRF token in the cookie, the server ( needs to put it as a hidden parameter in a form and make when the user requests for posting a comment this form (holding the anti-CSRF token) should also be posted.

Now the attacker has no way of performing this sensitive action on behalf of the user (unless he somehow finds out the random anti-CSRF token itself)

Now coming to the problem of login CSRF and double submit cookie

A lot of times websites would protect themselves against CSRF attacks by deploying some form of anti_CSRF token architecture. But a lot of times websites do not care much about protecting their login form against CSRF attacks. Why ? — Because even a login form is vulnerable to CSRF and an attacker tries exploiting it by framing a login request to ( through his domain (, the the user would still need to enter his valid credentials to get loggedinto These credentials are available only with the genuine user and not the attacker and hence the attacker can not frame a successful login request.

So what is the attack opportunity for the attacker here ?

The attacker can create his own account with He now has a valid set of credentials for himself. Now he frames the login request to, with his login credentials, and on his domain ( Now when the user visits the page,, the user is logged into my account. I as an attacked can later see all the activities performed by the user on the account possibly disclosing sensitive info as well (like say friend requests sent if the user chooses to send new friend requests, messages sent to someone, again if the user does so after logging into my account. All of these possibilities depend on how convinced the user is that he has logged into this own account, which again the attacker can take care of by making his own facebook page look as close to the victim’s as possible to con him into believing that it is his account)

So now what is the mitigation technique against this?

It is a double submit cookie that we need now here.

What exactly does this mean

Double submitting cookies is defined as sending a random value in both a cookie and as a request parameter, with the server verifying if the cookie value and request value are equal.

How does it help mitigate the attack ?

As per the implementation principle of a double cookie, when an anonymous user (not logged in user) visits a login page the server sets a cookie with some random string in the user’s browser and also sets the same in a request parameter as well (say a form hidden field). When user submits the login request, these things get submitted with the request — the user credentials, the random string in the hidden form field and the cookie holding the random string (that gets sent automatically of course).

Now an attacker will have access to his own credentials, the random string set by the server in cookie and in the hidden form field for the attacker. When the attacker sends this crafted login request to the user (the victim), and the user tries to make this request, the user is still not logged in and is an anonymous user for the server so far. So the server will set a cookie on the user’s browser with a different (from the attacker’s) random value. Now when the user makes the request for login through the attacker’s crafted link, the request will contain the attacker’s credentials, the attacker’s random string in the hidden form field, but the user’s random string in the cookie (coming from the user’s browser). Now when this request reaches the server, the random strings in the cookie and the hidden form field would not match and thus would be flagged as an exception and handled accordingly.

So this the reason for the the return of the encrypted value with the form as well. Hope it clears the concept.


by Jude Niroshan at October 03, 2018 04:05 AM

September 15, 2018

Alexis Duque

2nd Summer School on Security & Correctness in the IoT


From September 3 to 7, I attended for the second time the Summer School on Security & Correctness in the Internet of Things 2018 organized by IAIK, in Graz, Austria.

This year, the school was collocated with the IoT Security Week.

Top level speakers in the field of security gave presentations about software/hardware attacks and countermeasures: binary exploitation, code reuses/injection, hardware side channels, cache covert channels, formal analysis, lightweight cryptography (LWC), etc.

St Martin

September 15, 2018 04:44 PM

September 10, 2018

Jude Niroshan

What is CSRF Synchronizer Token Pattern?

CSRF or Cross-Site Request Forgery is a well known security attack that is listed in OWASP security risks. CSRF is basically running malicious JavaScript code pieces to a targeted website without the knowledge of the browser user. It is more target centric attack where intruder has to know what s/he wants to perform.

Synchronizer Token Pattern is a very simple concept to mitigate the risk of being attacked through CSRF. In most web applications, servers are using HTTP session objects to identify the logged in users. In this case, session is generated in the server side and pass the session ID to the client. This session ID is most of the time is saved in a client side cookie file.

Because of this session ID is being saved in client side cookie file, if the cookie is not protect with advanced configurations(httponly, samesite, secure, etc), it is possible to access this cookie from another page that has open in the client browser. That is probably in a different browser tab.

It is possible that in JavaScript we can access dynamically create an html form without a UI and submit it to a given endpoint. This way, intruder can even withdraw money from your account without your awareness. You can be happy visiting an intruder web page, but it will internally withdraw money from your fakebank account.

There is a nice StackOverflow question and an answer on Synchronizer Token Pattern.

How is using Synchronizer Token Pattern to prevent CSRF safe?

I have implement how this pattern can avoid CSRF in the below github repository. It analogues with the StackOverflow question.

The tricky part is on 6. point. Legit user has a hidden token which was generated in the server side. There is a mapping between the session ID and this generated CSRF token. Therefore, when we make the 6. withdraw call, server will check whether client has provided that particular CSRF token embedded in the HTML form. End user has no clue that there was a hidden form field in that HTML form.

On the other hand, intruder doesn’t know that there is a CSRF token associated with the session ID. So, when s/he tries to withdraw the money, server will compromise that it is a malicious request.

Note: It is possible to think why in the world that intruder just obtain that particular CSRF token and make the request? Simple answer is, it is because this whole thing happens in someone’s browser. It is not happened in intruder’s premises. Refer to the above Stack Overflow question for more details.

by Jude Niroshan at September 10, 2018 08:39 AM

September 04, 2018

Ayush Goyal

This is really awesome.

This is really awesome. A couple of suggestions, the narration of embedded hyperlinks will be very useful, giving more stress on the headlines to distinguish them from the description will also be helpful and lastly, I feel for the directly written website address skipping the “https://” part will make the listening more engaging.

On the whole great work!

by Ayush Goyal at September 04, 2018 05:37 PM

September 01, 2018

Ayush Goyal

Django redirect with custom context

While working on a recent Django project, I was stuck when I needed to send custom context in redirect request. I googled a lot and still didn’t find any way to do so. Hence I devised my way to do so.

This blog is more of a reminder of how I managed to do so.

Since you are facing this issue, I am assuming you have a basic idea on the working of Django. So, we will not go into details.

Assuming you following two views in your views file.

def view1(request) : 
context = {
return render(request, "../../xyz.html", context=context)
def view2(request) : 
context = {
return render(request, "../../abc.html", context=context)

Now, if you want to redirect to view1 from view2 along with its context, you can modify your functions like this.

def view1(request, newContext={}) : 
context = {
return render(request, "../../xyz.html", context=context)
def view2(request) : 
context = {
response = view1(request, context)
return response

So, what happens here is, since in view1 the newContext parameter is already initialised, the normal calling of it in the Django architecture will not be hampered and the context.update(newContext) has no effect and when view2 calls view1, a response is returned so it can be directly returned from view2.

Note that this will not change the URL.

by Ayush Goyal at September 01, 2018 05:42 PM

August 26, 2018

Dileka Weerasuriya

August 20, 2018

Ayeshmantha Perera

Node.js File Upload What is the BEST Approach

So this is kind of a very common and popular problems some times for developers who are working on image uploads on there day to day programming life.So this was discussed within the past few weeks within our internal team.So I was selecting a one approach and another senior engineer was thinking about another approach and one of my friend was suggesting another approach.So I will take one by one and will see what approach is the best and cost efficient and efficient way of doing the file upload

So the first suggestion :- Convert the image to base64 and save it on mongo db

So yes this can be done and saved in the mongo db.But why am saying it’s bad.Let’s think about a mlab mongo db instance as an example it takes 15$ per month for a 1GB.Okay lets say if one file is 3mb and its around 330 files.

If we have 1000’s of users if they use to save at least one image oh man it will cost us a huge amount.Damn so yes this not the best way for me.

The second suggestion :- Attached hard drive with the server as the image saving location

Hmm.Not a very bad solution when it comes to efficiency and the cost.But let’s say if u have more than one server of the application(For an example if we have 3 ec2 instances connected from load balancer).

So now it will not work well with horizontal scaling.

So the third and best suggestion :- Save the image in a cloud bucket(aws s3,azure file storage,gcloud storage) and retrieve for further reference.

So why we say this is the best solution

  1. Every cloud platform supports and has this bucket concept and easy to upload with the sdk they provide.
  2. Cost effectiveness. $0.023$ per month for a 1GB.
  3. It can be scale at any level no need to worry about file size.
  4. Easy backup’s.
  5. Availability is very high( S3 => 99.999999999%).

Cool so the third solution is the on that I suggest as the best solution.So that’s it for now.Hope u will get something out of this cool

by Ayeshmantha Perera at August 20, 2018 06:35 AM

August 17, 2018

Ridmal Liyanagamge

Google Summer of Code with OpenMRS — Final Report

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) system with no programming knowledge. The Attachments Open-MRS add-on module (in short: ‘Attachments’) enables to view and manage file attachments. With it users (with the appropriate privileges) can upload , view and delete attachments associate with a patient record. Attachments both integrates on OpenMRS Clinician Facing Patient dashboard and Visits & Encounters Patient dashboard.


Main objective of this GSOC program is to enhance Attachments to qualify it for a 2.0 release. So it consist of two main objectives.

  1. Attachments to become 100% RESTful.

See JIRA tickets : ATT-24 , ATT-27

  • Design and implement a reusable Java API. Essentially by implementing the new Attachments Service that helps to fetch attachments based on a set of query parameters.
  • Develop test cases for each method of Attachment Service’s implementation.
  • Extend the existing file upload REST endpoint to have it allow to specify the (clinical) encounter parameter.
  • Implement the search method in Attachment Resource.
  • Develop one lightweight test class(using Mockito mock and spies) to test Attachment Resource’s search method.

2. Segregate Attachment UI to Open Web APP ( research part ).

My mentor and I did discuss the possible approaches to do this, but we decided that there was not enough time to finalise such a large piece of UI code migration and refactoring.

GSoC Contributions:

The descriptions of all contributions can be found in the below blog posts. Flowing Commits are my contributions to Attachments in this GSOC program.

Other Resources:

Mid-Term Presentation :

Weekly Blog posts :

OpenMRS talk thread :

All the things i have been working on from the beginning of the GSOC program are recorded in the OpenMRS Talk threads below.

Further Works:

The segregate of Attachments UI to an Open Web App has not yet started. This will require more design and development time and I hope to continue this work beyond the GSOC program.


Actually this is my first time with GSOC and it was really awesome experience to me. Able to work with top level developers and gain more knowledge with the help of them. The most amazing thing in the GSOC program is that we can get more things we didn’t expected. For example Attachment module is used test driven development for its implementations and because of that i am able to learn and practice test driven development strategies first time.

And i loved every moment i worked in this GSOC program. Most specially i would like to thanks @mksd who help me a lot in this time period. He gave me lot of knowledge , motivate me , Kind to me and always correct my mistakes. He work with very patient and he always allow me to talk anytime to him even he is very busy with other works.I am very glad to meet him in this GSOC program. Also i would like to thank all the others including my backup mentors who helped me in this time period.And I wish to continue my work with this awesome Organization and “ Write code to Save lives”. :-)

by Ridmal Madushanka at August 17, 2018 04:46 PM

Piyush Kundnani

GSoC with OpenMRS Final Evaluation

Hello Everyone! This was the last week of the Google Summer of Codes program and we were supposed to submit the final evaluations containing details of all the work, documentation etc. Below I shall try to give you all an overview of what the project was, how I went about it and what was achieved finally.

The HTML Form Entry module of OpenMRS module family allows people with basic HTML skills to develop forms and enter data into the system via these forms using the OpenMRS UI. The HTML Form Entry module being very old, even predating the REST API, uses a generic HTML Form Submission process to create and edit encounters and obs. There were requirements in recent times where people wanted to be able to submit these same forms using a REST API (each one having their own specific use cases ranging from bulk entry to offline form entry)

Primary Objective

Extend the HTML Form Entry Module to allow submission of HTML forms via RESTful APIs therby Restifying all the current API endpoints.
Develop a proof of concept OWA (Open Web App) allowing basic data entry to submit HTML forms through the API so that the API can be thoroughly tested.

Due to lack of time, only the first objective could be achieved.


The project was all about making the existing HTML form entry module services available over REST. We started with studying about the controllers in the HFE module and tried to figure out the flow of how things integrate with the UI. Later on we decided on what all features are required to have REST access and also decided on the format of the API request and responses. The flow from here on was pretty much learning about spring annotations by reading the openmrs docs and implementing the controllers which internally used the HFE module’s services. There were some blockers when it came to writing tests and figuring out what all tests should be written, and also in setting up the openmrs testing environment. Writing Tests is still under progress and I aim to get it done in the following days. The state of the project as per my knowledge and expectation is that the APIs can be used by simply integrating the module with openmrs but may or may not ensure consistency according to user expectations as extensive testing is still to be done.

Contributions: The github repository for the module can be found at the below link.

Brief documentation of the REST APIs can be found at:

Thoughts on GSoC:

GSoC has been a great learning opportunity for me. Got to learn a lot of new technologies, learnt to read and understand big codebases, etc. OpenSource is the core of the computer science community, development community etc. and more and more people should contribute to it.
Thank you OpenMRS for giving me this opportunity and Special thanks to my mentors for guiding me all the way.
I hope to keep in touch with the community as and when I find time to contribute whenever possible.

A Short Demo explaining how the APIs work:

The project wiki can be found at the below link:

GSoC with OpenMRS Final Evaluation 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 August 17, 2018 07:34 AM

August 16, 2018

Suthagar Kailayapathy

Location Based Access Control — GSoC 2018 with OpenMRS

Google Summer of Code 2018 — Final Report

I am very excited to work with OpenMRS once again through this year Google Summer of Code(GSoC). Yes, I was selected to work on a project called Location Based access control in OpenMRS under the guidance of Daniel Kayiwa.

A little bit about OpenMRS

OpenMRS is an open source platform which enables the design of a customized medical records system without any of the software development experience (although it required medical and system’s analysis knowledge to use the system). OpenMRS is also a community of people working to apply health information technologies to solve problems, primarily in resource-poor environments.

OpenMRS Core is the baseline of the OpenMRS development and other modules are allowed to integrate with OpenMRS Core to expand their services and features. There are multiple distributions around the world based on the OpenMRS platform.

What is Location Based Access Control?

Currently, OpenMRS has user privileges based access control. So the user needs to have the required privilege to access some of the OpenMRS service. Anyway, OpenMRS doesn’t have any proper location control for their services. Even anyone from any location can access the stored data(eg: Patients information, Encounters, etc)in the OpenMRS. Actually, still, they haven’t concerned about the location management inside the OpenMRS. But we should prepare the OpenMRS to support the access control based on the locations. It will add more value to the data security also and accessibility also.

Like the privileges based access control, we decided to implement a Location based Access control system for the OpenMRS. It will manage the access to all services based on the locations. Some implementations want to register the users and patients (the persons also) in certain selected locations. Then access them based on the location that someone has logged in. That way, if someone is logged in a certain location, they should see only those encounters, observations, and patients registered in that location.

Anyway, the user who has multiple locations access (like Admin in our privilege based access control system) should be able to see patients in all locations. We can allocate multiple locations access to the System Developer or System administrator.

Project Plan and Deliverables

As we planned, I have started to work on this project. As the first step, We decided to implement this feature as a separate module which can be attached to any OpenMRS distributions easily. The first phase of this project is planned to carry out through the Google Summer of Code period, and later on, it will be continued with more features.

These are the deliverables from the first phase of this project through the GSoC time,

  • ✅ Assign users to locations on registration
  • ✅ Assign patients to locations on registration
  • ✅ During an encounter, observation, and patient searches, return only those in the logged in location
  • ✅ Ability to move patients from one location to another by an administrator
  • ✅ Ability to assign locations to already existing patients
  • ✅ Ability to assign locations to already existing users
  • ✅ The login screen should not require users to select locations because, on login, you know the location to which a user belongs.
  • ✅ When reports and other tools are run by a user in a certain location, they should include only those patients registered in the logged in location
  • ✅ REST calls while in a certain location should return only those results in the logged in location


I have to work for 12 weeks to complete the goal of Google Summer of Code program with OpenMRS. As the first step, I have worked on the Spring Aspect-Oriented programming(AOP) with OpenMRS which is the core part of our module. We decided to track the OpenMRS major services methods which are dealing with patients, users, persons, encounters, and cohorts to restrict by the locations.

1. Restrict the patients by the locations

The first plan of our project is to restrict the patients by their locations. So I wanted to allow the users to register the patients with the location property which will be used to track them by the locations later. OpenMRS patient dashboard can be customized to include more fields using the app definition properties. So I used this feature to attach a location selector with the Patient Registration dashboard. After this, I worked to bring this feature for the Patient EditSection which can allow users to assign the location to the existing patients. So We have provided a basic implementation to assign the locations for the patients. Then I have worked to restrict the patients by the locations using the AOP techniques. I have added the AOP Advices to track the PatientService methods which are directly dealing with the patient objects.

So as the result,

  1. Super Admin can only access the patients from different locations since he is the only one who responsible for the OpenMRS objects.
  2. Daemon threads also can access the patients from different locations since those are used to track the patients in the background to increase the system usability
  3. The users from Location-1 can only see the patients from the Location-1. They can’t get the information from the Location-2
Customized Patient Dashboard with Patient Location SelectorCustomized Location edit section for the patientsPatient Location Information the Patient Dashboard

2. Restrict the users by the locations

The second phase of this project was to restrict the users by the locations. The ultimate target of this goal is to avoid the location selector from the login screens while logging-in to the OpenMRS. The user registration was done in the OpenMRS AdminUI module, and I can’t make any required changes on that dashboard to assign the locations during the registrations. So we decided to add more feasibility to the user registration dashboard to customize the registration fields using the OpenMRS extension configurations which can easily decouple the modules from the AdminUI. So I worked to implement this feature in the AdminUI module — User registration dashboard, and added support to autosave the field values with the dashboard updates for Person Attributes and User properties (the third party module doesn’t need to handle the update of that field information if it configured as a personAttribute or user property, it will be automatically saved by the Account dashboard itself).

So as the result,

  • Modules can create the extensions to include the custom field to the user registration dashboard(person info section or user info section)
  • Modules can create the separate extensions to include the custom view fragments to view the custom field information.

Adding custom fragments to Manage Account dashboard - Documentation - OpenMRS Wiki

Finally, I have used this feature to include a custom location selector in the user registration dashboard to allow the users for selecting the locations during the registrations. I configured to save that location information as the user property for that respected user.

Customized user registration dashboard with location selectorCustomized user view section with the assigned location

3. Login without location selection

Currently, OpenMRS requires to select the locations during each user logins and that location is kept as a session variable in the web layer for the future usage. Since I have already added the feature to assign the locations to the users by the location properties, It can be able to fetch the user location again from the user property. So no more requirement to select the locations during each login. Finally, I have removed the location selection from the login screen.

So as the results,

  • If the user contains the location user property, the login method will fetch that location as the session location
  • If the user doesn’t contain the location user property(for existing users who haven’t the location user property) will be redirected to select the locations again.
OpenMRS login screen without the location selector

4. Add more restrictions to the objects

So I have almost completed the location assignment part for the patients and users during the registrations. Now the time to add more restrictions for those objects by the location properties. So I wanted to figure out the solutions for,

  • Restrict the encounters and observations by the locations
  • Restrict the OpenMRS Reporting by the locations
  • Restrict the OpenMRS Cohorts by the locations
  • Restrict the OpenMRS REST Service by the locations
  • OpenMRS Data Export feature should only export the information from the logged in location.

So I have worked with my mentor to analyze those scenarios and added solutions to restrict those by the locations.

The user is able to see the Patient — Suthagar in the Inpatient WardThe user couldn’t see the patient — Suthagar in the Isolation Ward

5. Module First Release — v0.1.0-beta

As we completed the first phase of this project, we decided to release the very first beta version of this module for the public usage. You can get the module from the OpenMRS Add-Ons or Bintray using this following link,



Detail module deployment guidelines can be found from this link,

Location Based Access Control - Deployment Steps - Documentation - OpenMRS Wiki

JIRA Tickets and Pull Requests

Location based access control project Link to the OpenMRS JIRA : LBAC

I wanted to work on multiple components in the OpenMRS to address the location based control implementation. I have listed those tickets below,
LBAC — Location Based Access Control
RA — Reference Application
EA — EMR API module
RCM — Reporting Compatibility module

We had a brief discussion about each and every pull requests for the tickets and my mentor reviewed those pull requests as soon as possible to hurry the project implementation. Actually, he worked me to review each and every line of the pull requests to improve the code quality. I was able to learn much about the code quality and the techniques through those pull request reviews.

  • LBAC-1 : Abstract design for the location based access control project.

LBAC-1 Changed the module structure based on the classes by suthagar23 · Pull Request #24 · openmrs/openmrs-module-locationbasedaccess

  • LBAC-2 : Assign users to the locations on registration

LBAC-2 Added implementation to add the locations to the users on registration by suthagar23 · Pull Request #17 · openmrs/openmrs-module-locationbasedaccess

  • LBAC-3 : Assign patients to locations on registration

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

  • LBAC-4 : Create basic module structure for the project

Created new module for Location based access control project by suthagar23 · Pull Request #5 · openmrs/openmrs-module-locationbasedaccess

  • LBAC-5 : Allow to edit the patient’s locations through the patient dashboard

LBAC-5 Added implementation to edit the patient's locations though patient dashboard by suthagar23 · Pull Request #8 · openmrs/openmrs-module-locationbasedaccess

  • LBAC-7 : Select the session location as default to the fragment location selector

LBAC-7 Added fix to select the session locaion in the location selector by suthagar23 · Pull Request #9 · openmrs/openmrs-module-locationbasedaccess

  • LBAC-8 : Failed to filer the patients who listed in the findPatients page before searching

LBAC-8 Fixed to restrict the patients on findPatients initial view by suthagar23 · Pull Request #10 · openmrs/openmrs-module-locationbasedaccess

  • LBAC-9 : Failed to restrict the patient by location when searched using the UUID

LBAC-9 Added AOP Advice to getPatientByUuid method in the PatientService by suthagar23 · Pull Request #11 · openmrs/openmrs-module-locationbasedaccess

  • LBAC-10 : Failed to get the location property from the Daemon thread user

LBAC-10 Added exception for Daemon thread user to access the methods covered with AOP Advices by suthagar23 · Pull Request #13 · openmrs/openmrs-module-locationbasedaccess

  • LBAC-11 : Allow system administrator to access all the patients in the system

LBAC-12 Added fix to show the patient location in the patient dashboard by suthagar23 · Pull Request #15 · openmrs/openmrs-module-locationbasedaccess

  • LBAC-12 : Indicate the patient location information in the patient dashboard

LBAC-12 Added fix to show the patient location in the patient dashboard by suthagar23 · Pull Request #15 · openmrs/openmrs-module-locationbasedaccess

  • LBAC-13 : Create RefApp Location Global property while starting the module to change the login screen

LBAC-13 Added implementation to create RefApp location glopal property by suthagar23 · Pull Request #19 · openmrs/openmrs-module-locationbasedaccess

  • LBAC-14 : Add restrictions to the PersonService methods to restrict them by the locations

LBAC-14 Added restrictions to the PersonService methods to restrict them by the locations by suthagar23 · Pull Request #20 · openmrs/openmrs-module-locationbasedaccess

  • LBAC-15 : Add restrictions to the UserService methods to restrict them by the location

LBAC-15 Added restrictions to the UserService methods to restrict them by the location by suthagar23 · Pull Request #22 · openmrs/openmrs-module-locationbasedaccess

  • LBAC-16 : Failed to restrict the encounters of the patients from other locations

LBAC-16 Added implementation to restrict the encounters of the patients from other locations by suthagar23 · Pull Request #23 · openmrs/openmrs-module-locationbasedaccess

  • RA-1503 : [AppUI] Store the session location information into the UserContext to extend the API usage

RA-1503 Added implementation to store the session location in userContext by suthagar23 · Pull Request #19 · openmrs/openmrs-module-appui

  • RA-1511 : [Registration App]Allow users to customize the info message while editing the patients through section

RA-1511 Added fix to support the custom fragment info message for editSection by suthagar23 · Pull Request #33 · openmrs/openmrs-module-registrationapp

  • EA-138 : Failed to load all the patients if one patient is missing in the lastViewedPatient list.
  • RA-1513 : [Admin UI] Add new account/Edit account dashboards should allow the extensions to add the custom fragments to the dashboard

RA-1513 Added support to allow the extensions to add the custom fragments to the Manage Account dashboard by suthagar23 · Pull Request #44 · openmrs/openmrs-module-adminui

  • RA-1516 : [Reference Application] Add support to select the location from the userProperty in the Login Screen

RA-1516 Added support to select the location from the userProperty in the Login Screen by suthagar23 · Pull Request #47 · openmrs/openmrs-module-referenceapplication

  • RCM-108 : Add restrictions to the ReportService methods to restrict them by the location

LBAC-17 Added restrictions to the ReportService methods to restrict them by the location by suthagar23 · Pull Request #25 · openmrs/openmrs-module-locationbasedaccess

  • RCM-109 : Need to add patient verification to return Cohorts objects for the serviceMethods

RCM-109 Added patient verification to return Cohorts objects for the serviceMethods by suthagar23 · Pull Request #39 · openmrs/openmrs-module-reportingcompatibility

Weekly Reports and Presentation

This is the mid-term presentation for OpenMRS about the project. I have added some demonstrations about the project in this video.

Weekly Reports are listed below,

  1. Week-1 : Introduction to Location Based Access Control
  2. Week-2 : Aspect Oriented Programming (AOP)
  3. Week-3 : Customizing the OpenMRS Patient Dashboard with Access Location Information
  4. Week-4 : Location based access control for patients
  5. Week-5 : First Evaluations — GSoC 2018
  6. Week-6 : Touching the Target of Phase — 1 for Location Based access control to the Patients
  7. Week-7 : Adding restrictions to the users to view the patient without location
  8. Week-8 : Allow users to edit the patient location through the patient dashboard
  9. Week-9 : Second Evaluations — GSoC 2018
  10. Week-10 : Assign Locations to the Users through the Location Based Access Control Module — OpenMRS
  11. Week-11 : Say Goodbye to OpenMRS login location selection
  12. Week-12 : Adding more location restrictions to the OpenMRS Services — Location Based Access Control

Learning through the GSoC

Not like last, This time I was able to dive more into the OpenMRS. Yes, I had a chance to make a new module for OpenMRS this time. I have worked with Java, Spring, and Angular during the project time, and got a lot of experience for the better programming and about the quality of the code. I would like to thank my awesome mentor Daniel Kayiwa who helped me a lot during the last three months. I never felt about the remove working during the GSoC time, Since I was able to get the reply for each questions and discussions quickly from my mentor.

The OpenMRS community also helped me a lot to clarify my problems and issues during the development time in the multiple components of OpenMRS.

Again a change to…. Write Code, Save Lives….!

by Kailayapathy Suthagar at August 16, 2018 04:20 PM

August 14, 2018

Gayan Weerakutti

Recovering corrupted NTFS partitions in a Linux machine

What if my partition is not showing up or gone missing?

In that case, TestDisk could help. It is a disk utility designed to help people recover their lost partitions.

To install it, here in my case on Debian, I’ll do

$ sudo apt-get install testdisk
$ testdisk

TestDisk has a QUICK SEARCH option which can search and list all your missing partitions if there’s any. Most probably your missing partitions should have appeared by now. If not, try running a DEEPER SEARCH. Once it found any, use the WRITE option of TestDisk which will re-write the partition table for you.

Restart your computer and your missing partitions should now show up.

I won’t go into detail. For a more thorough guide, follow the Step By Step guide from the official Wiki.

How to fix when my NTFS goes RAW?

It’s better to use Windows utilities when it comes to dealing with NTFS.

  1. Boot into a Windows Recovery Disk.
  2. Then go into ‘System Recovery Options’ menu.
  3. Open the command prompt window.
  4. Use one or more of the following commands to find out the label of your corrupted partition.

     diskpart list disk
     diskpart select disk
     diskpart list volumes
  5. Once done exit from diskpart and run

     chkdsk /f /r D:
     where D: is the drive letter of the corrupted partition. 

If you have got better solutions, let us know in the comment section.

What if my partition is not showing up or gone missing?

by Gayan Weerakutti at August 14, 2018 05:12 AM