Beispiel #1
0
/* Load the date formatter */
require_once $root_path . 'include/inc_date_format_functions.php';
require_once $root_path . 'include/care_api_classes/class_drg.php';
$enc_obj = new DRG($pn);
//$db->debug=true;
if (isset($mode) && $mode == 'save_group' && isset($group_nr) && $group_nr) {
    $enc_obj->groupNonGroupedItems($group_nr);
    header("location:{$thisfile}?sid={$sid}&lang={$lang}&saveok=1&pn={$pn}&opnr={$opnr}&group_nr={$group_nr}&edit={$edit}&is_discharged={$is_discharged}&ln={$ln}&fn={$fn}&dept_nr={$dept_nr}&oprm={$oprm}&display={$display}");
    exit;
}
$toggle = 0;
$thisfile = basename($_SERVER['PHP_SELF']);
if (isset($mode) && $mode == 'delete' && $item) {
    $buf = $enc_obj->ungroupDiagnoses($group_nr);
    $buf2 = $enc_obj->ungroupProcedures($group_nr);
    $enc_obj->deleteEncounterDRGGroup($item);
    header("location:{$thisfile}?sid={$sid}&lang={$lang}&pn={$pn}&opnr={$opnr}&group_nr=0&edit={$edit}&is_discharged={$is_discharged}&ln={$ln}&fn={$fn}&dept_nr={$dept_nr}&oprm={$oprm}&display={$display}");
    exit;
}
$non_grouped = false;
if (!isset($group_nr)) {
    $group_nr = 0;
}
# Get the patient`s basic data
if ($enc =& $enc_obj->getBasic4Data()) {
    $encounter = $enc->FetchRow();
    # Get the internal drg groups for the encounter
    $drg_rows =& $enc_obj->InternDRGGroups();
    # Check for non grouped entries
    if ($enc_obj->nongroupedDiagnosisExists()) {
        $non_grouped = true;