Introduction
The HTML Form Entry module allows anyone with basic HTML skills and a knowledge of the OpenMRS system to create forms to enter and edit patient data within the system. It allow users to write forms using HTML combined with a set of special tags that reference different aspects of the OpenMRS data model.
The tags provided by the module has been steady expanding with each new release, but there is consistently a backlog of new tags and improvements to existing tags that the community has requested. This main objective of this GSoC project is taking on some of these suggestions into action.
The following are the improved features/new features that has been added into the Html Form Entry with this project.
1. HTML-72 : Add autocomplete search functionality to encounter provider and encounter location widgets in HTML Form Entry
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 addition 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.
- There are two different auto complete mechanisms are used, one is with a pre-populated list and the other is using an Ajax search. Since these follow different approaches two seperate auto complete widgets are kept in the module named ConceptSearchAutocompleteWiget (for Ajax search) and AutocompleteWidget (for general, predefined option search).
- AutocompleteWidget is converted and implemented into a SingleOptionWidget and generalized to accept an Option list of any type, i.e. Location, Provider etc.
- Auto complete functionality is added into <encounterLocation> and <encounterProvider> using this AutocompleteWidget
- LocationWidget and ProviderWidget in the module is replaced with the new AutocompleteWidget or a default DropDownWidget, hence they have been deprecated for future occurrences.
In addition to that all the previous attributes and the javascript functions which worked with <encounterLocation> and <encounterProvider> tags will be working with the new autocomplete too.
Along with this task some of the remained bugs in the existing obs autocomplete functionality listed as, HTML-343, HTML-323, HTML-217 have been fixed too.