瀏覽代碼

Merge branch 'dev/20200903_1.4.5' into debug

chengyao 4 年之前
父節點
當前提交
fe4dcff29e

+ 75 - 5
src/main/java/com/diagbot/dto/MedicalCheckDTO.java

@@ -1,5 +1,6 @@
 package com.diagbot.dto;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -15,20 +16,89 @@ import java.util.Map;
 @Getter
 @Setter
 public class MedicalCheckDTO extends Object {
-    //科室名称
-    private String columndeptNames;
 
+    //科室名称
+    private String deptName;
     //科室id
     private String deptId;
 
     //医生
     private String doctorName;
 
-    //稽查数量
-    private String jzCount;
+    //目标字符串
+    @JsonIgnore
+    private String casesEntryId;
 
-    //条目id
+    //条目id数量
     private String numId;
 
+    //入院记录未24小时内
+    private Integer ryjlw_24 = 0;
+
+    //首次病程记录未8小时内
+    private Integer scbcjlw_8h = 0;
+
+    //副主任/主任医师首次查房72小时内未完成
+    private Integer zrsccfw_72h= 0;
+
+    //入院后未连记3天病程
+    private Integer ryhljbcw_3d= 0;
+
+
+
+
+    //每周未至少2次副主任/主任医师查房
+    private Integer zrcfw_2w= 0;
+
+    //每周未至少3次主治医师查房记录
+    private Integer zzcfw_3w= 0;
+
+    //抢救记录未6小时内完成
+    private Integer qjjlw_6h= 0;
+
+    //会诊记录在会诊申请后未24小时完成
+    private Integer hzjlw_24h= 0;
+
+    //术前讨论、术前小结未完成
+    private Integer sqtlxjw= 0;
+
+    //手术记录术后24小时内未完成
+    private Integer sxjlsw_24h= 0;
+
+    //术后首程在术后30分钟内未完成
+    private Integer xhscw_30m= 0;
+
+    //术后主刀查房24小时内未完成
+    private Integer shzdcfw_24h= 0;
+
+    //术后未连记3天病程
+    private Integer shjbcw_3d= 0;
+
+    //转科后未连记3天病程
+    private Integer zkjbcw_3d= 0;
+
+    //转接科记录专科后24小时内未完成
+    private Integer zkjlw_24= 0;
+
+    //病危/重患者未每日记录病程
+    private Integer bwzhjlbcw_md= 0;
+
+    //输血后未完成输血记录
+    private Integer sxhwjl= 0;
+
+    //24小时未完成输血后评价
+    private Integer sxpjw_24= 0;
+
+    //危急值未记录
+    private Integer wjzwjl= 0;
+
+    //住院30天未阶段小结
+    private Integer wywwcxj= 0;
+
+
+
+
+
+
 
 }

+ 122 - 0
src/main/java/com/diagbot/enums/MedicalCheckEnum.java

