Saturday, June 29, 2013

2nd Week at OpenMRS

It has been a two weeks gone in the GSoC coding period. Time running really fast. This week we had a GSoC project introduction session in the OpenMRS. We have to give a short introduction about out project in the OpenMRS weekly development forum.It has been a wonderful experience for me to give a online presentation through Adobe Connect. There are GSoC interns all around the world in the OpenMRS. It always good to know them and build a friendship each other.

My primary mentor Jeremy Keiper always guide me  with the project. This week I have setup my module.

In a openmrs module, there are two major packages are inside a openmrs module. They are known as "api" and the "omod". Module is more like a web application. "api" packages is the location which module contains non-web java classes. Mostly "api" package contains, data access classes of hibernate and spring bean services. "omod" package contains web related jsp files and controller classes. Controller classes use services expose from the "api" to build the presentation logic.

 There are two major ways of building a openmrs module.

  1. Using maven module archetype
Openmrs has extention for maven to create the structure of a module.Using this way,user can quickly build a openmrs module. Please refer to [1].

    2. Using basic module at openmrs git repository
Basic module available at openmrs repositories gives a structure of a module.User can clone the basic module and do necessary changes to the configurations to built their own module.(I use this way)
Please find basic module at github in [2]

You can see the following structure in a module as in figure 1;

Finally I have created my module at it's working. Busy days comes ahead. 
My module is available at [3].

Monday, June 24, 2013

1st Week at OpenMRS-The OpenMRS architecute

The June 17th is the beginning of the coding period of the GSoC.  Since this is my first GSoC it's bit of excited. Past couple of weeks I have followed couple of Spring and Hibernate tutorials to get familiar with Spring and Hibernate frameworks in order to develop my module. There is good Spring MVC tutorial find in [0]  and good hibernate tutorial can be find in [1]. Apart from that to get a good understanding about the OpenMRS,I have recommend you to follow tutorials available in [2] which are use in EHSDI training course.

During the first week I had a call with my primary mentor Jeremy and backup mentor Ada Yeung about the project.It was very successful and both mentors are really helpful.It's always nice to work with OpenMRS team. I think it's very helpful for any new comer to having understand about overall understanding about OpenMRS.Figure 1 shows the overally architecture of OpenMRS core. OpenMRS is a heavy data dependent application.

OpenMRS use hibernate as the data access framework.Hibernate framework is one of heavily adopted framework for implement the data access layer of many application.Hibernate provide high degree of standardization to the application.Then Spring framework use for implement the service layer. Spring
provides a comprehensive programming and configuration model for modern Java-based enterprise application[4].

Spring MVC architecture use to implement the front end user interfaces of the OpenMRS. OpenMRS is not a just a single application,it's comes with set of modules which are use in different services.As Figure 1 shows,there are set of core modules which are implement on top of OpenMRS core services.Anyone can implement a custom module using core services of OpenMRS.For more information about module creation please refer to the [5].

Figure 1:OpenMRS core architecture

Finally for anyone interested in my project,please find my project page in [3].More updates and UI mock ups and diagrams there in the project page.Next week I'm planning to study about the module setup.I will provide details about setting up a OpenMRS module next week.

[0]-http://static.springsource.org/docs/Spring-MVC-step-by-step/
[1]-http://www.mkyong.com/tutorials/hibernate-tutorials/
[2]-https://wiki.openmrs.org/display/RES/EHSDI+Training+Course
[3]-https://wiki.openmrs.org/display/projects/Data+Integrity+Workflow+Module
[4]-http://www.springsource.org/spring-framework
[5]-https://wiki.openmrs.org/display/docs/Creating+Modules

Saturday, June 15, 2013

My GSoC project proposal for Data Integrity Workflow Module to OpenMRS


Introduction

