Core functionality for the KenyaEMR