本文整理汇总了PHP中Patient::getObject方法的典型用法代码示例。如果您正苦于以下问题:PHP Patient::getObject方法的具体用法?PHP Patient::getObject怎么用?PHP Patient::getObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Patient
的用法示例。
在下文中一共展示了Patient::getObject方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getById
public static function getById($patient_id)
{
# Returns patient record by ID
$query_string = "SELECT * FROM patient WHERE patient_id={$patient_id}";
$record = query_associative_one($query_string);
//return 1;
return Patient::getObject($record);
}
示例2: query_associative_all
#
# Returns a list of similar patient names
# To aid/help during new patient registration
#
include "../includes/db_lib.php";
LangUtil::setPageId("new_patient");
$q = $_REQUEST['q'];
$query_string = "SELECT * FROM patient " . "WHERE name LIKE '%{$q}%' ";
$resultset = query_associative_all($query_string, $row_count);
if (count($resultset) == 0 || $resultset == null) {
return;
}
$patient_list = array();
foreach ($resultset as $record) {
$patient_list[] = Patient::getObject($record);
}
?>
<table class='hor-minimalist-c' style='width:450px;'>
<thead>
<tr valign='top'>
<th>
<span style='background-color:#FFCC66'><?php
echo LangUtil::$pageTerms['SIMILAR_NAMES'];
?>
</span>
</th>
<?php
if ($_SESSION['pid'] != 0) {
?>
<th><?php
示例3: foreach
$testId = $labIdTestIdsSeparated[1];
$testIds[$labId] = $testId;
}
foreach ($testRecords as $testRecord) {
if ($testIds[$labConfigId] == $testRecord->testTypeId) {
$testRecord->testTypeId = $testIds[$importLabConfigId];
}
}
}
}
DbUtil::switchRestore($saved_db);
$saved_db = DbUtil::switchToLabConfig($importLabConfigId);
$querySelect = "SELECT * FROM patient " . "WHERE patient_id={$importPatientId}";
$record = query_associative_one($querySelect);
$patientName = $record['name'];
$patient = Patient::getObject($record);
$patient->createdBy = $_SESSION['user_id'];
DbUtil::switchRestore($saved_db);
add_patient($patient, true);
/*
$querySelect =
"SELECT patient_id FROM patient ".
"WHERE name like '$patientName' ";
$record = query_associative_one($querySelect);
$newPatientId = $record['patient_id'];
*/
/* Create New Specimen & Test Records */
$i = 0;
foreach ($specimenRecords as $specimenRecord) {
$saved_db = DbUtil::switchToLabConfig($importLabConfigId);
$querySelect = "SELECT * FROM test " . "WHERE specimen_id={$specimenRecord->specimenId}";