Monday, October 29, 2012

OpenMRS Html Form Entry Module new features

The HTML Form Entry module gets new features with each and every new version of release to provide more functionalities to he users. The following is a simple note on the new features i was working on HFE module last few months.

1. HTML-348 : Allow checkbox styles for numeric observations

Earlier if a user need to enter numeric observations like numbers,quantities etc. there were only text boxes, drop down lists and radio buttons used in order to do it. With the new addition you can use checkboxes also to record numerical observations as well as to capture multiple numerical observations.

An example code segment in a form would be,

<obs conceptId="5497" answer="502" answerLabel="502" style="checkbox"/>
<obs conceptId="5497" answer="503" answerLabel="503" style="checkbox"/>
<obs conceptId="5497" answer="504" answerLabel="504" style="checkbox"/>

where it would generate this kind of a form as shown below.



2. HTML-92 : Handle checkbox style (multiple select) in single obs element


At past if a user needs to add two or more checkboxes as answers for a question concept it was needed to be defined one by one per each checkbox element as shown below.

<obs conceptId="1069" answerConceptId="664" answerLabel="No Complaints" style="checkbox" />
<obs conceptId="1069" answerConceptId="832" answerLabel="Weight Loss" style="checkbox" />
<obs conceptId="1069" answerConceptId="6029" answerLabel="Night Sweats" style="checkbox" />

However this is a tedious and time wasting job for the form designed therefore this new feature is added in order to provide the ability to define all the checkbox elements in a single tag definition.

The following is the format of how the new <repeat with=""> tag should be added in the html form.

<repeat with="[664,'No Complaints'], [832,'Weight Loss'],[5544,'Weight Gain']">
<obs conceptId="1069" answerConceptId="{0}" answerLabel="{1}" style="checkbox" />
</repeat>

An example form with multiple checkbox elements is as follows.


A week in Philliphines with OpenMRS Implementers Meeting- part 2

Day 3 and 4 .........

Apart from the normal sessions there was the group photo taking on Wednesday evening. All the crowd gathered for the event and we were chatting with each other till the place is set for the group photo. 

Group Photo

There was also a photo booth where we could simply go and take photos as we want, and the photos were given to us printed in the next day. Everybody was eager to take some funny pictures with their friends etc. so it was very funny to watch :D 


The Thursday was entirely dedicated to site visits. By the time we arrived near the YBS Hall there were two buses waiting there for us, getting ready to take us to the town. The breakfast was arranged in packets so i grabbed one of them and got into bus to find a good seat to have a nice town view :)

The buses waiting to take us to the site visits






All of us were divided into 7 groups and taken into 7 different healthcare centers. I was a part of the team who visited “Toro Hills Sentrong Sigla” health center in Quezon City. The clinics had been started by the time we went there and, it was the child vaccination day in the center. 










The doctor explained us how they use an OpenMRS based recording system to keep track of the patient data. It was a nice experience to get a live demo on the application.



Apart from learning through sessions and meeting the fellow community,   OMRS12 was a fun filled event too. We were greeted with a great Philippine music session at the restaurant after the site visits as well as there was a wonderful entertainment session at night right after the dinner. Therefore the days were not only for work but they were giving us the opportunity to experience the Philippines culture too.

Now recalling those precious memories from the Implementers Meeting, it feels like that was the best experience I have got in working with any of the projects in my life so far. When I first started GSoC I never thought that I will be able to go this much further with OpenMRS. But as now I have been able to learn whole lot of new things and what are the newly emerging works in OpenMRS and, more importantly I was able to meet a great bunch of people who are so friendly and supportive towards each other, called OpenMRS community. I felt really proud to be a part of them and looking forward to continue my journey with them. So this is most probably not an end but just a beginning :)

A week in Philliphines with OpenMRS Implementers Meeting 2012

There was one month had been passed after the GSoC 2012 programme had officially ended, where i completed my project, HTML FormEntry module with the guidance of my mentor Mark Goodrich, and i was informed about a real surprise. It is from the OpenMRS mailing list that I first saw that they are willing to offer a limited amount of scholarships for those who are interested to be in the OpenMRS Implementers Meeting this year in Silang, Cavite, Philippines. Michael who is our GSoC coordinator, had also sent a specific mail to the interns’ mailing list, highlighting that we as student developers can also attend to this meeting. The first thing I did after that was searching for information on meetings in previous years and, after reading about that past stories I was really excitingly wishing that how great it would be if i too can attend :) Therefore i  applied for the scholarship mentioning my contribution so far and what i would like to do in future.

And yeah, I got selected! At first I couldn’t believe my eyes reading the scholarship mail. Ever since then I was counting my days to be in Philippines to meet all the people I have known from IRC, mailing lists and to learn about how the development work we do are used in real world applications and, especially to meet two of my fellow GSoC friends Jordan and Harsha who were also supposed to attend.

