Work Summary - GSoC'17
The primary aim of my GSoC project was to recreate all the features which were using Smarty Template Engine and remove SMARTY as a resource. It involved removing and replacing UI components that use it, while managing the separation of controller classes and templates, maintaining the object oriented approach. Secondary aim of the project was to enhance User Interface throughout the application and to introduce client side validation.
Smarty Template Engine Replacement
To achieve my primary goal, I had to think of a proper approach to replace the use of SMARTY. I decided to modify the existing controller classes to work independent of Smarty class, by replacing Smarty defined functions like
assign() using the concepts of output buffering in PHP. I made 3 pull requests to completely replace Smarty from LibreEHR.
Here are the Pull requests to achieve my primary goal :
- Removed the Smarty dependence of Controller Classes and completely revamp Administration/Practice: https://github.com/LibreHealthIO/LibreEHR/pull/598
- Removed Smarty from Prescription classes: https://github.com/LibreHealthIO/LibreEHR/pull/614
- Deleted all HTML Smarty Templates and minor changes in Vitals form: https://github.com/LibreHealthIO/LibreEHR/pull/665
Discussions related to Smarty Removal can be found at : https://github.com/LibreHealthIO/LibreEHR/issues/553
After achieving my primary goal, I started to work over UI of the application. After discussion with mentors, I decided to use Bootstrap as a CSS framework. I worked upon the layout of the forms and tables and introduced responsive behaviour in iframes, which was very important as LibreEHR gives its users the ability to open several iframes at the same time. I also worked upon the
headers.inc.php file and wrote a function to include latest versions of jQuery, Bootstrap, KnockoutJS and Date-Time-Picker as these are frequently used throughout the application. This function would really help doing the much needed jQuery migration to the latest version.
Pull requests for UI Enhancements :
- UI Enhancements in Patient Finder and Edit-Globals : https://github.com/LibreHealthIO/LibreEHR/pull/600
- UI Enhancements in Administration/Practice : https://github.com/LibreHealthIO/LibreEHR/pull/634
- UI Enhancements in Encounter Screens : https://github.com/LibreHealthIO/LibreEHR/pull/641
- UI Enhancements in Menu-Bar: https://github.com/LibreHealthIO/LibreEHR/pull/653
- Cleanup and minor UI improvements in Administration : https://github.com/LibreHealthIO/LibreEHR/pull/666
- UI Enhancements and add feature to set flowboard preferences from flowboard itself : https://github.com/LibreHealthIO/LibreEHR/pull/664
UI discussions at : https://github.com/LibreHealthIO/LibreEHR/issues/597
LibreEHR application being so large, I was not able to enhance UI over some frames but I'll continue this job post GSoC.
I also worked on the issue of Integer Fields accepting strings in demographics section. Here is the issue - https://github.com/LibreHealthIO/LibreEHR/issues/447.
LibreEHR application uses a layout generator to generate forms and user has the ability to change the datatype of existing fields. But,there were no suitable datatypes available for storing integers, emails or URLs. I introduced these 3 datatypes which helped me resolve the issue.
Here is the Pull Request to resolve the issue : https://github.com/LibreHealthIO/LibreEHR/pull/574
- Github profile : https://github.com/nileshprasad137
- Blog : https://medium.com/@nileshprasad137
- List of PRs (including PRs before GSoC ) : https://github.com/LibreHealthIO/LibreEHR/pulls/nileshprasad137
- LibreHealth Forums Discussion : https://forums.librehealth.io/t/gsoc-project-smarty-template-removal-and-ui-improvements/807