病理报告

master
wengjx 3 years ago
parent 18a2f9a04f
commit feceb0a5c9

@ -0,0 +1,228 @@
package com.emr.controller;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.Archive_MasterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
@Controller
@RequestMapping("pathological/")
public class PathologicalReportController {
@Autowired
private Archive_MasterService archiveMasterService;
/**
*
* @return
*/
@RequestMapping("pathologicalReport")
public String pathologicalReport(Model model, String startDateTo, String endDateTo){
model.addAttribute("startDate",startDateTo);
model.addAttribute("endDate",endDateTo);
return "pathological/pathologicalReport";
}
/**
*
* @return
*/
@RequestMapping("getPathologicalReportList")
@ResponseBody
public OffsetLimitPage getPathologicalReportList(Integer offset,
Integer limit,
Archive_Master_Vo Archive_Master_Vo,
HttpServletRequest request){
List<Archive_Master_Vo> ArchiveMasterList = archiveMasterService.selectArchiveMasterVoAndExt(Archive_Master_Vo);
OffsetLimitPage offsetLimitPage = new OffsetLimitPage();
offsetLimitPage.setTotal((long) ArchiveMasterList.size());
List<Archive_Master_Vo> list = new ArrayList<>();
for (int i = 0; i < ArchiveMasterList.size(); i++) {
list.add(ArchiveMasterList.get(i));
if(list.size() == limit){
break;
}
}
offsetLimitPage.setRows(list);
//request.getSession().removeAttribute("unSubmitRecords");
return offsetLimitPage;
}
/**
*
*/
// @RequestMapping("selectCount")
// @ResponseBody
// public Msg selectCount(RecordSearch recordSearch) throws Exception{
// SubmitRecordStatistics recordStatistics = recordService.selectCount(recordSearch);
// return Msg.success().add("record",recordStatistics);
// }
//
// /**
// * 病案提交导出
// * @param response
// */
// @ResponseBody
// @RequestMapping(value = "/exportExcelSubmit")
// public void exportExcelSubmit(HttpServletResponse response,
// RecordSearch recordSearch,
// HttpServletRequest request){
// String tableThNames = "科室名称,出院人数,医生已提交,医生未提交,医生提交率," +
// "医生质控员已提交,医生质控员未提交,医生质控员提交率," +
// "科主任已提交,科主任未提交,科主任提交率," +
// "护士已提交,护士未提交,护士提交率," +
// "护士质控员已提交,护士质控员未提交,护士质控员提交率," +
// "护士长已提交,护士长未提交,护士长提交率";
// String fieldCns = "deptNameCn,count,doctorSubmitCount,unDoctorSubmitCount,doctorSubmitPercent," +
// "doctorCheckCount,unDoctorCheckCount,doctorCheckPercent," +
// "directorCheckCount,unDirectorCheckCount,directorCheckPercent," +
// "nurseSubmitCount,unNurseSubmitCount,nurseSubmitPercent," +
// "nurseCheckCount,unNurseCheckCount,nurseCheckPercent," +
// "headNurseCount,unHeadNurseCount,headNursePercent";
// //构造excel的数据
// try {
// List<SubmitRecord> list = recordService.selectUnCountGroupDept(recordSearch,request);
// //文件名
// String fileName = "病案提交统计" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
// //ExportExcelUtil
// ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
// //导出excel的操作
// exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
// }catch (Exception e){
// ExceptionPrintUtil.printException(e);
// e.printStackTrace();
// }
// }
//
// /**
// * 科室病案超期頁面
// * @return
// */
// @RequestMapping("deptOverTimeInfo")
// public String deptOverTimeInfo(Model model, String startDateTo, String endDateTo){
// model.addAttribute("startDate",startDateTo);
// model.addAttribute("endDate",endDateTo);
// return "record/deptOverTimeInfo";
// }
//
// /**
// * 科室病案超期頁面中,其中各个角色的提交率
// */
// @RequestMapping("selectOvertimeCount")
// @ResponseBody
// public Msg selectOvertimeCount(RecordSearch recordSearch, HttpServletRequest request) throws Exception{
// SubmitRecordStatistics recordStatistics = recordService.selectOvertimeCount(recordSearch,request);
// return Msg.success().add("record",recordStatistics);
// }
//
// /**
// * 按科室待审核角色病案超时分页查询
// * @return
// */
// @RequestMapping("getRecordGroupDeptAndRole")
// @ResponseBody
// public OffsetLimitPage getRecordGroupDeptAndRole(Integer offset,
// Integer limit,
// RecordSearch recordSearch){
// if(offset != null && limit != null) {
// PageHelper.offsetPage(offset, limit);
// }
// List<Archive_Master_Vo> submitRecords = new Page<>();
// try {
// submitRecords = recordService.selectRecordGroupDeptAndRole(recordSearch);
// }catch (Exception e){
// e.printStackTrace();
// ExceptionPrintUtil.printException(e);
// }
//
// return new OffsetLimitPage((Page) submitRecords);
// }
//
// /**
// * 科室病案超期导出
// * @param response
// */
// @ResponseBody
// @RequestMapping(value = "/exportExcelDeptOverTime")
// public void exportExcelDeptOverTime(HttpServletResponse response,
// RecordSearch recordSearch,
// HttpServletRequest request){
// String tableThNames = "科室名称,超期份數,医生未提交,医生质控员未提交,科主任未提交,护士未提交,"+
// "护士质控员未提交,护士长未提交,病案室未提交";
// String fieldCns = "deptNameCn,count,unDoctorSubmitCount,unDoctorCheckCount,unDirectorCheckCount," +
// "unNurseSubmitCount,unNurseCheckCount,unHeadNurseCount,headNurseCount";
// //构造excel的数据
// try {
// List<SubmitRecord> list = recordService.selectUnCountGroupDept(recordSearch,request);
// //文件名
// String fileName = "科室病案超期" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
// //ExportExcelUtil
// ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
// //导出excel的操作
// exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
// }catch (Exception e){
// ExceptionPrintUtil.printException(e);
// e.printStackTrace();
// }
// }
//
// /**
// * 病案提交明细页面
// * @return
// */
// @RequestMapping("signedRecord")
// public String signedRecord(){
// return "record/signedRecord";
// }
//
// /**
// * 病案提交明细分页查询
// * @return
// */
// @RequestMapping("getSignedRecordList")
// @ResponseBody
// public OffsetLimitPage getSignedRecordList(Integer offset, Integer limit, RecordSearch recordSearch){
// if(offset != null && limit != null) {
// PageHelper.offsetPage(offset, limit);
// }
// List<SubmitRecordStatistics> submitRecords = new Page<>();
// try {
// submitRecords = recordService.getSignedRecordList(recordSearch);
// }catch (Exception e){
// e.printStackTrace();
// ExceptionPrintUtil.printException(e);
// }
// return new OffsetLimitPage((Page)submitRecords);
// }
//
// /**
// * 病案签收导出
// * @param response
// */
// @ResponseBody
// @RequestMapping(value = "/exportExcelSigned")
// public void exportExcelSigned(HttpServletResponse response,RecordSearch recordSearch){
// String tableThNames = "出院日期,出院科室,出院人数,采集完整,已提交,已归档,完整率,提交率,归档率";
// String fieldCns = "disDate,deptNameCn,allCount,count3,count1,count2,count3Percent,count1Percent,count2Percent";
// //构造excel的数据
// try {
// List<SubmitRecordStatistics> list = recordService.getSignedRecordList(recordSearch);
// //文件名
// String fileName = "病案室签收统计" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
// //ExportExcelUtil
// ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
// //导出excel的操作
// exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
// }catch (Exception e){
// ExceptionPrintUtil.printException(e);
// e.printStackTrace();
// }
// }
}

