Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Prescription Email Feature #7480

Closed
adunsulag opened this issue Jun 13, 2024 · 2 comments · Fixed by #7495
Closed

feat: Prescription Email Feature #7480

adunsulag opened this issue Jun 13, 2024 · 2 comments · Fixed by #7495
Assignees
Milestone

Comments

@adunsulag
Copy link
Sponsor Member

User Stories:
As a prescriber I want to be able to send an email with the prescription information to a dispenser's email address. I want to see an error message if my system's email configuration is not setup correctly. I want the option to send the prescription as a text message in the email body or be able to send the email as an attached pdf.

As an admin I want to be able to have the email prescription feature turned off with the option to turn it on in the OpenEMR configuration.

Details:
Most regulatory environments do not allow for emailing prescriptions as email is considered insecure for HIPAA environments. However, some regulatory jurisdictions specifically require the use of secure email for e-prescriptions and we need to support that use case.

@adunsulag adunsulag added this to the 7.0.2.2 milestone Jun 13, 2024
@adunsulag adunsulag self-assigned this Jun 13, 2024
@adunsulag
Copy link
Sponsor Member Author

Interestingly we had a send email prescription feature in the codebase as far back as 2005 looking at the code. The workflow was removed in 2012 by someone's refactoring and never included back into the codebase.

My plan is to use our default openemr email configuration setup for this use case.

adunsulag added a commit to DiscoverAndChange/openemr that referenced this issue Jun 18, 2024
Currently a work in progress.  This supports sending a prescription as a
pdf to an email address, sending the prescription inline as a formatted
html email, and sending the prescription in the native mail client using
the mailto: protocol.  Mailto: doesn't support email attachments so the
pdf option currently doesn't work with this.

I've looked at potentially generating an EML file that will have the pdf
file inlined to support that sending option.  If that doesn't work I'll
need to disable the pdf option when the Use Default Mail Client option
is selected.

When the Default Mail Client is selected (openemr#7494) then the mailto link is
generated and if the browser or operating system has a mailto: protocol
handler setup it will launch the registered handler with the subject and
email body populated.

I need to test on prescription lists greater than 3 (for handling with
paginations).

I also need to make sure I haven't broken any of the faxing and other
prescription sending functionality.

Also, if anyone has customized these views this will have an impact on
them so putting this PR out there for people to comment on as needed.
@adunsulag adunsulag reopened this Jun 18, 2024
@adunsulag
Copy link
Sponsor Member Author

Issue is a WIP, should not have been closed.

adunsulag added a commit that referenced this issue Jul 3, 2024
* Prep template to be moved to twig

* #7480 #7494 email prescriptions

This supports sending a prescription as a
pdf to an email address, sending the prescription inline as a formatted
html email, and sending the prescription in the native mail client using
the mailto: protocol.  Mailto: doesn't support email attachments so the
pdf option currently doesn't work with this.

When the Default Mail Client is selected (#7494) then the mailto link is
generated and if the browser or operating system has a mailto: protocol
handler setup it will launch the registered handler with the subject and
email body populated.

* Initial refactor to make edit page extensible

* Fixes #7496 move erx general edit to twig

Made it so the edit prescription dialog is in twig instead of in the old
html format.  This fixes #7496.  I've done some testing but probably
need to do more testing to verify we've handled all the use cases.

* Form save button position, bug fixes

Fixed a bug in the eye base where the window closing wasn't working
properly.

Moved the prescription action buttons out of the demographics.php file
and put them directly into the prescription dialog forms.

This helps fix some UX buttons flow issues as well as allows us to move
the buttons around as needed in the form.

Added a feature to have the form buttons on top of the form or on the
bottom.  Tried to have an option to show both top and bottom but that
fails in demographics.  I put the option in the demographics as well as
in the prescriptions form.  Hopefully other forms will follow suite and
allow the customization.

* Fix escaping issue.

* Not sure how this got left out but it did.

* Fixes #7525, #7524 prescription faxing

Made it so the prescription pdf faxing button will ask you to continue
printing if the signature isn't setup properly (at least to let users
know about it). Fixes #7525.

Fixed some php8 typecast errors preventing the pdf signature from
printing in the print to fax button for prescriptions. #7525.

* Switch to promise for erx dialog

* Handling variable escaping.

* Mark deprecated function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant