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


PHP get_patient_by_id函数代码示例

本文整理汇总了PHP中get_patient_by_id函数的典型用法代码示例。如果您正苦于以下问题:PHP get_patient_by_id函数的具体用法?PHP get_patient_by_id怎么用?PHP get_patient_by_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: get_patient_by_id

<?php 
if (isset($_REQUEST['yf'])) {
    echo "<br>";
    if ($date_from == $date_to) {
        echo LangUtil::$generalTerms['DATE'] . ": " . DateLib::mysqlToString($date_from);
    } else {
        echo LangUtil::$generalTerms['FROM_DATE'] . ": " . DateLib::mysqlToString($date_from);
        echo " | ";
        echo LangUtil::$generalTerms['TO_DATE'] . ": " . DateLib::mysqlToString($date_to);
    }
}
?>

<br>
<?php 
$patient = get_patient_by_id($patient_id);
if ($patient == null) {
    echo LangUtil::$generalTerms['PATIENT_ID'] . " {$patient_id} " . LangUtil::$generalTerms['MSG_NOTFOUND'];
} else {
    # Fetch test entries to print in report
    $record_list = get_records_to_print($lab_config, $patient_id);
    # If single date supplied, check if-
    # 1. Physician name is the same for all
    # 2. Patient daily number is the same for all
    # 3. All tests were completed or not
    $physician_same = false;
    $daily_number_same = false;
    $all_tests_completed = false;
    if ($date_from == $date_to) {
        $physician_same = true;
        $daily_number_same = true;
开发者ID:caseyi,项目名称:BLIS,代码行数:31,代码来源:reports_testhistory2.php

示例2: get_tests_by_specimen_id

    }
    ?>
	<br><a href='specimen_info.php?sid=<?php 
    echo $specimen->specimenId;
    ?>
'> <?php 
    echo LangUtil::$generalTerms['DETAILS'];
    ?>
 &raquo;</a>
	</div>
	<?php 
    return;
}
# Print HTML results form
$test_list = get_tests_by_specimen_id($specimen->specimenId);
$patient = get_patient_by_id($specimen->patientId);
?>
<div class='pretty_box'>

