当前位置: 首页>>代码示例>>PHP>>正文


PHP Test::getById方法代码示例

本文整理汇总了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;
        }
    }
开发者ID:caseyi,项目名称:BLIS,代码行数:31,代码来源:result_add.php

示例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 
开发者ID:caseyi,项目名称:BLIS,代码行数:31,代码来源:bill_generator.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();
    ?>
开发者ID:caseyi,项目名称:BLIS,代码行数:31,代码来源:bill_review.php

示例4: getCostOfTest

 public function getCostOfTest()
 {
     $test = Test::getById($this->testId);
     $cost = get_cost_of_test($test);
     $cost = $cost['amount'];
     return floatVal($cost);
 }
开发者ID:caseyi,项目名称:BLIS,代码行数:7,代码来源:db_lib.php


注:本文中的Test::getById方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。