Browse Source

custom modules

main
Ken Schaefer 2 years ago
parent
commit
d0f6d1fcad
  1. 41
      Runbooks/openemr-dev-custom-modules
  2. 43
      Runbooks/openemr-dev-env-docker.md

41
Runbooks/openemr-dev-custom-modules

@ -0,0 +1,41 @@
# OpenEMR Custom Modules
## INTRODUCTION
Why use a module
- Package of functionality independent of the core app
- Administrators can manage functionality
- SOLID
Geared toward small scale projects. For larger, more complex modules you may want to use the Laminas framework.
## CUSTOM SQL
During installation of the module, OpenEMR will run
table.sql
## FORK THE SKELETON FRAMEWORK
1. Go to adunsulag/oe-module-custom-skeleton in GitHub
2. Click the Fork button to make a fork in your GitHub
## INSTALL SKELETON FRAMEWORK
Take the time to read the instructions provided in the GitHub repo
1. Launch your development IDE and open OpenEMR
2. Change to the /interface/modules/custom_modules directory
3. Clone your fork
```git
git clone git@github.com:KenSchae/oe-module-cutom-skeleton.git
```
## UPDATE composer.json
```
"psr-4": {
"OpenEMR\\": "src",
"OpenEMR\\Modules\\CustomModuleSkeleton\\": "interface/modules/custom_modules/oe-module-custom-skeleton/src/"
}
```
Run from the docker folder /docker/development-easy
`composer dump-autoload`
## REFERENCES
- [OpenEMR Modules YouTube](https://youtu.be/LYA8MosIWF0)

43
Runbooks/openemr-dev-env-docker.md

@ -1,16 +1,21 @@
# OpenEMR Development Environment (Docker) # OpenEMR Development Environment (Docker)
## TABLE OF CONTENTS ## TABLE OF CONTENTS
- [Build Development Server](#build-development-server) - [OpenEMR Development Environment (Docker)](#openemr-development-environment-docker)
- [Connect Workstation to Server](#connect-workstation-to-server) - [TABLE OF CONTENTS](#table-of-contents)
- [Config Server](#config-server) - [BUILD DEVELOPMENT SERVER](#build-development-server)
- [Install OpenEMR-cmd](#install-openemr-cmd) - [CONNECT WORKSTATION TO SERVER](#connect-workstation-to-server)
- [Fork the GitHub Repo](#fork-the-github-repo) - [CONFIG SERVER](#config-server)
- [Start the Dockers](#start-the-dockers) - [INSTALL OPENEMR-CMD](#install-openemr-cmd)
- [Test OpenEMR](#test-openemr) - [FORK THE GITHUB REPO](#fork-the-github-repo)
- [Sling Some Code](#sling-some-code) - [START THE DOCKERS](#start-the-dockers)
- [Sample Patient Data](#sample-patient-data-with-synthea) - [BUILD](#build)
- [References](#references) - [TEST OPENEMR](#test-openemr)
- [SLING SOME CODE](#sling-some-code)
- [SAMPLE PATIENT DATA WITH SYNTHEA](#sample-patient-data-with-synthea)
- [MANAGE DOCKERS](#manage-dockers)
- [Resetting the environment](#resetting-the-environment)
- [REFERENCES](#references)
## BUILD DEVELOPMENT SERVER ## BUILD DEVELOPMENT SERVER
The OpenEMR video series (and many home lab tutorials) walk you through creating a Linux VM to develop with. The assumption in these videos is that you will use the VM as a workstation AND as a server: everything in one box. I don't like that approach. My preference is to create the VM as a server and then connect to the server from a workstation. The OpenEMR video series (and many home lab tutorials) walk you through creating a Linux VM to develop with. The assumption in these videos is that you will use the VM as a workstation AND as a server: everything in one box. I don't like that approach. My preference is to create the VM as a server and then connect to the server from a workstation.
@ -55,6 +60,19 @@ Host arbitrary-name-that-displays-in-vscode
5. `docker ps` there are 5 dockers for the OpenEMR environment 5. `docker ps` there are 5 dockers for the OpenEMR environment
6. `openemr-cmd dl` keep running this until the docker is done building (e.g.Apache is running) 6. `openemr-cmd dl` keep running this until the docker is done building (e.g.Apache is running)
### BUILD
If using OpenEMR directly from the code repository, then the following commands will build OpenEMR (Node.js version 16.* is required). This should be done from inside of the docker container
`openemr-cmd s`
```shell
composer install --no-dev
npm install
npm run build
composer dump-autoload -o
```
## TEST OPENEMR ## TEST OPENEMR
1. Open a browser 1. Open a browser
2. http://hostname-or-ip-of-server:8300 2. http://hostname-or-ip-of-server:8300
@ -78,6 +96,11 @@ Host arbitrary-name-that-displays-in-vscode
4. Let's be real, I like all donuts 4. Let's be real, I like all donuts
5. I am the Homer Simpson of full stack developers 5. I am the Homer Simpson of full stack developers
## MANAGE DOCKERS
### Resetting the environment
## REFERENCES ## REFERENCES
- [OpenEMR Development Docker Environment](https://github.com/openemr/openemr/blob/master/CONTRIBUTING.md#starting-with-openemr-development-docker-environment) - [OpenEMR Development Docker Environment](https://github.com/openemr/openemr/blob/master/CONTRIBUTING.md#starting-with-openemr-development-docker-environment)
- [Presentation Slides](https://docs.google.com/presentation/d/13VhN_uL-YptFtM1qv3pJ6DwhMnz9tNrAtUSbMEpHMLU/edit#slide=id.p) - [Presentation Slides](https://docs.google.com/presentation/d/13VhN_uL-YptFtM1qv3pJ6DwhMnz9tNrAtUSbMEpHMLU/edit#slide=id.p)

Loading…
Cancel
Save