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


PHP Test::getObject方法代码示例

本文整理汇总了PHP中Test::getObject方法的典型用法代码示例。如果您正苦于以下问题:PHP Test::getObject方法的具体用法?PHP Test::getObject怎么用?PHP Test::getObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Test的用法示例。


在下文中一共展示了Test::getObject方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_test_record

function get_test_record($specimen_id, $test_type_id)
{
    $query_string = "SELECT * FROM test " . "WHERE specimen_id={$specimen_id} AND test_type_id={$test_type_id} ";
    $record = query_associative_one($query_string);
    $test_entry = Test::getObject($record);
    return $test_entry;
}
开发者ID:jfurlong,项目名称:BLIS,代码行数:7,代码来源:reports_test.php

示例2: get_records_to_print

function get_records_to_print($lab_config, $patient_id)
{
    global $date_from, $date_to;
    $retval = array();
    if (isset($_REQUEST['ip']) && $_REQUEST['ip'] == 0) {
        # Do not include pending tests
        $query_string = "SELECT t.* FROM test t, specimen sp " . "WHERE t.result <> '' " . "AND t.specimen_id=sp.specimen_id " . "AND sp.patient_id={$patient_id} ";
        if (isset($_REQUEST['yf'])) {
            $query_string .= "AND (sp.date_collected BETWEEN '{$date_from}' AND '{$date_to}') ";
        }
        $query_string .= "ORDER BY sp.date_collected DESC";
    } else {
        # Include pending tests
        $query_string = "SELECT t.* FROM test t, specimen sp " . "WHERE t.specimen_id=sp.specimen_id " . "AND sp.patient_id={$patient_id} ";
        if (isset($_REQUEST['yf'])) {
            $query_string .= "AND (sp.date_collected BETWEEN '{$date_from}' AND '{$date_to}') ";
        }
        $query_string .= "ORDER BY sp.date_collected DESC";
    }
    $resultset = query_associative_all($query_string, $row_count);
    if (count($resultset) == 0 || $resultset == null) {
        return $retval;
    }
    foreach ($resultset as $record) {
        $test = Test::getObject($record);
        $hide_patient_name = TestType::toHidePatientName($test->testTypeId);
        if ($hide_patient_name == 1) {
            $hidePatientName = 1;
        }
        $specimen = get_specimen_by_id($test->specimenId);
        $retval[] = array($test, $specimen, $hide_patient_name);
    }
    return $retval;
}
开发者ID:caseyi,项目名称:BLIS,代码行数:34,代码来源:reports_testhistory2.php

示例3: get_activity_test

function get_activity_test($lab_config_id, $user_id, $date_from, $date_to)
{
    $query_string = "SELECT * from test " . "WHERE user_id={$user_id} " . "AND (ts BETWEEN '{$date_from}' AND '{$date_to}' ) " . "AND result <> '' ORDER BY ts DESC";
    $resultset = query_associative_all($query_string, $row_count);
    $retval = array();
    foreach ($resultset as $record) {
        $test_entry = Test::getObject($record);
        $retval[] = $test_entry;
    }
    return $retval;
}
开发者ID:caseyi,项目名称:BLIS,代码行数:11,代码来源:userlog_fetch.php

示例4: get_unverified_tests

function get_unverified_tests($test_type_id)
{
    # Fetches all unverified test results
    $query_string = "SELECT * FROM test " . "WHERE verified_by=0 " . "AND result <> '' " . "AND test_type_id={$test_type_id}";
    $resultset = query_associative_all($query_string, $row_count);
    $retval = array();
    foreach ($resultset as $record) {
        $test_entry = Test::getObject($record);
        $retval[] = $test_entry;
    }
    return $retval;
}
开发者ID:caseyi,项目名称:BLIS,代码行数:12,代码来源:related_tests_results_entry.php

示例5: get_records_to_print

function get_records_to_print($lab_config, $test_type_id, $date_from, $date_to)
{
    $saved_db = DbUtil::switchToLabConfig($lab_config->id);
    $retval = array();
    $query_string = "SELECT * FROM test WHERE test_type_id={$test_type_id} " . "AND specimen_id IN ( " . "SELECT specimen_id FROM specimen " . "WHERE date_collected BETWEEN '{$date_from}' AND '{$date_to}' " . ")";
    $resultset = query_associative_all($query_string, $row_count);
    foreach ($resultset as $record) {
        $test = Test::getObject($record);
        $specimen = Specimen::getById($test->specimenId);
        $patient = Patient::getById($specimen->patientId);
        $retval[] = array($test, $specimen, $patient);
    }
    DbUtil::switchRestore($saved_db);
    return $retval;
}
开发者ID:caseyi,项目名称:BLIS,代码行数:15,代码来源:reports_print.php

