コード例 #1
0
    } else {
        $mode = '';
    }
} elseif ($mode == 'create' || $mode == 'update') {
    //$db->debug=true;
    include_once $root_path . 'include/inc_date_format_functions.php';
    # Convert date to standard format
    $_POST['date_end'] = formatDate2STD($_POST['date_end'], $date_format);
    $_POST['date_start'] = formatDate2STD($_POST['date_start'], $date_format);
    $_POST['date_confirm'] = formatDate2STD($_POST['date_confirm'], $date_format);
    $_POST['encounter_nr'] = $_SESSION['sess_en'];
    $_POST['history'] = "Create " . date('Y-m-d H:i:s') . " " . $_SESSION['sess_user_name'] . "\n";
    $_POST['modify_id'] = $_SESSION['sess_user_name'];
    $_POST['create_id'] = $_SESSION['sess_user_name'];
    $_POST['create_time'] = date('YmdHis');
    if ($enc_obj->saveSicknessConfirm($_POST)) {
        $get_nr = $db->Insert_ID();
        header("location:" . $thisfile . URL_REDIRECT_APPEND . "&get_nr={$get_nr}&dept_nr={$dept_nr}&target={$target}&type_nr={$type_nr}&pid=" . $_SESSION['sess_pid']);
        exit;
    } else {
        echo "{$obj->sql}<br>{$LDDbNoSave}";
    }
}
if ($mode == 'new') {
    # Load the department class
    include_once $root_path . 'include/care_api_classes/class_department.php';
    $dept_obj = new Department($dept_nr);
    $dept =& $dept_obj->getDeptAllInfo($dept_nr);
}
# Get the insurance data of the encounter
if ($insure_obj = $enc_obj->EncounterInsuranceData()) {