Esempio n. 1
0
// 1= the localization names are to be displayed in full, 0 = only short codes are displayed
define('LANG_FILE', 'drg.php');
require_once 'drg_inc_local_user.php';
require_once $root_path . 'include/inc_front_chain_lang.php';
require_once $root_path . 'include/care_api_classes/class_drg.php';
$DRG_obj = new DRG($pn);
// Create a drg object
//$db->debug=1;
$toggle = 0;
$thisfile = basename($_SERVER['PHP_SELF']);
if (isset($mode) && !empty($mode)) {
    $saved_header = "location:{$thisfile}?sid={$sid}&lang={$lang}&pn={$pn}&edit={$edit}&ln={$ln}&fn={$fn}&bd={$bd}&opnr={$opnr}&group_nr={$group_nr}&dept_nr={$dept_nr}&dept_nr={$dept_nr}&oprm={$oprm}&y={$y}&m={$m}&d={$d}&display={$display}&newsave=1";
}
switch ($mode) {
    case 'delete':
        if ($DRG_obj->deleteProcedure($itemx)) {
            header($saved_header);
            exit;
        }
        break;
    case 'update_stat':
        if ($DRG_obj->setProcedureCategory($pn, $itemx, $val)) {
            header($saved_header);
            exit;
        }
        break;
    case 'update_loc':
        if ($DRG_obj->setProcedureLocalization($itemx, $val)) {
            header($saved_header);
            exit;
        }