FOSS based Mobile Solutions : Deliver Medical Facilities to Remote Areas

Following is the article that I wrote for Linux For You (July, 2012 Edition) . This article is released under CC by SA by Linux for You.

Foss based Mobile Solutions : Deliver Medical Facilities to Remote Areas

Sometime back mobile were considered only a device used for making/receiving call’s or sms. In the last several year the number of people using mobile phone have exploded. Now, mobile is a very well connected network which now connect people all across the globe. In the last few years healthcare industry has realized untapped potential that lies in beneath these mobiles. Things like crowdsorcing and crowdmapping using mobile for working out plan for healthcare support after disaster is used frequently.

Its is something that is becoming more and more important in public health. Earlier Google and Frontline SMS had collaborated during the Haiti post earthquake disaster relief efforts and used mobile technology to make health care workers aware of public health issues on the ground – Ushahidi was there, helping translate text messages and tweets to data on a map.

This article is intended for Doctors / Service providers in healthcare systems / people interested in leveraging benefit of open source application for public healthcare infrastructure.

In this article we will explore around SMS for Life, Ushahidi and SwiftRiver .

Before going into these lets first see what crowdmapping actually is. After an event – whether it be post disaster relief, or for any public health crisis – anyone can send a message related to public health to a SMS short code, or send a tweet. The message needs to contain the relevant public health info, along with a location. It can then be translated to data on a map, allowing public health workers to efficiently allocate resources in real time. These real time online interactive maps are called Crowdmapping. Once this information is collected, volunteers collaborate over the internet to put each post onto a map, which is updated second by second. This lets on-the-ground officials locate people with the most critical needs and deliver medical and humanitarian relief more quickly and efficiently.

SMS for Life

First-line malaria medication is needed within the first 24 to 48 hours after symptoms to save the lives of children under 5, and stock-outs are such a common problem, up-to-date information on supply levels is critical. SMS for Life is a project to track the supply levels of malaria medication in hospitals and clinics in Africa. Health workers send weekly text messages to report on their supply levels, and the data is collected and displayed on a map. District medical officers can then view up-to-date status of facilities in their district, and use the information to make forecasts and plan shipments.
The SMS for Life Map Viewer is open source, under the Apache 2.0 license.
It is a solution to the longstanding problem of stock-outs at the remote health facility level.
Maintaining adequate supplies of anti-malarial medicines at the health facility level in rural sub-Saharan Africa is a major barrier to effective management of the disease. Lack of visibility of anti-malarial stock levels at the health facility level is an important contributor to this problem.
The SMS for Life pilot provided visibility of anti-malarial stock levels to support more efficient stock management using simple and widely available SMS technology, via a public-private partnership model that worked highly effectively. The SMS for Life system has the potential to alleviate restricted availability of anti-malarial drugs or other medicines in rural or under-resourced areas.
Overall, the SMS for Life system was built to be a generic and highly scalable solution that can be leveraged to support any medicine or product, and can be implemented in any country with minimal tailoring. Additionally the system could also be utilized for disease surveillance.
The data captured through the SMS stock count messages was available through a secure reporting website. The website was then accessed via the internet on a computer or a Blackberry or other smart mobile phone. Access to the website was granted through a unique User ID and password allocated at the group level .

How does SMS for life work

“SMS for Life” will automatically send text messages to all health facilities on a weekly basis asking for their current stock of medicines. The responses will be collected and stored centrally on a website and will generate the following types of reporting:
Display of the stock situation by health facility at country and district levels
Alerts sent to the district or central stores will provide immediately information on stock-outs
Query and reporting of stocks by health facility, district, region, zone and calculate average weekly usage by health facility etc.
Early warning of malaria outbreaks, e.g. highlight when there is a sharp rise in weekly usage in a number of closely located health facilities.
The ‘SMS for Life’ Pilot was launched on 21 September 2009, in Tanzania. The project is piloted in the 3 districts of Lindi Rural, Ulanga and Kigoma, at a total of 155 public health facilities. The pilot was ran for five months and terminated in February 2010.
What is Ushahidi

Ushahidi is an open-source crowd-sourcing platform that can be used to collate and map information gathered from the public via email, SMS, twitter, etc. It has been used around the world to map or monitor incidents such as election violence, earthquakes in several crisis situations around the world from.

The Ushahidi platform is built on the Kohana web framework. It includes built-in support for Nexmo wholesale SMS API and Clickatell SMS gateways. Ushahidi provides the option of using OpenStreetMap maps in its user interface, but requires the Google Maps API for geocoding.

Ushahidi currently has an Android and Windows Mobile App, and plans on releasing an iPhone app later this year. Although apps aren’t required for Crowdmapping (SMS makes most sense in places such as Haiti) – smartphones make the use of Ushahidi significantly more powerful. Allowing automatic GPS and pictures to be loaded. The use of smartphone technology for Ushahidi in a public health setting would be something health care workers might be suited for – by being given Android phones to provide rich data.

