Refactor previous name into dedicated service (#7571)
[openemr.git] / modules / sms_email_reminder / batch_reminders.php
blob79d1b3a60224340ac32e14af2440d0a0b86659a6
1 <?php
3 // Copyright (C) 2010 OpenEMR Support LLC
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
9 // comment below exit if plan to use this script
10 exit;
12 $backpic = "";
13 $ignoreAuth = 1;
15 require_once(dirname(__FILE__) . "/../../interface/globals.php");
16 require_once($GLOBALS['srcdir'] . "/maviq_phone_api.php");
17 require_once($GLOBALS['srcdir'] . "/reminders.php");
19 use OpenEMR\Core\Header;
23 <html>
24 <head>
25 <?php Header::setupHeader(); ?>
26 <link rel="stylesheet" href="batchcom.css">
27 </head>
28 <body class="body_top">
29 <span class="title"><?php echo xlt('Patient Reminder Batch Job'); ?></span>
31 <?php
32 // Collect the sender information
33 // TODO
34 // $sender_name
35 // $email_address
39 <table>
40 <tr>
41 <td class='text' align='left' colspan="3"><br />
43 <?php $update_rem_log = update_reminders(); ?>
45 <span class="text"><?php echo xlt('The patient reminders have been updated') . ":"?></span><br />
46 <span class="text"><?php echo xlt('Total active actions') . ": " . text($update_rem_log['total_active_actions']); ?></span><br />
47 <span class="text"><?php echo xlt('Total active reminders before update') . ": " . text($update_rem_log['total_pre_active_reminders']); ?></span><br />
48 <span class="text"><?php echo xlt('Total unsent reminders before update') . ": " . text($update_rem_log['total_pre_unsent_reminders']); ?></span><br />
49 <span class="text"><?php echo xlt('Total active reminders after update') . ": " . text($update_rem_log['total_post_active_reminders']); ?></span><br />
50 <span class="text"><?php echo xlt('Total unsent reminders after update') . ": " . text($update_rem_log['total_post_unsent_reminders']); ?></span><br />
51 <span class="text"><?php echo xlt('Total new reminders') . ": " . text($update_rem_log['number_new_reminders']); ?></span><br />
52 <span class="text"><?php echo xlt('Total updated reminders') . ": " . text($update_rem_log['number_updated_reminders']); ?></span><br />
53 <span class="text"><?php echo xlt('Total inactivated reminders') . ": " . text($update_rem_log['number_inactivated_reminders']); ?></span><br />
54 <span class="text"><?php echo xlt('Total unchanged reminders') . ": " . text($update_rem_log['number_unchanged_reminders']) ;?></span><br />
56 <?php $send_rem_log = send_reminders(); ?>
58 <br /><span class="text"><?php echo xlt('The patient reminders have been sent') . ":"?></span><br />
59 <span class="text"><?php echo xlt('Total unsent reminders before sending process') . ": " . text($send_rem_log['total_pre_unsent_reminders']); ?></span><br />
60 <span class="text"><?php echo xlt('Total unsent reminders after sending process') . ": " . text($send_rem_log['total_post_unsent_reminders']); ?></span><br />
61 <span class="text"><?php echo xlt('Total successful reminders sent via email') . ": " . text($send_rem_log['number_success_emails']); ?></span><br />
62 <span class="text"><?php echo xlt('Total failed reminders sent via email') . ": " . text($send_rem_log['number_failed_emails']); ?></span><br />
63 <span class="text"><?php echo xlt('Total successful reminders sent via phone') . ": " . text($send_rem_log['number_success_calls']); ?></span><br />
64 <span class="text"><?php echo xlt('Total failed reminders sent via phone') . ": " . text($send_rem_log['number_unchanged_reminders']); ?></span><br />
66 <br /><span class="text"><?php echo xlt('(Email delivery is immediate, while automated VOIP is sent to the service provider for further processing.)'); ?></span><br /><br />
67 </td>
68 </tr>
69 </table>
70 <br /><br />
71 </body>
72 </html>