Beispiel #1
0
require_once "{$srcdir}/classes/InsuranceCompany.class.php";
require_once "{$srcdir}/classes/Document.class.php";
require_once "{$srcdir}/options.inc.php";
require_once "../history/history.inc.php";
require_once "{$srcdir}/formatting.inc.php";
require_once "{$srcdir}/edi.inc";
require_once "{$srcdir}/invoice_summary.inc.php";
require_once "{$srcdir}/clinical_rules.php";
if ($GLOBALS['concurrent_layout'] && isset($_GET['set_pid'])) {
    include_once "{$srcdir}/pid.inc";
    setpid($_GET['set_pid']);
}
$active_reminders = false;
if ((!isset($_SESSION['alert_notify_pid']) || $_SESSION['alert_notify_pid'] != $pid) && isset($_GET['set_pid']) && acl_check('patients', 'med') && $GLOBALS['enable_cdr'] && $GLOBALS['enable_cdr_crp']) {
    // showing a new patient, so check for active reminders
    $active_reminders = active_alert_summary($pid, "reminders-due");
}
function print_as_money($money)
{
    preg_match("/(\\d*)\\.?(\\d*)/", $money, $moneymatches);
    $tmp = wordwrap(strrev($moneymatches[1]), 3, ",", 1);
    $ccheck = strrev($tmp);
    if ($ccheck[0] == ",") {
        $tmp = substr($ccheck, 1, strlen($ccheck) - 1);
    }
    if ($moneymatches[2] != "") {
        return "\$ " . strrev($tmp) . "." . $moneymatches[2];
    } else {
        return "\$ " . strrev($tmp);
    }
}
Beispiel #2
0
    //CDR Engine stuff
    if ($GLOBALS['enable_allergy_check'] && $GLOBALS['enable_alert_log']) {
        //Check for new allergies conflicts and throw popup if any exist(note need alert logging to support this)
        $new_allergy_alerts = allergy_conflict($pid, 'new', $_SESSION['authUser']);
        if (!empty($new_allergy_alerts)) {
            $pop_warning = '<script type="text/javascript">alert(\'' . xls('WARNING - FOLLOWING ACTIVE MEDICATIONS ARE ALLERGIES') . ':\\n';
            foreach ($new_allergy_alerts as $new_allergy_alert) {
                $pop_warning .= addslashes($new_allergy_alert) . '\\n';
            }
            $pop_warning .= '\')</script>';
            echo $pop_warning;
        }
    }
    if ((!isset($_SESSION['alert_notify_pid']) || $_SESSION['alert_notify_pid'] != $pid) && isset($_GET['set_pid']) && $GLOBALS['enable_cdr_crp']) {
        // showing a new patient, so check for active reminders and allergy conflicts, which use in active reminder popup
        $active_reminders = active_alert_summary($pid, "reminders-due", '', 'default', $_SESSION['authUser'], TRUE);
        if ($GLOBALS['enable_allergy_check']) {
            $all_allergy_alerts = allergy_conflict($pid, 'all', $_SESSION['authUser'], TRUE);
        }
    }
}
function print_as_money($money)
{
    preg_match("/(\\d*)\\.?(\\d*)/", $money, $moneymatches);
    $tmp = wordwrap(strrev($moneymatches[1]), 3, ",", 1);
    $ccheck = strrev($tmp);
    if ($ccheck[0] == ",") {
        $tmp = substr($ccheck, 1, strlen($ccheck) - 1);
    }
    if ($moneymatches[2] != "") {
        return "\$ " . strrev($tmp) . "." . $moneymatches[2];