Extracting bahmni common code base as NPM library

In the PAT call yesterday(18th Sept), we discussed this topic. Below is the technical approach diagram presented in the call.

The first block in the above picture shows the Bahmni As-is having Bahmni-Core and Appointments-OMOD as server-side modules and BahmniApps as a huge UI app. BahmniApps consists of many small apps(Registration, Clinical, Appointments etc) and there is some common code which is shared by all the modules.

The second block shows the state after the first step taken as mentioned here(Appointment Scheduling Refactoring to React). The appointment module will be taken out along with the common code to improve the technology and redesign of UI. On the server-side it will still have Bahmni Core and Appointments-OMOD.

The third block shows the state, once we are able to run the appointments module independent of Bahmni(BahmniCore Omod) on a plain OpenMRS Distro. We will extract the bahmni ui common code in a separate repo and publish this to NPM as a library. The appointment module taken out in the second step will leverage this library. The appointment module itself can be another library, so it can be reused in Bahmni Ecosystem(E.g. By requiring in an app) & OpenMRS Ecosystem(E.g. By wrapping it in an OWA).

In the last state, we will also try to make the Appointments App completely independent of Bahmni-Core OMOD. If the appointment app is using any APIs from the Bahmni-Core, those will be migrated to an OpenMRS Repo Or A Bahmni-Common-Omod wherever those APIs fit.

Above is the summary of the technical approach, we discussed in the call. For other details please check out the notes from the call.

Thank You