@@ -0,0 +1,122 @@
+package com.diagbot.enums;
+
+
+
+/**
+ * 稽查质控条目
+ * @author cy
+ */
+public enum MedicalCheckEnum  {
+
+    /**
+     * 入院记录未24小时内
+     */
+    RYJLW_24("2658"),
+
+    /**
+     * 首次病程记录未8小时内
+     */
+    SCBCJLW_8H("2686"),
+
+    /**
+     * 副主任/主任医师首次查房72小时内未完成
+     */
+    ZRSCCFW_72H("2657"),
+
+    /**
+     * 入院后未连记3天病程
+     */
+    RYHLJBCW_3D("3010"),
+
+    /**
+     * 每周至少2次副主任/主任医师查房
+     */
+    ZRCFW_2W ("2655"),
+
+    /**
+     * 每周至少3次主治医师查房记录
+     */
+    ZZCFW_3W("2654"),
+
+    /**
+     * 抢救记录6小时内完成
+     */
+    QJJLW_6H("2852"),
+
+    /**
+     * 会诊记录在会诊申请后24小时完成
+     */
+    HZJLW_24H("2287"),
+
+
+
+
+    /**
+     * 术前讨论、术前小结完成
+     */
+    SQTLXJW("3025"),
+
+    /**
+     * 手术记录术后24小时内完成
+     */
+    SXJLSW_24H("2170"),
+
+    /**
+     * 术后首程在术后30分钟内完成
+     */
+    XHSCW_30M("2930"),
+
+    /**
+     * 术后主刀查房24小时内完成
+     */
+    SHZDCFW_24H("2900"),
+
+    /**
+     * 术后连记3天病程(包括术后首程)
+     */
+    SHJBCW_3D("2229"),
+
+    /**
+     * 转科后连记3天病程(包括专科记录)
+     */
+    ZKJBCW_3D("2217"),
+
+    /**
+     * 转接科记录专科后24小时内完成
+     */
+    ZKJLW_24("2218"),
+
+    /**
+     * 病危/重患者未每日记录病程
+     */
+    BWZHJLBCW_MD("2220"),
+
+    /**
+     * 输血后完成输血记录
+     */
+    SXHWJL("2486"),
+
+    /**
+     * 24小时完成输血后评价
+     */
+    SXPJW_24("3063"),
+    /**
+     * 危急值记录
+     */
+    WJZWJL("3062"),
+
+    /**
+     * 住院30天阶段小结
+     */
+    WYWWCXJ("2495");
+
+    private String status;
+
+    MedicalCheckEnum(String status) {
+        this.status = status;
+    }
+
+    public String getStatus() {
+        return this.status;
+    }
+}

+ 80 - 37
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -1,6 +1,5 @@
 package com.diagbot.facade;
 
-import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -10,6 +9,7 @@ import com.diagbot.aggregate.ResultStatisticsAggregate;
 import com.diagbot.dto.*;
 import com.diagbot.entity.QcCasesEntry;
 import com.diagbot.entity.SysHospitalSet;
