I got my instance setup sending email notifications with mailgun, that works fine I’ve already tested it and it successfully sends any of the default reminders after I enable it in: Administration > Practice > Rules
What I can’t figure out is how to send appointment reminders, I’ve made an appointment for a patient and I expect it to send them an email notification once the appointment is scheduled.
I added this to my cron as it specifies in the wiki:
Could you resolve the sending of the mail? I’ve wanted to do it for a long time, but it doesn’t work for me. Please, could you tell me how you configured the rule to send mail.
Thanks You very much.
luis
@luisuriarte unfortunately I have not figured it out yet, I do know it involves messing around with Practice Rules and the Batchcomm, when I figure it out I will write up a tutorial and share it with the community.
Tank You.
I was able to manage to send messages, but they are sent to all patients, whether or not they have appointments (alone, installing simple, basic postfix) on my centos. They do not load the variables in the mail appears (Only NAME): "Name Bartholomew SIMPSON. You have a turn at our clinic with the doctor *** PROVIDER *** on the day *** DATE *** at the time ** * DATE ***. Please show up 15 minutes early. Thank you very much. "… only *** Name *** load.
Hello. He was able to advance something. I have reviewed many scripts, but I can’t find the use of PROVIDER, DATE, STARTTIME, ENDTIME variables, just this NAME … I don’t understand how this works. Could someone use these variables?
You can check here. Years ago we had a PR that lay dormant so finally deleted that branch. But you can also put together texts tied to various reminders in html format. Standard code currently send this email that is like a sms and looks unprofessional.
Thanks for that but what we really want to know is how to set it up so it works in Open EMR like what exactly needs to be configured/happen in order for the system send an email when an appointment is made in the calendar and it sends an email reminder a day before the appointment date if that makes sense.
It has been long time but have you ensured your system is able to send email from cron using Example #1 Sending mail? Once you get that email working, you need to replace that php script by xxx/openemr/modules/sms_email_reminder/cron_email_notification.php in that job.
Now you narrowed problem to message selection logic in the script and actual sendmail process in the ealier link.
Email sending works fine it’s figuring out the facility rules in order to get an appointment email reminder that has me and everyone else confused. There’s no clear directions on how to get that working.
HI @benmarte,
First let me say I do not know how Reminders work either in openemr, which lead to building MedEx. You are welcome of course to use MedEx as Reminders are one of the things it does, but you may prefer to roll your own.
If you decide to take the “build it” route, You can find the queries to build reminders based on appt time, provider, facility appt status and appt type in the file library/MedEx/API.php, class Events, function generate. Attach it to a cron command and you are off.
However I would urge you to take a look at the new API features in > 6.0.0. Really transformative work. I think these REST/Smart on FHIR interfaces will serve as a basis to build out anything you want. I am looking to rebuild MedEx and will need to add to the functionality of these APIs, but the future there is bright…
There is another very powerful tool for reminders already in OpenEMR in the Clinical Reminders tool. There is a PR that simplifies this section of OpenEMR so clinicians users can understand what it can do, without sacrificing its ability to build super powerful functions. It needs work.
One of the many things it includes the ability to build reminders for ANYTHING. That part needs to be integrated into a Reminders backend. With a little more work, it will be able to marry outgoing messaging features right in OpenEMR to build anything you want: dietary programs, smoking cessation programs etc. It is not 6.0.1 but 5.01-2 probably.
Has anyone managed to get appointment reminders to work, etc? I have version 6.0.0(3) in xampp with win and mercury. In 5.0.2(5) despite @arnabnaha 's tutorial I have not succeeded.
Greetings.
I did it…
I was finally able to send appointment reminder emails to patients.
Update the cron_email_notification.php and cron_functions.php scripts that are in openemr/modules/sms_email_reminder/.
Use the phpMailer class.
I couldn’t run it via cron: php ./cron_email_notification.php (error: Invalid URLRequest with site id ‘’ contains invalid characters., on Windows same error).
It only runs fine from the browser: http://localhost/openemr/modules/sms_email_reminder/cron_email_notification.php
Update openemr_postcalendar_events table (pc_appstatus = MAIL and pcsendalertmail = YES) and insert log into notification_log table.
Only 2 questions
1- How do I make it work with cron?
2- How to decrypt $GLOBALS[‘SMTP_PASS’] to use it with phpMailer: $mail->Password = $GLOBALS[‘SMTP_PASS’]; ?
Full directory attached.
Thank you very much.
Regards.
Luis. sms_email_reminder.7z (93.9 KB)