} //$selected_test_ids = $lab_config->getTestTypeIds(); if ($cat_code != 0) { # Fetch all tests belonging to this category (aka lab section) $cat_test_types = TestTypeMapping::getByCategory($cat_code); $selected_test_ids = array(); foreach ($cat_test_types as $test_type) { $selected_test_ids[] = $test_type->testId; } //$matched_test_ids = array_intersect($cat_test_ids, $selected_test_ids); //$selected_test_ids = array_values($matched_test_ids); } # Fetch TestType objects using selected test_type_ids. $selected_test_types = array(); foreach ($selected_test_ids as $test_type_id) { $test = TestTypeMapping::getById($test_type_id); $selected_test_types[] = $test; } # Fetch site-wide settings $site_settings = GlobalInfectionReport::getByKeys($_SESSION['user_id'], 0, 0); if ($site_settings == null) { echo LangUtil::$pageTerms['TIPS_CONFIGINFECTION']; return; } $age_group_list = $site_settings->getAgeGroupAsList(); ?> <table> <tbody> <tr> <td><?php //echo LangUtil::$generalTerms['FACILITY'];
//$tips_string = LangUtil::$pageTerms['TIPS_CATALOG']; $tips_string = "To know more about a particular field select on the [?] next to the field name."; //$page_elems->getSideTip("Tips", $tips_string); ?> <b><?php echo LangUtil::$pageTerms['EDIT_TEST_TYPE']; ?> </b> | <a href="country_catalog.php?show_t=1"><?php echo LangUtil::$generalTerms['CMD_CANCEL']; ?> </a> <br><br> <?php $testTypeMapping = TestTypeMapping::getById($_REQUEST['tid']); if ($testTypeMapping == null) { ?> <div class='sidetip_nopos'> <?php echo LangUtil::$generalTerms['MSG_NOTFOUND']; ?> </div> <?php include "includes/footer.php"; return; } # Fetch all measures currently on this test type $measure_list = $testTypeMapping->getMeasureIds(); # Display test type info table
public static function getById($testTypeId) { # Returns global test type record in DB $saved_db = DbUtil::switchToGlobal(); $query_string = "SELECT * FROM test_mapping WHERE test_id={$testTypeId} LIMIT 1"; $record = query_associative_one($query_string); return TestTypeMapping::getObject($record); }
//$tips_string=LangUtil::$pageTerms['TIPS_MEASURES']; //$tips_string = LangUtil::$pageTerms['TIPS_CATALOG']; //$page_elems->getSideTip("Tips", $tips_string); ?> <b><?php echo LangUtil::$pageTerms['EDIT_TEST_TYPE']; ?> </b> | <a href="country_catalog.php?show_t=1"><?php echo LangUtil::$generalTerms['CMD_CANCEL']; ?> </a> <br> <?php $testTypeMapping = TestTypeMapping::getTestTypeById($_REQUEST['tid'], $_SESSION['user_id']); if ($testTypeMapping == null) { ?> <div class='sidetip_nopos'> <?php echo LangUtil::$generalTerms['MSG_NOTFOUND']; ?> </div> <?php include "includes/footer.php"; return; } //$page_elems->getTestNamesSelectorForEdit($testTypeMapping); # Fetch all measures currently on this test type //$measure_list = $testTypeMapping->getMeasureIds();
$labs = array(); foreach ($config_list as $lab_config) { $labs[] = $lab_config->id; } } $date_from = $_REQUEST['df']; $date_to = $_REQUEST['dt']; //$test_type_id = 6; //$labs[0] = 128; //$labs[1] = 129; //$date_from = "2011-06-01"; //$date_to = "2012-01-01"; $ip = 0; sort($labs); $tname = getGlobalTestName($test_type_id); $testTypeMapping = TestTypeMapping::getTestTypeById($test_type_id, $_SESSION['user_id']); $mapping_list = array(); $mapping_list = get_test_mapping_list_by_string($testTypeMapping->labIdTestId); $i = 0; $theprevdata = array(); $thetatdata = array(); $labname = array(); $xc = array(); $yc = array(); foreach ($labs as $lab) { $theprevdata[$i] = get_prevalence_data_per_test_per_lab_dir($mapping_list[$lab], $lab, $date_from, $date_to); $thetatdata[$i] = get_tat_data_per_test_per_lab_dir_new($mapping_list[$lab], $lab, $date_from, $date_to, $ip); $tem = get_lab_config_by_id($lab); $labname[$i] = $tem->name; $tem = get_coordinates($lab); $xc[$i] = $tem[0];