Difference between revisions of "CouchDB Documents Module"
From OpenEMR Project Wiki
Bradymiller (talk | contribs) |
Bradymiller (talk | contribs) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 20: | Line 20: | ||
# Initially it is running without username and password with all privileges. This can be reset by going to CouchDB\etc\couchdb\local.ini. In the lower side uncomment the ;admin = mysecretpassword . Put the desired password. On restarting the couchDB, this will take effect and also the password set will be hashed in the local.ini. | # Initially it is running without username and password with all privileges. This can be reset by going to CouchDB\etc\couchdb\local.ini. In the lower side uncomment the ;admin = mysecretpassword . Put the desired password. On restarting the couchDB, this will take effect and also the password set will be hashed in the local.ini. | ||
# Enable CouchDB from [[Administration_Globals#Document_Storage_Method|Administration->Globals->Documents->Document Storage Method]] and enter the CouchDB Hostname, CouchDB UserName, CouchDB Password, CouchDB Port, CouchDB Database. More information on these settings can be found [[Administration_Globals#Document_Storage_Method|HERE]]. | # Enable CouchDB from [[Administration_Globals#Document_Storage_Method|Administration->Globals->Documents->Document Storage Method]] and enter the CouchDB Hostname, CouchDB UserName, CouchDB Password, CouchDB Port, CouchDB Database. More information on these settings can be found [[Administration_Globals#Document_Storage_Method|HERE]]. | ||
# Also can set up SSL connection between OpenEMR and CouchDB, which is overviewed here: https://github.com/openemr/openemr/blob/master/sites/default/documents/certificates/README.md | |||
==Potential Benefits== | |||
:*<span style='color:red;'>Although there are potential benefits, note this feature should only be used by users with technical proficiency. Using this feature will require devising your own backup solution for your patient documents (the OpenEMR backup mechanisms do NOT backup documents within the CouchDB database).</span> | |||
:*Replication is very easy. Support Master to master replication | |||
:*Instead of scattered in the disk as separate files it is stored as one file. Copying of one file is much faster than copying quiet a large number of files. | |||
:*In real, heavily loaded work environment an immediate fail over is necessary. This can be achieved for MYsql using its replication feature but for documents , may have to depend on rsync,fsync etc. We think it is much robust to depend on the program itself. | |||
:*If replication is implemented backup processes can be shifted to replication server which will avoid the load on rhe main server. | |||
:*For vendors they can separate the application server, mysql server and CouchDB server to separate machines , which will help them to scale up. If some more modification is done the site folder is necessary only for sqlconf.php | |||
:*If somebody has to use load balancer's storing documents in site folders will make it difficult. | |||
:*Work involving documents can be much easily handled. For Eg-: if robust email sending has to be developed including the attachments it is much easy to implement in couchdb, as it supports attachments to documents. | |||
:*In essence this may not be an attractive option for small clinics but for clinics of medium size (around 100 patient visits) and Vendors who wants to scale up will benefit from couchdb in the long run. | |||
:*Can choose the compression level in the couchdb | |||
:*Speed has not been bench marked, but having a db with size above 40GB but does not felt any slowness for reading documents. | |||
:*It is using an B-tree index. | |||
:*It is scalable. | |||
==Future Plans== | ==Future Plans== | ||
Line 27: | Line 43: | ||
:# ERA file | :# ERA file | ||
[[Category:Configuration Guide]] | |||
[[Category:User Guide 4.1.2]][[Category:User Guide 4.1.1]][[Category:User Guide]][[Category:Configuration Guide]] |
Latest revision as of 07:06, 15 August 2020
Overview
- This feature should only be used by users with technical proficiency. Using this feature will require devising your own backup solution for your patient documents (the OpenEMR backup mechanisms do NOT backup documents within the CouchDB database).
Installing CouchDB
Windows
- Even though CouchDB is not officially supported in Windows, an unofficial version is available here:
Linux
- Linux version is available here:
Configuring OpenEMR to use CouchDB
- Install the Apache CouchDB. (see above)
- If installation is success, normally it will be available on port number 5984.
- It can be reached through the browser (http://localhost:5984).
- Basic administration utility will be available in http://localhost:5984/_utils.
- Initially it is running without username and password with all privileges. This can be reset by going to CouchDB\etc\couchdb\local.ini. In the lower side uncomment the ;admin = mysecretpassword . Put the desired password. On restarting the couchDB, this will take effect and also the password set will be hashed in the local.ini.
- Enable CouchDB from Administration->Globals->Documents->Document Storage Method and enter the CouchDB Hostname, CouchDB UserName, CouchDB Password, CouchDB Port, CouchDB Database. More information on these settings can be found HERE.
- Also can set up SSL connection between OpenEMR and CouchDB, which is overviewed here: https://github.com/openemr/openemr/blob/master/sites/default/documents/certificates/README.md
Potential Benefits
- Although there are potential benefits, note this feature should only be used by users with technical proficiency. Using this feature will require devising your own backup solution for your patient documents (the OpenEMR backup mechanisms do NOT backup documents within the CouchDB database).
- Replication is very easy. Support Master to master replication
- Instead of scattered in the disk as separate files it is stored as one file. Copying of one file is much faster than copying quiet a large number of files.
- In real, heavily loaded work environment an immediate fail over is necessary. This can be achieved for MYsql using its replication feature but for documents , may have to depend on rsync,fsync etc. We think it is much robust to depend on the program itself.
- If replication is implemented backup processes can be shifted to replication server which will avoid the load on rhe main server.
- For vendors they can separate the application server, mysql server and CouchDB server to separate machines , which will help them to scale up. If some more modification is done the site folder is necessary only for sqlconf.php
- If somebody has to use load balancer's storing documents in site folders will make it difficult.
- Work involving documents can be much easily handled. For Eg-: if robust email sending has to be developed including the attachments it is much easy to implement in couchdb, as it supports attachments to documents.
- In essence this may not be an attractive option for small clinics but for clinics of medium size (around 100 patient visits) and Vendors who wants to scale up will benefit from couchdb in the long run.
- Can choose the compression level in the couchdb
- Speed has not been bench marked, but having a db with size above 40GB but does not felt any slowness for reading documents.
- It is using an B-tree index.
- It is scalable.
Future Plans
- This feature currently stores patient documents in CouchDB. Also plan to support storing of the following documents in CouchDB in the future:
- Generated X12 file
- Generated PDF file
- ERA file