api:
test:
tools:
web:
webapp:
DPGA:
OpenMRS is a patient-based medical record system focusing on giving providers a free customizable electronic medical record system (EMR).
The mission of OpenMRS is to improve health care delivery in resource-constrained environments by coordinating a global community that creates a robust, scalable, user-driven, open source medical record system platform.
- Build
- Docker build
- Navigating the repository
- Software Development Kit
- Extending OpenMRS with Modules
- Documentation
- Contributing
- Issues
- Community
- Support
- License
OpenMRS is a Java application which is why you need to install a Java JDK.
If you want to build the master branch you will need a Java JDK of minimum version 8.
Install the build tool Maven.
You need to ensure that Maven uses the Java JDK needed for the branch you want to build.
To do so execute
mvn -versionwhich will tell you what version Maven is using. Refer to the Maven docs if you need to configure Maven.
Install the version control tool git and clone this repository with
git clone https://github.com/openmrs/openmrs-core.gitAfter you have taken care of the Prerequisites
Execute the following
cd openmrs-core
./mvnw clean packageThis will generate the OpenMRS application in webapp/target/openmrs.war, which you will have to deploy to an application server such as Tomcat or Jetty.
For development purposes you can simply deploy the openmrs.war into the application server jetty via
cd openmrs-core/webapp
../mvnw jetty:runTo run Jetty on a custom port, use the jetty.http.port property:
../mvnw -Djetty.http.port=8081 jetty:runTo run on Cargo, use the cargo:run command:
../mvnw cargo:runTo run Cargo on a custom port, use the cargo.servlet.port property:
../mvnw -Dcargo.servlet.port=8081 cargo:runIf all goes well (check the console output) you can access the OpenMRS application at localhost:8080/openmrs.
Refer to Getting Started as a Developer for some more information on useful Maven commands and build options.
Docker builds are still a work in progress. We appreciate any feedback and improvements to the process.
The only prerequisite needed is Docker.
In order to build a development version run:
docker compose buildIt calls mvn install by default. If you would like to customize mvn build arguments you can do so by running:
docker compose build --build-arg MVN_ARGS='install -DskipTests'It is also possible to use the built dev image to run jetty:
docker compose upIn order to build a production version run:
docker compose -f docker-compose.yml buildIt first builds the dev image and then an image with Tomcat and openmrs.war. It has no dev dependencies.
The production version can be run with:
docker compose -f docker-compose.yml upIf you want to debug, you need to run a development version and connect your debugger to port 8000, which is exposed by default.
Unfortunately, at this point any code changes require full restart and rebuild of the docker container. To speed up the process, please use:
docker compose build --build-arg MVN_ARGS='install -DskipTests'
docker compose upWe are working towards providing support for Spring Boot auto-reload feature, which will be documented here once ready.
It is also possible to deploy an image built by our CI, which is published at OpenMRS Core on Docker Hub.
You can run any tag available with:
TAG=nightly docker compose -f docker-compose.yml upIt is also possible to run a development version of an image with:
TAG=dev docker compose upAll development versions contain dev suffix. The cache suffix is for use by our CI.
OpenMRS can run with ElasticSearch backend instead of the in-built Lucene index. You can run it with:
docker compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.es.yml upIf you change backend, you need to rebuild the search index by going to Legacy UI -> Administration -> Search Index. Alternatively, you can rebuild the search index using the searchindexupdate REST endpoint.
OpenMRS can run with Grafana for monitoring logs. You can run it with:
docker compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.grafana.yml upGrafana will be available at http://localhost:3000. Use admin as username and see docker-compose.grafana.yml for the initial password.
The scheduler dashboard can be accessed at http://localhost:9000 by default (user: admin / password: Admin123). It is enabled by default when running docker compose up command. It is configured in docker-compose.override.yml.
If you want to enable it in other environments, you need to set the following properties in openmrs-runtime.properties:
jobrunr.dashboard.enabled=true
jobrunr.dashboard.password=someStrongPasswordThe project tree is set up as follows:
| api/ | Java and resource files for building the java api jar file. |
| tools/ | Meta code used during compiling and testing. Does not go into any released binary (like doclets). |
| web/ | Java and resource files that are used in the webapp/war file. |
| webapp/ | files used in building the war file (contains JSP files on older versions). |
| pom.xml | The main maven file used to build and package OpenMRS. |
For rapid development of modules and the OpenMRS Platform code, see the OpenMRS SDK documentation.
OpenMRS has a modular architecture that allows developers to extend the OpenMRS core functionality by creating modules that can easily be added or removed to meet the needs of a specific implementation.
Before creating your own module, go to the OpenMRS Module Repository and see if there is already a module for your specific use case. If so, deploy and try it. If functionality is missing, work with the module's developers to add the feature.
If you haven't found what you were looking for, refer to the Module - wiki to learn how you can create a new module.
If you want to contribute please refer to these resources
If you are looking for detailed guides on how to install, configure, contribute and extend OpenMRS, visit the OpenMRS Wiki.
For more information about OpenMRS as an organization, check the OpenMRS website.
Contributions are very welcome. We can definitely use your help!
OpenMRS organizes the privileges of its contributors in developer stages which are documented here.
Read the following sections to find out where you could help.
Check out our contributing guidelines, read through the Developer guides.
After you've read up 👓 grab an introductory issue that is Ready For Work.
If you do not have time to develop but have experience with OpenMRS or reviewing code, your help with code reviews would be greatly appreciated!
Read the code review guide and get started reviewing pull requests!
We use Transifex to manage our translations.
The messages.properties file in this repository is our single source of
truth. It contains key, value pairs for the English language which is the
default.
Transifex fetches updates to this file every night so they can be translated
on the Transifex website. At any time, we can pull new translations from Transifex
back into this repository. Other languages, such as Spanish, will then be in
the messages_es.properties file.
If you would like to know how to help with translations, see the OpenMRS translation guide.
If you want to help fix existing issues or have found a bug to report, please go to the OpenMRS issue tracker.
Talk to us on OpenMRS Talk
