更新版本20200918,增加两张报表,首次护理记录排前

master
zengwh 5 years ago
parent 6ca66a5941
commit d5db1ea544

@ -12,7 +12,6 @@ import com.emr.service.ipml.ZdAssortService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.Msg;
import com.emr.vo.ArchiveFlowInfoVo;
import com.emr.vo.User;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.client.methods.CloseableHttpResponse;
@ -23,7 +22,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@ -33,7 +31,10 @@ import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
/**
* @author zwh
@ -264,7 +265,11 @@ public class FontController {
//抽取首次病程记录
String strTemp = "首次病程";
String assortId = "AFB9FBE656D7492C80AEDE6E685A851A";
//定义护理记录里的首次护理记录排前头
String nurseTemp = "首次护理";
String nurseAssortId = "C70E8C427A3648B79BE80798C08F4D12";
Archive_Detail detailTemp = new Archive_Detail();
Archive_Detail nurseDetailVoTemp = new Archive_Detail();
//分类去重
for(Archive_Detail detail : list){
assortList.add(detail.getSubassort());
@ -273,6 +278,9 @@ public class FontController {
if(StringUtils.isNotBlank(title) && detail.getTitle().contains(strTemp)){
detailTemp = detail;
}
if(StringUtils.isNotBlank(title) && detail.getTitle().contains(nurseTemp)){
nurseDetailVoTemp = detail;
}
}
//组织树
int id = 1;
@ -301,6 +309,7 @@ public class FontController {
int count = 0;
//定义是否添加了首次病程
boolean flag = false;
boolean nurseflag = false;
for(Archive_Detail detail : list){
if(StringUtils.isNotBlank(detail.getSubassort()) && assortName.equals(detail.getSubassort())){
String assortid = detail.getAssortid();
@ -320,7 +329,23 @@ public class FontController {
flag = true;
}
}
if(!detail.equals(detailTemp)) {
if(StringUtils.isNotBlank(assortid) && assortid.equals(nurseAssortId)){
//是护理记录
if(!nurseflag){
AssortTypeTree tree2 = new AssortTypeTree();
//第三层,资料名称
count++;
tree2.setId(id);
tree2.setParentId(twoParentId);
tree2.setName(nurseDetailVoTemp.getTitle());
tree2.setSelfId(nurseDetailVoTemp.getId());
tree2.setChecked("true");
treeList.add(tree2);
id++;
nurseflag = true;
}
}
if(!detail.equals(detailTemp) && !detail.equals(nurseDetailVoTemp)) {
AssortTypeTree tree2 = new AssortTypeTree();
//第三层,资料名称
count++;
@ -355,8 +380,13 @@ public class FontController {
public Msg getPdfToPdf(HttpServletResponse response,String detailIds,HttpSession session){
try {
Archive_Detail detail = new Archive_Detail();
detail.setTitle(detailIds);
archiveDetailService.selectByIdStrFont(response,session,detail);
if(StringUtils.isNotBlank(detailIds)){
detail.setTitle(detailIds);
archiveDetailService.selectByIdStrFont(response,session,detail);
}else{
//存至session
session.setAttribute("showRecord",null);
}
return Msg.success();
} catch (Exception e) {
ExceptionPrintUtil.printException(e);

@ -0,0 +1,142 @@
package com.emr.controller;
import com.emr.entity.OffsetLimitPage;
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.SubmitRecord;
import com.emr.vo.SubmitRecordStatistics;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@Controller
@RequestMapping("record/")
public class RecordController {
@Autowired
private RecordService recordService;
/**
*
* @return
*/
@RequestMapping("submitRecord")
public String submitRecord(){
return "record/submitRecord";
}
/**
*
* @return
*/
@RequestMapping("getSubmitRecordList")
@ResponseBody
public OffsetLimitPage getSubmitRecordList(Integer offset, Integer limit,String startDate,String endDate,String deptName){
if(offset != null && limit != null) {
PageHelper.offsetPage(offset, limit);
}
List<SubmitRecord> submitRecords = recordService.selectCountGroupDept(startDate,endDate,deptName);
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){
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.selectCountGroupDept(startDate, endDate, deptName);
//文件名
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();
}
}
@RequestMapping("signedRecord")
public String signedRecord(){
return "record/signedRecord";
}
/**
*
*/
@RequestMapping("selectCount")
@ResponseBody
public Msg selectCount(String startDate,String endDate,String deptName) throws Exception{
SubmitRecordStatistics recordStatistics = recordService.selectCount(startDate, endDate, deptName);
return Msg.success().add("record",recordStatistics);
}
/**
*
* @return
*/
@RequestMapping("getSignedRecordList")
@ResponseBody
public OffsetLimitPage getSignedRecordList(Integer offset, Integer limit,String startDate,String endDate,String deptName,Integer dateFlag){
if(offset != null && limit != null) {
PageHelper.offsetPage(offset, limit);
}
List<SubmitRecordStatistics> submitRecords = recordService.getSignedRecordList(startDate,endDate,deptName,dateFlag);
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){
String tableThNames = "出院日期,出院科室,出院人数,采集完整,已提交,已归档,完整率,提交率,归档率";
String fieldCns = "disDate,deptNameCn,allCount,count3,count1,count2,count3Percent,count1Percent,count2Percent";
//构造excel的数据
try {
List<SubmitRecordStatistics> list = recordService.getSignedRecordList(startDate, endDate, deptName,dateFlag);
//文件名
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();
}
}
}

@ -0,0 +1,34 @@
package com.emr.dao;
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);
//根据审核角色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> selectCountWithHeadNurse(@Param("startDate")String startDate,
@Param("endDate")String endDate,
@Param("deptName")String deptName);
//统计总病历数,已提交数,已归档数,已采集完整数
SubmitRecordStatistics selectCount(@Param("startDate")String startDate,
@Param("endDate")String endDate,
@Param("deptName")String deptName);
//按日期分组查询出院人数,归档情况,提交情况,资料完整情况
List<SubmitRecordStatistics> selectCountWithDate(@Param("startDate")String startDate,
@Param("endDate")String endDate,
@Param("deptName")String deptName,
@Param("dateFlag")Integer dateFlag);
}

