require $root_path . 'include/inc_environment_global.php';
/**
* CARE2X Integrated Hospital Information System Deployment 2.1 - 2004-10-02
* GNU General Public License
* Copyright 2002,2003,2004,2005 Elpidio Latorilla
* elpidio@care2x.org, 
*
* See the file "copy_notice.txt" for the licence notice
*/
define('LANG_FILE', 'doctors.php');
define('NO_2LEVEL_CHK', 1);
require_once $root_path . 'include/inc_front_chain_lang.php';
require_once $root_path . 'include/inc_date_format_functions.php';
require_once $root_path . 'include/care_api_classes/class_personell.php';
$pers_obj = new Personell();
$nurses =& $pers_obj->getNursesOfDept($dept_nr);
$wkday = date("w", mktime(0, 0, 0, $month, $elemid + 1, $year));
?>

<?php 
html_rtl($lang);
?>
<HEAD>
<?php 
echo setCharSet();
?>
<TITLE><?php 
echo $LDInfo4Duty;
?>
</TITLE>
    if ($year == "") {
        $year = date(Y);
    }
    if (!$month) {
        $month = date(m);
    }
    //if(!$day) $day=date(d);
}
/* Establish db connection */
if (!isset($db) || !$db) {
    include $root_path . 'include/inc_db_makelink.php';
}
if ($dblink_ok) {
    include_once $root_path . 'include/care_api_classes/class_personell.php';
    $pers_obj = new Personell();
    if ($pers_row = $pers_obj->getNursesOfDept($dept_nr)) {
        $datafound = 1;
        //echo $sql."<br>";
        //echo $rows;
    }
} else {
    echo "{$LDDbNoLink}<br>{$sql}";
}
?>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN" "html.dtd">
<?php 
html_rtl($lang);
?>
<HEAD>
<?php 
echo setCharSet();
     $element = 'operator';
     //$maxelement=10;
     $quickid = 'doctor';
     $quicklist = $pers_obj->getDoctorsOfDept($dept_nr);
     break;
 case 'assist':
     $element = 'assistant';
     //$maxelement=10;
     $quickid = 'doctor';
     $quicklist = $pers_obj->getDoctorsOfDept($dept_nr);
     break;
 case 'scrub':
     $element = 'scrub_nurse';
     //$maxelement=10;
     $quickid = 'nurse';
     $quicklist = $pers_obj->getNursesOfDept($dept_nr);
     break;
 case 'rotating':
     $element = 'rotating_nurse';
     //$maxelement=10;
     $quickid = 'nurse';
     $quicklist = $pers_obj->getNursesOfDept($dept_nr);
     break;
 case 'ana':
     $element = 'an_doctor';
     //$maxelement=10;
     $quickid = 'doctor';
     $quicklist = $pers_obj->getDoctorsOfDept(42);
     // 42 = anesthesiology department
     break;
 default: