示例#1
0
	function input_hn($hn){
		include("connect.inc");
		$this->hn = $hn;
		$this->Thaidate = date("d-m-").(date("Y")+543);
		$sql = "Select vn, kew, toborow From opday where thdatehn = '".$this->Thaidate.$this->hn."' Order by row_id DESC limit 0,1";
		$result = Mysql_Query($sql);
		list($this->vn, $this->kew, $this->toborow) = Mysql_fetch_row($result);
		
		$sql = "Select yot, name, surname, idcard, ptright, dbirth, idguard, inrxform, note From opcard where hn = '".$this->hn."'  limit 0,1";
		list($yot, $name, $surname,$this->idcard,$this->ptright, $dbirth, $this->idguard, $this->inrxform, $this->note) = Mysql_fetch_row(Mysql_Query($sql));
		$this->ptname = $yot." ".$name." ".$surname;
		$this->age = $this->calcage($dbirth);
		
		if( $this->inrxform != ""){
			
			if($this->inrxform == "¼Ùé»èÇ¡ÅØèÁàÊÕ觵éͧä´éÃѺ¡ÒéմÇѤ«Õ¹»éͧ¡Ñ¹âää¢éËÇÑ´ãË­è(¿ÃÕ)")
				$this->inrxform .= "<BR>Influza Vaccine 0.5 ml. IM";

			$this->inrxform = "<table width='210' border='0'><TR><TD align='center'>".$this->inrxform;
			$this->inrxform .= "<TD></TR></Table>";
		}
		
		$sql = "Select tradname, advreact  From drugreact where hn = '".$this->hn."' ";
		$result = Mysql_Query($sql);
		
		if(Mysql_num_rows($result) > 0){
			$this->drugreact = "<Table width='210' border='0'><TR><TD colspan='2'><U><B>á¾éÂÒ</B></U></TD></TR>";
				while($arr = Mysql_fetch_assoc($result)){
					$this->drugreact .= "<TR><TD>ÂÒ:".$arr["tradname"]."<BR>ÍÒ¡ÒÃ:".$arr["advreact"]."</TD></TR>";
				}
			$this->drugreact .= "</Table>";
			}
		include("unconnect.inc");
	}
示例#2
0
    $first_page = "dt_dental.php";
} else {
    $first_page = "dt_diag.php";
}
$Thidate = date("Y") + 543 . date("-m-d G:i:s");
$Thaidate = date("d-m-") . (date("Y") + 543) . "  " . date("G:i:s");
$Thdhn = date("d-m-") . (date("Y") + 543) . $_SESSION["hn_now"];
$item = 0;
$detail = "";
$detail2 = "";
$item = count($_SESSION["S_listxray"]);
$stiker = "";
for ($i = 0; $i < $item; $i++) {
    $detail2 .= $i + 1 . "." . $_SESSION["S_listxray"][$i]["choice2"] . "";
}
for ($i = 0; $i < $item; $i++) {
    $detail .= $_SESSION["S_listxray"][$i]["choice2"] . " ";
    $sql = "Select dbirth From opcard where hn ='" . $_SESSION["hn_now"] . "' ";
    list($dbirth) = Mysql_fetch_row(Mysql_Query($sql));
    $sql = "INSERT INTO `xray_doctor` (`date` ,`hn` ,`vn` ,`yot` ,`name` ,`sname` ,`detail` ,`doctor` ,`status` ,`xrayno` ,`film` ,`type_diag`,`detail_all`,`dbirth`)VALUES ('" . $Thidate . "', '" . $_SESSION["hn_now"] . "', '" . $_SESSION["vn_now"] . "', '" . $_SESSION["yot_now"] . "', '" . $_SESSION["name_now"] . "', '" . $_SESSION["surname_now"] . "', '" . $detail . "', '" . $_SESSION["dt_doctor"] . "', 'N', '" . $_SESSION["nRunno"] . "', '" . $_POST["type"] . "', '" . $_POST["type_diag"] . "', '" . $detail2 . "', '" . $dbirth . "');";
    $result = mysql_query($sql);
    $stiker .= "<TR style=\"font-family:'MS Sans Serif'; font-size:14px\" >\n\t\t\t<TD>&nbsp;" . ($i + 1) . "." . $detail . "</TD>\n\n\t\t\t</TR>";
    $detail = "";
}
$stiker = "<TABLE  width=\"300\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\t<TR>\n\t\t<TD><font style=\"font-family:'MS Sans Serif'; font-size:14px\"  ><CENTER><B>㺠X-Ray&nbsp;&nbsp;No. " . $_SESSION["nRunno"] . "</B></CENTER>&nbsp;&nbsp;&nbsp;&nbsp&nbsp;" . $Thaidate . "<br>&nbsp;&nbsp;HN:" . $_SESSION["hn_now"] . ",&nbsp;&nbsp;VN:" . $_SESSION["vn_now"] . ", &nbsp; »ÃÐàÀ·¿ÔÅìÁ : " . $_POST["type"] . "<br>&nbsp;" . $_SESSION["yot_now"] . " " . $_SESSION["name_now"] . " " . $_SESSION["surname_now"] . "&nbsp;&nbsp;<BR>&nbsp;ÊÔ·¸Ô : " . $_SESSION["ptright_now"] . "<BR>&nbsp;á¾·Âì : " . $_SESSION["dt_doctor"] . "</TD>\n\t</TR>" . $stiker . "<TR><TD align='center' ><font style=\"font-family:'MS Sans Serif'; font-size:14px\"  ><B>¹Ó㺹Õéä»Â×è¹·ÕèËéͧ X-Ray</B><BR</TD></TR>";
echo "\n\t<html>\n\t<head>\n\t\t<SCRIPT LANGUAGE=\"JavaScript\">\n\t\twindow.onload = function(){\n\t\t\n\t\t\tsetTimeout(\"window.location.href='" . $first_page . "';\",5000);\n\t\t}\n\t\t</SCRIPT>\n\t</head>\n\t<body leftmargin=\"0\" topmargin=\"0\">\n\t\t", $stiker, "\n\t</body>\n\t</html>\n\t\t\t\t\n\t";
session_unregister("S_listxray");
?>


	
示例#3
0
文件: dt_drug.php 项目: robocon/shs
	echo $arr["amount"].",";

	$sql = "SELECT slcode , count(slcode) FROM `drugrx2` where  amount > 0 AND slcode != 'er' AND slcode != 'hd'  GROUP BY slcode  Order by `count(slcode)` DESC limit 1";
	$result = Mysql_Query($sql) or die(Mysql_ERROR());
	$arr = Mysql_fetch_assoc($result);
	echo $arr["slcode"];
	}

	$sql = "Select part From druglst Where drugcode = '".$_GET["search"]."' limit 1 ";
	$result = Mysql_Query($sql);
	list($part) = Mysql_fetch_row($result);
	echo ",".$part;
	
	$sql = "Select tradname From druglst Where drugcode = '".$_GET["search"]."' limit 1 ";
	$result = Mysql_Query($sql);
	list($trad) = Mysql_fetch_row($result);
	echo ",".$trad;

