Week 8 Updates

Hello everyone,

This week I have worked on following

  • Updated the README with the instructions as how to install the atlas server locally.
  • Written the SQL script files for the DB on a Gist and shared it with instructions.
  • Made to get the lock symbol on the edit info window of the bubble.
  • Scrum meets.


OpenMRS ID is the system of user management used by the OpenMRS Community. User accounts are managed and created using the OpenMRS ID Dashboard, a web app written in Node.js. Data model is built around LDAP user object and stored on an OpenLDAP server. In order to support unified authentication for all OpenMRS sites and external services, ID Dashboard also provides SSO, OAuth EndPoints.

For Atlas, we use the SSO Endpoints provided by the OpenMRS ID.

So.. What is SSO ?

SSO– Single Sign On authentication of a user with which the user enter his credentials only once to access a group related systems.

How we use it in Atlas ?

We use the multipass strategy of SSO to get the user authenticated to Atlas. For more details into how multipass actually works.. head to this LINK .

In Atlas, we need not encode the user details into AES encrypted JSON –that is done by the OpenMRS ID but we need to decode the encrypted JSON and use the details as we need it.

I use this Library for Decoding .


Shekhar 🙂


Week#7 Legend for OpenMRS Atlas

Hello everyone,

Updates for this week regarding the project.

  • Since, the previous I am not entirely done with the frontend part, this week -I have invested in completing it and I am done with the same.
  • Got the legend for the atlas up and now I can easily switch between the types, versions and distro options from the controller on the atlas.
  • The markers are up from the previous week.
  • Gained some knowledge regarding the SSO authentication and multi-pass.
  • Commits for this week : Link .

Coming weeks

  • Will be working on authentication part, using the multi-pass authentication(SSO) against the openmrsID.
  • Get the RSS feed consistent.
  • Atlas cronjob (screen-captures) using the PhantomJS.
  • Make sure the REST URI are consistent with the module and updates from the module.


Shekhar 🙂

Week #6 Playing with JQuery

Hello everyone,

This week, I started with getting the map show up when the app runs with the rest URI’s I’ve written in node, but surprisingly that didn’t happen as expected so I have to run through the code related to the frontend part and figured out a few points as how the frontend was designed.

  • All the code in the front end is just simple JavaScript using AJAX requests with Jquery using a gmap3 plugin for google maps API.
  • So up till now I am able to show the map on the browser and markers showing up on them
  • The view files which are  a part of backend use the blade template engine in which we have the PHP code partially inserted, and the worst part was to remove all the PHP code in view file and replace them with corresponding JavaScript.
  • The view files that I use right now are .ejs which are relatively very easy to understand and write

Objectives yet to achieve and plan coming weeks

  • Probably it may take a few days to come up with the markers and Legend/Distributions show up on the map.
  • Start the authentication part with the help of the community.



Week#5- Exposing REST Resources and Midterm


Hello Everyone,

This week, I exposed the REST resources of OpenMRS Atlas using Node, Coming to the timeline, I have almost accomplished what I’ve planned earlier this month.

Some of the key Resource and routes for accessing them are



  1. Distributions
    • GET /distributions : Response is a JSON object with all the type of distributions.
  2. MarkerSites
    • GET /markersites : Response is a JSON object with all the markers available in the database
    • GET / marker/:id : Get a specific marker with UUID parameter.
    • GET /markers : This route will respond with a JSON object with a group of markers of a given type and version as parameters in the URI.
    • POST /marker : Creates a new marker on the Atlas.
    • POST /marker/:id : to update the specific marker.

MidTerm Evaluation

I have completed the midterm evaluation of my mentor earlier this week and I’ve almost achieved what I have planned in the timeline .

Yet to achieve/plan for post-midterm

Hopefully, the following are the key things I’ll be working until the completion of GSoC.

  • Consistent REST API.
  • Get the UI done in a week(probably by the end of June).
  • Authentication against OpenMRS ID .
  • Adding functionalities to support arbitrary metric from the client.
  • Compatibility to use the atlas through the module.
  • Release the Atlas 3.0



Shekhar 🙂


REST End Points and Existing code

Hello everyone,

All this week, I was constantly looking at the PHP code and figuring out some of the rest end points which I am gonna rewrite into node.

So my updates this week are as follows

  1. Working on REST URI in the node app.
  2. voraciously read and learnt some PHP laravel concepts.
  3. Added favicon and the title for the app.
  4. At last, Learnt a lot this week

commits this week : Link




The favicon for OpenMRS Atlas using express

Hello everyone,

Hope you all are doing well and I’ll explain how I made a favicon show up successfully on my browser after an hour of search.

Currently, I am working on building a node app using express with restful service. So this post will explain how I made a favicon show up in the browser using the features of the express framework.

Initially, I want to brag a bit about the express framework. It is a lightweight node.js web application framework which is currently holding huge recommendation from the node.js community if one wants to build a web app presenting rest services. It has 25750 stars and 4800 forks as I write this.

Some useful resources for express framework

GitHub : Link

How I have done it 

  • Initially, I recommend you to take the code generated by the express generator module (google how u can get the express generator installed locally )
  • If u generate the code using express generator then all u have to do is jus uncomment the following code which u get by default.

app.use(favicon(path.join(‘public’, ‘images’,’favicon.ico’)));

in the above line we use path and favicon dependencies which come by default if u have used the express generator.

if not you have to do the following

var path = require(path);

var favicon = require(serve-favicon);


app.use(favicon(path.join(public, images,favicon.ico)));


you’ll have to place the favicon.ico file in the public/images directory 🙂

For any queries ask in #express , #nodejs channel via IRC. I am sure they’ll help you.


Thank you




Week#3 Updates and REST API

Hello everyone,

This week I was very busy doing following tasks

  • Figured out a little part of the API for the existing Laravel framework and started designing it.
  • Committed little bit of code which I will develop into an app running in the coming weeks(hopefully).
  • Attended scrum meets.
  • Updated the mentors through the call.
  • Relatively it was a huge learning experience and due to which I am a bit behind the schedule.

I would like to explain a bit about REST

REST : Representational state transfer, In my terms if I could put it in one line, it is a renaissance in software industry which came along with web 2.0

Some terms which are useful in understanding rest are 

  • API server: main REST application serving the API, in this case, written in PHP.
  • API endpoint: a backend “method” which the client communicates with to perform an action and produce results.
  • API endpoint URL: URL through which the backend system is accessible to the world.
  • API token: a unique identifier passed via HTTP headers or cookies from which the user can be identified.
  • App: client application which will communicate with the REST application via API endpoints. In this article we will assume that it is web based (either desktop or mobile), and so it is written in JavaScript.

Currently I am going to design the API and write the specifications in swagger specifications and generate the server side code and tweak it accordingly to make it work.

Finally submitted the feedback, little bit nervous about the coming mid-term evaluation. 🙂

Commits of this week : Link

Thanks for reading  🙂