示例6: get_records_to_print

function get_records_to_print($lab_config, $patient_id)
{
    $retval = array();
    # Include pending tests
    $query_string = "SELECT t.* FROM test t, specimen sp " . "WHERE t.specimen_id=sp.specimen_id " . "AND sp.patient_id={$patient_id} ";
    $resultset = query_associative_all($query_string, $row_count);
    if (count($resultset) == 0 || $resultset == null) {
        return $retval;
    }
    foreach ($resultset as $record) {
        $test = Test::getObject($record);
        $specimen = get_specimen_by_id($test->specimenId);
        $retval[] = array($test, $specimen);
    }
    return $retval;
}
开发者ID:caseyi,项目名称:BLIS,代码行数:16,代码来源:report_selected_tests.php

示例7: get_records_to_print

function get_records_to_print($lab_config, $patient_id, $specimen_id)
{
    $retval = array();
    $query_string = "SELECT * FROM test,specimen " . "WHERE specimen.specimen_id={$specimen_id} and test.specimen_id=specimen.specimen_id and specimen.patient_id={$patient_id}";
    $resultset = query_associative_one($query_string);
    if ($resultset == null) {
        echo "hiral";
    }
    $test = Test::getObject($resultset);
    $hide_patient_name = TestType::toHidePatientName($test->testTypeId);
    if ($hide_patient_name == 1) {
        $hidePatientName = 1;
    }
    $specimen = get_specimen_by_id($test->specimenId);
    $retval[] = array($test, $specimen, $hide_patient_name);
    return $retval;
}
开发者ID:jfurlong,项目名称:BLIS,代码行数:17,代码来源:report_onetesthistory.php

示例8: verify_and_update

function verify_and_update($test_type_id, $verified_entry, $hash_value)
{
    $specimen_id = $verified_entry->specimenId;
    $query_string = "SELECT * FROM test " . "WHERE specimen_id={$specimen_id} " . "AND test_type_id={$test_type_id} LIMIT 1";
    $record = query_associative_one($query_string);
    $existing_entry = Test::getObject($record);
    $test_id = $existing_entry->testId;
    $verified_result_value = $verified_entry->result . $hash_value;
    $query_verify = "";
    if ($existing_entry->result == $verified_result_value && $existing_entry->comments == $verified_entry->comments) {
        # No changes or corrections after verification
        $query_verify = "UPDATE test " . "SET verified_by={$verified_entry->verifiedBy}, " . "date_verified='{$verified_entry->dateVerified}' " . "WHERE test_id={$test_id}";
    } else {
        # Update with corrections and mark as verified
        $query_verify = "UPDATE test " . "SET result='{$verified_result_value}', " . "comments='{$verified_entry->comments}', " . "verified_by={$verified_entry->verifiedBy}, " . "date_verified='{$verified_entry->dateVerified}' " . "WHERE test_id={$test_id}";
    }
    query_blind($query_verify);
}
开发者ID:caseyi,项目名称:BLIS,代码行数:18,代码来源:results_verify_do.php

示例9: get_records_to_print

