常用查询搜索条件查询下拉框

master
wangxh 6 years ago
parent 240a0209c5
commit 4dc4b77f88

@ -206,7 +206,7 @@ public class CommomSearchController {
public String getDept() { public String getDept() {
try { try {
//加载科室集合 //加载科室集合
List<Emr_Dictionary> deptList = dictionaryMapper.selectDictionaryByTypeCode(""); List<Emr_Dictionary> deptList = dictionaryMapper.selectDictionaryByTypeCode("dept_code");
return JSON.toJSONString(deptList); return JSON.toJSONString(deptList);
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();

@ -20,7 +20,8 @@
<script type="text/javascript" src="${path}/static/js/jquery-1.11.3.min.js"></script> <script type="text/javascript" src="${path}/static/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="${path}/static/js/respond.min.js"></script> <script type="text/javascript" src="${path}/static/js/respond.min.js"></script>
<![endif]--> <![endif]-->
<script type="text/javascript" src="${path}/static/bootstrap-3.3.7/bootstrap-table-fixed-columns.js?time=2019-12-25"></script> <script type="text/javascript"
src="${path}/static/bootstrap-3.3.7/bootstrap-table-fixed-columns.js?time=2019-12-25"></script>
<script type="text/javascript" src="${path}/static/js/pinying.js"></script> <script type="text/javascript" src="${path}/static/js/pinying.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/js/select2.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/js/select2.min.js"></script>
<script> <script>
@ -31,6 +32,7 @@
margin-right: -15px; margin-right: -15px;
margin-bottom: -15px; margin-bottom: -15px;
} }
/* .collapse{ /* .collapse{
overflow-y:scroll; overflow-y:scroll;
}*/ }*/
@ -39,9 +41,11 @@
padding-right: 0; padding-right: 0;
text-align: right; text-align: right;
} }
.radioDiv { .radioDiv {
padding-top: 2%; padding-top: 2%;
} }
/*搜索区域*/ /*搜索区域*/
/*.panel-group{ /*.panel-group{
height: 254px; height: 254px;
@ -55,15 +59,18 @@
margin-top: 5px; margin-top: 5px;
margin-bottom: 5px; margin-bottom: 5px;
} }
.btn { .btn {
margin-left: -1%; margin-left: -1%;
} }
/*tableDiv*/ /*tableDiv*/
.tableDiv { .tableDiv {
/*margin-top: 1%;*/ /*margin-top: 1%;*/
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
} }
/*多选下拉框*/ /*多选下拉框*/
.dropdown-menu { .dropdown-menu {
position: absolute; position: absolute;
@ -85,6 +92,7 @@
font-family: "Segoe UI", Helvetica, Arial, sans-serif; font-family: "Segoe UI", Helvetica, Arial, sans-serif;
border: 1px solid #ddd; border: 1px solid #ddd;
} }
.TableView { .TableView {
margin-left: 2%; margin-left: 2%;
} }
@ -92,58 +100,75 @@
.pagination { .pagination {
margin: 0 !important; margin: 0 !important;
} }
.form-group { .form-group {
width: 110%; width: 110%;
} }
/**级联病案号内容*/ /**级联病案号内容*/
.mouseOver { .mouseOver {
background-color: #708090; background-color: #708090;
color: #FFFAFA; color: #FFFAFA;
} }
.mouseOut { .mouseOut {
background-color: #FFFAFA; background-color: #FFFAFA;
color: #000000; color: #000000;
} }
/*模态框头*/ /*模态框头*/
.modal-header { .modal-header {
background-color: #199ED8; background-color: #199ED8;
text-align: center; text-align: center;
} }
/*搜索按钮div*/ /*搜索按钮div*/
.searchDiv { .searchDiv {
margin-left: 33px; margin-left: 33px;
} }
/*清空按钮div*/ /*清空按钮div*/
.clearDiv { .clearDiv {
margin-left: 16px; margin-left: 16px;
} }
.col-sm-1, .col-sm-4 { .col-sm-1, .col-sm-4 {
padding-left: 0 !important; padding-left: 0 !important;
} }
label { label {
font-weight: normal !important; font-weight: normal !important;
} }
/**表格鼠标悬停样式*/ /**表格鼠标悬停样式*/
.table-hover > tbody > tr:hover > td, .table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th { .table-hover > tbody > tr:hover > th {
cursor: pointer; cursor: pointer;
} }
/**固定列样式*/ /**固定列样式*/
.fixed-table-body-columns { .fixed-table-body-columns {
top: 336px !important; top: 336px !important;
/*height:226px!important;*/ /*height:226px!important;*/
} }
.fht-cell{width:18px!important;}
.fht-cell {
width: 18px !important;
}
.table-hover > tbody > tr:hover > td, .table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th { .table-hover > tbody > tr:hover > th {
cursor: pointer; cursor: pointer;
} }
.checkBoxClass { .checkBoxClass {
cursor: pointer; cursor: pointer;
} }
.row { .row {
width: 100%; width: 100%;
} }
.bootstrap-select { .bootstrap-select {
margin-left: 3px !important; margin-left: 3px !important;
height: 30px !important; height: 30px !important;
@ -200,11 +225,14 @@
</div> </div>
</div> </div>
<!--表格头--> <!--表格头-->
<input type="hidden" id="tableThNames" value="病案号,ID号,住院次数,姓名,性别,年龄_岁,年龄_月,联系地址,入院日期,出院日期,出院科室,主诊ICD码,主诊名称,主诊转归,住院天数,主治医生,是否有手术"> <input type="hidden" id="tableThNames"
value="病案号,ID号,住院次数,姓名,性别,年龄_岁,年龄_月,联系地址,入院日期,出院日期,出院科室,主诊ICD码,主诊名称,主诊转归,住院天数,主治医生,是否有手术">
<!--查询字段--> <!--查询字段-->
<input type="hidden" id="englishFields" value="commomtable.inpatient_no,commomtable.admiss_id,commomtable.admiss_times,commomtable.name,commomtable.sex,commomtable.age,commomtable.age_month,commomtable.home_addr,commomtable.admiss_date,commomtable.dis_date,commomtable.dis_dept,commomtable.main_diag_code,commomtable.main_diag_name,commomtable.main_dis_thing,commomtable.admiss_days,commomtable.attending,commomtable.is_oper"> <input type="hidden" id="englishFields"
value="commomtable.inpatient_no,commomtable.admiss_id,commomtable.admiss_times,commomtable.name,commomtable.sex,commomtable.age,commomtable.age_month,commomtable.home_addr,commomtable.admiss_date,commomtable.dis_date,commomtable.dis_dept,commomtable.main_diag_code,commomtable.main_diag_name,commomtable.main_dis_thing,commomtable.admiss_days,commomtable.attending,commomtable.is_oper">
<!--数据字段--> <!--数据字段-->
<input type="hidden" id="fields" value="inpatientNo,admissId,admissTimes,name,sex,age,ageMonth,homeAddr,admissDate,disDate,disDept,mainDiagCode,mainDiagName,mainDisThing,admissDays,attending,isOper"> <input type="hidden" id="fields"
value="inpatientNo,admissId,admissTimes,name,sex,age,ageMonth,homeAddr,admissDate,disDate,disDept,mainDiagCode,mainDiagName,mainDisThing,admissDays,attending,isOper">
<!--显示字段--> <!--显示字段-->
<input type="hidden" id="fieldCns"> <input type="hidden" id="fieldCns">
<!--查询总行数--> <!--查询总行数-->
@ -216,7 +244,8 @@
<label class="control-label">姓名:</label> <label class="control-label">姓名:</label>
</div> </div>
<div class="col-sm-8 inputDiv"> <div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="name" maxlength="16"> <input type="text" class="form-control input-sm inputValue" id="name"
maxlength="16">
</div> </div>
</div> </div>
</div> </div>
@ -226,11 +255,13 @@
<label class="control-label">年龄:</label> <label class="control-label">年龄:</label>
</div> </div>
<div style="float:left;width:20%;margin-left:4%"> <div style="float:left;width:20%;margin-left:4%">
<input type="number" class="form-control input-sm inputValue" id="age1" min="0" oninput="if(value.length>9)value=value.slice(0,9)"> <input type="number" class="form-control input-sm inputValue" id="age1" min="0"
oninput="if(value.length>9)value=value.slice(0,9)">
</div> </div>
<div style="float:left;width:3%;margin-left:2%">-</div> <div style="float:left;width:3%;margin-left:2%">-</div>
<div style="float:left;width:20%"> <div style="float:left;width:20%">
<input type="number" class="form-control input-sm inputValue" id="age2" min="0" oninput="if(value.length>9)value=value.slice(0,9)"> <input type="number" class="form-control input-sm inputValue" id="age2" min="0"
oninput="if(value.length>9)value=value.slice(0,9)">
</div> </div>
<div style="float:left;width:20%;margin-left:2%"> <div style="float:left;width:20%;margin-left:2%">
<select class="form-control input-sm" id="ageType"> <select class="form-control input-sm" id="ageType">
@ -247,7 +278,8 @@
<label class="control-label">性别:</label> <label class="control-label">性别:</label>
</div> </div>
<div class="col-sm-3 radioDiv"> <div class="col-sm-3 radioDiv">
<input type="radio" id="all" name="sex" checked value="" class="sexInput"><label for="all" class="checkBoxClass">全部</label> <input type="radio" id="all" name="sex" checked value="" class="sexInput"><label
for="all" class="checkBoxClass">全部</label>
</div> </div>
<div id="sex"></div> <div id="sex"></div>
</div> </div>
@ -260,8 +292,10 @@
<label class="control-label">病案号:</label> <label class="control-label">病案号:</label>
</div> </div>
<div class="col-sm-8 inputDiv"> <div class="col-sm-8 inputDiv">
<%--<select class="selectpicker form-control input-sm inputValue" id="inpatient_no" style="max-height:400px!important;overflow:scroll;" data-live-search="true"></select>--%> <input type="text" class="form-control input-sm inputValue" id="inpatient_no"
<input type="text" class="form-control input-sm inputValue" id="inpatient_no" onkeyup="getInpatientNoContents('inpatient_no')" onfocus="getInpatientNoContents('inpatient_no')" onblur="clearContent('inpatient_no')"> onkeyup="getInpatientNoContents('inpatient_no')"
onfocus="getInpatientNoContents('inpatient_no')"
onblur="clearContent('inpatient_no')">
<div id="inpatient_noDiv" style="position: absolute;z-index: 2000"> <div id="inpatient_noDiv" style="position: absolute;z-index: 2000">
<table id="inpatient_noContent_table" bgcolor="#FFFAFA" border="0" <table id="inpatient_noContent_table" bgcolor="#FFFAFA" border="0"
cellspacing="0" cellpadding="0"> cellspacing="0" cellpadding="0">
@ -277,7 +311,8 @@
<label class="control-label">ID号</label> <label class="control-label">ID号</label>
</div> </div>
<div class="col-sm-9 inputDiv"> <div class="col-sm-9 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="admiss_id" maxlength="16"> <input type="text" class="form-control input-sm inputValue" id="admiss_id"
maxlength="16">
</div> </div>
</div> </div>
</div> </div>
@ -287,7 +322,9 @@
<label class="control-label">出院科室:</label> <label class="control-label">出院科室:</label>
</div> </div>
<div class="col-sm-9 inputDiv"> <div class="col-sm-9 inputDiv">
<select class="selectpicker form-control input-sm inputValue" multiple id="dis_dept" style="max-height:400px!important;overflow:scroll;" data-live-search="true"></select> <select class="selectpicker form-control input-sm inputValue" multiple
id="dis_dept" style="max-height:400px!important;overflow:scroll;"
data-live-search="true"></select>
</div> </div>
</div> </div>
</div> </div>
@ -310,7 +347,8 @@
<label class="control-label">入院日期:</label> <label class="control-label">入院日期:</label>
</div> </div>
<div class="col-sm-4 inputDiv"> <div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="startTime1" style="margin-left: 15px"> <input type="text" class="form-control input-sm inputValue" id="startTime1"
style="margin-left: 15px">
</div> </div>
<div class="col-sm-1" style="padding-top:2%"> <div class="col-sm-1" style="padding-top:2%">
@ -326,7 +364,8 @@
<label class="control-label">出院日期:</label> <label class="control-label">出院日期:</label>
</div> </div>
<div class="col-sm-4 inputDiv"> <div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="startTime2" style="margin-left: 15px"> <input type="text" class="form-control input-sm inputValue" id="startTime2"
style="margin-left: 15px">
</div> </div>
<div class="col-sm-1" style="padding-top:2%"> <div class="col-sm-1" style="padding-top:2%">
@ -344,14 +383,19 @@
<label class="control-label">主诊ICD码</label> <label class="control-label">主诊ICD码</label>
</div> </div>
<div class="col-sm-8 inputDiv"> <div class="col-sm-8 inputDiv">
<select class="selectpicker form-control input-sm inputValue" id="diag_code" style="max-height:400px!important;overflow:scroll;" data-live-search="true"></select> <%--<select class="selectpicker form-control input-sm inputValue" id="diag_code"
<%--<input type="text" class="form-control input-sm otherTable diagTable inputValue" id="diag_code" onkeyup="getDiagCodeContents('diag_code')" onfocus="getDiagCodeContents('diag_code')" onblur="clearContent('diag_code')" maxlength="16"> style="max-height:400px!important;overflow:scroll;"
<div id="diag_codeDiv"> data-live-search="true"></select>--%>
<input type="text" class="form-control input-sm otherTable diagTable inputValue"
id="diag_code" onkeyup="getDiagCodeContents('diag_code')"
onfocus="getDiagCodeContents('diag_code')"
onblur="clearContent('diag_code')" maxlength="16">
<div id="diag_codeDiv" style="position: absolute;z-index: 2000">
<table id="diag_codeContent_table" bgcolor="#FFFAFA" border="0" <table id="diag_codeContent_table" bgcolor="#FFFAFA" border="0"
cellspacing="0" cellpadding="0"> cellspacing="0" cellpadding="0">
<tbody id="diag_codeContent"></tbody> <tbody id="diag_codeContent"></tbody>
</table> </table>
</div>--%> </div>
</div> </div>
</div> </div>
</div> </div>
@ -361,8 +405,19 @@
<label class="control-label">主诊名称:</label> <label class="control-label">主诊名称:</label>
</div> </div>
<div class="col-sm-9 inputDiv"> <div class="col-sm-9 inputDiv">
<select class="selectpicker form-control input-sm inputValue" id="diag_name" style="max-height:400px!important;overflow:scroll;" data-live-search="true"></select> <%--<select class="selectpicker form-control input-sm inputValue" id="diag_name"
<%--<input type="text" class="form-control input-sm otherTable inputValue" id="diag_name" maxlength="16">--%> style="max-height:400px!important;overflow:scroll;"
data-live-search="true"></select>--%>
<input type="text" class="form-control input-sm otherTable diagTable inputValue"
id="diag_name" onkeyup="getDiagNameContents('diag_name')"
onfocus="getDiagNameContents('diag_name')"
onblur="clearContent('diag_name')" maxlength="16">
<div id="diag_nameDiv" style="position: absolute;z-index: 2000">
<table id="diag_nameContent_table" bgcolor="#FFFAFA" border="0"
cellspacing="0" cellpadding="0">
<tbody id="diag_nameContent"></tbody>
</table>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -372,14 +427,19 @@
<label class="control-label">手术编码:</label> <label class="control-label">手术编码:</label>
</div> </div>
<div class="col-sm-9 inputDiv"> <div class="col-sm-9 inputDiv">
<select class="selectpicker form-control input-sm inputValue" id="operate_code" style="max-height:400px!important;overflow:scroll;" data-live-search="true"></select> <%--<select class="selectpicker form-control input-sm inputValue" id="operate_code"
<%--<input type="text" class="form-control input-sm otherTable operTable inputValue" id="operate_code" onkeyup="getOperateCodeContents('operate_code')" onfocus="getOperateCodeContents('operate_code')" onblur="clearContent('operate_code')" maxlength="16"> style="max-height:400px!important;overflow:scroll;"
<div id="operate_codeDiv"> data-live-search="true"></select>--%>
<input type="text" class="form-control input-sm otherTable operTable inputValue"
id="operate_code" onkeyup="getOperateCodeContents('operate_code')"
onfocus="getOperateCodeContents('operate_code')"
onblur="clearContent('operate_code')" maxlength="16">
<div id="operate_codeDiv" style="position: absolute;z-index: 2000">
<table id="operate_codeContent_table" bgcolor="#FFFAFA" border="0" <table id="operate_codeContent_table" bgcolor="#FFFAFA" border="0"
cellspacing="0" cellpadding="0"> cellspacing="0" cellpadding="0">
<tbody id="operate_codeContent"></tbody> <tbody id="operate_codeContent"></tbody>
</table> </table>
</div>--%> </div>
</div> </div>
</div> </div>
</div> </div>
@ -391,8 +451,19 @@
<label class="control-label">手术名称:</label> <label class="control-label">手术名称:</label>
</div> </div>
<div class="col-sm-8 inputDiv"> <div class="col-sm-8 inputDiv">
<select class="selectpicker form-control input-sm inputValue" id="operate_name" style="max-height:400px!important;overflow:scroll;" data-live-search="true"></select> <%--<select class="selectpicker form-control input-sm inputValue" id="operate_name"
<%--<input type="text" class="form-control input-sm otherTable operTable inputValue" id="operate_name" maxlength="16">--%> style="max-height:400px!important;overflow:scroll;"
data-live-search="true"></select>--%>
<input type="text" class="form-control input-sm otherTable operTable inputValue"
id="operate_name" onkeyup="getOperateNameContents('operate_name')"
onfocus="getOperateNameContents('operate_name')"
onblur="clearContent('operate_name')" maxlength="16">\
<div id="operate_nameDiv" style="position: absolute;z-index: 2000">
<table id="operate_nameContent_table" bgcolor="#FFFAFA" border="0"
cellspacing="0" cellpadding="0">
<tbody id="operate_nameContent"></tbody>
</table>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -402,16 +473,17 @@
<label class="control-label">主治医生:</label> <label class="control-label">主治医生:</label>
</div> </div>
<div class="col-sm-9 inputDiv"> <div class="col-sm-9 inputDiv">
<input type="text" class="form-control input-sm diagTable inputValue" id="attending" maxlength="6"> <input type="text" class="form-control input-sm diagTable inputValue"
id="attending" maxlength="6">
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<%--<div class="col-sm-1 labelDiv">
</div>--%>
<div class="col-sm-8 inputDiv" style="padding-top:2%;padding-left:6%"> <div class="col-sm-8 inputDiv" style="padding-top:2%;padding-left:6%">
<input type="checkbox" id="isOper" class="otherTable operTable isOperInput"><label for="isOper" class="checkBoxClass">限手术</label> <input type="checkbox" id="isOper"
class="otherTable operTable isOperInput"><label for="isOper"
class="checkBoxClass">限手术</label>
</div> </div>
</div> </div>
</div> </div>
@ -491,12 +563,15 @@
</shiro:hasPermission> </shiro:hasPermission>
<shiro:hasPermission name="/commom/addApplyApprove"> <shiro:hasPermission name="/commom/addApplyApprove">
<div class="btn"> <div class="btn">
<button type="button" class="btn btn-sm btn-primary" id="borrowings" onclick="borrowings()">批量借阅申请</button> <button type="button" class="btn btn-sm btn-primary" id="borrowings" onclick="borrowings()">批量借阅申请
</button>
</div> </div>
</shiro:hasPermission> </shiro:hasPermission>
<shiro:hasPermission name="/commom/downloadZip"> <shiro:hasPermission name="/commom/downloadZip">
<div class="btn"> <div class="btn">
<button type="button" class="btn btn-sm btn-success" id="downBorrowings" onclick="downBorrowings()">批量下载申请</button> <button type="button" class="btn btn-sm btn-success" id="downBorrowings" onclick="downBorrowings()">
批量下载申请
</button>
</div> </div>
</shiro:hasPermission> </shiro:hasPermission>
<shiro:hasPermission name="/commom/addLockByPatientId"> <shiro:hasPermission name="/commom/addLockByPatientId">
@ -540,7 +615,8 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">有效时间:</label> <label class="col-sm-4 control-label">有效时间:</label>
<div class="col-sm-7"> <div class="col-sm-7">
<input type="text" class="form-control input-sm input" id="effeTime" name="effeTime" maxlength="10"> <input type="text" class="form-control input-sm input" id="effeTime" name="effeTime"
maxlength="10">
</div> </div>
<div class="col-sm-1"></div> <div class="col-sm-1"></div>
</div> </div>
@ -549,7 +625,8 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">申请天数:</label> <label class="col-sm-4 control-label">申请天数:</label>
<div class="col-sm-7"> <div class="col-sm-7">
<input type="number" class="form-control input-sm input" id="effeDays" name="effeDays" oninput="if(value.length>3)value=value.slice(0,3)"> <input type="number" class="form-control input-sm input" id="effeDays"
name="effeDays" oninput="if(value.length>3)value=value.slice(0,3)">
</div> </div>
<div class="col-sm-1"></div> <div class="col-sm-1"></div>
</div> </div>
@ -558,7 +635,8 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">申请类型:</label> <label class="col-sm-4 control-label">申请类型:</label>
<div class="col-sm-7"> <div class="col-sm-7">
<select class="form-control input-sm input" name="applyType" id="applyType"></select> <select class="form-control input-sm input" name="applyType"
id="applyType"></select>
</div> </div>
<div class="col-sm-1"></div> <div class="col-sm-1"></div>
</div> </div>
@ -567,7 +645,8 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">申请理由:</label> <label class="col-sm-4 control-label">申请理由:</label>
<div class="col-sm-7"> <div class="col-sm-7">
<textarea class="form-control input-sm input" id="applyReason" name="applyReason" maxlength="250"></textarea> <textarea class="form-control input-sm input" id="applyReason" name="applyReason"
maxlength="250"></textarea>
</div> </div>
<div class="col-sm-1"></div> <div class="col-sm-1"></div>
</div> </div>

@ -22,6 +22,7 @@ $(function () {
//加载inpatientNo //加载inpatientNo
//loadInpatientNo(); //loadInpatientNo();
}); });
//加载性别 //加载性别
function loadSex() { function loadSex() {
$.ajax({ $.ajax({
@ -467,18 +468,12 @@ function getSql() {
//搜索功能 //搜索功能
function search() { function search() {
var inpatient_no = $("#inpatient_no").val();
var startTime1 = $("#startTime1").val(); var startTime1 = $("#startTime1").val();
var endTime1 = $("#endTime1").val(); var endTime1 = $("#endTime1").val();
var startTime2 = $("#startTime2").val(); var startTime2 = $("#startTime2").val();
var endTime2 = $("#endTime2").val(); var endTime2 = $("#endTime2").val();
var age1 = $("#age1").val(); var age1 = $("#age1").val();
var age2 = $("#age2").val(); var age2 = $("#age2").val();
console.log("1111" + startTime1 + endTime1 + startTime2 + endTime2);
if (inpatient_no != '' && (inpatient_no.indexOf(",") == -1 || inpatient_no.indexOf("") == -1) && inpatient_no.length > 16) {
toastr.warning("病案号的长度太长!");
return false;
}
if ((age1 != '' && age2 == '') || (age1 == '' && age2 != '')) { if ((age1 != '' && age2 == '') || (age1 == '' && age2 != '')) {
toastr.warning("请输入完整年龄时间段!"); toastr.warning("请输入完整年龄时间段!");
return false; return false;
@ -598,6 +593,29 @@ function getDiagCodeContents(id) {
} }
} }
//级联诊断名称
function getDiagNameContents(id) {
var code = "";
var name = document.getElementById(id).value;
if (name.length > 2) {
var ajax = new XMLHttpRequest();
var url = path + "/commom/getDiagCodeContents?code="+ code +"&name=" + name;
ajax.open("GET", url, true);
ajax.send(null);
ajax.onreadystatechange = function () {
if (ajax.readyState == 4) {
if (ajax.status == 200) {
var result = ajax.responseText;
insertContent(result, id);
}
}
}
} else {
clearContent(id);
return;
}
}
//级联手术编码 //级联手术编码
function getOperateCodeContents(id) { function getOperateCodeContents(id) {
var keyword = document.getElementById(id).value; var keyword = document.getElementById(id).value;
@ -620,6 +638,30 @@ function getOperateCodeContents(id) {
} }
} }
//级联手术名称
function getOperateNameContents(id) {
var name = document.getElementById(id).value;
var code = "";
if (name.length > 2) {
var ajax = new XMLHttpRequest();
var url = path + "/commom/getOperateCodeContents?code=" + code +"&name=" + name;
ajax.open("GET", url, true);
ajax.send(null);
ajax.onreadystatechange = function () {
if (ajax.readyState == 4) {
if (ajax.status == 200) {
var result = ajax.responseText;
insertContent(result, id);
}
}
}
} else {
clearContent(id);
return;
}
}
//添加内容tr td //添加内容tr td
function insertContent(content, id) { function insertContent(content, id) {
clearContent(id); clearContent(id);
@ -627,31 +669,20 @@ function insertContent(content, id) {
var json = JSON.parse(content); var json = JSON.parse(content);
for (key in json) { for (key in json) {
var tr = document.createElement("tr"); var tr = document.createElement("tr");
var td1 = document.createElement("td");
var td2 = document.createElement("td"); var td2 = document.createElement("td");
var td4 = document.createElement("td"); var td4 = document.createElement("td");
tr.setAttribute("bgcolor", "#FFFAFA"); tr.setAttribute("bgcolor", "#FFFAFA");
tr.setAttribute("border", "0"); tr.setAttribute("border", "0");
/*if(id == 'inpatient_no'){ if (id == 'inpatient_no' || id == 'diag_code' || id == 'operate_code') {
td1.innerHTML = "病案号:";
}else if(id == 'diag_code'){
td1.innerHTML = "ICD码:";
}else if(id == 'operate_code'){
td1.innerHTML = "手术编码:";
}*/
td2.innerHTML = key; td2.innerHTML = key;
/*if(id == 'inpatient_no'){
td3.innerHTML = "姓名:";
}else if(id == 'diag_code'){
td3.innerHTML = "诊断名称:";
}else if(id == 'operate_code'){
td3.innerHTML = "手术名称:";
}*/
td4.innerHTML = json[key]; td4.innerHTML = json[key];
//tr.appendChild(td1);
tr.appendChild(td2); tr.appendChild(td2);
//tr.appendChild(td3);
tr.appendChild(td4); tr.appendChild(td4);
} else {
td1.innerHTML = json[key];
tr.appendChild(td1);
}
document.getElementById(id + "Content").appendChild(tr); document.getElementById(id + "Content").appendChild(tr);
tr.onmouseover = function () { tr.onmouseover = function () {
this.className = 'mouseOver'; this.className = 'mouseOver';

Loading…
Cancel
Save