The OpenMRS Billing Module is designed to streamline the financial operations within healthcare settings by facilitating the management of patient billing, payments, and service pricing. This module integrates seamlessly with the OpenMRS platform, allowing healthcare providers to generate bills, track payments, and manage various billable services. It is an essential tool for ensuring transparency and accuracy in financial transactions within healthcare facilities, contributing to efficient service delivery.
The Billing ESM is a microfrontend for OpenMRS 3.x designed to manage healthcare billing workflows. It allows users to:
- Generate and manage bills
- Capture payments and insurance details
- Configure billable services and categories
- Integrate with visits and patient dashboards
Dependency: Note that this frontend module depends on the backend module called "Billing Module": https://github.com/openmrs/openmrs-module-billing
For more information, please see the OpenMRS Frontend Developer Documentation.
Check out the developer documentation here.
This monorepo uses yarn.
To install the dependencies, run:
yarnTo start a dev server, run:
yarn startTo run with a specific backend (e.g., KenyaEMR with cashier module enabled):
yarn start --backend http://192.168.100.13Once the dev server launches, log in and select a location. You will get redirected to the home page.
For more information on how to navigate and use the billing module, please refer to this documentation
To build this as a local module for testing or distribution:
yarn build && yarn pack --out local-esm-billing-app.tgzThis will create a local-esm-billing-app.tgz file that can be installed in other projects using:
yarn add ./local-esm-billing-app.tgzTo run tests for all packages, run:
yarn turbo run testTo run tests in watch mode, run:
yarn turbo run test:watchTo run a specific test file, run:
yarn turbo run test -- visit-notes-formThe above command will only run tests in the file or files that match the provided string.
You can also run the matching tests from above in watch mode by running:
yarn turbo run test:watch -- visit-notes-formTo generate a coverage report, run:
yarn turbo run coverageBy default, turbo will cache test runs. This means that re-running tests wihout changing any of the related files will return the cached logs from the last run. To bypass the cache, run tests with the force flag, as follows:
yarn turbo run test --forceTo run end-to-end tests, run:
yarn test-e2eRead the e2e testing guide to learn more about End-to-End tests in this project.
The Playwright version in the Bamboo e2e Dockerfile and the package.json file must match. If you update the Playwright version in one place, you must update it in the other.
Configure billing behavior using OpenMRS frontend config overrides.
{
"openmrs": {
"config": {
"billing": {
"enforceBillPayment": false,
"localeCurrencyMapping": {
"en": "PKR",
"en-PK": "PKR"
},
"promptDuration": {
"enable": false,
"duration": 24
},
"insuranceSchemes": ["SHA", "Jubilee Insurance", "AAR Insurance"],
"patientExemptionCategories": [
{ "value": "FREE_CARE", "label": "Free Care" }
],
"visitAttributeTypes": {
"isPatientExempted": "3b9dfac8-9e4d-11ee-8c90-0242ac120002",
"paymentMethods": "e6cb0c3b-04b0-4117-9bc6-ce24adbda802",
"insuranceScheme": "2d0fa959-6780-41f1-85b1-402045935068"
}
}
}
}
}Ensure all UUIDs exist in your OpenMRS instance.
If you notice that your local version of the application is not working or that there's a mismatch between what you see locally versus what's in dev3, you likely have outdated versions of core libraries. To update core libraries, run the following commands:
# Upgrade core libraries
yarn up openmrs@next @openmrs/esm-framework@nextgit checkout package.jsonyarnFor documentation about our design patterns, please visit our design system documentation website.
See Creating a Distribution for information about adding microfrontends to a distribution.
For more information on how to get started, please refer to OpenMRS Frontend Developer Documentation.
Detailed documentation on Billing Module can be found here