#174 CouchDB implementation

closed-accepted
nobody
None
5
2015-01-13
2012-03-06
No

Hi,

This is an API for storing the documents in Apache CouchDB instead of in the disk. It is implemented in such a way that it is configurable whether to store the documents only in the disk or CouchDB or in both. The CouchDB has got a good replication feature which will make it easy to have a copy of documents in another system. We think this feature will be useful when the documents total size grows into GBs.

Even though CouchDB is not officially supported in Windows an unofficial version is available here:

1) http://wiki.apache.org/couchdb/Installing_on_Windows
2) https://github.com/downloads/dch/couchdb/setup-couchdb-1.1.1_js185_otp_R14B03+fix-win32-crypto.exe

Linux version is available here:

1) http://couchdb.apache.org/downloads.html

We have implemented this feature in Documents upload/download screen in Patient Demographics. This feature also can be used for storing the following files:

1) Generated X12 file
2) Generated PDF file
3) ERA file

We will implement it after getting the feedback from the community.

Configuring:

1) Install the Apache CouchDB.
2) If installation is success, normally it will be available on port number 5984.
3) It can be reached through the browser (http://localhost:5984).
4) Basic administration utility will be available in http://localhost:5984/_utils.
5) 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.
6) Enable CouchDB from GLOBALS->Features->Document Storage Method.

Please note that this is a test feature which we are using in our own servers. Welcome for the comments from the community.

Git Hub Path:
https://github.com/zhhealthcare/openemr/commit/a6eba8773aec7e1e51e67385011e2cf2b90739c2

Thanks & Regards
Vinish K
ZH HealthCare

Discussion

  • Brady Miller

    Brady Miller - 2012-03-06

    Hi,
    This would be a really nice feature to support. Placed a review on github. For the next review iteration, will plan to try testing it out.
    thanks,
    -brady

     
  • Brady Miller

    Brady Miller - 2012-03-10

    Hi Vinish,
    Placed a review on github.
    thanks,
    -brady

     
  • Brady Miller

    Brady Miller - 2012-03-13

    Hi Vinish,
    Placed review on github.
    thanks,
    -brady

     
  • ZH Healthcare

    ZH Healthcare - 2012-03-20

    Hi Brady,
    A new commit is made and is available at the following link

    https://github.com/zhhealthcare/openemr/commit/01de04b9b80dafe7319f0f806dafc7dfdf1f528d.

    Regarding log , it is mainly aimed for the developers and not for users. We think it will be useful at the initial phase, and after successful implementation for sometime we can completely remove the logs.

    Regards
    Eldho
    zhservices.com

     
  • Brady Miller

    Brady Miller - 2012-03-28

    Hi Eldho,
    Placed a code review on github.
    thanks,
    -brady

     
  • Kevin Yeh

    Kevin Yeh - 2012-03-28

    Here are my 2 cents on this feature.
    It is a very complicated solution for a not so real problem.
    The main advantage I see is this feature providing is that CouchDB allows you to move your documents store to a seperate machine when it starts to become large for scalability.

    However, why not just create a symbolic link in the sites directory to a remote server? You'd encounter far less overhead than using CouchDB and there wouldn't be all this additional complexity.

    If this feature somehow added the document searching features which CouchDB is better at than MySQL, it might make sense, but if the goal is simply scalability/replication, this approach seems like overkill.

     
  • Kevin Yeh

    Kevin Yeh - 2012-03-28

    Another advantage of simply using symbolic links/file system mount points in the sites directory would be that you could even spread the file system load across multiple other file servers on a per site basis for further scalability.

     
  • Brady Miller

    Brady Miller - 2012-03-28

    Hi,
    There is also replication and load balancing that can be done with couchdb. Since a group has spent time implementing this feature, this generally means it will be useful to others (although, I agree, this group will be small). If there are questions to the merit of including this feature in the official codebase, then we should discuss this in the forums to see what others think.
    -brady

     
  • Brady Miller

    Brady Miller - 2012-05-01

    Hi Eldho,
    Aren't you missing the library/classes/CouchDB.class.php script???
    -brady

     
  • Brady Miller

    Brady Miller - 2012-05-05

    Hi Eldho,

    Placed a review on github. Only issue I brought up is the hashing issues which we need to be careful about because this is something that is required for certfication. Also, for next revision, ensure you keep the nice descriptive commit comment (since I am guessing the next revision will get committed to sourceforge).

    thanks,
    -brady

     
  • Brady Miller

    Brady Miller - 2012-05-10

    Hi Eldho,
    I just committed this to sourceforge. Thanks again for another awesome contribution.
    -brady

     
  • Brady Miller

    Brady Miller - 2012-05-10
    • status: open --> closed-accepted
     
  • Brady Miller

    Brady Miller - 2012-05-23

    Hi Vinish,
    Just committed this bug fix to sourceforge.
    thanks,
    -brady

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks