本文整理匯總了PHP中Test::getById方法的典型用法代碼示例。如果您正苦於以下問題:PHP Test::getById方法的具體用法?PHP Test::getById怎麽用?PHP Test::getById使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Test
的用法示例。
在下文中一共展示了Test::getById方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: get_test_name_by_id
<?php
#
# Adds result for a single test
# Called via ajax from results_entry.php
#
include "../includes/db_lib.php";
include "../includes/user_lib.php";
LangUtil::setPageId("results_entry");
$test_id = $_REQUEST['test_id'];
$test_name = get_test_name_by_id($test_id);
$test = Test::getById($test_id);
$test_type = TestType::getById($test->testTypeId);
$specimen_id = $_REQUEST['specimen_id'];
$specimen = Specimen::getById($specimen_id);
$patient = Patient::getById($specimen->patientId);
$comment = $_REQUEST['comments'];
$comment_1 = $_REQUEST['comments_1'];
$dd_to = $_REQUEST['dd_to'];
$mm_to = $_REQUEST['mm_to'];
$yyyy_to = $_REQUEST['yyyy_to'];
if ($comment !== "" && $comment_1 != "") {
$comments = $comment . " , " . $comment_1;
} else {
if ($comment == "" && $comment_1 != "") {
$comments = $comment_1;
} else {
if ($comment != "" && $comment_1 == "") {
$comments = $comment;
}
}
示例2: get_all_tests_for_patient_and_date_range
'><?php
$tests = get_all_tests_for_patient_and_date_range($_SESSION['pid'], "January 1, 1969", "today");
if (!empty($tests)) {
?>
<table class='tablesorter' id='billing_popup_table' style="border-collapse: separate; width: 700px;">
<thead>
<tr valign='top'>
<th id='billing_popup_date' style='width: 75px;'>Test Date</th>
<th id='billing_popup_name'>Test Name</th>
<th id='billing_popup_specimen_type'>Specimen Type</th>
<th id='billing_popup_cost'>Test Cost</th>
<th id='billing_popup_select' style='width: 110px;'>Select for Billing</th>
</tr>
</thead><?php
foreach ($tests as $test) {
$test = Test::getById($test['test_id']);
// We only loaded an id and timestamp, and we want more information.
$specimen = Specimen::getById($test->specimenId);
$testHasBeenBilled = Bill::hasTestBeenBilled($test->testId, $_SESSION['lab_config_id']);
if ($testHasBeenBilled) {
$style_string = "style='background-color:grey; color:white;'";
} else {
$style_string = "";
}
$cost = get_cost_of_test($test);
?>
<tr>
<td <?php
echo $style_string;
?>
><?php
示例3: foreach
?>
</div>
<form id='payments_form' name='payments_form' action=''>
<table class='tablesorter' id='bill_table' style="border-collapse: separate;">
<tr valign='top'>
<th style="width: 75px;">Test Date</th>
<th>Test Name</th>
<th>Specimen Type</th>
<th style="width: 80px;">Test Cost</th>
<th>Discount Type</th>
<th>Discount Amount</th>
<th style="width: 80px;"></th>
</tr>
<?php
foreach ($associations as $assoc) {
$test = Test::getById($assoc->getTestId());
$testType = TestType::getById($test->testTypeId);
$specimen = Specimen::getById($test->specimenId);
?>
<tr>
<td><?php
echo date("Y-m-d", strtotime($test->timestamp));
?>
</td>
<td><?php
echo $testType->name;
?>
</td>
<td><?php
echo $specimen->getTypeName();
?>
示例4: getCostOfTest
public function getCostOfTest()
{
$test = Test::getById($this->testId);
$cost = get_cost_of_test($test);
$cost = $cost['amount'];
return floatVal($cost);
}