Showing posts with label HTML Form Entry. Show all posts
Showing posts with label HTML Form Entry. Show all posts

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.....!

Tuesday, July 3, 2012

OpenMRS GSoC Project Introduction - my first online presentation

Just after the coding period began in GSoC, we in OpenMRS had our introduction presentations where each of the GSoC participant had to give a brief 10 minute introduction regarding our projects at the weekly OpenMRS Developers Forum. Since this was my first time, doing such kind of online presentation for an audience i was bit uncomfortable regarding this as well as excited too. However my mentor Mark was very helpful and he helped me to correct the content i am going to present, the things i am going to say etc.

There are few ways to connect to the Developers forum as Skype, Adobe Connect etc. and i was using Adobe Connect. Therefore it was not very hard to configure the settings where i did prechecking of my microphone,speakers etc. before the meeting and also before the meeting starts, some of us did test our microphones with voice. My slot was the last presentation of the schedule so by that time my fears were all gone and i was well relaxed. :D That is one remarkable experience in my GSoC memories and presenting my project into a new audience was really a great experience, as well as the support and help we got from the fellow OpenMRS community members!

I have also attached the slide i used to do the presentation, as there was specific information which needed to be mentioned there. Perhaps a future OpenMRS GSoC student may find it useful :)


Down the lane with OpenMRS in GSoC 2012-Part II

The next task i was assigned is,

2. Creating a new tag to restrict all (or part of) an HTML Form by role 


The <restrictByRole> tag is the next newcomer to the HTML tag base of Form Entry Module. This feature is concerned to be implemented in a way that, some user with a particular role can be restricted from either viewing a certain HTML form (or a section in the form) by using the <restrictByRole> tag. The tag comes with two attributes as "include" and "exclude" where you can mention the names of the roles for whom you want to include or exclude the form restriction.

As an example if you don't need to make a certain table in your HTML form to be viewable to a Person which has "Data Manager" role assigned to him/her, you form description would be as follows,

<restrictByRole include="Data Manager">                   
  <table>

   <tr>
       <obs conceptId="6100" labelText="Restricted for Data Manager"/>
   </tr>

  </table>
</restrictByRole>


So this table would not be shown to any person with the 'Data Manager' role but only to the users who belongs to that role.
In the same way this can be used with "exclude" attribute, in where the corresponding section would only be not restricted to the mentioned role.

An example form would be like,

1.0 These rows in the table are not restricted for the user Admin, who has "System Developer" role
2.0 If a user who is not a "System Developer" opens the form, if would look like this
That is where we are heading towards at the moment. There are two more tasks to do during the summer so i look forward for those also very enthusiastically!

Down the lane with OpenMRS in GSoC 2012 ..............

Time flows lot faster and i can't believe that it has almost come up the time for GSoC mid evaluations too.  I did have a quite busy but amazing time of two months so far with GSoC where it helped me to learn about many new things and technologies. So thought to have a little flashback on the things done so far.

The following are the tasks which i have already finished by the time of mid evaluation for this GSoC with HTML Form Entry module in OpenMRS.
1. Add autocomplete search functionality to encounter provider and encounter location widgets in HTML Form Entry
There are a lot of names as locations and encounter provider persons  in the system where it is displayed in a drop down list of options at the current module, but due to the long list of options it will be time taking to load and submit the location and provider values with the HTML form. 
At present, HFE module provides auto complete functionality with the <obs> tag, (stands for observation entries), where it does follows the JQuery AJAX calls to populate the source for the auto complete. However this feature is tightly coupled for Concept classes and ids, therefore it is not reusable for the Locations and Providers. The intention of my task is providing a generalized auto complete mechanism through out the module, which uses a pre-populated list of options as the source and which can be used with any other field (as DrugOrder etc.) in the future too. 
Encounter location and provider have been implemented by having two dedicated widgets for each such as, LocationWidget (for <encounterLocation>) and PersonStubWidget (for <encounterProvider>) tags. In addtion to that there is another encounter provider is introduced with htmlformentry 1.9 onwards which too uses a dedicated widget named ProviderWidget with <encounterProviderAndRole> tag. The intention of the task is replace the dedicated  widgets for location, provider etc. and implement a common auto complete mechanism over the Html Form Entry module by just using AutoCompleteWidget and the DropDownWidget for the fields. In that case when a user needs to add auto complete functionality into any other field, it can be easily done by using the new, generalized AutoCompleteWidget.
Here are few of the snapshots from new functionality!



 
 
 

 
 
 
 
And also it works with Options which has special characters like ã,é etc. and which have double quotes,single quotes in middle too :) Auto complete functionality is added into <encounterLocation>, <encounterProvider> and <encounterProviderAndRole> usingthe new AutocompleteWidget and LocationWidget and ProviderWidget in the module is replaced with the new AutocompleteWidget or a default DropDownWidget, hence they have been deprecated for future occurrences. 
The following is the link for the demonstration video i did regarding this new functionality at the second GSoC progress presentation at OpenMRS on 21st June 2012. The next post will explain the second task i have completed. I am eagerly waiting to see my changes have been integrated into HFE module soon :)
GSoC 2012 Autocomplete Demo
The presentation slides can be found Here!