Tuesday, July 3, 2012

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!

No comments:

Post a Comment