示例#1
0
								<td><u><?php 
echo LangUtil::$generalTerms['VALUES'];
?>
</u><?php 
$page_elems->getAsterisk();
?>
</td>
								<td><u><?php 
echo LangUtil::$generalTerms['UNIT'];
?>
 /Default Value</u>[<a href='#unit_help' rel='facebox'>?</a>]</td>
							</tr>
							<?php 
$max_num_measures = count($measure_list);
for ($i = 1; $i <= $max_num_measures; $i += 1) {
    $curr_measure = GlobalMeasure::getById($measure_list[$i - 1]);
    if ($curr_measure != NULL) {
        $ref_ranges = $curr_measure->getReferenceRanges($_SESSION['user_id']);
        ?>
									<input type='hidden' name='m_id[]' value='<?php 
        echo $measure_list[$i - 1];
        ?>
'></input>
									<?php 
        echo "<tr valign='top' id='mrow_{$i}' ";
        echo ">";
        echo "<td align='center'>";
        echo "<input type=checkbox name='delete_" . $curr_measure->measureId . "'  />";
        echo "</td><td>";
        echo "<input type='text' name='measure[]' value='{$curr_measure->name}' />";
        echo "</td>";
示例#2
0
                        $range_string .= "_";
                    }
                }
                if ($options_entered === false) {
                    # Error: Autocomplete values not entered properly.
                    # TODO:
                }
                # Truncate trailing "_"
                $range_string = substr($range_string, 0, -1);
            }
        }
    }
    $unit = $units[$i];
    # Existing measure
    # Update measure to DB
    $measure = GlobalMeasure::getById($measure_ids[$i]);
    $measure->name = $measure_name;
    $measure->range = $range_string;
    $measure->unit = $unit;
    # Update measure entry DB
    $measure->updateToDb();
    $measures_to_retain[] = $measure_ids[$i];
}
# Non-panel test. Collect all newly added measures
$count_ref = count($reference_ranges_list);
$new_measures_list = array();
$measure_names = $_REQUEST['new_measure'];
$measure_types = $_REQUEST['new_mtype'];
$measuere_del = $_REQUEST['new_measure_del'];
$units = $_REQUEST['new_unit'];
for ($i = 0; $i < count($measure_names); $i++) {
示例#3
0
 public static function getById($measure_id)
 {
     # Returns a test measure by ID
     $saved_db = DbUtil::switchToLabConfigRevamp();
     if ($measure_id == null || $measure_id < 0) {
         return null;
     }
     $query_string = "SELECT * FROM global_measures WHERE measure_id={$measure_id} LIMIT 1";
     $record = query_associative_one($query_string);
     DbUtil::switchRestore($saved_db);
     return GlobalMeasure::getObject($record);
 }