예제 #1
0
//
//STOP FAKE REGISTER GLOBALS
$fake_register_globals = false;
//
require_once dirname(__FILE__) . "/../../interface/globals.php";
require_once dirname(__FILE__) . "/../reminders.php";
//To improve performance and not freeze the session when running this
// report, turn off session writing. Note that php session variables
// can not be modified after the line below. So, if need to do any php
// session work in the future, then will need to remove this line.
session_write_close();
//Remove time limit, since script can take many minutes
set_time_limit(0);
// Set the "nice" level of the process for these reports. When the "nice" level
// is increased, these cpu intensive reports will have less affect on the performance
// of other server activities, albeit it may negatively impact the performance
// of this report (note this is only applicable for linux).
if (!empty($GLOBALS['pat_rem_clin_nice'])) {
    proc_nice($GLOBALS['pat_rem_clin_nice']);
}
//  Start a report, which will be stored in the report_results sql table..
if (!empty($_POST['execute_report_id']) && !empty($_POST['process_type']) && ($_POST['process_type'] == "process" || $_POST['process_type'] == "process_send")) {
    if ($_POST['process_type'] == "process_send") {
        update_reminders_batch_method('', '', $_POST['execute_report_id'], TRUE);
    } else {
        // $_POST['process_type'] == "process"
        update_reminders_batch_method('', '', $_POST['execute_report_id']);
    }
} else {
    echo "ERROR";
}
예제 #2
0
<table>
 <tr>
  <td class='text' align='left' colspan="3"><br>

   <?php 
if ($report_id) {
    // collect log from a previous run to show
    $results_log = collectReportDatabase($report_id);
    $data_log = json_decode($results_log['data'], TRUE);
    $update_rem_log = $data_log[0];
    if ($results_log['type'] == "process_send_reminders") {
        $send_rem_log = $data_log[1];
    }
    echo "<span class='text'>" . xlt("Date of Report") . ": " . text($results_log['date_report']) . "</span><br><br>";
} else {
    $update_rem_log = update_reminders_batch_method();
    $send_rem_log = send_reminders();
}
?>

    <span class="text"><?php 
echo htmlspecialchars(xl('The patient reminders have been updated'), ENT_NOQUOTES) . ":";
?>
</span><br>
      <span class="text"><?php 
echo htmlspecialchars(xl('Total active actions'), ENT_NOQUOTES) . ": " . $update_rem_log['total_active_actions'];
?>
</span><br>
      <span class="text"><?php 
echo htmlspecialchars(xl('Total active reminders before update'), ENT_NOQUOTES) . ": " . $update_rem_log['total_pre_active_reminders'];
?>