<?php 
if (0) {
    if ($_SESSION['sid'] != 0) {
        echo LangUtil::$generalTerms['SPECIMEN_ID'] . ": ";
        $specimen->getAuxId();
        echo "<br>";
    }
    if ($_SESSION['pid'] != 0) {
        echo LangUtil::$generalTerms['PATIENT_ID'] . ": " . $patient->surrogateId . "<br>";
    }
    if ($_SESSION['dnum'] != 0) {
        echo LangUtil::$generalTerms['PATIENT_DAILYNUM'] . ": " . $specimen->getDailyNum() . "<br>";
开发者ID:caseyi,项目名称:BLIS,代码行数:31,代码来源:specimen_form_fetch.php

示例3: update_patient

function update_patient($modified_record)
{
    # Updates an existing patient record
    # Called from ajax/patient_update.php
    $myFile = "../../local/myFile.txt";
    $fh = fopen($myFile, 'a') or die("can't open file");
    $pid = $modified_record->patientId;
    $current_record = get_patient_by_id($pid);
    if ($modified_record->name == "") {
        $modified_record->name = $current_record->name;
    }
    if (trim($modified_record->age) == "" || is_nan($modified_record->age)) {
        $modified_record->age = 0;
    }
    $query_string = "UPDATE patient SET " . "name='{$modified_record->name}', " . "surr_id='{$modified_record->surrogateId}', " . "addl_id='{$modified_record->addlId}', " . "sex='{$modified_record->sex}', ";
    if ($modified_record->age != 0) {
        $today = date("Y-m-d");
        $today_parts = explode("-", $today);
        # Find year of birth based on supplied age value
        if ($modified_record->age < 0) {
            # Age was specified in months
            $timestamp = mktime(0, 0, 0, $today_parts[1] - -1 * $modified_record->age, $today_parts[2], $today_parts[0]);
            $year = date("Y", $timestamp);
            $month = date("m", $timestamp);
            $dob = "";
            $modified_record->partialDob = $year . "-" . $month;
        } else {
            # Age specified in years
            $timestamp = mktime(0, 0, 0, $today_parts[1], $today_parts[2], $today_parts[0] - $modified_record->age);
            $year = date("Y", $timestamp);
            $dob = "";
            $modified_record->partialDob = $year;
        }
    }
    $modified_record->age = 0;
    if ($modified_record->partialDob != "") {
        $query_string .= "age={$modified_record->age}, partial_dob='{$modified_record->partialDob}' ";
    } else {
        if ($modified_record->dob != "") {
            $query_string .= "age={$modified_record->age}, partial_dob='', dob='{$modified_record->dob}' ";
        }
    }
    $query_string .= "WHERE patient_id={$pid}";
    fwrite($fh, $query_string);
    fclose($fh);
    query_blind($query_string);
    # Addition of custom fields: done from calling function/page
    return true;
}
开发者ID:nchopra,项目名称:C4G-BLIS,代码行数:49,代码来源:db_lib.php

示例4: getPatientUpdateForm

	public function getPatientUpdateForm($pid)
	{
		$patient = get_patient_by_id($pid);
		$lab_config = LabConfig::getById($_SESSION['lab_config_id']);
		?>
		<form name='profile_update_form' id='profile_update_form'>
		<input type='hidden' value='<?php echo $patient->patientId; ?>' name='patient_id'></input>
		<input type='hidden' value='0' name='pd_ym' id='pd_ym'></input>
		<input type='hidden' value='0' name='pd_y' id='pd_y'></input>
		<table class='hor-minimalist-b'>
			<tbody>
				<tr <?php
				if($lab_config->pid == 0)
				{
					echo " style='display:none;' ";
				}
				?>>
					<td><u><?php echo LangUtil::$generalTerms['PATIENT_ID']; ?></u></td>
					<td>
						<input type='text' name='surr_id' id='surr_id' value='<?php echo $patient->surrogateId; ?>' class='uniform_width'></input>
					</td>
				</tr>
				
				<tr <?php
				if($lab_config->patientAddl == 0)
				{
					echo " style='display:none;' ";
				}
				?>>
					<td><u><?php echo LangUtil::$generalTerms['ADDL_ID']; ?></u></td>
					<td>
						<input type='text' value='<?php echo $patient->addlId; ?>' name='addl_id' class='uniform_width'></input>
					</td>
				</tr>
				<tr>
					<td><u><?php echo LangUtil::$generalTerms['NAME']; ?></u></td>
					<td>
					<input type='text' value='<?php echo $patient->name; ?>' name='name' class='uniform_width'></input>
					</td>
				</tr>
				<tr>
					<td><u><?php echo LangUtil::$generalTerms['GENDER']; ?></u></td>
					<td>
						<select name='sex'  class='uniform_width'>
						<option value='M'
						<?php
						if($patient->sex == 'M')
							echo " selected ";
						?>
						>
						<?php echo LangUtil::$generalTerms['MALE']; ?>
						</option>
						<option value='F'
						<?php
						if($patient->sex == 'F')
							echo " selected ";
						?>
						>
						<?php echo LangUtil::$generalTerms['FEMALE']; ?>
						</option>
						</select>
				</tr>
				<tr>
					<td><u title='Enter either Age or Date of Birth'><?php echo LangUtil::$generalTerms['AGE']; ?></u></td>
					<td>
						<?php 
						if($patient->age != null and $patient->age != "" and $patient->age != "0")
						{
						?>
							<input type='text' name='age' id='age' value='<?php echo $patient->age; ?>'  class='uniform_width'></input>
						<?php
						}
						else
						{
						?>
							<input type='text' name='age' id='age' value=''  class='uniform_width'></input>
						<?php
						}
						?>
						<select name='age_param' id='age_param'>
							<option value='1'><?php echo LangUtil::$generalTerms['YEARS']; ?></option>
							<option value='2'><?php echo LangUtil::$generalTerms['MONTHS']; ?></option>
						</select>
					</td>
				</tr>
				<tr valign='top'>
					<td><u title='Enter either Age or Date of Birth'><?php echo LangUtil::$generalTerms['DOB']; ?></u></td>
					<td><?php 
						$value_list = array();
						$name_list = array();
						$id_list = array();
						$name_list[] = "yyyy";
						$name_list[] = "mm";
						$name_list[] = "dd";
						$id_list = $name_list;
						if($patient->partialDob != null && $patient->partialDob != "")
						{
							# Partial DoB value is present
							if(strpos($patient->partialDob, "-") === false)
							{
//.........这里部分代码省略.........
开发者ID:jfurlong,项目名称:BLIS,代码行数:101,代码来源:page_elemsdff.php

示例5: getPatientTaskList

	public function getPatientTaskList($patient_id)
	{
		$patient = get_patient_by_id($patient_id);
		$patient_num =$patient->getDailyNum();
		$pieces = explode("-", $patient_num);
				
		# Lists patient-profile related tasks in a tips box
            $patientBarcodes = patientBarcodeCheck();
		global $LIS_TECH_RO, $DISABLE_UPDATE_PATIENT_PROFILE;
		if($_SESSION['user_level'] != $LIS_TECH_RO)
		{
		?>
			<div class='sidetip_nopos'>
			<p>
				<a href='new_specimen.php?pid=<?php echo $patient_id; ?>&dnum=<?php echo $pieces[1]; ?>' title='Click to Register a New Specimen for this Patient'>
					<?php echo LangUtil::$pageTerms['MSG_REGNEWSPECIMEN']; ?>
				</a>
			</p>
			<?php
			if(($DISABLE_UPDATE_PATIENT_PROFILE === false)&&(get_level_by_id($_SESSION['user_id']) ==2))
			{
				?>
				<p>
					<a href='javascript:toggle_profile_divs();' title='Click to Update Patient Profile'>
						<?php echo LangUtil::$pageTerms['MSG_UPDATEPROFILE']; ?>
					</a>
					
				</p>
				<?php
			}
			?>
			<p>
				<a href='reports_testhistory.php?location=<?php echo $_SESSION['lab_config_id']; ?>&patient_id=<?php echo $patient_id; ?>' title='Click to Generate Test History Report for this Patient' target='_blank'>
					<?php echo LangUtil::$pageTerms['MSG_PRINTHISTORY']; ?>
				</a>
			</p>
                        <?php
			if($patientBarcodes == 1)
			{
				?>
				<p>
					<a href='javascript:print_patient_barcode();' title='Click to Print Patient Barcode'>
						<?php echo "Print Patient Barcode" ?>
					</a>
					
				</p>
				<?php
			}
			?>
			<!--<p><a href='#'>Export as XML</a></p>-->
				<?php
				if (is_billing_enabled($_SESSION['lab_config_id']))
					{ ?>
				<p>
					<a rel='facebox' href='bill_generator.php?location=<?php echo$_SESSION['lab_config_id']; ?>&patient_id=<?php echo $patient_id; ?>' title='Click to generate a billing statement for this Patient' target='_blank'>
						<?php echo "Billing Report" ?>
					</a>
				</p>
				<?php } ?>
			</div>
		<?php
		}
	}
开发者ID:jfurlong,项目名称:BLIS,代码行数:63,代码来源:page_elems.php

示例6: get_patient

 public function get_patient($patient_id)
 {
     /*$chk = check_api_token($tok);
       if($chk != 1)
       return $chk;*/
     $pat = get_patient_by_id($patient_id);
     if ($pat != 3) {
         $ret = $pat;
     } else {
         $ret = 0;
     }
     return $ret;
 }
开发者ID:caseyi,项目名称:BLIS,代码行数:13,代码来源:db_lib.php


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