Fixes #5877 Comlink Telehealth Module (#5878)
[openemr.git] / CONTRIBUTING.md
blob5d88ae82405463f5ee8f2887d2581c0c96923fa1
1 Thank you for your contribution. OpenEMR (and global healthcare) continues to get better because of people like you!
3 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](https://open-emr.org/wiki/index.php/Development_Policies).
5 ## Code Contributions (local development)
7 You will need a "local" version of OpenEMR to make changes to the source code. The easiest way to do this is with [Docker](https://hub.docker.com/r/openemr/openemr/):
9 ---
11 ### Starting with OpenEMR Development Docker Environment
13 - For the Video Tutorial, click below:
15     [![Getting Started Video Tutorial](Documentation/images/easy-dev-intro.png)](https://youtu.be/D4tXP5G9-sY)
17     - (Recommend using Ubuntu Desktop 22.04 for above video and other videos in the [OpenEMR Easy Docker Development Environment Video Series](https://www.youtube.com/playlist?list=PLFiWG_dDadgQT7zjqvEqbXm1OiuubOVO8). Easiest way to do this is setting up a [Ubuntu Desktop 22.04 Virtual Machine on VirtualBox](https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox), which recommend configuring with 40GB hard drive, assigning 25% of computer memory, and assigning 25% of cpu cores to the virtual machine.)
19 1. [Create your own fork of OpenEMR](https://github.com/openemr/openemr/fork) (you will need a GitHub account) and `git clone` it to your local machine.
21     - For the Video Tutorial, click below:
23       [![Getting Started Video Tutorial](Documentation/images/easy-dev-git.png)](https://youtu.be/QhTlWMqPV1Q)
25       - (Recommend using Ubuntu Desktop 22.04 for above video and other videos in the [OpenEMR Easy Docker Development Environment Video Series](https://www.youtube.com/playlist?list=PLFiWG_dDadgQT7zjqvEqbXm1OiuubOVO8). Easiest way to do this is setting up a [Ubuntu Desktop 22.04 Virtual Machine on VirtualBox](https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox), which recommend configuring with 40GB hard drive, assigning 25% of computer memory, and assigning 25% of cpu cores to the virtual machine.)
27     - If you haven't already, [install git](https://git-scm.com/downloads) for your system
28         - (optional) If you want to set up the base services(e.g. git, docker, docker-compose, openemr-cmd, minkube and kubectl) easily, please try [openemr-env-installer](https://github.com/openemr/openemr-devops/tree/master/utilities/openemr-env-installer)
29     - (optional) It's best to also add an `upstream` origin to keep your local fork up to date. [Check out this guide](https://oneemptymind.wordpress.com/2018/07/11/keeping-a-fork-up-to-date/) for more info.
30 2. `cd openemr/docker/development-easy` (if you are running this on Raspberry Pi, then instead do `cd openemr/docker/development-easy-arm32` or `cd openemr/docker/development-easy-arm64`)
31     - If you haven't already, [install Docker](https://docs.docker.com/install/) and [install compose](https://docs.docker.com/compose/install/) for your system
32     - (optional) If you want to troubleshoot with the below steps easier, please also [install openemr-cmd](https://github.com/openemr/openemr-devops/tree/master/utilities/openemr-cmd) for your system
33     - (optional) If you want to monitor and easily manage the docker environment, please also [install openemr-monitor](https://github.com/openemr/openemr-devops/tree/master/utilities/openemr-monitor) and [install portainer](https://github.com/openemr/openemr-devops/tree/master/utilities/portainer) for your system
34     - (optional) If you want to migrate the running docker environment, please try [openemr-env-migrator](https://github.com/openemr/openemr-devops/tree/master/utilities/openemr-env-migrator)
35     - (optional) If you want to set up with orchestration tool, please try [OpenEMR Kubernetes Orchestrations](https://github.com/openemr/openemr-devops/tree/master/kubernetes/minikube)
36 3. Run `docker-compose up` from your command line
37     - When the build is done, you'll see the following message:
38     ```sh
39     openemr_1  | Love OpenEMR? You can now support the project via the open collective:
40     openemr_1  |  > https://opencollective.com/openemr/donate
41     openemr_1  |
42     openemr_1  | Starting cron daemon!
43     openemr_1  | Starting apache!
44     ```
45 4. Navigate to `http://localhost:8300/` or `https://localhost:9300/` to login as `admin`. Password is `pass`.
46 5. If you wish to connect to the sql database, this docker environment provides the following 2 options:
47     - Navigate to `http://localhost:8310/` where you can login into phpMyAdmin.
48     - Or you can directly connect to port 8320 via your favorite sql tool (Mysql Workbench etc.).
49     - Use `username/user`: openemr, `password`: openemr .
50 6. 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.
52     - For the Video Tutorial, click below:
54       [![Getting Started Video Tutorial](Documentation/images/easy-dev-vscode-xdebug.png)](https://youtu.be/XJl7SQGNhpw)
56       - (Recommend using Ubuntu Desktop 22.04 for above video and other videos in the [OpenEMR Easy Docker Development Environment Video Series](https://www.youtube.com/playlist?list=PLFiWG_dDadgQT7zjqvEqbXm1OiuubOVO8). Easiest way to do this is setting up a [Ubuntu Desktop 22.04 Virtual Machine on VirtualBox](https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox), which recommend configuring with 40GB hard drive, assigning 25% of computer memory, and assigning 25% of cpu cores to the virtual machine.)
58     - 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:
59       ```sh
60       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools build-themes'
61       ```
62 7. When you're done, it's best to clean up after yourself with `docker-compose down -v`
63     - If you don't want to build from scratch every time, just use `docker-compose down` so your next `docker-compose up` will use the cached volumes.
64 8. To ensure you are using the most recent dockers, recommend running below set of commands intermittently:
65     ```console
66     docker pull openemr/openemr:flex
67     docker pull mariadb:10.6
68     docker pull phpmyadmin/phpmyadmin
69     docker pull couchdb
70     docker pull openemr/dev-ldap:easy
71     ```
72 9. [Submit a PR](https://github.com/openemr/openemr/compare) from your fork into `openemr/openemr#master`!
74 We look forward to your contribution...
76 ---
78 ### Advanced Use of OpenEMR Development Docker Environment
80 The OpenEMR development docker environment has a very rich advanced feature set. See below Index for links to all the cool advanced stuff:
82 **Index for Advanced Use of OpenEMR Development Docker Environment**
84 ---
86 1. [Xdebug and profiling](#xdebug)
87 2. [API development and testing](#api)
88 3. [Testing other PHP versions](#other_php_versions)
89 4. [Php syntax checking, psr12 checking, and automated testing](#dev_tools_tests)
90 5. [Run the entire dev tool suite](#dev_tools_suite)
91 6. [Run only all the automated tests](#dev_tools_auto)
92 7. [Resetting OpenEMR and loading demo data](#dev_tools_reset)
93 8. [Backup and restore OpenEMR data](#dev_tools_backup)
94 9. [Send/receive snapshots](#dev_tools_send)
95 10. [Create and add random patient data](#dev_tools_randompatients)
96 11. [Add multisite bank](#dev_tools_bankmultisite)
97 12. [Turn on and turn off support for multisite feature in setup.php](#dev_tools_multisite)
98 13. [List the current multisite](#dev_tools_listmultisite)
99 14. [Change the database character set and collation](#dev_tools_charset)
100 15. [Test ssl certificate and force/unforce https](#dev_tools_https)
101 16. [Place/remove testing sql ssl certificate and testing sql ssl client key/cert](#dev_tools_ssl)
102 17. [CouchDB integration](#dev_tools_couchdb)
103 18. [LDAP integration](#dev_tools_ldap)
104 19. [Test webroot value](#dev_tools_webroot)
108 1. <a name="xdebug"></a>Xdebug and profiling is supported for PHPStorm and VSCode.
110     - For the Video Tutorial, click below:
112       [![Getting Started Video Tutorial](Documentation/images/easy-dev-vscode-xdebug.png)](https://youtu.be/XJl7SQGNhpw)
114       - (Recommend using Ubuntu Desktop 22.04 for above video and other videos in the [OpenEMR Easy Docker Development Environment Video Series](https://www.youtube.com/playlist?list=PLFiWG_dDadgQT7zjqvEqbXm1OiuubOVO8). Easiest way to do this is setting up a [Ubuntu Desktop 22.04 Virtual Machine on VirtualBox](https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox), which recommend configuring with 40GB hard drive, assigning 25% of computer memory, and assigning 25% of cpu cores to the virtual machine.)
116      - Firefox/Chrome install xdebug helper add on and enable
117     - PHPStorm Settings->Language & Frameworks->PHP->Debug
118         - Start listening
119         - Untoggle "Break at first line in PHP scripts"
120         - Untoggle both settings that start with "Force Break at first line..."
121         - See [these images for more detail](https://github.com/openemr/openemr-devops/pull/283#issuecomment-779798156)
122     - VSCode
123         - Listen for XDebug
124         - Use this `launch.json` [template](https://github.com/openemr/openemr-devops/issues/285#issuecomment-782899207)
125     - Make sure port 9003 is open on your host operating system
126     - Profiling output can be found in /tmp directory in the docker. Following will list the profiling output files:
127       ```sh
128       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools list-xdebug-profiles'
129       ```
130     - To check Xdebug log:
131       ```sh
132       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools xdebug-log'
133       ```
134 2. <a name="api"></a>API development and testing.
135     - Swagger is including in OpenEMR to ease API documentation, development, and testing.
136     - The following command will update the API documentation (derive documentation from [_rest_routes.inc.php](_rest_routes.inc.php) to [swagger/openemr-api.yaml](swagger/openemr-api.yaml)):
137       ```sh
138       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools build-api-docs'
139       ```
140     - Can go to Swagger at [https://localhost:9300/swagger](https://localhost:9300/swagger) where it is super easy to test the API:
141         - First, click on 'Authorize' button.
142         - Then click 'Select All' scopes.
143         - Can then do the following from command line to get a client id and secret, which then can copy/paste into the fields:
144           ```sh
145           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools register-oauth2-client'
146           ```
147         - Then click 'Authorize' button and follow the flow and before you know it, you will be authorized to test the api endpoints!
148     - There is also a mechanism to allow use of the above Swagger tool with multisite.
149         - Before going to the Swagger gui linked above, run the following command (after running below command, the Swagger gui will then be configured to work with the selected multisite):
150           ```sh
151           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools set-swagger-to-multisite <multisite-name>'
152           ```
153         - To collect a client id and secret for the selected multisite, can then do:
154           ```sh
155           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools register-oauth2-client <multisite-name>'
156           ```
157         - When done testing with Swagger on the selected multisite, recommend setting swagger back to the default multisite to avoid changes to the swagger configuration script showing up in your local git repository:
158           ```sh
159           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools set-swagger-to-multisite'
160           ```
161     - There is also a dev tool to make it easy to test the API on the online OpenEMR demo farm. For example, what if you wanted to test the API at [https://eleven.openemr.io/a/openemr](https://eleven.openemr.io/a/openemr):
162         - Go to [https://eleven.openemr.io/a/openemr/swagger](https://eleven.openemr.io/a/openemr/swagger/index.html) and follow the Swagger gui flow above. The following command can be used to get a client id and secret from that online demo:
163           ```sh
164           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools register-oauth2-client-demo https://eleven.openemr.io/a/openemr'
165           ```
166 3. <a name="other_php_versions"></a>Testing other PHP versions.
167     - The standard `flex` docker used in the easy development environments is PHP 8.1. This can be modified by changing the image (`image: openemr/openemr:flex`) used in the docker-compose.yml script. To use PHP 8.0, then just need to change it to `image: openemr/openemr:flex-3.15-8`. To use PHP 7.4, then just need to change it to `image: openemr/openemr:flex-3.15`.
168 4. <a name="dev_tools_tests"></a>Php syntax checking, psr12 checking, and automated testing.
169     - To check PHP error logs:
170       ```sh
171       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools php-log'
172       ```
173     - To create a report of PSR12 code styling issues (this takes several minutes):
174       ```sh
175       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools psr12-report'
176       ```
177     - To fix PSR12 code styling issues (this takes several minutes):
178       ```sh
179       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools psr12-fix'
180       ```
181     - To create a report of theme styling issues:
182       ```sh
183       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools lint-themes-report'
184       ```
185     - To fix theme styling issues:
186       ```sh
187       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools lint-themes-fix'
188       ```
189     - To check PHP parsing errors (this takes several minutes):
190       ```sh
191       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools php-parserror'
192       ```
193     - To run unit testing:
194       ```sh
195       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools unit-test'
196       ```
197     - To run api testing:
198       ```sh
199       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools api-test'
200       ```
201     - To run e2e testing:
202       ```sh
203       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools e2e-test'
204       ```
205     - To run services testing:
206       ```sh
207       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools services-test'
208       ```
209     - To run fixtures testing:
210       ```sh
211       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools fixtures-test'
212       ```
213     - To run validators testing:
214       ```sh
215       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools validators-test'
216       ```
217     - To run controllers testing:
218       ```sh
219       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools controllers-test'
220       ```
221     - To run common testing:
222       ```sh
223       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools common-test'
224       ```
225 5. <a name="dev_tools_suite"></a>Run the entire dev tool suite (PSR12 fix, lint themes fix, PHP parse error, unit/API/e2e/services/fixtures/validators/controllers/common tests) in one command, run
226     ```sh
227     docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools clean-sweep'
228     ```
229 6. <a name="dev_tools_auto"></a>Run only all the automated tests (unit/API/e2e/services/fixtures/validators/controllers/common tests) in one command, run
230     ```sh
231     docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools clean-sweep-tests'
232     ```
233 7. <a name="dev_tools_reset"></a>Resetting OpenEMR and loading demo data.
234     - For the Video Tutorial, click below:
236       [![Resetting and Demo Data Video Tutorial](Documentation/images/easy-dev-reset.png)](https://youtu.be/1ch84Ffmky8)
238       - (Recommend using Ubuntu Desktop 22.04 for above video and other videos in the [OpenEMR Easy Docker Development Environment Video Series](https://www.youtube.com/playlist?list=PLFiWG_dDadgQT7zjqvEqbXm1OiuubOVO8). Easiest way to do this is setting up a [Ubuntu Desktop 22.04 Virtual Machine on VirtualBox](https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox), which recommend configuring with 40GB hard drive, assigning 25% of computer memory, and assigning 25% of cpu cores to the virtual machine.)
240     - To reset OpenEMR only (then can reinstall manually via setup.php in web browser):
241       ```sh
242       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools dev-reset'
243       ```
244         - When running setup.php, need to use `mysql` for 'Server Host', `root` for 'Root Password', and `%` for 'User Hostname'.
245     - To reset and reinstall OpenEMR:
246       ```sh
247       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools dev-reset-install'
248       ```
249     - To reset and reinstall OpenEMR with demo data (this includes several users with access controls setup in addition to patient portal logins. [See HERE for those credentials](https://www.open-emr.org/wiki/index.php/Development_Demo#Demo_Credentials).):
250       ```sh
251       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools dev-reset-install-demodata'
252       ```
253         - hint: this is also a great way to test any changes a developer has made to the sql upgrade stuff (ie. such as sql/5_0_2-to-6_0_0_upgrade.sql)
254 8. <a name="dev_tools_backup"></a>Backup and restore OpenEMR data (database and data on drive) via snapshots.
255     - For the Video Tutorial, click below:
257       [![Snapshots and Capsules Video Tutorial](Documentation/images/easy-dev-snapshots-capsules.png)](https://youtu.be/n569Lw5I5us)
259       - (Recommend using Ubuntu Desktop 22.04 for above video and other videos in the [OpenEMR Easy Docker Development Environment Video Series](https://www.youtube.com/playlist?list=PLFiWG_dDadgQT7zjqvEqbXm1OiuubOVO8). Easiest way to do this is setting up a [Ubuntu Desktop 22.04 Virtual Machine on VirtualBox](https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox), which recommend configuring with 40GB hard drive, assigning 25% of computer memory, and assigning 25% of cpu cores to the virtual machine.)
261      - Create a backup snapshot (using `example` below, but can use any alphanumeric identifier):
262       ```sh
263       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools backup example'
264       ```
265     - Restore from a snapshot (using `example` below, but can use any alphanumeric identifier)
266       ```sh
267       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools restore example'
268       ```
269     - To list the snapshots
270       ```sh
271       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools list-snapshots'
272       ```
273 9. <a name="dev_tools_send"></a>Send/receive snapshots (via capsules) that are created above in item 8.
274     - For the Video Tutorial, click below:
276       [![Snapshots and Capsules Video Tutorial](Documentation/images/easy-dev-snapshots-capsules.png)](https://youtu.be/n569Lw5I5us)
278       - (Recommend using Ubuntu Desktop 22.04 for above video and other videos in the [OpenEMR Easy Docker Development Environment Video Series](https://www.youtube.com/playlist?list=PLFiWG_dDadgQT7zjqvEqbXm1OiuubOVO8). Easiest way to do this is setting up a [Ubuntu Desktop 22.04 Virtual Machine on VirtualBox](https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox), which recommend configuring with 40GB hard drive, assigning 25% of computer memory, and assigning 25% of cpu cores to the virtual machine.)
280     - Here is how to grab a capsule from the docker, which can then store or share with friends.
281         - List the capsules:
282           ```sh
283           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools list-capsules'
284           ```
285         - Copy the capsule from the docker to your current directory (using `example.tgz` below):
286           ```sh
287           docker cp $(docker ps | grep _openemr | cut -f 1 -d " "):/snapshots/example.tgz .
288           ```
289     - Here is how to send a capsule into the docker.
290         - Copy the capsule from current directory into the docker (using `example.tgz` below):
291           ```sh
292           docker cp example.tgz $(docker ps | grep _openemr | cut -f 1 -d " "):/snapshots/
293           ```
294         - Restore from the new shiny snapshot (using `example` below):
295           ```sh
296           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools restore example'
297           ```
298         - Ensure run upgrade to ensure will work with current version OpenEMR:
299           ```sh
300           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools upgrade 5.0.2'
301           ```
302 10. <a name="dev_tools_randompatients"></a>Create and add random patient data. This will use synthea to create random patients that are then imported into OpenEMR. You can choose the number of patients. Note that each patient will take several seconds.
303     - For the Video Tutorial, click below:
305       [![Creating Random Patients Video Tutorial](Documentation/images/easy-dev-random-pat.png)](https://youtu.be/cFBFXFm_Psg)
307       - (Recommend using Ubuntu Desktop 22.04 for above video and other videos in the [OpenEMR Easy Docker Development Environment Video Series](https://www.youtube.com/playlist?list=PLFiWG_dDadgQT7zjqvEqbXm1OiuubOVO8). Easiest way to do this is setting up a [Ubuntu Desktop 22.04 Virtual Machine on VirtualBox](https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox), which recommend configuring with 40GB hard drive, assigning 25% of computer memory, and assigning 25% of cpu cores to the virtual machine.)
309     - Create and add 100 random patients (defaults to development mode set to true, which is set be default to true; development mode will markedly improve performance by bypassing the import of the ccda document and bypassing the use of the audit_master and audit_details tables and will directly import the new patient data from the ccda. Note this should never be done on sites that already contain real data/use, and it will also turn off the audit log during the import.):
310        ```sh
311        docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools import-random-patients 100'
312        ```
313        or
314        ```sh
315        docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools import-random-patients 100 true'
316        ```
317     - Create and add 100 random patients (with development mode set to false)
318        ```sh
319        docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools import-random-patients 100 false'
320        ```
321 11. <a name="dev_tools_bankmultisite"></a>Create a bank of multisites with selected number of multisites that are all labelled from run1..runx. It will clone from the default instance. This can be helpful for testing of multisites and other larger scale testing.
322     - Create 5 multisites (will be run1, run2, run3, run4, run5):
323       ```sh
324       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools generate-multisite-bank 5'
325       ```
326 12. <a name="dev_tools_multisite"></a>Turn on and turn off support for multisite feature (to allow setting up multisites in setup.php script).
327     - Turn on support for multisite:
328       ```sh
329       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools enable-multisite'
330       ```
331     - Turn off support for multisite:
332       ```sh
333       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools disable-multisite'
334       ```
335 13. <a name="dev_tools_listmultisite"></a>The available multsites can be listed via following command:
336     ```sh
337     docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools list-multisites'
338     ```
339 14. <a name="dev_tools_charset"></a>Change the database character set and collation (character set is the encoding that is used to store data in the database; collation are a set of rules that the database uses to sort the stored data).
340     - Best to demonstrate this devtool with examples.
341         - Set character set to utf8mb4 and collation to utf8mb4_general_ci (this is default for OpenEMR 6 and higher):
342           ```sh
343           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools change-encoding-collation utf8mb4 utf8mb4_general_ci'
344           ```
345         - Set character set to utf8mb4 and collation to utf8mb4_unicode_ci:
346           ```sh
347           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools change-encoding-collation utf8mb4 utf8mb4_unicode_ci'
348           ```
349         - Set character set to utf8mb4 and collation to utf8mb4_vietnamese_ci:
350           ```sh
351           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools change-encoding-collation utf8mb4 utf8mb4_vietnamese_ci'
352           ```
353         - Set character set to utf8 and collation to utf8_general_ci (this is default for OpenEMR 5 and lower):
354           ```sh
355           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools change-encoding-collation utf8 utf8_general_ci'
356           ```
357 15. <a name="dev_tools_https"></a>Test ssl certificate (to test client based certificates and revert back to default self signed certificate) and force/unforce https.
358     - To test client based certificates, create a zip package of the certificate in OpenEMR at Administration->System->Certificates. Then can import this zip package (example `ssl.zip`) into the docker via:
359       ```sh
360       docker cp ssl.zip $(docker ps | grep _openemr | cut -f 1 -d " "):/certs/
361       ```
362     - To list the available certificate packages on docker:
363       ```sh
364       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools list-client-certs'
365       ```
366     - To install and configure a certificate package (example `ssl`):
367       ```sh
368       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools setup-client-cert ssl'
369       ```
370     - To revert back to selfsigned certicates (ie. revert the changes required for client based certificates):
371       ```sh
372       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools on-self-signed-cert'
373       ```
374     - To force https in apache script via redirect:
375       ```sh
376       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools force-https'
377       ```
378     - To revert the changes that forced https in apache script:
379       ```sh
380       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools un-force-https'
381       ```
382 16. <a name="dev_tools_ssl"></a>Place/remove testing sql ssl certificate and testing sql ssl client key/cert.
383     - Place the testing sql ssl CA cert:
384       ```sh
385       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools sql-ssl'
386       ```
387     - Remove the testing sql ssl CA cert:
388       ```sh
389       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools sql-ssl-off'
390       ```
391     - Place the testing sql ssl CA cert and testing sql ssl client key/cert:
392       ```sh
393       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools sql-ssl-client'
394       ```
395     - Remove the testing sql ssl CA cert and testing sql ssl client key/cert:
396       ```sh
397       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools sql-ssl-client-off'
398       ```
399 17. <a name="dev_tools_couchdb"></a>CouchDB integration.
400     - In OpenEMR, CouchDB is an option for the patients document storage. For this reason, a CouchDB docker is included in this OpenEMR docker development environment. You can visit the CouchDB GUI directly via http://localhost:5984/_utils/ or https://localhost:6984/_utils/ with username `admin` and password `password`. You can configure OpenEMR to use this CouchDB docker for patient document storage in OpenEMR at Administration->Globals->Documents:
401         - Document Storage Method->CouchDB
402     - After running the following devtools, 'dev-reset', 'dev-install', 'dev-reset-install', 'dev-reset-install-demodata', 'restore-snapshot', then need to restart the couchdb docker via the following command:
403         ```sh
404         docker restart $(docker ps | grep _couchdb_1 | cut -f 1 -d " ")
405         ```
406     - Developer tools to place/remove testing couchdb ssl certificate and testing couchdb ssl client key/cert.
407         - Place the testing couchdb ssl CA cert:
408           ```sh
409           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools couchdb-ssl'
410           ```
411         - Remove the testing couchdb ssl CA cert:
412           ```sh
413           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools couchdb-ssl-off'
414           ```
415         - Place the testing couchdb ssl CA cert and testing couchdb ssl client key/cert:
416           ```sh
417           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools couchdb-ssl-client'
418           ```
419         - Remove the testing couchdb ssl CA cert and testing couchdb ssl client key/cert:
420           ```sh
421           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools couchdb-ssl-client-off'
422           ```
423 18. <a name="dev_tools_ldap"></a>LDAP integration.
424     - In OpenEMR, LDAP is an option for authentication. If this is turned on, then this will be supported for the `admin` user, which will use the following password: `admin`
425     - Turn on LDAP:
426       ```sh
427       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools enable-ldap'
428       ```
429     - Turn off LDAP:
430       ```sh
431       docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools disable-ldap'
432       ```
433     - Developer tools to place/remove testing ldap tls/ssl certificate and testing ldap tls/ssl client key/cert.
434         - Place the testing ldap tls/ssl CA cert:
435           ```sh
436           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools ldap-ssl'
437           ```
438         - Remove the testing ldap tls/ssl CA cert:
439           ```sh
440           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools ldap-ssl-off'
441           ```
442         - Place the testing ldap tls/ssl CA cert and testing ldap tls/ssl client key/cert:
443           ```sh
444           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools ldap-ssl-client'
445           ```
446         - Remove the testing ldap tls/ssl CA cert and testing ldap tls/ssl client key/cert:
447           ```sh
448           docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools ldap-ssl-client-off'
449           ```
450 19. <a name="dev_tools_webroot"></a>Test webroot value.
451     - The default setup of the docker development environments are with a blank webroot, however, it is a good idea to also test with a webroot setting. There is an option to set the webroot to openemr.
452     - Note this dev tool requires the use of the openemr-cmd script, which is discussed above and can find instructions to install and use openemr-cmd script at [install openemr-cmd](https://github.com/openemr/openemr-devops/tree/master/utilities/openemr-cmd).
453     - Set webroot to blank:
454       ```sh
455       openemr-cmd change-webroot-blank
456       ```
457     - Set webroot to `openemr`:
458       ```sh
459       openemr-cmd change-webroot-openemr
460       ```
462 ### Non-docker Use
464 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](https://open-emr.org/wiki/index.php/OpenEMR_Installation_Guides#OpenEMR_Development_Versions) on the wiki.
466 ## Financial contributions
468 We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/openemr).
469 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.
471 ## Credits
473 ### Contributors
475 Thank you to all the people who have already contributed to openemr!
476 <a href="https://github.com/openemr/openemr/graphs/contributors"><img src="https://opencollective.com/openemr/contributors.svg?width=890" /></a>
478 ### Backers
480 Thank you to all our backers! [[Become a backer](https://opencollective.com/openemr#backer)]
482 <a href="https://opencollective.com/openemr#backers" target="_blank"><img src="https://opencollective.com/openemr/backers.svg?width=890"></a>
484 ### Sponsors
486 Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/openemr#sponsor))
488 <a href="https://opencollective.com/openemr/sponsor/0/website" target="_blank"><img src="https://opencollective.com/openemr/sponsor/0/avatar.svg"></a>
489 <a href="https://opencollective.com/openemr/sponsor/1/website" target="_blank"><img src="https://opencollective.com/openemr/sponsor/1/avatar.svg"></a>
490 <a href="https://opencollective.com/openemr/sponsor/2/website" target="_blank"><img src="https://opencollective.com/openemr/sponsor/2/avatar.svg"></a>
491 <a href="https://opencollective.com/openemr/sponsor/3/website" target="_blank"><img src="https://opencollective.com/openemr/sponsor/3/avatar.svg"></a>
492 <a href="https://opencollective.com/openemr/sponsor/4/website" target="_blank"><img src="https://opencollective.com/openemr/sponsor/4/avatar.svg"></a>
493 <a href="https://opencollective.com/openemr/sponsor/5/website" target="_blank"><img src="https://opencollective.com/openemr/sponsor/5/avatar.svg"></a>
494 <a href="https://opencollective.com/openemr/sponsor/6/website" target="_blank"><img src="https://opencollective.com/openemr/sponsor/6/avatar.svg"></a>
495 <a href="https://opencollective.com/openemr/sponsor/7/website" target="_blank"><img src="https://opencollective.com/openemr/sponsor/7/avatar.svg"></a>
496 <a href="https://opencollective.com/openemr/sponsor/8/website" target="_blank"><img src="https://opencollective.com/openemr/sponsor/8/avatar.svg"></a>
497 <a href="https://opencollective.com/openemr/sponsor/9/website" target="_blank"><img src="https://opencollective.com/openemr/sponsor/9/avatar.svg"></a>