Thank you for your contribution. OpenEMR (and global healthcare) continues to get better because of people like you!
The maintainers of OpenEMR want to get your pull request in as seamlessly as possible, so please ensure your code is consistent with our development policies.
You will need a "local" version of OpenEMR to make changes to the source code. The easiest way to do this is with Docker:
- Create your own fork of OpenEMR (you will need a GitHub account) and
git clone
it to your local machine.- It's best to also add an
upstream
origin to keep your local fork up to date. Check out this guide for more info.
- It's best to also add an
cd openemr
(the directory you cloned the code into)- If you haven't already, install Docker for your system
- Run
docker-compose up
from your command line- When the build is done, you'll see the following message:
openemr_1 | Love OpenEMR? You can now support the project via the open collective: openemr_1 | > https://opencollective.com/openemr/donate openemr_1 | openemr_1 | Starting cron daemon! openemr_1 | Starting apache!
- Navigate to
http://localhost:8300/
to login asadmin
. Password ispass
. - Make changes to any files on your local file system. Most changes will appear after a refresh of the page or iFrame you're working on.
- An exception to this is if making changes to styling scripts in interface/themes/. In that case will need to clear web browser cache and run the following command to rebuild the theme files:
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools build-themes'
- An exception to this is if making changes to styling scripts in interface/themes/. In that case will need to clear web browser cache and run the following command to rebuild the theme files:
- If you wish to connect to the sql database, this docker environment provides the following 2 options:
- Navigate to
http://localhost:8310/
where you can login into phpMyAdmin. - Or you can directly connect to port 8320 via your favorite sql tool (Mysql Workbench etc.).
- Use
username/user
: openemr,password
: openemr .
- Navigate to
- Developer tools and tricks.
- To check PHP error logs:
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools php-log'
- To create a report of PSR12 code styling issues (this takes several minutes):
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools psr12-report'
- To fix PSR12 code styling issues (this takes several minutes):
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools psr12-fix'
- To create a report of theme styling issues:
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools lint-themes-report'
- To fix theme styling issues:
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools lint-themes-fix'
- To check PHP parsing errors (this takes several minutes):
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools php-parserror'
- To run unit testing:
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools unit-test'
- To run api testing:
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools api-test'
- To run e2e testing:
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools e2e-test'
- To run services testing:
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools services-test'
- To run fixtures testing:
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools fixtures-test'
- To run validators testing:
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools validators-test'
- To run controllers testing:
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools controllers-test'
- To check PHP error logs:
- To run the entire dev tool suite (PSR12 fix, lint themes fix, PHP parse error, unit/API/e2e/services/fixtures/validators/controllers tests) in one command, run
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools clean-sweep'
- To run only all the automated tests (unit/API/e2e/services/fixtures/validators/controllers tests) in one command, run
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools clean-sweep-tests'
- When you're done, it's best to clean up after yourself with
docker-compose down -v
- If you don't want to build from scratch every time, just use
docker-compose down
so your nextdocker-compose up
will use the cached volumes.
- If you don't want to build from scratch every time, just use
- Submit a PR from your fork into
openemr/openemr#master
!
We look forward to your contribution...
If you do not want to use Docker, you can always install OpenEMR directly on your local environment. This will require installing additional dependencies for your operating system. For more info see OpenEMR Development Versions on the wiki.
We also welcome financial contributions in full transparency on our open collective. Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
Thank you to all the people who have already contributed to openemr!
Thank you to all our backers! [Become a backer]
Thank you to all our sponsors! (please ask your company to also support this open source project by becoming a sponsor)