[#CSM- 66] Refactor Chart Search Module's code

https://issues.openmrs.org/browse/CSM-66