<?php require '/inc/odbc.php';?>
|
<?php require '/inc/function.php';?>
|
|
<?php
|
if(isDepartment("0604")==0){
|
header("Location: /");
|
exit;
|
}
|
|
//各种返回信息
|
$SystemMessageTXT="";
|
$SystemMessageType=empty($_REQUEST['SystemMessageType'])!=false ? "" : $_REQUEST['SystemMessageType'];
|
$SMT=empty($_REQUEST['SMT'])!=false ? "" : $_REQUEST['SMT'];
|
if ($SystemMessageType!="") {
|
if ($SMT=="1") {$SystemMessageTXT="数据不足!!!";}
|
elseif ($SMT=="2") {$SystemMessageTXT="修改完成!";}
|
elseif ($SMT=="3") {$SystemMessageTXT="新增完成!";}
|
elseif ($SMT=="4") {$SystemMessageTXT="删除完成!";}
|
elseif ($SMT=="5") {$SystemMessageTXT="名称重复!";}
|
}
|
|
$page=empty($_REQUEST['page'])!=false ? 1 : $_REQUEST['page']; //当前页数
|
$page=empty($draw)!=false ? $page : $draw; //当前页数
|
$page_size = 20; //每页显示数量
|
$total_page=0; //总页数
|
$total_records=0; //总记录数
|
|
$ICD_ID=empty($_REQUEST['ICD_ID'])!=false ? "" : addslashes($_REQUEST['ICD_ID']);
|
$searchTXT=empty($_REQUEST['searchTXT'])!=false ? "" : addslashes($_REQUEST['searchTXT']);
|
$page_URL="searchTXT=".$searchTXT."&ICD_ID=".$ICD_ID;
|
//echo $searchTXT;exit;
|
?>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
<head>
|
<title><?php echo $LindemanAdmin?></title>
|
<?php require '/inc/ccs.php';?>
|
</head>
|
<body onkeydown="xKeyEvent(event)">
|
<?php require 'menu_header.php';?>
|
<!-- content -->
|
<div id="content">
|
<?php require 'AdminUser_menu_left.php';?>
|
<!-- content / right -->
|
<div id="right">
|
<!-- table -->
|
<div class="box">
|
<!-- box / title -->
|
<div class="title">
|
<h5>诊断情况标签</h5>
|
<ul class="links">
|
<?php if(isDepartment("060402")==1){?>
|
<li><a onclick="javascript:ICDCreate.style.display='block';">新建</a></li>
|
<li><a onClick="form1_ICD_update()">修改</a></li>
|
<li><a onClick="form1_ICD_delete()">删除</a></li>
|
<?php } ?>
|
<div class="search">
|
<form action="?" method="post">
|
<div class="input">
|
<input type="text" id="searchTXT" name="searchTXT" value="<?php echo $searchTXT?>" />
|
</div>
|
<div class="button">
|
<input type="submit" name="submit" value="搜索" />
|
</div>
|
</form>
|
</div>
|
</ul>
|
<script LANGUAGE="javascript">
|
//修改诊断目录
|
function form1_ICD_update(){
|
document.form1.action = "admin_save.php";
|
document.form1.admin_save.value = "11";
|
form1.submit();
|
}
|
//删除诊断目录
|
function form1_ICD_delete(){
|
document.form1.action = "admin_save.php";
|
document.form1.admin_save.value = "12";
|
form1.submit();
|
}
|
//选择修改诊断目录
|
function form1_ICD_Edit(id){
|
if (document.getElementById('Show_ICD_name_'+id).style.display=="none")
|
{
|
document.getElementById('Show_ICD_code_'+id).style.display='';
|
document.getElementById('Edit_ICD_code_'+id).style.display='none';
|
document.getElementById('ICD_code_'+id).disabled=true;
|
document.getElementById('Show_ICD_name_'+id).style.display='';
|
document.getElementById('Edit_ICD_name_'+id).style.display='none';
|
document.getElementById('ICD_name_'+id).disabled=true;
|
document.getElementById('Show_ICD_zjm_'+id).style.display='';
|
document.getElementById('Edit_ICD_zjm_'+id).style.display='none';
|
document.getElementById('ICD_zjm_'+id).disabled=true;
|
}
|
else
|
{
|
document.getElementById('Show_ICD_code_'+id).style.display='none';
|
document.getElementById('Edit_ICD_code_'+id).style.display='';
|
document.getElementById('ICD_code_'+id).disabled=false;
|
document.getElementById('Show_ICD_name_'+id).style.display='none';
|
document.getElementById('Edit_ICD_name_'+id).style.display='';
|
document.getElementById('ICD_name_'+id).disabled=false;
|
document.getElementById('Show_ICD_zjm_'+id).style.display='none';
|
document.getElementById('Edit_ICD_zjm_'+id).style.display='';
|
document.getElementById('ICD_zjm_'+id).disabled=false;
|
|
}
|
|
|
}
|
//新建诊断情况-关闭窗口
|
function JS_ICDCreateClose()
|
{
|
ICDCreate.style.display="none";
|
}
|
//新建诊断情况-保存
|
function JS_ICDCreateSave()
|
{
|
form2.submit();
|
}
|
</script>
|
</div>
|
<div class="dialogJ dialogJfix dialogJshadow" id="ICDCreate" style="width: 370px; right: 300px; top: 150px;display:none;">
|
<div class="dialogJtitle">
|
<a href="javascript:JS_ICDCreateClose();" class="dialogJclose" title="关闭本窗口"> </a>
|
<span class="dialogJtxt" id="EditPhotoTXT">新建诊断情况</span>
|
</div>
|
<form id="form2" name="form2" action="admin_save.php" method="post">
|
<input name="admin_save" type="hidden" value="10">
|
<div class="dialogJcontent">
|
<div class="dialogJbody" id="dialogJbody" style="height: 220px;">
|
<div class="modify-album-name">
|
<p class="album-tips"></p>
|
<span>国际ICD编码:</span>
|
<input id="icd_code" name="icd_code" type="text" value="" maxlength="99/" style="width: 228px;">
|
</div>
|
<div class="modify-album-name">
|
<p class="album-tips"></p>
|
<span>疾病名称:</span>
|
<input id="icd_name" name="icd_name" type="text" value="" maxlength="99/" style="width: 248px;">
|
</div>
|
<div class="modify-album-name">
|
<p class="album-tips"></p>
|
<span>助记码:</span>
|
<input id="zjm" name="zjm" type="text" value="" maxlength="99/">
|
</div>
|
</div>
|
</div>
|
</form>
|
<div class="dialogJanswers">
|
<input type="button" class="dialogJbtn first-child" onclick="JS_ICDCreateSave()" value="确定">
|
<input type="button" class="dialogJbtn" onclick="JS_ICDCreateClose()" value="取消">
|
</div>
|
</div>
|
<!-- end box / title -->
|
<?php
|
$i=1;
|
//SQL查询条件
|
if ($ICD_ID!="") {
|
$sqlWhere=" from ICD10 where ICDState>0 and id=".$ICD_ID;
|
}
|
elseif ($searchTXT!=""){
|
$sqlWhere=" from ICD10 where ICDState>0 and (icd_code like '%".$searchTXT."%' or icd_name like '%".$searchTXT."%' or zjm like '%".$searchTXT."%')";
|
}else{
|
$sqlWhere=" from ICD10 where ICDState>0";
|
}
|
//组成计算总页数SQL
|
$total_sql = "select id $sqlWhere";
|
//组成显示结果SQL
|
$Result_sql = "select id,icd_code,icd_name,zjm,ICDState,row_number() over (order by id desc) n $sqlWhere";
|
//附加结果SQL
|
$Additional_sql = "";
|
|
//计算总页数
|
$data = sqlsrv_query( $conn, $total_sql, array(), array( "Scrollable" => 'keyset' ));
|
if($data == true){$total_records=sqlsrv_num_rows($data);}else{$total_records=0;}//总行数
|
$total_page=ceil($total_records/$page_size); //总页数
|
//避免page小于0或大于总页数
|
$page=$page<=0?1:$page;
|
$page=$page>$total_page?$total_page:$page;
|
//计算开始和结束行数
|
$pageStart = ($page-1)*$page_size;
|
$pageEnd = $pageStart+$page_size;
|
$sqlPage = " where sqlData.n > $pageStart and sqlData.n <= $pageEnd " ;
|
$sql = "select * $Additional_sql from ($Result_sql) sqlData ".$sqlPage." order by sqlData.n" ;
|
$data = sqlsrv_query($conn,$sql);
|
if($data == true){
|
if (sqlsrv_rows_affected($data)==0) {
|
$SystemMessageType=2;
|
$SystemMessageTXT="数据库中相关无数据!";
|
$y=0;
|
}
|
}else{$SystemMessageType=4;$SystemMessageTXT="数据库中相关无数据!";}
|
?>
|
<?php require '/inc/SystemMessages.php'; ?>
|
|
<div class="table">
|
<form id="form1" name="form1" action="" method="post">
|
<input name="admin_save" type="hidden" value="80">
|
<input name="ICDSearchID" type="hidden" value="<%=ICDSearchID%>">
|
<table>
|
<thead>
|
<tr>
|
<th class="selected"><input type="checkbox" class="checkall" /></th>
|
<th>ID</th>
|
<th>国际ICD编号</th>
|
<th>疾病名称</th>
|
<th>助记码</th>
|
<th>状态</th>
|
<th class="last"> </th>
|
</tr>
|
</thead>
|
<tbody>
|
<?php
|
if($data == true){
|
while($rs = sqlsrv_fetch_array($data) ) {
|
//读取数据
|
$id = $rs['id'];
|
$icd_code= $rs['icd_code'];
|
$icd_name = $rs['icd_name'];
|
$zjm = $rs['zjm'];
|
$ICDState=$rs['ICDState'];
|
$ICDStateTXT=$ICDState==1 ? "正常" : "停用";
|
$i++;
|
?>
|
<tr>
|
<td class="selected" style='white-space: nowrap;'><input type="checkbox" id="ICDID_<?php echo $id?>" name="ICDID[]" value="<?php echo $id?>" onclick="javascript:form1_ICD_Edit('<?php echo $id?>')"/></td>
|
<td class="selected"><?php echo $id?></td>
|
<td class="category" id="Show_ICD_code_<?php echo $id?>" style='white-space: nowrap;'><?php echo $icd_code?></td>
|
<td class="category" id="Edit_ICD_code_<?php echo $id?>" style="display:none;"><input id="ICD_code_<?php echo $id?>" name="ICD_code_<?php echo $id?>" class="small" style="width:120px;text-align: center;" value="<?php echo $icd_code?>" type="text" disabled="true"></td>
|
<td class="category" id="Show_ICD_name_<?php echo $id?>" style='white-space: nowrap;'><?php echo $icd_name?></td>
|
<td class="category" id="Edit_ICD_name_<?php echo $id?>" style="display:none;"><input id="ICD_name_<?php echo $id?>" name="ICD_name_<?php echo $id?>" class="small" style="width:200px;text-align: center;" value="<?php echo $icd_name?>" type="text" disabled="true"></td>
|
<td class="category" id="Show_ICD_zjm_<?php echo $id?>" style='white-space: nowrap;'><?php echo $zjm?></td>
|
<td class="category" id="Edit_ICD_zjm_<?php echo $id?>" style="display:none;"><input id="ICD_zjm_<?php echo $id?>" name="ICD_zjm_<?php echo $id?>" class="small" style="width:120px;text-align: center;" value="<?php echo $zjm?>" type="text" disabled="true"></td>
|
<td class="category"><?php echo $ICDStateTXT?></td>
|
<td class="last"> </td>
|
</tr>
|
<?php
|
}
|
}
|
?>
|
|
|
<?php
|
for($x=$i;$x<20;$x++) {
|
echo "<tr><td class=selected> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td class=last> </td></tr>";
|
}
|
?>
|
</tbody>
|
</table>
|
|
</form>
|
<!-- 分页 -->
|
<?php if ($total_records>=1) {?>
|
<div class="pagination pagination-left">
|
<div class="results">
|
<?php
|
$ShowingLeast = ($page-1)*$page_size+1;
|
$ShowingMax = $page_size*$page;
|
if ($ShowingMax>$total_records) {$ShowingMax=$total_records;}
|
?>
|
<span><?php echo "显示 $ShowingLeast-$ShowingMax of $total_records";?></span>
|
</div>
|
<?php if ($total_page>1) {?>
|
<ul class="pager">
|
<?php
|
if ($page==1) {
|
echo "<li class=\"disabled\">« 上页</li>";
|
}else{
|
echo "<li><a href=\"?page=".($page-1)."&".$page_URL."\">« 上页</a></li>";
|
}
|
|
$acc4=0;
|
for($i=1;$i<=$total_page;$i++) {
|
if ($i==$page) {echo "<li class=\"current\">$i</li>";}
|
elseif ($i<=3 or $i>($total_page-3) ) {echo "<li><a href=\"?page=$i&$page_URL\">$i</a></li>";}
|
elseif ($acc4==0){echo "<li class=\"separator\">...</li>";$acc4=$i<$page ? 1 : 2;}
|
elseif ($acc4==1 and $i>$page+3){echo "<li class=\"separator\">...</li>";$acc4=2;}
|
elseif ($acc4==1 and $i>=$page-3){echo "<li><a href=\"?page=$i&$page_URL\">$i</a></li>";}
|
}
|
|
if ($page>=$total_page) {
|
echo "<li class=\"disabled\">下页 »</li>";
|
}else{
|
echo "<li><a href=\"?page=".($page+1)."&".$page_URL."\">下页 »</a></li>";
|
}
|
?>
|
</ul>
|
<?php }?>
|
</div>
|
<?php }?>
|
<!-- end 分页 -->
|
</div>
|
</div>
|
<!-- end table -->
|
|
|
</div>
|
<!-- end content / right -->
|
</div>
|
<!-- end content -->
|
<!--#include FILE="vicgame.asp"-->
|
</body>
|
</html>
|