How does Ushahidi work
Once and Ushahidi instance is setup, messages can be sent in via email, SMS, twitter or directly on the instances website. The messages are verified by an administrator and once a message is approved it is published and the location of the incident is displayed on a map. Incidents can be categorized. In this way, a visual display of incidents and categories can be built.

Ushahidi enables information to be gathered from the public through a variety of channels. It can be setup relatively quickly and supports several languages.

SwiftRiver (platform consisting of APIs) for data gathering of extracting useful information.

SwiftRiver is a platform that helps people make sense of a lot of information in a short amount of time. In practice, SwiftRiver enables the filtering and verification of real-time data from channels like Twitter, SMS, Email and RSS feeds. Its is an API ecosystem.

1. It helps to curate real-time data and analysis on any topic or interest relevant to you or your organization.

2. It helps users discover nascent relationships and trends in data sets that may appear to be unrelated.

3. It can be used to setup streams that search for mentions of your brand or product online and manage social media campaigns after disasters (e.g. Twitter, SMS, email) from one dashboard.

4. SwiftRiver adds context to content using semantic analysis. Auto-categorize and classify email, twitter, text messages or news articles based on keywords.

References

1. SMS for Life : http://www.rollbackmalaria.org/psm/smsWhatIsIt.html
2. Ushahidi : http://ushahidi.com/products/ushahidi-platform
3. SwiftRiver : http://ushahidi.com/products/swiftriver-platform

Write Modules, Save Lives – Part 1

Following is the article on OpenMRS module development that I wrote for Linux For You (July, 2012 Edition) . This article is released under CC by SA by Linux for You.

OpenMRS, a widely used Electronic Medical Record system, is a community-developed, open-source, and enterprise-grade platform. Its core is very thin, and almost every functionality is provided through pluggable modules. It’s robust enough for a nationwide health-care system, and nimble enough for a field-based clinic. This article series will cover how to do OpenMRS module development, and is aimed at J2EE developers, and people who want to contribute to OpenMRS.

A lot of OpenMRS modules exist, and the list is constantly increasing. A detailed list is available at https://modules.openmrs.org/modules/. OpenMRS offers functionality to directly install/update modules through a Web interface—on the fly, without restarting Tomcat.

This first article in this series will cover the basics of the OpenMRS architecture and how to install, update, stop and start a module in OpenMRS. The OpenMRS is built on the Spring and Hibernate Stack and uses MySQL as the database.

Basic architecture

Figure 1: Typical architecture of the OpenMRS stack

The components are:

  • Spring: An application development framework for developing MVC architecture applications.

  • POJO: Plain Old Java Object.

  • Hibernate: The Java persistence framework project, performs powerful object-relational mapping, and queries databases using HQL and SQL.

  • DAO: Direct Access Object

  • Liquibase: Database-independent library for tracking, managing and applying database changes.

An interesting fact about OpenMRS modules is that they are like mini subsystems that can not only communicate with OpenMRS core services, but can also have their own services and schema that can be used by other modules. This makes modules flexible enough to be independent of the system, and robust enough to be dependent on each other, if required.

Module installation

Note: Installing modules through the Web interface is disabled by default (for security purposes). To enable it, set the ‘module.allow_web_admin‘ runtime property to true and restart the application.

  1. Download the module to the local filesystem.

  2. Go to the Manage Module page on the administration page, then click Add or Upgrade Module.

  3. After this, select the .omod module file you downloaded, and click Upload.

  4. The module will be installed without restarting the server. Note that each time an action is taken on a module, the OpenMRS context is restarted. When a module is loaded, database changes in Liquibase that will be required by the module (if any) are applied to the database.

The module is now accessible to everyone privileged to use it. Modules can have granular privileges i.e. any specific set of roles as required by the module.

Note: There are other ways of installing modules, like directly searching the OpenMRS modules repository and installing directly from the repository—or dropping the .omod file in the defined module repository folder.

Module start/stop

Go to the OpenMRS module management page and click the red button to stop it, or the green button to start it. During this, no database changes made by the module are lost; only the OpenMRS context is restarted, and the module is started or stopped.

Module updates

You can check for updates to modules by clicking the Check For Update button on the Manage Modules page. You can also upload a newer version of the module through the Web interface, or directly dump the module file to the OpenMRS module repository.

On an update, first the old module is removed. After that, database changes from the previous version to the newer version (i.e. with different IDs) are applied to the database. Then the module is loaded.

Module deletion

To delete a module, in the module management page, click the grey icon next to the module you want to delete. Any database changes done by the module are not deleted. The OpenMRS context will be restarted after removal of the module from the module repository folder.