I still remember the first day I got to know about openMRS. It was the “WSO2 Con 2013” conference where Dr.Sanjeewa Weerwarna talked about the highly successive open source software in the world. There he talked about impact created by open source software while highlighting community service software such as openMRS and Sahana. That is the beginning of my thinking about contributing to openMRS. Personally I'm a person who likes to help for people. I am amazed with the impact to the society by the openMRS specially in African countries.I have involved in the openMRS community during past two months and was able to contribute to openMRS by solving some tickets with my potential. I must appreciate the help that was given by the community when I was approaching a ticket. Community is very friendly, very helpful and well experienced. Data security has been a major interested area of mine. I have gained a pretty good knowledge when I was discussing about solving tickets. I understand the fact that doing a GSoC project is not enough to contribute to openMRS for enhance people's lives but also the person has to be a part of the community while developing openMRS. Every contribution has a potential of saving life of a patient at least for extra one millisecond .I will definitely continue contributing to openMRS .GsoC will be just a start and a side kick for a long journey with openMRS. I am always be inspired by your moto “Write Code. Save lives.”


Community Interaction

I have been a member of openMRS since February this year.Since that I contributed to openMRS by solving JIRA issues and answering the questions raised in the mailing discussions and also in the IRC chat discusstions.I have gained a good experience while i’m learning new frameworks such as Spring and Hibernate.My goal is to be a long term contributer at the community.I have listed the JIRA issues which I involved at the past.Since I prety much interesting in Data technologies and Web services,I mostly participate in solving REST module and SYNC module tickets.It has been a remarkable experience.I will continue my interaction with the community by making all my works transparent throughout this project and I will also give my best effort in successing this project with having goal of helping people for giving them a better life.

1. Who are you? What are you studying?

I'm Harsha Kumara. I'm a final year undergraduate of Department of Computer Science and Engineering of University of Moratuwa, Sri Lanka.

I’m a fast learner, having good innovative and interpersonal skills.I am a person who loves to take challenges and work hard to achieve them. I’m a highly passionate about FOSS, also interested in SOA,Web services,Data security,cloud computing and distributed systems.


My Blog : http://harshcreationz.blogspot.com

2. Please provide the URL to your wiki personal space.
https://wiki.openmrs.org/display/~harsha89

3. Why are you the right person for this task?

I already have nearly four years experience in Java technologies and MySQL.I worked on several projects in my university and my internship programe at WSO2[1] and still working on projects based on Java technologies. Internship programe is a compulsory module and part of my undergraduate course. In WSO2, I worked as a trainee software engineer.WSO2[1] implementations mostly based on Java technologies.So I gained an extremely good background of software engineering process and Java based technologies. OSGi ,SOAP web services ,Modula Architecture and Cassandra NoSQL database are major key areas which I have gathered as experience in my internship program at WSO2. Since WSO2[1] is a open source software company,I have got experience of the open source culture. During my internship with WSO2, I have engaged with many projects which I have listed under in my Java experience. I am also an engineering undergraduate of University of Moratuwa and I am having a good mathematical background too. I have also got a good knowledge on database applications, specially with MySQL. I have developed several desktop application using MySQL and Java and I have listed them under my Java experience.
[1]-http://wso2.org/

4. Do you have any other commitments we should know about?

I will be having the semester-end examination at the University Of Moratuwa in Sepetember.I attest that I will give my 100% contribution to the project. I guarantee that my willingness about contributing to openMRS will lead me to do better at the project. I always love to help people. Since openMRS is addressing humanity factor, I always cherish the opportunity to be at openMRS and my target is to become a long term contributor for openMRS. My contributions won't be limited to the GsoC time period. I assure you that it will be just a beginning of a long journey.
5. List your Java experience.

I have been using Java as my primary language since the time when I enter to the University. So I have got nearly 4 years of experience in Java and also I used MySQL several times during implementation of my projects both in the university and WSO2.

[1] During my internship at WSO2 I have created a web interface for the Cassandra NoSQL Nodetool management console.This project was to enable access to management and monitoring operations of Cassandra through a web interface. By default Cassandra database management operations like backup, flushing and cluster monitoring services expose through JMX interface. Since JMX is not secure, I have use SOAP Web services to access with management and monitoring operations provided in Cassandra. There are three back-end components and a front-end component of the project. Front end is the web interface which written using java servlet pages (JSP).