exit();
}

//******************************************** ДаХЦ╙И╖р╧ *****************************
if(isset($_GET["action"]) && $_GET["action"] == "addslip"){
	
	$sql = "CREATE TEMPORARY TABLE drugrx2 Select slcode, drugcode, amount From  `drugrx` where drugcode = '".$_GET["search"]."' Order by row_id DESC  limit 20";
	//$result = Mysql_Query($sql);

	$sql = "SELECT slcode , count(slcode) FROM `drugrx2` where  amount > 0 GROUP BY slcode  Order by `count(slcode)` DESC limit 1";
	//$result = Mysql_Query($sql) or die(Mysql_ERROR());
	//$arr = Mysql_fetch_assoc($result);
	//echo $arr["slcode"];
示例#4
0
?>
<FORM name="form5" METHOD=POST ACTION="dt_drug_add_pt.php" onSubmit="return rechk(<?php 
echo $count;
?>
)" >
<table width="90%" border="0" align="center">
<tr>
  <td colspan="3" align="center"><u><strong>║цьЁрцп╨ьЮк╣ь╪е║рцДаХЦ╙ИбрЦ╧╨я╜╙убркея║АкХ╖╙р╣т</strong></u></td>
  </tr>
<tr><td width="10%" align="center"><strong>цкяйбр</strong></td><td width="19%" align="center"><strong>╙вХм║рц╓Ир</strong></td><td width="71%" align="center"><strong>Юк╣ь╪е</strong></td></tr>
<?
$countddy=0;
for($i=0;$i<$count;$i++){
	$sql = "Select tradname, unit, stock, salepri, freepri, part, medical_sup_free  From druglst_pt  where drugcode = '".$_SESSION["list_drugcode"][$i]."' limit 1";
	$result = Mysql_Query($sql);
	list($drugname,$unit, $stock, $salepri, $freepri, $part, $medical_sup_free) = Mysql_fetch_row($result);
	if($part=="DDY"){
		$countddy++;
?>
<tr><td bgcolor="#FFFFCC"><?php 
echo $_SESSION["list_drugcode"][$i];
?>
</td>
<td bgcolor="#FFFFCC"><?php 
echo $drugname;
?>
</td>
<?
		if(substr($_SESSION["list_drug_reason"][$i],0,3)=="FPT"){
	?>
	<td><SELECT NAME="reason<?php 
示例#5
0
			<Option value="VERORAB 3">VERORAB 3 à¢çÁ</Option>
			<Option value="VERORAB 5">VERORAB 5 à¢çÁ</Option>
			<Option value="Engerix-B">Engerix-B</Option>
			<Option value="Hepavax">Hepavax</Option>

		</SELECT>
	</TD>
</TR>
<TR>
	<TD align="right">á¾·Âì : </TD><TD colspan="7">
		<select size="1" name="doctor" >
		<Option value="">-- àÅ×Í¡á¾·Âì --</Option>
<?php 
$sql = "Select name From doctor where status = 'y' AND row_id != '0' Order by name ASC ";
$result = Mysql_Query($sql);
while (list($name) = Mysql_fetch_row($result)) {
    echo "<option value=\"" . $name . "\" ";
    if ($arr["doctor"] == $name) {
        echo " Selected ";
    }
    echo ">" . $name . "</option>";
}
?>

		</select>
	</TD>
</TR>
<TR>
	<TD  align="right" valign="top">Çѹ¹Ñ´ : </TD><TD>
	<div id="detail_date">
		
示例#6
0
if( empty($weight) ){
	$weight = 0;
}
if( empty($height) ){
	$height = 0;
	$ht = 0;
}else{
	$ht = $height/100;
}

$bmi = number_format(($weight / ( $ht * $ht)), 2);

$sql111 = "Select dbirth From opcard where hn='$hn' ";
$result111 = Mysql_Query($sql111);
list($dbirth) = Mysql_fetch_row($result111);
$cAge = calcage($dbirth);


$pdf = new SHSPdf('L', 'mm', array( 80, 50));
$pdf->SetThaiFont(); // �絿͹��
$pdf->SetFont('THSarabun','',14); // ���¡��ҹ�͹������������
$pdf->SetAutoPageBreak(true, 2);
$pdf->SetMargins(2, 2);
$pdf->AddPage();

$full_text = "HN: $hn, $thidate, $cAge\n";
$full_text .= "VN: $vn, T: $temperature C, P: $pause ����/�ҷ�, R: $rate ����/�ҷ�\n";
$full_text .= "BP: $bp1 / $bp2 mmHg, ��: $weight ��., ��: $height ��.\n";
$full_text .= "������: $cigarette, ����: $alcohol, bmi: $bmi, PS: $painscore\n";
$full_text .= "�ѡɳ�: $type, ��Թԡ: ".(substr($clinic,3))."\n";
示例#7
0
}
?>
<form method="POST" action="<?php 
echo $PHP_SELF;
?>
">
  <p>╝┘щ╗ш╟┬╣═б  ╦┴╥┬р┼в HN (ф┤щи╥бс╝╣бр╟к├╨р║╒┬╣)</p>
  <p>&nbsp;&nbsp;&nbsp;&nbsp;HN&nbsp;&nbsp;<input type="text" name="hn" size="8"></p>
  <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="   ╡б┼з   " name="B1"></p>
</form>

<?php 
if (!empty($hn)) {
    include "connect.inc";
    $today = date("d-m-Y");
    $d = substr($today, 0, 2);
    $m = substr($today, 3, 2);
    $yr = substr($today, 6, 4) + 543;
    $thdatehn = $d . '-' . $m . '-' . $yr . $hn;
    $query = "SELECT hn, concat(yot,' ',name,' ',surname) as ptname, ptright FROM opcard WHERE hn = '{$hn}'  limit 1 ";
    $result = mysql_query($query) or die(Mysql_Error());
    list($xxx, $yyy, $zzz) = Mysql_fetch_row($result);
    print "HN :{$xxx}<br>";
    print "{$yyy}<br>";
    print "╩╘╖╕╘б╥├├╤б╔╥ :{$zzz}";
    print "<br><a href='clinic100diag.php?hn=" . $xxx . "'>!к╫ш═╢┘б╡щ═з ╖╙├╥┬б╥├╡ш═ф╗</a>";
    include "unconnect.inc";
}
?>

示例#8
0
     $exercise = $arr_dxofyear["exercise"];
     $type = $arr_dxofyear["type"];
     $doctor = $arr_dxofyear["doctor"];
     $arr_view["vn"] = $arr_dxofyear["vn"];
     if ($arr_dxofyear["congenital_disease"] != '') {
         $congenital_disease = $arr_dxofyear["congenital_disease"];
     } else {
         $congenital_disease = "����ʸ�ä��Шӵ��";
     }
     //echo "arr_dxofyear";
 } else {
     //// ���Ҩҡ opd
     $sql = "Select congenital_disease, weight, height,cigarette,alcohol,exercise ,bp1,bp2,doctor  From opd where hn = '" . $arr_view["hn"] . "' AND type <> '�ҵ�' Order by row_id DESC limit 1";
     //echo "OPD";
     $result = Mysql_Query($sql);
     list($congenital_disease, $weight, $height, $cigarette, $alcohol, $exercise, $bp1, $bp2, $doctor) = Mysql_fetch_row($result);
     if ($congenital_disease == "") {
         $congenital_disease = "����ʸ�ä��Шӵ��";
     }
 }
 $ht = $height / 100;
 $bmi = number_format($weight / ($ht * $ht), 2);
 if ($arr_dxofyear["rate"] == "") {
     $arr_dxofyear["rate"] = 20;
 }
 $choose = array();
 array_push($choose, "��Ǩ����Ѵ");
 array_push($choose, "�ҡ�͹�Ѵ");
 array_push($choose, "����ѧ�Ѵ");
 array_push($choose, "�ҡ�÷���任���");
 array_push($choose, "�Ѻ�����");
示例#9
0
文件: opcashvn.php 项目: robocon/shs
			$sql = "Select hn, status From cscddata where hn = '$hn' AND ( status like '%U%' OR status = '\r' OR status like '%V%')  limit 1 ";
			//echo $sql;

			if(Mysql_num_rows(Mysql_Query($sql)) > 0){
				$color = "99CC00";
			}else{
				$color = "FF8C8C";
			}
		}else{
			$color = "66CDAA";
		}