+import com.diagbot.enums.MedicalCheckEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.util.*;
@@ -1296,7 +1296,7 @@ public class ConsoleFacade {
      * @param filterVO
      * @return
      */
-    public IPage<Map<String, Object>> getMedicalCheck(@Param("filterVO") FilterMedicalCheckVO filterVO) {
+    public IPage<MedicalCheckDTO> getMedicalCheck(@Param("filterVO") FilterMedicalCheckVO filterVO) {
         //filterFacade.getMedicalCheckVOSet(filterVO);
         filterVO.setHospitalId("2");
         //colums
@@ -1321,22 +1321,19 @@ public class ConsoleFacade {
                 casesEntryIds.add(Long.valueOf(keyValue[0]));
             }
         }
-        filterVO.setCasesEntryIds(casesEntryIds);
-        IPage<Map<String, Object>> medicalCheck = behospitalInfoFacade.getMedicalCheck(filterVO);
-        List<Map<String, Object>> records = medicalCheck.getRecords();
-        List<Map<String, Object>> targetRecords = new ArrayList<>();
 
-        for (Map<String, Object> record : records) {
+        IPage<MedicalCheckDTO> medicalCheck = behospitalInfoFacade.getMedicalCheck(filterVO,casesEntryIds);
+        List<MedicalCheckDTO> records = medicalCheck.getRecords();
+        List<MedicalCheckDTO> targetList = Lists.newArrayList();
+        for (MedicalCheckDTO record : records) {
+
             MedicalCheckDTO medicalCheckDTO = new MedicalCheckDTO();
+            medicalCheckDTO.setDeptId(record.getDeptId());
+            medicalCheckDTO.setDeptName(record.getDeptName());
+            medicalCheckDTO.setDoctorName(record.getDoctorName());
             Map<String, Object> targetMap = new HashMap<String, Object>();
-            Map<String, Object> targetMedicalCheck = new HashMap<>();
-            String deptId = String.valueOf(record.get("deptId"));
-            String deptName = String.valueOf(record.get("deptName"));
-            String doctorName = String.valueOf(record.get("doctorName"));
-            String casesEntryId = String.valueOf(record.get("casesEntryId"));
-
+            String casesEntryId = record.getCasesEntryId();
             String[] split = casesEntryId.split(",");
-
             for (String num : split) {
                 if (!targetMap.containsKey(num)) {
                     targetMap.put(num, 1);
@@ -1344,24 +1341,75 @@ public class ConsoleFacade {
                     targetMap.put(num, (Object) ((Integer) targetMap.get(num) + 1));
                 }
             }
-            medicalCheckDTO.setDoctorName(doctorName);
-            medicalCheckDTO.setDeptId(deptId);
-            medicalCheckDTO.setColumndeptNames(deptName);
             Set<Map.Entry<String, Object>> entries = targetMap.entrySet();
             for (Map.Entry<String, Object> entry : entries) {
-                medicalCheckDTO.setNumId(entry.getKey());
-                medicalCheckDTO.setJzCount(String.valueOf(entry.getValue()));
-                targetMedicalCheck.put(medicalCheckDTO.getNumId(), medicalCheckDTO);
-
+                String key = entry.getKey();
+                medicalCheckDTO.setNumId(key);
+                if(key.equals(MedicalCheckEnum.RYJLW_24.getStatus())){
+                    medicalCheckDTO.setRyjlw_24((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.SCBCJLW_8H.getStatus())){
+                    medicalCheckDTO.setScbcjlw_8h((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.ZRSCCFW_72H.getStatus())){
+                    medicalCheckDTO.setZrcfw_2w((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.RYHLJBCW_3D.getStatus())){
+                    medicalCheckDTO.setRyhljbcw_3d((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.ZRCFW_2W.getStatus())){
+                    medicalCheckDTO.setZrcfw_2w((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.ZZCFW_3W.getStatus())){
+                    medicalCheckDTO.setZzcfw_3w((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.QJJLW_6H.getStatus())){
+                    medicalCheckDTO.setQjjlw_6h((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.HZJLW_24H.getStatus())){
+                    medicalCheckDTO.setHzjlw_24h((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.SQTLXJW.getStatus())){
+                    medicalCheckDTO.setSqtlxjw((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.SXJLSW_24H.getStatus())){
+                    medicalCheckDTO.setSxjlsw_24h((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.XHSCW_30M.getStatus())){
+                    medicalCheckDTO.setXhscw_30m((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.SHZDCFW_24H.getStatus())){
+                    medicalCheckDTO.setShzdcfw_24h((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.SHJBCW_3D.getStatus())){
+                    medicalCheckDTO.setShjbcw_3d((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.ZKJBCW_3D.getStatus())){
+                    medicalCheckDTO.setZkjbcw_3d((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.ZKJLW_24.getStatus())){
+                    medicalCheckDTO.setZkjlw_24((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.BWZHJLBCW_MD.getStatus())){
+                    medicalCheckDTO.setBwzhjlbcw_md((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.SXHWJL.getStatus())){
+                    medicalCheckDTO.setSxhwjl((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.SXPJW_24.getStatus())){
+                    medicalCheckDTO.setSxpjw_24((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.WJZWJL.getStatus())){
+                    medicalCheckDTO.setWjzwjl((Integer)entry.getValue());
+                }
+                if(key.equals(MedicalCheckEnum.WYWWCXJ.getStatus())){
+                    medicalCheckDTO.setWywwcxj((Integer)entry.getValue());
+                }
             }
-
-
-            targetRecords.add(targetMedicalCheck);
+            targetList.add(medicalCheckDTO);
         }
-        medicalCheck.setRecords(targetRecords);
-
-
-        return medicalCheck;
+        IPage<MedicalCheckDTO> medicalCheckDTOIPage = medicalCheck.setRecords(targetList);
+        return medicalCheckDTOIPage;
     }
 
     /**
@@ -1370,8 +1418,6 @@ public class ConsoleFacade {
      * @param
      * @return
      */
-
-
     public List<ColumnDTO> getMedicalCheckTitle() {
         //运行病历稽查入参拼接
         // String hospitalId = SysUserUtils.getCurrentHospitalID();
@@ -1405,16 +1451,13 @@ public class ConsoleFacade {
         columns.add(columnDeptName);
         orderNo++;
         ColumnDTO columnMedicalName = new ColumnDTO();
-        columnDeptName.setOrderNo(orderNo);
-        columnDeptName.setFieldName("medicalName");
-        columnDeptName.setColumnName("医疗组");
-        columnDeptName.setIsShow(1);
+        columnMedicalName.setOrderNo(orderNo);
+        columnMedicalName.setFieldName("medicalName");
+        columnMedicalName.setColumnName("医疗组");
+        columnMedicalName.setIsShow(1);
         columns.add(columnMedicalName);
         orderNo++;
         for (String valueStr : columnSet) {
-            if (StringUtil.isBlank(valueStr)) {
-                continue;
-            }
             String[] keyValue = valueStr.split("--");
             if (keyValue != null || keyValue.length > 1) {
                 ColumnDTO columnNum = new ColumnDTO();

+ 2 - 14
src/main/java/com/diagbot/mapper/BehospitalInfoMapper.java

@@ -2,19 +2,7 @@ package com.diagbot.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.diagbot.dto.BehospitalInfoDTO;
-import com.diagbot.dto.DeptNumDTO;
-import com.diagbot.dto.EntryStatisticsDTO;
-import com.diagbot.dto.ExportExcelDTO;
-import com.diagbot.dto.HomePageImproveDTO;
-import com.diagbot.dto.HomePageNumDTO;
-import com.diagbot.dto.LevelStatisticsDTO;
-import com.diagbot.dto.LevelStatisticsTZDTO;
-import com.diagbot.dto.MsgDTO;
-import com.diagbot.dto.NumDTO;
-import com.diagbot.dto.QcResultShortDTO;
-import com.diagbot.dto.ReBeHosMergeDTO;
-import com.diagbot.dto.UnModifyMRDetailDTO;
+import com.diagbot.dto.*;
 import com.diagbot.entity.BehospitalInfo;
 import com.diagbot.vo.*;
 import org.apache.ibatis.annotations.Param;
@@ -342,7 +330,7 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      * @param filterVO
      * @return
      */
-    public IPage<Map<String, Object>>  getMedicalCheck(@Param("filterVO")FilterMedicalCheckVO filterVO,@Param("infos")List<Long> infos);
+    public IPage<MedicalCheckDTO>  getMedicalCheck(@Param("filterVO")FilterMedicalCheckVO filterVO, @Param("infos")List<Long> infos);
 
 
     /**

+ 2 - 14
src/main/java/com/diagbot/service/BehospitalInfoService.java

@@ -2,19 +2,7 @@ package com.diagbot.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.diagbot.dto.BehospitalInfoDTO;
-import com.diagbot.dto.DeptNumDTO;
-import com.diagbot.dto.EntryStatisticsDTO;
-import com.diagbot.dto.ExportExcelDTO;
-import com.diagbot.dto.HomePageImproveDTO;
-import com.diagbot.dto.HomePageNumDTO;
-import com.diagbot.dto.LevelStatisticsDTO;
-import com.diagbot.dto.LevelStatisticsTZDTO;
-import com.diagbot.dto.MsgDTO;
-import com.diagbot.dto.NumDTO;
-import com.diagbot.dto.QcResultShortDTO;
-import com.diagbot.dto.ReBeHosMergeDTO;
-import com.diagbot.dto.UnModifyMRDetailDTO;
+import com.diagbot.dto.*;
 import com.diagbot.entity.BehospitalInfo;
 import com.diagbot.vo.*;
 import org.apache.ibatis.annotations.Param;
@@ -325,7 +313,7 @@ public interface BehospitalInfoService extends IService<BehospitalInfo> {
      * 运行病历稽查表
      * @return
      */
-    IPage<Map<String, Object>>  getMedicalCheck(FilterMedicalCheckVO filterVO);
+    IPage<MedicalCheckDTO>  getMedicalCheck(FilterMedicalCheckVO filterVO,List<Long>casesEntryIds);
 
 
     /**

+ 3 - 15
src/main/java/com/diagbot/service/impl/BehospitalInfoServiceImpl.java

@@ -2,19 +2,7 @@ package com.diagbot.service.impl;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.diagbot.dto.BehospitalInfoDTO;
-import com.diagbot.dto.DeptNumDTO;
-import com.diagbot.dto.EntryStatisticsDTO;
-import com.diagbot.dto.ExportExcelDTO;
-import com.diagbot.dto.HomePageImproveDTO;
-import com.diagbot.dto.HomePageNumDTO;
-import com.diagbot.dto.LevelStatisticsDTO;
-import com.diagbot.dto.LevelStatisticsTZDTO;
-import com.diagbot.dto.MsgDTO;
-import com.diagbot.dto.NumDTO;
-import com.diagbot.dto.QcResultShortDTO;
-import com.diagbot.dto.ReBeHosMergeDTO;
-import com.diagbot.dto.UnModifyMRDetailDTO;
+import com.diagbot.dto.*;
 import com.diagbot.entity.BehospitalInfo;
 import com.diagbot.mapper.BehospitalInfoMapper;
 import com.diagbot.service.BehospitalInfoService;
@@ -475,8 +463,8 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
      * @return
      */
     @Override
-    public IPage<Map<String, Object>> getMedicalCheck(FilterMedicalCheckVO filterVO) {
-        return baseMapper.getMedicalCheck(filterVO,filterVO.getCasesEntryIds());
+    public IPage<MedicalCheckDTO> getMedicalCheck(@Param("filterVO") FilterMedicalCheckVO filterVO,@Param("casesEntryIds") List<Long>casesEntryIds) {
+        return baseMapper.getMedicalCheck(filterVO,casesEntryIds);
 
     }
 

+ 0 - 5
src/main/java/com/diagbot/vo/FilterMedicalCheckVO.java

@@ -36,11 +36,6 @@ public class FilterMedicalCheckVO extends Page {
      */
     @ApiModelProperty(hidden = true)
     private Long userId;
-    /**
-     * 关键条目id
-     */
-    @ApiModelProperty(hidden = true)
-    private List<Long> casesEntryIds;
 
     /**
      * 科室名称

+ 3 - 6
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -6417,15 +6417,14 @@
         AND f1.behDeptName = f2.behDeptName
     </select>
     <!--    运行病历稽查表-->
-    <select id="getMedicalCheck" resultType="java.util.Map">
+    <select id="getMedicalCheck" resultType="com.diagbot.dto.MedicalCheckDTO">
         SELECT
         DISTINCT a.file_code,
         a.doctor_name as doctorName,
         a.beh_dept_id AS deptId,
         a.beh_dept_name AS deptName,
         group_concat(d.id) AS casesEntryId,
-        group_concat(d.NAME) AS casesEntryName,
-        count(*) AS casesEntryNum
+        group_concat(d.NAME) AS casesEntryName
         FROM
         med_behospital_info a,
         med_qcresult_info b,
@@ -6478,9 +6477,7 @@
         </if>
         GROUP BY
         a.beh_dept_id,
-        a.beh_dept_name,
-        c.cases_entry_id,
-        d.NAME
+        a.doctor_name
     </select>
 
     <!-- 未整改病历统计-->