@ -218,4 +218,10 @@ public interface Archive_MasterMapper {
* @return
*/
Integer selectTime1(Archive_Master_Vo archiveMasterVo);
/**
*
* @return
*/
List<Archive_Master_Vo> selectArchiveMasterVoAndExt(Archive_Master_Vo archive_master_vo);
}

@ -206,6 +206,17 @@ public class Archive_Master_Vo {
//退回急诊室总数
private Integer backNum;
//报告名称
private String C9;
//报告登记时间
private String T3;
//病理号
private String C1;
public Integer getOverTime() {
return overTime;
}
@ -881,6 +892,30 @@ public class Archive_Master_Vo {
public void setBackNum(Integer backNum) {
this.backNum = backNum;
}
public String getC9() {
return C9;
}
public void setC9(String c9) {
C9 = c9;
}
public String getT3() {
return T3;
}
public void setT3(String t3) {
T3 = t3;
}
public String getC1() {
return C1;
}
public void setC1(String c1) {
C1 = c1;
}
}

@ -322,6 +322,8 @@ public interface Archive_MasterService {
* @return
*/
Integer selectCountNum(Archive_Master_Vo archiveMasterVo);
List<Archive_Master_Vo> selectArchiveMasterVoAndExt(Archive_Master_Vo archive_master_vo);
}

@ -917,6 +917,15 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
public Integer selectCountNum(Archive_Master_Vo archiveMasterVo) {
return archiveMasterMapper.selectCountNum(archiveMasterVo);
}
@Override
public List<Archive_Master_Vo> selectArchiveMasterVoAndExt(Archive_Master_Vo archive_master_vo) {
List<Archive_Master_Vo> archive_master_vos = archiveMasterMapper.selectArchiveMasterVoAndExt(archive_master_vo);
for (int i = 0; i < archive_master_vos.size(); i++) {
System.out.println(archive_master_vos.get(i));
}
return archive_master_vos ;
}
}

