瀏覽代碼

湘雅全院病案首页合格/不合格病历列表跳转查询/导出

chengyao 3 年之前
父節點
當前提交
bf623e668b

+ 2 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -212,7 +212,9 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/console/export/medicalCheckExport").permitAll()
                 .antMatchers("/console/export/medicalCheckInnerExport").permitAll()
                 .antMatchers("/console/badLevelPage").permitAll()
+                .antMatchers("/console/badLevelXYPage").permitAll()
                 .antMatchers("/console/export/badLevelPagePageExport").permitAll()
+                .antMatchers("/console/export/badLevelPageXYExport").permitAll()
                 .antMatchers("/qc/medNurse/getMedNursePage").permitAll()
                 .antMatchers("/qc/behospitalInfo/exportQcresultByPerson").permitAll()
                 .antMatchers("/consoleByDept/beHosCountByDept").permitAll()

+ 2 - 0
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -256,7 +256,9 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/console/export/medicalCheckExport", request)
                 || matchers("/console/export/medicalCheckInnerExport", request)
                 || matchers("/console/badLevelPage", request)
+                || matchers("/console/badLevelXYPage", request)
                 || matchers("/console/export/badLevelPagePageExport", request)
+                || matchers("/console/export/badLevelPageXYExport", request)
                 || matchers("/qc/medNurse/getMedNursePage", request)
                 || matchers("/qc/behospitalInfo/exportQcresultByPerson", request)
                 || matchers("/consoleByDept/beHosCountByDept", request)

+ 59 - 0
src/main/java/com/diagbot/facade/ConsoleExportFacade.java

@@ -487,6 +487,65 @@ public class ConsoleExportFacade {
         }
    }
 
+    /**
+     * 病案首页不合格/合格数-XY
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public void badLevelPageXYExport(HttpServletResponse response, QcResultShortXYPageVO qcResultShortPageVO) {
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        qcResultShortPageVO.setHospitalId(hospitalId);
+        if (StringUtil.isNotBlank(qcResultShortPageVO.getDeptName())
+                && qcResultShortPageVO.getDeptName().equals("全部")) {
+            qcResultShortPageVO.setDeptName("");
+        }
+        Date startDate = qcResultShortPageVO.getStartDate();
+        Date endDate = qcResultShortPageVO.getEndDate();
+        //时间间隔7天
+        long interval_7 = 7 * 24 * 60 * 60 * 1000;
+        long interval_90 = 90 * 24 * 60 * 60 * 1000l;
+
+        if("1".equals(qcResultShortPageVO.getRadioCheck())){
+            //时间间隔7天
+            if (endDate.getTime() < startDate.getTime()) {
+                throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
+            }
+            if (endDate.getTime() - startDate.getTime() > interval_7) {
+                throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
+            }
+        }else{
+            //时间间隔90天
+            if (endDate.getTime() < startDate.getTime()) {
+                throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
+            }
+            if (endDate.getTime() - startDate.getTime() > interval_90) {
+                throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于90天");
+            }
+        }
+
+        qcResultShortPageVO.setCurrent(1L);
+        qcResultShortPageVO.setSize(Long.MAX_VALUE);
+        qcResultShortPageVO.setSearchCount(false);
+        List<ExportExcelDTO> records = behospitalInfoFacade.getBaseMapper().badLevelPageXYExport(qcResultShortPageVO);
+        List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
+        if("2".equals(qcResultShortPageVO.getRadioCheck())){
+            resWide = transList(records, resWide);
+        }
+        String fileName = null;
+        if("不合格数".equals(qcResultShortPageVO.getTitleName())){
+            fileName = "病案首页不合格数病历详情页.xls";
+        }else{
+            fileName = "病案首页合格数病历详情页.xls";
+        }
+        if("1".equals(qcResultShortPageVO.getRadioCheck())){
+            ExcelUtils.exportExcelUser(records, null, "sheet1", ExportExcelDTO.class, fileName, response);
+        }
+        if("2".equals(qcResultShortPageVO.getRadioCheck())){
+            ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
+        }
+    }
+
     /**
      * 未整改病历统计导出
      *

+ 14 - 0
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -3035,6 +3035,20 @@ public class ConsoleFacade {
         return behospitalInfoFacade.badLevelPage(qcResultPageVO);
     }
 
+    /**
+     * 不合格/合格数病历号(内页)-湘雅
+     *
+     * @param qcResultPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> badLevelXYPage(QcResultPageXYVO qcResultPageVO) {
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        String userId = SysUserUtils.getCurrentPrincipleID();
+        qcResultPageVO.setHospitalId(hospitalId);
+        qcResultPageVO.setUserId(Long.valueOf(userId));
+        return behospitalInfoFacade.getBaseMapper().badLevelXYPage(qcResultPageVO);
+    }
+
     /**
      * 31天再入院详情页
      *

+ 19 - 0
src/main/java/com/diagbot/mapper/BehospitalInfoMapper.java

@@ -544,6 +544,15 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      */
     public IPage<QcResultShortDTO> badLevelPage(@Param("qcResultPageVO") QcResultPageVO qcResultPageVO);
 
