Document Module Improvements

bradymiller wrote on Monday, April 29, 2013:

Hi,

Here’s a commit to improve the document module and modularize it a bit to allow other apis and scripts to use it:

It is testing well (including with couchdb and direct).

Here are the commit comments explaining things:
-Can now store more than one level of directory structure within the documents directory.
(this information is stored in the new path_depth field in the documents sql table entry)
-Also will use/create random directories (0-10000) when importing a document that is not
mapped to a patient to avoid all the documents being placed into one directory.
-Incorporated into Rod’s pdf report creation in custom report and in the Document module
CCD/CCR document viewer.
-Also created some document functions (such as addNewDocument()) in library/documents.php
to ease importing new documents in API etc.
-Incorporated addNewDocument() function in phimail direct module.
-NOTE that there is a previous bug noted where documents within the CouchDB server will
not work in the Document module CCD/CCR viewer. I did not address this bug on this commit.

Here is an additional commit playing around with a new version of the scanned notes form (not even near completion(and may never be completed), but shows another example of use for the addNewDocument() function):

-brady
OpenEMR

bradymiller wrote on Wednesday, May 01, 2013:

Hi,

Just committed this code to sourceforge (not the scanned note stuff, though).

-brady
OpenEMR

lcmaas3 wrote on Monday, May 13, 2013:

Hi Brady,
glad to see some of our code could be generalized beyond Direct messaging.
Cheers,
Luis