full tab fixes to stop scroll of tab and not show bottom border of active tab (#407)
[openemr.git] / interface / batchcom / batch_reminders.php
blob59e7bb954df4028d9bf90474f607a180df44300a
1 <?php
2 // Copyright (C) 2010 OpenEMR Support LLC
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License
5 // as published by the Free Software Foundation; either version 2
6 // of the License, or (at your option) any later version.
8 //SANITIZE ALL ESCAPES
9 $sanitize_all_escapes=true;
11 //STOP FAKE REGISTER GLOBALS
12 $fake_register_globals=false;
14 require_once(dirname(__FILE__)."/../../interface/globals.php");
15 require_once ($GLOBALS['srcdir'] . "/classes/postmaster.php");
16 require_once ($GLOBALS['srcdir'] . "/maviq_phone_api.php");
17 require_once($GLOBALS['srcdir'] . "/reminders.php");
18 require_once($GLOBALS['srcdir'] . "/report_database.inc");
20 //To improve performance and not freeze the session when running this
21 // report, turn off session writing. Note that php session variables
22 // can not be modified after the line below. So, if need to do any php
23 // session work in the future, then will need to remove this line.
24 session_write_close();
26 //Remove time limit, since script can take many minutes
27 set_time_limit(0);
29 // If report_id, then just going to show the report log
30 $report_id = ($_GET['report_id']) ? $_GET['report_id'] : "";
32 // Set the "nice" level of the process for this script when. When the "nice" level
33 // is increased, this cpu intensive script will have less affect on the performance
34 // of other server activities, albeit it may negatively impact the performance
35 // of this script (note this is only applicable for linux).
36 if (empty($report_id) && !empty($GLOBALS['pat_rem_clin_nice'])) {
37 proc_nice($GLOBALS['pat_rem_clin_nice']);
41 <html>
42 <head>
43 <?php html_header_show();?>
44 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
45 <link rel="stylesheet" href="batchcom.css" type="text/css">
46 </head>
47 <body class="body_top">
48 <span class="title"><?php echo htmlspecialchars(xl('Patient Reminder Batch Job'), ENT_NOQUOTES)?></span>
50 <?php
51 // Collect the sender information
52 // TODO
53 // $sender_name
54 // $email_address
58 <table>
59 <tr>
60 <td class='text' align='left' colspan="3"><br>
62 <?php if ($report_id) {
63 // collect log from a previous run to show
64 $results_log = collectReportDatabase($report_id);
65 $data_log = json_decode($results_log['data'],TRUE);
66 $update_rem_log = $data_log[0];
67 if ($results_log['type'] == "process_send_reminders") {
68 $send_rem_log = $data_log[1];
70 echo "<span class='text'>" . xlt("Date of Report") . ": " . text($results_log['date_report']) . "</span><br><br>";
72 else {
73 $update_rem_log = update_reminders_batch_method();
74 $send_rem_log = send_reminders();
78 <span class="text"><?php echo htmlspecialchars(xl('The patient reminders have been updated'), ENT_NOQUOTES) . ":"?></span><br>
79 <span class="text"><?php echo htmlspecialchars(xl('Total active actions'), ENT_NOQUOTES) . ": " . $update_rem_log['total_active_actions'];?></span><br>
80 <span class="text"><?php echo htmlspecialchars(xl('Total active reminders before update'), ENT_NOQUOTES) . ": " . $update_rem_log['total_pre_active_reminders'];?></span><br>
81 <span class="text"><?php echo htmlspecialchars(xl('Total unsent reminders before update'), ENT_NOQUOTES) . ": " . $update_rem_log['total_pre_unsent_reminders'];?></span><br>
82 <span class="text"><?php echo htmlspecialchars(xl('Total active reminders after update'), ENT_NOQUOTES) . ": " . $update_rem_log['total_post_active_reminders'];?></span><br>
83 <span class="text"><?php echo htmlspecialchars(xl('Total unsent reminders after update'), ENT_NOQUOTES) . ": " . $update_rem_log['total_post_unsent_reminders'];?></span><br>
84 <span class="text"><?php echo htmlspecialchars(xl('Total new reminders'), ENT_NOQUOTES) . ": " . $update_rem_log['number_new_reminders'];?></span><br>
85 <span class="text"><?php echo htmlspecialchars(xl('Total updated reminders'), ENT_NOQUOTES) . ": " . $update_rem_log['number_updated_reminders'];?></span><br>
86 <span class="text"><?php echo htmlspecialchars(xl('Total inactivated reminders'), ENT_NOQUOTES) . ": " . $update_rem_log['number_inactivated_reminders'];?></span><br>
87 <span class="text"><?php echo htmlspecialchars(xl('Total unchanged reminders'), ENT_NOQUOTES) . ": " . $update_rem_log['number_unchanged_reminders'];?></span><br>
89 <?php if ($results_log['type'] != "process_reminders") { ?>
90 <br><span class="text"><?php echo htmlspecialchars(xl('The patient reminders have been sent'), ENT_NOQUOTES) . ":"?></span><br>
91 <span class="text"><?php echo htmlspecialchars(xl('Total unsent reminders before sending process'), ENT_NOQUOTES) . ": " . $send_rem_log['total_pre_unsent_reminders'];?></span><br>
92 <span class="text"><?php echo htmlspecialchars(xl('Total unsent reminders after sending process'), ENT_NOQUOTES) . ": " . $send_rem_log['total_post_unsent_reminders'];?></span><br>
93 <span class="text"><?php echo htmlspecialchars(xl('Total successful reminders sent via email'), ENT_NOQUOTES) . ": " . $send_rem_log['number_success_emails'];?></span><br>
94 <span class="text"><?php echo htmlspecialchars(xl('Total failed reminders sent via email'), ENT_NOQUOTES) . ": " . $send_rem_log['number_failed_emails'];?></span><br>
95 <span class="text"><?php echo htmlspecialchars(xl('Total successful reminders sent via phone'), ENT_NOQUOTES) . ": " . $send_rem_log['number_success_calls'];?></span><br>
96 <span class="text"><?php echo htmlspecialchars(xl('Total failed reminders sent via phone'), ENT_NOQUOTES) . ": " . $send_rem_log['number_unchanged_reminders'];?></span><br>
98 <br><span class="text"><?php echo htmlspecialchars(xl('(Email delivery is immediate, while automated VOIP is sent to the service provider for further processing.)'), ENT_NOQUOTES)?></span><br>
99 <?php } // end of ($results_log['type'] != "process_reminders") ?>
101 <?php if (report_id) { ?>
102 <br><input type="button" value="<?php echo htmlspecialchars(xl('Back'), ENT_QUOTES); ?>" onClick="top.restoreSession(); window.open('../reports/report_results.php','_self',false)"><br><br><br>
103 <?php } else { ?>
104 <br><input type="button" value="<?php echo htmlspecialchars(xl('Close'), ENT_QUOTES); ?>" onClick="window.close()"><br><br><br>
105 <?php } ?>
107 </td>
108 </tr>
109 </table>
110 <br><br>
111 </body>
112 </html>