fix: x12837 billing 5 or 9 digit zip check (#7760)
[openemr.git] / library / ajax / execute_pat_reminder.php
blob4b0a269da146b55402090c5ca2a7bcd2b32cedbb
1 <?php
3 /**
4 * Process/send clinical reminders.
6 * @package OpenEMR
7 * @link https://www.open-emr.org
8 * @author Brady Miller <brady.g.miller@gmail.com>
9 * @copyright Copyright (c) 2012-2018 Brady Miller <brady.g.miller@gmail.com>
10 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
13 require_once(dirname(__FILE__) . "/../../interface/globals.php");
14 require_once(dirname(__FILE__) . "/../reminders.php");
16 use OpenEMR\Common\Csrf\CsrfUtils;
18 if (!CsrfUtils::verifyCsrfToken($_POST["csrf_token_form"])) {
19 CsrfUtils::csrfNotVerified();
22 //Remove time limit, since script can take many minutes
23 set_time_limit(0);
25 // Set the "nice" level of the process for these reports. When the "nice" level
26 // is increased, these cpu intensive reports will have less affect on the performance
27 // of other server activities, albeit it may negatively impact the performance
28 // of this report (note this is only applicable for linux).
29 if (!empty($GLOBALS['pat_rem_clin_nice'])) {
30 proc_nice($GLOBALS['pat_rem_clin_nice']);
33 // Start a report, which will be stored in the report_results sql table..
34 if ((!empty($_POST['execute_report_id']) && !empty($_POST['process_type'])) && (($_POST['process_type'] == "process" ) || ($_POST['process_type'] == "process_send"))) {
35 if ($_POST['process_type'] == "process_send") {
36 update_reminders_batch_method('', '', $_POST['execute_report_id'], true);
37 } else { // $_POST['process_type'] == "process"
38 update_reminders_batch_method('', '', $_POST['execute_report_id']);
40 } else {
41 echo "ERROR";