Merge pull request #1024 for XSS remediation in prescription module
[openemr.git] / ccdaservice / README.md
blob5b12e7bb56a193fe21bd05dd02958ed2c0247bfa
1 # Prepare
3 * Import to database, table background_services: ccdaservice/support/background_services.sql - Now included in database.sql and upgrade 5.0.1
4 * If not already completed, you must install the CCM features using the Modules->Manage Modules click Unregistered tab.
5 * The Carecoordination module setting for Mirth IP must be set to localhost. Menu item: Modules->Manage Modules click in Carecoordination Config, the settings tab.
6 * Ignore any errors that do not throw you back to command prompt when using npm install as some libs need to be compiled and is verbose about it.
8 ## Ubuntu
10 - apt-get remove --purge nodejs npm // Ensures clean install and will allow chance to cleanup.
12 - curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
14 - sudo apt-get install -y nodejs
16 Navigate to: openemr/ccdaservice and run the following to install requires dependencies.
18 - sudo npm install libxmljs -g
20 - sudo npm link libxmljs
22 - sudo npm install --production
24 - sudo npm i node-linux // Not in use at moment - ssmanager handles service process.
26 * If the service is not installed in last step the ssmanager, started by backgroud services, will still start and maintain ccda service.
27 * For portal this is not necessarily true.
29 ## Windows
31 * Download and install node v6.9.5 or 6.1 for your windows version.
32 * Ensure system variable NODE_PATH is set i.e %USERPROFILE%\AppData\Roaming\npm\node_modules
34 ####  - Important to start Node.js cmd prompt as adminisrator.
36 Navigate to: openemr/ccdaservice and run the following:
38 - npm install libxmljs -g
40 - npm install node-windows -g
42 - npm link libxmljs
44 -npm link node-windows
46 - npm install --production
48 * The service will automatically be installed when OpenEMR is log into the first time and with both installs, ccda service is monitored by ssmanager started by background services.
50 ## Developing
51 * Note that these scripts run in strict mode so javascript will hold you very much accountable with how objects and variables are handled.
52 * Important to note that during developement error checking is relaxed, so after CCM sends xml, it waits to receive back document and if document generation errors for some reason either CCM waits till php timeout or you need to restart apache to clear that socket. 99% of the time this is not an issue however, currently CCM doesn't do any supervision on socket communication thus sends and waits. I hate timers but may be solution here.
53 * For now node modules are run local to service directory so all support dependecies are installed there (except libxmljs & node-windows).
55 ## Tools
56 * node winservice is service install/start both Windows and Ubuntu (not currently used in Ubuntu)
57 * node unservice is service uninstall
59 ## License
60                 Copyright 2017 sjpadgett@gmail.com
61                 GNU GPL