References

  • List of OpenMRS sites: http://openmrs.org/about/locations/

  • OpenMRS module repository: http://modules.openmrs.org/

  • Most downloaded modules: https://modules.openmrs.org/modules/stats.jsp

RDBMS vs NOSQL for Data Warehouse

According to the recent IBM research, the 90% of the data that exist on this planet has been created in last two years. We are creating everyday around 2.5 quintillion bytes of data . Data that is coming from everywhere and everything that we do. From doing bank transaction to social networking to social media, every moment we are making this data grow. Bigger , bigger and even more bigger everyday. Now, extracting information out of this data is also becoming interesting. For ages Codd’s twelve rules are a set of thirteen rules (numbered zero to twelve) proposed by Edgar F. Codd, a pioneer of the relational model for databases, designed to define what is required from a database management system in order for it to be considered relational are NO more required for a lot of application of modern web. Because these rules have been written assuming databases to be Atomic , Consistent , isolation and Durable. Now, we need database that can be V3, the new rule of modern databases :

1. V1 : Volume of data
1. Database should be capable enough to handle the large volume of data starting from several terabytes to several pentabytes.

2. V2 : Velocity : Velocity of data
1. The database should be able to store data without any failure even if the data is coming in with high velocity. The database should be good enough to handle data coming at a speed ranging from several MB per second to several GB per seconds.

3. V3 : Variety of Data
1. The database should be able to handle a wide variety of data. It can be primitive database or can be a complex JSON or any image, it needs to be equally good in handling all type of data.

Over and above these V3 modern database should be easy to scale almost to infinity. But the big question is how to make this ACID to V3 transaction. The question is more important, because sometimes application need to be ACIDic rather then V3idc because :
1. Some application need to be accurate about the time of data arrival, like banks, ticket booking website etc.
2. Some application are more concerned about the velocity at which data is being written to the database like social networking website. The data timestamp does matter much, but data need to be updated faster.
3. Some application want faster access to data and won’t bother about frequent update of database.

So, V3 database are good for you, if you need your database to be more fast at loading / pulling data, i.e. read/write on database are more frequent then the update then you need a database that is following v3 principal. On the other hand if you are developing a application which to more frequent in update then read/write, then ACID based database is more better to use.

Here is a short analysis of performance of MongoDB (NoSQL database) and MySQL (Relational Database) on Debain 64 Bit OS powered with Intel i3 processor with some sample data.

Red : MongoDB
Blue : MySQL

Red : MongoDB
Blue : MySQL

Red : MongoDB
Blue : MySQL

Green : MongoDB
Blue : MySQL

Red : MongoDB
Blue : MySQL

We can see that when it comes to insert and update operation then MongoDB is way faster then MySQL thats why it is sometime more apt for data warehouse, where we generally only insert and read data, rather then any data updates.

Sweet words of Evangelism

Though I am no more a student these days to apply for GSoC, but its feel great helping others.
———- Forwarded message ———-
From: Harsha Siriwardena
Date: Tue, Apr 24, 2012 at 2:07 AM
Subject: Thank you so much Gaurav
To: Gaurav Paliwal
Hi Gaurav,Thank you so much Gaurav, I am really happy today.. 🙂 🙂 🙂
I will never forget your helps to come up this much so far Gaurav.

Thanks lot again.

Regards,
Harsha

————-

———- Forwarded message ———-
From: Amandeep Singh
Date: Tue, Apr 24, 2012 at 5:32 PM
Subject: Thank you
To: Gaurav Paliwal
Hi,
As you might know, my proposal for GSoC for KDE project has been selected this year. Its really amazing.
Also I think this year around 3 students from USIT have been selected, which is really great.
I would like to thank you for guiding and motivating me all along. It really helped me a lot.


Aman
irc: dedman @ freenode.net
blog: amanonit.blogspot.com

FF4 release party #Manav_Rachna

Today on 15 April 2011, I went to the Firefox4 release party in Manav Rachna International University . Prashant was the main person behind this wonderful firefox4 release party event. Me and Narendra reached the college around 11 am.The crowd was electrifying as well as very enthusiastic. First Prashant has given an talk about the firefox4 and new features of firefox4. After that their was a web quiz and Mozilla goodies was given to those who have answered the question. Then it was my talk on FOSS for Academic Institutions which can be found here : http://blog.gauravpaliwal.com/foss-for-college-infrastructure .After their there was cake cutting ceremony and snacks party.Then Narendra discussed various aspects of FOSS in details and student clarified their doubts.

Media_httpgauravpaliw_ljfjt

At 3:30 pm event was over then four of us (me , Narendra , Prashant and another person whose name I don’t remember ) have a great discussion session for more then 2 hours outside the college.