+    /**
+     * 不合格/合格数病历号(内页)XY
+     *
+     * @param qcResultPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> badLevelXYPage(@Param("qcResultPageVO") QcResultPageXYVO qcResultPageVO);
+
+
 
     /**
      * 未整改病历缺陷评分详情页导出
@@ -573,6 +582,16 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
 
     public List<ExportExcelDTO> badLevelPagePageExport(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
 
+
+    /**
+     * 病案首页不合格/合格数病历详情页导出-XY
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+
+    public List<ExportExcelDTO> badLevelPageXYExport(@Param("qcResultShortPageVO") QcResultShortXYPageVO qcResultShortPageVO);
+
     /**
      * 病案首页不合格/合格数病历详情页导出-科室
      *

+ 159 - 0
src/main/java/com/diagbot/vo/QcResultPageXYVO.java

@@ -0,0 +1,159 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/6/16 17:00
+ */
+@Getter
+@Setter
+public class QcResultPageXYVO extends Page {
+    @ApiModelProperty(hidden = true)
+    private Long userId;
+    @ApiModelProperty(hidden = true)
+    private String hospitalId;
+    /**
+     * 病历号
+     */
+    private String behospitalCode;
+    /**
+     * 病人姓名
+     */
+    private String patName;
+
+    /**
+     * title名称
+     */
+    private String titleName;
+
+    /**
+     * 条目名称
+     */
+    private String casesEntryName;
+
+    /**
+     * 主诊断
+     */
+    private String diagnose;
+
+    /**
+     * 条目id
+     */
+    private Long casesEntryId;
+    /**
+     * 模块名称
+     */
+    private String casesName;
+    /**
+     * 模块id
+     */
+    private Long casesId;
+    /**
+     * 科室名称
+     */
+    private String deptName;
+    /**
+     * 科室id
+     */
+    private String deptClass;
+
+    /**
+     * 科室id
+     */
+    private String deptId;
+
+    /**
+     * 医生姓名
+     */
+    private String doctorName;
+
+    /**
+     * 医师类别
+     */
+    private String professor;
+    /**
+     * 医生编号
+     */
+    private String doctorId;
+    /**
+     * 病历等级
+     */
+    private String level;
+    @NotNull(message = "请输入起始时间")
+    @DateTimeFormat(pattern = "yyyy-MM-dd  HH:mm:ss")
+    private String startDate;
+    @DateTimeFormat(pattern = "yyyy-MM-dd  HH:mm:ss")
+    @NotNull(message = "请输入截止时间")
+    private String endDate;
+
+    /**
+     * 单项否决
+     */
+    private Integer isReject;
+
+    /**
+     * 规则类型(0:无,1:空项,2:错误)
+     */
+    private Integer ruleType;
+
+    /**
+     * 离院人员类型(0/null:总人数,1:死亡人数,2:新生儿,3:手术病人数,4:非医嘱离院病人,5:31日再入院病人)
+     */
+    private Integer leaveHosType;
+
+    /**
+     * 核查状态(1:已核查,0:未核查)
+     */
+    private Integer checkStatus;
+    /**
+     * 首页核查状态(1:已核查,0:未核查)
+     */
+    private Integer mrStatus;
+    /**
+     * 病历核查人员
+     */
+    private String chName;
+    /**
+     * 首页核查人员
+     */
+    private String mrName;
+    /**
+     * 病历核查起始时间
+     */
+    private Date chTimeStart;
+    /**
+     * 病历核查截止时间
+     */
+    private Date chTimeEnd;
+    /**
+     * 首页核查起始时间
+     */
+    private Date mrTimeStart;
+    /**
+     * 首页核查截止时间
+     */
+    private Date mrTimeEnd;
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile = "1";
+
+    /**
+     * 住院超过31日标志
+     */
+    private Integer beHosGT31Days;
+
+    /**
+     * 改善标志(1:病案首页改善病历,2:病案首页改善至合格病历,3:病案首页改善至满分病历)
+     */
+    private Integer improveType;
+}

+ 12 - 0
src/main/java/com/diagbot/web/ConsoleController.java

@@ -563,6 +563,18 @@ public class ConsoleController {
         return RespDTO.onSuc(consoleFacade.badLevelPage(qcResultPageVO));
     }
 
+    /**
+     * 病案首页不合格数病历详情(内页)-湘雅
+     * @param qcResultPageVO
+     * @return
+     */
+    @ApiOperation(value = "病案首页不合格/合格数病历详情(内页)[by:cy]")
+    @PostMapping("/badLevelXYPage")
+    @SysLogger("badLevelXYPage")
+    public RespDTO<IPage<QcResultShortDTO>> badLevelXYPage(@RequestBody @Valid QcResultPageXYVO qcResultPageVO) {
+        return RespDTO.onSuc(consoleFacade.badLevelXYPage(qcResultPageVO));
+    }
+
 
     /**
      * 病案首页合格率占比(首页)

+ 14 - 0
src/main/java/com/diagbot/web/ConsoleExportController.java

@@ -411,6 +411,20 @@ public class ConsoleExportController {
     }
 
 
+    /**
+     * 病案首页不合格/合格数病历详情页导出-XY
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @ApiOperation(value = "病案首页不合格/合格数病历详情页导出[by:cy]")
+    @PostMapping("/badLevelPageXYExport")
+    @SysLogger("badLevelPageXYExport")
+    public void badLevelPageXYExport(HttpServletResponse response, @RequestBody @Valid QcResultShortXYPageVO qcResultShortPageVO) {
+        consoleExportFacade.badLevelPageXYExport(response, qcResultShortPageVO);
+    }
+
+
     /**
      * 稽查病历详情页导出
      *

File diff suppressed because it is too large
+ 954 - 183
src/main/resources/mapper/BehospitalInfoMapper.xml