$credit="";
$sql = "Select credit,billno From opacc where txdate = '$date' and $paid1 > '0' and hn='$hn' order by row_id desc limit 1";
//echo $sql;
$result2 = Mysql_Query($sql);
list($credit,$billno) = Mysql_fetch_row($result2);

if($credit=='à§Ô¹Ê´'){$color3='#CC0000';}
else if($credit=='·ËÒÃä·Â'){$color3='#CC0000';}
else {$color3='#00CC99';}
$hnid = $hn;

        print " <tr>\n".
		   "  <td BGCOLOR=$color><font face='Angsana New' size='1' ><input name='ch$num' type='checkbox' value='$row_id'><font color='#CC0000'><B>$credit</B></font></td>\n".
           "  <td BGCOLOR=$color><font face='Angsana New'>$k</td>\n".
           "  <td BGCOLOR=$color><font face='Angsana New'>$time</td>\n";
		
		if($topay>0&&$price!=$topay||$cunt6>15){
		   		print "  <td BGCOLOR=$color><font face='Angsana New'><a target=_BLANK  href=\"oprxitem_pt.php? sDate=$date&nRow_id=$row_id&nAccno=$accno\">$ptname</a></td>\n";
		}else{
				print "  <td BGCOLOR=$color><font face='Angsana New'>$ptname</td>\n";
示例#10
0
header('Content-Type: text/html; charset=tis-620');
include 'connect.inc';
mysql_query("SET NAMES TIS620");
// mysql_query("SET NAMES UTF8");
// var_dump($_POST);
// exit;
$date_now = date("Y-m-d H:i:s");
$yy = explode(" ", $date_now);
$xx = explode("-", $yy[0]);
$thidate_now = $xx[0] + 543 . "-" . $xx[1] . "-" . $xx[2] . " " . $yy[1];
$date_hn2 = $xx[2] . "-" . $xx[1] . "-" . ($xx[0] + 543) . $_POST["hn"];
$date_hn = date("Y-m-d") . $_POST["hn"];
$date_vn = date("Y-m-d") . $_POST["vn"];
$sql = "SELECT count(row_id) FROM opd where thdatehn = '" . $date_hn . "' limit 1";
$result = Mysql_Query($sql);
list($rows) = Mysql_fetch_row($result);
////*runno µÃǨÊØ¢ÀÒ¾*/////////
$query = "SELECT runno, prefix  FROM runno WHERE title = 'y_chekup'";
$result = mysql_query($query) or die("Query failed");
for ($i = mysql_num_rows($result) - 1; $i >= 0; $i--) {
    if (!mysql_data_seek($result, $i)) {
        echo "Cannot seek to row {$i}\n";
        continue;
    }
    if (!($row = mysql_fetch_object($result))) {
        continue;
    }
}
$nPrefix = $row->prefix;
////*runno µÃǨÊØ¢ÀÒ¾*/////////
if ($rows > 0) {
示例#11
0
文件: ptapsort3.php 项目: robocon/shs
 <tr>
  <th bgcolor=6495ED>#</th>

  <th bgcolor=6495ED width='80'>HN</th>
  <th bgcolor=6495ED><font face='Angsana New'>����</font></th>
  <th bgcolor=6495ED><font face='Angsana New'><A HREF="<?php echo $_SERVER["PHP_SELF"];?>?doctor=<?php echo $_GET["doctor"];?>&appd=<?php echo $_GET["appd"];?>&sortby=time">���ҹѴ</A></font></th>
  <th bgcolor=6495ED><font face='Angsana New'>�Ѵ����</font></th>
  <th bgcolor=6495ED>���</th>
  <!-- <th bgcolor=6495ED>�ѹ���Ѵ</th> -->
  </tr>

<?php

	$sql = "Select menucode From inputm where idname = '".$_SESSION["sIdname"]."' limit 1 ";
	$result = Mysql_Query($sql);
	list($menucode) = Mysql_fetch_row($result);
	
		if(strlen($doctor) == 5){
			$doctor2 = " doctor like '".$doctor."%' ";
			$doctor3 = "AND left(doctor,5) <> '".$doctor."' ";

		}else{
			$doctor2 = " doctor = '".$doctor."' ";
			$doctor3 = " AND doctor <> '".$doctor."' ";
		}

		$query = "SELECT count( hn ) , hn, doctor   
		FROM `appoint` 
		WHERE appdate = '$appd' 
		".$doctor3." 
		AND apptime <> '¡��ԡ��ùѴ' 
示例#12
0
文件: dxopedit.php 项目: robocon/shs
        $cIcd101=$row->icd101;
		$cIcd10_complication = $row->icd10_complication;
		$cIcd10_other = $row->icd10_other;
		$cIcd10_external_cause = $row->icd10_external_cause;

        $cIcd9cm=$row->icd9cm;
    $cokopd=$row->okopd;
    $cthidate=$row->thidate;
	$thdatehn_value = $row->thdatehn;
	    $Cclinic=$row->clinic;
		
		$ctoborow=$row->toborow;

	$sql = "Select diag, left(toborow,5), left(toborow,4) From opday2 where thdatehn = '".$thdatehn_value."' AND (left(toborow,5) in ('EX 91', 'EX 92') OR left(toborow,4) in ('EX91', 'EX92')) ";
	$result2 = Mysql_Query($sql); 
	while(list($opday2_diag, $toborow, $toborow2) = Mysql_fetch_row($result2)){
		
		if(substr($opday2_diag,0 ,1) == ","){
			$opday2_diag = substr($opday2_diag,1);
		}
		if($cDiag != "")
			$list_diag = ", ";
		else
			$list_diag = "";

		if($toborow == "EX 91" || ($toborow2 == "EX91" ||  $toborow2 == "EX17")){
			$head_diag_ex91 = "<BR><FONT SIZE=\"2\" COLOR=\"red\">âä (¨Ò¡¡ÒÂÀÒ¾/¹Ç´á¼¹ä·Â)</FONT>";
			$detail_diag_ex91 = "<BR><FONT SIZE=\"2\" COLOR=\"red\">".$opday2_diag."</FONT>";
			$list_diag .= $opday2_diag;
		}else if($toborow == "EX 92" || $toborow2 == "EX92"){
			$head_diag_ex92 = "<BR><FONT SIZE=\"2\" COLOR=\"red\">âä (¨Ò¡½Ñ§à¢çÁ)</FONT>";
示例#13
0
Mysql_Query($sql);

$row_id = @mysql_insert_id();
$i=false;
if(count($_POST["list_lab_appoint"]) > 0)
foreach($_POST["list_lab_appoint"] as $key => $value){
	$sql = "INSERT INTO `appoint_lab` ( `id` , `code` ) VALUES ('".$row_id."', '".$value."'); ";
	Mysql_Query($sql);
	$i = true;
}

$sql = "Select count(distinct hn) as c_app From appoint where appdate = '".$_POST["date_appoint"]."' AND doctor in ('".$_SESSION["dt_doctor"]."','".$appoint_doctor."') AND apptime <> '¡��ԡ��ùѴ'  ";

$result = Mysql_Query($sql) or die(mysql_error());
list($c_app) = Mysql_fetch_row($result);

if(date("m") > $month){
	$month +=12; 
	$length_m = $month - date("m");
	$length_m = "(".$length_m."M)";

}else if(date("m") < $month){
	$length_m = $month - date("m");
	$length_m = "(".$length_m."M)";
}

setcookie($xxx[0].$month.$xxx[2], "<A HREF=\"javascript:void(0);\" Onclick=\"document.getElementById('date_appoint').value='".$_POST["date_appoint"]."';\" >".$_POST["date_appoint"]."</A>(".$c_app." ��)&nbsp;".$length_m."&nbsp;<A HREF=\"javascript:void(0);\" Onclick=\"deletecookie('".$xxx[0].$month.$xxx[2]."')\">[X]</A>", time()+(3600*6));

$down_list = "";
示例#14
0
$mysql_server_name = MonitorConf::$dbhost;
$mysql_username = MonitorConf::$dbuser;
$mysql_password = MonitorConf::$dbpass;
$mysql_database = MonitorConf::$dbname;
$now = time();
$start_time = date('Y-m-d H:i', $now - INTERVAL * 60);
$end_time = date('Y-m-d H:i', $now);
$query_db_date = date('Ym', $now);
$conn = mysql_connect($mysql_server_name, $mysql_username, $mysql_password);
if (!$conn) {
    die('Could not connect: ' . mysql_error());
}
$sendmail = new SendMail();
$strsql = "select count(*) as number from weibotc.tc_topnews_" . $query_db_date . "  where UNIX_TIMESTAMP(time) >UNIX_TIMESTAMP(NOW()) - 60 *" . INTERVAL . " and time < DATE_FORMAT(now(),'%Y-%m-%d %H:%i');";
//echo $strsql;
$result = mysql_query($strsql, $conn);
/*
$row_num = mysqli_num_rows($result);

if ($row_num != 1) {
    die("Fetch error!");
}
*/
while ($row = Mysql_fetch_row($result)) {
    if ($row[0] <= WARN_LIMIT) {
        echo "sendmail";
        $sendmail->sendmail_func($start_time, $end_time, $row[0]);
    } else {
        echo "No reach limit!";
    }
}
示例#15
0
         } else {
             if ($arr_dxofyear["exercise"] == '2') {
                 $exercise2 = "Checked";
             }
         }
     }
     if ($arr_dxofyear["congenital_disease"] != '') {
         $congenital_disease = $arr_dxofyear["congenital_disease"];
     } else {
         $congenital_disease = "����ʸ�ä��Шӵ��";
     }
     $rowid = $arr_dxofyear['row_id'];
 } else {
     $sql = "Select drugreact,congenital_disease, weight, height, (CASE WHEN cigarette = '1' THEN 'Checked' ELSE '' END ), (CASE WHEN alcohol = '1'THEN 'Checked' ELSE '' END ), (CASE WHEN exercise = '1'THEN 'Checked' ELSE '' END ), (CASE WHEN cigarette = '0'THEN 'Checked' ELSE '' END ), (CASE WHEN alcohol = '0'THEN 'Checked' ELSE '' END ), (CASE WHEN exercise = '0'THEN 'Checked' ELSE '' END ),(CASE WHEN cigarette = '2'THEN 'Checked' ELSE '' END ), (CASE WHEN alcohol = '2'THEN 'Checked' ELSE '' END ), (CASE WHEN exercise = '2'THEN 'Checked' ELSE '' END ), (CASE WHEN cigarette = '3'THEN 'Checked' ELSE '' END ), (CASE WHEN alcohol = '3'THEN 'Checked' ELSE '' END )   From opd where hn = '" . $arr_view["hn"] . "' AND type <> '�ҵ�' Order by row_id DESC limit 1";
     $result = Mysql_Query($sql);
     list($drugreact, $congenital_disease, $weight, $height, $cigarette1, $alcohol1, $exercise1, $cigarette0, $alcohol0, $exercise0, $cigarette2, $alcohol2, $exercise2, $cigarette3, $alcohol3) = Mysql_fetch_row($result);
     if ($congenital_disease == "") {
         $congenital_disease = "����ʸ�ä��Шӵ��";
     }
 }
 if ($arr_dxofyear["rate"] == "") {
     $arr_dxofyear["rate"] = 20;
 }
 $choose = array();
 array_push($choose, "��Ǩ����Ѵ");
 array_push($choose, "�ҡ�͹�Ѵ");
 array_push($choose, "����ѧ�Ѵ");
 array_push($choose, "�ҡ�÷���任���");
 array_push($choose, "�Ѻ�����");
 array_push($choose, "..........�ѹ");
 array_push($choose, "��");
示例#16
0
文件: labseek.php 项目: robocon/shs
    session_register("aSumYprice");
    session_register("aSumNprice");
	session_register("aFilmsize");
	session_register("aPriority");
}
if($_SESSION["until_login"] == "xray" && (!empty($_POST["xraydetail"]) && count($_POST["xraydetail"]) > 0)){
		session_register("cXraydetail");
		$_SESSION["cXraydetail"] = "";
		$count = count($_POST["xraydetail"]);

		for($i=0;$i<$count;$i++)
		$_SESSION["cXraydetail"] .= ($i+1).".".$_POST["xraydetail"][$i]."";


		$sql = "Select yot,name, surname, dbirth From opcard where hn ='".$cHn."' limit 0,1";
		list($yot, $name, $surname, $dbirth) = Mysql_fetch_row(Mysql_Query($sql));

				
		$query = "SELECT runno FROM runno WHERE title = 'xrayno' limit 0,1";
		$result = mysql_query($query) or die("Query failed");
		list($xray_no) = mysql_fetch_row($result);
		$xray_no++;
		 $query ="UPDATE runno SET runno = $xray_no WHERE title='xrayno' limit 1 ";
		$result = mysql_query($query) or die("Query failed");
		
		$sql = "INSERT INTO `xray_doctor` (`date` ,`hn` ,`vn` ,`yot` ,`name` ,`sname` ,`detail` ,`doctor` ,`status` ,`xrayno` ,`film` ,`type_diag`,`detail_all`,`dbirth`,`orderby`)VALUES ('".(date("Y")+543).date("-m-d H:i:s")."', '".$cHn."', '".$tvn."', '".$yot."', '".$name."', '".$surname."', '".$_SESSION["cXraydetail"]."', '".$_POST["doctor"]."', 'N', '".$xray_no."', 'digital', '".$_POST["diag"]."', '".$_SESSION["cXraydetail"]."', '".$dbirth."', 'XRAY');";
		
		mysql_query($sql);

		
示例#17
0
<body Onload="window.print();">
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link href="css/backoffice.css" rel="stylesheet" type="text/css">
<?php 
session_start();
include "connect.inc";
$sum = count($_SESSION['putid']);
for ($k = 0; $k < $sum; $k++) {
    $sql = " Select a.row_id, a.date, a.officer, a.hn, a.ptname, a.age, a.doctor, a.appdate, a.apptime, a.room, a.detail, a.detail2, a.advice, a.patho, a.xray, a.other, a.depcode, b.idguard, b.ptright From appoint as a INNER JOIN opcard as b ON a.hn=b.hn where a.row_id = '" . $_SESSION['putid'][$k] . "'  limit 1 ";
    list($row_id, $date, $officer, $cHn, $cPtname, $cAge, $cdoctor, $appd, $capptime, $room, $detail, $detail2, $advice, $patho, $xray, $other, $depcode, $cidguard, $cptright) = Mysql_fetch_row(Mysql_Query($sql));
    $Thaidate = date("d-m-") . (date("Y") + 543) . "  " . date("H:i:s");
    $Thidate = date("Y") + 543 . date("-m-d H:i:s");
    $doctor = substr($doctor, 5);
    $depcode = substr($depcode, 4);
    print "<font face='Angsana New' size='5'><center><b>㺹Ѵ������";
    print "&nbsp;&nbsp;&nbsp;&nbsp;�ç��Һ�Ť�������ѡ��������  �ӻҧ </b> </center>";
    print "  <font face='Angsana New' size='2'><center>FR-NUR-003/2,04, 25 �.�. 54 </center>";
    print "<b><font face='Angsana New' size='4'>����: {$cPtname}  </b>&nbsp;&nbsp;&nbsp;<b>HN:</b> {$cHn} &nbsp;<b>����:</b> {$cAge}&nbsp;<B>�Է��:{$cptright}&nbsp;:<u>{$cidguard}</u></font></B><br>";
    print "<b><font face='Angsana New' size='5'><U>�Ѵ���ѹ���: {$appd} &nbsp;&nbsp;&nbsp; </b><b> ����:</b> {$capptime}</U></FONT><br>";
    print "<font face='Angsana New' size='4'><b><U>���㺹Ѵ���:&nbsp; {$room}</U></b><font face='Angsana New' size='3'>&nbsp;&nbsp;&nbsp;";
    if ($detail != 'NA') {
        echo "<font face='Angsana New' size='4'><b>����:</b>&nbsp; {$detail}";
        if (!empty($detail2)) {
            print "(&nbsp; {$detail2})";
        }
        echo "<br><font face='Angsana New' size='3'><b>ᾷ����Ѵ:</b>&nbsp; {$cdoctor}</b><br>";
    }
    if ($advice != 'NA') {
        print "<b>����й�:</b> &nbsp;{$advice}<br>";
    }
    if (trim($patho) != 'NA') {
示例#18
0
文件: preappoi2.php 项目: robocon/shs
      <? if($_SESSION["sOfficer"]!="����ѵ�� �������"){ ?>
      <option value="NA"><<�Ѵ������>></option>  
	  <? } ?>
<?
      if($_SESSION["sOfficer"]=="����ѵ�� �������"){
	  $app = "select * from applist where status='Y' and applist ='��š�д١'";
	  }else{
	  $app = "select * from applist where status='Y' ";
	  }
	  $row = mysql_query($app);
	  while($result = mysql_fetch_array($row)){
		  $str="";
		if($result['applist']=="��Ǩ����Ѵ���������ѵԼ������"){
			$sql1 = "Select menucode From inputm where idname = '".$_SESSION["sIdname"]."' ";
			$result1 = Mysql_Query($sql1);
			$arr = Mysql_fetch_row($result1);
			
			if($arr[0] == "ADMICU" || $arr[0] == "ADMWF" || $arr[0] == "ADMVIP" || $arr[0] == "ADMOBG"){
					$str= "  Selected  ";
			}
		}
?>
      	<option value="<?=$result['appvalue']?>" <?=$str;?>><?=$result['applist']?></option>
        <!--<option value="FU01 ��Ǩ����Ѵ">��Ǩ����Ѵ</option>
        <option value="FU02 ����ŵ�Ǩ">����ŵ�Ǩ</option>
        <option value="FU03 �͹�ç��Һ��">�͹�ç��Һ��</option>
        <option value="FU04 �ѹ�����">�ѹ�����</option>
        <option value="FU05 ��ҵѴ">��ҵѴ</option>
        <option value="FU06 �ٵ�">�ٵ�</option>
        <option value="FU07 ��չԡ�ѧ���">��չԡ�ѧ���</option>
        <option value="FU08 Echo">Echo</option>
示例#19
0
文件: ipcheck.php 项目: robocon/shs
  &nbsp;&nbsp;&nbsp;
   <p> �����&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   <select size="1" name="food">
     <option value="����û���" selected="selected">����û���</option>
     <option value="�������͹">�������͹</option>
     <option value="���������">���������</option>
     <option value="NPO (�������, ���)">NPO (�������, ���)</option>
  </select>&nbsp;&nbsp;&nbsp;</p>
   <p>������������&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="addfood" size="50">
   &nbsp;&nbsp;</p>
   <p>ᾷ��&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    <?php
   include("connect.inc");
  $sql = "Select menucode From inputm where idname = '".$_SESSION["sIdname"]."' ";
list($menucode) = Mysql_fetch_row(Mysql_Query($sql));

  if($menucode == "ADMMAINOPD"){

$strSQL = "SELECT name FROM doctor  where status='y'  and menucode !='ADMPT'  order by name"; 
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); 
?>
<select name="doctor"> 
<? 
while($objResult = mysql_fetch_array($objQuery)) 
{ 
?> 
<option value="<?=$objResult["name"];?>" <? if($arr['doctor']==$objResult["name"]){ echo "selected"; }?>><?=$objResult["name"];?></option> 
<? 
} 
?> 
示例#20
0
	<TD align="center">Dx.</TD>
	<TD align="center">Dr.</TD>
	<TD align="center">»ÃÐàÀ·</TD>
	<TD align="center">ÍÒ¡ÒÃ</TD>
	<TD align="center">¡ÒÃÃÑ¡ÉÒ</TD>
	<TD align="center">àÇÅÒà¢éÒ</TD>
	<TD align="center">àÇÅÒµÃǨ</TD>
	<TD align="center">ªèǧàÇÅÒ1</TD>
	<TD align="center">D/C</TD>
	<TD align="center">ªèǧàÇÅÒ2</TD>
</TR>
<?php



		while(list($row_id, $vn,$hn,$an,$dx,$organ, $maintenance, $doctor, $fullname, $age, $list_ptright2, $time_in, $time_out, $cure, $admit_ward, $refer_hospital, $h_date, $time_in, $time_diag, $date_in, $type_wounded, $repeat, $type_patient,$cause_refer, $doc_refer, $nurse, $assistant_nurse, $estimate, $cradle,$doc_txt,$no_estimate, $ptffone ) = Mysql_fetch_row($result)){

$bgcolor= "#FFFFFF";	

	
		if($time_diag != "00:00" && $time_diag != ""){
			
			if(substr($time_in,0,2) == "23"  && substr($time_diag,0,2) == "00"){
				
				$xxx = strtotime(date("Y-m-d ").$time_in.":00");
				$yyy = strtotime(date("Y-m-d ",mktime('0','0','0',date("m"),date("d")+1,date("Y"))).$time_diag.":00");

			}else{
				$xxx = strtotime(date("Y-m-d ").$time_in.":00");
				$yyy = strtotime(date("Y-m-d ").$time_diag.":00");
			}
示例#21
0
文件: opedit.php 项目: robocon/shs
WHERE `thdatehn` = '".$thdatehn."' 
LIMIT 0,1 ";
$result = Mysql_Query($sql);
list($rows) = Mysql_fetch_row($result);
if($rows > 0){ // ������ʴ������ŧ����¹��ѹ�������

	print "<BR><span style=\"background-color: #FFFFCC\"><FONT SIZE=\"3\" COLOR=\"red\">��������ŧ����¹��ѹ������� ����͡ VN ����㹡óշ�����ѡ�Ҥ�������ء����
	<SELECT NAME=\"new_vn\">
		<Option value=\"\">----------------</Option>
		<Option value=\"0\">�� VN ���</Option>
		<Option value=\"1\">�͡ VN ����</Option>
	</SELECT>";
	
	$sql = "Select date_format(thidate,'%d-%m-%Y %H:%i:%s'),toborow,kew,vn From opday where hn = '".trim($_GET["cHn"])."' ORder by thidate DESC limit 1 ";
	$result = Mysql_Query($sql);
	list($thidate,$toborow,$kew,$vn) = Mysql_fetch_row($result);
	echo "<BR>&nbsp;&nbsp;&nbsp;**�Ҥ����ش���������&nbsp; ".$thidate."&nbsp;VN&nbsp;".$vn."&nbsp;��&nbsp;".$toborow."&nbsp;&nbsp;���Ƿ��&nbsp;".$kew."</FONT></span>";

}else{
	print "<INPUT TYPE=\"hidden\" name=\"new_vn\" value=\"1\">";
}
//////////////////////////////


$list_month["01"] ="���Ҥ�";
$list_month["02"] ="����Ҿѹ��";
$list_month["03"] ="�չҤ�";
$list_month["04"] ="����¹";
$list_month["05"] ="����Ҥ�";
$list_month["06"] ="�Զع�¹";
$list_month["07"] ="�á�Ҥ�";
示例#22
0
文件: ophn.php 项目: robocon/shs
	$rows1=mysql_num_rows($result1);
	if($rows1){
	 echo "<font color='#FF0000'>«éÓ</font>";
	}

	
// µÃǨÊͺáÅÐà»ÅÕè¹ HN AN µÍ¹¢Öé¹»ÕãËÁè
	$sql = "Select left(prefix,2) From runno where title = 'HN' ";
	list($title_hn) = Mysql_fetch_row(Mysql_Query($sql));
	$year_now = substr(date("Y")+543,2);
	if($title_hn != $year_now){
		$sql = "Update runno set prefix = '".$year_now."-', runno = 0 where  title = 'HN' limit 1;";
		$result = mysql_Query($sql);
	}
	$sql = "Select left(prefix,2) From runno where title = 'AN' ";
	list($title_an) = Mysql_fetch_row(Mysql_Query($sql));
	$year_now = substr(date("Y")+543,2);
	if($title_an != $year_now){
		$sql = "Update runno set prefix = '".$year_now."/', runno = 0 where  title = 'AN' limit 1;";
		$result = mysql_Query($sql);
	}
	// END
?>
</table>

<FONT SIZE="2" COLOR="#990000">***¤Ó͸ԺÒÂ***</FONT> <BR>
<FONT SIZE="" COLOR="66CDAA">ÊÕà¢ÕÂÇ ¤×Í ÂѧäÁèä´é·Ó¡ÒõÃǨÊÔ·¸Ô¡ÒÃÃÑ¡ÉÒ</FONT><BR>
<FONT SIZE="" COLOR="#CCFF00">ÊÕà¢ÕÂÇÍè͹ ¤×Í µÃǨÊͺáÅéÇ ÁÕÊÔ·¸Ô»ÃСѹÊѧ¤Á</FONT><BR>
<FONT SIZE="" COLOR="#99CC00">ÊÕà¢ÕÂÇÍè͹ ¤×Í µÃǨÊͺáÅéÇ ÁÕÊÔ·¸Ô¨èÒµç</FONT><BR>
<FONT SIZE="" COLOR="#FF0033">ÊÕá´§ ¤×Í äÁèÁÕÊÔ·¸Ô</FONT><BR>
示例#23
0
文件: statrp04.php 项目: robocon/shs
$pdf->Cell(10,7,"ÅӴѺ",1,0,'C');

$pdf->Cell(60,7,"ª×èÍ - Ê¡ØÅ ¼ÙéÃѺºÃÔ¡ÒÃ",1,0,'C');

$pdf->Cell(30,7,"HN",1,0,'C');

$pdf->Cell(60,7,"ÃÒ¤Ò",1,0,'C');

$pdf->Cell(30,7,"ËÁÒÂà˵Ø",1,0,'C');

$pdf->Ln();


$i=1;
while(list($hn,$ptname,$price) = Mysql_fetch_row($result2)){	

$pdf->Cell(10,7,$i,1,0,'C');

$pdf->Cell(60,7,$ptname,1,0);

$pdf->Cell(30,7,$hn,1,0,'C');

$pdf->Cell(60,7,$price,1,0,'C');

$pdf->Cell(30,7,"",1,0,'C');
$pdf->Ln();
$i++;
}

示例#24
0
//print "<DIV style='left:300PX;top:10PX;width:200PX;height:30PX;'><span class='fc1-99'>$Thaidate</span></DIV>";
//print "<DIV style='left:520PX;top:10PX;width:306PX;height:30PX;'><span class='fc1-0'>$sOfficer..µÃǨÊͺÊÔ·¸Ô</span></DIV>";
print "<DIV style='left:50PX;top:130PX;width:600PX;height:30PX;'><span class='fc1-0'><img src = \"printbcpha.php?cHn=$idcard\"></span></DIV>";

print "<DIV style='left:390PX;top:620PX;width:600PX;height:30PX;'><span class='fc1-0'>....... á¾·Âì¨èÒÂÂÒ¼èÒ¹Ãкº¤ÍÁ</span></DIV>";


print "</BODY></HTML>";



 include("connect.inc");  

$sql = "SELECT inrxform FROM opcard WHERE  hn = '".$cHn."' limit 1";
$result = Mysql_Query($sql);
list($note) = Mysql_fetch_row($result);

if($note != ""){
	if($note == "¼Ùé»èÇ¡ÅØèÁàÊÕ觵éͧä´éÃѺ¡ÒéմÇѤ«Õ¹»éͧ¡Ñ¹âää¢éËÇÑ´ãË­è(¿ÃÕ)")
		$note .= "<BR>Influza Vaccine 0.5 ml. IM";
	print "<DIV style='left:340PX;top:130PX;width:500PX;height:30PX'><span class='fc1-0'>".$note."</span></DIV>";
	$top_drugreact = "180";
}else{
	$top_drugreact = "130";
}

//á¾éÂÒ

$query = "SELECT tradname,advreact,asses FROM drugreact WHERE  hn = '".$cHn."' ";
$result = mysql_query($query) or die("Query drugreact failed");
$count =mysql_num_rows($result);
示例#25
0
文件: diabetes.php 项目: robocon/shs
     if ($arr_dxofyear["alcohol"] == '1') {
         $alcohol1 = "Checked";
     } else {
         if ($arr_dxofyear["alcohol"] == '0') {
             $alcohol0 = "Checked";
         }
     }
     if ($arr_dxofyear["congenital_disease"] != '') {
         $congenital_disease = $arr_dxofyear["congenital_disease"];
     } else {
         $congenital_disease = "╩╝тЮй╦Бц╓╩цп╗с╣яг";
     }
 } else {
     $sql = "Select congenital_disease, weight, height, (CASE WHEN cigarette = '1' THEN 'Checked' ELSE '' END ), (CASE WHEN alcohol = '1'THEN 'Checked' ELSE '' END ), (CASE WHEN cigarette = '0'THEN 'Checked' ELSE '' END ), (CASE WHEN alcohol = '0'THEN 'Checked' ELSE '' END )   From opd where hn = '" . $arr_view["hn"] . "' AND type <> '╜р╣т' Order by row_id DESC limit 1";
     $result = Mysql_Query($sql);
     list($congenital_disease, $weight, $height, $cigarette1, $alcohol1, $cigarette0, $alcohol0) = Mysql_fetch_row($result);
     if ($congenital_disease == "") {
         $congenital_disease = "╩╝тЮй╦Бц╓╩цп╗с╣яг";
     }
 }
 if ($arr_dxofyear["rate"] == "") {
     $arr_dxofyear["rate"] = 20;
 }
 ////////////////////////////////////////
 $datenow = date("Y-m-d");
 // Юевм║ dm_no йь╢╥ИрбАеИг╥с║рц ++ Ю╬вХмЦ╙ИЦ╧║рц╨я╧╥ж║╒Имаые
 $sqldm = "SELECT MAX(dm_no) AS dmnumber FROM diabetes_clinic";
 $querydm = mysql_query($sqldm);
 $arrdm = mysql_fetch_array($querydm);
 $dm = $arrdm['dmnumber'] + 1;
 $dm_no = $dm;
示例#26
0
/* ���������ǹ������ ipdibill.php��ͷ������  �������������Ţ�ѭ��
       $cAccno++;
       $query ="UPDATE bed SET price='$Netpri',
                	paid='$Netpaid',
	                debt='$debt',
		caldate='$Thidate',
                                accno='$cAccno'
                       WHERE an='$cAn' ";
       $result = mysql_query($query) or die("Query failed bed");     
       echo mysql_errno() . ": " . mysql_error(). "\n";
       echo "<br>";
*/

$sql = "Select sum(price),status FROM ipacc WHERE an = '$cAn' and status='��˹���' group by status ";
$result2 = Mysql_Query($sql) or die(mysql_error());
list($pricedc,$status) = Mysql_fetch_row($result2);

   include("unconnect.inc");
//����ѡ�Ҿ�Һ�� �ѡ����������  �����͡�������ǹ����ҧ����
    $BFY       = array_sum($aBBFY);
    $BFN       = array_sum($aBBFN);
//�ҷ����� þ.   ��¡�������� �ѡ�Թ�����������͡
	//�ҷ����� þ.�׹�ѹ��Ѻ��ҹ
    $Essd1    =array_sum($aBEssd1);   //����Թ�����㹺ѭ������ѡ��觪ҵ�
    $Nessdy1=array_sum($aBNessdy1);     //����Թ����ҹ͡�ѭ������ѡ��觪ҵ� �ԡ��
    $DDLDDY1 =$Essd1+$Nessdy1; //3.������������÷ҧ������ʹ(�ԡ��)
    $Nessdn1=array_sum($aBNessdn1);     //����Թ����ҹ͡�ѭ������ѡ��觪ҵ� �ԡ����

    $Essd    =array_sum($aBEssd);   //����Թ�����㹺ѭ������ѡ��觪ҵ�
    $Nessdy=array_sum($aBNessdy);     //����Թ����ҹ͡�ѭ������ѡ��觪ҵ� �ԡ��
    $DDLDDY =$Essd+$Nessdy+$DDLDDY1; //3.������������÷ҧ������ʹ(�ԡ��)
示例#27
0
    echo urlencode($_GET["nRow_id"]);
    ?>
" target="_blank" ><font face='Angsana New'>á¡é䢪×èÍâä</font></A><BR> 
    <td>
    <div id='cut1' style="display:block">
    </td>
	
	<td><FONT COLOR="#FF0000"><B>à¤ÂµÑ´ÊµêÍ¡áÅéÇ</B></FONT>&nbsp;&nbsp;&nbsp;</td>
	<?php 
}
?>
    </td>
    <td><a target="_blank" href="drxprint_pt.php"><font face='Angsana New'>¾ÔÁ¾ìãºÊÑè§ÂÒ</a></td>
   
 </tr></table>
<?php 
$strsql = "select * from accrued where hn = '{$sHn}' and status_pay='n' ";
$strresult = mysql_query($strsql);
$strrow = mysql_num_rows($strresult);
if ($strrow > 0) {
    echo "<script>alert('¼Ùé»èÇÂÁÕÂÍ´¤éÒ§ªÓÃÐ  ¡ÃسҵԴµèÍÊèǹà¡çºà§Ô¹ÃÒÂä´é') </script>";
    //echo "&nbsp;&nbsp;&nbsp<b><font style='font-weight:bold'><a target=BLANK  href='accrued_list.php?hn=$hnid'>´ÙÂÍ´¤éÒ§ªÓÃÐ</a></b></font>";
}
$today1 = date("Y") + 543 . date("-m-d");
$sql = "Select hn,ptname From dphardep WHERE hn = '" . $sHn . "' AND  date LIKE '{$today1}%'  and dr_cancle is null ";
$result = Mysql_Query($sql);
if (Mysql_num_rows($result) > 1) {
    list($hn, $ptname) = Mysql_fetch_row($result);
    echo "<br><br><font face='Angsana New' size='5' color='#FF0066'><center>***¼Ùé»èÇÂÁÕãºÃÒÂÂÒÁÒ¡¡ÇèÒ 1 ãº*** </center></FONT>";
}
include "unconnect.inc";
示例#28
0
	x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX

	return x;
}

function handlerMMY(e){
	y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
	return y;
}

</SCRIPT>


<?php 
$sql = "Select toborow,diag From opday where thdatevn = '" . date("d-m-") . (date("Y") + 543) . $_SESSION["vn_now"] . "' ";
list($toborow, $diag) = Mysql_fetch_row(Mysql_Query($sql));
$toborow = substr($toborow, 4);
if ($style_menu == 2) {
    ?>
<TABLE align="center" border="1" bordercolor="#F0F000">
<TR>
	<TD>
<TABLE width="900">
<TR>
	<TD colspan="8" class="tb_head">�����ż�����&nbsp;&nbsp;<?php 
    echo $toborow;
    ?>
</TD>
</TR>
<TR>
	<TD align="right" class="tb_detail">VN : </TD>
示例#29
0
文件: dt_xray.php 项目: robocon/shs
session_start();
if (isset($_GET["action"])) {
    header("content-type: application/x-javascript; charset=TIS-620");
}
if (empty($_SESSION["S_listxray"])) {
    session_register("S_listxray");
    $_SESSION["S_listxray"] = array();
}
include "connect.inc";
$style_menu = 2;
if ($_GET["action"] == "select") {
    echo "2.&nbsp;<SELECT NAME=\"choice2\">";
    $sql = "Select code, detail From xraytype where h_code = '" . $_GET["search"] . "' order by detail ASC ";
    $result = Mysql_Query($sql);
    while (list($code, $detail) = Mysql_fetch_row($result)) {
        echo "<Option value=\"" . $code . "\">" . $detail . "</Option>";
    }
    echo "</SELECT>";
    exit;
} else {
    if ($_GET["action"] == "addxray") {
        $count = count($_SESSION["S_listxray"]);
        $_SESSION["S_listxray"][$count]["choice1"] = $_GET["choice1"];
        $_SESSION["S_listxray"][$count]["choice2"] = $_GET["choice2"];
        $_SESSION["S_listxray"][$count]["amount"] = $_GET["amount"];
        $_SESSION["S_listxray"][$count]["type"] = $_GET["type"];
        exit;
    } else {
        if ($_GET["action"] == "delxray") {
            $count = count($_SESSION["S_listxray"]);
示例#30
0
	<TD width="33" bgcolor="#CCCCCC">ÃÇÁ</TD>
	<TD width="50" align="right" bgcolor="#CCCCCC"><?php echo $sum33;?></TD>
</TR>
</TABLE></td>
    <td width="66%" valign="top"><TABLE class="forntsarabun">
      <TR>
        <TD colspan="2" align="center" bgcolor="#CCCCCC">ICD9CM</TD>
      </TR>
      <?php 
$sql2 = "SELECT  b.hn,b.date FROM `patdata` AS a, depart AS b WHERE b.row_id = a.idno AND ( a.code in ('58002' , '58003' ,'58004' ,'58002a','58002b','58002c','58005','58006','58007','58008','58101','58102','58130','58131','58201','58301','58301a')) AND b.date LIKE '".$today."%'  and  a.status='Y' and a.price >0";
	
 // echo $sql2;
$result2 = Mysql_Query($sql2);
$sum2=0;
$arricd10=array();
while(list($hn,$bdate) = Mysql_fetch_row($result2)){
	
$subdate=substr($bdate,0,10);
/*	$sqlicd10 = "SELECT count(icd10) ,icd10 FROM `opday` WHERE  hn='".$hn."' and icd10 !='' Group by icd10 ";
	$queryicd10 = mysql_query($sqlicd10) or die("Query failed ".$sqlicd10."");
	$arricd10=mysql_fetch_array($queryicd10);*/
	
$sqlicd="SELECT count(icd10)as counticd,icd10,icd9cm FROM `opday` WHERE thidate like '$subdate%' and hn='".$hn."'  ";
$objqueryicd  = mysql_query($sqlicd);
//echo $sqlicd;

//$arricd10=array();
	while (list($counticd,$icd10,$icd9cm) = mysql_fetch_row($objqueryicd)){
		array_push($arricd10,$icd9cm);
	}
}