https://tickets.openmrs.org/browse/TRUNK-4144

Initial work on TRUNK-4144