本文整理匯總了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}";