Пример #1
0
$local_user = '******';
require_once $root_path . 'include/inc_front_chain_lang.php';
if ($ward_nr == '') {
    $ward_nr = $_POST['nr'];
}
$thisfile = basename($_SERVER['PHP_SELF']);
/* Load the ward object */
require_once $root_path . 'include/care_api_classes/class_ward.php';
$ward_obj = new Ward($ward_nr);
$rows = 0;
//$db->debug=1;
/* Load the date formatter */
include_once $root_path . 'include/inc_date_format_functions.php';
switch ($mode) {
    case 'show':
        if ($ward =& $ward_obj->getWardInfo($ward_nr)) {
            $rooms =& $ward_obj->getAllActiveRoomsInfo();
            $roomsTemp =& $rooms;
            $rows = true;
            extract($ward);
            // Get all medical departments
            /* Load the dept object */
            /*				if($edit){
            					include_once($root_path.'include/care_api_classes/class_department.php');
            					$dept=new Department;
            					$depts=&$dept->getAllMedical();
            				}
            */
        } else {
            header('location:nursing-station-info.php' . URL_REDIRECT_APPEND);
            exit;
    $is_today = true;
} else {
    $is_today = false;
}
if (!isset($mode)) {
    $mode = '';
}
$breakfile = 'javascript:window.close()';
# Set default breakfile
/* Create ward object */
require_once $root_path . 'include/care_api_classes/class_ward.php';
$ward_obj = new Ward();
# Load date formatter
require_once $root_path . 'include/inc_date_format_functions.php';
if ($mode == '' || $mode == 'fresh') {
    if ($ward_info =& $ward_obj->getWardInfo($ward_nr)) {
        $room_obj =& $ward_obj->getRoomInfo($ward_nr, $ward_info['room_nr_start'], $ward_info['room_nr_end']);
        if (is_object($room_obj)) {
            $room_ok = true;
        } else {
            $room_ok = false;
        }
        # GEt the number of beds
        $nr_beds = $ward_obj->countBeds($ward_nr);
        # Get ward patients
        if ($is_today) {
            $patients_obj =& $ward_obj->getDayWardOccupants($ward_nr);
        } else {
            $patients_obj =& $ward_obj->getDayWardOccupants($ward_nr, $s_date);
        }
        if (is_object($patients_obj)) {
Пример #3
0
$access->UserExists($_SESSION['sess_user_name']);
//get in the classes i need
/* Create encounter object */
require_once $root_path . 'include/care_api_classes/class_encounter.php';
$enc_obj =& new Encounter($encounter_nr);
$encounter = '';
if ($enc_obj->loadEncounterData()) {
    $encounter =& $enc_obj->getLoadedEncounterData();
}
// Get the Deparment name
require_once $root_path . 'include/care_api_classes/class_department.php';
$dept_obj = new Department();
$deptName = $dept_obj->FormalName($enc_obj->encounter['current_dept_nr']);
require_once $root_path . 'include/care_api_classes/class_ward.php';
$ward_obj = new Ward();
$wardName = $ward_obj->getWardInfo($enc_obj->encounter['current_ward_nr']);
$roomName = $ward_obj->_getActiveRoomInfo($enc_obj->encounter['current_room_nr'], $enc_obj->encounter['current_ward_nr']);
$roomNumber = $enc_obj->encounter['current_room_nr'];
//get the lab data
require_once $root_path . 'include/care_api_classes/class_lab.php';
$lab_obj = new Lab($encounter_nr);
//get the lab results..
$enc_obj->setWhereCondition("encounter_nr='{$encounter_nr}'");
if ($encounterLab =& $enc_obj->getBasic4Data($encounter_nr)) {
    $patient = $encounterLab->FetchRow();
    $recs =& $lab_obj->getAllResults($encounter_nr);
    if ($rows = $lab_obj->LastRecordCount()) {
        # Check if the lab result was recently modified
        $modtime = $lab_obj->getLastModifyTime();
        $lab_obj->getDBCache('chemlabs_result_' . $encounter_nr . '_' . $modtime, $cache);
        # If cache not available, get the lab results and param items