Package Exports
- @olaboot/esm-nmrs-forms-app
- @olaboot/esm-nmrs-forms-app/dist/esm-nmrs-forms-app.js
- @olaboot/esm-nmrs-forms-app/src/index.ts
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@olaboot/esm-nmrs-forms-app) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
OpenMRS ESM Template App
This repository serves as a template for building OpenMRS frontend modules. For detailed guidance, see the Creating a Frontend Module documentation.
For more information, please see the OpenMRS Frontend Developer Documentation.
The Setup section will help you get started with frontend module development.
Running this code
yarn # to install dependencies
yarn start # to run the dev serverOnce it is running, a browser window should open running the O3 reference application. Log in and then navigate to /openmrs/spa/root.
Adapting the code
- Replace all instances of "template" with your frontend module's name
- Update
index.tswith your feature name, page name, and route - Rename the
root.*files to match your first page - Clear
config-schemaobjects and rebuild as needed - Delete the
greeterandpatient-getterdirectories and clearroot.component.tsx - Clear
translations/en.json - Update
.github/workflowsfor your deployment needs - Replace this README with documentation for your module
At this point, you should be able to write your first page as a React application.
See the Medication dispensing app for a complete example of a non-trivial frontend module built using this template.
Integration
See Creating a Frontend Module for details on how to integrate your custom frontend module into the OpenMRS reference application.