Bhamni is a opensource EMR (http://www.bahmni.org/). These slides explain how to start performing exploratory data analysis of Bahmni data using R. Here is the playlist of YouTube videos which explains the code in these slide: https://www.youtube.com/playlist?list=PLzknGpbejfSyYEvUJnhJwifqHE_6ztW2o