常用查询增加查询条件:全部诊断、其他诊断、病理诊断、损伤中毒

master
zengwh 6 years ago
parent 5dddbef67c
commit f595d84605

@ -28,8 +28,8 @@ public class DelPrintPicQuartz {
FileUtils.deleteDirectory(new File(WATERPICPATH)); FileUtils.deleteDirectory(new File(WATERPICPATH));
} }
//13时与19时删除ie8接口页面预览病案缓存的pdf //1小时一次删除ie8接口页面预览病案缓存的pdf
@Scheduled(cron="0 0 13,19 * * ?") @Scheduled(cron="0 0 0/1 * * ?")
public void clearShowPdf() throws Exception{ public void clearShowPdf() throws Exception{
System.out.println(new Date()+":删除接口页面预览病案缓存的pdf"); System.out.println(new Date()+":删除接口页面预览病案缓存的pdf");
String root = WATERPICPATH + "pdfTemp"; String root = WATERPICPATH + "pdfTemp";

@ -477,7 +477,7 @@ public class CommomSearchController {
model.addAttribute("isDownload", isDownload); model.addAttribute("isDownload", isDownload);
//查询是否有打印权限 //查询是否有打印权限
Integer printFlag = 0; Integer printFlag = 0;
Set<String> menus = user.getMenus(); /* Set<String> menus = user.getMenus();
for (String menu : menus) { for (String menu : menus) {
if (StringUtils.isNotBlank(menu)) { if (StringUtils.isNotBlank(menu)) {
if ("/commom/printPdf".equals(menu)) { if ("/commom/printPdf".equals(menu)) {
@ -485,7 +485,7 @@ public class CommomSearchController {
break; break;
} }
} }
} }*/
model.addAttribute("printFlag", printFlag); model.addAttribute("printFlag", printFlag);
model.addAttribute("flag", flag); model.addAttribute("flag", flag);
return "recordManage/commomSearch/showRecordIframeBlood"; return "recordManage/commomSearch/showRecordIframeBlood";

@ -151,6 +151,8 @@ public class CommomVo {
private String diagName;//诊断名称 private String diagName;//诊断名称
private String poisoningName;//损伤中毒
private String disThing;//转归情况 private String disThing;//转归情况
private String operateCode;//手术编码 private String operateCode;//手术编码
@ -1902,4 +1904,12 @@ public class CommomVo {
public void setDelOper(Integer delOper) { public void setDelOper(Integer delOper) {
this.delOper = delOper; this.delOper = delOper;
} }
public String getPoisoningName() {
return poisoningName;
}
public void setPoisoningName(String poisoningName) {
this.poisoningName = poisoningName;
}
} }

@ -156,8 +156,9 @@
height: 30px !important; height: 30px !important;
line-height: 30px !important; line-height: 30px !important;
} }
form{
margin-bottom: 0!important; form {
margin-bottom: 0 !important;
} }
</style> </style>
</head> </head>
@ -214,13 +215,13 @@
</div> </div>
<!--表格头--> <!--表格头-->
<input type="hidden" id="tableThNames" <input type="hidden" id="tableThNames"
value="病案号,ID号,住院次数,姓名,性别,年龄_岁,年龄_月,入院日期,出院日期,出院科室,联系地址,主诊ICD码,主诊名称,主诊转归,住院天数,主治医生,是否有手术"> value="病案号,ID号,住院次数,姓名,性别,年龄_岁,年龄_月,入院日期,出院日期,出院科室,联系地址,主诊ICD码,主诊名称,主诊转归,住院天数,主治医生,其他诊断,病理诊断,损伤中毒,是否有手术">
<!--查询字段--> <!--查询字段-->
<input type="hidden" id="englishFields" <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.admiss_date,commomtable.dis_date,commomtable.dis_dept,commomtable.home_addr,commomtable.main_diag_code,commomtable.main_diag_name,commomtable.main_dis_thing,commomtable.admiss_days,commomtable.attending,commomtable.is_oper"> value="commomtable.inpatient_no,commomtable.admiss_id,commomtable.admiss_times,commomtable.name,commomtable.sex,commomtable.age,commomtable.age_month,commomtable.admiss_date,commomtable.dis_date,commomtable.dis_dept,commomtable.home_addr,commomtable.main_diag_code,commomtable.main_diag_name,commomtable.main_dis_thing,commomtable.admiss_days,commomtable.attending,commomtable.other_diag_name,commomtable.pathology_name,commomtable.poisoning_name,commomtable.is_oper">
<!--数据字段--> <!--数据字段-->
<input type="hidden" id="fields" <input type="hidden" id="fields"
value="inpatientNo,admissId,admissTimes,name,sex,age,ageMonth,admissDate,disDate,disDept,homeAddr,mainDiagCode,mainDiagName,mainDisThing,admissDays,attending,isOper"> value="inpatientNo,admissId,admissTimes,name,sex,age,ageMonth,admissDate,disDate,disDept,homeAddr,mainDiagCode,mainDiagName,mainDisThing,admissDays,attending,otherDiagName,pathologyName,poisoningName,isOper">
<!--显示字段--> <!--显示字段-->
<input type="hidden" id="fieldCns"> <input type="hidden" id="fieldCns">
<!--查询总行数--> <!--查询总行数-->
@ -371,9 +372,6 @@
<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>--%>
<input type="text" class="form-control input-sm otherTable diagTable inputValue" <input type="text" class="form-control input-sm otherTable diagTable inputValue"
id="diag_code" onkeyup="getDiagCodeContents('diag_code')" id="diag_code" onkeyup="getDiagCodeContents('diag_code')"
onfocus="getDiagCodeContents('diag_code')" onfocus="getDiagCodeContents('diag_code')"
@ -393,9 +391,6 @@
<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>--%>
<input type="text" class="form-control input-sm otherTable diagTable inputValue" <input type="text" class="form-control input-sm otherTable diagTable inputValue"
id="diag_name" onkeyup="getDiagNameContents('diag_name')" id="diag_name" onkeyup="getDiagNameContents('diag_name')"
onfocus="getDiagNameContents('diag_name')" onfocus="getDiagNameContents('diag_name')"
@ -415,9 +410,6 @@
<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>--%>
<input type="text" class="form-control input-sm otherTable operTable inputValue" <input type="text" class="form-control input-sm otherTable operTable inputValue"
id="operate_code" onkeyup="getOperateCodeContents('operate_code')" id="operate_code" onkeyup="getOperateCodeContents('operate_code')"
onfocus="getOperateCodeContents('operate_code')" onfocus="getOperateCodeContents('operate_code')"
@ -439,9 +431,6 @@
<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>--%>
<input type="text" class="form-control input-sm otherTable operTable inputValue" <input type="text" class="form-control input-sm otherTable operTable inputValue"
id="operate_name" onkeyup="getOperateNameContents('operate_name')" id="operate_name" onkeyup="getOperateNameContents('operate_name')"
onfocus="getOperateNameContents('operate_name')" onfocus="getOperateNameContents('operate_name')"
@ -468,65 +457,74 @@
</div> </div>
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<div class="col-sm-8 inputDiv" style="padding-top:2%;padding-left:6%"> <div class="col-sm-3 labelDiv">
<input type="checkbox" id="isOper" <label class="control-label">全部诊断:</label>
class="otherTable operTable isOperInput"><label for="isOper" </div>
class="checkBoxClass">限手术</label> <div class="col-sm-9 inputDiv">
<input type="text" class="form-control input-sm diagTable inputValue"
id="all_diag_name" maxlength="100">
</div>
</div> </div>
</div> </div>
</div> </div>
<%--<div class="col-sm-4"> <div class="row">
<div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<div class="col-sm-3 labelDiv"> <div class="col-sm-4 labelDiv">
<label class="control-label">病理诊断:</label> <label class="control-label">其他诊断:</label>
</div> </div>
<div class="col-sm-9 inputDiv"> <div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm diagTable inputValue" id="pathology_name" maxlength="16"> <input type="text" class="form-control input-sm otherTable diagTable inputValue"
id="other_diag_name" maxlength="100">
</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-3 labelDiv"> <div class="col-sm-3 labelDiv">
<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 otherTable diagTable inputValue" id="follow_name" maxlength="16"> <input type="text" class="form-control input-sm diagTable inputValue"
id="pathology_name" maxlength="100">
</div> </div>
</div> </div>
</div>--%>
</div> </div>
<%-- <div class="">
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<div class="col-sm-4 labelDiv"> <div class="col-sm-3 labelDiv">
<label class="control-label">损伤中毒:</label>
</div> </div>
<div class="col-sm-8 inputDiv" style="padding-top:2%"> <div class="col-sm-9 inputDiv">
<input type="checkbox" id="isOper" class="otherTable operTable isOperInput">限手术 <input type="text" class="form-control input-sm diagTable inputValue"
id="poisoning_name" maxlength="100">
</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-3 labelDiv"> <div class="col-sm-3 labelDiv">
<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 inputValue" id="taint_name" maxlength="16"> <input type="text" class="form-control input-sm inputValue" id="taint_name"
maxlength="16">
</div> </div>
</div> </div>
</div>--%>
</div> </div>
<div class="row">
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<div class="searchDiv left"> <div class="col-sm-4 labelDiv"></div>
<button type="button" class="btn btn-sm btn-primary" onclick="search()">开始搜索</button> <div class="col-sm-8 inputDiv">
<input type="checkbox" id="isOper"
class="otherTable operTable isOperInput"><label for="isOper"
class="checkBoxClass">限手术</label>
</div> </div>
<div class="clearDiv left">
<button type="button" class="btn btn-sm btn-default" onclick="clearForm()">&nbsp;&nbsp;清&nbsp;&nbsp;空&nbsp;&nbsp;</button>
</div> </div>
</div> </div>
</div> </div>
</div>--%>
</form> </form>
</div> </div>
</div> </div>
@ -673,7 +671,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="inpatientNo" name="inpatientNo"> <input type="text" class="form-control input-sm input" id="inpatientNo"
name="inpatientNo">
</div> </div>
<div class="col-sm-1"></div> <div class="col-sm-1"></div>
</div> </div>
@ -691,7 +690,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="admissTimes" name="admissTimes"> <input type="number" class="form-control input-sm input" id="admissTimes"
name="admissTimes">
</div> </div>
<div class="col-sm-1"></div> <div class="col-sm-1"></div>
</div> </div>
@ -700,7 +700,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" name="disDate" id="disDate" maxlength="10"> <input type="text" class="form-control input-sm input" name="disDate" id="disDate"
maxlength="10">
</div> </div>
<div class="col-sm-1"></div> <div class="col-sm-1"></div>
</div> </div>
@ -709,7 +710,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="selectpicker form-control input-sm inputValue" id="disDept" name="disDept" <select class="selectpicker form-control input-sm inputValue" id="disDept"
name="disDept"
style="max-height:400px!important;overflow:scroll;" style="max-height:400px!important;overflow:scroll;"
data-live-search="true"></select> data-live-search="true"></select>
</div> </div>

@ -130,13 +130,6 @@ function loadDeptDefault(defaultDeptName){
if(null != data){ if(null != data){
$("#disDept").empty(); $("#disDept").empty();
var html = '<option value="">请选择</option>'; var html = '<option value="">请选择</option>';
/*for (var i = 0; i < data.length; i++) {
if(data[i].name != '' && data[i].name == defaultDeptName){
html += '<option value="'+data[i].name+'" selected>'+data[i].name+'</option>';
} else {
html += '<option value="'+data[i].name+'">'+data[i].name+'</option>';
}
}*/
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
if (data[i].name != '' && data[i].name == defaultDeptName) { if (data[i].name != '' && data[i].name == defaultDeptName) {
var name = data[i].name; var name = data[i].name;
@ -441,16 +434,26 @@ function getSql() {
name = 'main_diag_code'; name = 'main_diag_code';
whereNames += commomtable + "." + name + " LIKE '%" + $("#diag_code").val() + "%' AND "; whereNames += commomtable + "." + name + " LIKE '%" + $("#diag_code").val() + "%' AND ";
} }
/*//病理诊断 //全部诊断
if($("#pathology_name").val() != ''){ if($("#all_diag_name").val() != ''){
name = 'diag_name'; name = 'diag_name';
whereNames += "t_diag.diag_type='3' AND t_diag."+name+" LIKE '%"+$("#pathology_name").val()+"%' AND "; whereNames += "t_diag."+name+" LIKE '%"+$("#all_diag_name").val()+"%' AND ";
}
//其他诊断
if($("#other_diag_name").val() != ''){
name = 'other_diag_name';
whereNames += commomtable + "." + name + " LIKE '%" + $("#other_diag_name").val() + "%' AND ";
}
//病理诊断
if($("#pathology_name").val() != ''){
name = 'pathology_name';
whereNames += commomtable + "." + name + " LIKE '%" + $("#pathology_name").val() + "%' AND ";
}
//损伤中毒
if($("#poisoning_name").val() != ''){
name = 'poisoning_name';
whereNames += commomtable + "." + name + " LIKE '%" + $("#poisoning_name").val() + "%' AND ";
} }
//伴随诊断
if($("#follow_name").val() != ''){
name = 'follow_name';
whereNames += "t_diag.diag_type>'1' AND t_diag.diag_name LIKE '%"+$("#"+name).val()+"%' AND ";
}*/
//手术表 //手术表
//手术编号 //手术编号
if ($("#operate_code").val() != '') { if ($("#operate_code").val() != '') {
@ -469,18 +472,10 @@ function getSql() {
'and emr_apply_approve1.approve_state = 1 and emr_apply_approve1.effe_time > GETDATE()-1 and emr_apply_approve1.applyer = ' + userName + ' and emr_apply_approve1.apply_type = 3' + 'and emr_apply_approve1.approve_state = 1 and emr_apply_approve1.effe_time > GETDATE()-1 and emr_apply_approve1.applyer = ' + userName + ' and emr_apply_approve1.apply_type = 3' +
' left join emr_lock on ' + commomtable + '.patient_id = emr_lock.patient_id and emr_lock.lock_state = 1'; ' left join emr_lock on ' + commomtable + '.patient_id = emr_lock.patient_id and emr_lock.lock_state = 1';
//拼接诊断表 //拼接诊断表
/*var diagFlag = false; //全部诊断
var otherTable = ""; if($("#all_diag_name").val() != ''){
$(".diagTable").each(function () { fromTableNames += ' left join t_diag on '+commomtable+'.patient_id=t_diag.patient_id';
if($(this).val() != ''){
diagFlag = true;
return false;
} }
})
if(diagFlag){
otherTable = 't_diag';
fromTableNames += ' left join '+otherTable+' on '+commomtable+'.patient_id='+otherTable+'.patient_id';
}*/
//拼接手术表 //拼接手术表
var operFlag = false; var operFlag = false;
$(".operTable").each(function () { $(".operTable").each(function () {

@ -5,7 +5,7 @@ var initSql = "select commomtable.patient_id,CASE WHEN emr_apply_approve.id is
"\t0\n" + "\t0\n" +
"ELSE\n" + "ELSE\n" +
"\t1\n" + "\t1\n" +
"END isDownload,CASE WHEN emr_lock.id is null THEN 0 ELSE 1 END lockStatus,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 from commomtable left join emr_apply_approve on commomtable.patient_id = emr_apply_approve.patient_id and emr_apply_approve.approve_state = 1 and emr_apply_approve.effe_time > GETDATE()-1 and emr_apply_approve.applyer = " +userName+ " and emr_apply_approve.apply_type != 3 left join emr_apply_approve emr_apply_approve1 on commomtable.patient_id = emr_apply_approve1.patient_id and emr_apply_approve1.approve_state = 1 and emr_apply_approve1.effe_time > GETDATE()-1 and emr_apply_approve1.applyer = " +userName+ " and emr_apply_approve1.apply_type = 3 left join emr_lock on commomtable.patient_id = emr_lock.patient_id and emr_lock.lock_state = 1 "; "END isDownload,CASE WHEN emr_lock.id is null THEN 0 ELSE 1 END lockStatus,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.other_diag_name,commomtable.pathology_name,commomtable.poisoning_name,commomtable.is_oper from commomtable left join emr_apply_approve on commomtable.patient_id = emr_apply_approve.patient_id and emr_apply_approve.approve_state = 1 and emr_apply_approve.effe_time > GETDATE()-1 and emr_apply_approve.applyer = " +userName+ " and emr_apply_approve.apply_type != 3 left join emr_apply_approve emr_apply_approve1 on commomtable.patient_id = emr_apply_approve1.patient_id and emr_apply_approve1.approve_state = 1 and emr_apply_approve1.effe_time > GETDATE()-1 and emr_apply_approve1.applyer = " +userName+ " and emr_apply_approve1.apply_type = 3 left join emr_lock on commomtable.patient_id = emr_lock.patient_id and emr_lock.lock_state = 1 ";
//定义查看详情的请求地址url //定义查看详情的请求地址url
function returnShowDetailUrl(patientId){ function returnShowDetailUrl(patientId){
return path + '/commom/showRecord174?patientId=' + patientId; return path + '/commom/showRecord174?patientId=' + patientId;

Loading…
Cancel
Save