Пример #1
0
header('Location:' . $root_path . 'modules/dental/gui_patient_history.php' . URL_REDIRECT_APPEND . "&encounter={$pn}&ntid=false&lang=en&frm=list");
require_once $root_path . 'include/inc_date_format_functions.php';
if ($mode == 'save') {
    # Know where we are
    switch ($_SESSION['sess_user_origin']) {
        case 'lab':
            $_POST['location_type_nr'] = 1;
            # 1 =department
            break;
        default:
            $_POST['location_type_nr'] = 2;
            # 2 = ward
            break;
    }
    $_POST['location_id'] = $station;
    if ($report_obj->saveDailyWardNotes($_POST)) {
        //echo $report_obj->getLastQuery();
        header("Location:{$thisfile}" . URL_REDIRECT_APPEND . "&pn={$pn}&station={$station}&dept_nr={$dept_nr}&location_nr={$location_nr}&saved=1");
        exit;
    } else {
        echo $report_obj->getLastQuery() . "<p>{$LDDbNoUpdate}";
    }
} else {
    //echo $_SESSION['sess_pid'];
    if ($d_notes =& $report_obj->getDailyWardNotes($pn)) {
        include_once $root_path . 'include/inc_editor_fx.php';
        $occup = true;
    }
    # If location name is empty, fetch by location nr
    if (!isset($station) || empty($station)) {
        # Know where we are
Пример #2
0
header('Location:' . $root_path . 'modules/dental/gui_patient_history.php' . URL_REDIRECT_APPEND . "&encounter={$pn}&ntid=false&lang=en&frm=list");
require_once $root_path . 'include/inc_date_format_functions.php';
if ($mode == 'save') {
    # Know where we are
    switch ($HTTP_SESSION_VARS['sess_user_origin']) {
        case 'lab':
            $HTTP_POST_VARS['location_type_nr'] = 1;
            # 1 =department
            break;
        default:
            $HTTP_POST_VARS['location_type_nr'] = 2;
            # 2 = ward
            break;
    }
    $HTTP_POST_VARS['location_id'] = $station;
    if ($report_obj->saveDailyWardNotes($HTTP_POST_VARS)) {
        //echo $report_obj->getLastQuery();
        header("Location:{$thisfile}" . URL_REDIRECT_APPEND . "&pn={$pn}&station={$station}&dept_nr={$dept_nr}&location_nr={$location_nr}&saved=1");
        exit;
    } else {
        echo $report_obj->getLastQuery() . "<p>{$LDDbNoUpdate}";
    }
} else {
    //echo $HTTP_SESSION_VARS['sess_pid'];
    if ($d_notes =& $report_obj->getDailyWardNotes($pn)) {
        include_once $root_path . 'include/inc_editor_fx.php';
        $occup = true;
    }
    # If location name is empty, fetch by location nr
    if (!isset($station) || empty($station)) {
        # Know where we are