Encryption and Decryption of Documents

From OpenEMR Project Wiki

As a part of modular certification for openEMR, we have implemented an encryption/decryption method using the PHP mcrypt library. The requirements for passing this certification test are as follows:

To Encrypt a document:

  • Go to Administration->globals->features to the bottom of the page. Ensure that "Hide Encryption/Decryption Options In Document Management" is UNCHECKED. This field is checked by default.
  • Browse to a patient
  • Click on "Documents" to bring up their document tree
  • Click on a document in the tree that you would like to encrypt
  • Enter some text in the "Pass Phrase" field, and click "encrypt." This will trigger a download of your encrypted document for you to save to your desktop.

Example of screen to download AND encrypt a document

Download-with-encrypt-v2.png

To Decrypt a document:

  • Go to Administration->globals->features to the bottom of the page. Ensure that "Hide Encryption/Decryption Options In Document Management" is UNCHECKED. This field is checked by default.
  • Browse to a patient
  • Click on "Documents" to bring up their document tree
  • Click on a folder in the tree where you would like to upload your encrypted document
  • Check the box "Encrypted Document."
  • Enter the pass phrase for the document in the "Pass Phrase" field. This must be the same pass phrase that was used to encrypt the document.
  • Click "upload" to upload and decrypt your document. The document is now stored in the openEMR system and can be viewed in its unencrypted state by clicking on teh document and downloading it.

Example of upload with decrypt option

Upload-with-decrypt.png