【调度系统】广东民航医疗快线调度系统源代码
wzp
2025-05-14 a023d5daed320eb4dbf6cfb8c28529d41cf5f9c3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
<?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="关闭本窗口">&nbsp;</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">&nbsp;</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">&nbsp;</td>
                      </tr>
                    <?php
                        }
                    }
                    ?>
                    
            
            <?php
            for($x=$i;$x<20;$x++) {
              echo "<tr><td class=selected>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td class=last>&nbsp;</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 "显示&nbsp;$ShowingLeast-$ShowingMax&nbsp;of&nbsp;$total_records";?></span>
                            </div>
                            <?php if ($total_page>1) {?>
                            <ul class="pager">
                                <?php
                                if ($page==1) {
                                    echo "<li class=\"disabled\">&laquo; 上页</li>";
                                }else{
                                    echo "<li><a href=\"?page=".($page-1)."&".$page_URL."\">&laquo; 上页</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\">下页 &raquo;</li>";
                                }else{
                                    echo "<li><a href=\"?page=".($page+1)."&".$page_URL."\">下页 &raquo;</a></li>";
                                }
                                ?>
                            </ul>
                            <?php }?>
                        </div>
                        <?php }?>
                        <!-- end 分页 -->
                    </div>
                </div>
                <!-- end table -->
 
                
            </div>
            <!-- end content / right -->
        </div>
        <!-- end content -->
        <!--#include FILE="vicgame.asp"-->
    </body>
</html>