In a recent post(Appointment Scheduling Refactoring to React), we started talking about extracting the appointment module and moving it to react. As of now, there is some common code in
UI/app/common which is used by all the modules (e.g. Patient Model, Common services like patient search).
As suggested in the same thread by @snehabagri we would like to extract this common code to an NPM Module called
bahmni-commons-ng. This NPM module will have each
bahmni-common-module as an ESM in its own js file (e.g bahmni-patient-commons.js, bahmni-auth-commons.js, bahmni-i18n-commons.js).
We want to start small, so we are thinking of extracting just the pieces which are used by the appointments module.
EDIT: As part of this we are planning to make appointments module compatible with OpenMRS distribution (Independent of Bahmni specific modules).