?> </font></small></label> </div></td> <td> <div id="commonTestNameEdit" class="editLink"> <a onclick="toggle_div('0')">Edit</a></div></td> </tr> <tr><td></td></tr> <?php $count = 1; //$siteList = get_site_list($_SESSION['user_id']); $config_list = get_lab_configs_imported(); foreach ($config_list as $lab_config) { //print_r($mapping_list); // echo $mapping_list[(int)$lab_config->id]."."; echo "<tr><td>" . $lab_config->name . "</td>"; $testTypeList = get_test_types_by_site($lab_config->id); $stcheck = $mapping_list[$lab_config->id]; $tname = "Unassigned"; echo "<td><div id='labTestName" . $lab_config->id . "' class='variableData' style='display:none;'><select id='testNameSelect{$count}'>"; foreach ($testTypeList as $testType) { if ($testType->testTypeId == $stcheck) { $tname = $testType->getName(); echo "<option value='{$lab_config->id}:{$testType->testTypeId}' selected>" . $testType->getName() . "</option>"; } else { echo "<option value='{$lab_config->id}:{$testType->testTypeId}'>" . $testType->getName() . "</option>"; } } echo "</select></div>"; ?> <div id="labTestNameFixed<?php echo $lab_config->id;
public function getGoalTatValues() { # Returns a list of latest goal TAT values for all tests in the lab global $DEFAULT_TARGET_TAT; $test_type_list = get_test_types_by_site($this->id); $saved_db = DbUtil::switchToLabConfig($this->id); $retval = array(); foreach ($test_type_list as $test_type) { /* $query_string = "SELECT tat FROM test_type_tat ". "WHERE test_type_id=$test_type->testTypeId ORDER BY ts DESC LIMIT 1"; */ $query_string = "SELECT target_tat FROM test_type " . "WHERE test_type_id={$test_type->testTypeId} ORDER BY ts DESC LIMIT 1"; $record = query_associative_one($query_string); if ($record == null) { # Entry not yet added by lab admin: Show default $retval[$test_type->testTypeId] = $DEFAULT_TARGET_TAT * 24; } else { $retval[$test_type->testTypeId] = $record['target_tat']; } } # Append TAT value for pending tests //$query_string = "SELECT tat FROM test_type_tat WHERE test_type_id=0 LIMIT 1"; $query_string = "SELECT target_tat FROM test_type_tat WHERE test_type_id=0 LIMIT 1"; $record = query_associative_one($query_string); if ($record == null) { $retval[0] = null; } else { if ($record['tat'] == null) { $retval[0] = null; } else { # Default value present in table $retval[0] = $record['tat']; } } DbUtil::switchRestore($saved_db); return $retval; }
?> </option> <?php $page_elems->getSiteOptions(); ?> </select> </div> <br> <?php $site_ls = get_site_list($_SESSION['user_id']); foreach ($site_ls as $st => $val) { $div_st = "test_list_" . $st; echo "<div id='" . $div_st . "' class='test_list_forms' style='display: none;'>"; ?> <?php $test_type_list = get_test_types_by_site($st); /*if($site_id <= 0) { echo 'Select Facility to display its Test Catalog here'; return; } */ if (count($test_type_list) == 0) { # No compatible tests exist in the configuration ?> <br> <span class='clean-error uniform_width'> <?php echo 'Test Catalog is empty for this site'; ?> </span>
public function getGoalTatForm($lab_config_id) { # Returns HTML form for setting/modifying goal TAT values # Called from lab_config_home.php global $DEFAULT_TARGET_TAT; $test_type_list = get_test_types_by_site($lab_config_id); $lab_config = get_lab_config_by_id($lab_config_id); $tat_list = $lab_config->getGoalTatValues(); ?> <input type='hidden' name='lid' value='<?php echo $lab_config_id; ?>'></input> <table class='tablesorter' style='width:600px;'> <thead> <tr> <th><?php echo LangUtil::$generalTerms['TEST_TYPE']; ?></th> <th><?php echo LangUtil::$generalTerms['TAT']; ?></th> </tr> </thead> <tbody> <?php foreach($tat_list as $key=>$value) { $curr_tat_value = $value; ?> <tr valign='top'> <td> <?php if($key != 0) { echo get_test_name_by_id($key, $lab_config_id); } else { echo LangUtil::$pageTerms['MSG_PENDINGTAT']; } ?> <input type='hidden' name='ttype[]' value='<?php echo $key; ?>'></input> </td> <td> <input type='text' name='tat[]' value='<?php if($curr_tat_value != null) { echo $curr_tat_value; /* if($curr_tat_value >=24) echo round($curr_tat_value/24, 2); else echo $curr_tat_value; */ } else { # Entry not yet present # Show default value in form echo $DEFAULT_TARGET_TAT*24; } ?>'></input> <select name='unit[]'> <option value='1' <?php //if($curr_tat_value != null && $curr_tat_value < 24) if(true) echo " selected "; ?> ><?php echo LangUtil::$generalTerms['HOURS']; ?></option> <option value='2' <?php //if($curr_tat_value != null && $curr_tat_value >= 24) if(false) echo " selected "; ?> ><?php echo LangUtil::$generalTerms['DAYS']; ?></option> </select> </td> </tr> <?php } ?> </tbody> </table> <?php }
border-bottom: 2px solid #6678b1; } .hor-minimalist-compact td { color: #669; padding: 2px 6px 0px 6px; } .hor-minimalist-compact tbody tr:hover td { /*color: #009;*/ } </style> <?php $site_id = $_REQUEST['site_id']; $test_type_list = get_test_types_by_site($site_id); /*if($site_id <= 0) { echo 'Select Facility to display its Test Catalog here'; return; } */ if (count($test_type_list) == 0) { # No compatible tests exist in the configuration ?> <br> <span class='clean-error uniform_width'> <?php echo 'Test Catalog is empty for this site'; ?> </span>