@ -41,41 +41,46 @@ public class Archive_DetailServiceImpl implements Archive_DetailService {
List<Archive_Detail_Vo> list = archiveDetailMapper.detailByClo(record);
OffsetLimitPage offsetLimitPage = new OffsetLimitPage((Page) list);
if(!CollectionUtils.isEmpty(list)) {
//定义新的集合。病程记录分类中的首次病程记录排前头
//TODO 定义新的集合。病程记录分类中的首次病程记录排前头
String strTemp = "首次病程";
String assortId = "AFB9FBE656D7492C80AEDE6E685A851A";
//定义护理记录里的首次护理记录排前头
String nurseTemp = "首次护理";
String nurseAssortId = "C70E8C427A3648B79BE80798C08F4D12";
List<Archive_Detail_Vo> returnList = new Page<>();
//定义是否存在首次病程
boolean flagTemp = false;
//定义接收首次病程记录的对象
Archive_Detail_Vo detailVoTemp = new Archive_Detail_Vo();
Archive_Detail_Vo nurseDetailVoTemp = new Archive_Detail_Vo();
for (int i = 0; i < list.size(); i++) {
if (list.get(i).getAssortId().equals(assortId) && list.get(i).getTitle().contains(strTemp)) {
detailVoTemp = list.get(i);
list.remove(i);
flagTemp = true;
break;
}
if (list.get(i).getAssortId().equals(nurseAssortId) && list.get(i).getTitle().contains(nurseTemp)) {
nurseDetailVoTemp = list.get(i);
}
}
if (flagTemp) {
if (!CollectionUtils.isEmpty(list)) {
//重新排序
//定义是否已添加首次病程
boolean flag = false;
for (Archive_Detail_Vo detailVo : list) {
if (StringUtils.isNotBlank(detailVo.getAssortId()) && detailVo.getAssortId().equals(assortId) && !flag) {
returnList.add(detailVoTemp);
flag = true;
}
if (!CollectionUtils.isEmpty(list)) {
//重新排序
//定义是否已添加首次病程
boolean flag = false;
boolean nurseFlag = false;
for (Archive_Detail_Vo detailVo : list) {
if (StringUtils.isNotBlank(detailVo.getAssortId()) && detailVo.getAssortId().equals(assortId) && !flag) {
returnList.add(detailVoTemp);
flag = true;
}
if (StringUtils.isNotBlank(detailVo.getAssortId()) && detailVo.getAssortId().equals(nurseAssortId) && !nurseFlag) {
returnList.add(nurseDetailVoTemp);
nurseFlag = true;
}
if(StringUtils.isNotBlank(detailVo.getTitle()) &&
!detailVo.getTitle().contains(strTemp) && !detailVo.getTitle().contains(nurseTemp)) {
returnList.add(detailVo);
}
} else {
//只有首次病程记录的情况
returnList.add(detailVoTemp);
}
((Page<Archive_Detail_Vo>) returnList).setTotal(offsetLimitPage.getTotal());
return new OffsetLimitPage((Page) returnList);
}
((Page<Archive_Detail_Vo>) returnList).setTotal(offsetLimitPage.getTotal());
return new OffsetLimitPage((Page) returnList);
}
return offsetLimitPage;
}
@ -119,20 +124,27 @@ public class Archive_DetailServiceImpl implements Archive_DetailService {
public List<String> mulFile2OneById(HttpServletResponse response,List<Archive_Detail> arList) {
List<String> pdfList = new ArrayList<>();
if (arList != null && !arList.isEmpty()) {
//抽取首次病程记录
//TODO 抽取首次病程记录
String strTemp = "首次病程";
String assortId = "AFB9FBE656D7492C80AEDE6E685A851A";
String strPath = "";
for (int i = 0; i < arList.size(); i++) {
String assortid = arList.get(i).getAssortid();
if(StringUtils.isNotBlank(assortid) && assortid.equals(assortId) && arList.get(i).getTitle().contains(strTemp)){
strPath = arList.get(i).getPdfPath();
break;
}
}
//定义护理记录里的首次护理记录排前头
String nurseTemp = "首次护理";
String nurseAssortId = "C70E8C427A3648B79BE80798C08F4D12";
if(!CollectionUtils.isEmpty(arList)) {
String strPath = "";
String nursePath = "";
for (int i = 0; i < arList.size(); i++) {
String assortid = arList.get(i).getAssortid();
if(StringUtils.isNotBlank(assortid) && assortid.equals(assortId) && arList.get(i).getTitle().contains(strTemp)){
strPath = arList.get(i).getPdfPath();
}
if(StringUtils.isNotBlank(assortid) && assortid.equals(nurseAssortId) && arList.get(i).getTitle().contains(nurseTemp)){
nursePath = arList.get(i).getPdfPath();
}
}
//定义是否添加首次病程
boolean flag = false;
boolean nurseFlag = false;
for (Archive_Detail detail : arList) {
String str = detail.getPdfPath();
if (StringUtils.isNoneBlank(str)) {
@ -141,14 +153,16 @@ public class Archive_DetailServiceImpl implements Archive_DetailService {
pdfList.add(strPath);
flag = true;
}
if(!detail.getPdfPath().equals(strPath)){
//护理记录单先添加首次护理
if (detail.getAssortid().equals(nurseAssortId) && !nurseFlag) {
pdfList.add(nursePath);
nurseFlag = true;
}
if(!detail.getPdfPath().equals(strPath) && !detail.getPdfPath().equals(nursePath)){
pdfList.add(str);
}
}
}
}else{
//只有首次病程记录的情况
pdfList.add(strPath);
}
}
return pdfList;

@ -0,0 +1,290 @@
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.SubmitRecord;
import com.emr.vo.SubmitRecordStatistics;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.util.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class RecordService {
@Autowired
private RecordMapper recordMapper;
@Autowired
private Emr_DictionaryMapper dictionaryMapper;
/**
*
* @param startDate
* @param endDate
* @param deptName
* @return
*/
public List<SubmitRecord> selectCountGroupDept(String startDate,String endDate,String deptName){
//按科室查询总出院人数
List<SubmitRecord> submitRecords = recordMapper.selectCountGroupDept(startDate,endDate,deptName);
if(!CollectionUtils.isEmpty(submitRecords)) {
//获取科室集合
String deptNames = getDepts(submitRecords);
//查询医生该科室审核份数
int roleId = 2;
int backRoleId = 9;
List<SubmitRecord> doctorSubmitList = recordMapper.selectCountByRoleAndDeptName(startDate,endDate,deptNames, roleId, backRoleId);
//查询医生质控员该科室审核份数
roleId = 3;
List<SubmitRecord> doctorCheckList = recordMapper.selectCountByRoleAndDeptName(startDate,endDate,deptNames, roleId, backRoleId);
//查询科主任该科室审核份数
roleId = 4;
List<SubmitRecord> directorCheckList = recordMapper.selectCountByRoleAndDeptName(startDate,endDate,deptNames, roleId, backRoleId);
//查询护士审核份数
roleId = 5;
backRoleId = 10;
List<SubmitRecord> nurseList = recordMapper.selectCountByRoleAndDeptName(startDate,endDate,deptNames, roleId, backRoleId);
//查询护士质控员审核份数
roleId = 6;
List<SubmitRecord> nurseCheckList = recordMapper.selectCountByRoleAndDeptName(startDate,endDate,deptNames, roleId, backRoleId);
//护士长
List<SubmitRecord> headNurseList = recordMapper.selectCountWithHeadNurse(startDate,endDate,deptNames);
//填充各个角色数据
selectList(submitRecords,doctorSubmitList,doctorCheckList,directorCheckList,nurseList,nurseCheckList,headNurseList);
}
return submitRecords;
}
/**
*
* @param submitRecords
* @param doctorSubmitList
* @param doctorCheckList
* @param directorCheckList
* @param nurseList
* @param nurseCheckList
* @param headNurseList
*/
private void selectList(List<SubmitRecord> submitRecords, List<SubmitRecord> doctorSubmitList,
List<SubmitRecord> doctorCheckList,
List<SubmitRecord> directorCheckList,
List<SubmitRecord> nurseList,
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 + "%");
}
//计算医生质控员
//定义医生指控员是否匹配的科室
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 + "%");
}
//计算护士
//定义护士是否匹配的科室
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 + "%");
}
//计算护士质控员
//定义护士质控员是否匹配的科室
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;
}
}
//未匹配上科室置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;
}
}
//未匹配上科室置0
if(!headNurseFlag) {
obj.setHeadNurseCount(0);
obj.setUnHeadNurseCount(obj.getCount());
obj.setHeadNursePercent("0%");
}
}
}
/**
* code
* @param list
* @return
*/
private String getDepts(List<SubmitRecord> list) {
StringBuilder depeNames = new StringBuilder();
for (SubmitRecord obj:list) {
if(StringUtils.isNotBlank(obj.getDeptName())) {
if (StringUtils.isNoneBlank(depeNames)) {
depeNames.append(",").append(obj.getDeptName());
} else {
depeNames.append(obj.getDeptName());
}
}
}
return depeNames.toString();
}
/**
*
* @param startDate
* @param endDate
* @param deptName
* @return
*/
public SubmitRecordStatistics selectCount(String startDate,String endDate,String deptName) {
SubmitRecordStatistics record = recordMapper.selectCount(startDate, endDate, deptName);
//计算百分比并赋值
SetStatisticsPercent(record);
return record;
}
/**
*
* @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);
String deptNameCn = "全部";
if(StringUtils.isNotBlank(deptName)){
Emr_Dictionary dictionary = new Emr_Dictionary();
dictionary.setCode(deptName);
//转换科室
List<Emr_Dictionary> dictionaries = dictionaryMapper.dicByClo(dictionary);
if(!CollectionUtils.isEmpty(dictionaries)){
deptNameCn = dictionaries.get(0).getName();
}
}
if(!CollectionUtils.isEmpty(list)){
for (SubmitRecordStatistics obj:list) {
//计算百分比并赋值
SetStatisticsPercent(obj);
obj.setDeptNameCn(deptNameCn);
}
}
return list;
}
/**
*
* @param record
*/
private void SetStatisticsPercent(SubmitRecordStatistics record) {
Integer count = record.getAllCount();
if (count != 0) {
record.setCount1Percent(Math.round(record.getCount1() * 100 / count) + "%");
record.setCount2Percent(Math.round(record.getCount2() * 100 / count) + "%");
record.setCount3Percent(Math.round(record.getCount3() * 100 / count) + "%");
} else {
record.setCount1Percent("0%");
record.setCount2Percent("0%");
record.setCount3Percent("0%");
}
}
}

