Understanding Bahmni EMR Code

Bahmni EMR follows a typical web application client-server architecture.

Client-side code base organisation

Bahmni EMR is made of multiple pieces of client-side code, see below. The main web app is delivered through the Bahmni Apps project.

  • Client-side code repos:
    • Git hub repo links:
      • Bahmni Apps (AngularJS, code base here)
      • Form Controls (React, code base here)
      • Implementer Interface (React, code base here)
  • Most of the client side code is in AngularJS while some parts of it is implemented using React. Therefore a prior knowledge of AngularJS will definitely help understand the code base.
  • openmrs-module-bahmniapps : This is where almost the entire code for Bahmni EMR resides.  Please also refer to the wiki page 'Setting up Bahmni Dev Environment' to get going as a developer with Bahmni.

Bahmni EMR is articulated around so-called 'apps', with each app being accessible via its own tile on the main landing dashboard:

 

The code for each app can be found in the corresponding subfolder based on the app name in openmrs-module-bahmniapps/ui/app/<appname> (unless it is a custom display control).


The service layer (*Service.js) transacts with the server via either REST or other web services APIs provided by the backend modules that are deployed in /opt/openmrs/modules on the server. 

Server-side code

The server side artifacts of Bahmni EMR is made of Openmrs Core plus a set of OpenMRS modules.

Technologies, Tools, Frameworks: Java, MySql, Maven, Spring, Hibernate.

To understand the server side code we need to understand the OpenMRS modular architecture. Here are few links which can help:

Github Repo for openmrs-core: https://github.com/openmrs/openmrs-core

Each module usually corresponds to code repository in one of following github organisations:

The modules that that are part of the default Bahmni distribution can be found here.