From 6074be2a123bda2948f20e985c40785bfef3ea73 Mon Sep 17 00:00:00 2001 From: "jian.wang" <824612544@qq.com> Date: Tue, 30 Jul 2024 17:35:54 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=B8=85=E7=90=86js?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/emr/controller/NoCacheFilter.java | 17 ----------------- src/main/webapp/WEB-INF/web.xml | 11 ----------- 2 files changed, 28 deletions(-) delete mode 100644 src/main/java/com/emr/controller/NoCacheFilter.java diff --git a/src/main/java/com/emr/controller/NoCacheFilter.java b/src/main/java/com/emr/controller/NoCacheFilter.java deleted file mode 100644 index 352322c..0000000 --- a/src/main/java/com/emr/controller/NoCacheFilter.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.emr.controller; - -import javax.servlet.*; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -public class NoCacheFilter implements Filter { - public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { - HttpServletResponse response = (HttpServletResponse) res; - - response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); - response.setHeader("Pragma", "no-cache"); - response.setDateHeader("Expires", 0); - - chain.doFilter(req, res); - } -} \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 00e2609..034e594 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -76,15 +76,4 @@ urlFilter /* - - - NoCacheFilter - com.emr.controller.NoCacheFilter - - - NoCacheFilter - *.css - *.jsp - *.js - \ No newline at end of file From b77870f391ffe29cda7e58be87f4d0ca10fac1f2 Mon Sep 17 00:00:00 2001 From: "jian.wang" <824612544@qq.com> Date: Mon, 19 Aug 2024 16:05:04 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=B9=BF=E6=80=BB=E8=A1=80=E6=B6=B2?= =?UTF-8?q?=E5=87=80=E5=8C=96=E9=9C=80=E6=B1=82=E5=AE=8C=E6=88=90=E4=B8=80?= =?UTF-8?q?=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/emr/controller/FontController.java | 107 ++-- .../com/emr/controller/LoginController.java | 7 + .../bloodPurificationController.java | 605 +++++++++++++++++- .../BloodPurificationMapper.java | 25 + .../com/emr/entity/EmrBloodDialysisDoc.java | 4 +- .../BloodPurificationService.java | 22 + .../impl/BloodPurificationServiceImpl.java | 56 ++ .../PrintOrDownLoadInfoService.java | 4 +- src/main/java/com/emr/util/DateUtils.java | 54 +- src/main/java/com/emr/util/img2PdfUtil.java | 73 ++- src/main/java/com/emr/util/imgToPdfUtil.java | 13 +- src/main/resources/mapper/CommomMapper.xml | 2 +- .../BloodPurificationMapper.xml | 454 ++++++++++++- .../bloodPurification/documentList.jsp | 32 +- .../bloodPurification/inspectionRecords.jsp | 242 ++++++- .../commomSearch/commomListqf.jsp | 4 +- src/main/webapp/index.jsp | 17 + .../bloodPurification/inspectionRecords.js | 321 ++++++++-- .../bloodPurification/inspectionRecordsSum.js | 6 + .../commomSearch/showRecordIframeBlood.js | 30 +- .../templateSearch/searchCommomMethodqf.js | 30 +- src/main/webapp/static/pdfjs/web/viewer2.html | 8 +- 22 files changed, 1922 insertions(+), 194 deletions(-) diff --git a/src/main/java/com/emr/controller/FontController.java b/src/main/java/com/emr/controller/FontController.java index 9f1c300..1a42c75 100644 --- a/src/main/java/com/emr/controller/FontController.java +++ b/src/main/java/com/emr/controller/FontController.java @@ -11,6 +11,7 @@ import com.emr.dao.emrPdfWaterSet.EmrPdfWaterSetMapper; import com.emr.dao.recordLock.Emr_LockMapper; import com.emr.dao.tScanAssort.T_Scan_AssortMapper; import com.emr.entity.Power_User; +import com.emr.entity.ResultUtil; import com.emr.entity.Zd_Assort; import com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet; import com.emr.entity.recordType.Emr_Type; @@ -644,50 +645,82 @@ public class FontController { */ @RequestMapping(value = "commomListqf", method = RequestMethod.GET) public String commomListqf(Model model, HttpServletRequest request, - @RequestParam("dataSource") String dataSource, @RequestParam(value="hemodialysisId",required = false) String hemodialysisId, @RequestParam(value="admissId",required = false) String admissId, @RequestParam(value="outpatientNo",required = false) String outpatientNo) { - String userName = ObjectUtils.isEmpty(request.getParameter("userName")) ? "admin" : request.getParameter("userName"); - Map params = new HashMap<>(); - params.put("userName", userName); - params.put("userPwd", "123456"); - String result = HttpClientUtils.doPost(POWER_URLHEAD + "/login", params); - JSONObject jsonObject = JSONObject.parseObject(result); - String token = jsonObject.getString("token"); - if(!ObjectUtils.isEmpty(token)){ - this.getUserInfo(request, token, userName); - //查询表格配置表的数据,根据配置动态显示表格字段 - Map tableConfigMap = commomMapper.queryTableConfig(dataSource); - if(!ObjectUtils.isEmpty(tableConfigMap)){ - //血透ID 广总血透接口的参数 - model.addAttribute("hemodialysisId",hemodialysisId); - //住院号 - model.addAttribute("admissId",admissId); - //门诊号 - model.addAttribute("outpatientNo",outpatientNo); - //获取数据来源 - model.addAttribute("dataSource",dataSource); - //获取需要查询字段 - model.addAttribute("tableQueryField",tableConfigMap.get("tableField")); - //显示查询字段,并转为驼峰格式 - model.addAttribute("tableField", ObjectUtils.isEmpty(tableConfigMap.get("tableField")) ? "" : DateUtils.toCamelCase(tableConfigMap.get("tableField").toString())); - //获取查询字段中文名称 - model.addAttribute("tableFieldName",tableConfigMap.get("tableFieldName")); - //获取排序字段,可点击表头列实现排序 - model.addAttribute("sortField",ObjectUtils.isEmpty(tableConfigMap.get("sortField")) ? "" : DateUtils.toCamelCase(tableConfigMap.get("sortField").toString())); - //获取默认排序字段 - request.getSession().setAttribute("defaultSortField",tableConfigMap.get("defaultSortField")); - //获取默认排序字段方式 - request.getSession().setAttribute("defaultSortFieldType",tableConfigMap.get("defaultSortFieldType")); + try { + String userName = request.getParameter("userName"); + String dataSource = request.getParameter("dataSource"); + if(ObjectUtils.isEmpty(userName)){ + model.addAttribute("msg", "用户账号不能为空"); + return "font/msg"; + } + if(ObjectUtils.isEmpty(dataSource)){ + model.addAttribute("msg", "数据源(dataSource)不能为空"); + return "font/msg"; + } + Map params = new HashMap<>(); + Map userParams = new HashMap<>(); + + /** + * 通过userName查询用户账号密码 + */ + userParams.put("userName", userName); + String userResult = HttpClientUtils.doPost(POWER_URLHEAD + "/queryUserByUserNameAndPassword", userParams); + JSONObject userResultJson = JSONObject.parseObject(userResult); + if(ObjectUtils.isEmpty(userResultJson)){ + model.addAttribute("msg", "用户账号不存在"); + return "font/msg"; + } + if(!"1".equals(userResultJson.getString("effective"))){ + model.addAttribute("msg", "用户账号已设置为无效"); + return "font/msg"; } + params.put("userName", userResultJson.getString("userName")); + params.put("userPwd", userResultJson.getString("userPwd")); + params.put("remark", "GZINTERFACE"); + + String result = HttpClientUtils.doPost(POWER_URLHEAD + "/login", params); + JSONObject jsonObject = JSONObject.parseObject(result); + String token = jsonObject.getString("token"); + if(!ObjectUtils.isEmpty(token)){ + this.getUserInfo(request, token, userName); + //查询表格配置表的数据,根据配置动态显示表格字段 + Map tableConfigMap = commomMapper.queryTableConfig(dataSource); + if(!ObjectUtils.isEmpty(tableConfigMap)){ + //血透ID 广总血透接口的参数 + model.addAttribute("hemodialysisId",hemodialysisId); + //住院号 + model.addAttribute("admissId",admissId); + //门诊号 + model.addAttribute("outpatientNo",outpatientNo); + //获取数据来源 + model.addAttribute("dataSource",dataSource); + //获取需要查询字段 + model.addAttribute("tableQueryField",tableConfigMap.get("tableField")); + //显示查询字段,并转为驼峰格式 + model.addAttribute("tableField", ObjectUtils.isEmpty(tableConfigMap.get("tableField")) ? "" : DateUtils.toCamelCase(tableConfigMap.get("tableField").toString())); + //获取查询字段中文名称 + model.addAttribute("tableFieldName",tableConfigMap.get("tableFieldName")); + //获取排序字段,可点击表头列实现排序 + model.addAttribute("sortField",ObjectUtils.isEmpty(tableConfigMap.get("sortField")) ? "" : DateUtils.toCamelCase(tableConfigMap.get("sortField").toString())); + //获取默认排序字段 + request.getSession().setAttribute("defaultSortField",tableConfigMap.get("defaultSortField")); + //获取默认排序字段方式 + request.getSession().setAttribute("defaultSortFieldType",tableConfigMap.get("defaultSortFieldType")); + } - return "recordManage/commomSearch/commomListqf"; - }else{ - model.addAttribute("msg", "模拟登录失败"); - return "font/msg"; + return "recordManage/commomSearch/commomListqf"; + }else{ + model.addAttribute("msg", "token获取失败"); + return "font/msg"; + } + }catch (Exception e) { + e.printStackTrace(); } + + return null; } public void getUserInfo(HttpServletRequest request, String token, String userName){ diff --git a/src/main/java/com/emr/controller/LoginController.java b/src/main/java/com/emr/controller/LoginController.java index e5ccf4a..e8cca23 100644 --- a/src/main/java/com/emr/controller/LoginController.java +++ b/src/main/java/com/emr/controller/LoginController.java @@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; +import java.util.Set; /** * @author HJL @@ -37,6 +38,9 @@ public class LoginController { private String WEBSOCKET_URLHEAD; @Value("${TOKEN_EXPIRE_TIME}") private long TOKEN_EXPIRE_TIME; + @Value("${export_pdf_hospital_info}") + private String hospitalName; + @Autowired private CommomService commomService; @@ -66,6 +70,9 @@ public class LoginController { } Power_User powerUser = JSON.parseObject(objects[0].toString(), Power_User.class); + if (powerUser.getMenus().contains("/pdfWaterSet/hospitalName")) { + model.addAttribute("hospitalName", hospitalName); + } //返回用户为空跳转到登录权限系统界面 if (null == powerUser) { return "redirect:" + POWER_URLHEAD + "/login"; diff --git a/src/main/java/com/emr/controller/bloodPurification/bloodPurificationController.java b/src/main/java/com/emr/controller/bloodPurification/bloodPurificationController.java index 61b3e05..668269c 100644 --- a/src/main/java/com/emr/controller/bloodPurification/bloodPurificationController.java +++ b/src/main/java/com/emr/controller/bloodPurification/bloodPurificationController.java @@ -4,14 +4,21 @@ import com.alibaba.fastjson.JSON; import com.emr.annotation.OptionalLog; import com.emr.dao.CommomMapper; import com.emr.dao.bloodPurification.BloodPurificationMapper; +import com.emr.dao.emrLog.Emr_LogMapper; +import com.emr.entity.EmrBloodApplyInfo; import com.emr.entity.EmrBloodDialysisDoc; import com.emr.entity.Power_User; +import com.emr.entity.ResultUtil; +import com.emr.entity.emrLog.Emr_Log; import com.emr.service.ImportExcel.ImportExcelEntity; import com.emr.service.ImportExcel.ImportExcelUtil; +import com.emr.service.bloodPurification.BloodPurificationService; import com.emr.util.DateUtils; import com.emr.util.ExceptionPrintUtil; +import com.emr.util.ExportExcelUtil; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import org.apache.commons.lang3.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; @@ -19,6 +26,8 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; import org.springframework.ui.Model; import org.springframework.util.CollectionUtils; import org.springframework.util.ObjectUtils; @@ -29,13 +38,15 @@ import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.nio.charset.Charset; import java.text.DecimalFormat; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.YearMonth; +import java.time.format.DateTimeFormatter; +import java.util.*; /** * 广总需求 血液净化数字病案 @@ -48,8 +59,15 @@ public class bloodPurificationController { @Autowired private BloodPurificationMapper bloodPurificationMapper; + @Autowired + private BloodPurificationService bloodPurificationService; + + @Autowired + private Emr_LogMapper logMapper; + /** * 病案查询 + * * @param model * @param request * @return @@ -83,6 +101,7 @@ public class bloodPurificationController { /** * 文书报表 + * * @param model * @param request * @return @@ -95,8 +114,42 @@ public class bloodPurificationController { return "recordManage/bloodPurification/documentList"; } + /** + * 审批页面 + * + * @param model + * @param request + * @return + */ + @RequiresPermissions("/bloodPurification/approveList") + @OptionalLog(module = "查看", methods = "血透检查记录审批") + @RequestMapping("bloodApproveList") + public String bloodApproveList(Model model, HttpServletRequest request) { + //获取当前的HttpSession对象,如果不存在则会创建一个新的会话 + HttpSession session = request.getSession(); + //向HttpSession中放入数据 + session.setAttribute("status", request.getParameter("status")); + + return "recordManage/bloodPurification/bloodApproveList"; + } + + /** + * 审批页面 + * + * @param model + * @param request + * @return + */ + @RequiresPermissions("/bloodPurification/flowLogList") + @OptionalLog(module = "查看", methods = "血透检查记录流程记录") + @RequestMapping("flowLogList") + public String flowLogList(Model model, HttpServletRequest request) { + return "recordManage/bloodPurification/flowLogList"; + } + /** * 检查记录汇总 + * * @param model * @param request * @return @@ -109,8 +162,19 @@ public class bloodPurificationController { return "recordManage/bloodPurification/inspectionRecordsSum"; } + /** + * 流程修改、删除日志管理 + * @return + */ + @RequiresPermissions("/bloodPurification/recordLogList") + @RequestMapping("recordLogList") + public String recordLogList(){ + return "recordManage/bloodPurification/recordLogList"; + } + /** * 检查记录明细 + * * @param model * @param request * @return @@ -124,10 +188,6 @@ public class bloodPurificationController { HttpSession session = request.getSession(); //向HttpSession中放入数据 - String inspectionDate = request.getParameter("inspectionDate"); - String name = request.getParameter("name"); - String dialysisDate = request.getParameter("dialysisDate"); - session.setAttribute("inspectionDate", request.getParameter("inspectionDate")); session.setAttribute("name", request.getParameter("name")); session.setAttribute("dialysisDate", request.getParameter("dialysisDate")); @@ -138,6 +198,7 @@ public class bloodPurificationController { /** * 查询检查记录汇总 + * * @param page * @param limit * @param emrBloodDialysisDoc @@ -145,16 +206,16 @@ public class bloodPurificationController { */ @RequestMapping("queryInspectionRecordsSum") @ResponseBody - public String queryInspectionRecordsSum(Integer page, Integer limit, EmrBloodDialysisDoc emrBloodDialysisDoc){ - if(null != page && null != limit){ + public String queryInspectionRecordsSum(Integer page, Integer limit, EmrBloodDialysisDoc emrBloodDialysisDoc) { + if (null != page && null != limit) { PageHelper.startPage(page, limit); } - try{ - List> dataMap = bloodPurificationMapper.queryInspectionRecordsSum(emrBloodDialysisDoc); + try { + List> dataMap = bloodPurificationMapper.queryInspectionRecordsSum(emrBloodDialysisDoc); //保留两位有效数字 DecimalFormat df = new DecimalFormat("0.00"); //遍历 获取有问题数量和总数 - if(!CollectionUtils.isEmpty(dataMap)){ + if (!CollectionUtils.isEmpty(dataMap)) { dataMap.forEach(e -> { //总数 double totalNum = ObjectUtils.isEmpty(e.get("total_num")) ? 0 : Double.parseDouble(e.get("total_num").toString()); @@ -199,13 +260,358 @@ public class bloodPurificationController { } PageInfo pageInfo = new PageInfo<>(dataMap); return JSON.toJSONString(pageInfo); - }catch (Exception e){ + } catch (Exception e) { ExceptionPrintUtil.printException(e); e.printStackTrace(); return null; } } + @RequestMapping("queryDocumentSum") + @ResponseBody + public ResultUtil queryDocumentSum(String date) { + try { + Map params = new HashMap<>();//参数集合 + Map resultMap = new HashMap<>();//返回数据集合 + + if (StringUtils.isEmpty(date)){ + date = DateUtils.getDate(DateUtils.getStringDate(new Date(),"yyyy-MM")); + } + + /** + * 计算传入日期参数date的同比,环比 + */ + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM"); + // 解析年份和月份 + YearMonth inputDate = YearMonth.parse(date, formatter); + // 计算同比日期(去年同月) + YearMonth sameMonthLastYear = inputDate.minusYears(1); + // 计算环比日期(上个月) + YearMonth lastMonth = inputDate.minusMonths(1); + // 将YearMonth对象转换成字符串 + String sameMonthLastYearStr = sameMonthLastYear.format(formatter); + String lastMonthStr = lastMonth.format(formatter); + + params.put("date", date);//当月 + params.put("lastMonth", lastMonthStr);//环比(上月) + params.put("sameMonthLastYear", sameMonthLastYearStr);//同比(去年同月) + + /** + * 计算传入日期参数date的季度,同比,环比 + */ + int year = Integer.valueOf(date.substring(0, 4)); + int month = Integer.valueOf(date.substring(5, 7)); + + int currentQuarter = (month - 1) / 3 + 1; + List currentQuarterMonths = DateUtils.getQuarterMonths(year, currentQuarter); //当前季度日期 + List previousQuarterMonths = DateUtils.getQuarterMonths(year, currentQuarter - 1);//季度环比日期 + List yoyQuarterMonth = DateUtils.getQuarterMonths(year - 1, currentQuarter);//同比(去年同季度) + + params.put("currentQuarterStartDate", currentQuarterMonths.get(0));//当前季度开始日期 + params.put("currentQuarterEndDate", currentQuarterMonths.get(2));//当前季度结束日期 + params.put("previousQuarterStartDate", previousQuarterMonths.get(0));//环比(上季度开始日期) + params.put("previousQuarterEndDate", previousQuarterMonths.get(2));//环比(上季度结束日期) + params.put("yoyQuarterStartDate", yoyQuarterMonth.get(0));//同比(去年同季度开始日期) + params.put("yoyQuarterEndDate", yoyQuarterMonth.get(2));//同比(去年同季度结束日期) + + /** + * 计算传入日期参数date的半年度,同比,环比 + */ + List halfYearMonths; + List previousHalfYearMonths; + List yoyHalfYearMonths; + // 判断是上半年还是下半年 + if (month >= 1 && month <= 6) { + halfYearMonths = DateUtils.getHalfYearMonths(year, true);//上半年日期 + //计算环比 + previousHalfYearMonths = DateUtils.getHalfYearMonths(year - 1, false);//环比(去年下半年日期) + //计算同比 + yoyHalfYearMonths = DateUtils.getHalfYearMonths(year - 1, true);//同比(去年上半年日期) + } else { + halfYearMonths = DateUtils.getHalfYearMonths(year, false);//下半年日期 + //计算环比 + previousHalfYearMonths = DateUtils.getHalfYearMonths(year, true);//环比(上半年日期) + //计算同比 + yoyHalfYearMonths = DateUtils.getHalfYearMonths(year - 1, false);//同比(去年下半年日期) + } + params.put("halfYearStartDate", halfYearMonths.get(0));//半年开始日期 + params.put("halfYearEndDate", halfYearMonths.get(5));//半年结束日期 + params.put("previousHalfYearStartDate", previousHalfYearMonths.get(0));//环比(上半年开始日期) + params.put("previousHalfYearEndDate", previousHalfYearMonths.get(5));//环比(上半年结束日期) + params.put("yoyHalfYearStartDate", yoyHalfYearMonths.get(0));//同比(去年上半年开始日期) + params.put("yoyHalfYearEndDate", yoyHalfYearMonths.get(5));//同比(去年上半年结束日期) + + /** + * 计算传入日期参数date的年度,同比,环比 + */ + params.put("year", String.valueOf(year));//当前年份 + params.put("previousYearStartDate", year + "-01");//环比 开始时间 + params.put("previousYearEndDate", lastMonthStr);//环比 结束时间 + params.put("lastYear", String.valueOf(year - 1));//同比 + + List> dataMap = bloodPurificationService.queryDocumentSum(params); + //保留两位有效数字 + DecimalFormat df = new DecimalFormat("0.00"); + //遍历 获取有问题数量和总数 + if (!CollectionUtils.isEmpty(dataMap)) { + dataMap.forEach(e -> { + /** + * 计算当月的数据 + */ + double bloodFillIncompleteRate = 0; + double healtheduFillIncompleteRate = 0; + double informedconDocNosignRate = 0; + + double bloodFillIncompleteRateHb = 0; + double healtheduFillIncompleteRateHb = 0; + double informedconDocNosignRateHb = 0; + + double bloodFillIncompleteRateYoy = 0; + double healtheduFillIncompleteRateYoy = 0; + double informedconDocNosignRateYoy = 0; + + double totalNum = ObjectUtils.isEmpty(e.get("total_num")) ? 0 : Double.parseDouble(e.get("total_num").toString());//总数 + double bloodTotalNum = ObjectUtils.isEmpty(e.get("blood_total_num")) ? 0 : Double.parseDouble(e.get("blood_total_num").toString());//血净记录缺失总数 + double healtheduTotalNum = ObjectUtils.isEmpty(e.get("healthedu_total_num")) ? 0 : Double.parseDouble(e.get("healthedu_total_num").toString());//健康教育缺失总数 + double informedconTotalNum = ObjectUtils.isEmpty(e.get("informedcon_total_num")) ? 0 : Double.parseDouble(e.get("informedcon_total_num").toString());//血透知情同意合格总数 + + if(totalNum > 0){ + bloodFillIncompleteRate = Double.parseDouble(df.format(bloodTotalNum / totalNum * 100));//血净记录缺失率 + healtheduFillIncompleteRate = Double.parseDouble(df.format(healtheduTotalNum / totalNum * 100)); //健康教育缺失率 + informedconDocNosignRate = Double.parseDouble(df.format(informedconTotalNum / totalNum * 100));//知情同意合格率 + } + + resultMap.put("bloodFillIncompleteRate", bloodFillIncompleteRate); + resultMap.put("healtheduFillIncompleteRate", healtheduFillIncompleteRate); + resultMap.put("informedconDocNosignRate", informedconDocNosignRate); + + //计算环比 + double totalHbNum = ObjectUtils.isEmpty(e.get("total_hb_num")) ? 0 : Double.parseDouble(e.get("total_hb_num").toString());//环比 总数 + double bloodTotalHbNum = ObjectUtils.isEmpty(e.get("blood_total_hb_num")) ? 0 : Double.parseDouble(e.get("blood_total_hb_num").toString());//环比 血净记录缺失总数 + double healtheduTotalHbNum = ObjectUtils.isEmpty(e.get("healthedu_total_hb_num")) ? 0 : Double.parseDouble(e.get("healthedu_total_hb_num").toString());//环比 健康教育缺失总数 + double informedconTotalHbNum = ObjectUtils.isEmpty(e.get("informedcon_total_hb_num")) ? 0 : Double.parseDouble(e.get("informedcon_total_hb_num").toString());//环比 知情同意合格总数 + + if(totalHbNum > 0){ + bloodFillIncompleteRateHb = Double.parseDouble(df.format(bloodTotalHbNum / totalHbNum * 100));//环比 血净记录缺失率 + healtheduFillIncompleteRateHb = Double.parseDouble(df.format(healtheduTotalHbNum / totalHbNum * 100)); //环比 健康教育缺失率 + informedconDocNosignRateHb = Double.parseDouble(df.format(informedconTotalHbNum / totalHbNum * 100));//环比 知情同意合格率 + } + + resultMap.put("bloodFillIncompleteRateHb", bloodFillIncompleteRateHb); + resultMap.put("healtheduFillIncompleteRateHb", healtheduFillIncompleteRateHb); + resultMap.put("informedconDocNosignRateHb", informedconDocNosignRateHb); + + //计算同比 + double totalYoyNum = ObjectUtils.isEmpty(e.get("total_tb_num")) ? 0 : Double.parseDouble(e.get("total_tb_num").toString());//同比 总数 + double bloodTotalYoyNum = ObjectUtils.isEmpty(e.get("blood_total_tb_num")) ? 0 : Double.parseDouble(e.get("blood_total_tb_num").toString());//同比 血净记录缺失总数 + double healtheduTotalYoyNum = ObjectUtils.isEmpty(e.get("healthedu_total_tb_num")) ? 0 : Double.parseDouble(e.get("healthedu_total_tb_num").toString());//同比 健康教育缺失总数 + double informedconTotalYoyNum = ObjectUtils.isEmpty(e.get("informedcon_total_tb_num")) ? 0 : Double.parseDouble(e.get("informedcon_total_tb_num").toString());//同比 知情同意合格总数 + + if(totalYoyNum > 0){ + bloodFillIncompleteRateYoy = Double.parseDouble(df.format(bloodTotalYoyNum / totalYoyNum * 100));//同比 血净记录缺失率 + healtheduFillIncompleteRateYoy = Double.parseDouble(df.format(healtheduTotalYoyNum / totalYoyNum * 100)); //同比 健康教育缺失率 + informedconDocNosignRateYoy = Double.parseDouble(df.format(informedconTotalYoyNum / totalYoyNum * 100));//同比 + } + + resultMap.put("bloodFillIncompleteRateYoy", bloodFillIncompleteRateYoy); + resultMap.put("healtheduFillIncompleteRateYoy", healtheduFillIncompleteRateYoy); + resultMap.put("informedconDocNosignRateYoy", informedconDocNosignRateYoy); + + /** + * 计算当季的数据 + */ + double bloodFillIncompleteRateQuarter = 0; + double healtheduFillIncompleteRateQuarter = 0; + double informedconDocNosignRateQuarter = 0; + + double bloodFillIncompleteRateQuarterHb = 0; + double healtheduFillIncompleteRateQuarterHb = 0; + double informedconDocNosignRateQuarterHb = 0; + + double bloodFillIncompleteRateQuarterYoy = 0; + double healtheduFillIncompleteRateQuarterYoy = 0; + double informedconDocNosignRateQuarterYoy = 0; + + double quarterTotalNum = ObjectUtils.isEmpty(e.get("quarter_total_num")) ? 0 : Double.parseDouble(e.get("quarter_total_num").toString());//总数 + double bloodTotalQuarterNum = ObjectUtils.isEmpty(e.get("quarter_blood_total_num")) ? 0 : Double.parseDouble(e.get("quarter_blood_total_num").toString());//当季 血净记录缺失总数 + double healtheduTotalQuarterNum = ObjectUtils.isEmpty(e.get("quarter_healthedu_total_num")) ? 0 : Double.parseDouble(e.get("quarter_healthedu_total_num").toString());//当季 健康教育缺失总数 + double informedconTotalQuarterNum = ObjectUtils.isEmpty(e.get("quarter_informedcon_total_num")) ? 0 : Double.parseDouble(e.get("quarter_informedcon_total_num").toString());//当季 知情同意合格总数 + + if(quarterTotalNum > 0){ + bloodFillIncompleteRateQuarter = Double.parseDouble(df.format(bloodTotalQuarterNum / quarterTotalNum * 100));//当季 血净记录缺失率 + healtheduFillIncompleteRateQuarter = Double.parseDouble(df.format(healtheduTotalQuarterNum / quarterTotalNum * 100)); //当季 健康教育缺失率 + informedconDocNosignRateQuarter = Double.parseDouble(df.format(informedconTotalQuarterNum / quarterTotalNum * 100));//当季 知 + } + + resultMap.put("bloodFillIncompleteRateQuarter", bloodFillIncompleteRateQuarter); + resultMap.put("healtheduFillIncompleteRateQuarter", healtheduFillIncompleteRateQuarter); + resultMap.put("informedconDocNosignRateQuarter", informedconDocNosignRateQuarter); + + //计算环比 + double quarterTotalHbNum = ObjectUtils.isEmpty(e.get("quarter_total_hb_num")) ? 0 : Double.parseDouble(e.get("quarter_total_hb_num").toString());//环比 总数 + double bloodTotalQuarterHbNum = ObjectUtils.isEmpty(e.get("quarter_blood_total_hb_num")) ? 0 : Double.parseDouble(e.get("quarter_blood_total_hb_num").toString());//环比 血净记录缺失总数 + double healtheduTotalQuarterHbNum = ObjectUtils.isEmpty(e.get("quarter_healthedu_total_hb_num")) ? 0 : Double.parseDouble(e.get("quarter_healthedu_total_hb_num").toString());//环比 健康教育缺失总数 + double informedconTotalQuarterHbNum = ObjectUtils.isEmpty(e.get("quarter_informedcon_total_hb_num")) ? 0 : Double.parseDouble(e.get("quarter_informedcon_total_hb_num").toString());//环比 知情同意合格总数 + + if(quarterTotalHbNum > 0){ + bloodFillIncompleteRateQuarterHb = Double.parseDouble(df.format(bloodTotalQuarterHbNum / quarterTotalHbNum * 100));//环比 血净记录缺失率 + healtheduFillIncompleteRateQuarterHb = Double.parseDouble(df.format(healtheduTotalQuarterHbNum / quarterTotalHbNum * 100));//环比 健康教育缺失率 + informedconDocNosignRateQuarterHb = Double.parseDouble(df.format(informedconTotalQuarterHbNum / quarterTotalHbNum * 100));//环比 + } + + resultMap.put("bloodFillIncompleteRateQuarterHb", bloodFillIncompleteRateQuarterHb); + resultMap.put("healtheduFillIncompleteRateQuarterHb", healtheduFillIncompleteRateQuarterHb); + resultMap.put("informedconDocNosignRateQuarterHb", informedconDocNosignRateQuarterHb); + + //计算同比 + double quarterTotalYoyNum = ObjectUtils.isEmpty(e.get("quarter_total_tb_num")) ? 0 : Double.parseDouble(e.get("quarter_total_tb_num").toString());//同比 总数 + double bloodTotalQuarterYoyNum = ObjectUtils.isEmpty(e.get("quarter_blood_total_tb_num")) ? 0 : Double.parseDouble(e.get("quarter_blood_total_tb_num").toString());//同比 血净记录缺失总数 + double healtheduTotalQuarterYoyNum = ObjectUtils.isEmpty(e.get("quarter_informedcon_total_tb_num")) ? 0 : Double.parseDouble(e.get("quarter_informedcon_total_tb_num").toString());//同比 健康教育缺失总数 + double informedconTotalQuarterYoyNum = ObjectUtils.isEmpty(e.get("quarter_healthedu_total_tb_num")) ? 0 : Double.parseDouble(e.get("quarter_healthedu_total_tb_num").toString());//同比 知情同意合格总数 + + if(quarterTotalYoyNum > 0){ + bloodFillIncompleteRateQuarterYoy = Double.parseDouble(df.format(bloodTotalQuarterYoyNum / quarterTotalYoyNum * 100));//同比 血净记录缺失率 + healtheduFillIncompleteRateQuarterYoy = Double.parseDouble(df.format(healtheduTotalQuarterYoyNum / quarterTotalYoyNum * 100));//同比 健康教育缺失率 + informedconDocNosignRateQuarterYoy = Double.parseDouble(df.format(informedconTotalQuarterYoyNum / quarterTotalYoyNum * 100));//同比 + } + + resultMap.put("bloodFillIncompleteRateQuarterYoy", bloodFillIncompleteRateQuarterYoy); + resultMap.put("healtheduFillIncompleteRateQuarterYoy", healtheduFillIncompleteRateQuarterYoy); + resultMap.put("informedconDocNosignRateQuarterYoy", informedconDocNosignRateQuarterYoy); + + /** + * 计算当前半年的数据 + */ + double bloodFillIncompleteRateHalfYear = 0; + double healtheduFillIncompleteRateHalfYear = 0; + double informedconDocNosignRateHalfYear = 0; + + double bloodFillIncompleteRateHalfYearHb = 0; + double healtheduFillIncompleteRateHalfYearHb = 0; + double informedconDocNosignRateHalfYearHb = 0; + + double bloodFillIncompleteRateHalfYearYoy = 0; + double healtheduFillIncompleteRateHalfYearYoy = 0; + double informedconDocNosignRateHalfYearYoy = 0; + + double halfYearTotalNum = ObjectUtils.isEmpty(e.get("halfYear_total_num")) ? 0 : Double.parseDouble(e.get("halfYear_total_num").toString());//半年 总数 + double bloodTotalHalfYearNum = ObjectUtils.isEmpty(e.get("halfYear_blood_total_num")) ? 0 : Double.parseDouble(e.get("halfYear_blood_total_num").toString());//半年 血净记录缺失总数 + double healtheduTotalHalfYearNum = ObjectUtils.isEmpty(e.get("halfYear_healthedu_total_num")) ? 0 : Double.parseDouble(e.get("halfYear_healthedu_total_num").toString());//半年 健康教育缺失总数 + double informedconTotalHalfYearNum = ObjectUtils.isEmpty(e.get("halfYear_informedcon_total_num")) ? 0 : Double.parseDouble(e.get("halfYear_informedcon_total_num").toString());//半年 知情同意合格总数 + + if(halfYearTotalNum > 0){ + bloodFillIncompleteRateHalfYear = Double.parseDouble(df.format(bloodTotalHalfYearNum / halfYearTotalNum * 100));//半年 血净记录缺失率 + healtheduFillIncompleteRateHalfYear = Double.parseDouble(df.format(healtheduTotalHalfYearNum / halfYearTotalNum * 100));//半年 健康教育缺失率 + informedconDocNosignRateHalfYear = Double.parseDouble(df.format(informedconTotalHalfYearNum / halfYearTotalNum * 100)); + } + + resultMap.put("bloodFillIncompleteRateHalfYear", bloodFillIncompleteRateHalfYear); + resultMap.put("healtheduFillIncompleteRateHalfYear", healtheduFillIncompleteRateHalfYear); + resultMap.put("informedconDocNosignRateHalfYear", informedconDocNosignRateHalfYear); + + //计算环比 + double halfYearTotalHbNum = ObjectUtils.isEmpty(e.get("halfYear_total_hb_num")) ? 0 : Double.parseDouble(e.get("halfYear_total_hb_num").toString());//环比 总数 + double bloodTotalHalfYearHbNum = ObjectUtils.isEmpty(e.get("halfYear_blood_total_hb_num")) ? 0 : Double.parseDouble(e.get("halfYear_blood_total_hb_num").toString());//环比 血净记录缺失总数 + double healtheduTotalHalfYearHbNum = ObjectUtils.isEmpty(e.get("halfYear_healthedu_total_hb_num")) ? 0 : Double.parseDouble(e.get("halfYear_healthedu_total_hb_num").toString());//环比 健康教育缺失总数 + double informedconTotalHalfYearHbNum = ObjectUtils.isEmpty(e.get("halfYear_informedcon_total_hb_num")) ? 0 : Double.parseDouble(e.get("halfYear_informedcon_total_hb_num").toString());//环比 知情同意合格总数 + + if(halfYearTotalHbNum > 0){ + bloodFillIncompleteRateHalfYearHb = Double.parseDouble(df.format(bloodTotalHalfYearHbNum / halfYearTotalHbNum * 100));//环比 血净记录缺失率 + healtheduFillIncompleteRateHalfYearHb = Double.parseDouble(df.format(healtheduTotalHalfYearHbNum / halfYearTotalHbNum * 100));//环比 健康教育缺失率 + informedconDocNosignRateHalfYearHb = Double.parseDouble(df.format(informedconTotalHalfYearHbNum / halfYearTotalHbNum * 100)); + } + + resultMap.put("bloodFillIncompleteRateHalfYearHb", bloodFillIncompleteRateHalfYearHb); + resultMap.put("healtheduFillIncompleteRateHalfYearHb", healtheduFillIncompleteRateHalfYearHb); + resultMap.put("informedconDocNosignRateHalfYearHb", informedconDocNosignRateHalfYearHb); + + //计算同比 + double halfYearTotalYoyNum = ObjectUtils.isEmpty(e.get("halfYear_total_tb_num")) ? 0 : Double.parseDouble(e.get("halfYear_total_tb_num").toString());//同比 总数 + double bloodTotalHalfYearYoyNum = ObjectUtils.isEmpty(e.get("halfYear_blood_total_tb_num")) ? 0 : Double.parseDouble(e.get("halfYear_blood_total_tb_num").toString());//同比 血净记录缺失总数 + double healtheduTotalHalfYearYoyNum = ObjectUtils.isEmpty(e.get("halfYear_healthedu_total_tb_num")) ? 0 : Double.parseDouble(e.get("halfYear_healthedu_total_tb_num").toString());//同比 健康教育缺失总数 + double informedconTotalHalfYearYoyNum = ObjectUtils.isEmpty(e.get("halfYear_informedcon_total_tb_num")) ? 0 : Double.parseDouble(e.get("halfYear_informedcon_total_tb_num").toString());// + + if(halfYearTotalYoyNum > 0){ + bloodFillIncompleteRateHalfYearYoy = Double.parseDouble(df.format(bloodTotalHalfYearYoyNum / halfYearTotalYoyNum * 100));//同比 血净记录缺失率 + healtheduFillIncompleteRateHalfYearYoy = Double.parseDouble(df.format(healtheduTotalHalfYearYoyNum / halfYearTotalYoyNum * 100));//同比 健康教育缺失率 + informedconDocNosignRateHalfYearYoy = Double.parseDouble(df.format(informedconTotalHalfYearYoyNum / halfYearTotalYoyNum * 100)); + } + + resultMap.put("bloodFillIncompleteRateHalfYearYoy", bloodFillIncompleteRateHalfYearYoy); + resultMap.put("healtheduFillIncompleteRateHalfYearYoy", healtheduFillIncompleteRateHalfYearYoy); + resultMap.put("informedconDocNosignRateHalfYearYoy", informedconDocNosignRateHalfYearYoy); + + /** + * 计算当前年的数据 + */ + double bloodFillIncompleteRateYear = 0; + double healtheduFillIncompleteRateYear = 0; + double informedconDocNosignRateYear = 0; + + double bloodFillIncompleteRateYearHb = 0; + double healtheduFillIncompleteRateYearHb = 0; + double informedconDocNosignRateYearHb = 0; + + double bloodFillIncompleteRateYearYoy = 0; + double healtheduFillIncompleteRateYearYoy = 0; + double informedconDocNosignRateYearYoy = 0; + + double yearTotalNum = ObjectUtils.isEmpty(e.get("year_total_num")) ? 0 : Double.parseDouble(e.get("year_total_num").toString());//当前年 总数 + double bloodTotalYearNum = ObjectUtils.isEmpty(e.get("year_blood_total_num")) ? 0 : Double.parseDouble(e.get("year_blood_total_num").toString());//当前年 血净记录缺失总数 + double healtheduTotalYearNum = ObjectUtils.isEmpty(e.get("year_healthedu_total_num")) ? 0 : Double.parseDouble(e.get("year_healthedu_total_num").toString());//当前年 健康教育缺失总数 + double informedconTotalYearNum = ObjectUtils.isEmpty(e.get("year_informedcon_total_num")) ? 0 : Double.parseDouble(e.get("year_informedcon_total_num").toString());//当前年 知情同意合格总数 + + if(yearTotalNum > 0){ + bloodFillIncompleteRateYear = Double.parseDouble(df.format(bloodTotalYearNum / yearTotalNum * 100));//环比 血净记录缺失率 + healtheduFillIncompleteRateYear = Double.parseDouble(df.format(healtheduTotalYearNum / yearTotalNum * 100));//环比 健康教育缺失率 + informedconDocNosignRateYear = Double.parseDouble(df.format(informedconTotalYearNum / yearTotalNum * 100)); + } + + resultMap.put("bloodFillIncompleteRateYear", bloodFillIncompleteRateYear); + resultMap.put("healtheduFillIncompleteRateYear", healtheduFillIncompleteRateYear); + resultMap.put("informedconDocNosignRateYear", informedconDocNosignRateYear); + + //计算环比 + double yearTotalHbNum = ObjectUtils.isEmpty(e.get("year_total_hb_num")) ? 0 : Double.parseDouble(e.get("year_total_hb_num").toString());//环比 总数 + double bloodTotalYearHbNum = ObjectUtils.isEmpty(e.get("year_blood_total_hb_num")) ? 0 : Double.parseDouble(e.get("year_blood_total_hb_num").toString());//环比 血净记录缺失总数 + double healtheduTotalYearHbNum = ObjectUtils.isEmpty(e.get("year_healthedu_total_hb_num")) ? 0 : Double.parseDouble(e.get("year_healthedu_total_hb_num").toString());//环比 健康教育缺失总数 + double informedconTotalYearHbNum = ObjectUtils.isEmpty(e.get("year_informedcon_total_hb_num")) ? 0 : Double.parseDouble(e.get("year_informedcon_total_hb_num").toString());//当前年 知情同意合格总数 + + if(yearTotalHbNum > 0){ + bloodFillIncompleteRateYearHb = Double.parseDouble(df.format(bloodTotalYearHbNum / yearTotalHbNum * 100));//同比 血净记录缺失率 + healtheduFillIncompleteRateYearHb = Double.parseDouble(df.format(healtheduTotalYearHbNum / yearTotalHbNum * 100));//同比 健康教育缺失率 + informedconDocNosignRateYearHb = Double.parseDouble(df.format(informedconTotalYearHbNum / yearTotalHbNum * 100)); + } + + resultMap.put("bloodFillIncompleteRateYearHb", bloodFillIncompleteRateYearHb); + resultMap.put("healtheduFillIncompleteRateYearHb", healtheduFillIncompleteRateYearHb); + resultMap.put("informedconDocNosignRateYearHb", informedconDocNosignRateYearHb); + + //计算同比 + double yearTotalYoyNum = ObjectUtils.isEmpty(e.get("year_total_tb_num")) ? 0 : Double.parseDouble(e.get("year_total_tb_num").toString());//同比 总数 + double bloodTotalYearYoyNum = ObjectUtils.isEmpty(e.get("year_blood_total_tb_num")) ? 0 : Double.parseDouble(e.get("year_blood_total_tb_num").toString());//同比 血净记录缺失总数 + double healtheduTotalYearYoyNum = ObjectUtils.isEmpty(e.get("year_healthedu_total_tb_num")) ? 0 : Double.parseDouble(e.get("year_healthedu_total_tb_num").toString());//同比 健康教育缺失总数 + double informedconTotalYearYoyNum = ObjectUtils.isEmpty(e.get("year_informedcon_total_tb_num")) ? 0 : Double.parseDouble(e.get("year_informedcon_total_tb_num").toString());//同比 知情同意合格总数 + + if(yearTotalYoyNum > 0){ + bloodFillIncompleteRateYearYoy = Double.parseDouble(df.format(bloodTotalYearYoyNum / yearTotalYoyNum * 100));//同比 血净记录缺失率 + healtheduFillIncompleteRateYearYoy = Double.parseDouble(df.format(healtheduTotalYearYoyNum / yearTotalYoyNum * 100));//同比 健康教育缺失率 + informedconDocNosignRateYearYoy = Double.parseDouble(df.format(informedconTotalYearYoyNum / yearTotalYoyNum * 100)); + } + + resultMap.put("bloodFillIncompleteRateYearYoy", bloodFillIncompleteRateYearYoy); + resultMap.put("healtheduFillIncompleteRateYearYoy", healtheduFillIncompleteRateYearYoy); + resultMap.put("informedconDocNosignRateYearYoy", informedconDocNosignRateYearYoy); + }); + } + return ResultUtil.ok(resultMap); + } catch (Exception e) { + ExceptionPrintUtil.printException(e); + e.printStackTrace(); + return ResultUtil.error("统计过程出错,请检查代码"); + } + } + /** * 查询文书报表 * @param page @@ -263,7 +669,7 @@ public class bloodPurificationController { EmrBloodDialysisDoc emrBloodDialysisDoc = new EmrBloodDialysisDoc(); emrBloodDialysisDoc.setExportDate(new Date()); emrBloodDialysisDoc.setExportNo(user.getUserName()); - + emrBloodDialysisDoc.setIsDel(0); //实例化 ImportExcelUtil.newInstance("bloodPurificationMapper", emrBloodDialysisDoc, EmrBloodDialysisDoc.class); //导入excel的操作 @@ -288,4 +694,173 @@ public class bloodPurificationController { return new ResponseEntity(e.getMessage(), responseHeaders, HttpStatus.OK); } } + + /** + * 修改时回显数据 + * @param id + * @return + * @throws Exception + */ + @RequestMapping(value = "queryInspectionInfoById", method = RequestMethod.POST) + @ResponseBody + public ResultUtil queryInspectionInfoById(String id){ + if(StringUtils.isEmpty(id)){ + return ResultUtil.error("参数错误"); + } + List list = bloodPurificationService.queryInspectionInfoById(id); + return ResultUtil.ok(list); + } + + /** + * 修改后保存信息 + * @param emrBloodDialysisDoc + * @return + */ + @OptionalLog(module = "修改",methods = "检查记录病历操作") + @RequestMapping(value = "updateInspectionInfo", method = RequestMethod.POST) + @ResponseBody + public ResultUtil updateInspectionInfo(EmrBloodDialysisDoc emrBloodDialysisDoc){ + try { + bloodPurificationService.updateInspectionInfo(emrBloodDialysisDoc); + return ResultUtil.ok(); + } catch (Exception e) { + ExceptionPrintUtil.printException(e); + e.printStackTrace(); + return ResultUtil.error("更新时出错"); + } + } + + /** + * 提交审批 + * @param emrBloodApplyInfo + * @return + */ + @RequestMapping(value = "insertFlowInfo", method = RequestMethod.POST) + @ResponseBody + public ResultUtil insertFlowInfo(HttpServletRequest request,String ids, EmrBloodApplyInfo emrBloodApplyInfo){ + try { + Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER"); + String[] bloodIds = ids.split(","); + for(int i = 0; i < bloodIds.length; i++){ + emrBloodApplyInfo.setBloodId(Integer.parseInt(bloodIds[i])); + emrBloodApplyInfo.setApplyNo(user.getUserName()); + emrBloodApplyInfo.setAppNo(String.valueOf(UUID.randomUUID())); + emrBloodApplyInfo.setStatus(1); + //插入流程表 + bloodPurificationService.insertFlowInfo(emrBloodApplyInfo); + } + return ResultUtil.ok(); + } catch (Exception e) { + ExceptionPrintUtil.printException(e); + e.printStackTrace(); + return ResultUtil.error("流程处理出错"); + } + } + + /** + * 查询审批列表 + * @param page + * @param limit + * @param emrBloodApplyInfo + * @param request + * @return + */ + @RequestMapping("queryBloodApproveList") + @ResponseBody + public String queryBloodApproveList(Integer page, Integer limit, EmrBloodApplyInfo emrBloodApplyInfo, HttpServletRequest request){ + if(null != page && null != limit){ + PageHelper.startPage(page, limit); + } + try{ + HttpSession session = request.getSession(); + emrBloodApplyInfo.setStatus(Integer.valueOf((String) session.getAttribute("status"))); + List emrBloodDialysisDocs = bloodPurificationMapper.queryBloodApproveList(emrBloodApplyInfo); + PageInfo pageInfo = new PageInfo<>(emrBloodDialysisDocs); + return JSON.toJSONString(pageInfo); + }catch (Exception e){ + ExceptionPrintUtil.printException(e); + e.printStackTrace(); + return null; + } + } + + /** + * 查询流程记录 + * @param page + * @param limit + * @param emrBloodApplyInfo + * @return + */ + @RequestMapping("queryFlowLogList") + @ResponseBody + public String queryFlowLogList(Integer page, Integer limit, EmrBloodApplyInfo emrBloodApplyInfo){ + if(null != page && null != limit){ + PageHelper.startPage(page, limit); + } + try{ + List emrBloodDialysisDocs = bloodPurificationMapper.queryFlowLogList(emrBloodApplyInfo); + PageInfo pageInfo = new PageInfo<>(emrBloodDialysisDocs); + return JSON.toJSONString(pageInfo); + }catch (Exception e){ + ExceptionPrintUtil.printException(e); + e.printStackTrace(); + return null; + } + } + + /** + * 审批 + * @param emrBloodApplyInfo + * @return + */ + @RequestMapping(value = "handleFlowInfo", method = RequestMethod.POST) + @ResponseBody + public ResultUtil handleFlowInfo(HttpServletRequest request, EmrBloodApplyInfo emrBloodApplyInfo){ + try { + HttpSession session = request.getSession(); + Integer status = Integer.valueOf((String) session.getAttribute("status")); + Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER"); + + String appNo = emrBloodApplyInfo.getAppNo(); + String[] appNos = appNo.split(","); + for(int i = 0; i < appNos.length; i++){ + emrBloodApplyInfo.setAppNo(appNos[i]); + emrBloodApplyInfo.setApproveNo(user.getUserName()); + Integer isAgree = emrBloodApplyInfo.getIsAgree(); + //如果不通过,则打回 + if(isAgree == 1){ + emrBloodApplyInfo.setStatus(status + 1); + }else{ + emrBloodApplyInfo.setStatus(status - 1); + } + if(emrBloodApplyInfo.getStatus() == 0){ + //删除当前流程,重新申请新流程 + bloodPurificationService.delFlowInfo(emrBloodApplyInfo); + }else{ + bloodPurificationService.handleFlowInfo(emrBloodApplyInfo); + } + } + return ResultUtil.ok(); + } catch (Exception e) { + ExceptionPrintUtil.printException(e); + e.printStackTrace(); + return ResultUtil.error("流程处理出错"); + } + } + @OptionalLog(module = "删除",methods = "检查记录病历操作") + @RequestMapping(value = "delApplyInfo", method = RequestMethod.POST) + @ResponseBody + public ResultUtil delApplyInfo(String id){ + if(StringUtils.isEmpty(id)){ + return ResultUtil.error("参数错误"); + } + try { + bloodPurificationService.delApplyInfo(id); + return ResultUtil.ok(); + } catch (Exception e) { + ExceptionPrintUtil.printException(e); + e.printStackTrace(); + return ResultUtil.error("流程处理出错"); + } + } } diff --git a/src/main/java/com/emr/dao/bloodPurification/BloodPurificationMapper.java b/src/main/java/com/emr/dao/bloodPurification/BloodPurificationMapper.java index 1a989bd..d57232f 100644 --- a/src/main/java/com/emr/dao/bloodPurification/BloodPurificationMapper.java +++ b/src/main/java/com/emr/dao/bloodPurification/BloodPurificationMapper.java @@ -1,6 +1,9 @@ package com.emr.dao.bloodPurification; +import com.emr.entity.EmrBloodApplyInfo; import com.emr.entity.EmrBloodDialysisDoc; +import com.emr.entity.emrLog.Emr_Log; + import java.util.List; import java.util.Map; @@ -11,4 +14,26 @@ public interface BloodPurificationMapper{ List queryDocumentList(EmrBloodDialysisDoc emrBloodDialysisDoc); List> queryInspectionRecordsSum(EmrBloodDialysisDoc emrBloodDialysisDoc); + + List queryInspectionInfoById(String id); + + void updateInspectionInfo(EmrBloodDialysisDoc emrBloodDialysisDoc); + + void insertFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo); + + List queryBloodApproveList(EmrBloodApplyInfo emrBloodApplyInfo); + + void insertFlowProcessInfo(EmrBloodApplyInfo emrBloodApplyInfo); + + void handleFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo); + + void delFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo); + + List queryFlowLogList(EmrBloodApplyInfo emrBloodApplyInfo); + + void delApplyInfo(String id); + + List> queryDocumentSum(Map params); + + List selectAll(Emr_Log log, String startTime, String endTime); } \ No newline at end of file diff --git a/src/main/java/com/emr/entity/EmrBloodDialysisDoc.java b/src/main/java/com/emr/entity/EmrBloodDialysisDoc.java index bbac451..b450e14 100644 --- a/src/main/java/com/emr/entity/EmrBloodDialysisDoc.java +++ b/src/main/java/com/emr/entity/EmrBloodDialysisDoc.java @@ -6,6 +6,7 @@ import java.util.Date; @Data public class EmrBloodDialysisDoc { + private Integer id; private Integer xh; private String inspectionDate; private String name; @@ -26,5 +27,6 @@ public class EmrBloodDialysisDoc { private String remark; private Date exportDate; private String exportNo; - + private Integer isDel; + private String status; } \ No newline at end of file diff --git a/src/main/java/com/emr/service/bloodPurification/BloodPurificationService.java b/src/main/java/com/emr/service/bloodPurification/BloodPurificationService.java index 1efe56b..ead22fc 100644 --- a/src/main/java/com/emr/service/bloodPurification/BloodPurificationService.java +++ b/src/main/java/com/emr/service/bloodPurification/BloodPurificationService.java @@ -1,5 +1,27 @@ package com.emr.service.bloodPurification; +import com.emr.entity.EmrBloodApplyInfo; +import com.emr.entity.EmrBloodDialysisDoc; +import com.emr.entity.emrLog.Emr_Log; + +import java.util.List; +import java.util.Map; + public interface BloodPurificationService{ + List queryInspectionInfoById(String id); + + void updateInspectionInfo(EmrBloodDialysisDoc emrBloodDialysisDoc); + + void insertFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo); + + void handleFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo); + + void delFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo); + + void delApplyInfo(String id); + + List> queryDocumentSum(Map params); + + List selectAll(Emr_Log log, String startTime, String endTime); } diff --git a/src/main/java/com/emr/service/bloodPurification/impl/BloodPurificationServiceImpl.java b/src/main/java/com/emr/service/bloodPurification/impl/BloodPurificationServiceImpl.java index f6adc33..257e17e 100644 --- a/src/main/java/com/emr/service/bloodPurification/impl/BloodPurificationServiceImpl.java +++ b/src/main/java/com/emr/service/bloodPurification/impl/BloodPurificationServiceImpl.java @@ -1,14 +1,70 @@ package com.emr.service.bloodPurification.impl; import com.emr.dao.bloodPurification.BloodPurificationMapper; +import com.emr.entity.EmrBloodApplyInfo; +import com.emr.entity.EmrBloodDialysisDoc; +import com.emr.entity.emrLog.Emr_Log; import com.emr.service.bloodPurification.BloodPurificationService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import java.util.List; +import java.util.Map; @Service public class BloodPurificationServiceImpl implements BloodPurificationService { @Autowired BloodPurificationMapper bloodPurificationMapper; + @Override + public List queryInspectionInfoById(String id) { + return bloodPurificationMapper.queryInspectionInfoById(id); + } + + @Override + public void updateInspectionInfo(EmrBloodDialysisDoc emrBloodDialysisDoc) { + bloodPurificationMapper.updateInspectionInfo(emrBloodDialysisDoc); + } + + @Override + public void insertFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo) { + try { + bloodPurificationMapper.insertFlowInfo(emrBloodApplyInfo); + //插入流程记录表 + bloodPurificationMapper.insertFlowProcessInfo(emrBloodApplyInfo); + }catch (Exception e){ + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + e.printStackTrace(); + } + } + + @Override + public void handleFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo) { + bloodPurificationMapper.handleFlowInfo(emrBloodApplyInfo); + //插入流程记录表 + bloodPurificationMapper.insertFlowProcessInfo(emrBloodApplyInfo); + } + + @Override + public void delFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo) { + bloodPurificationMapper.delFlowInfo(emrBloodApplyInfo); + //插入流程记录表 + bloodPurificationMapper.insertFlowProcessInfo(emrBloodApplyInfo); + } + + @Override + public void delApplyInfo(String id) { + bloodPurificationMapper.delApplyInfo(id); + } + + @Override + public List> queryDocumentSum(Map params) { + return bloodPurificationMapper.queryDocumentSum(params); + } + + @Override + public List selectAll(Emr_Log log, String startTime, String endTime) { + return bloodPurificationMapper.selectAll(log, startTime, endTime); + } } diff --git a/src/main/java/com/emr/service/emrPrintOrDownLoadInfo/PrintOrDownLoadInfoService.java b/src/main/java/com/emr/service/emrPrintOrDownLoadInfo/PrintOrDownLoadInfoService.java index 8cf5a20..ea27b72 100644 --- a/src/main/java/com/emr/service/emrPrintOrDownLoadInfo/PrintOrDownLoadInfoService.java +++ b/src/main/java/com/emr/service/emrPrintOrDownLoadInfo/PrintOrDownLoadInfoService.java @@ -162,10 +162,10 @@ public class PrintOrDownLoadInfoService { } vo.setPrintCount(printCount); vo.setPrintFee(printCount * printPrice); - if (vo.getTypeName().equals("院内查阅")){ + if ("院内查阅".equals(vo.getTypeName())){ vo.setPrintFee(0 * printPrice); } - if (vo.getTypeName().equals("公检法单位")){ + if ("公检法单位".equals(vo.getTypeName())){ vo.setPrintFee(0 * printPrice); } } diff --git a/src/main/java/com/emr/util/DateUtils.java b/src/main/java/com/emr/util/DateUtils.java index 1ea2b7e..45816a4 100644 --- a/src/main/java/com/emr/util/DateUtils.java +++ b/src/main/java/com/emr/util/DateUtils.java @@ -3,9 +3,9 @@ package com.emr.util; import java.text.ParseException; import java.text.ParsePosition; import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; -import java.util.TimeZone; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.*; import lombok.extern.slf4j.Slf4j; @@ -290,4 +290,52 @@ public class DateUtils { } return result.toString(); } + + /** + * 获取指定日期的季度月份 + * @param year + * @param quarter + * @return + */ + public static List getQuarterMonths(int year, int quarter) { + List months = new ArrayList<>(); + int startMonth = (quarter - 1) * 3 + 1; + int endMonth = startMonth + 2; + + if (quarter <= 0) { + year--; + startMonth = 10; + endMonth = 12; + } else if (quarter > 4) { + year++; + startMonth = 1; + endMonth = 3; + } + + for (int month = startMonth; month <= endMonth; month++) { + months.add(LocalDate.of(year, month, 1).format(DateTimeFormatter.ofPattern("yyyy-MM"))); + } + return months; + } + + /** + * 获取指定年份上半年或下半年的所有月份 + * @param year + * @param isFirstHalf + * @return + */ + public static List getHalfYearMonths(int year, boolean isFirstHalf) { + List months = new ArrayList<>(); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM"); + + int startMonth = isFirstHalf ? 1 : 7; + int endMonth = isFirstHalf ? 6 : 12; + + for (int month = startMonth; month <= endMonth; month++) { + LocalDate date = LocalDate.of(year, month, 1); + months.add(date.format(formatter)); + } + + return months; + } } diff --git a/src/main/java/com/emr/util/img2PdfUtil.java b/src/main/java/com/emr/util/img2PdfUtil.java index 407c396..a85936a 100644 --- a/src/main/java/com/emr/util/img2PdfUtil.java +++ b/src/main/java/com/emr/util/img2PdfUtil.java @@ -366,47 +366,68 @@ public class img2PdfUtil { //图片合成pdf private static void imgToPdf(Document document, List filePaths) throws Exception { - document.open(); //打开容器 + document.open(); float percent = 100; - float w, h; for (String filePath : filePaths) { try { File file = new File(filePath); if (file.isFile()) { Image img = Image.getInstance(filePath); - /*处理图片缩放比例*/ - w = img.getWidth(); - h = img.getHeight(); - if ((w > A4_weight) && (h < A4_height)) { - percent = (A4_weight * 100) / w; - } else if ((w < A4_weight) && (h > A4_height)) { - percent = (A4_height * 100) / h; - } else if ((w > A4_weight) && (h > A4_height)) { + float w = img.getWidth(); + float h = img.getHeight(); + + // 计算缩放比例,基于宽度和高度中较大的值 + float scaleWidth = A4_weight / w; + float scaleHeight = A4_height / h; + percent = Math.min(scaleWidth, scaleHeight) * 100; - percent = (A4_weight * 100) / w; - h = (h * percent) / 100; - if (h > A4_height) { - percent = (A4_height * 100) / h; - } - } img.setAlignment(com.lowagie.text.Image.ALIGN_CENTER); - if(percent != 100){ - img.scaleAbsolute(A4_weight,A4_height); - }else{ - img.scalePercent(percent); - } + img.scalePercent(percent); document.add(img); } } catch (Exception e) { - throw new RuntimeException(e); + throw new RuntimeException("Error processing file: " + filePath, e); } } - document.close(); //关闭容器 + document.close(); +// document.open(); //打开容器 +// float percent = 100; +// float w, h; +// for (String filePath : filePaths) { +// try { +// File file = new File(filePath); +// if (file.isFile()) { +// Image img = Image.getInstance(filePath); +// /*处理图片缩放比例*/ +// w = img.getWidth(); +// h = img.getHeight(); +// if ((w > A4_weight) && (h < A4_height)) { +// percent = (A4_weight * 100) / w; +// } else if ((w < A4_weight) && (h > A4_height)) { +// percent = (A4_height * 100) / h; +// } else if ((w > A4_weight) && (h > A4_height)) { +// +// percent = (A4_weight * 100) / w; +// h = (h * percent) / 100; +// if (h > A4_height) { +// percent = (A4_height * 100) / h; +// } +// } +// img.setAlignment(com.lowagie.text.Image.ALIGN_CENTER); +// if(percent != 100){ +// img.scaleAbsolute(A4_weight,A4_height); +// }else{ +// img.scalePercent(percent); +// } +// document.add(img); +// } +// } catch (Exception e) { +// throw new RuntimeException(e); +// } +// } +// document.close(); //关闭容器 } - - - //图片合成pdf private static void imgToPdf2(Document document, String filePath) throws Exception { document.open(); //打开容器 diff --git a/src/main/java/com/emr/util/imgToPdfUtil.java b/src/main/java/com/emr/util/imgToPdfUtil.java index ac00004..ead517b 100644 --- a/src/main/java/com/emr/util/imgToPdfUtil.java +++ b/src/main/java/com/emr/util/imgToPdfUtil.java @@ -83,6 +83,7 @@ public class imgToPdfUtil { cb.endText(); // 创建目录 PdfOutline root = cb.getRootOutline(); + float percent = 100; // 添加图片到PDF for (int i = 0; i < scanPathVos.size(); i++) { String assortName = scanPathVos.get(i).getAssortName(); @@ -101,12 +102,16 @@ public class imgToPdfUtil { } String imagePath = scanPathVos.get(i).getFileRealPath(); Image image = Image.getInstance(imagePath); + float w = image.getWidth(); + float h = image.getHeight(); - image.setAlignment(Image.MIDDLE); - image.scaleToFit(PageSize.A4.getWidth(), PageSize.A4.getHeight()); - // 等比例缩放图片以填满PDF页面 + // 计算缩放比例,基于宽度和高度中较大的值 + float scaleWidth = PageSize.A4.getWidth() / w; + float scaleHeight = PageSize.A4.getHeight() / h; + percent = Math.min(scaleWidth, scaleHeight) * 100; - image.scaleAbsolute(document.getPageSize()); + image.setAlignment(image.MIDDLE); + image.scalePercent(percent); // 创建新页面并添加图片 //document.newPage(); document.add(image); diff --git a/src/main/resources/mapper/CommomMapper.xml b/src/main/resources/mapper/CommomMapper.xml index 25817c4..359c567 100644 --- a/src/main/resources/mapper/CommomMapper.xml +++ b/src/main/resources/mapper/CommomMapper.xml @@ -1222,7 +1222,7 @@ commomtable - AND admiss_id =#{inpatientNo} + AND inpatient_no =#{inpatientNo} AND admiss_id = #{admissId} diff --git a/src/main/resources/mapper/bloodPurification/BloodPurificationMapper.xml b/src/main/resources/mapper/bloodPurification/BloodPurificationMapper.xml index 28b5da9..1642b20 100644 --- a/src/main/resources/mapper/bloodPurification/BloodPurificationMapper.xml +++ b/src/main/resources/mapper/bloodPurification/BloodPurificationMapper.xml @@ -4,39 +4,40 @@ @@ -61,7 +62,8 @@ rectification_sgin, remark, export_date, - export_no + export_no, + is_del ) select @@ -147,7 +149,8 @@ #{item.rectificationSgin}, #{item.remark}, #{item.exportDate}, - #{item.exportNo} + #{item.exportNo}, + #{item.isDel} @@ -156,6 +159,7 @@ inspection_date inspectionDate, name, dialysis_date dialysisDate, + responsible_nurse responsibleNurse, total_num, blood_fill_incomplete_num, blood_sign_nonstandard_num, @@ -179,4 +183,384 @@ + + + + + update emr_blood_dialysis_doc + + + inspection_date = #{inspectionDate}, + + + name = #{name}, + + + dialysis_date = #{dialysisDate}, + + + blood_fill_incomplete = #{bloodFillIncomplete}, + + + blood_sign_nonstandard = #{bloodSignNonstandard}, + + + blood_medicalstaff_nosign = #{bloodMedicalstaffNosign}, + + + healthedu_fill_incomplete = #{healtheduFillIncomplete}, + + + healthedu_sign_nonstandard = #{healtheduSignNonstandard}, + + + healthedu_medicalstaff_nosign = #{healtheduMedicalstaffNosign}, + + + informedcon_doc_nosign = #{informedconDocNosign}, + + + informedcon_familymembers_miss = #{informedconFamilymembersMiss}, + + + informedcon_name_nonstandard = #{informedconNameNonstandard}, + + + other = #{other}, + + + responsible_nurse = #{responsibleNurse}, + + + rectification_date = #{rectificationDate}, + + + rectification_sgin = #{rectificationSgin}, + + + remark = #{remark}, + + + where id = #{id} + + + + insert into + emr_blood_apply_info + ( + + blood_id, + + + app_no, + + + apply_no, + + + apply_reason, + + + approve_no, + + + approve_date, + + + remark, + + apply_date, + status + ) + values + ( + + #{bloodId}, + + + #{appNo}, + + + #{applyNo}, + + + #{applyReason}, + + + #{approveNo}, + + + #{approveDate}, + + + #{remark}, + + GETDATE(), + #{status} + ) + + + + insert into emr_blood_flow_info + ( + blood_id, + app_no, + apply_no, + apply_date, + apply_reason, + status, + approve_no, + approve_date, + remark, + is_agree + ) + select + blood_id, + app_no, + apply_no, + apply_date, + apply_reason, + status, + approve_no, + approve_date, + remark, + is_agree + from emr_blood_apply_info + where app_no = #{appNo} + + + + update + emr_blood_apply_info + set + approve_no = #{approveNo}, + approve_date = GETDATE(), + status = #{status}, + is_agree = #{isAgree}, + remark = #{remark} + where + app_no = #{appNo} + + + + + + delete from emr_blood_apply_info where app_no = #{appNo} + + + + + + update emr_blood_dialysis_doc set is_del = 1 where id = #{id} + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/documentList.jsp b/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/documentList.jsp index 1445ae7..6b0787b 100644 --- a/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/documentList.jsp +++ b/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/documentList.jsp @@ -85,7 +85,6 @@ height: 100%; display: flex; align-items: center; - justify-content: center; font-size: 0.9vw; } .contentTypeValue span{ @@ -104,7 +103,7 @@
- 年月: + 透析日期:
@@ -123,6 +122,7 @@
当前月份:
+
知情同意合格率 0% @@ -164,6 +164,7 @@
当前季度:
+
知情同意合格率 0% @@ -178,25 +179,25 @@
血净记录缺失率 - 0% + 0% (环比 - 上升 - 0% + 上升 + 0% ,同比 - 上升 - 0% + 上升 + 0% )
健康教育缺失率 - 0% + 0% (环比 - 上升 - 0% + 上升 + 0% ,同比 - 上升 - 0% + 上升 + 0% )
@@ -205,6 +206,7 @@
当前半年:
+
知情同意合格率 0% @@ -246,6 +248,7 @@
当前一年:
+
知情同意合格率 0% @@ -294,6 +297,7 @@
当前月份:
+
血净人次 0次 @@ -347,6 +351,7 @@
当前季度:
+
血净人次 0次 @@ -400,6 +405,7 @@
当前半年:
+
血净人次 0次 @@ -453,6 +459,7 @@
当前一年:
+
血净人次 0次 @@ -509,6 +516,7 @@ + diff --git a/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/inspectionRecords.jsp b/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/inspectionRecords.jsp index 15c3590..ee47b6a 100644 --- a/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/inspectionRecords.jsp +++ b/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/inspectionRecords.jsp @@ -93,6 +93,39 @@ .tableDiv{ width: 100%; } + .modal-dialog { + width: 600px; + margin: 30px auto auto; + } + .form-group{ + width: 100%; + height: 50%; + display: flex; + flex-direction: column + } + .form-group-content{ + width: 100%; + height: 20%; + display: flex + } + .form-group-content-input{ + width: 33%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + } + .form-group-content-input label{ + width: 9vw; + text-align: right; + } + .form-group-content-title{ + width: 20%; + height: 20%; + display: flex; + justify-content: left; + } + . @@ -110,21 +143,24 @@
检查日期: - +
患者姓名: - +
透析日期: - +
+
+ +
@@ -134,6 +170,7 @@
+
@@ -155,7 +192,7 @@
-
<%--
@@ -170,6 +207,203 @@
+ + + + diff --git a/src/main/webapp/WEB-INF/views/recordManage/commomSearch/commomListqf.jsp b/src/main/webapp/WEB-INF/views/recordManage/commomSearch/commomListqf.jsp index b93a5f2..5219992 100644 --- a/src/main/webapp/WEB-INF/views/recordManage/commomSearch/commomListqf.jsp +++ b/src/main/webapp/WEB-INF/views/recordManage/commomSearch/commomListqf.jsp @@ -328,7 +328,7 @@
+ data-live-search="true" data-actions-box="true">
@@ -1031,7 +1031,7 @@ + data-live-search="true" data-actions-box="true">
diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 72edc69..1b5cd71 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -48,12 +48,28 @@ #indexTreeMenu::-webkit-scrollbar{ display: none; } + .seal-result { + transform: rotate(-14deg); + /* border: solid 2px #ddd; */ + border-radius: 100%; + text-align: center; + color: #37485061; + font-size: 1vw; + font-weight: bold; + line-height: 60px; + left: 6%; + top: 64%; + position: absolute; + /* background-color: rgba(255, 255, 255, 0.8); */ + z-index: 1000; + } <% String POWER_URLHEAD = (String) request.getParameter("POWER_URLHEAD"); String POWER_JSP = (String) request.getParameter("POWER_JSP"); String token = (String) request.getSession().getAttribute("token"); Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER"); + String hospitalName = (String) request.getParameter("hospitalName"); Set menus = user.getMenus(); Integer approvePower = 0; for(String menu : menus){ @@ -101,6 +117,7 @@ Toggle navigation +<%--
<%= hospitalName %>
--%>
-
+
From e5a5a407d31759b4de5692320bb3b7843d55d4e1 Mon Sep 17 00:00:00 2001 From: "jian.wang" <824612544@qq.com> Date: Mon, 19 Aug 2024 16:13:28 +0800 Subject: [PATCH 3/3] =?UTF-8?q?commomtable=E8=A1=A8=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=20=E5=92=8C=20=E6=96=B0=E5=A2=9E=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E9=85=8D=E7=BD=AE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/sql脚本.sql | 101 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 100 insertions(+), 1 deletion(-) diff --git a/doc/sql脚本.sql b/doc/sql脚本.sql index 8f16d53..7331fb4 100644 --- a/doc/sql脚本.sql +++ b/doc/sql脚本.sql @@ -1,5 +1,5 @@ ---commomtable表新增字段 +--commomtable表新增字段 wj 2024-08-19 ALTER TABLE commomtable ADD cycle_no varchar(50) NULL, -- 周期号(生殖科) visit_time datetime NULL, -- 就诊日期(产前门诊) @@ -11,9 +11,108 @@ ALTER TABLE commomtable hemodialysis_date datetime NULL,-- 血透时间(血透) hemodialysis_id varchar(50) NULL,-- 血透id(血透) radiotherapy_no varchar(50) NULL,-- 放疗号(放疗) + outpatient_no varchar(50) NULL,-- 门诊号(血透) + document_no varchar(50) NULL,-- 文书号(血透) + document_type varchar(50) NULL,-- 文书类型(血透) + born_date datetime NULL,-- 期数 + periods varchar(50) NULL,-- 文书类型(血透) data_source varchar(50) NULL -- 数据来源 1.生殖科 2.产前门诊 3.药学楼 +-- 增加常用查询 表格表头动态配置表 wj 2024-08-19 +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[emr_table_config]') AND type IN ('U')) +DROP TABLE [dbo].[emr_table_config] + GO + +CREATE TABLE [dbo].[emr_table_config] ( + [id] int IDENTITY(1,1) NOT NULL, + [table_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [table_annotation] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL, + [table_field] nvarchar(500) COLLATE Chinese_PRC_CI_AS NULL, + [table_field_name] nvarchar(500) COLLATE Chinese_PRC_CI_AS NULL, + [sort_field] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [default_sort_field] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [default_sort_field_type] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [data_source] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL + ) + GO + +ALTER TABLE [dbo].[emr_table_config] SET (LOCK_ESCALATION = TABLE) + GO + + EXEC sp_addextendedproperty + 'MS_Description', N'主键', + 'SCHEMA', N'dbo', + 'TABLE', N'emr_table_config', + 'COLUMN', N'id' + GO + + EXEC sp_addextendedproperty + 'MS_Description', N'表名', + 'SCHEMA', N'dbo', + 'TABLE', N'emr_table_config', + 'COLUMN', N'table_name' + GO + + EXEC sp_addextendedproperty + 'MS_Description', N'分配菜单所属哪个科室', + 'SCHEMA', N'dbo', + 'TABLE', N'emr_table_config', + 'COLUMN', N'table_annotation' + GO + + EXEC sp_addextendedproperty + 'MS_Description', N'表格展示字段(表头信息字段)', + 'SCHEMA', N'dbo', + 'TABLE', N'emr_table_config', + 'COLUMN', N'table_field' + GO + + EXEC sp_addextendedproperty + 'MS_Description', N'表格展示表头名称', + 'SCHEMA', N'dbo', + 'TABLE', N'emr_table_config', + 'COLUMN', N'table_field_name' + GO + + EXEC sp_addextendedproperty + 'MS_Description', N'排序字段(点击表头可自行排序)', + 'SCHEMA', N'dbo', + 'TABLE', N'emr_table_config', + 'COLUMN', N'sort_field' + GO + + EXEC sp_addextendedproperty + 'MS_Description', N'默认排序字段(初始化页面的排序字段)', + 'SCHEMA', N'dbo', + 'TABLE', N'emr_table_config', + 'COLUMN', N'default_sort_field' + GO + + EXEC sp_addextendedproperty + 'MS_Description', N'默认排序字段方式(逗号隔开,有几个排序字段就写几个,需要一一对应)', + 'SCHEMA', N'dbo', + 'TABLE', N'emr_table_config', + 'COLUMN', N'default_sort_field_type' + GO + + EXEC sp_addextendedproperty + 'MS_Description', N'数据来源(菜单地址''dataSource''参数,值要一致)', + 'SCHEMA', N'dbo', + 'TABLE', N'emr_table_config', + 'COLUMN', N'data_source' + GO + + DBCC CHECKIDENT ('[dbo].[emr_table_config]', RESEED, 6) + GO + +ALTER TABLE [dbo].[emr_table_config] ADD CONSTRAINT [PK__emr_tabl__3214EC2754968AE5] PRIMARY KEY CLUSTERED ([id], [data_source]) + WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) + ON [PRIMARY] + GO + + + -- 增加任务清单主表 hcy 2024-05-13 IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[Export_Task]') AND type IN ('U'))