@ -145,7 +145,7 @@ public class ExportExcelUtil {
sheet.autoSizeColumn(j);
int width = sheet.getColumnWidth(j)*2;
if(width < 3000){
sheet.setColumnWidth(j,sheet.getColumnWidth(j)*17/7);
sheet.setColumnWidth(j,sheet.getColumnWidth(j)*18);
}
}
//冻结表头

@ -30,7 +30,7 @@ public class HttpClientTool {
public static final String CHARSET = "UTF-8";
// 采用静态代码块初始化超时时间配置再根据配置生成默认httpClient对象
static {
RequestConfig config = RequestConfig.custom().setConnectTimeout(60000).setSocketTimeout(15000).build();
RequestConfig config = RequestConfig.custom().setConnectTimeout(60000).setSocketTimeout(60000).build();
httpClient = HttpClientBuilder.create().setDefaultRequestConfig(config).build();
}

@ -0,0 +1,34 @@
package com.emr.vo;
import lombok.Data;
@Data
public class SubmitRecord {
private String deptName;
private String deptNameCn;
private Integer count;
private Integer doctorSubmitCount;
private Integer unDoctorSubmitCount;
private String doctorSubmitPercent;
private Integer doctorCheckCount;
private Integer unDoctorCheckCount;
private String doctorCheckPercent;
private Integer directorCheckCount;
private Integer unDirectorCheckCount;
private String directorCheckPercent;
private Integer nurseSubmitCount;
private Integer unNurseSubmitCount;
private String nurseSubmitPercent;
private Integer nurseCheckCount;
private Integer unNurseCheckCount;
private String nurseCheckPercent;
private Integer headNurseCount;
private Integer unHeadNurseCount;
private String headNursePercent;
}

@ -0,0 +1,16 @@
package com.emr.vo;
import lombok.Data;
@Data
public class SubmitRecordStatistics {
private Integer allCount;//总病历数
private Integer count1;//已提交数量
private Integer count2;//已归档数量
private Integer count3;//已完整数量
private String count1Percent;//总提交率
private String count2Percent;//总归档率
private String count3Percent;//总采集完整率
private String disDate;//出院日期格式yyyy-MM-dd
private String deptNameCn;//科室
}

@ -0,0 +1,293 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.emr.dao.RecordMapper">
<resultMap id="BaseResultMap" type="com.emr.vo.SubmitRecord"></resultMap>
<resultMap id="BaseResultMap1" type="com.emr.vo.SubmitRecordStatistics"></resultMap>
<!---查询时间段-->
<sql id="selectByDate">
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})
</if>
<choose>
<when test="startDate != null and startDate != '' and endDate != null and endDate != ''">
and discharge_date_time between CONVERT(VARCHAR(10),#{startDate,jdbcType=NCHAR},120) and
#{endDate,jdbcType=NCHAR}+ ' 23:59:59'
</when>
<when test="startDate != null and startDate != ''">
and discharge_date_time >= CONVERT(VARCHAR(10),#{startDate,jdbcType=NCHAR},120)
</when>
<when test="endDate != null and endDate != ''">
and discharge_date_time &lt;= #{endDate,jdbcType=NCHAR}+ ' 23:59:59'
</when>
</choose>
</sql>
<sql id="selectByDate1">
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})
</if>
<choose>
<when test="startDate != null and startDate != '' and endDate != null and endDate != ''">
<choose>
<when test="dateFlag == 1">
and discharge_date_time between CONVERT(VARCHAR(10),#{startDate,jdbcType=NCHAR},120) and
#{endDate,jdbcType=NCHAR}+ ' 23:59:59'
</when>
<when test="dateFlag == 2">
and CONVERT(VARCHAR(7),discharge_date_time,120) between #{startDate,jdbcType=NCHAR} and
#{endDate,jdbcType=NCHAR}
</when>
<when test="dateFlag == 3">
and CONVERT(VARCHAR(4),discharge_date_time,120) between #{startDate,jdbcType=NCHAR} and
#{endDate,jdbcType=NCHAR}
</when>
</choose>
</when>
<when test="startDate != null and startDate != ''">
<choose>
<when test="dateFlag == 1">
and discharge_date_time >= CONVERT(VARCHAR(10),#{startDate,jdbcType=NCHAR},120)
</when>
<when test="dateFlag == 2">
and CONVERT(VARCHAR(7),discharge_date_time,120) >= #{startDate,jdbcType=NCHAR}
</when>
<when test="dateFlag == 3">
and CONVERT(VARCHAR(4),discharge_date_time,120) >= #{startDate,jdbcType=NCHAR}
</when>
</choose>
</when>
<when test="endDate != null and endDate != ''">
<choose>
<when test="dateFlag == 1">
and discharge_date_time &lt;= #{endDate,jdbcType=NCHAR}+ ' 23:59:59'
</when>
<when test="dateFlag == 2">
and CONVERT(VARCHAR(7),discharge_date_time,120) &lt;= #{endDate,jdbcType=NCHAR}
</when>
<when test="dateFlag == 3">
and CONVERT(VARCHAR(4),discharge_date_time,120) &lt;= #{endDate,jdbcType=NCHAR}
</when>
</choose>
</when>
</choose>
</sql>
<!---查询分组科室数量-->
<select id="selectCountGroupDept" resultMap="BaseResultMap">
SELECT
dept_name deptName,
COUNT( archive_master.id ) count,
emr_dictionary.NAME deptNameCn
FROM
archive_master
INNER JOIN emr_dictionary ON archive_master.dept_name = emr_dictionary.CODE
AND emr_dictionary.parent_id = 'dept_code'
<where>
<include refid="selectByDate"></include>
</where>
GROUP BY
dept_name,
emr_dictionary.NAME,
emr_dictionary.CODE
ORDER BY
emr_dictionary.CODE
</select>
<!--根据审核角色id和分组科室查询该科室完成份数-->
<select id="selectCountByRoleAndDeptName" resultMap="BaseResultMap">
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
INNER JOIN archive_master ON t1.master_id = archive_master.id
<where>
<include refid="selectByDate"></include>
</where>
GROUP BY
dept_name
</select>
<!--根据科室分组查询护士长审核份数-->
<select id="selectCountWithHeadNurse" resultMap="BaseResultMap">
SELECT
dept_name deptName,
COUNT( id ) count
FROM
archive_master
WHERE
ArchiveState = '64'
<include refid="selectByDate"></include>
GROUP BY
dept_name
</select>
<!--统计总病历数,已提交数,已归档数,已采集完整数-->
<select id="selectCount" resultType="com.emr.vo.SubmitRecordStatistics">
SELECT
( SELECT COUNT( 1 ) FROM archive_master
<where>
<include refid="selectByDate"></include>
</where>
) allCount,
( SELECT COUNT( 1 ) FROM archive_master WHERE ArchiveState = '64' <include refid="selectByDate"></include>
) count1,
( SELECT COUNT( 1 ) FROM archive_master WHERE ArchiveState = '128' <include refid="selectByDate"></include>
) count2,
(
SELECT
count( 1 )
FROM
archive_master
LEFT JOIN (
SELECT
MasterID,
COUNT( AssortID ) count
FROM
(
SELECT
archive_detail.MasterID,
dbo.archive_detail.AssortID
FROM
dbo.archive_detail
INNER JOIN dbo.zd_assort ON dbo.archive_detail.AssortID = dbo.zd_assort.assort_id
AND dbo.zd_assort.print_flag = 0
AND dbo.zd_assort.is_check = 1
WHERE
( dbo.archive_detail.flag = 0 )
GROUP BY
archive_detail.MasterID,
dbo.archive_detail.AssortID
) temp
GROUP BY
MasterID
) temp ON archive_master.id = temp.MasterID
LEFT JOIN (
SELECT
MID,
COUNT( MID ) inspectionCount
FROM
archive_other_ext
WHERE
sysFlag IN ( 3, 6 )
AND ISNULL( DID, '' )= ''
AND ISNULL( MID, '' )!= ''
GROUP BY
MID
) archive_other_ext ON archive_master.id = archive_other_ext.MID
WHERE
ISNULL( count, 0 ) = ( SELECT COUNT( assort_id ) FROM zd_assort WHERE print_flag = 0 AND is_check = 1 )
AND inspectionCount IS NULL
<include refid="selectByDate"></include>
) count3
</select>
<!--按日期分组查询出院人数,归档情况,提交情况,资料完整情况-->
<select id="selectCountWithDate" resultMap="BaseResultMap1">
SELECT
isnull( t1.count, 0 ) allCount,
t1.disDate,
isnull( t2.count, 0 ) count1,
isnull( t3.count, 0 ) count2,
isnull( t4.count, 0 ) count3
FROM
(
SELECT
COUNT( 1 ) count,
<include refid="formatDate"></include> disDate
FROM
archive_master
<where>
<include refid="selectByDate1"></include>
</where>
GROUP BY
<include refid="formatDate"></include>
) t1
LEFT JOIN (
SELECT
COUNT( 1 ) count,
<include refid="formatDate"></include> disDate
FROM
archive_master
WHERE
ArchiveState = '64'
<include refid="selectByDate1"></include>
GROUP BY
<include refid="formatDate"></include>
) t2 ON t1.disDate = t2.disDate
LEFT JOIN (
SELECT
COUNT( 1 ) count,
<include refid="formatDate"></include> disDate
FROM
archive_master
WHERE
ArchiveState = '128'
<include refid="selectByDate1"></include>
GROUP BY
<include refid="formatDate"></include>
) t3 ON t1.disDate = t3.disDate
LEFT JOIN (
SELECT
count( 1 ) count,
<include refid="formatDate"></include> disDate
FROM
archive_master
LEFT JOIN (
SELECT
MasterID,
COUNT( AssortID ) count
FROM
(
SELECT
archive_detail.MasterID,
dbo.archive_detail.AssortID
FROM
dbo.archive_detail
INNER JOIN dbo.zd_assort ON dbo.archive_detail.AssortID = dbo.zd_assort.assort_id
AND dbo.zd_assort.print_flag = 0
AND dbo.zd_assort.is_check = 1
WHERE
( dbo.archive_detail.flag = 0 )
GROUP BY
archive_detail.MasterID,
dbo.archive_detail.AssortID
) temp
GROUP BY
MasterID
) temp ON archive_master.id = temp.MasterID
LEFT JOIN (
SELECT
MID,
COUNT( MID ) inspectionCount
FROM
archive_other_ext
WHERE
sysFlag IN ( 3, 6 )
AND ISNULL( DID, '' )= ''
AND ISNULL( MID, '' )!= ''
GROUP BY
MID
) archive_other_ext ON archive_master.id = archive_other_ext.MID
WHERE
ISNULL( count, 0 ) = ( SELECT COUNT( assort_id ) FROM zd_assort WHERE print_flag = 0 AND is_check = 1 )
AND inspectionCount IS NULL
<include refid="selectByDate1"></include>
GROUP BY
<include refid="formatDate"></include>
) t4 ON t1.disDate = t4.disDate
order by t1.disDate desc
</select>
<!---格式化时间-->
<sql id="formatDate">
<choose>
<when test="dateFlag == 1">
CONVERT ( VARCHAR ( 10 ), archive_master.discharge_date_time, 23 )
</when>
<when test="dateFlag == 2">
CONVERT ( VARCHAR ( 7 ), archive_master.discharge_date_time, 120 )
</when>
<when test="dateFlag == 3">
CONVERT ( VARCHAR ( 4 ), archive_master.discharge_date_time, 120 )
</when>
</choose>
</sql>
</mapper>

@ -5,6 +5,7 @@
</resultMap>
<!--公共查询方法-->
<sql id="commomSearch">
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
<foreach item="item" collection="deptName.split(',')" open="(" separator="," close=")">
@ -40,13 +41,8 @@
<!--总文件数-->
<select id="getFileCount" resultMap="BaseResultMap" parameterType="com.emr.vo.RecordStatistics">
SELECT COUNT(archive_detail.id) allFileCount,Source source,ISNULL(SUM(archive_detail.PageCount),0) allPageCount FROM archive_detail
<if test="(deptName != null and deptName != '')
or (startDate != null and startDate != '' and endDate != null and endDate != '')
or (inpNo != null and inpNo != '')
or (name != null and name != '')">
INNER JOIN archive_master
ON archive_detail.MasterID = archive_master.id
</if>
WHERE flag = 0
<include refid="commomSearch"/>
GROUP BY source

@ -219,135 +219,135 @@
</div>
</div>
</div>
<!-- 模态框1Modal查看档案 -->
<div class="modal fade" id="selModal" tabindex="1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content modal-contentHigh">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
病历清单
</h4>
</div>
</div>
<!-- 模态框1Modal查看档案 -->
<div class="modal fade" id="selModal" tabindex="1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content modal-contentHigh">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
病历清单
</h4>
</div>
<div class="modal-body divCss2">
<!--通过审批且未过期的patientId集合-->
<form class="form-horizontal" id="form1">
<div id="masterId"></div>
<div class="row">
<div class="row divCss3">病历信息</div>
<div class="row divCss2">
<div class="col-sm-5" hidden>
病案号:<label id="idLab" class="labCss"></label><label id="assortId"
hidden></label>
</div>
<div class="col-sm-4">
住院号:<label id="inLab" class="labCss"></label>
</div>
<div class="col-sm-4">
住院次数:<label id="inTimeLab" class="labCss"></label>
</div>
<div class="col-sm-3">
姓名:<label id="nameLab" class="labCss"></label>
</div>
</div>
<div class="row divCss2">
<div class="col-sm-4"><input type="text" id="outDateLab" hidden/>
入院科室:<label id="deptToLab" class="labCss"></label>
</div>
<div class="col-sm-4">
入院日期:<label id="inDateLab" class="labCss"></label>
</div>
<div class="col-sm-4" id="recallDiv">
缺陷管理:
<button type="button" class="btn btn-danger btn-sm" id="getRecallBtn">缺陷查看
</button>
</div>
</div>
<div class="row divCss2">
<div class="col-sm-4"><input type="text" id="outDateLab1" hidden/>
出院科室:<label id="deptToLab1" class="labCss"></label>
</div>
<div class="col-sm-4">
出院日期:<label id="inDateLab1" class="labCss"></label>
</div>
<div class="col-sm-4">
完整性审核:<span id="wzContent"></span>
</div>
</div>
</div>
<div class="modal-body divCss2">
<!--通过审批且未过期的patientId集合-->
<form class="form-horizontal" id="form1">
<div id="masterId"></div>
<div class="divCss4"></div>
<div class="row">
<div class="row divCss3 ">病历清单</div>
<div class="col-sm-3 divCss2" style="width: 25%">
<div class="row titleCss"></div>
<div class="row">
<div class="row divCss3">病历信息</div>
<div class="row divCss2">
<div class="col-sm-5" hidden>
病案号:<label id="idLab" class="labCss"></label><label id="assortId"
hidden></label>
</div>
<div class="col-sm-4">
住院号:<label id="inLab" class="labCss"></label>
</div>
<div class="col-sm-4">
住院次数:<label id="inTimeLab" class="labCss"></label>
</div>
<div class="col-sm-3">
姓名:<label id="nameLab" class="labCss"></label>
</div>
</div>
<div class="row divCss2">
<div class="col-sm-4"><input type="text" id="outDateLab" hidden/>
入院科室:<label id="deptToLab" class="labCss"></label>
</div>
<div class="col-sm-4">
入院日期:<label id="inDateLab" class="labCss"></label>
</div>
<div class="col-sm-4" id="recallDiv">
缺陷管理:
<button type="button" class="btn btn-danger btn-sm" id="getRecallBtn">缺陷查看
</button>
</div>
</div>
<div class="row divCss2">
<div class="col-sm-4"><input type="text" id="outDateLab1" hidden/>
出院科室:<label id="deptToLab1" class="labCss"></label>
</div>
<div class="col-sm-4">
出院日期:<label id="inDateLab1" class="labCss"></label>
</div>
<div class="col-sm-4">
完整性审核:<span id="wzContent"></span>
</div>
<div class="col-sm-9">
<input type="text" id="key" value="" class="input-sm form-control empty"
placeholder="分段名称"/>
</div>
<button type="button" class="btn btn-primary btn-sm" id="searchBtn1">查询</button>
</div>
<div class="divCss4"></div>
<div class="row">
<div class="row divCss3 ">病历清单</div>
<div class="col-sm-3 divCss2" style="width: 25%">
<div class="row titleCss"></div>
<div class="row">
<div class="col-sm-9">
<input type="text" id="key" value="" class="input-sm form-control empty"
placeholder="分段名称"/>
</div>
<button type="button" class="btn btn-primary btn-sm" id="searchBtn1">查询</button>
</div>
<div class="row">
<button type="button" class="btn btn-success btn-sm treeBtn"
onclick="expandAll();">
全部展开
</button>
<button type="button" class="btn btn-success btn-sm treeBtn"
onclick="collapseAll();">
全部收缩
</button>
</div>
<div class="row">
<!--树-->
<div class="zTreeDemo" id="foo">
<ul id="ztree" class="ztree"></ul>
</div>
</div>
<button type="button" class="btn btn-success btn-sm treeBtn"
onclick="expandAll();">
全部展开
</button>
<button type="button" class="btn btn-success btn-sm treeBtn"
onclick="collapseAll();">
全部收缩
</button>
</div>
<div class="row">
<!--树-->
<div class="zTreeDemo" id="foo">
<ul id="ztree" class="ztree"></ul>
</div>
<div class="col-sm-8 divCss5" style="width: 73%">
<div class="row btnGroupCss">
<button type="button" class="btn btn-danger btn-sm" id="checkSuccessBtn">查看完整性
</button>
<button type="button" class="btn btn-default btn-sm" id="uploadBtn">上传文件
</button>
<button type="button" class="btn btn-info btn-sm" id="pdfBtn">查看分段PDF</button>
<button type="button" class="btn btn-success btn-sm" id="pdfBtn2">查看PDF</button>
<button type="button" class="btn btn-warning btn-sm" id="updateStateBtn">选中作废
</button>
<button type="button" class="btn btn-primary btn-sm" id="updateStateBtn2">选中使用
</button>
</div>
</div>
<div class="col-sm-8 divCss5" style="width: 73%">
<div class="row btnGroupCss">
<button type="button" class="btn btn-danger btn-sm" id="checkSuccessBtn">查看完整性</button>
<%--<button type="button" class="btn btn-primary btn-sm" id="workDetail">任务详情</button>--%>
<button type="button" class="btn btn-default btn-sm" id="uploadBtn">上传文件
</button>
<button type="button" class="btn btn-info btn-sm" id="pdfBtn">查看分段PDF</button>
<button type="button" class="btn btn-success btn-sm" id="pdfBtn2">查看PDF</button>
<button type="button" class="btn btn-warning btn-sm" id="updateStateBtn">选中作废
</button>
<button type="button" class="btn btn-primary btn-sm" id="updateStateBtn2">选中使用
</button>
</div>
<div class="row">
<div class="form-inline">
<div class="form-group divCss8" style="margin:10px 5px">
<label for="name">标题:</label>
<input type="text" class="input-sm form-control" id="title" maxlength="25"
placeholder="请输入标题">
</div>
<div class="row">
<div class="form-inline">
<div class="form-group divCss8" style="margin:10px 5px">
<label for="name">标题:</label>
<input type="text" class="input-sm form-control" id="title" maxlength="25"
placeholder="请输入标题">
</div>
<div class="form-group divCss8" style="margin:0">
<label for="inpNo">来源:</label>
<select class="form-control" id="source">
<option value="">全部</option>
</select>
</div>
<div class="form-group divCss8" style="margin:0;margin-left: 10px;">
<button type="button" class="btn btn-primary btn-sm" id="searchBtn2">查询</button>
</div>
</div>
<div class="form-group divCss8" style="margin:0">
<label for="inpNo">来源:</label>
<select class="form-control" id="source">
<option value="">全部</option>
</select>
</div>
<div class="row">
<!--数据表格-->
<table id="table2" class="table text-nowrap table-striped"></table>
<div class="form-group divCss8" style="margin:0;margin-left: 10px;">
<button type="button" class="btn btn-primary btn-sm" id="searchBtn2">查询</button>
</div>
</div>
</div>
</form>
<div class="row">
<!--数据表格-->
<table id="table2" class="table text-nowrap table-striped"></table>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
@ -679,6 +679,67 @@
</div>
</div>
</div>
<!-- 模态框5Modal任务详情 -->
<div class="modal fade" id="workDetailModal" tabindex="1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content modal-contentCenter">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
任务详情
</h4>
</div>
<div class="modal-body divCss2">
<div class="row">
<div class="col-sm-12">
<div class="form-inline">
<div class="form-group divCss8" style="margin:10px 5px">
<label for="name">标题:</label>
<input type="text" class="input-sm form-control" id="" maxlength="25"
placeholder="请输入标题">
</div>
<div class="form-group divCss8" style="margin:0">
<label for="inpNo">状态:</label>
<select class="form-control" id="">
<option value="">正采</option>
<option value="">完成</option>
</select>
</div>
<div class="form-group divCss8" style="margin:0">
<label for="inpNo">来源:</label>
<select class="form-control" id="">
<option value="">his</option>
<option value="">lis</option>
<option value="">手麻</option>
</select>
</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" style="margin:0;margin-left: 10px;">
<button type="button" class="btn btn-primary btn-sm" id="searchBtn2">查询</button>
</div>
</div>
</div>
<!--数据表格-->
<div class="col-sm-12">
<table id="table5" class="table text-nowrap table-striped"></table>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<script src="${path}/static/js/beHospList/beHospList.js?time=2020-09-11"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-09-11"></script>

@ -354,7 +354,7 @@
</div>
<footer class="main-footer">
<div class="pull-right">
<b>Version</b> 20200911_1
<b>Version</b> 20200918
</div>
<strong>Copyright &copy; 2019-2090 厦门嘉时软件.</strong> All rights
reserved.

@ -0,0 +1,136 @@
<%@ 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>
/* .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>
<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;height: 50px">
<div class="form-inline">
<div class="form-group divCss8">
<div class="input-group">
<select class="form-control" id="dateFlag">
<option value="1">按日查询</option>
<option value="2">按月查询</option>
<option value="3">按年查询</option>
</select>
</div>
</div>
<div class="form-group divCss8" id="day">
<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 divCss8" id="month" style="display: none">
<label>出院月查询:</label>
<div class="input-group">
<input type="text" class="input-sm form-control" id="startTime3" style="text-align: center"
maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" id="endTime3" style="text-align: center"
maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss8" id="year" style="display: none">
<label>出院年查询:</label>
<div class="input-group">
<input type="text" class="input-sm form-control" id="startTime4" style="text-align: center"
maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" id="endTime4" 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" data-live-search="true" name="deptName"
id="deptName"
title="请输入出院科室">
<option value="">全部</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>
<%-- <p style="text-align: left">
<span>查询科室:</span><span style="color:red;font-size:16px" id="checkedOption">全部</span>
</p>--%>
<!--数据表格-->
<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/signedRecord.js?time=2020-08-21"></script>
</body>
</html>

@ -0,0 +1,160 @@
<%@ 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>
/* .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;
}
/* .table{
overflow: hidden;
}*/
thead>tr:first-child>th:nth-child(8){
background:green
}
thead>tr:first-child>th:nth-child(7){
background:mediumseagreen;
}
thead>tr:first-child>th:nth-child(6){
background:limegreen;
}
thead>tr:first-child>th:nth-child(5){
background:springgreen;
}
thead>tr:first-child>th:nth-child(4){
background:lawngreen;
}
thead>tr:first-child>th:nth-child(3){
background:palegreen;
}
thead>tr:last-child>th:nth-child(-n+18){
background:green
}
thead>tr:last-child>th:nth-child(-n+15){
background:mediumseagreen;
}
thead>tr:last-child>th:nth-child(-n+12){
background:limegreen;
}
thead>tr:last-child>th:nth-child(-n+9){
background:springgreen;
}
thead>tr:last-child>th:nth-child(-n+6){
background:lawngreen;
}
thead>tr:last-child>th:nth-child(-n+3){
background:palegreen;
}
</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;height: 50px">
<div class="form-inline">
<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" name="deptName"
id="deptName"
title="请输入出院科室">
<option value="">全部</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="count1">0</span>&nbsp;个,
总体提交率&nbsp;<span style="color:red" id="count1Percent">0%</span>&nbsp;;
病历归档&nbsp;<span style="color:red" id="count2">0</span>&nbsp;个,
总体归档率&nbsp;<span style="color:red" id="count2Percent">0%</span>&nbsp;;
病历采集完整&nbsp;<span style="color:red" id="count3">0</span>&nbsp;份,
总体完整率&nbsp;<span style="color:red" id="count3Percent">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/submitRecord.js?time=2020-08-21"></script>
</body>
</html>

@ -76,12 +76,19 @@ body {
width: 85%!important;
}
.modal-contentLow {
width: 80%;
margin: 25% auto!important;
}
width: 80%;
margin: 25% auto!important;
}
.modal-contentHigh{
margin-top: 5%!important;
}
.modal-contentCenter{
margin-top: 10%!important;
}
.modal-contentLowCenter {
width: 75%;
margin: 25% auto!important;
}
.enterCss {
min-height: 800px;
}

@ -997,4 +997,212 @@ $("#saveBtn").click(function () {
}
});
});
$("#workDetail").click(function(){
$("#workDetailModal").modal({
show: true//弹出对话框
});
initTable5()
})
//任务详情
function initTable5() {
$("#table5").bootstrapTable("destroy");
$("#table5").bootstrapTable({ // 对应table标签的id
//method: 'POST',
url: path+"/inHosp/getAssortdetail", // 获取表格数据的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,
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 将自动去掉搜索字符的前后空格。
sortable: true,
queryParams: function (params) {
var currPageSize = this.pageSize;
if (currPageSize == 2) {
currPageSize = 10;
}
var limit = null;
var offset = params.offset;
var patientId = $("#idLab").html();
var assortId = $("#assortId").html();
if (assortId == 0) assortId = null;
//判断是否导出全部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, //页码
sort:params.sort,
order: params.order, //排位命令descasc
patientId: patientId,
assortId: assortId,
checker:$("#checker").val(),
source:$("#source").val(),
title:$("#title").val()
};
return temp;
},
columns: [{
title: '全选',
field: 'select', //复选框
checkbox: true,
width: 25,
align: 'center',
hidden: true,
}, {
title: '序',
field: 'id',
align: 'left',
visible: false
},
{
title: '标题',
field: 'title',
align: 'left',
valign: 'middle'
},
{
title: '最新修改',
field: 'uploaddatetime',
align: 'left',
valign: 'middle',
sortable: true,
width: 150, // 定义列的宽度单位为像素px
},
{
title: '同步时间',
field: 'uploaddatetime',
align: 'left',
valign: 'middle',
sortable: true,
width: 150, // 定义列的宽度单位为像素px
},
{
title: '状态',
field: '',
align: 'left',
valign: 'middle',
width: 150, // 定义列的宽度单位为像素px
},
{
title: '备注',
field: '',
align: 'left',
valign: 'middle',
width: 150, // 定义列的宽度单位为像素px
},
{
title: '来源',
field: 'source',
align: 'center',
valign: 'middle',
sortable: true,
width: 50, // 定义列的宽度单位为像素px
},
{
title: '开始时间',
field: 'uploaddatetime',
align: 'left',
valign: 'middle',
sortable: true,
width: 150, // 定义列的宽度单位为像素px
},
{
title: '结束时间',
field: 'uploaddatetime',
align: 'left',
valign: 'middle',
sortable: true,
width: 150, // 定义列的宽度单位为像素px
},
{
title: "操作",
align: 'left',
valign: 'middle',
width: 120, // 定义列的宽度单位为像素px
formatter: function (value, row, index) {
//return '<button class="btn btn-danger btn-sm" onclick="selectFun(\'' + row + '\')">查看 </button>';
var html = '<button type="button" class="btn btn-primary btn-sm editInfo" >同步更新</button>';
return html;
}, events: {
'click .editInfo': function (e, value, row, index) {
$('#assortModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
//同步
$("#inpId").val(row.id);
$("#inpTitle").val(row.title);
//下拉类别
getZdAssort();
$("#inpType").val(row.assortId);
$("#inpSource").val(row.source);
$("#inpFlag").val(row.flag);
if (row.pdfPath != "" && row.pdfPath != "") {
$("#fileUrlInp").val(row.pdfPath);
$('#previewFile').css("display", "block");//显示预览按钮
}
}, 'click .stateInfo': function (e, value, row, index) {
$('#exampleModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
//同步
$("#idT").val(row.id);
}
},
cellStyle: function (value, row, index) {
return {classes: 'success'}
}
}
],
onLoadSuccess: function (result) { //加载成功时执行
// console.info("加载成功");
},
onLoadError: function () { //加载失败时执行
console.info("加载数据失败");
}, onCheckAll: function (rows) { //点击全选框时触发的操作
if (rows != null && rows.length) {
for (var i = 0; i < rows.length; i++) {
idArr.push(rows[i].id)
}
}
}, onCheck: function (row) {//点击每一个单选框时触发的操作
idArr.push(row.id)
}, onUncheck: function (row) {//取消每一个单选框时对应的操作;
var index = idArr.indexOf(row.id);
if (index > -1) {
idArr.splice(index, 1);
}
}, onUncheckAll: function (row) {//取消每一个单选框时对应的操作;
idArr = [];
}
});
}

@ -0,0 +1,336 @@
var tipLoad = 0;
var url = path + '/statistics/recordStatistics/';
//定义表格内容最大高度
var maxHeight = 0;
$(function(){
//加载科室
getDeptStatistics();
initTable();
})
//时间控件
function initDateInputMonth(idVal){
$('#startTime'+idVal).datepicker({
language: "zh-CN",
format: "yyyy-mm",
startView: 'years', //起始选择范围
maxViewMode:'years', //最大选择范围
minViewMode:'months', //最小选择范围
autoclose: true//选中之后自动隐藏日期选择框
}).on('changeDate',function(){
$("#beginTime-error").hide();
var startTime= $("#startTime"+idVal).val();
$("#endTime"+idVal).datepicker('setStartDate',startTime);
$("#startTime"+idVal).datepicker('hide');
});
$('#endTime'+idVal).datepicker({
language: "zh-CN",
format: "yyyy-mm",
startView: 'years', //起始选择范围
maxViewMode:'years', //最大选择范围
minViewMode:'months', //最小选择范围
autoclose: true//选中之后自动隐藏日期选择框
}).on('changeDate',function(){
var startTime = $("#startTime"+idVal).val();
var endtime = $("#endTime"+idVal).val();
$("#startTime"+idVal).datepicker('setEndDate',endtime);
$("#endTime"+idVal).datepicker('hide');
});
}
function initDateInputYear(idVal){
$('#startTime'+idVal).datepicker({
language: "zh-CN",
format: "yyyy",
startView: 'years', //起始选择范围
maxViewMode:'years', //最大选择范围
minViewMode:'years', //最小选择范围
autoclose: true//选中之后自动隐藏日期选择框
}).on('changeDate',function(){
$("#beginTime-error").hide();
var startTime= $("#startTime"+idVal).val();
$("#endTime"+idVal).datepicker('setStartDate',startTime);
$("#startTime"+idVal).datepicker('hide');
});
$('#endTime'+idVal).datepicker({
language: "zh-CN",
format: "yyyy",
startView: 'years', //起始选择范围
maxViewMode:'years', //最大选择范围
minViewMode:'years', //最小选择范围
autoclose: true//选中之后自动隐藏日期选择框
}).on('changeDate',function(){
var startTime = $("#startTime"+idVal).val();
var endtime = $("#endTime"+idVal).val();
$("#startTime"+idVal).datepicker('setEndDate',endtime);
$("#endTime"+idVal).datepicker('hide');
});
}
//出院时段触发查询
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});
}
//加载科室
function getDeptStatistics() {
//获取科室列表
$.ajax({
url: path+"/inHosp/getDept",
type: "POST",
data: {effective: 1, typecode: "dept_code"},
async:false,
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'); //
}
});
}
/*//科室变更事件
$("#deptName").change(function () {
var text = $(this).find('option:checked').text();
$("#checkedOption").text(text);
})*/
//按日期查询变更事件
$("#dateFlag").change(function(){
var value = $(this).val();
if(value == 1){
$("#day").show();
$("#month").hide();
$("#year").hide();
}else if(value == 2){
$("#day").hide();
$("#month").show();
$("#year").hide();
//获取加载层数级
initDateInputMonth(3);
}else if(value == 3){
$("#day").hide();
$("#month").hide();
$("#year").show();
initDateInputYear(4);
}
})
//格式化百分比
function formatPercent(value){
if(value != null){
value = value.substring(0,value.length-1);
var color = '';
if(value >= 80){
color = 'green';
}else{
color = 'red';
}
return '<span style="color:'+color+'">'+value+'%</span>';
}else{
return value;
}
}
//第二层,按科室分组查
function initTable() {
$("#table").bootstrapTable({ // 对应table标签的id
url: path + "/record/getSignedRecordList", // 获取表格数据的url
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
striped: true, //表格显示条纹默认为false
pagination: true, // 在表格底部显示分页组件默认false
paginationShowPageGo: true,
pageList: [10, 20, 50, 100], // 如果设置了分页设置可供选择的页面数据条数。设置为All 则显示所有记录。
sidePagination: 'server', // 设置为服务器端分页 客户端client
searchOnEnterKey: true, //设置为 true时按回车触发搜索方法否则自动触发搜索方法
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: '序号',
align: 'center',
formatter: function (value, row, index) {
return index + 1;
}
},
{
title: '出院日期',
field: 'disDate',
align: 'center'
},
{
title: '出院科室',
field: 'deptNameCn',
align: 'center'
},
{
title: '出院人数',
field: 'allCount',
align: 'center'
},
{
title: '采集完整',
field: 'count3',
align: 'center'
},
{
title: '已提交',
field: 'count1',
align: 'center'
},
{
title: '已归档',
field: 'count2',
align: 'center'
},
{
title: '完整率',
field: 'count3Percent',
align: 'center',
formatter: function (value, row, index) {
return formatPercent(value);
}
},
{
title: '提交率',
field: 'count1Percent',
align: 'center',
formatter: function (value, row, index) {
return formatPercent(value);
}
},
{
title: '归档率',
field: 'count2Percent',
align: 'center',
formatter: function (value, row, index) {
return formatPercent(value);
}
}
],
onLoadSuccess: function (result) { //加载成功时执行
$(".page-list").show();
}
});
}
//各表格查询条件
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();
deptName = $("#deptName").val();
}
var dateFlag = $("#dateFlag").val();
var startDate = getStartOrEndDate(dateFlag,"startTime");
var endDate = getStartOrEndDate(dateFlag,"endTime");
var temp = {
offset:offset,
limit:limit,
startDate: startDate,
endDate: endDate,
deptName:deptName,
dateFlag:dateFlag
};
return temp;
}
//查询按钮
$('#searchBtnStatistics').click(function () {
//查询之后重新从第一页算起
$("#table").bootstrapTable("refreshOptions", {pageNumber: 1});
});
//键盘回车查询
$(document).keyup(function(event){
if(event.keyCode ==13){
$("#searchBtnStatistics").trigger("click");
}
});
//导出excel功能
$("#excelBtn").click(function () {
var dateFlag = $("#dateFlag").val();
var deptName = $("#deptName").val();
var startDate = getStartOrEndDate(dateFlag,"startTime");
var endDate = getStartOrEndDate(dateFlag,"endTime");
var url = path+"/record/exportExcelSigned";
post(url,{
"deptName":deptName,
"startDate":startDate,
"endDate":endDate,
"dateFlag":dateFlag
});
});
function getStartOrEndDate(dateFlag,divId){
if(dateFlag == 1){
return $("#"+divId+"1").val();
}else if(dateFlag == 2){
return $("#"+divId+"3").val();
}else if(dateFlag == 3){
return $("#"+divId+"4").val();
}
}

