Пример #1
0
}
if ($userRole['newcrop_user_role'] == 'doctor' || $page == 'renewal') {
    LicensedPrescriber($doc, $r);
}
if ($userRole['newcrop_user_role'] == 'manager' || $userRole['newcrop_user_role'] == 'admin' || $userRole['newcrop_user_role'] == 'nurse') {
    Staff($doc, $r);
}
if ($userRole['newcrop_user_role'] == 'supervisingDoctor') {
    SupervisingDoctor($doc, $r);
}
if ($userRole['newcrop_user_role'] == 'midlevelPrescriber') {
    MidlevelPrescriber($doc, $r);
}
$prescIds = '';
if ($pid) {
    Patient($doc, $r, $pid);
    $res_presc = sqlStatement("select id from prescriptions where patient_id=? and erx_source='0' and erx_uploaded='0'", array($pid));
    while ($row_presc = sqlFetchArray($res_presc)) {
        $prescIds .= $row_presc['id'] . ":";
    }
    $prescIds = preg_replace('/:$/', '', $prescIds);
    if ($_REQUEST['id'] || $prescIds) {
        if ($_REQUEST['id']) {
            $prescArr = explode(':', $_REQUEST['id']);
        } elseif ($prescIds) {
            $prescArr = explode(':', $prescIds);
        }
        foreach ($prescArr as $prescid) {
            if ($prescid) {
                OutsidePrescription($doc, $r, $pid, $prescid);
            }
Пример #2
0
}
if ($userRole['newcrop_user_role'] == 'doctor' || $page == 'renewal') {
    LicensedPrescriber($doc, $r);
}
if ($userRole['newcrop_user_role'] == 'manager' || $userRole['newcrop_user_role'] == 'admin' || $userRole['newcrop_user_role'] == 'nurse') {
    Staff($doc, $r);
}
if ($userRole['newcrop_user_role'] == 'supervisingDoctor') {
    SupervisingDoctor($doc, $r);
}
if ($userRole['newcrop_user_role'] == 'midlevelPrescriber') {
    MidlevelPrescriber($doc, $r);
}
$prescIds = '';
if ($pid) {
    $allergy = Patient($doc, $r, $pid);
    $active = '';
    if ($GLOBALS['erx_upload_active'] == 1) {
        $active = 'and active=1';
    }
    $res_presc = sqlStatement("select id from prescriptions where patient_id=? and erx_source='0' and erx_uploaded='0' {$active} limit 0," . $GLOBALS['total_count'], array($pid));
    $presc_limit = sqlNumRows($res_presc);
    $med_limit = $GLOBALS['total_count'] - $presc_limit;
    while ($row_presc = sqlFetchArray($res_presc)) {
        $prescIds .= $row_presc['id'] . ":";
    }
    $prescIds = preg_replace('/:$/', '', $prescIds);
    if ($_REQUEST['id'] || $prescIds) {
        if ($_REQUEST['id']) {
            $prescArr = explode(':', $_REQUEST['id']);
        } elseif ($prescIds) {