Project source code : Backend Components' at WSO2 repositories
http://svn.wso2.org/repos/wso2/carbon/platform/branches/4.1.0/components/cassandra/org.wso2.carbon.cassandra.cluster/
http://svn.wso2.org/repos/wso2/carbon/platform/branches/4.1.0/components/cassandra/org.wso2.carbon.cassandra.cluster.mgt/
http://svn.wso2.org/repos/wso2/carbon/platform/branches/4.1.0/components/cassandra/org.wso2.carbon.cassandra.cluster.proxy/
Project source code : Frontend Component at WSO2 repositories
http://svn.wso2.org/repos/wso2/carbon/platform/branches/4.1.0/components/cassandra/org.wso2.carbon.cassandra.cluster.mgt.ui/

[2] During my internship at WSO2 I have participated in the test automation hackathon of WSO2 ESB product. WSO2 ESB is a well known enterprise service bus(ESB) around in the world.It had been a great privilege for me to work on writing platform wide tests in WSO2 ESB. There was a test framework in WSO2 known as “clarity framework” which built upon testng test libraries. I have written nearly 25 platform wide test cases using this test framework.
Project source code: ESB Test module at WSO2 repositories
http://svn.wso2.org/repos/wso2/carbon/platform/branches/4.1.0/products/esb/4.7.0/modules/integration/tests/

[3] During my internship period, I have created the test module of WSO2 Storage Server(SS) and wrote several platform wide test cases using “clarity framework”.
Project source code : SS Test module at WSO2 repositories
http://svn.wso2.org/repos/wso2/carbon/platform/branches/4.1.0/products/esb/4.7.0/modules/integration/tests/

[4] During my internship at WSO2, I have improved the Electronic Medical Record(EMR) Sample web application available in WSO2. EMR web application is consist of back-end Cassandra NoSQL database. I have done several back-end and UI improvements including data validation enhancements in the EMR web application.
Project source code: EMR sample at WSO2 repositories
http://svn.wso2.org/repos/wso2/carbon/platform/branches/4.1.0/samples/emr-sample/

[5] I have created Android application for my 3rd year software engineering project. Using my application, user can find nearby important places like fuel stations, restaurant, schools and etc. It provides with an interface for user to specify name of important place with the radius of searching area. Afterwards user will have a list of suggestions for specified places and he can choose places from the list. Then he will shown the travel path to selected place in the map along with distance and travel route. I have used Google Maps API for support with my application.
Project source code : https://github.com/harsha89/android_google_maps

[6] I have implemented hall management system and student management system during my early years of my university life. Hall management system is a application for manage hostel facilities in a university and student management system. It is a client server application for manage student affairs in an academic institute. Both of these applications implemented using Java and have MySQL backend.
Project Source Code: Student Management Systematically
https://github.com/harsha89/hall_management_system.git
Project Source Code: Hall Management Systematically
https://github.com/harsha89/student_management_system.git

[7] I have created a Intelligent gaming client for gaming competition at my university. It was a multi client server based Tank (Military Tank) game where clients need to be fully automated and score from grabbing treasures while fighting with other clients in the game.

Project Source Code:
https://github.com/harsha89/ai_client.git

[8] I had been involved in several other projects at university and I am happy to provide those information upon your request.. I am listing following projects and events here as my conclusion.

Trip Planner was a group project which allows user to plan their journey by specifying their preferences during the journey.
I participate twice at IEEE extreme programming completion and obtained global ranks under 500 .
Source code:Trip Planner
https://github.com/harsha89/trip_planner.git




6. List your web interface experience.

During my internship at WSO2, I have created the frontend of the Cassandra Management Admin Component which is based on JSP pages. I already mentioned about this under java experiences section at [1].

