//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 if (empty($cache)) {