New to our project? Be sure to review the OpenMRS 3 Frontend Developer Documentation. You may find the Map of the Project especially helpful.
EthiopiaEMR 3.x custom packages
This repository contains frontend modules for the EthiopiaEMR 3.x. These modules provide clinical workflow, patient registration, billing, patient notes, and admin functionality. The modules within this repository include:
- Clinical Workflow App - Express workflow app for OpenMRS 3, providing triage, patient scoreboard, and MRU (Medical Recording Unit) functionality
- Patient Registration App - Patient registration microfrontend with Health ID integration and disability status support
- Billing App - Billing and payment management functionality
- Patient Notes App - Patient notes microfrontend providing a tabular overview of visit notes and forms for recording new visit notes
- Admin App - Administrative functionality for user and provider management
- Reports App - O3 SPA that surfaces the EthiopiaEMR reporting suite with a left-nav browser, dynamic parameter forms, on-screen results tables, and report design downloads
- ETL App - O3 SPA for ETL administration, replacing the legacy GSP page with health-status metrics, incremental refresh, and a guarded destructive recreate action
Package Documentation
Detailed documentation for each package — including API dependencies, configuration options, features, and development instructions — lives alongside the source:
| Package | README |
|---|---|
| Reports App | packages/esm-reports-app/README.md |
| ETL App | packages/esm-etl-app/README.md |
Setup
Check out the developer documentation here.
This monorepo uses yarn.
To install the dependencies, run:
yarn install
To set up environment variables for the project, follow these steps:
- Create a copy of the .env.example file by running the following command:
cp example.env .env
- Open the newly created .env file in the root of the project.
- Add the environment variables you need.
Note: These variables are currently only used for end-to-end tests.
To start a dev server, run:
yarn start
By default, this runs the clinical workflow, billing, patient registration, and admin apps. This command uses the openmrs tooling to fire up a dev server running esm-patient-chart as well as the specified modules.
Note that running all modules is very resource-intensive.
To start a dev server for specific modules only, use the --sources flag:
yarn start --sources 'packages/esm-<insert-package-name>-app'
You can provide multiple --sources arguments to run several modules. For example, to run only clinical workflow and patient notes:
yarn start --sources 'packages/esm-clinical-workflow-app' --sources 'packages/esm-patient-notes-app'
Available modules to add:
packages/esm-clinical-workflow-apppackages/esm-patient-registration-apppackages/esm-billing-apppackages/esm-patient-notes-apppackages/esm-admin-apppackages/esm-reports-apppackages/esm-etl-app
Troubleshooting
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 the reference application, you likely have outdated versions of core libraries. To update core libraries, run the following commands:
# Upgrade core libraries
yarn up openmrs @openmrs/esm-framework
# Reset version specifiers to `next`. Don't commit actual version numbers.
git checkout package.json
# Run `yarn` to recreate the lockfile
yarn
Contributing
Please read our contributing guide.
Running tests
Unit tests
To run unit tests, use:
yarn test
E2E tests
To run E2E tests, make sure the dev server is running by using:
yarn start --sources 'packages/esm-*-app/'
Then, in a separate terminal, run:
yarn test-e2e --headed
Please read our e2e docs for more information about E2E testing.
Design Patterns
For documentation about our design patterns, please visit our design system documentation website.
Deployment
The main branch of this repo contains the latest stable version of the EthiopiaEMR 3.x frontend modules.
Configuration
This module is designed to be driven by configuration files.
Version and release
To increment the version, run the following command:
yarn release
You will need to pick the next version number. We use minor changes (e.g. 5.4.0 → 5.5.0)
to indicate big new features and breaking changes, and patch changes (e.g. 5.4.0 → 5.4.1)
otherwise.
Note that this command will not create a new tag, nor publish the packages.
After running it, make a PR or merge to main with the resulting changeset.
Once the version bump is merged, go to GitHub and
draft a new release.
The tag should be prefixed with v (e.g., v5.4.1), while the release title
should just be the version number (e.g., 5.4.1). The creation of the GitHub release
will cause GitHub Actions to publish the packages, completing the release process.
Don't run
npm publish,yarn publish, orlerna publish. Use the above process.