As this was my first out of country I was pretty nervous about managing everything on my own in a different country. But thanks to Dawn, Michael from organizing committee and Ana in the host committee, everything was well arranged. As soon as we landed in Manila we were picked up by a guide, driven to the IIRR (International Institution of Rural Reconstruction, which is the meeting venue) and then guided straight to our accommodation area too. Ellen, my roommate who was from PIH (Partners in Health) was a great companion, she helped me a lot to get familiar with everything around.

Day 1 and 2 .......

At 9th Tuesday morning after the breakfast, we all were there for the opening ceremony and the roadmap of OpenMRS as well as the current state of OpenMRS is explained by Dr. Paul Biondich and Dr. Burke Mamlin, who are the co-founders of OpenMRS.  The first two days of the meeting was filled with lot of unconference sessions where there were three sessions happened parallel and we were given chance to attend whatever the session important and interested to us. 

Just before the commencement of Opening Ceremony

Right after the opening ceremony everybody was invited to join on expressing themselves about the things they would like to be discussed here. I was very amazed to see that how eagerly everybody participated in doing this, without a single forcing, almost all people just volunteered to say what they willing to know during next few days. Within few minutes there are a whole lot of ideas and we were out there, arranging each topic under session slots and deciding who will lead the session.



Helping with making the Conference schedule
There were lot of interesting topics and I was bit worried that there are more than one interested session happens at the same time, because as a newbie I saw a lot value in each topic for me.

The sessions were very much informal where everyone interested were welcome to join. We gathered around and listened to the speakers to know what they say, while everyone expressing their ideas and asking questions in middle. I did like the nature of the sessions a lot as it was easy to join and learn things in this way than being in a big formal talk.

I was able to learn lot of new things by attending the sessions. As I have only involved in coding, I didn’t have a clear idea on how our code is customized and used in real applications in large scale. From listening to various speakers in their sessions, I learnt that how they use OpenMRS in Kenya, Rwanda, Philippines, Malawi, Israel India, Pakistan, Haiti and a few more countries. They were giving out details as how many centers in each country, what modules they use, how many patient entries in database etc. I was very happy to hear that HFE module in which I am working is being used widely with lot of implementations.




Unconference Sessions
There were many different sessions and various informal chats (BoF sessions, lightening talks) happening throughout the meeting. I found lightening talks were very interesting where each person was giving five minute presentation of a topic of his/her choice. It was a good way to get quick introductions on many things.


Lightening Talks







So that is how the first few days went. My next post will be on the remaining days which were the best days of the meeting :) 

To be continued.................

Down the lane with OpenMRS in GSoC 2012-Part III

It has been months after the GSoC 2012 finished and finally i managed to find time to write on the remaining tasks i did with my project :D Since it has been three months gone all the improvements can be found with the latest releases of HFE module. 

3. HTML-247 : Exit from care tag

Another newly created tag to the module tags list which is used to record the scenario when a patient exits care center. It operates in a similar manner to the exit from care functionality on the patient dashboard, providing a date field  and a reason dropdown to the user. Exiting a patient from care is not mandatory, however once the fields are filled out and submitted for a certain patient, the exit can't be undone, hence the fields can't be set back to empty. However it is possible to edit the date and reason fields.The possible reasons for exiting care are specified by setting the global property concept.reasonExitedCare. This should point to a question concept; the associated answer concepts will be used to populate the reason dropdown presented to the user.
  • To exit a patient from care, the date field should be set to the date of the patient's exit and the reason dropdown set to the reason for the patient's exit selected from the list of given reasons.
If the patient is dead, the tag can be also used to mark a patient's death, by recording the cause of death in the additional dropdown that pops up. The user needs to select the reason dropdown answer as "Patient Died", then a new dropdown will be visible for the user to enter the 'Cause of Death'. The possible causes for patient's death are specified by setting the global property concept.causeOfDeath. This should point to a question concept; the associated answer concepts will be used to populate the cause of death dropdown presented to the user.
  • To mark a patient as dead, the reason field should be set to Patient Died and the cause of death dropdown set to the cause for the death selected from the list of given causes.
If the exact cause is not given in the cause dropdown,  select the 'Cause of Death' dropdown answer as "Other Non-coded", as there will be another text field visible to manually enter the reason for the death. Here the user can type any of the reason,description etc. which caused the patient's death. 
Once the cause of death and other reason text fields are filled out and submitted for a certain patient, the death obs can't be undone. However it is possible to change the reason for exit field back to an answer other than "Patient Died", so the exit observation can be edited back. Then it will not display the death fields' entries but the death obs still exists. It is also possible to edit the cause of death and other reason fields too.

If things are not clear yet, here is a snapshot of what you can have with the <exitFromCare> tag.

 Go to the wiki page description from here.

So this was the end of my awesome GSoC time period with OpenMRS. The following is the complete project page of 'HTML FormEntry Module Enhancements' and the link for the final video demonstration is given below.

Final Demonstration Video : http://www.youtube.com/watch?v=u6pdK1J1oxk

Actually we were planning to work on few more tasks during this summer but had to halt one unfortuantely due to time constraints. Anyway this will not just be the end, though the GSoC ended neither did my contribution and engagements with OpenMRS :) More on them in the coming posts.....!