function get_records_to_print($lab_config, $patient_id)
{
    global $date_from, $date_to, $LIS_DOCTOR;
    $retval = array();
    if (isset($_REQUEST['ip']) && $_REQUEST['ip'] == 0) {
        # Do not include pending tests
        $labsection = 0;
        if (isset($_REQUEST['labsection'])) {
            $labsection = $_REQUEST['labsection'];
        }
        if ($labsection == 0) {
            $query_string = "SELECT t.* FROM test t, specimen sp " . "WHERE t.result <> '' " . "AND t.specimen_id=sp.specimen_id " . "AND sp.patient_id={$patient_id} ";
        } else {
            $query_string = "SELECT distinct t.* FROM test t, specimen sp, test_type tt, test_category tc " . "WHERE t.specimen_id=sp.specimen_id " . "AND t.result <> '' " . "AND sp.patient_id={$patient_id} " . "AND t.test_type_id = tt.test_type_id " . "AND tt.test_type_id in (select test_type_id from test_type where test_category_id = {$labsection})";
        }
        #Taking care of removal tests cases
        $query_string .= " AND t.test_id not in (select distinct r_id from removal_record where `status` = 1) ";
        if (isset($_REQUEST['yf'])) {
            $query_string .= "AND (sp.date_collected BETWEEN '{$date_from}' AND '{$date_to}') ";
        }
        $query_string .= "ORDER BY sp.date_collected DESC";
    } else {
        # Include pending tests
        $labsection = 0;
        if (isset($_REQUEST['labsection'])) {
            $labsection = $_REQUEST['labsection'];
        }
        if ($labsection == 0) {
            $query_string = "SELECT t.* FROM test t, specimen sp " . "WHERE t.specimen_id=sp.specimen_id " . "AND sp.patient_id={$patient_id} ";
        } else {
            $query_string = "SELECT distinct t.* FROM test t, specimen sp, test_type tt, test_category tc " . "WHERE t.specimen_id=sp.specimen_id " . "AND sp.patient_id={$patient_id} " . "AND t.test_type_id = tt.test_type_id " . "AND tt.test_type_id in (select test_type_id from test_type where test_category_id = {$labsection})";
        }
        #Taking care of removal tests cases
        $query_string .= " AND t.test_id not in (select distinct r_id from removal_record where `status` = 1) ";
        if (isset($_REQUEST['yf'])) {
            $query_string .= "AND (sp.date_collected BETWEEN '{$date_from}' AND '{$date_to}') ";
        }
        $query_string .= "ORDER BY sp.date_collected DESC";
    }
    $resultset = query_associative_all($query_string, $row_count);
    if (count($resultset) == 0 || $resultset == null) {
        return $retval;
    }
    foreach ($resultset as $record) {
        $test = Test::getObject($record);
        if ($_SESSION['user_level'] == $LIS_DOCTOR) {
            if ($test->verifiedBy == 0) {
                continue;
            }
        }
        $hide_patient_name = TestType::toHidePatientName($test->testTypeId);
        if ($hide_patient_name == 1) {
            $hidePatientName = 1;
        }
        $specimen = get_specimen_by_id($test->specimenId);
        $retval[] = array($test, $specimen, $hide_patient_name);
    }
    return $retval;
}
开发者ID:jfurlong,项目名称:BLIS,代码行数:59,代码来源:reports_testhistory_new.php

示例10: query_associative_one

	"SELECT * FROM patient ".
	"WHERE patient_id=$importPatientId";
$patientRecord = query_associative_one($querySelect);
DbUtil::switchRestore($saved_db);
*/
$saved_db = DbUtil::switchToLabConfig($importLabConfigId);
$querySelect = "SELECT * FROM specimen " . "WHERE patient_id={$importPatientId}";
$resultset = query_associative_all($querySelect, $rowCount);
foreach ($resultset as $record) {
    $specimenRecords[] = Specimen::getObject($record);
}
foreach ($specimenRecords as $specimenRecord) {
    $querySelect = "SELECT * FROM test " . "WHERE specimen_id={$specimenRecord->specimenId}";
    $resultset = query_associative_all($querySelect, $rowCount);
    foreach ($resultset as $record) {
        $testRecords[] = Test::getObject($record);
    }
}
DbUtil::switchRestore($saved_db);
/* Build a mapping of Specimens from the Global Table & make appropriate substitutions */
$saved_db = DbUtil::switchToGlobal();
$querySelect = "SELECT * FROM specimen_mapping";
$resultset = query_associative_all($querySelect, $rowCount);
if ($resultset) {
    $specimenIds = array();
    foreach ($resultset as $record) {
        $labIdSpecimenIds = explode(";", $record['lab_id_specimen_id']);
        foreach ($labIdSpecimenIds as $labIdSpecimenId) {
            $labIdSpecimenIdsSeparated = explode(":", $labIdSpecimenId);
            $labId = $labIdSpecimenIdsSeparated[0];
            $specimenId = $labIdSpecimenIdsSeparated[1];
开发者ID:jfurlong,项目名称:BLIS,代码行数:31,代码来源:import_patient.php

示例11: getResultEntryLog

 public function getResultEntryLog($user_id, $lab_config_id, $date_from, $date_to)
 {
     $saved_db = DbUtil::switchToLabConfig($lab_config_id);
     $date_from_parts = explode("-", $date_from);
     $date_to_parts = explode("-", $date_to);
     $date_from_ts = mktime(0, 0, 0, $date_from_parts[1], $date_from_parts[2], $date_from_parts[0]);
     $date_from_ts = date('Y-m-d H:i:s', $date_from_ts);
     $date_to_ts = mktime(0, 0, 0, $date_to_parts[1], $date_to_parts[2], $date_to_parts[0]);
     $date_to_ts = date('Y-m-d H:i:s', $date_to_ts);
     $query_string = "SELECT * FROM test " . "WHERE ts BETWEEN '{$date_from_ts}' AND '{$date_to_ts}' " . "AND user_id = {$user_id}";
     $resultset = query_associative_all($query_string, $row_count);
     $test_list = array();
     if (count($resultset) > 0) {
         foreach ($resultset as $record) {
             $test_list[] = Test::getObject($record);
         }
     }
     DbUtil::switchRestore($saved_db);
     return $test_list;
 }
开发者ID:caseyi,项目名称:BLIS,代码行数:20,代码来源:db_lib.php


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