Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send and receive encrypted email using PHP

I work at a hospital and have developed a way to estimate the total patient financial responsibility for services, after insurance has paid it's obligation, and before any services are rendered. A lot of patients are calling for quotes, and I wanted to find a secure way to email those results to the patient at their request.

I'm considering removing all patient information from the generated quote, so there would not be any security concerns, but would like to find a way to encrypt the email, send it, and allow the patient's email client to decrypt the email.

I'm not sure how to use security certificates, though they might be the best option for me, even though I'd have to jump through corporate hoops to be granted access to internet facing hosting for certificates, all applications other than email are hospital side only.

I'm also considering creating a PDF from the generated letter and encrypting the PDF, assigning their last four of their social, or some other private info they've shared with us during the quote generation process, as their password.

like image 682
user390955 Avatar asked Jul 13 '10 20:07

user390955


3 Answers

You would be better off sending a link to an SSL encrypted site that has all the information. It would not require any additional software on the client side, and would allow you to have a bit more control and accounting of who is accessing it.

You must of course secure it with username/password of some kind, you could even just use their social security + a generated hash sent in the email. The hash prevents a user from guessing random ssn's.

like image 76
Byron Whitlock Avatar answered Oct 29 '22 11:10

Byron Whitlock


If you're employed by a hospital in the USA, you had better not try to email protected health information. (Similar things are true in other countries.) Even if you scrub the patient's name out of the message, you'll definitely have the patient's email address in the message (duh!). You'll most likely have diagnoses, dates of birth, dates of proposed care, medical record numbers, or account numbers. That's all protected data. Bad. Bad. See here for the regulations, which are rigid.

http://www.hhs.gov/ocr/privacy/hipaa/understanding/summary/index.html

If you want to do this, you must use TLS (https) security, and you must go to some length both to ensure that the person logging in to your secure web site is who they claim to be, and you must log accesses.

Please, if you value your job and your savings account, check with your hospital's privacy officer before sending emails with PHI in them. The ARRA 2009 law makes individuals personally liable for breaches even if they work for corporations. Plus, your hospital does NOT want its name in lights here.

http://www.hhs.gov/ocr/privacy/hipaa/administrative/breachnotificationrule/postedbreaches.html

You could use encrypted email, as long as the unencrypted part (e.g. the subject line) only said "here's the information you requested" or something like that. But, you know, many persons seeking medical care won't be able to cope with a complex addin to their mail client software.

The PGP company offers an encrypted email gateway system that some people with PHI use.

http://www.pgp.com/products/universal_gateway_email/index.html

But you should still check with your privacy officer.

like image 27
O. Jones Avatar answered Oct 29 '22 12:10

O. Jones


I accomplished this about 10 years ago using PGP. GPG is a similar library.

These options may be way too involved for an older user though, as I believe they both involve the recipient installing a certificate of sorts on their end.

Might be a good place to start looking...

like image 44
TomWilsonFL Avatar answered Oct 29 '22 13:10

TomWilsonFL