@ -46,7 +46,10 @@ public class PowerUserServiceImpl implements PowerUserService {
return null;
}
@Override
public List<Archive_Master_Following> getHandleName(String patientIds) {
return null;
}
}

@ -111,6 +111,10 @@
<result column="overTime2" jdbcType="INTEGER" property="overTime2" />
<result column="flag" jdbcType="INTEGER" property="flag" />
<result column="countNum" jdbcType="INTEGER" property="countNum" />
<result column="C1" jdbcType="NVARCHAR" property="C1" />
<result column="C9" jdbcType="NVARCHAR" property="C9" />
<result column="T3" jdbcType="NVARCHAR" property="T3" />
</resultMap>
<sql id="Base_Column_List">
id, patient_id, inp_no, visit_id, name, sex, dept_name, discharge_date_time, ArchiveState,
@ -2191,4 +2195,28 @@
<select id="selectTime1" resultType="java.lang.Integer" parameterType="com.emr.entity.Archive_Master_Vo">
select flag from emr_holiday_set where date =#{dischargeDateTime1}
</select>
<select id="selectArchiveMasterVoAndExt" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap2">
select m.inp_no inpNo, m.visit_id visitId,m.name name,m.discharge_date_time dischargeDateTime,
ex.C1 C1, ex.C9 C9, ex.T3 T3
from archive_master m LEFT JOIN archive_other_ext ex on m.id = ex.MID
<where>
1=1
<if test="inpNo != null and inpNo != ''">
AND inp_no LIKE '%' + #{inpNo} + '%'
</if>
<if test="name != null and name != ''">
AND name LIKE '%' + #{name} + '%'
</if>
<if test="startDate != null and startDate != ''">
and m.discharge_date_time >= CONVERT(VARCHAR(10),#{startDate,jdbcType=NCHAR},120)
</if>
<if test="endDate != null and endDate != ''">
and m.discharge_date_time &lt;= #{endDate,jdbcType=NCHAR}+ ' 23:59:59'
</if>
</where>
</select>
</mapper>

@ -0,0 +1,285 @@
<%@ page import="java.util.ResourceBundle" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set value="${pageContext.request.contextPath}" var="path" scope="page"/>
<%
ResourceBundle res = ResourceBundle.getBundle("config.jdbc");
%>
<html>
<head>
<title>病案提交报表</title>
<meta charset="utf-8">
<!-- 解决部分兼容性问题如果安装了GCF则使用GCF来渲染页面如果未安装GCF则使用最高版本的IE内核进行渲染。 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!-- 页面按原比例显示 -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<%@include file="../../jspf/comm.jspf" %>
<link rel="shortcut icon" href="${path}/favicon.ico">
<style>
/* .divCss {
margin-top: 5px;
}*/
.divCss8 {
margin-top: 5px;
margin-right: 20px;
}
/* dataTables表头居中 */
/*.table > thead:first-child > tr:first-child > th {
text-align: center !important;
}*/
/**
*多选下拉框
*/
.bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn) {
width: 168px !important;
}
</style>
<script>
var path = "${path}";
</script>
</head>
<body>
<!--当前操作角色-->
<input type="hidden" id="checker">
<input type="hidden" id="flag" value="">
<div class="mainBody">
<div class="main">
<%-- <div class="headDiv">--%>
<%-- <div class="headSpanDiv">--%>
<%-- <span class="headspan">--%>
<%-- 病理数据报表--%>
<%-- </span>--%>
<%-- </div>--%>
<%-- </div>--%>
<div class="mainDiv">
<!--搜索-->
<form style="margin-top:5px;margin-bottom: 0!important;">
<div class="form-inline">
<div class="form-group divCss8">
<label for="inpNo">&emsp;住院号:</label>
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号" maxlength="25">
</div>
<%-- <div class="form-group divCss8">--%>
<%-- <label for="visitId">住院次数:</label>--%>
<%-- <input type="number" class="input-sm form-control" min="1" id="visitId" placeholder="请输入次数"--%>
<%-- maxlength="2">--%>
<%-- </div>--%>
<div class="form-group divCss8">
<label for="name">姓名:</label>
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名" maxlength="8">
</div>
<%-- <div class="form-group divCss8">--%>
<%-- <label>出院时间:</label>--%>
<%-- <div class="input-group input-daterange">--%>
<%-- <input type="text" class="input-sm form-control" name="start" id="startDateTo"--%>
<%-- maxlength="10" autocomplete="off"/>--%>
<%-- <span class="input-group-addon">-</span>--%>
<%-- <input type="text" class="input-sm form-control" name="end" id="endDateTo" maxlength="10"--%>
<%-- autocomplete="off"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<div class="form-group divCss8">
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtn">查询</button>
</div>
</div>
</form>
<!--数据表格-->
<div id="tableDiv">
<table id="table" class="table text-nowrap table-bordered"></table>
</div>
</div>
</div>
</div>
</body>
<script>
var tipLoad = 1;
function initTable() {
// if (tipLoad == 1) {
$("#table").bootstrapTable({ // 对应table标签的id
//method: 'POST',
// getPathologicalReportList
url: "${path}/pathological/getPathologicalReportList", // 获取表格数据的url
contentType: "application/x-www-form-urlencoded",//一种编码。好像在post请求的时候需要用到。这里用的get请求注释掉这句话也能拿到数据
//dataField: "data",//这是返回的json数组的key.默认是"rows".这里只有前后端约定好就行
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
striped: true, //表格显示条纹默认为false
pagination: true, // 在表格底部显示分页组件默认false
paginationShowPageGo: true,
pageList: [10, 20, 50, 100], // 如果设置了分页设置可供选择的页面数据条数。设置为All 则显示所有记录。
smartDisplay: false,
pageSize: 2, // 页面数据条数
pageNumber: 1, // 初始化加载第一页,默认第一页
sidePagination: 'server', // 设置为服务器端分页 客户端client
search: false,
showColumns: true,
// sortable: true,
// sortOrder: "asc",
toolbar: '#toolbar',//指定工具栏
searchOnEnterKey: true, //设置为 true时按回车触发搜索方法否则自动触发搜索方法
undefinedText: '---', //当数据为 undefined 时显示的字符
singleSelect: false,//设置True 将禁止多选
clickToSelect: true,//设置true 将在点击行时自动选择rediobox 和 checkbox
//height: 560, //定义表格的高度。
searchTimeOut: 500,// 默认500 设置搜索超时时间。
toolbarAlign: 'right',// 指定 toolbar 水平方向的位置。'left' 或 'right'
paginationDetailHAlign: 'left',//指定 分页详细信息 在水平方向的位置。'left' 或 'right'。
showHeader: true,//是否显示列头。
trimOnSearch: true,//设置为 true 将自动去掉搜索字符的前后空格。
//是否显示导出按钮
showExport: true,
//导出表格方式默认basic只导出当前页的表格数据all导出所有数据selected导出选中的数据
exportDataType: "basic",
//导出文件类型
exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel'],
exportOptions: {
fileName: document.title
},
queryParams: function (params) {
var currPageSize = this.pageSize;
if (currPageSize == 2) {
currPageSize = 10;
}
var limit= null;
var offset= params.offset;
//判断是否导出全部all
if ($("#sel_exportoption").val() == "all") {
offset=0;
limit=this.totalRows;
this.pageSize= limit;
}else{
limit = currPageSize;
this.pageSize = currPageSize;
}
var temp = {
limit: limit, //页面大小
offset: offset, //页码
order: params.order, //排位命令descasc
inpNo: "" + $("#inpNo").val(),
startDate: $("#startDate").val(),
endDate: $("#endDate").val(),
name: "" + $("#name").val()
};
return temp;
},
sortName: 'id', // 要排序的字段
sortOrder: 'desc', // 排序规则
columns: [{
title: '全选',
field: 'select', //复选框
checkbox: true,
width: 25,
align: 'center',
valign: 'middle'
},
{
title: '序号',
field: 'id',
align: 'center',
valign: 'middle',
//sortable: true,
// visible: false,
formatter: function (value, row, index) {
return index + 1;
}
},
{
title: '住院号',
field: 'inpNo',
align: 'left',
valign: 'middle'
},
{
title: '住院次数',
field: 'visitId',
align: 'left',
valign: 'middle'
},
{
title: '姓名',
field: 'name',
align: 'center',
valign: 'middle'
}, {
title: '出院时间',
field: 'dischargeDateTime',
align: 'center',
valign: 'middle'
},{
title: '病理号',
field: 'c1',
align: 'center',
valign: 'middle'
}, {
title: '报告名称',
field: 'c9',
align: 'center',
valign: 'middle'
}, {
title: '报告登记时间',
field: 't3',
align: 'center',
valign: 'middle'
},
],
onLoadSuccess: function (result) { //加载成功时执行
//console.info("加载成功");
tipLoad = 0;
},
onLoadError: function () { //加载失败时执行
//console.info("加载数据失败");
tipLoad = 0;
}
});
// }
}
//获取table的高度
function getHeight() {
return $(window).height() - 100;
}
initTable();
//查询
$('#searchBtn').click(function () {
// tipLoad = 0;
// initTable();
//查询之后重新从第一页算起
if (tipLoad == 0) {
$("#table").bootstrapTable("refreshOptions", {pageNumber: 1});
} else {
toastr.warning("正在查询,请稍等...");
}
//$(".selectpicker").selectpicker('deselectAll');
// $('#table').bootstrapTable('destroy');
//$('#table').bootstrapTable('refreshOptions', {limit: 1, offset: 10});
//刷新
//$('#table').bootstrapTable('refresh');
});
//2.初始化select的change事件
$("#sel_exportoption").change(function () {
$('#table').bootstrapTable('refreshOptions', {
exportDataType: $(this).val()
});
});
$("#refreshBtn").click(function () {
//刷新
$('#table').bootstrapTable('refresh');
});
</script>
</html>
Loading…
Cancel
Save