增加科室病案超期列表

master
zengwh 5 years ago
parent 03cb8ea8f4
commit 470d2e43a9

@ -5,6 +5,7 @@ import com.emr.service.ipml.RecordService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.ExportExcelUtil;
import com.emr.util.Msg;
import com.emr.vo.RecordSearch;
import com.emr.vo.SubmitRecord;
import com.emr.vo.SubmitRecordStatistics;
import com.github.pagehelper.Page;
@ -39,24 +40,24 @@ public class RecordController {
*/
@RequestMapping("getSubmitRecordList")
@ResponseBody
public OffsetLimitPage getSubmitRecordList(Integer offset, Integer limit,String startDate,String endDate,String deptName){
public OffsetLimitPage getSubmitRecordList(Integer offset,
Integer limit,
RecordSearch recordSearch){
if(offset != null && limit != null) {
PageHelper.offsetPage(offset, limit);
}
List<SubmitRecord> submitRecords = recordService.selectCountGroupDept(startDate,endDate,deptName);
List<SubmitRecord> submitRecords = recordService.selectCountGroupDept(recordSearch);
return new OffsetLimitPage((Page) submitRecords);
}
/**
*
* @param response
* @param startDate
* @param endDate
* @param deptName
*/
@ResponseBody
@RequestMapping(value = "/exportExcelSubmit")
public void exportExcelSubmit(HttpServletResponse response,String startDate,String endDate,String deptName){
public void exportExcelSubmit(HttpServletResponse response,
RecordSearch recordSearch){
String tableThNames = "科室名称,出院人数,医生已提交,医生未提交,医生提交率," +
"医生质控员已提交,医生质控员未提交,医生质控员提交率," +
"科主任已提交,科主任未提交,科主任提交率," +
@ -71,7 +72,7 @@ public class RecordController {
"headNurseCount,unHeadNurseCount,headNursePercent";
//构造excel的数据
try {
List<SubmitRecord> list = recordService.selectCountGroupDept(startDate, endDate, deptName);
List<SubmitRecord> list = recordService.selectCountGroupDept(recordSearch);
//文件名
String fileName = "病案提交统计" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
@ -84,6 +85,19 @@ public class RecordController {
}
}
/**
*
* @return
*/
@RequestMapping("deptOverTimeInfo")
public String deptOverTimeInfo(){
return "record/deptOverTimeInfo";
}
/**
*
* @return
*/
@RequestMapping("signedRecord")
public String signedRecord(){
return "record/signedRecord";
@ -94,40 +108,63 @@ public class RecordController {
*/
@RequestMapping("selectCount")
@ResponseBody
public Msg selectCount(String startDate,String endDate,String deptName) throws Exception{
SubmitRecordStatistics recordStatistics = recordService.selectCount(startDate, endDate, deptName);
public Msg selectCount(RecordSearch recordSearch) throws Exception{
SubmitRecordStatistics recordStatistics = recordService.selectCount(recordSearch);
return Msg.success().add("record",recordStatistics);
}
/**
*
*
*/
@RequestMapping("selectOvertimeCount")
@ResponseBody
public Msg selectOvertimeCount(RecordSearch recordSearch) throws Exception{
SubmitRecordStatistics recordStatistics = recordService.selectOvertimeCount(recordSearch);
return Msg.success().add("record",recordStatistics);
}
/* *//**
*
* @return
*//*
@RequestMapping("getRecordGroupDept")
@ResponseBody
public OffsetLimitPage getRecordGroupDept(Integer offset,
Integer limit,
RecordSearch recordSearch){
if(offset != null && limit != null) {
PageHelper.offsetPage(offset, limit);
}
List<SubmitRecord> submitRecords = recordService.selectCountGroupDept(recordSearch);
return new OffsetLimitPage((Page) submitRecords);
}*/
/**
*
* @return
*/
@RequestMapping("getSignedRecordList")
@ResponseBody
public OffsetLimitPage getSignedRecordList(Integer offset, Integer limit,String startDate,String endDate,String deptName,Integer dateFlag){
public OffsetLimitPage getSignedRecordList(Integer offset, Integer limit,RecordSearch recordSearch){
if(offset != null && limit != null) {
PageHelper.offsetPage(offset, limit);
}
List<SubmitRecordStatistics> submitRecords = recordService.getSignedRecordList(startDate,endDate,deptName,dateFlag);
List<SubmitRecordStatistics> submitRecords = recordService.getSignedRecordList(recordSearch);
return new OffsetLimitPage((Page) submitRecords);
}
/**
*
* @param response
* @param startDate
* @param endDate
* @param deptName
*/
@ResponseBody
@RequestMapping(value = "/exportExcelSigned")
public void exportExcelSigned(HttpServletResponse response,String startDate,String endDate,String deptName,Integer dateFlag){
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(startDate, endDate, deptName,dateFlag);
List<SubmitRecordStatistics> list = recordService.getSignedRecordList(recordSearch);
//文件名
String fileName = "病案室签收统计" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil

@ -242,12 +242,30 @@ public class beHospitaledController {
return "beHospitaledDir/timeLine";
}
/**
*
* @param deptName
* @return
* @throws Exception
*/
@RequestMapping("loadDoctorInCharge")
@ResponseBody
private Msg loadDoctorInCharge(String deptName) throws Exception{
List<Archive_Master> list = archiveMasterService.loadDoctorInCharge(deptName);
return Msg.success().add("list",list);
}
/**
*
* @return
* @throws Exception
*/
@RequestMapping("loadOverTimeDoctorInCharge")
@ResponseBody
private Msg loadOverTimeDoctorInCharge() throws Exception{
List<Archive_Master> list = archiveMasterService.loadOverTimeDoctorInCharge();
return Msg.success().add("list",list);
}
}

@ -51,4 +51,6 @@ public interface Archive_MasterMapper {
List<Archive_Master_Vo> selectDaysByMasterIds(List<Archive_Master_Vo> list);
List<Archive_Master> loadDoctorInCharge(@Param("deptName") String deptName);
List<Archive_Master> loadOverTimeDoctorInCharge();
}

@ -1,34 +1,20 @@
package com.emr.dao;
import com.emr.vo.RecordSearch;
import com.emr.vo.SubmitRecord;
import com.emr.vo.SubmitRecordStatistics;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface RecordMapper {
//查询分组科室数量
List<SubmitRecord> selectCountGroupDept(@Param("startDate")String startDate,
@Param("endDate")String endDate,
@Param("deptName")String deptName);
List<SubmitRecord> selectCountGroupDept(RecordSearch recordSearch);
//根据审核角色id和分组科室查询该科室完成份数
List<SubmitRecord> selectCountByRoleAndDeptName(@Param("startDate")String startDate,
@Param("endDate")String endDate,
@Param("deptName")String deptName,
@Param("roleId")Integer roleId,
@Param("backRoleId")Integer backRoleId);
List<SubmitRecord> selectCountByRoleAndDeptName(RecordSearch recordSearch);
//根据科室分组查询护士长审核份数
List<SubmitRecord> selectCountWithHeadNurse(@Param("startDate")String startDate,
@Param("endDate")String endDate,
@Param("deptName")String deptName);
List<SubmitRecord> selectCountWithHeadNurse(RecordSearch recordSearch);
//统计总病历数,已提交数,已归档数,已采集完整数
SubmitRecordStatistics selectCount(@Param("startDate")String startDate,
@Param("endDate")String endDate,
@Param("deptName")String deptName);
SubmitRecordStatistics selectCount(RecordSearch recordSearch);
//按日期分组查询出院人数,归档情况,提交情况,资料完整情况
List<SubmitRecordStatistics> selectCountWithDate(@Param("startDate")String startDate,
@Param("endDate")String endDate,
@Param("deptName")String deptName,
@Param("dateFlag")Integer dateFlag);
List<SubmitRecordStatistics> selectCountWithDate(RecordSearch recordSearch);
}

@ -13,7 +13,6 @@ import com.emr.entity.OffsetLimitPage;
import com.emr.util.Msg;
import java.util.List;
import java.util.Map;
public interface Archive_MasterService {
/**
@ -116,6 +115,8 @@ public interface Archive_MasterService {
List<Archive_Master_Vo> selectLastVerifyList(Archive_Master_Vo archiveMasterVo);
List<Archive_Master> loadDoctorInCharge(String deptName);
List<Archive_Master> loadOverTimeDoctorInCharge();
}

@ -282,6 +282,11 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
return archiveMasterMapper.loadDoctorInCharge(deptName);
}
@Override
public List<Archive_Master> loadOverTimeDoctorInCharge() {
return archiveMasterMapper.loadOverTimeDoctorInCharge();
}
/**
*
* 退

@ -3,6 +3,7 @@ package com.emr.service.ipml;
import com.emr.dao.Emr_DictionaryMapper;
import com.emr.dao.RecordMapper;
import com.emr.entity.Emr_Dictionary;
import com.emr.vo.RecordSearch;
import com.emr.vo.SubmitRecord;
import com.emr.vo.SubmitRecordStatistics;
import org.apache.commons.lang3.StringUtils;
@ -20,36 +21,58 @@ public class RecordService {
private Emr_DictionaryMapper dictionaryMapper;
/**
*
* @param startDate
* @param endDate
* @param deptName
* @return
*/
public List<SubmitRecord> selectCountGroupDept(String startDate,String endDate,String deptName){
public List<SubmitRecord> selectCountGroupDept(RecordSearch recordSearch){
Integer infoId = recordSearch.getInfoId();
if(null != infoId){
//有按审核角色查询
if(infoId < 5){
//医生支线
recordSearch.setOperRole(1);
}else if(infoId == 5 || infoId == 6){
//护士支线
recordSearch.setOperRole(2);
}else if(infoId == 8){
recordSearch.setOperRole(4);
}
}
//按科室查询总出院人数
List<SubmitRecord> submitRecords = recordMapper.selectCountGroupDept(startDate,endDate,deptName);
List<SubmitRecord> submitRecords = recordMapper.selectCountGroupDept(recordSearch);
if(!CollectionUtils.isEmpty(submitRecords)) {
//获取科室集合
String deptNames = getDepts(submitRecords);
recordSearch.setDeptName(deptNames);
//查询医生该科室审核份数
int roleId = 2;
int backRoleId = 9;
List<SubmitRecord> doctorSubmitList = recordMapper.selectCountByRoleAndDeptName(startDate,endDate,deptNames, roleId, backRoleId);
String backRoleId = "9";
recordSearch.setRoleId(roleId);
recordSearch.setBackRoleId(backRoleId);
List<SubmitRecord> doctorSubmitList = recordMapper.selectCountByRoleAndDeptName(recordSearch);
//查询医生质控员该科室审核份数
roleId = 3;
List<SubmitRecord> doctorCheckList = recordMapper.selectCountByRoleAndDeptName(startDate,endDate,deptNames, roleId, backRoleId);
recordSearch.setRoleId(roleId);
List<SubmitRecord> doctorCheckList = recordMapper.selectCountByRoleAndDeptName(recordSearch);
//查询科主任该科室审核份数
roleId = 4;
List<SubmitRecord> directorCheckList = recordMapper.selectCountByRoleAndDeptName(startDate,endDate,deptNames, roleId, backRoleId);
recordSearch.setRoleId(roleId);
List<SubmitRecord> directorCheckList = recordMapper.selectCountByRoleAndDeptName(recordSearch);
//查询护士审核份数
roleId = 5;
backRoleId = 10;
List<SubmitRecord> nurseList = recordMapper.selectCountByRoleAndDeptName(startDate,endDate,deptNames, roleId, backRoleId);
backRoleId = "10";
recordSearch.setRoleId(roleId);
recordSearch.setBackRoleId(backRoleId);
List<SubmitRecord> nurseList = recordMapper.selectCountByRoleAndDeptName(recordSearch);
//查询护士质控员审核份数
roleId = 6;
List<SubmitRecord> nurseCheckList = recordMapper.selectCountByRoleAndDeptName(startDate,endDate,deptNames, roleId, backRoleId);
recordSearch.setRoleId(roleId);
List<SubmitRecord> nurseCheckList = recordMapper.selectCountByRoleAndDeptName(recordSearch);
//护士长
List<SubmitRecord> headNurseList = recordMapper.selectCountWithHeadNurse(startDate,endDate,deptNames);
roleId = 7;
backRoleId = "'9','10'";
recordSearch.setRoleId(roleId);
recordSearch.setBackRoleId(backRoleId);
List<SubmitRecord> headNurseList = recordMapper.selectCountByRoleAndDeptName(recordSearch);
//填充各个角色数据
selectList(submitRecords,doctorSubmitList,doctorCheckList,directorCheckList,nurseList,nurseCheckList,headNurseList);
}
@ -73,140 +96,74 @@ public class RecordService {
List<SubmitRecord> nurseCheckList,
List<SubmitRecord> headNurseList) {
for (SubmitRecord obj:submitRecords) {
//计算医生
//定义医生是否匹配的科室
boolean doctorFlag = false;
if(!CollectionUtils.isEmpty(doctorSubmitList)) {
for (SubmitRecord objTemp : doctorSubmitList) {
if (obj.getDeptName().equals(objTemp.getDeptName())) {
int count = objTemp.getCount();
int unCount = obj.getCount() - count;
int countPercent = Math.round(count * 100 / obj.getCount());
obj.setDoctorSubmitCount(count);
obj.setUnDoctorSubmitCount(unCount);
obj.setDoctorSubmitPercent(countPercent + "%");
doctorFlag = true;
break;
}
}
}
//未匹配上科室置0
if(!doctorFlag){
obj.setDoctorSubmitCount(0);
obj.setUnDoctorSubmitCount(obj.getCount());
obj.setDoctorSubmitPercent(0 + "%");
}
String deptName = obj.getDeptName();
int count = obj.getCount();
if(count > 0) {
//医生提交
int doctorSubmitCount = getSubmitOrUnSubmit(doctorSubmitList, deptName);
obj.setUnDoctorSubmitCount(count - doctorSubmitCount);
obj.setDoctorSubmitCount(doctorSubmitCount);
obj.setDoctorSubmitPercent(Math.round(doctorSubmitCount * 100 / count) + "%");
//计算医生质控员
//定义医生指控员是否匹配的科室
boolean doctorCheckFlag = false;
for (SubmitRecord objTemp:doctorCheckList) {
if(obj.getDeptName().equals(objTemp.getDeptName())){
int count = objTemp.getCount();
int unCount = obj.getCount() - count;
int countPercent = Math.round(count * 100 / obj.getCount());
obj.setDoctorCheckCount(count);
obj.setUnDoctorCheckCount(unCount);
obj.setDoctorCheckPercent(countPercent + "%");
doctorCheckFlag = true;
break;
}
}
//未匹配上科室置0
if(!doctorCheckFlag){
obj.setDoctorCheckCount(0);
obj.setUnDoctorCheckCount(obj.getCount());
obj.setDoctorCheckPercent(0 + "%");
}
//计算科主任
//定义科主任是否匹配的科室
boolean directorCheckFlag = false;
for (SubmitRecord objTemp:directorCheckList) {
if(obj.getDeptName().equals(objTemp.getDeptName())){
int count = objTemp.getCount();
int unCount = obj.getCount() - count;
int countPercent = Math.round(count * 100 / obj.getCount());
obj.setDirectorCheckCount(count);
obj.setUnDirectorCheckCount(unCount);
obj.setDirectorCheckPercent(countPercent + "%");
directorCheckFlag = true;
break;
}
}
//未匹配上科室置0
if(!directorCheckFlag){
obj.setDirectorCheckCount(0);
obj.setUnDirectorCheckCount(obj.getCount());
obj.setDirectorCheckPercent(0 + "%");
}
//医生质控员提交
int doctorCheckCount = getSubmitOrUnSubmit(doctorCheckList, deptName);
obj.setUnDoctorCheckCount(doctorSubmitCount - doctorCheckCount);
obj.setDoctorCheckCount(doctorCheckCount);
obj.setDoctorCheckPercent(Math.round(doctorCheckCount * 100 / count) + "%");
//计算护士
//定义护士是否匹配的科室
boolean nurseFlag = false;
for (SubmitRecord objTemp:nurseList) {
if(obj.getDeptName().equals(objTemp.getDeptName())){
int count = objTemp.getCount();
int unCount = obj.getCount() - count;
int countPercent = Math.round(count * 100 / obj.getCount());
obj.setNurseSubmitCount(count);
obj.setUnNurseSubmitCount(unCount);
obj.setNurseSubmitPercent(countPercent + "%");
nurseFlag = true;
break;
}
}
//未匹配上科室置0
if(!nurseFlag){
obj.setNurseSubmitCount(0);
obj.setUnNurseSubmitCount(obj.getCount());
obj.setNurseSubmitPercent(0 + "%");
}
//科主任提交
int directorCheckCount = getSubmitOrUnSubmit(directorCheckList, deptName);
obj.setUnDirectorCheckCount(doctorCheckCount - directorCheckCount);
obj.setDirectorCheckCount(directorCheckCount);
obj.setDirectorCheckPercent(Math.round(directorCheckCount * 100 / count) + "%");
//护士未提交
//护士提交
int nurseSubmitCount = getSubmitOrUnSubmit(nurseList, deptName);
obj.setUnNurseSubmitCount(count - nurseSubmitCount);
obj.setNurseSubmitCount(nurseSubmitCount);
obj.setNurseSubmitPercent(Math.round(nurseSubmitCount * 100 / count) + "%");
//护士质控员提交
int nurseCheckCount = getSubmitOrUnSubmit(nurseCheckList, deptName);
obj.setUnNurseCheckCount(nurseSubmitCount - nurseCheckCount);
obj.setNurseCheckCount(nurseCheckCount);
obj.setNurseCheckPercent(Math.round(nurseCheckCount * 100 / count) + "%");
//计算护士质控员
//定义护士质控员是否匹配的科室
boolean nurseCheckFlag = false;
for (SubmitRecord objTemp:nurseCheckList) {
if(obj.getDeptName().equals(objTemp.getDeptName())){
int count = objTemp.getCount();
int unCount = obj.getCount() - count;
int countPercent = Math.round(count * 100 / obj.getCount());
obj.setNurseCheckCount(count);
obj.setUnNurseCheckCount(unCount);
obj.setNurseCheckPercent(countPercent + "%");
nurseCheckFlag = true;
break;
//护士长提交
int headNurseCount = getSubmitOrUnSubmit(headNurseList, deptName);
//定义护士长前提交数量,医生和护士之前的最后一个节点都提交的数量。取科主任和护士质控员中小的值
int beforeHeadNurse = 0;
if(directorCheckCount < nurseCheckCount){
beforeHeadNurse = directorCheckCount;
}else{
beforeHeadNurse = nurseCheckCount;
}
//护士长未提交等于提交上来的减去护士上长自己提交的
obj.setUnHeadNurseCount(beforeHeadNurse - headNurseCount);
obj.setHeadNurseCount(headNurseCount);
obj.setHeadNursePercent(Math.round(headNurseCount * 100 / count) + "%");
}
//未匹配上科室置0
if(!nurseCheckFlag){
obj.setNurseCheckCount(0);
obj.setUnNurseCheckCount(obj.getCount());
obj.setNurseCheckPercent(0 + "%");
}
}
}
//定义护士长是否匹配的科室
boolean headNurseFlag = false;
//计算护士长
for (SubmitRecord objTemp : headNurseList) {
if (obj.getDeptName().equals(objTemp.getDeptName())) {
int count = objTemp.getCount();
int unCount = obj.getCount() - count;
int countPercent = Math.round(count * 100 / obj.getCount());
obj.setHeadNurseCount(count);
obj.setUnHeadNurseCount(unCount);
obj.setHeadNursePercent(countPercent + "%");
headNurseFlag = true;
break;
/**
*
* @param list
* @param deptName
* @return
*/
private int getSubmitOrUnSubmit(List<SubmitRecord> list,String deptName){
int submitCount = 0;
if(!CollectionUtils.isEmpty(list)) {
for (SubmitRecord objTemp : list) {
if (deptName.equals(objTemp.getDeptName())) {
return objTemp.getCount();
}
}
//未匹配上科室置0
if(!headNurseFlag) {
obj.setHeadNurseCount(0);
obj.setUnHeadNurseCount(obj.getCount());
obj.setHeadNursePercent("0%");
}
}
return submitCount;
}
/**
@ -230,13 +187,10 @@ public class RecordService {
/**
*
* @param startDate
* @param endDate
* @param deptName
* @return
*/
public SubmitRecordStatistics selectCount(String startDate,String endDate,String deptName) {
SubmitRecordStatistics record = recordMapper.selectCount(startDate, endDate, deptName);
public SubmitRecordStatistics selectCount(RecordSearch recordSearch) {
SubmitRecordStatistics record = recordMapper.selectCount(recordSearch);
//计算百分比并赋值
SetStatisticsPercent(record);
return record;
@ -244,14 +198,12 @@ public class RecordService {
/**
*
* @param startDate
* @param endDate
* @param deptName
* @return
*/
public List<SubmitRecordStatistics> getSignedRecordList(String startDate, String endDate, String deptName,Integer dateFlag) {
List<SubmitRecordStatistics> list = recordMapper.selectCountWithDate(startDate, endDate, deptName,dateFlag);
public List<SubmitRecordStatistics> getSignedRecordList(RecordSearch recordSearch) {
List<SubmitRecordStatistics> list = recordMapper.selectCountWithDate(recordSearch);
String deptNameCn = "全部";
String deptName = recordSearch.getDeptName();
if(StringUtils.isNotBlank(deptName)){
Emr_Dictionary dictionary = new Emr_Dictionary();
dictionary.setCode(deptName);
@ -287,4 +239,43 @@ public class RecordService {
record.setCount3Percent("0%");
}
}
public SubmitRecordStatistics selectOvertimeCount(RecordSearch recordSearch) {
//查询超期记录数
List<SubmitRecord> submitRecords = selectCountGroupDept(recordSearch);
//定义接收返回对象
SubmitRecordStatistics recordStatistics = new SubmitRecordStatistics();
if(!CollectionUtils.isEmpty(submitRecords)){
//计算
//定义总超期数
int allCount = 0;
//定义医生总超期数
int count1 = 0;
int count2 = 0;
int count3 = 0;
int count4 = 0;
int count5 = 0;
int count6 = 0;
for(SubmitRecord record : submitRecords){
allCount += record.getCount();
count1 += record.getDoctorSubmitCount();
count2 += record.getDoctorCheckCount();
count3 += record.getHeadNurseCount();
count4 += record.getNurseSubmitCount();
count5 += record.getNurseCheckCount();
count6 += record.getHeadNurseCount();
}
recordStatistics.setAllCount(allCount);
recordStatistics.setCount1Percent(Math.round(count1 * 100 / allCount) + "%");
recordStatistics.setCount2Percent(Math.round(count2 * 100 / allCount) + "%");
recordStatistics.setCount3Percent(Math.round(count3 * 100 / allCount) + "%");
recordStatistics.setCount4Percent(Math.round(count4 * 100 / allCount) + "%");
recordStatistics.setCount5Percent(Math.round(count5 * 100 / allCount) + "%");
recordStatistics.setCount6Percent(Math.round(count6 * 100 / allCount) + "%");
int count7 = allCount - count6;
recordStatistics.setCount7Percent(Math.round(count7 * 100 / allCount) + "%");
}
return recordStatistics;
}
}

@ -0,0 +1,54 @@
package com.emr.vo;
import lombok.Data;
@Data
public class RecordSearch {
/**
*
*/
private String startDate;
/**
*
*/
private String endDate;
/**
*
*/
private String deptName;
/**
* flag=2
*/
private Integer flag;
/**
*
*/
private String doctorInCharge;
/**
*
*/
private Integer roleId;
/**
* id
*/
private Integer infoId;
/**
* 退id
*/
private String backRoleId;
/**
* 1线 2线 4
*/
private Integer operRole;
/**
* 123
*/
private Integer dateFlag;
}

@ -31,4 +31,6 @@ public class SubmitRecord {
private Integer headNurseCount;
private Integer unHeadNurseCount;
private String headNursePercent;
private Integer unRecordRoomCount;
}

@ -11,6 +11,10 @@ public class SubmitRecordStatistics {
private String count1Percent;//总提交率
private String count2Percent;//总归档率
private String count3Percent;//总采集完整率
private String count4Percent;//总提交率4
private String count5Percent;//总提交率5
private String count6Percent;//总提交率6
private String count7Percent;//总提交率7
private String disDate;//出院日期格式yyyy-MM-dd
private String deptNameCn;//科室
}

@ -1086,4 +1086,21 @@
ORDER BY
DOCTOR_IN_CHARGE
</select>
<!--根据科室权限查询主管医生列表-->
<select id="loadOverTimeDoctorInCharge" resultMap="BaseResultMap">
SELECT
DOCTOR_IN_CHARGE
FROM
v_overtime_record
WHERE
DOCTOR_IN_CHARGE != ''
<if test="deptName != null and deptName != ''">
AND dept_name IN ( ${deptName} )
</if>
GROUP BY
DOCTOR_IN_CHARGE
ORDER BY
DOCTOR_IN_CHARGE
</select>
</mapper>

@ -5,6 +5,12 @@
<resultMap id="BaseResultMap1" type="com.emr.vo.SubmitRecordStatistics"></resultMap>
<!---查询时间段-->
<sql id="selectByDate">
<if test="flag != null and flag == 2">
<include refid="overTimeWhereSql"></include>
<if test="doctorInCharge != null and doctorInCharge != ''">
AND archive_master.DOCTOR_IN_CHARGE in (${doctorInCharge})
</if>
</if>
AND CONVERT(varchar(10),archive_master.discharge_date_time, 23) != '1801-02-03'
<if test="deptName != null and deptName != ''">
AND archive_master.dept_name in (${deptName})
@ -73,7 +79,7 @@
</choose>
</sql>
<!---查询分组科室数量-->
<select id="selectCountGroupDept" resultMap="BaseResultMap">
<select id="selectCountGroupDept" resultMap="BaseResultMap" parameterType="com.emr.vo.RecordSearch">
SELECT
dept_name deptName,
COUNT( archive_master.id ) count,
@ -82,7 +88,9 @@
archive_master
INNER JOIN emr_dictionary ON archive_master.dept_name = emr_dictionary.CODE
AND emr_dictionary.parent_id = 'dept_code'
<include refid="selectByInfo"></include>
<where>
<!--只查超期-->
<include refid="selectByDate"></include>
</where>
GROUP BY
@ -92,36 +100,220 @@
ORDER BY
emr_dictionary.CODE
</select>
<!--过滤超期条件语句-->
<sql id="overTimeWhereSql">
and datediff(
DAY,
discharge_date_time,
CASE
WHEN ArchiveState = 128 THEN
checked_datetime
ELSE
getDate ()
END
) - (
SELECT
COUNT(1)
FROM
emr_holiday_set
WHERE
date BETWEEN CONVERT (
VARCHAR (10),
discharge_date_time,
120
)
AND CASE
WHEN ArchiveState = 128 THEN
checked_datetime
ELSE
getDate ()
END
AND flag = 2
) - (
SELECT
CASE
WHEN DISCHARGE_DISPOSITION = 5 THEN
dead_days
ELSE
days
END
FROM
emr_overtime_set
WHERE
id = 1
) > 0
</sql>
<!--根据审核角色id和分组科室查询该科室完成份数-->
<select id="selectCountByRoleAndDeptName" resultMap="BaseResultMap">
<select id="selectCountByRoleAndDeptName" resultMap="BaseResultMap" parameterType="com.emr.vo.RecordSearch">
SELECT
archive_master.dept_name,
sum( CASE WHEN ISNULL( t1.createtime, 0 ) > ISNULL( t2.createtime, 0 ) THEN 1 ELSE 0 END ) count
FROM
( SELECT master_id, MAX( createtime ) createtime FROM archive_flow_info WHERE start_step_id = ${roleId} GROUP BY master_id ) t1
LEFT JOIN ( SELECT master_id, MAX( createtime ) createtime FROM archive_flow_info WHERE target_step_id = ${backRoleId} GROUP BY master_id ) t2 ON t1.master_id = t2.master_id
( SELECT master_id, MAX( createtime ) createtime FROM archive_flow_info WHERE start_step_id = #{roleId} GROUP BY master_id ) t1
LEFT JOIN ( SELECT master_id, MAX( createtime ) createtime FROM archive_flow_info WHERE target_step_id in (${backRoleId}) GROUP BY master_id ) t2 ON t1.master_id = t2.master_id
INNER JOIN archive_master ON t1.master_id = archive_master.id
<include refid="selectByInfo"></include>
<where>
<include refid="selectByDate"></include>
</where>
GROUP BY
dept_name
</select>
<!--按待审核节点-->
<sql id="selectByInfo">
<if test="infoId != null">
<choose>
<!--医生和护士-->
<when test="infoId == 2 or infoId == 5">
INNER JOIN (
SELECT
archive_master.id
FROM
archive_master
LEFT JOIN (
SELECT
master_id,
start_step_id
FROM
archive_flow_info
WHERE
start_step_id = #{infoId}
GROUP BY
master_id,
start_step_id
) archive_flow_info ON archive_master.id = archive_flow_info.master_id
WHERE
archive_flow_info.start_step_id IS NULL
<!--只查超期-->
<include refid="selectByDate"></include>
UNION ALL
SELECT
archive_flow_info.master_id id
FROM
archive_flow_info
INNER JOIN (
SELECT
master_id,
MAX(createtime) createtime
FROM
archive_flow_info
WHERE
oper_role = #{operRole}
GROUP BY
master_id
) archive_flow_info1 ON archive_flow_info.master_id = archive_flow_info1.master_id
AND archive_flow_info.createtime = archive_flow_info1.createtime
WHERE
archive_flow_info.target_step_id =
<if test="infoId == 2">9</if>
<if test="infoId == 5">10</if>
) temp ON archive_master.id = temp.id
</when>
<!--护士长-->
<when test="infoId == 7">
INNER JOIN (
SELECT
archive_flow_info.master_id
FROM
archive_flow_info
INNER JOIN (
SELECT
master_id,
MAX(createtime) createtime
FROM
archive_flow_info
GROUP BY
master_id,
oper_role
) temp ON archive_flow_info.master_id = temp.master_id
AND archive_flow_info.createtime = temp.createtime
WHERE
archive_flow_info.target_step_id = 7
GROUP BY
archive_flow_info.master_id
HAVING
(
COUNT(
archive_flow_info.master_id
)
) = 2
) archive_flow_info ON archive_flow_info.master_id = archive_master.id
AND archive_master.ArchiveState != '64'
</when>
<!---其他-->
<otherwise>
INNER JOIN (
SELECT
archive_flow_info.master_id
FROM
archive_flow_info
INNER JOIN (
SELECT
master_id,
MAX(createtime) createtime
FROM
archive_flow_info
WHERE
oper_role = #{operRole}
GROUP BY
master_id
) archive_flow_info1 ON archive_flow_info.master_id = archive_flow_info1.master_id
AND archive_flow_info.createtime = archive_flow_info1.createtime
AND archive_flow_info.target_step_id = #{infoId}
) t3 ON archive_master.id = t3.master_id
</otherwise>
</choose>
</if>
</sql>
<!--&lt;!&ndash;根据审核角色id和分组科室查询该科室完成份数&ndash;&gt;
<select id="selectUnCountByRoleAndDeptName" resultMap="BaseResultMap" parameterType="com.emr.vo.RecordSearch">
SELECT
dept_name,
count(archive_master.id) count
FROM
archive_master
INNER JOIN (
SELECT
archive_flow_info1.master_id
FROM
archive_flow_info
INNER JOIN (
SELECT
master_id,
MAX(createtime) createtime
FROM
archive_flow_info
WHERE
oper_role = #{operRole}
GROUP BY
master_id
) archive_flow_info1 ON archive_flow_info.master_id = archive_flow_info1.master_id
AND archive_flow_info.createtime = archive_flow_info1.createtime
WHERE
archive_flow_info.target_step_id = #{roleId}
) archive_flow_info ON archive_master.id = archive_flow_info.master_id
<where>
<include refid="selectByDate"></include>
</where>
GROUP BY
dept_name
</select>-->
<!--根据科室分组查询护士长审核份数-->
<select id="selectCountWithHeadNurse" resultMap="BaseResultMap">
<!-- <select id="selectCountWithHeadNurse" resultMap="BaseResultMap" parameterType="com.emr.vo.RecordSearch">
SELECT
dept_name deptName,
COUNT( id ) count
archive_master.dept_name deptName,
COUNT( archive_master.id ) count
FROM
archive_master
<include refid="selectByInfo"></include>
WHERE
(ArchiveState = '64' or ArchiveState = '128' or ArchiveState = '1024')
<include refid="selectByDate"></include>
GROUP BY
dept_name
</select>
archive_master.dept_name
</select>-->
<!--统计总病历数,已提交数,已归档数,已采集完整数-->
<select id="selectCount" resultType="com.emr.vo.SubmitRecordStatistics">
<select id="selectCount" resultType="com.emr.vo.SubmitRecordStatistics" parameterType="com.emr.vo.RecordSearch">
SELECT
( SELECT COUNT( 1 ) FROM archive_master
<where>
@ -181,7 +373,7 @@
</select>
<!--按日期分组查询出院人数,归档情况,提交情况,资料完整情况-->
<select id="selectCountWithDate" resultMap="BaseResultMap1">
<select id="selectCountWithDate" resultMap="BaseResultMap1" parameterType="com.emr.vo.RecordSearch">
SELECT
isnull( t1.count, 0 ) allCount,
t1.disDate,

@ -0,0 +1,138 @@
<%@ 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"/>
<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>
.divCss8 {
margin-top: 5px;
margin-right: 20px;
}
/**
*多选下拉框
*/
.bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn) {
width: 168px !important;
}
.table>tbody>tr>td {
border: 0px;
text-align: center;
}
.bootstrap-table .table thead>tr>th {
text-align: center;
}
</style>
<script>
var path = "${path}";
</script>
</head>
<body>
<%--<!--定义加载的层级数-->
<input type="hidden" id="level" value="${level}">
<!--初始化加载科室选中-->
<input type="hidden" id="searchDeptName" value="${record.deptName}">
<!--第三层初始化按科室查-->
<input type="hidden" id="searchDeptNameTemp">
<input type="hidden" id="timeIntervalTemp" value="${record.timeInterval}">--%>
<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>主管医生:</label>
<select class="selectpicker bla bla bli" multiple data-live-search="true" data-actions-box="true"
id="doctorInCharge" title="请输入主管医生">
<option value="">全部</option>
</select>
</div>
<div class="form-group divCss8">
<label>出院日期:</label>
<div class="input-group">
<input type="text" class="input-sm form-control" id="startTime1" style="text-align: center"
maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" id="endTime1" style="text-align: center"
maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss">
<label>出院时段:</label>
<select class="form-control input-sm" id="timeInterval"
onchange="loadTableByTime(this.options[this.options.selectedIndex].value,'startTime1','endTime1','table')">
</select>
</div>
<div class="form-group divCss8">
<label>出院科室:</label>
<select class="selectpicker bla bla bli" multiple data-live-search="true" data-actions-box="true" name="deptName"
id="deptName"
title="请选择出院科室">
</select>
</div>
<div class="form-group divCss8">
<label>审核节点:</label>
<select class="form-control input-sm" id="infoId">
<option value="">全部</option>
<option value="2">医生提交</option>
<option value="3">医生质控员质控</option>
<option value="4">科主任审核</option>
<option value="5">护士提交</option>
<option value="6">护士质控员质控</option>
<option value="7">护士长审核</option>
<option value="8">病案室审核</option>
</select>
</div>
<%--<div class="form-group divCss8">
<label>患者姓名:</label>
<input type="text" class="form-control input-sm" id="name" maxlength="8">
</div>
<div class="form-group divCss8">
<label>&emsp;住院号:</label>
<input type="text" class="form-control input-sm" id="inpNo" maxlength="25">
</div>--%>
<div class="form-group divCss8">
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtnStatistics">查询</button>
<button type="button" class="btn btn-info btn-sm divCss" id="excelBtn">条件导出</button>
</div>
</div>
</form>
<div class="col-md-12" style="text-align: center;">
<p>超期份数&nbsp;<span style="color:red" id="allCount">0</span>&nbsp;份,
其中医生已提交&nbsp;<span style="color:red" id="count1Percent">0%</span>&nbsp;,
医生质控员已提交&nbsp;<span style="color:red" id="count2Percent">0%</span>&nbsp;,
科主任已提交&nbsp;<span style="color:red" id="count3Percent">0%</span>&nbsp;,
护士已提交&nbsp;<span style="color:red" id="count4Percent">0%</span>&nbsp;,
护士质控员已提交&nbsp;<span style="color:red" id="count5Percent">0%</span>&nbsp;,
护士长已提交&nbsp;<span style="color:red" id="count6Percent">0%</span>&nbsp;
病案室已提交&nbsp;<span style="color:red" id="count7Percent">0%</span>&nbsp;;
</p>
</div>
<!--数据表格-->
<div id="tableDiv">
<table id="table" class="table text-nowrap table-bordered"></table>
</div>
</div>
</div>
</div>
<script src="${path}/static/js/statistics/getDeptCommom.js?time=2020-08-18"></script>
<script src="${path}/static/js/statistics/statisticsCommom.js?t=2020-07-24"></script>
<script src="${path}/static/js/record/deptOverTimeInfo.js?time=2020-08-21"></script>
</body>
</html>

@ -13,6 +13,22 @@ function setFormToken(){
}
})
}
//根据多选下拉框id获取多选下拉框选中的值
function getSelecteds(id){
var arr = $("#"+id).val();
var values = '';
if(arr != undefined && arr.length > 0){
for (var i = 0; i < arr.length; i++) {
if(arr[i] != ''){
if(values != ''){
values += ',';
}
values += "'" + arr[i] + "'";
}
}
}
return values;
}
//加载科室
//flag=1显示全部科室 flag=2显示过滤科室
function getDept() {

@ -40,22 +40,7 @@ function loadDoctorInCharge(){
}
})
}
//根据多选下拉框id获取多选下拉框选中的值
function getSelecteds(id){
var arr = $("#"+id).val();
var values = '';
if(arr != undefined && arr.length > 0){
for (var i = 0; i < arr.length; i++) {
if(arr[i] != ''){
if(values != ''){
values += ',';
}
values += "'" + arr[i] + "'";
}
}
}
return values;
}
//退回按钮
function returnInfo(status,targetCode,id){
//重新生成formToken

@ -0,0 +1,651 @@
var tipLoad = 0;
var url = path + '/statistics/recordStatistics/';
//定义表格内容最大高度
var maxHeight = 0;
$(function(){
//加载科室内主管医生列表
loadOverTimeDoctorInCharge();
//加载科室
getDeptStatistics();
//加载病案统计
selectOvertimeCount();
})
//加载科室内主管医生列表
function loadOverTimeDoctorInCharge(){
$.ajax({
type:'get',
url:path+'/beHosp/loadOverTimeDoctorInCharge',
success:function(data){
$("#doctorInCharge").empty();
if(data.code == 100){
var html = '';
var list = data.extend.list;
if(list != null && list != ''){
for (var i = 0; i < list.length; i++) {
var name = list[i].doctorInCharge;
var py = makePy(name);
var pingyin = ConvertPinyin(name);
html += '<option data-tokens="' + name + '|' + py[0] + '|' + pingyin + '" value="' + name + '">' + name + '</option>';
}
}
$("#doctorInCharge").append(html);
}
$(".selectpicker").selectpicker('refresh');
}
})
}
//加载病案统计
function selectOvertimeCount(){
$.ajax({
type:'get',
url:path+'/record/selectOvertimeCount',
dataType:'json',
data:{
startDate: $("#startTime1").val(),
endDate: $("#endTime1").val(),
deptName:getDeptName(),
flag:2,
doctorInCharge:getSelecteds("doctorInCharge"),
infoId: $("#infoId").val()
},
success:function(data){
if(data.code == 100){
var record = data.extend.record;
$("#allCount").text(record.allCount);
setSubmitPercent('count1Percent',record.count1Percent);
setSubmitPercent('count2Percent',record.count2Percent);
setSubmitPercent('count3Percent',record.count3Percent);
setSubmitPercent('count4Percent',record.count4Percent);
setSubmitPercent('count5Percent',record.count5Percent);
setSubmitPercent('count6Percent',record.count6Percent);
setSubmitPercent('count7Percent',record.count7Percent);
}else{
toastr.error(data.msg);
}
}
})
}
//组织提交率并判断颜色
function setSubmitPercent(pId,value){
$("#"+pId).text(value);
var countPercentTemp = value.substring(0,value.length-1);
var color = '';
if(countPercentTemp >= 80){
//颜色呈绿色
color = "green";
}else{
//颜色呈红色
color = "red";
}
$("#"+pId).css("color",color);
}
//出院时段触发查询
function loadTableByTime(value,startDateId,endDateId,tableId){
//填空出院日期搜索框并立即查询
//开始日期id
var startDateDocument = $("#"+startDateId);
//结束日期id
var endDateDocument = $("#"+endDateId);
switch (value) {
case '':
//不限
startDateDocument.val("");
break;
case '1':
//3天内
//开始日期为3天前getHisDay
startDateDocument.val(getHisDay(3));
break;
case '2':
//7天内
//开始日期为7天前getHisDay
startDateDocument.val(getHisDay(7));
break;
case '3':
//1个月内
//开始日期为1个月前
startDateDocument.val(getPreMonthToday());
break;
case '4':
//3个月内
//开始日期为6个月前
startDateDocument.val(getPreMonthDay(getNowDay(),3));
break;
}
if(value != ''){
//非不限结束日期均为今天
//结束时间为今天
endDateDocument.val(getNowDay());
}else{
//结束时间为今天
endDateDocument.val("");
}
$("#"+tableId).bootstrapTable("refreshOptions", {pageNumber: 1});
//加载病案统计
selectOvertimeCount();
}
//加载科室
function getDeptStatistics() {
//获取科室列表
$.ajax({
url: path+"/inHosp/getDept",
type: "POST",
data: {effective: 1, typecode: "dept_code"},
success: function (result) {
if (result != null) {
var html = '';
for (var i = 0; i < result.length; i++) {
//定义是否包含默认需要选中的
var name = result[i].name;
var py = makePy(name);
var pingyin = ConvertPinyin(name);
html += '<option data-tokens="' + name + '|' + py[0] + '|' + pingyin + '" value="' + result[i].code + '">' + name + '</option>';
}
$("#deptName").append(html);
$("#deptAdmissionTo").append(html);
}
$(".selectpicker").selectpicker('refresh'); //
}
});
}
//第一层,查全部
function initTable() {
$("#table").bootstrapTable({ // 对应table标签的id
url: path+"/record/getSubmitRecordList", // 获取表格数据的url
sidePagination: 'server', // 设置为服务器端分页 客户端client
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
striped: true, //表格显示条纹默认为false
pagination: true, // 在表格底部显示分页组件默认false
paginationShowPageGo: true,
pageList: [10, 20, 50, 100], // 如果设置了分页设置可供选择的页面数据条数。设置为All 则显示所有记录。
toolbar: '#toolbar',//指定工具栏
searchOnEnterKey: true, //设置为 true时按回车触发搜索方法否则自动触发搜索方法
detailView:true,//是否可展开
undefinedText: '--', //当数据为 undefined 时显示的字符
singleSelect: false,//设置True 将禁止多选
clickToSelect: true,//设置true 将在点击行时自动选择rediobox 和 checkbox
searchTimeOut: 500,// 默认500 设置搜索超时时间。
showHeader: true,//是否显示列头。
height:550,
//是否显示导出按钮
queryParams: function (params) {
return queryParams(params,this,'');
},
columns:[
[{
title: '科室名称',
field: 'deptNameCn',
align: 'center'
},
{
title: '超期份数',
field: 'count',
align: 'center'
},
{
title: '医生未提交',
field: 'unDoctorSubmitCount',
align: 'center',
},
{
title: '医生质控员未提交',
field: 'unDoctorCheckCount',
align: 'center'
},
{
title: '科主任未提交',
field: 'unDirectorCheckCount',
align: 'center'
},
{
title: '护士未提交',
field: 'unNurseSubmitCount',
align: 'center'
},
{
title: '护士质控员未提交',
field: 'unNurseCheckCount',
align: 'center'
},
{
title: '护士长未提交',
field: 'unHeadNurseCount',
align: 'center'
},
{
title: '病案室未提交',
field: 'headNurseCount',
align: 'center'
},
]],
onLoadSuccess: function (result) {
$(".page-list").show();
},
//展开详情事件
onExpandRow: function (index, row, $detail) {//點擊datagrid 展開按鈕事件
var html = '<div id="tableDiv1">\n' +
' <table id="table1" class="table text-nowrap"></table>\n' +
' </div>';
$detail.html(html);
var table1Data = getTable1Data(row);
initTable1(table1Data);
}
});
}
/**
* 组织表1审核角色表的数据
* @param table1Data
*/
function getTable1Data(row){
var data = [];
//查询是否带审核节点查询
var infoId = $("#infoId").val();
var count2 = row.unDoctorSubmitCount;
var map2 = getDataMap(2,'医生未提交',count2,row);
var count3 = row.unDoctorCheckCount;
var map3 = getDataMap(3,'医生质控员未提交',count3,row);
var count4 = row.unDirectorCheckCount;
var map4 = getDataMap(4,'科主任未提交',count4,row);
var count5 = row.unNurseSubmitCount;
var map5 = getDataMap(5,'护士未提交',count5,row);
var count6 = row.unNurseCheckCount;
var map6 = getDataMap(6,'护士质控员未提交',count6,row);
var count7 = row.unHeadNurseCount;
var map7 = getDataMap(7,'护士长未提交',count7,row);
var count8 = row.headNurseCount;
var map8 = getDataMap(8,'病案室未提交',count8,row);
if(infoId == ''){
if(count2 > 0) {
data.push(map2);
}
if(count3 > 0) {
data.push(map3);
}
if(count4 > 0) {
data.push(map4);
}
if(count5 > 0) {
data.push(map5);
}
if(count6 > 0) {
data.push(map6);
}
if(count7 > 0) {
data.push(map7);
}
if(count8 > 0) {
data.push(map8);
}
}else{
if(infoId == '2' && count2 > 0){
data.push(map2);
}
if(infoId == '3' && count3 > 0){
data.push(map3);
}
if(infoId == '4' && count4 > 0){
data.push(map4);
}
if(infoId == '5' && count5 > 0){
data.push(map5);
}
if(infoId == '6' && count6 > 0){
data.push(map6);
}
if(infoId == '7' && count7 > 0){
data.push(map7);
}
if(infoId == '8' && count8 > 0){
data.push(map8);
}
}
return data;
}
/**
* 组织map
* @param roleId
* @param title
* @param count
* @param row
* @returns {*}
*/
function getDataMap(roleId,title,count,row){
if(count != 0){
var map = new Map();
map['deptCode'] = row.deptName;
map['deptNameCn'] = row.deptNameCn;
map['unCount'] = count;
map['role'] = title;
map['roleId'] = roleId;
return map;
}else{
return [];
}
}
//第二层,按审核角色分层
function initTable1(table1Data) {
$("#table1").bootstrapTable({ // 对应table标签的id
data:table1Data,
sidePagination: 'client', // 设置为服务器端分页 客户端client
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
striped: true, //表格显示条纹默认为false
pagination: true, // 在表格底部显示分页组件默认false
paginationShowPageGo: true,
pageList: [10, 20, 50, 100], // 如果设置了分页设置可供选择的页面数据条数。设置为All 则显示所有记录。
searchOnEnterKey: true, //设置为 true时按回车触发搜索方法否则自动触发搜索方法
detailView: true,//是否可展开
undefinedText: '--', //当数据为 undefined 时显示的字符
singleSelect: false,//设置True 将禁止多选
clickToSelect: true,//设置true 将在点击行时自动选择rediobox 和 checkbox
paginationDetailHAlign: 'left',//指定 分页详细信息 在水平方向的位置。'left' 或 'right'。
height:300,
searchTimeOut: 500,// 默认500 设置搜索超时时间。
showHeader: true,//是否显示列头。
columns: [
{
title: '序号',
formatter: function (value, row, index) {
return index + 1;
}
},
{
title: '出院科室',
field: 'deptNameCn',
},
{
title: '审核角色',
field: 'role',
},
{
title: '未提交份数',
field: 'unCount',
}
],
onLoadSuccess: function (result) { //加载成功时执行
$(".page-list").show();
//reloadTableHeight("table1");
},
//展开详情事件
onExpandRow: function (index, row, $detail) {//點擊datagrid 展開按鈕事件
var html = '<div id="tableDiv2">\n' +
' <table id="table2" class="table2" class="table text-nowrap table-bordered"></table>\n' +
' </div>';
$detail.html(html);
initTable2();
}
});
}
//第三层,按科室审核角色分组查
function initTable2() {
$("#table2").bootstrapTable({ // 对应table标签的id
url: path + "/record/getRecordGroupDept", // 获取表格数据的url
sidePagination: 'server', // 设置为服务器端分页 客户端client
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
striped: true, //表格显示条纹默认为false
pagination: true, // 在表格底部显示分页组件默认false
paginationShowPageGo: true,
pageList: [10, 20, 50, 100], // 如果设置了分页设置可供选择的页面数据条数。设置为All 则显示所有记录。
searchOnEnterKey: true, //设置为 true时按回车触发搜索方法否则自动触发搜索方法
detailView: false,//是否可展开
undefinedText: '--', //当数据为 undefined 时显示的字符
singleSelect: false,//设置True 将禁止多选
clickToSelect: true,//设置true 将在点击行时自动选择rediobox 和 checkbox
paginationDetailHAlign: 'left',//指定 分页详细信息 在水平方向的位置。'left' 或 'right'。
height:514,
searchTimeOut: 500,// 默认500 设置搜索超时时间。
showHeader: true,//是否显示列头。
//查询条件
queryParams: function (params) {
return queryParams(params,this,'');
},
columns: [
{
title: '序号',
formatter: function (value, row, index) {
return index + 1;
}
},
{
title: '主管医生',
field: 'allRecordCount',
},
{
title: '医生工号',
field: 'allFileCount',
},
{
title: '超期份数',
field: 'allPageCount',
},
{
title: '出院科室',
field: 'deptNameCn',
},
{
title: '患者姓名',
field: 'autoCollectionFileCount',
},
{
title: '住院号',
field: 'autoCollectionPageCount',
},
{
title: '住院次数',
field: 'manualScanFileCount',
},
{
title: '出院日期',
field: 'manualScanPageCount',
},
{
title: '超期天数',
field: 'manualScanPageCount',
},
{
title: '状态',
field: 'manualScanPageCount',
},
{
title:'操作',
align: 'center',
valign: 'middle',
formatter: function (value, row, index) {
return '<button type="button" class="btn btn-sm btn-success showFlowInfo" title="查看流程">查看流程</button>';
}
}
],
onLoadSuccess: function (result) { //加载成功时执行
$(".page-list").show();
//reloadTableHeight("table1");
},
/* //展开详情事件
onExpandRow: function (index, row, $detail) {//點擊datagrid 展開按鈕事件
var deptName = row.deptName;
var tableId = 'table_'+deptName;
var html = '<div id="tableDiv2">\n' +
' <table id="'+tableId+'" class="table2" class="table text-nowrap table-bordered"></table>\n' +
' </div>';
$detail.html(html);
initTable2(deptName,tableId);
}*/
});
}
//第三层,根据科室查询病患详情
/*function initTable2(deptName,tableId) {
$("#"+tableId).bootstrapTable({ // 对应table标签的id
url: path+"/statistics/getRecordStatisticsByDeptName", // 获取表格数据的url
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
striped: true, //表格显示条纹默认为false
sidePagination: 'server', // 设置为服务器端分页 客户端client
pagination: true, // 在表格底部显示分页组件默认false
paginationShowPageGo: true,
pageList: [10, 20, 50, 100], // 如果设置了分页设置可供选择的页面数据条数。设置为All 则显示所有记录。
toolbar: '#toolbar',//指定工具栏
searchOnEnterKey: true, //设置为 true时按回车触发搜索方法否则自动触发搜索方法
//detailView:true,//是否可展开
undefinedText: '--', //当数据为 undefined 时显示的字符
singleSelect: false,//设置True 将禁止多选
clickToSelect: true,//设置true 将在点击行时自动选择rediobox 和 checkbox
paginationDetailHAlign: 'left',//指定 分页详细信息 在水平方向的位置。'left' 或 'right'。
height:475,
searchTimeOut: 500,// 默认500 设置搜索超时时间。
showHeader: true,//是否显示列头。
//是否显示导出按钮
queryParams: function (params) {
return queryParams(params,this,deptName);
},
columns: [
{
title: '序号',
align: 'center',
formatter: function (value, row, index) {
return index + 1;
}
},
{
title: '住院号',
field: 'inpNo',
align: 'left'
},
{
title: '姓名',
field: 'name',
align: 'left'
},
{
title: '住院次数',
field: 'visitId',
align: 'center'
},
{
title: '出院科室',
field: 'deptNameCn',
align: 'left'
},
{
title: '出院日期',
field: 'dischargeDateTime',
align: 'center',
formatter: function (value) {
return operDisDate(value);
}
},
{
title: '总文件数',
field: 'allFileCount',
align: 'center'
},
{
title: '总页数',
field: 'allPageCount',
align: 'center'
},
{
title: '自动采集总文件数',
field: 'autoCollectionFileCount',
align: 'center'
},
{
title: '自动采集总页数',
field: 'autoCollectionPageCount',
align: 'center'
},
{
title: '扫描上传总文件数',
field: 'manualScanFileCount',
align: 'center'
},
{
title: '扫描上传总页数',
field: 'manualScanPageCount',
align: 'center'
}
],
onLoadSuccess: function (result) { //加载成功时执行
$(".page-list").show();
//reloadTableHeight("table2");
}
});
}*/
//各表格查询条件
function queryParams(params,_this,deptName){
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;
}
if(deptName == ''){
deptName = getDeptName();
}
var temp = {
offset:offset,
limit:limit,
startDate: $("#startTime1").val(),
endDate: $("#endTime1").val(),
deptName:deptName,
flag:2,
doctorInCharge:getSelecteds("doctorInCharge"),
infoId:$("#infoId").val(),
};
return temp;
}
//封装展开显示按钮方法
/*function showDetail(level,deptName){
return '<a type="button" onclick="showDetailMethod('+level+','+deptName+')" target="_blank" class="btn btn-primary btn-sm">展开显示</button></a>'}
//封装展开显示跳转方法
function showDetailMethod(level,deptName){
var startDate =$("#startTime1").val();
var endDate = $("#endTime1").val();
var timeInterval = $("#timeInterval").val();
var name = $("#name").val();
var inpNo = $("#inpNo").val();
if(deptName == null){
deptName = getDeptName();
}
var urlTemp = url + level + "?deptName="+deptName+"&startDate="+ startDate
+ "&endDate="+endDate+"&timeInterval="+timeInterval+"&name="+name
+"&inpNo="+inpNo;
window.open(urlTemp);
}*/
//查询按钮
$('#searchBtnStatistics').click(function () {
//查询之后重新从第一页算起
selectOvertimeCount();
$("#table").bootstrapTable("refreshOptions", {pageNumber: 1});
});
//键盘回车查询
$(document).keyup(function(event){
if(event.keyCode ==13){
$("#searchBtnStatistics").trigger("click");
}
});
//导出excel功能
$("#excelBtn").click(function () {
var deptName = $("#deptName").val();
var startDate = $("#startTime1").val();
var endDate = $("#endTime1").val();
var url = path+"/record/exportExcelSubmit";
post(url,{
"deptName":deptName,
"startDate":startDate,
"endDate":endDate,
"flag":2,
"doctorInCharge":getSelecteds("doctorInCharge"),
"info":$("#infoId").val()
});
});
Loading…
Cancel
Save