Project source code : Frontend Component at WSO2 repositories
http://svn.wso2.org/repos/wso2/carbon/platform/branches/4.1.0/components/cassandra/org.wso2.carbon.cassandra.cluster.mgt.ui/


7. List any previous experience working with open source projects. (This experience is not a requirement.)

I have completed my internship at WSO2 which is a open source company.I contributed to WSO2 in many ways by engaging with projects and enhancing documentation support in many projects. I have listed my open source contribution under java experience because there I have used Java for programming.
Currently I'm doing my final year research project on integrating OGC's geospatial standards like WPS, WFS to Apache Airavata which is a open source scientific workflow management system.
Furthermore, I had involved a little in phpmyadmin development where I provided some patches to existing issues.


8. Please provide links to websites created by you and/or source code examples.
[1]My final year project web site using HTML and JavaScript
Link: http://projectdhara.net78.net/


9. Do you have experience with Spring/Hibernate/DWR/HL7/Tomcat/MySQL/AOP? (Experience with any/all is not a requirement.)

I have a solid knowledge in MySQL since I had created several applications on top of MySQL database. I already followed database systems(CS 3042) course at my University. I have also used MySQL in some desktop application with Java/JDBC at university. I have used Tomcat during my internship at WSO2, to deploy electronic medical record sample web application which I was involved in doing some improvements. I have experience working for openMRS during last two months. So I have a fair amount of knowledge with Spring and Hibernate. I already resolved many tickets which I have listed below in several modules, during past one and half month. So I have fair amount of experience with the openMRS code base too.

10. What is your preferred method of contact and how should we reach you with it? (phone, email, Skype, IRC, IM, etc.)

I prefer email, IM ,Skype and IRC.

IM(Google Talk) : harsz89
IRC nickname : harsz89
Skype : harsha.kumara5

11. If you have visited our IRC channel, please include your IRC nickname in your application.
Nickname : harsz89 (primary nickname)
(harsha89-use when primary nickname not available)

12. Provide ticket numbers of any patches/code you have committed to the OpenMRS code base
I worked on both intro and other levels of tickets.

Committed tickets


META-236 intro ticket
Title :Minor UX improvements on Improve UI on export package details page
Link :https://tickets.openmrs.org/browse/META-236

SYNC-289 intro ticket
Title :Show current time on the overview page
Link :https://tickets.openmrs.org/browse/SYNC-289

RESTWS-284
Title :Catalog call should take parameters to limit output
Link :https://tickets.openmrs.org/browse/RESTWS-284

Label :RESTWS-367 intro ticket
Title :Update request should return updated object
Link :https://tickets.openmrs.org/browse/RESTWS-367

Label :Tickets at code review

SYNC-293 intro ticket
Title :Add quick link on history page to "Most recent all committed"
Link :https://tickets.openmrs.org/browse/SYNC-293

SYNC-272 intro ticket
History of Changes: Records per page should not set "firstRecordId" if not previously set
Link :https://tickets.openmrs.org/browse/SYNC-272


RESTWS-253
Title :FindMethod and FindMethodOnResource should be accessible from BaseDelegatingSubclassHandler
Link :https://tickets.openmrs.org/browse/RESTWS-253

On progress ticket
RESTWS-281 -Currently working on
Title :REST does not expose relationships or relationship_types
Link :https://tickets.openmrs.org/browse/RESTWS-281
Status : 40% completed

Won’t fix ticket
RESTWS-287 -Ticket won't fix after discussion
Title :null values returned in GET request
Link :https://tickets.openmrs.org/browse/RESTWS-287
Status :Ticket mark as won’t fix after discussion

Project Proposal

Abstract

Preserving data integrity is one of major key feature and a challenge with a very data dependent software. OpenMRS is a very data intensive application where it manages a numerous amount of data of patients. Data integrity module origin as solutions to solve the data integrity problems associated with a database. Module provides a way to create, manage and review data quality audits. This facilitate users to view or download the results of an integrity check. It also have the functionality to ignore certain known results that should not be included in the total count. The module contains a strong chart UI for representing the history of an integrity check's findings and link directly to encounters, patients, observations and more from the results. Data integrity module has became an indispensable component in openMRS which ensure the data quality of the openMRS database.