@ -5,8 +5,11 @@ var maxHeight = 0;
$(function(){
//加载科室
getDeptStatistics();
initTable();
//加载病案统计
selectCount();
//获取加载层数级
var level = $("#level").val();
/*var level = $("#level").val();
switch (level) {
case '1':
initTable();
@ -17,8 +20,112 @@ $(function(){
case '3':
initTable2(getDeptName(),'table2');
break;
}
}*/
})
//加载病案统计
function selectCount(){
$.ajax({
type:'get',
url:path+'/record/selectCount',
dataType:'json',
async:false,
data:{
startDate: $("#startTime1").val(),
endDate: $("#endTime1").val(),
deptName:getDeptName()
},
success:function(data){
if(data.code == 100){
var record = data.extend.record;
$("#allCount").text(record.allCount);
$("#count1").text(record.count1);
var count1Percent = record.count1Percent;
$("#count1Percent").text(count1Percent);
var count1PercentTemp = count1Percent.substring(0,count1Percent.length-1);
var color = '';
if(count1PercentTemp >= 80){
//颜色呈绿色
color = "green";
}else{
//颜色呈红色
color = "red";
}
$("#count1Percent").css("color",color);
$("#count2").text(record.count2);
var count2Percent = record.count2Percent;
$("#count2Percent").text(count2Percent);
var count2PercentTemp = count2Percent.substring(0,count2Percent.length-1);
if(count2PercentTemp >= 80){
//颜色呈绿色
color = "green";
}else{
//颜色呈红色
color = "red";
}
$("#count2Percent").css("color",color);
$("#count3").text(record.count3);
var count3Percent = record.count3Percent;
$("#count3Percent").text(count3Percent);
var count3PercentTemp = count3Percent.substring(0,count3Percent.length-1);
if(count3PercentTemp >= 80){
//颜色呈绿色
color = "green";
}else{
//颜色呈红色
color = "red";
}
$("#count3Percent").css("color",color);
}else{
toastr.error(data.msg);
}
}
})
}
//出院时段触发查询
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});
//加载病案统计
selectCount();
}
//加载科室
function getDeptStatistics() {
//获取科室列表
@ -31,8 +138,6 @@ function getDeptStatistics() {
if (result != null) {
var html = '';
for (var i = 0; i < result.length; i++) {
//默认需要选中
var searchDeptName = $("#searchDeptName").val().split(",");
//定义是否包含默认需要选中的
var name = result[i].name;
var py = makePy(name);
@ -41,7 +146,6 @@ function getDeptStatistics() {
}
$("#deptName").append(html);
$("#deptAdmissionTo").append(html);
$("#deptName").val(searchDeptName);
}
$(".selectpicker").selectpicker('refresh'); //
}
@ -50,13 +154,16 @@ function getDeptStatistics() {
//第一层,查全部
function initTable() {
$("#table").bootstrapTable({ // 对应table标签的id
url: path+"/statistics/getRecordStatistics", // 获取表格数据的url
url: path+"/record/getSubmitRecordList", // 获取表格数据的url
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
striped: true, //表格显示条纹默认为false
pagination: true, // 在表格底部显示分页组件默认false
paginationShowPageGo: true,
pageList: [10, 20, 50, 100], // 如果设置了分页设置可供选择的页面数据条数。设置为All 则显示所有记录。
sidePagination: 'server', // 设置为服务器端分页 客户端client
toolbar: '#toolbar',//指定工具栏
searchOnEnterKey: true, //设置为 true时按回车触发搜索方法否则自动触发搜索方法
detailView:true,//是否可展开
detailView:false,//是否可展开
undefinedText: '--', //当数据为 undefined 时显示的字符
singleSelect: false,//设置True 将禁止多选
clickToSelect: true,//设置true 将在点击行时自动选择rediobox 和 checkbox
@ -67,50 +174,168 @@ function initTable() {
queryParams: function (params) {
return queryParams(params,this,'');
},
columns: [
columns:[
[{
title: '科室名称',
field: 'deptNameCn',
align: 'center',
colspan: 1,
rowspan: 2
},
{
title: '出院人数',
field: 'count',
align: 'center',
colspan: 1,
rowspan: 2
},
{
title: '医生',
align: 'center',
colspan: 3,
rowspan: 1
},
{
title: '医生质控员',
align: 'center',
colspan: 3,
rowspan: 1
},
{
title: '科主任',
align: 'center',
colspan: 3,
rowspan: 1
},
{
title: '护士',
align: 'center',
colspan: 3,
rowspan: 1
},
{
title: '护士质控员',
align: 'center',
colspan: 3,
rowspan: 1
},
{
title: '护士长',
align: 'center',
colspan: 3,
rowspan: 1
},
],
[{
title: '已提交',
field: 'doctorSubmitCount',
align: 'center'
},
{
title: '序号',
title: '未提交',
field: 'unDoctorSubmitCount',
align: 'center'
},
{
title: '提交率',
field: 'doctorSubmitPercent',
align: 'center',
formatter: function (value, row, index) {
return index + 1;
return formatPercent(value);
}
},
{
title: '出院人数',
field: 'allRecordCount',
title: '已提交',
field: 'doctorCheckCount',
align: 'center'
},
{
title: '总文件数',
field: 'allFileCount',
title: '未提交',
field: 'unDoctorCheckCount',
align: 'center'
},
{
title: '总页数',
field: 'allPageCount',
title: '提交率',
field: 'doctorCheckPercent',
align: 'center',
formatter: function (value, row, index) {
return formatPercent(value);
}
},
{
title: '已提交',
field: 'directorCheckCount',
align: 'center'
},
{
title: '自动采集总文件数',
field: 'autoCollectionFileCount',
title: '未提交',
field: 'unDirectorCheckCount',
align: 'center'
},
{
title: '自动采集总页数',
field: 'autoCollectionPageCount',
title: '提交率',
field: 'directorCheckPercent',
align: 'center',
formatter: function (value, row, index) {
return formatPercent(value);
}
},
{
title: '已提交',
field: 'nurseSubmitCount',
align: 'center'
},
{
title: '扫描上传总文件数',
field: 'manualScanFileCount',
title: '未提交',
field: 'unNurseSubmitCount',
align: 'center'
},
{
title: '扫描上传总页数',
field: 'manualScanPageCount',
title: '提交率',
field: 'nurseSubmitPercent',
align: 'center',
formatter: function (value, row, index) {
return formatPercent(value);
}
},
{
title: '已提交',
field: 'nurseCheckCount',
align: 'center'
},
{
title: '未提交',
field: 'unNurseCheckCount',
align: 'center'
},
{
title: '提交率',
field: 'nurseCheckPercent',
align: 'center',
formatter: function (value, row, index) {
return formatPercent(value);
}
},
{
title: '已提交',
field: 'headNurseCount',
align: 'center'
},
{
title: '未提交',
field: 'unHeadNurseCount',
align: 'center'
},
{
title: '提交率',
field: 'headNursePercent',
align: 'center',
formatter: function (value, row, index) {
return formatPercent(value);
}
},
/*{
title:'操作',
align: 'center',
valign: 'middle',
@ -120,23 +345,25 @@ function initTable() {
return showDetail('2',null);
}
}
}
],
}*/
]],
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);
initTable1();
}
}*/
});
}
//第二层,按科室分组查
function initTable1() {
/*function initTable1() {
$("#table1").bootstrapTable({ // 对应table标签的id
url: path + "/statistics/getRecordStatisticsGroupDept", // 获取表格数据的url
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
@ -328,7 +555,7 @@ function initTable2(deptName,tableId) {
//reloadTableHeight("table2");
}
});
}
}*/
//各表格查询条件
function queryParams(params,_this,deptName){
var currPageSize = _this.pageSize;
@ -354,15 +581,12 @@ function queryParams(params,_this,deptName){
limit:limit,
startDate: $("#startTime1").val(),
endDate: $("#endTime1").val(),
deptName:deptName,
timeInterval:$("#timeInterval").val(),
name:$("#name").val(),
inpNo:$("#inpNo").val()
deptName:deptName
};
return temp;
}
//封装展开显示按钮方法
function showDetail(level,deptName){
/*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){
@ -378,23 +602,12 @@ function showDetailMethod(level,deptName){
+ "&endDate="+endDate+"&timeInterval="+timeInterval+"&name="+name
+"&inpNo="+inpNo;
window.open(urlTemp);
}
}*/
//查询按钮
$('#searchBtnStatistics').click(function () {
$("#isSearch").val(1);
//查询之后重新从第一页算起
if (tipLoad == 0) {
var level = $("#level").val();
if(level == '1') {
$("#table").bootstrapTable("refreshOptions", {pageNumber: 1});
}else if(level == '2') {
$("#table1").bootstrapTable("refreshOptions", {pageNumber: 1});
}else if(level == '3') {
$("#table2").bootstrapTable("refreshOptions", {pageNumber: 1});
}
} else {
toastr.warning("正在查询,请稍等...");
}
selectCount();
$("#table").bootstrapTable("refreshOptions", {pageNumber: 1});
});
//键盘回车查询
$(document).keyup(function(event){
@ -402,3 +615,15 @@ $(document).keyup(function(event){
$("#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
});
});

@ -91,17 +91,17 @@ function onClick(e, treeId, treeNode) {
//加载pdfan按钮功能
function onloadPdf(){
var detailIds = $("#detailIds").val();
var url = path+"/font/getPdfToPdf";
var url = path + "/font/getPdfToPdf";
$.ajax({
type:'post',
url:url,
data:{detailIds:detailIds},
success:function(data){
if(data.code == 100){
var pdfUrl = path+"/static/pdfjs/web/viewer.html?file="+path+"/font/showPdf";
$("#iframe1").attr("src",pdfUrl);
$("#iframe1").css("height",$("body")[0].offsetHeight)
}else{
type: 'post',
url: url,
data: {detailIds: detailIds},
success: function (data) {
if (data.code == 100) {
var pdfUrl = path + "/static/pdfjs/web/viewer.html?file=" + path + "/font/showPdf";
$("#iframe1").attr("src", pdfUrl);
$("#iframe1").css("height", $("body")[0].offsetHeight)
} else {
toastr.error(data.msg);
}
}

@ -93,4 +93,19 @@ if (index != null && index != "" && index.indexOf("export") != -1) {
} else {
$("#excelBtn").hide();
$(".columns-right").hide();
}
//格式化百分比
function formatPercent(value){
if(value != null){
value = value.substring(0,value.length-1);
var color = '';
if(value >= 80){
color = 'green';
}else{
color = 'red';
}
return '<span style="color:'+color+'">'+value+'%</span>';
}else{
return value;
}
}
Loading…
Cancel
Save