public function testImarie() { $patient = new patient(); $patient->setNationality("Filipino"); $this->assertEquals("Filipino", $patient->getNationality()); $patient->setPatient_no("1"); $this->assertEquals("1", $patient->getPatient_no()); $patient->setOccupation("Engineer"); $this->assertEquals("Engineer", $patient->getOccupation()); $patient->setCivil_status("Single"); $this->assertEquals("Single", $patient->getCivil_status()); }
public function patient() { try { $user = User::find(\Auth::user()->id); $sd = explode("/", $user->patient->bp); $context = new Context(new OperationCheck()); $levelText = $context->executeStrategy($user->patient->fbs, $sd[0], $sd[1], $user->patient->complication); $level = new LevelPatientFactory(); $level = $level->getLevelPatient($levelText); return view('app/show/patient')->with(['user' => $user])->with(['level' => $level->draw()]); } catch (\Exception $e) { $patient = new patient(); $patient->bp = "0/0"; $patient->fbs = "0"; $patient->suggestion = "0"; $patient->complication = "0"; $patient->user_id = \Auth::user()->id; $patient->save(); return redirect('app/show/patient'); } }
function process_detail() { if (func_num_args()>0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; //print_r($arg_list); } switch($post_vars["submitdetail"]) { case "Delete Service": if (module::confirm_delete($menu_id, $post_vars, $get_vars)) { $sql = "delete from m_consult_mc_services ". "where service_id = '".$post_vars["service"]."' and ". "mc_id = '".$post_vars["mc_id"]."' and ". "mc_timestamp = '".$post_vars["sts"]."'"; if ($result = mysql_query($sql)) { header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=".$get_vars["ptmenu"]."&module=mc&mc=SVC&mc_id=".$post_vars["mc_id"]); } } else { if ($post_vars["confirm_delete"]=="No") { header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=".$get_vars["ptmenu"]."&module=mc&mc=SVC&mc_id=".$post_vars["mc_id"]); } } break; case "Delete Record"; if (module::confirm_delete($menu_id, $post_vars, $get_vars)) { $sql = "delete from m_consult_mc_vaccine ". "where vaccine_id = '".$post_vars["vaccine"]."' and ". "mc_id = '".$post_vars["mc_id"]."' and ". "vaccine_timestamp = '".$post_vars["ts"]."'"; if ($result = mysql_query($sql)) { $sql_vaccine = "delete from m_consult_vaccine ". "where vaccine_id = '".$post_vars["vaccine"]."' and ". "consult_id = '".$post_vars["vaccine_consult_id"]."' and ". "source_module = 'mc'"; $result_vaccine = mysql_query($sql_vaccine); header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=".$get_vars["ptmenu"]."&module=mc&mc=SVC&mc_id=".$post_vars["mc_id"]); } } else { if ($post_vars["confirm_delete"]=="No") { header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=".$get_vars["ptmenu"]."&module=mc&mc=SVC&mc_id=".$post_vars["mc_id"]); } } break; case "Update Record"; $adr = ($post_vars["adr_flag"]?"Y":"N"); list($month,$day,$year) = explode("/", $post_vars["actual_vaccine_date"]); $actual_vaccine_date = $year."-".str_pad($month, 2, "0", STR_PAD_LEFT)."-".str_pad($day, 2, "0", STR_PAD_LEFT); $patient_id = healthcenter::get_patient_id($get_vars["consult_id"]); $patient_dob = patient::get_dob($patient_id); $sql = "update m_consult_mc_vaccine set ". "actual_vaccine_date = '$actual_vaccine_date' ". "where vaccine_id = '".$post_vars["vaccine"]."' and ". "mc_id = '".$post_vars["mc_id"]."' and ". "vaccine_timestamp = '".$post_vars["ts"]."'"; if ($result = mysql_query($sql)) { $sql_vaccine = "update m_consult_vaccine set ". "actual_vaccine_date = '$actual_vaccine_date' ". "where vaccine_id = '".$post_vars["vaccine"]."' and ". "consult_id = '".$post_vars["vaccine_consult_id"]."' and ". "source_module = 'mc'"; $result_vaccine = mysql_query($sql_vaccine); header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=".$get_vars["ptmenu"]."&module=".$get_vars["module"]."&mc=SVC&vaccine=".$post_vars["vaccine"]."&ts=".$post_vars["ts"]."&mc_id=".$post_vars["mc_id"]."#vaccine_detail"); } } }
<?php if (false == ($firstThread instanceof Proposal)) { include(dirname(__FILE__).'/_patientinfo.php'); } else { ?> <h3 class="case_xq_title">服务申请</h3> <div class="sick_info"> <div class="sick_title">患者信息</div> <dl class="sick_info_con" style="width:60%"> <dt><img src="http://i1.hdfimg.com/touch/images/case_img3.png" /></dt> <dd><span>患者:</span><font class="patient_name"><?=$userPrivateName?></font></dd> <dd><span>性别:</span><?=patient::getPatientSex($ref->patient->sex)?></dd> <dd><span>年龄:</span><?=XDateTime::isDate($ref->patient->birthday) ? $ref->patient->getPatientAge() : $ref->patient->age?></dd> </dl> </div> <h4 class="case_xq_list_title">病情资料</h4> <div class="condition_data"> <?php $bingliSet = $firstThread->getBingLiSet(); $patient = $firstThread->patient; include dirname(__FILE__).'/../../common_inc/'.'_binglidtos.php'; ?> </div> <?php } ?> <script type="text/javascript"> $(document).ready(function(){ $(".post_content div").each(function(){
function form_visitdetails() { // // shows list of patient groups and complaints // on the left side under VISIT DETAILS // if (func_num_args()>0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; $validuser = $arg_list[3]; $isadmin = $arg_list[4]; //print_r($arg_list); } $patient_id = $this->get_patient_id($get_vars["consult_id"]); $age = patient::get_age($patient_id); $gender = patient::get_gender($patient_id); print "<table width='300'>"; print "<form action = '".$_SERVER["SELF"]."?page=CONSULTS&menu_id=$menu_id&consult_id=".$get_vars["consult_id"]."&ptmenu=DETAILS' name='form_patient' method='post'>"; print "<tr valign='top'><td>"; print "<span class='boxtitle'>".LBL_PTGROUP."</span><br> "; print ptgroup::checkbox_ptgroup($age, $gender); print "<br>"; print "</td></tr>"; /* print "<tr valign='top'><td>"; print "<span class='boxtitle'>".LBL_COMPLAINTCAT."</span><br> "; print complaint::checkbox_complaintcat($age, $gender); print "<br>"; print "</td></tr>"; */ print "<tr valign='top'><td>"; print "<span class='boxtitle'>".LBL_SEE_DOCTOR."?</span><br> "; print "<input type='radio' name='see_doctor_flag' value='Y'/> Will see physician<br/>"; print "<input type='radio' name='see_doctor_flag' value='N'/> Will not see physician<br/>"; print "</td></tr>"; print "<tr><td>"; print "<br><input type='submit' value = 'Save Details' class='textbox' name='submitdetails' style='border: 1px solid #000000'><br>"; print "</td></tr>"; print "</form>"; print "</table><br>"; }
function process_detail() { if (func_num_args()>0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; //print_r($arg_list); } switch($post_vars["submitdetail"]) { case "Update Service": if(isset($_POST[actual_service_date]) && isset($_POST[service_qty])): list($month,$date,$year) = explode('/',$_POST[actual_service_date]); $serv_date = $year.'-'.$month.'-'.$date; /* $sel_px = mysql_query("SELECT patient_id FROM m_patient_mc WHERE mc_id='$get_vars[mc_id]'") or die("Cannot query: 2197"); list($px_id) = mysql_fetch_array($sel_px); $q_service = mysql_query("SELECT actual_service_date,service_id,mc_timestamp FROM m_consult_mc_services WHERE mc_id='$get_vars[mc_id]' AND patient_id='$px_id' AND actual_service_date='$_POST[actual_service_date]' AND service_id='$get_vars[service_id]' AND mc_timestamp!='$get_vars[sts]'") or die("Cannot query: 2200"); list($date,$sid,$ts) = mysql_fetch_array($q_service); echo $_POST[actual_service_date]; if(mysql_num_rows($q_service)==0): */ $update_service = mysql_query("UPDATE m_consult_mc_services SET actual_service_date='$serv_date',service_qty='$_POST[service_qty]' WHERE service_id='$_POST[service]' AND mc_id='$_POST[mc_id]' AND mc_timestamp='$_POST[sts]'") or die("Cannot query: 2193"); echo "<script language='Javascript'>"; if($update_service): echo "window.alert('Service was successfully been updated!')"; else: echo "window.alert('Service was not update.\n Maaring kulang ang date o quantity.')"; endif; echo "</script>"; /* else: echo 'b'; echo "<script language='Javascript'>"; echo "window.alert('Service was not updated. Actual date of service already exists.')"; echo "</script>"; endif; */ else: echo "<script language='Javascript'>"; echo "window.alert('Service was not update.\n Maaring kulang ang date o quantity.')"; echo "</script>"; endif; break; case "Delete Service": if (module::confirm_delete($menu_id, $post_vars, $get_vars)) { $sql = "delete from m_consult_mc_services ". "where service_id = '".$post_vars["service"]."' and ". "mc_id = '".$post_vars["mc_id"]."' and ". "mc_timestamp = '".$post_vars["sts"]."'"; if ($result = mysql_query($sql)) { header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=".$get_vars["ptmenu"]."&module=mc&mc=SVC&mc_id=".$post_vars["mc_id"]); } } else { if ($post_vars["confirm_delete"]=="No") { header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=".$get_vars["ptmenu"]."&module=mc&mc=SVC&mc_id=".$post_vars["mc_id"]); } } break; case "Delete Record"; if (module::confirm_delete($menu_id, $post_vars, $get_vars)) { $sql = "delete from m_consult_mc_vaccine ". "where vaccine_id = '".$post_vars["vaccine"]."' and ". "mc_id = '".$post_vars["mc_id"]."' and ". "vaccine_timestamp = '".$post_vars["ts"]."'"; if ($result = mysql_query($sql)) { /*$sql_vaccine = "delete from m_consult_vaccine ". "where vaccine_id = '".$post_vars["vaccine"]."' and ". "consult_id = '".$post_vars["vaccine_consult_id"]."' and ". "source_module = 'mc'"; */ $sql_vaccine = "DELETE FROM m_consult_vaccine WHERE consult_id='$post_vars[vaccine_consult_id]' AND vaccine_id='$post_vars[vaccine]'"; $result_vaccine = mysql_query($sql_vaccine) or die(mysql_error()); header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=".$get_vars["ptmenu"]."&module=mc&mc=SVC&mc_id=".$post_vars["mc_id"]); } } else { if ($post_vars["confirm_delete"]=="No") { header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=".$get_vars["ptmenu"]."&module=mc&mc=SVC&mc_id=".$post_vars["mc_id"]); } } break; case "Update Record"; $adr = ($post_vars["adr_flag"]?"Y":"N"); list($month,$day,$year) = explode("/", $post_vars["actual_vaccine_date"]); $actual_vaccine_date = $year."-".str_pad($month, 2, "0", STR_PAD_LEFT)."-".str_pad($day, 2, "0", STR_PAD_LEFT); $patient_id = healthcenter::get_patient_id($get_vars["consult_id"]); $patient_dob = patient::get_dob($patient_id); $sql = "update m_consult_mc_vaccine set ". "actual_vaccine_date = '$actual_vaccine_date' ". "where vaccine_id = '".$post_vars["vaccine"]."' and ". "mc_id = '".$post_vars["mc_id"]."' and ". "vaccine_timestamp = '".$post_vars["ts"]."'"; if ($result = mysql_query($sql)) { /*$sql_vaccine = "update m_consult_vaccine set ". "actual_vaccine_date = '$actual_vaccine_date' ". "where vaccine_id = '".$post_vars["vaccine"]."' and ". "consult_id = '".$post_vars["vaccine_consult_id"]."' and ". "source_module = 'mc'"; */ $sql_vaccine = "update m_consult_vaccine set ". "actual_vaccine_date = '$actual_vaccine_date' ". "where vaccine_id = '".$post_vars["vaccine"]."' and ". "consult_id = '".$post_vars["vaccine_consult_id"]; $result_vaccine = mysql_query("UPDATE m_consult_vaccine SET actual_vaccine_date='$actual_vaccine_date' WHERE consult_id='$post_vars[vaccine_consult_id]' AND vaccine_id='$post_vars[vaccine]'") or die("Cannot update: 2247"); header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=".$get_vars["ptmenu"]."&module=".$get_vars["module"]."&mc=SVC&vaccine=".$post_vars["vaccine"]."&ts=".$post_vars["ts"]."&mc_id=".$post_vars["mc_id"]."#vaccine_detail"); } } }
<?php if ($ticket != null && $ticket->isNull() == false) { ?> <input type="button" value="审核通过并继续下一条>>" class="case_comfirm" onclick="doSubmit('<?=$router->urlfor('nfsaudit/passOrdinarySignin',array('ticketId'=>$ticket->id)) ?>')"/> <?php }?> <?php if (isset($inspectGroupName) && $inspectGroupName == PatientSigninInspectGroup::GROUP_PATIENTSIGNIN) { ?> <input type="button" value="上交并继续下一条>>" class="case_comfirm returnToX"/> <?php }?> </div> </div> <table cellpadding="0" cellspacing="0" border="1" class="adminlist" style="margin-bottom:5px;"> <tr> <td width="80" class="ltl">患者</td> <td> ID:<a href="<?php echo $router->urlfor('intention/patient',array('c'=>'intention','a'=>'patient','userId'=>$patientSignin->user->id,'showContent'=>1));?>" target="_blank" title="查看患者资料"><?= $patientSignin->patient->name?></a> 性别:<?php if($patientSignin->patient->isNull() == false) {echo patient::getpatientSex($patientSignin->patient->sex);}?> 出生年月:<?= $patientSignin->patient->birthday ?> 年龄 :<?= $patientSignin->patient->getPatientAge() ?> 地区:<?= $patientSignin->patient->province ?> <?= $patientSignin->patient->city ?> </td> </tr> <tr> <td width="80" class="ltl">用户</td> <td> <?php $space = $doctorPatientRef->space; $user = $doctorPatientRef->user; include('intention/proposal/_userspaceflow.php'); ?> </td> </tr>
function form_fp_obs() { $pxid = healthcenter::get_patient_id($_GET[consult_id]); $q_fp = $this->check_fprec(); $px_gender = patient::get_gender($pxid); list($fp_id) = mysql_fetch_array($q_fp); if ($px_gender == 'F') { if (mysql_num_rows($q_fp) != 0) { $sel_obgyn = mysql_query("SELECT fpal,date_format(date_last_delivery,'%m/%d/%Y') as date_delivery,type_last_delivery,date_format(past_menstrual_date,'%m/%d/%Y') as past_mens, duration_bleeding,date_format(last_menstrual_period,'%m/%d/%Y') as lmp FROM m_patient_fp_obgyn_details WHERE fp_id='{$fp_id}'") or die("Cannot query : 1371" . mysql_error()); if (mysql_num_rows($sel_obgyn) != 0) { list($fpal, $delivery_date, $outcome_name, $past_mens, $duration_bleeding, $patient_lmp) = mysql_fetch_array($sel_obgyn); } else { //check if the patient has a maternal record in CHITS echo "<p align='justify'><font size='3' class='boxtitle'>Note: This form is connected to the Maternal Care record of the patient. Default values here are based on most recent MC record entered for this patient.</font>"; $q_mc = mysql_query("SELECT obscore_fpal, date_format(delivery_date,'%m/%d/%Y'), outcome_id, date_format(patient_lmp,'%m/%d/%Y') FROM m_patient_mc a WHERE a.patient_id='{$pxid}' ORDER by patient_lmp DESC LIMIT 1") or die("Cannot query 1303: " . mysql_error()); $q_fp_obs = mysql_query("SELECT duration_bleeding,date_format(past_menstrual_date,'%m/%d/%Y') FROM m_patient_fp_obgyn_details WHERE fp_id='{$fp_id}'") or die("Cannot query 1312: " . mysql_error()); list($duration_bleeding, $past_mens) = mysql_fetch_array($q_fp_obs); if (mysql_num_rows($q_mc) != 0) { list($fpal, $delivery_date, $outcome_id, $patient_lmp) = mysql_fetch_array($q_mc); if ($delivery_date == '0000-00-00') { $delivery_date = ''; echo "<br><font size='2' color='red' class='boxtitle'><b>This patient has an existing record in CHITS. Patient is presently pregnant based on records.</b></font>"; } else { echo "<br><font size='2' color='red' class='boxtitle'><b>This patient has an existing record in CHITS. Patient's pregnancy and delivery was previously been recorded.</b></font>"; } $q_outcome = mysql_query("SELECT outcome_name FROM m_lib_mc_outcome WHERE outcome_id='{$outcome_id}'") or die("Cannot query 1315" . mysql_error()); if (mysql_num_rows($q_outcome) != 0) { list($outcome_name) = mysql_fetch_array($q_outcome); } else { $outcome_name = ''; } } $q_outcome = mysql_query("SELECT outcome_name FROM m_lib_mc_outcome WHERE outcome_id='{$outcome_id}'") or die("Cannot query 1315" . mysql_error()); if (mysql_num_rows($q_outcome) != 0) { list($outcome_name) = mysql_fetch_array($q_outcome); } else { $outcome_name = ''; } } echo "<form action='{$_SERVER['PHP_SELF']}?page={$_GET['page']}&menu_id={$_GET['menu_id']}&consult_id={$_GET['consult_id']}&ptmenu={$_GET['ptmenu']}&module={$_GET['module']}&fp=OBS#obs' method='POST' name='form_fp_obs'>"; echo "<input type='hidden' name='fp_id' value='{$fp_id}'></input>"; echo "<a name='obs'></a>"; echo "<table bgcolor='#66FF66'>"; echo "<thead><td colspan='2' align='center' bgcolor='#339966' class='whitetext'><b>OBSTECTRICAL HISTORY</b></td></thead>"; echo "<tr><td class='boxtitle'>Number of Pregnancies (FPAL)</td>"; echo "<td class='boxtitle'><input type='text' name='txt_fp_fpal' size='3' maxlength='4' value='{$fpal}'></td></tr>"; echo "<tr><td class='boxtitle'>Date of Last Delivery</td><td><input type='text' name='txt_last_delivery' size='8' maxlength='11' value='{$delivery_date}'>"; echo "<a href=\"javascript:show_calendar4('document.form_fp_obs.txt_last_delivery', document.form_fp_obs.txt_last_delivery.value);\"><img src='../images/cal.gif' width='16' height='16' border='0' alt='Click here to pick up date'></a>"; echo "</input></td></tr>"; echo "<tr><td class='boxtitle'>TYPE OF LAST DELIVERY</td><td><input type='text' name='txt_type_delivery' size='20' value='{$outcome_name}'></td></tr>"; echo "<tr><td class='boxtitle'>PAST MENSTRUAL PERIOD</td><td><input type='text' name='txt_past_mens' size='8' maxlength='11' value='{$past_mens}'>"; echo "<a href=\"javascript:show_calendar4('document.form_fp_obs.txt_past_mens', document.form_fp_obs.txt_past_mens.value);\"><img src='../images/cal.gif' width='16' height='16' border='0' alt='Click here to pick up date'></a>"; echo "</input></td></tr>"; echo "<tr><td class='boxtitle'>LAST MENSTRUAL PERIOD</td><td><input type='text' name='txt_last_mens' size='8' maxlength='11' value='{$patient_lmp}'>"; echo "<a href=\"javascript:show_calendar4('document.form_fp_obs.txt_last_mens', document.form_fp_obs.txt_last_mens.value);\"><img src='../images/cal.gif' width='16' height='16' border='0' alt='Click here to pick up date'></a>"; echo "</input></td></tr>"; echo "<tr><td class='boxtitle'>Duration and Character of Menstrual Bleeding</td><td><input type='text' name='txt_mens_bleed' size='3' value='{$duration_bleeding}'></input> days</td></tr>"; echo "<tr><td colspan='2' align='center'><input type='submit' name='submit_fp' value='Save Obstectrical History' style='border: 1px solid #000000'></td></tr>"; echo "</table>"; echo "</form>"; } else { $this->no_fp_msg(); } } else { echo "<br><br><font color='red'>Obstetrical history is only for female patients</font><br><br>"; } }
function removeAccount() { $patientId = Session::get('patient_id'); if (!isset($patientId)) { return json_encode(array('message' => 'not logged')); } if (isset($patientId)) { $patient = patient::find($patientId); if (isset($patient)) { $patient->status = 'removed'; $patient->save(); return json_encode(array('message' => 'done')); } else { return json_encode(array('message' => 'invalid')); } } else { return json_encode(array('message' => 'invalid')); } }
function display_vaccine_record_details() { if (func_num_args() > 0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; $validuser = $arg_list[3]; $isadmin = $arg_list[4]; //print_r($arg_list); } $patient_id = healthcenter::get_patient_id($get_vars["consult_id"]); $sql = "select consult_id, user_id, patient_id, vaccine_timestamp, date_format(vaccine_timestamp, '%a %d %b %Y, %h:%i%p'), " . "vaccine_id, adr_flag, actual_vaccine_date, source_module " . "from m_consult_vaccine where " . "vaccine_id = '" . $get_vars["vaccine"] . "' and patient_id = '{$patient_id}' and " . "vaccine_timestamp = '" . $get_vars["ts"] . "'"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { list($cid, $uid, $pid, $vstamp, $vdate, $vid, $adr, $actual_date, $source) = mysql_fetch_array($result); print "<a name='detail'>"; print "<table width='250' cellpadding='3' style='border:1px dashed black'><tr><td>"; print "<form name='form_vaccine_detail' method='post' action='" . $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=" . $get_vars["ptmenu"] . "&module=vaccine&vaccine={$vid}&ts={$vstamp}&actual={$actual_vdate}'>"; print "<span class='tinylight'>"; print "PATIENT: " . patient::get_name($pid) . "<br/>"; print "DATA SOURCE: " . strtoupper($source) . "<br/>"; print "VACCINE: " . vaccine::get_vaccine_name($vid) . "<br/>"; print "REPORT DATE: {$vdate}<br/>"; print "RECORDED BY: " . user::get_username($uid) . "<br/>"; print "ACTUAL VACCINE DATE:<br/>"; if ($actual_date != "0000-00-00") { list($year, $month, $day) = explode("-", $actual_date); $conv_date = "{$month}/{$day}/{$year}"; } print "<input type='text' size='10' maxlength='10' class='tinylight' name='actual_vaccine_date' value='" . ($conv_date ? $conv_date : $post_vars["actual_vaccine_date"]) . "' style='border: 1px solid #000000'> "; print "<a href=\"javascript:show_calendar4('document.form_vaccine_detail.actual_vaccine_date', document.form_vaccine_detail.actual_vaccine_date.value);\"><img src='../images/cal.gif' width='16' height='16' border='0' alt='Click Here to Pick up the date'></a><br>"; print "<input type='checkbox' name='adr_flag' " . ($adr == "Y" ? "checked" : "") . " value='1'/> " . INSTR_ADVERSE_VACCINE_REACTION . "<br/>"; print "<input type='hidden' name='vaccine' value='" . $get_vars["vaccine"] . "'/>"; print "<input type='hidden' name='vaccine_consult_id' value='{$cid}'/>"; print "<input type='hidden' name='ts' value='" . $get_vars["ts"] . "'/>"; if ($_SESSION["priv_delete"]) { print "<input type='submit' name='submitdetail' value='Delete Record' class='tinylight' style='border: 1px solid black'/> "; } if ($_SESSION["priv_update"]) { print "<input type='submit' name='submitdetail' value='Update Record' class='tinylight' style='border: 1px solid black'/> "; } print "</span>"; print "</form>"; print "</td></tr></table>"; } } }
<table cellpadding="0" cellspacing="0" border="1" class="adminlist" style="margin-bottom:10px;"> <tr> <td width="80" class="ltl">患者</td> <td> 性别:<?php if ($doctorPatientRef->patient->isNull() == false) { echo patient::getpatientSex($doctorPatientRef->patient->sex); } ?> 出生年月:<?php echo $doctorPatientRef->patient->birthday; ?> 年龄 : <?php echo $doctorPatientRef->patient->getPatientAge(); ?> 地区:<?php echo $doctorPatientRef->patient->province; ?> <?php echo $doctorPatientRef->patient->city; ?> </td> </tr> <tr> <td width="80" class="ltl">用户</td> <td>
<tr> <td width="80" class="ltl">患者</td> <td> ID:<a href="<?php echo $router->urlfor('intention/patient', array('c' => 'intention', 'a' => 'patient', 'userId' => $owner->user->id, 'showContent' => 1)); ?> " target="_blank" title="查看患者资料"><?php echo $owner->user->name; ?> </a>(<?php echo $owner->patient->name; ?> ) 性别:<?php if ($owner->patient->isNull() == false) { echo patient::getpatientSex($owner->patient->sex); } ?> 出生年月:<?php echo $owner->patient->birthday; ?> 年龄 : <?php echo $owner->patient->getPatientAge(); ?> 地区:<?php echo $owner->patient->province; ?> <?php
function _consult_lab_fecalysis_results() { if (func_num_args()>0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; } $sql = "select l.request_id, l.request_user_id, l.request_done, ". "date_format(l.request_timestamp, '%a %d %b %Y, %h:%i%p') request_timestamp, ". "f.consult_id, f.patient_id, done_user_id, ". "if(l.done_timestamp<>'00000000000000', date_format(l.done_timestamp, '%a %d %b %Y, %h:%i%p'), 'NA') done_timestamp, ". "if(l.request_done='Y', (unix_timestamp(l.done_timestamp)-unix_timestamp(l.request_timestamp))/3600,(unix_timestamp(sysdate())-unix_timestamp(l.request_timestamp))/3600) elapsed, ". "f.fec_collection_date, ". "f.fec_macro_findings, ". "f.fec_micro_findings, ". "f.user_id, f.request_id ". "from m_consult_lab_fecalysis f, m_consult_lab l ". "where l.request_id = f.request_id and ". "f.request_id = '".$get_vars["request_id"]."'"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { $fecalysis = mysql_fetch_array($result); print "<a name='fecalysis'>"; print "<table style='border: 1px dotted black'><tr><td>"; print "<span class='tinylight'>"; print "<b>FECALYSIS RESULTS FOR ".strtoupper(patient::get_name($fecalysis["patient_id"]))."</b><br/>"; print "REQUEST ID: <font color='red'>".module::pad_zero($fecalysis["request_id"],7)."</font><br/>"; print "DATE REQUESTED: ".$fecalysis["request_timestamp"]."<br/>"; print "REQUESTED BY: ".user::get_username($fecalysis["request_user_id"])."<br/>"; print "DATE COMPLETED: ".$fecalysis["done_timestamp"]."<br/>"; print "PROCESSED BY: ".($fecalysis["done_user_id"]?user::get_username($fecalysis["done_user_id"]):"NA")."<br/>"; print "RELEASED: ".$fecalysis["release_flag"]."<br/>"; print "<hr size='1'/>"; print "SPECIMEN COLLECTION DATE:<br/>"; print $fecalysis["fec_collection_date"]."<br/>"; print "<hr size='1'/>"; print "MACROSCOPIC FINDINGS:<br/>"; print $fecalysis["fec_macro_findings"]."<br/>"; print "<hr size='1'/>"; print "MICROSCOPIC FINDINGS:<br/>"; print $fecalysis["fec_micro_findings"]."<br/>"; print "<hr size='1'/>"; print "</span>"; print "</td></tr></table>"; } } }
?> "></span> <? } ?> </td> <td> <p><?php echo $app->patient->name; ?> </p> <p> <?php echo $app->patient->age ? $app->patient->age : $app->patient->getAgeNum(); ?> / <?php echo patient::getpatientSex($app->patient->sex); ?> </p> <p><?php echo $app->patient->province; ?> /<?php echo $app->patient->city; ?> </p> </td> <td><?php echo $app->statusDesc4Intention(); ?> </td> </tr>
function _details_imci() { if (func_num_args() > 0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; $validuser = $arg_list[3]; $isadmin = $arg_list[4]; //print_r($arg_list); } // check if age correct $patient_id = healthcenter::get_patient_id($get_vars["consult_id"]); if (!ptgroup::is_child(patient::get_age($patient_id))) { return print "<font color='red'>Module inappropriate for age.</font><br/>"; } }
function process_detail() { if (func_num_args() > 0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; //print_r($arg_list); } switch ($post_vars["submitdetail"]) { case "Update Service": list($serv_mo, $serv_date, $serv_year) = explode('/', $_POST[ccdev_serv_date]); $actual_serv_date = $serv_year . '-' . $serv_mo . '-' . $serv_date; $get_px_id = mysql_query("SELECT b.patient_lastname,b.patient_firstname,b.patient_dob,(TO_DAYS('{$actual_serv_date}')-TO_DAYS(b.patient_dob)) age_days FROM m_consult_ccdev_services a,m_patient b WHERE a.ccdev_id='{$post_vars['ccdev_id']}' AND b.patient_id=a.patient_id") or die(mysql_error()); if (mysql_num_rows($get_px_id) != 0) { list($lname, $fname, $dob, $age_days) = mysql_fetch_array($get_px_id); $age_weeks = round($age_days / 7, 1); if ($age_days < 0) { echo "<font color='red' size='3'>Update unsuccessful.Newborn screening should occur on or after this patient's date of birth. ({$dob})</font><br>"; } else { $update_ccdev_service = mysql_query("UPDATE m_consult_ccdev_services SET ccdev_service_date='{$actual_serv_date}' ,age_on_service='{$age_weeks}' WHERE service_id='{$post_vars['service']}' AND ccdev_id='{$post_vars['ccdev_id']}' AND ccdev_timestamp='{$post_vars['sts']}'") or die("Cannot query: 960"); if ($update_ccdev_service) { echo "<font color='red' size='3'>Update was successfully done!</font><br>"; } } } else { } break; case "Delete Service": if (module::confirm_delete($menu_id, $post_vars, $get_vars)) { $sql = "delete from m_consult_ccdev_services " . "where service_id = '" . $post_vars["service"] . "' and " . "ccdev_id = '" . $post_vars["ccdev_id"] . "' and " . "ccdev_timestamp = '" . $post_vars["sts"] . "'"; if ($result = mysql_query($sql)) { header("location: " . $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=" . $get_vars["ptmenu"] . "&module=" . $get_vars["module"]); } } else { if ($post_vars["confirm_delete"] == "No") { header("location: " . $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=" . $get_vars["ptmenu"] . "&module=" . $get_vars["module"]); } } break; case "Delete Record": if (module::confirm_delete($menu_id, $post_vars, $get_vars)) { $sql = "delete from m_consult_ccdev_vaccine " . "where vaccine_id = '" . $post_vars["vaccine"] . "' and " . "ccdev_id = '" . $post_vars["ccdev_id"] . "' and " . "vaccine_timestamp = '" . $post_vars["ts"] . "'"; if ($result = mysql_query($sql)) { $sql_vaccine = "delete from m_consult_vaccine " . "where vaccine_id = '" . $post_vars["vaccine"] . "' and " . "consult_id = '" . $post_vars["vaccine_consult_id"] . "' and " . "source_module = 'ccdev'"; $result_vaccine = mysql_query($sql_vaccine); header("location: " . $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=" . $get_vars["ptmenu"] . "&module=" . $get_vars["module"]); } } else { if ($post_vars["confirm_delete"] == "No") { header("location: " . $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=" . $get_vars["ptmenu"] . "&module=" . $get_vars["module"]); } } break; case "Update Record": $adr = $post_vars["adr_flag"] ? "Y" : "N"; list($month, $day, $year) = explode("/", $post_vars["actual_vaccine_date"]); $actual_vaccine_date = $year . "-" . str_pad($month, 2, "0", STR_PAD_LEFT) . "-" . str_pad($day, 2, "0", STR_PAD_LEFT); $patient_id = healthcenter::get_patient_id($get_vars["consult_id"]); $patient_dob = patient::get_dob($patient_id); $sql = "update m_consult_ccdev_vaccine set " . "adr_flag = '{$adr}', " . "actual_vaccine_date = '{$actual_vaccine_date}', " . "age_on_vaccine = (to_days('{$actual_vaccine_date}')-to_days('{$patient_dob}'))/7 " . "where vaccine_id = '" . $post_vars["vaccine"] . "' and " . "ccdev_id = '" . $post_vars["ccdev_id"] . "' and " . "vaccine_timestamp = '" . $post_vars["ts"] . "'"; if ($result = mysql_query($sql)) { $sql_vaccine = "update m_consult_vaccine set " . "actual_vaccine_date = '{$actual_vaccine_date}' " . "where vaccine_id = '" . $post_vars["vaccine"] . "' and " . "consult_id = '" . $post_vars["vaccine_consult_id"] . "' and " . "source_module = 'ccdev'"; $result_vaccine = mysql_query($sql_vaccine); header("location: " . $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=" . $get_vars["ptmenu"] . "&module=" . $get_vars["module"] . "&ccdev=SVC&vaccine=" . $post_vars["vaccine"] . "&ts=" . $post_vars["ts"] . "&ccdev_id=" . $post_vars["ccdev_id"] . "#detail"); } } }
function _consult_lab_sputum_results() { if (func_num_args()>0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; } $sql = mysql_query("select l.request_id, l.request_user_id, l.request_done, ". "date_format(l.request_timestamp, '%a %d %b %Y, %h:%i%p') request_timestamp, ". "s.consult_id, s.patient_id, done_user_id, ". "if(l.done_timestamp<>'00000000000000', date_format(l.done_timestamp, '%a %d %b %Y, %h:%i%p'), 'NA') done_timestamp, ". "if(l.request_done='Y', (unix_timestamp(l.done_timestamp)-unix_timestamp(l.request_timestamp))/3600,(unix_timestamp(sysdate())-unix_timestamp(l.request_timestamp))/3600) elapsed, ". "s.sp1_collection_date, s.sp2_collection_date, s.sp3_collection_date, ". "s.sp1_appearance, s.sp2_appearance, s.sp3_appearance, ". "s.sp1_reading, s.sp2_reading, s.sp3_reading, s.lab_diagnosis, ". "s.user_id, s.request_id, s.release_flag, s.sputum_period,s.lab_diag1,s.lab_diag2,s.lab_diag3 ". "from m_consult_lab_sputum s, m_consult_lab l ". "where l.request_id = s.request_id and ". "s.request_id = '".$get_vars["request_id"]."'") or die("Cannot query ".mysql_error()); if ($sql) { if (mysql_num_rows($sql)) { $sputum = mysql_fetch_array($sql); $res1 = ((!empty($sputum["lab_diag1"])?(($sputum["lab_diag1"]=="P")?"Positive":(($sputum["lab_diag1"]=="N")?"Negative":"Doubtful")):"No diagnosis yet")); $res2 = ((!empty($sputum["lab_diag2"])?(($sputum["lab_diag2"]=="P")?"Positive":(($sputum["lab_diag2"]=="N")?"Negative":"Doubtful")):"No diagnosis yet")); $res3 = ((!empty($sputum["lab_diag3"])?(($sputum["lab_diag3"]=="P")?"Positive":(($sputum["lab_diag3"]=="N")?"Negative":"Doubtful")):"No diagnosis yet")); print "<a name='sputum_result'>"; print "<table style='border: 1px dotted black'><tr><td>"; print "<span class='tinylight'>"; print "<b>SPUTUM RESULTS FOR ".strtoupper(patient::get_name($sputum["patient_id"]))."</b><br/>"; print "REQUEST ID: <font color='red'>".module::pad_zero($sputum["request_id"],7)."</font><br/>"; print "DATE REQUESTED: ".$sputum["request_timestamp"]."<br/>"; print "REQUESTED BY: ".user::get_username($sputum["request_user_id"])."<br/>"; print "DATE COMPLETED: ".$sputum["done_timestamp"]."<br/>"; print "PROCESSED BY: ".($sputum["done_user_id"]?user::get_username($sputum["done_user_id"]):"NA")."<br/>"; print "HOURS ELAPSED: ".$sputum["elapsed"]."<br/>"; print "RELEASED: ".$sputum["release_flag"]."<br/>"; print "<hr size='1'/>"; print "SPUTUM EXAM PERIOD:<br/> "; print " ".sputum::get_sputum_period_name($sputum["sputum_period"])."<br/>"; print "<hr size='1'/>"; print "SPECIMEN COLLECTION DATES - DIAGNOSIS<br/>"; print "sp #1: ".$sputum["sp1_collection_date"]." - ".$res1."<br/>"; print "sp #2: ".$sputum["sp2_collection_date"]." - ".$res2."<br/>"; print "sp #3: ".$sputum["sp3_collection_date"]." - ".$res3."<br/>"; print "<hr size='1'/>"; print "SPECIMEN VISUAL APPEARANCE:<br/>"; print "sp #1: ".sputum::get_sputum_appearance_name($sputum["sp1_appearance"])."<br/>"; print "sp #2: ".sputum::get_sputum_appearance_name($sputum["sp2_appearance"])."<br/>"; print "sp #3: ".sputum::get_sputum_appearance_name($sputum["sp3_appearance"])."<br/>"; print "<hr size='1'/>"; print "SPECIMEN READING:<br/>"; print "sp #1: ".sputum::get_sputum_reading_name($sputum["sp1_reading"])."<br/>"; print "sp #2: ".sputum::get_sputum_reading_name($sputum["sp2_reading"])."<br/>"; print "sp #3: ".sputum::get_sputum_reading_name($sputum["sp3_reading"])."<br/>"; print "<hr size='1'/>"; print "FINAL LAB DIAGNOSIS: ".sputum::get_diagnosis_name($sputum["lab_diagnosis"])."<br/>"; print "</span>"; print "</td></tr></table>"; } } }
function _consult_lab_fecalysis_results() { $q_fecalysis = mysql_query("SELECT date_format(date_lab_exam,'%m/%d/%Y') as 'date_lab_exam',fecal_color,fecal_consistency,fecal_occultblood,fecal_ova,fecal_wbc,fecal_rbc,fecal_bacteria,fecal_fat,fecal_starch,fecal_others,user_id,patient_id FROM m_consult_lab_fecalysis WHERE request_id='{$_GET['request_id']}' AND release_flag='Y'") or die("Cannot query 150" . mysql_error()); $q_lab_details = mysql_query("SELECT patient_id,date_format(request_timestamp,'%a %d %b %Y, %h %i %p') as 'date_requested', request_user_id, date_format(done_timestamp,'%a %d %b %Y, %h %i %p') as 'date_done', request_done, done_user_id FROM m_consult_lab WHERE request_id='{$_GET['request_id']}' AND request_done='Y'") or die("Cannot query 151:" . mysql_error()); list($pxid, $date_request, $request_user_id, $date_done, $request_done, $done_user_id) = mysql_fetch_array($q_lab_details); list($date_lab_exam, $color, $consistency, $blood, $ova, $wbc, $rbc, $bacteria, $fat, $starch, $others, $userid, $pxid) = mysql_fetch_row($q_fecalysis); echo "<a name='fecalysis_result'></a>"; echo "<table style='border: 1px dotted black'><tr><td>"; print "<span class='tinylight'>"; print "<b>FECALYSIS RESULTS FOR " . strtoupper(patient::get_name($pxid)) . "</b><br/>"; print "REQUEST ID: <font color='red'>" . module::pad_zero($_GET["request_id"], 7) . "</font><br/>"; print "DATE REQUESTED: " . $date_request . "<br/>"; print "REQUESTED BY: " . user::get_username($request_user_id) . "<br/>"; print "DATE COMPLETED: " . $date_done . "<br/>"; print "PROCESSED BY: " . ($done_user_id ? user::get_username($done_user_id) : "NA") . "<br/>"; print "RELEASED: " . $request_done . "<br/>"; print "<hr size='1'/>"; print "<b>FECALYSIS EXAM DATE: </b>" . $date_lab_exam . "<br/> "; print "<b>MACROSCOPIC</b><br/><b>PHYSICAL</b><br/>"; print "<b>COLOR: </b>" . $color . "<br/>"; print "<b>CONSISTENCY: </b>" . $consistency . "<br/>"; print "<b>CHEMICAL</b><br/>"; print "<b>OCCULT BLOOD: </b>" . $blood . "<br/>"; print "<hr size='1'/>"; print "<b>MICROSCOPIC </b><br/>"; print "<b>OVA OR PARASITE: </b>" . $ova . "<br/>"; print "<b>WBC: </b>" . $wbc . "<br/>"; print "<b>RBC: </b>" . $rbc . "<br/>"; print "<b>BACTERIA: </b>" . $bacteria . "<br/>"; print "<b>FAT GLOBULES: </b>" . $fat . "<br/>"; print "<b>STARCH GRANULES: </b>" . $starch . "<br/>"; print "<b>OTHERS: </b>" . $others . "<br/>"; print "</span>"; echo "</td></tr></table>"; }
function _consult() { static $patient; if (func_num_args() > 0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; $validuser = $arg_list[3]; $isadmin = $arg_list[4]; //print_r($arg_list); } if (!isset($patient)) { $patient = new patient(); } // always check dependencies //if ($exitinfo = $this->missing_dependencies('healthcenter')) { // return print($exitinfo); //} if ($get_vars["patient_id"] && $get_vars["consult_id"]) { print "<table>"; print "<tr valign='top'><td>"; $this->patient_info($menu_id, $post_vars, $get_vars); print "</td></tr>"; print "</table>"; } else { if ($post_vars["submitpatient"]) { // processes form_patient $patient->process_patient($menu_id, $post_vars, $get_vars); $this->process_consult($menu_id, $post_vars, $get_vars); //header("location: ".$_SERVER["PHP_SELF"]."?page=CONSULTS&menu_id=$menu_id"); } if ($post_vars["submitconsult"]) { // confirms consult for found patients $this->process_consult($menu_id, $post_vars, $get_vars); } if ($post_vars["submitsearch"]) { // lists down search results for patient $patient->process_search($menu_id, $post_vars, $get_vars); } print "<table><tr valign='top'><td colspan='2'>"; // display all patients confirmed with consults $this->consult_info($menu_id, $post_vars, $get_vars); print "</td></tr>"; print "<tr valign='top'><td>"; $patient->newsearch($menu_id, $post_vars, $get_vars); print "</td><td>"; $patient->form_patient($menu_id, $post_vars, $get_vars); print "</td></tr>"; print "</table>"; } }
function form_fp_obs() { $pxid = healthcenter::get_patient_id($_GET[consult_id]); $q_fp = $this->check_fprec(); $px_gender = patient::get_gender($pxid); if ($px_gender == 'F') { if (mysql_num_rows($q_fp) != 0) { echo "<form action='{$_SERVER['PHP_SELF']}' method='POST' name='form_fp_obs'>"; echo "<a name='obs'></a>"; echo "<table>"; echo "<thead><td colspan='2'>OBSTETRICAL HISTORY</td></thead>"; echo "<tr><td>Number of Pregnancies (FPAL)</td>"; echo "<td><input type='text' name='txt_fp_fpal' size='3' maxlength='4'></td></tr>"; echo "<tr><td>Date of Last Delivery</td><td><input type='text' name='txt_last_delivery' size='7' maxlength='11'>"; echo "<a href=\"javascript:show_calendar4('document.form_fp_obs.txt_last_delivery', document.form_fp_obs.txt_last_delivery.value);\"><img src='../images/cal.gif' width='16' height='16' border='0' alt='Click here to pick up date'></a>"; echo "</input></td></tr>"; echo "<tr><td>TYPE OF LAST DELIVERY</td><td><input type='text' name='txt_type_delivery' size='10'></td></tr>"; echo "<tr><td>PAST MENSTRUAL PERIOD</td><td><input type='text' name='txt_past_mens' size='7' maxlength='11'>"; echo "<a href=\"javascript:show_calendar4('document.form_fp_obs.txt_past_mens', document.form_fp_obs.txt_past_mens.value);\"><img src='../images/cal.gif' width='16' height='16' border='0' alt='Click here to pick up date'></a>"; echo "</input></td></tr>"; echo "<tr><td>LAST MENSTRUAL PERIOD</td><td><input type='text' name='txt_last_mens' size='7' maxlength='11'>"; echo "<a href=\"javascript:show_calendar4('document.form_fp_obs.txt_last_mens', document.form_fp_obs.txt_last_mens.value);\"><img src='../images/cal.gif' width='16' height='16' border='0' alt='Click here to pick up date'></a>"; echo "</input></td></tr>"; echo "<tr><td>Duration and Character of Menstrual Bleeding</td><td><input type='text' name='txt_mens_bleed' size='3'></input> days</td></tr>"; echo "<tr><td colspan='2' align='center'><input type='submit' name='submit_fp' value='Save Obstectrical History'></td></tr>"; echo "</table>"; echo "</form>"; } else { $this->no_fp_msg(); } } else { echo "<br><br><font color='red'>Obstetrical history is only for female patients</font><br><br>"; } }
function _consult_lab_hematology_results() { if (func_num_args() > 0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; $validuser = $arg_list[3]; $isadmin = $arg_list[4]; } $q_hema = mysql_query("SELECT date_format(date_lab_exam,'%m/%d/%Y') as 'date_lab_exam',hemoglobin,hematocrit,rbc,rbc_mcv,rbc_mchc,rbc_mch,wbc,wbc_polys,wbc_lympho,wbc_mxd,wbc_mono,wbc_eosin,wbc_baso,platelet,reticulocytes,esr,clotting_time,bleeding_time,malaria,slit_smear,fbs,blood_type,user_id,patient_id,others,rh,stabs FROM m_consult_lab_hematology WHERE request_id='{$_GET['request_id']}'") or die("Cannot query: 131" . mysql_error()); $q_lab = mysql_query("SELECT patient_id,date_format(request_timestamp,'%a %d %Y,%h %i %p') as 'date_requested',request_user_id,date_format(done_timestamp,'%a %d %b %Y, %h %i %p') as 'date_done',request_done,done_user_id FROM m_consult_lab WHERE request_id='{$_GET['request_id']}'") or die("Cannot query 132" . mysql_error()); if (mysql_num_rows($q_hema) != 0) { list($date_lab_exam, $hemo, $hema, $rbc, $mcv, $mchc, $mch, $wbc, $polys, $lympho, $mxd, $mono, $eosin, $baso, $platelet, $reticulocytes, $esr, $clotting_time, $bleeding_time, $malaria, $slit_smear, $fbs, $blood_type, $user_id, $patient_id, $others, $rh, $stabs) = mysql_fetch_array($q_hema); } else { $date_lab_exam = date('m/d/Y'); } list($pxid, $date_request, $request_user_id, $date_done, $request_done, $done_user_id) = mysql_fetch_array($q_lab); echo "<a name='hematology_result'></a>"; echo "<table style='border: 1px dotted black' width='400'><tr><td colspan='4'>"; echo "<span class='tinylight'>"; echo "<b>HEMATOLOGY RESULTS FOR " . strtoupper(patient::get_name($pxid)) . "</b><br/>"; echo "REQUEST ID: <font color='red'>" . module::pad_zero($_GET["request_id"], 7) . "</font><br/>"; echo "DATE REQUESTED: " . $date_request . "<br/>"; echo "REQUESTED BY: " . user::get_username($request_user_id) . "<br/>"; echo "DATE COMPLETED: " . $date_done . "<br/>"; echo "PROCESSED BY: " . ($done_user_id ? user::get_username($done_user_id) : "NA") . "<br/>"; echo "RELEASED: " . $request_done . "<br/>"; echo "<hr size='1'></td></tr>"; echo "<tr><td colspan='4' class='boxtitle'>DATE EXAMINED {$date_lab_exam}"; echo "</td></tr>"; echo "<tr><td>TEST</td><td>RESULT</td><td>TEST</td><td>RESULT</td></tr>"; echo "<tr><td class='boxtitle'>HEMOGLOBIN</td><td class='tinylight'>{$hemo}</td><td class='boxtitle'>PLATELET</td><td class='tinylight'>{$platelet}</td></tr>"; echo "<tr><td class='boxtitle'>HEMATOCRIT</td><td class='tinylight'>{$hema}</td><td class='boxtitle'>RETICULOCYTES</td><td class='tinylight'>{$reticulocytes}</td></tr>"; echo "<tr><td class='boxtitle'>RBC</td><td class='tinylight'>{$rbc}</td><td class='boxtitle'>ESR</td><td class='tinylight'>{$esr}</td></tr>"; echo "<tr><td class='boxtitle'>MCV</td><td class='tinylight'>{$mcv}</td><td class='boxtitle'>CLOTING TIME</td><td class='tinylight'>{$clotting_time}</td></tr>"; echo "<tr><td class='boxtitle'>MCHC</td><td class='tinylight'>{$mchc}</td><td class='boxtitle'>BLEEDING TIME</td><td class='tinylight'>{$bleeding_time}</td></tr>"; echo "<tr><td class='boxtitle'>MCH</td><td class='tinylight'>{$mch}</td><td class='boxtitle'>MALARIA</td><td class='tinylight'>{$malaria}</td></tr>"; echo "<tr><td class='boxtitle'>WBC</td><td class='tinylight'>{$wbc}</td><td class='boxtitle'>SLIT SMEAR</td><td class='tinylight'>{$slit_smear}</td></tr>"; echo "<tr><td class='boxtitle'>POLYS</td><td class='tinylight'>{$polys}</td><td class='boxtitle'>FBS</td><td class='tinylight'>{$fbs}</td></tr>"; echo "<tr><td class='boxtitle'>LYMPHO</td><td class='tinylight'>{$lympho}</td><td class='boxtitle'>"; $blood_type = $blood_type == '0' ? '' : $blood_type; echo "BLOOD TYPE"; echo "</td><td class='tinylight'>{$blood_type}"; echo "</td></tr>"; echo "<tr><td class='boxtitle'>RH</td><td class='tinylight'>{$rh}</td><td colspan='2'> </td></tr>"; echo "<tr><td class='boxtitle'>MXD</td><td class='tinylight'>{$mxd}</td><td colspan='2'> </td></tr>"; echo "<tr><td class='boxtitle'>MONO</td><td class='tinylight'>{$mono}</td><td colspan='2'> </td></tr>"; echo "<tr><td class='boxtitle'>EOSIN</td><td class='tinylight'>{$eosin}</td><td colspan='2'> </td></tr>"; echo "<tr><td class='boxtitle'>BASO</td><td class='tinylight'>{$baso}</td><td colspan='2'> </td></tr>"; echo "<tr><td class='boxtitle'>STABS</td><td class='tinylight'>{$stabs}</td><td colspan='2'> </td></tr>"; echo "</table>"; $_SESSION["lab_print"] = "HEMATOLOGY RESULTS FOR " . strtoupper(patient::get_name($pxid)) . "<br/>" . "DATE REQUESTED: " . $date_request . "<br/>" . "REQUESTED BY: " . user::get_username($request_user_id) . "<br/>" . "DATE COMPLETED: " . $date_done . "<br/>" . "PROCESSED BY: " . ($done_user_id ? user::get_username($done_user_id) : "NA") . "<br/>" . "<br/><br/>" . "HEMOGLOBIN: {$hemo}<br/>PLATELET: {$platelet}<br/>" . "HEMATOCRIT: {$hema}<br/>RETICULOCYTES: {$reticulocytes}<br/>" . "RBC: {$rbc}<br/>ESR: {$esr}<br/>" . "MCV: {$mcv}<br/>CLOTING TIME: {$clotting_time}<br/>" . "MCHC: {$mchc}<br/>BLEEDING TIME: {$bleeding_time}<br/>" . "MCH: {$mch}<br/>MALARIA: {$malaria}<br/>" . "WBC: {$wbc}<br/>SLIT SMEAR: {$slit_smear}<br/>" . "POLYS: {$polys}<br/>FBS: {$fbs}<br/>" . "LYMPHO: {$lympho}<br/>" . "BLOOD TYPE: {$blood_type}" . "<br/>" . "RH: {$rh}<br/>" . "MXD: {$mxd}<br/>" . "MONO: {$mono}<br/>" . "EOSIN: {$eosin}<br/>" . "BASO: {$baso}<br/>" . "STABS: {$stabs}"; }
public function get_patient_details() { $patient_id = $this->input->post('patient_id'); $query = patient::get_patient_details($patient_id); echo json_encode($query); }
function process_inclusive_dates() { if (func_num_args() > 0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; $validuser = $arg_list[3]; $isadmin = $arg_list[4]; //print_r($arg_list); } $sql_delete = "delete from m_patient_epi_tcl"; $result_delete = mysql_query($sql_delete); list($month, $day, $year) = explode("/", $post_vars["start_date"]); $start_date = $year . "-" . str_pad($month, 2, "0", STR_PAD_LEFT) . "-" . str_pad($day, 2, "0", STR_PAD_LEFT); list($month, $day, $year) = explode("/", $post_vars["end_date"]); $end_date = $year . "-" . str_pad($month, 2, "0", STR_PAD_LEFT) . "-" . str_pad($day, 2, "0", STR_PAD_LEFT); /*$sql = "select p.patient_id, p.patient_dob, concat(p.patient_lastname, ', ', p.patient_firstname) ". "patient_name, p.patient_mother, ". "date_format(adddate(p.patient_dob, interval 1 year), '%b %y') month_reaches_age1, m.fully_immunized_date ". "from m_patient p, m_patient_ccdev m ". "where p.patient_id = m.patient_id and ". "to_days(adddate(p.patient_dob,interval 1 year)) >= to_days('$start_date') and ". "to_days(adddate(p.patient_dob,interval 1 year)) <= to_days('$end_date') order by p.patient_dob "; */ /*$sql = "select patient_id, patient_dob, concat(patient_lastname, ', ', patient_firstname) ". "patient_name, patient_mother, ". "date_format(adddate(patient_dob, interval 1 year), '%b %y') month_reaches_age1 ". "from m_patient ". "where to_days(adddate(patient_dob,interval 1 year)) >= to_days('$start_date') and ". "to_days(adddate(patient_dob,interval 1 year)) <= to_days('$end_date') order by patient_dob ";*/ $sql = "select patient_id, patient_dob, concat(patient_lastname, ', ', patient_firstname) " . "patient_name, patient_mother, " . "date_format(adddate(patient_dob, interval 1 year), '%b %y') month_reaches_age1 " . "from m_patient " . "where to_days(registration_date) >= to_days('{$start_date}') and " . "to_days(registration_date) <= to_days('{$end_date}') order by registration_date "; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { while ($report = mysql_fetch_array($result)) { // blank variables $patient_age = patient::get_age($report[patient_id]); if ($patient_age <= 1) { $family_id = 0; $patient_address = ''; $barangay_id = ''; // retrieve other data $family_id = family::get_family_id($report["patient_id"]); if ($family_id) { $patient_address = family::show_address($family_id); $barangay_id = family::barangay_id($family_id); } $fully_immunized_date = $this->get_fully_immunized_date($report[patient_id]); // insert data into tcl $sql_insert = "insert into m_patient_epi_tcl (patient_id, patient_dob, family_id, patient_name, " . "patient_mother, patient_address, barangay_name, month_reaches_age1, " . "fully_immunized_date) values ('" . $report["patient_id"] . "', " . "'" . $report["patient_dob"] . "', '{$family_id}', '" . $report["patient_name"] . "', " . "'" . $report["patient_mother"] . "', '{$patient_address}', '{$barangay_id}', " . "'" . $report["month_reaches_age1"] . "', '{$fully_immunized_date}')"; $result_insert = mysql_query($sql_insert) or die(mysql_error()); $this->get_vaccine_date($report["patient_id"], $start_date, $end_date); } } // while $sql = "select patient_id 'PATIENT ID', date_format(patient_dob,'%c/%e/%y') 'DATE OF BIRTH', " . "family_id 'FAMILY ID', patient_name 'NAME OF INFANT', patient_mother 'NAME OF MOTHER', " . "patient_address 'ADDRESS', barangay_name 'BRGY', month_reaches_age1 'MONTH REACHES AGE 1', " . "fully_immunized_date 'DATE FULLY IMMUNIZED', " . "BCG 'BCG', DPT1 'DPT 1', " . "DPT2 'DPT 2', DPT3 'DPT 3', " . "OPV1 'POLIO 1', OPV2 'POLIO 2', " . "OPV3 'POLIO 3', MSL 'MEASLES', " . "HEPB1 'HEPA B1', HEPB2 'HEPA B2', " . "HEPB3 'HEPA B3' " . "from m_patient_epi_tcl order by barangay_name, patient_dob "; //"where to_days(actual_vaccine_date) >= to_days('$start_date') and ". //"to_days(actual_vaccine_date) <= to_days('$end_date') ". //"order by barangay_name, patient_dob "; $pdf = new PDF('L', 'pt', 'Legal'); //$pdf->SetMargins('0.5','0.5','0.5'); $pdf->SetFont('Arial', '', 10); //$pdf->SetMargins('0.5','0.5','0.5'); $pdf->AliasNbPages(); $pdf->connect('localhost', 'root', '', 'game'); $attr = array('titleFontSize' => 14, 'titleText' => 'TARGET CLIENT LIST FOR EPI (' . $post_vars["start_date"] . ' - ' . $post_vars["end_date"] . ')'); $pdf->mysql_report($sql, false, $attr, "../modules/_uploads/epi_tcl.pdf"); header("location: " . $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&report_menu=TCL"); } } }
private function getDetailOfProposal($proposal, $openid) {/*{{{*/ $str = ''; $patient = $proposal->patient; $bingliSet = $proposal->getBingLiSet(); $titleAndDisease = NodeClient::getInstance()->getTitleAndDiseaseByRelatedObjIds(array($proposal->id), "Proposal"); $title = isset($titleAndDisease[$proposal->id]->title) ? $titleAndDisease[$proposal->id]->title : ""; $diseaseName = isset($titleAndDisease[$proposal->id]->disease) ? $titleAndDisease[$proposal->id]->disease : ""; $age = ""; if(XDateTime::isDate($patient->birthday)) { $age = $patient->getPatientAge(); } else if ($patient->age) { $age = $patient->age; } $xiangyingTitle = $patient->userName . ":" . $title; $str = "---疾病信息---\n"; $str .= "疾病:" . $diseaseName . "\n"; $str .= "\n---患者基本资料---\n"; $str .= "姓名:" . $patient->name . "\n"; $str .= "性别:" . patient::getpatientSex($patient->sex) . "\n"; $str .= "所在省市:" . $patient->province . " " . $patient->city . "\n"; $str .= "提交时间:" . $proposal->ctime; $str .= "\n"; $conditionDesc = "\n---病情描述---\n"; foreach($bingliSet->conditiondesc as $dto) { $conditionDesc .= (''==$dto->conditionDesc)?'未填写': ($dto->conditionDesc)." "; $conditionDesc = str_replace("<br/>", "\n", $conditionDesc); } if(mb_strlen($conditionDesc) > 300) { $conditionDesc = mb_substr($conditionDesc, 0, 300) . "\n..."; } $str .= $conditionDesc; $str .= "\n"; $dto = array_pop($bingliSet->hopeHelp); if(!empty($dto)) { $hopeHelp = empty($dto) ? '' : $dto->hopeHelp; $str .= "\n---希望提供的帮助---\n"; $str .= $hopeHelp; $str .= "\n"; } $hospitalName = ''; $diagnozeStr = ''; foreach($bingliSet->hospital as $dto) { $hospitalName .= $dto->hospitalName . " " . $dto->facultyName . "\n"; } if($hospitalName != '') { $diagnozeStr .= "所就诊医院科室:" . $hospitalName; } $medicine = ""; foreach($bingliSet->medicine as $dto) { $medicine .= "药物名称:" . $dto->medicineName . " \n服用说明:" . $dto->medicineDesc . "\n"; } if(mb_strlen($medicine) > 300) { $medicine = mb_substr($medicine, 0, 300) . "\n..."; } if($medicine != '') { $diagnozeStr .= "-用药情况-\n"; $diagnozeStr .= $medicine; } if($diagnozeStr != '') { $str .= "\n---诊断与治疗---\n"; $str .= $diagnozeStr; } if (false == empty($bingliSet->patientAttachment)) { $desc = "病历:点击【查看全文】查看患者上传病历"; $str .= $desc; } $str .= "\n"; $str .= "------------------------"; $str .= "\n"; $str .= "■ 病情不适合由您处理请回复数字 2 ■ 需离开处理其它紧急事项请回复数字 3 "; $weixintype = WeixUser::WEIXINTYPE_SPACE; $config = WeixApi::getWeixConfigs($weixintype); $AppId = $config['AppId']; $domain = $config['domain']; $Url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' . $AppId . '&redirect_uri=' . $domain. '/wx/auth4space?proposalId=' .$proposal->id . '&response_type=code&scope=snsapi_base&state=#wechat_redirect'; $arr = array ( array( 'Title' => $xiangyingTitle, 'Description' => $str, 'PicUrl' => '', 'Url' => $Url, ), ); return WeixApi::xiangyingNewsMsgWithArr($openid, WeixUser::WEIXINTYPE_SPACE, $arr); }/*}}}*/
<tr> <td width="80" class="ltl">患者</td> <td> ID:<a href="<?php echo $router->urlfor('intention/patient', array('c' => 'intention', 'a' => 'patient', 'userId' => $user->id, 'showContent' => 1)); ?> " target="_blank" title="查看患者资料"><?php echo $user->name; ?> </a>(<?php echo $followupOwner->patient->name; ?> ) 性别:<?php if ($user->getFollowupPatient()->isNull() == false) { echo patient::getpatientSex($user->getFollowupPatient()->sex); } ?> 出生年月:<?php echo $user->getFollowupPatient()->birthday; ?> 年龄 : <?php echo $user->getFollowupPatient()->getPatientAge(); ?> 地区:<?php echo $user->getFollowupPatient()->province; ?> <?php
function display_reminder_data() { if (func_num_args() > 0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; $validuser = $arg_list[3]; $isadmin = $arg_list[4]; //print_r($arg_list); } print "<form method='post' action='" . $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=DETAILS&module=reminder&reminder=DATA'>"; print "<table width='300' cellpadding='2' style='border: 1px dotted black'><tr><td>"; $patient_id = healthcenter::get_patient_id($get_vars["consult_id"]); print "<b>NAME: " . strtoupper(patient::get_name($patient_id)) . "</b><br/>"; $sql = "select patient_id, cellular_phone, home_phone, " . "office_phone, email_address, home_address, " . "barangay, reg_timestamp, user_id " . "from m_patient_reminder_data " . "where patient_id = {$patient_id}"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { $reminder = mysql_fetch_array($result); print "<span class='tinylight'>"; if (strlen($reminder["cellular_phone"]) > 0) { print "CELLULAR PHONE: " . $reminder["cellular_phone"] . "<br/>"; } if (strlen($reminder["home_phone"]) > 0) { print "HOME PHONE: " . $reminder["home_phone"] . "<br/>"; } if (strlen($reminder["office_phone"]) > 0) { print "OFFICE PHONE: " . $reminder["office_phone"] . "<br/>"; } if (strlen($reminder["email_address"]) > 0) { print "EMAIL ADDRESS: " . $reminder["email_address"] . "<br/>"; } if (strlen($reminder["home_address"]) > 0) { print "HOME ADDRESS: " . $reminder["home_address"] . "<br/>"; } if ($reminder["barangay"]) { print "BARANGAY: " . barangay::barangay_name($reminder["barangay"]) . "<br/>"; } print "<br/></span>"; print "<input type='hidden' name='patient_id' value='" . $reminder["patient_id"] . "' />"; if ($_SESSION["priv_update"] || $_SESSION["priv_delete"]) { print "<input type='submit' name='submitdetail' value='Edit Reminder Data' class='tinylight' style='border: 1px solid black' />"; } } else { print "<font color='red'>No reminder data</font><br/>"; } } print "</td></tr></table>"; print "</form>"; }
} } $status[$actionkey] = 0; $baseinfo['qa_status'] = join(",", $status); $class->edit($baseinfo, $_POST["id"]); } // 提問狀態 if ($_POST["do"] == "qa") { $post['patient_id'] = $_POST["id"]; $post['user_id'] = $_SESSION['customer_id']; $post['actionkey'] = $actionkey; $post['content'] = $_POST["content"]; $class = new question(); $qid = $class->add($post); if ($qid) { $class = new patient(); $info = $class->getInfo((int) $_POST["id"]); $baseinfo = array(); $status = explode(",", $info['qa_status']); for ($i = 0; $i < $actionkey; $i++) { if (empty($status[$i])) { $status[$i] = 0; } } $status[$actionkey] = 1; $baseinfo['qa_status'] = join(",", $status); $class->edit($baseinfo, $_POST["id"]); // echo $baseinfo['qa_status']; // mail通知 $cusClass = new registration(); $customerInfo = $cusClass->getCustomer($_SESSION['customer_id']);
} } if (file_exists('../modules/occupation/class.occupation.php')) { include '../modules/occupation/class.occupation.php'; $occupation = new occupation; if (!$module->activated('occupation') && $initmod) { $occupation->init_sql(); $occupation->init_menu(); $occupation->init_deps(); $occupation->init_lang(); $occupation->init_help(); } } if (file_exists('../modules/patient/class.patient.php')) { include '../modules/patient/class.patient.php'; $patient = new patient; if (!$module->activated('patient') && $initmod) { $patient->init_sql(); $patient->init_menu(); $patient->init_deps(); $patient->init_lang(); $patient->init_help(); } } if (file_exists('../modules/philhealth/class.philhealth.php')) { include '../modules/philhealth/class.philhealth.php'; $philhealth = new philhealth; if (!$module->activated('philhealth') && $initmod) { $philhealth->init_sql(); $philhealth->init_menu(); $philhealth->init_deps();
function _consult_lab_urinalysis_results() { $q_lab_urinalysis = mysql_query("SELECT date_format(date_lab_exam,'%m/%d/%Y') as 'date_lab_exam',physical_color,physical_reaction,physical_transparency,physical_gravity,physical_ph,chem_albumin,chem_sugar,chem_pregnancy,sediments_rbc,sediments_pus,sediments_epithelial,sediments_urates,sediments_calcium,sediments_fat,sediments_phosphate,sediments_uric,sediments_amorphous,sediments_carbonates,sediments_bacteria,sediments_mucus,cast_coarsely,cast_pus,cast_hyaline,cast_finely,cast_redcell,cast_waxy FROM m_consult_lab_urinalysis WHERE request_id='{$_GET['request_id']}' AND release_flag='Y'") or die("Cannot query 146" . mysql_error()); $q_lab_details = mysql_query("SELECT patient_id,date_format(request_timestamp,'%a %d %b %Y, %h %i %p') as 'date_requested', request_user_id, date_format(done_timestamp,'%a %d %b %Y, %h %i %p') as 'date_done', request_done, done_user_id FROM m_consult_lab WHERE request_id='{$_GET['request_id']}' AND request_done='Y'") or die("Cannot query 147:" . mysql_error()); list($date_lab_exam, $color, $reaction, $transparency, $gravity, $ph, $albumin, $sugar, $pregnancy, $rbc, $pus, $epithelial, $urates, $calcium, $fat, $phosphate, $uric, $amorphous, $carbonates, $bacteria, $mucus, $cast_coarsely, $cast_pus, $cast_hyaline, $cast_finely, $cast_redcell, $cast_waxy) = mysql_fetch_array($q_lab_urinalysis); list($pxid, $date_request, $request_user_id, $date_done, $request_done, $done_user_id) = mysql_fetch_array($q_lab_details); echo "<a name='urinalysis_result'></a>"; echo "<table style='border: 1px dotted black' width='400'><tr><td colspan='2'>"; echo "<span class='tinylight'>"; echo "<b>URINALYSIS RESULTS FOR " . strtoupper(patient::get_name($pxid)) . "</b><br/>"; echo "REQUEST ID: <font color='red'>" . module::pad_zero($_GET["request_id"], 7) . "</font><br/>"; echo "DATE REQUESTED: " . $date_request . "<br/>"; echo "REQUESTED BY: " . user::get_username($request_user_id) . "<br/>"; echo "DATE COMPLETED: " . $date_done . "<br/>"; echo "PROCESSED BY: " . ($done_user_id ? user::get_username($done_user_id) : "NA") . "<br/>"; echo "RELEASED: " . $request_done . "<br/>"; echo "<hr size='1'/>"; echo "<tr><td colspan='2' class='boxtitle'>URINALYSIS EXAM DATE: {$date_lab_exam}"; echo "</td></tr>"; echo "<tr><td class='boxtitle'>PHYSICAL APPEARANCE</td><td class='boxtitle'>QUANT. CHEMICAL TEST</td></tr>"; echo "<tr>"; echo "<td>"; echo "<table>"; echo "<tr><td class='boxtitle'>COLOR:</td><td class='tinylight'>{$color}</td></tr>"; echo "<tr><td class='boxtitle'>REACTION:</td><td class='tinylight'>{$reaction}</td></tr>"; echo "<tr><td class='boxtitle'>TRANSPARENCY:</td><td class='tinylight'>{$transparency}</td></tr>"; echo "<tr><td class='boxtitle'>SPECIFIC GRAVITY:</td><td class='tinylight'>{$gravity}</td></tr>"; echo "<tr><td class='boxtitle'>pH:</td><td class='tinylight'>{$ph}</td></tr>"; echo "</table>"; echo "</td>"; echo "<td valign='top'>"; echo "<table>"; echo "<tr><td class='boxtitle'>ALBUMIN:</td><td class='tinylight'>{$albumin}</td></tr>"; echo "<tr><td class='boxtitle'>SUGAR:</td><td class='tinylight'>{$sugar}</td></tr>"; echo "<tr><td class='boxtitle'>PREGNANCY TEST:</td><td class='tinylight'>{$pregnancy}</td></tr>"; echo "</table>"; echo "</td>"; echo "</tr>"; echo "<tr><td colspan='2' class='boxtitle'><hr size='1'>SEDIMENTS</td></tr>"; echo "<tr><td valign='top'>"; echo "<table>"; echo "<tr><td class='boxtitle'>RED BLOOD CELLS:</td><td class='tinylight'>{$rbc}</td></tr>"; echo "<tr><td class='boxtitle'>PUS CELLS:</td><td class='tinylight'>{$pus}</td></tr>"; echo "<tr><td class='boxtitle'>EPHITHELIAL CELLS:</td><td class='tinylight'>{$epithelial}</td></tr>"; echo "<tr><td class='boxtitle'>AMORPHOUS URATES:</td><td class='tinylight'>{$urates}</td></tr>"; echo "<tr><td class='boxtitle'>CALCIUM OXALATES:</td><td class='tinylight'>{$calcium}</td></tr>"; echo "<tr><td class='boxtitle'>FAT GLOBULES:</td><td class='tinylight'>{$fat}</td></tr>"; echo "</table>"; echo "</td>"; echo "<td class='boxtitle'>"; echo "<table>"; echo "<tr><td class='boxtitle'>TRIPLE PHOSPHATES:</td><td class='tinylight'>{$phosphate}</td></tr>"; echo "<tr><td class='boxtitle'>URIC ACID CRYSTALS:</td><td class='tinylight'>{$uric}</td></tr>"; echo "<tr><td class='boxtitle'>AMORPHOUS PHOSPATES:</td><td class='tinylight'>{$amorphous}</td></tr>"; echo "<tr><td class='boxtitle'>BACTERIA:</td><td class='tinylight'>{$bacteria}</td></tr>"; echo "<tr><td class='boxtitle'>MUCUS THREADS:</td><td class='tinylight'>{$mucus}</td></tr>"; echo "</table>"; echo "</td>"; echo "</tr>"; echo "<tr>"; echo "<td colspan='2' class='boxtitle'><hr size='1'>CASTS</td></tr>"; echo "<tr>"; echo "<td class='boxtitle'>"; echo "<table>"; echo "<tr><td class='boxtitle'>COARSELY GRANULAR CAST:</td><td class='tinylight'>{$cast_coarsely}</td></tr>"; echo "<tr><td class='boxtitle'>PUS CELLS CAST:</td><td class='tinylight'>{$cast_pus}</td></tr>"; echo "<tr><td class='boxtitle'>HYALINE CAST:</td><td class='tinylight'>{$cast_hyaline}</td></tr>"; echo "</table>"; echo "</td>"; echo "<td class='boxtitle'>"; echo "<table>"; echo "<tr><td class='boxtitle'>FINELY GRANULAR CAST:</td><td class='tinylight'>{$cast_finely}</td></tr>"; echo "<tr><td class='boxtitle'>RED CELL CAST:</td><td class='tinylight'>{$cast_redcell}</td></tr>"; echo "<tr><td class='boxtitle'>WAXY CAST:</td><td class='tinylight'>{$cast_waxy}</td></tr>"; echo "</table>"; echo "</td>"; echo "</tr>"; echo "</span>"; echo "</table>"; }
private function addPatientLogInfo($params, $patient) { /*{{{*/ DBC::requireTrue($patient->isNull() == false, "患者不能为空"); $content = '管理员' . $this->curInspector->realName . '修改患者信息: </br>'; foreach ($params as $key => $value) { if (false == empty($value) && $patient->{$key} != $value) { /*{{{*/ switch ($key) { case $key == "name": $keyName = "患者姓名"; break; case $key == "sex": $patient->sex = Patient::getPatientSex($patient->sex); $value = Patient::getPatientSex($value); $keyName = "性别"; break; case $key == "paperstype": $patient->paperstype = Patient::$paperstypes[$patient->paperstype]; $value = Patient::$paperstypes[$value]; $keyName = "身份证件"; break; case $key == "idcard": $keyName = "身份证件号"; break; case $key == "province": $keyName = "省"; break; case $key == "city": $keyName = "市"; break; case $key == "birthday": $keyName = "出生日期"; break; case $key == "relation": $relationDef = patient::relationDef(); $patient->{$key} = $relationDef[$patient->{$key}]; $value = $relationDef[$value]; $keyName = "与患者关系"; break; case $key == "mobile": $keyName = "手机"; break; case $key == "phone": $keyName = "备用电话1"; break; case $key == "backupPhone": $keyName = "备用电话2"; break; } $content .= "<font style='font-weight:bold;'>" . $keyName . '</font> 从 ' . $patient->{$key} . " 修改为 " . $value . "</br>"; } /*}}}*/ } return $content; }