Preserving integrity of large databases which includes millions of records will not be an easy task to handle. So there is a major need of module which enable more users to participate in the process of handling data integrity problems in the openMRS database. This is originating the concept of Data Integrity Workflow module which provides several key functions to achieve collaborative data integrity preservation.


Objectives
  • Create a new module according to the Module Creation wiki page 
  • Apply for a repository in openMRS and a JIRA project
  • Allowing a manager to assign individual results or entire groups of results to another user for follow-up.
  • Allow an user to log in and see whether he/she has assigned records to work on.
  • Allow a record to move through workflow stages, such as In Progress, Waiting on Information, Verified, etc.
  • Provide summaries for seeing workflow stages and progress over time.

Benefits
  • With this module it will enable efficient management of integrity checks results in a large scale deployments.It is always not easy to handle and fix the results of integrity checks by a single person within a system. Data integrity workflow module is a smart solution for divide and fix the issues arise from each integrity check.
  • Including an user friendly UI will be highly benefited for the module users. Users can simply assign or view their tasks by a single click.
  • Faster integrity problem solving capability is another benefit of this module.

Notes

I have went through the functions provide in Data Integrity module before looking at this project. So I have a clear view about the functionality of Data Integrity module and the objectives of newly implementing module.

Working with tricky SYNC module by solving some tickets were great experience to me to get familiar with data handling in openMRS.So I think that will be a great advantage for me to have a good start with this project.


Goals and Deliverables
  • JIRA project associate with the new module
  • Source code with technical wiki in openMRS
  • Module information page along with user guide in openMRS wiki
Project Implementation Plan

Main Tasks

Manager view design and implementation


  • Manager is a person who can run and create integrity checks.After an integrity check executed. There will be a set of results which are integrity concerns of the database. In this workflow module, there are set of functions need to have with the manager. I have listed functions below
  • Assign user to entire record or set of records
  • Manager needs to know the person assign with the each record and working status of the record(In progress,Waiting for information or other status) 
  • Remove the assignment of user with a record or set of records
  • Change the working status of a record

User view design and implementation
  • User is a person who work in a particular set of records of an integrity check. After manager assign records in a integrity check for user, will go through each of the record and fix the integrity problems. There are set of functions need to be provided with user’s interface. I have listed them below
  • User needs to view the records 
  • Update the status of each of record
  • Providing some description associate with the fix
  • Provide summaries with record workflow status
With the above tasks I mentioned earlier,The summary of a record will be associate with it’s work flow status and set of descriptions given by the user.The manager need to have a page to view the summary reports.


Project Timeline

May 27-Jun17
  • Discuss about the final project deliverables with the mentors and update the project requirements documents according to it.
  • Improve the user interfaces for manager and user while researching about possible approaches. 
  • Getting more familiar with hibernate and Spring framework.

Jun 17-Jun 25
  • Finalyse the user interfaces in the project
  • FInishing re-designing and creating necessary table schemas
  • Explore more about writing module in openMRS
Jun 25-Jul 29

Implement the first phase of the project
  • Goal-Finishing manager view implementations
  • Modifying existing page of manager to meet with current requirements
  • Perform necessary changes in backend
  • Creating pages for view report summaries
  • Finalise the manager view implementations
  • Get a initial start of implementing user view

Jul 29 -Aug 2
Mid evaluations

Aug 2- Sep 9

Implement the second phase of the project
  • Goal-Finishing user view implementations and finalise the project
  • Polishing first phase implementations according to feedback
  • Implement the user view front end pages
  • Perform necessary changes at the backend
  • Finishing user view implementations
  • Writing test cases and test the project for verify its’ functionality
  • Creating wiki pages for the module

Sep9-Sep16
Extra week for finishing and wrap up project work

Sep16-Sep23
Final evaluations

Data Integrity Workflow Module
UI Mockups