Browse Source

病案首页合格不合格病历展示导出字段调整

chengyao 3 years ago
parent
commit
d81ff9b549

+ 4 - 0
src/main/java/com/diagbot/dto/ExportWideExcelByDeptDTO.java

@@ -17,6 +17,10 @@ import java.util.List;
 public class ExportWideExcelByDeptDTO {
 //    @Excel(name = "科室", needMerge = true)
     private String behDeptName;
+    @Excel(name = "病区", needMerge = true)
+    private String wardName;
+    @Excel(name = "医疗组", needMerge = true)
+    private String medoupName;
     @Excel(name = "主管医生", needMerge = true)
     private String doctorName;
     @Excel(name = "平均分数", needMerge = true)

+ 2 - 0
src/main/java/com/diagbot/facade/ConsoleByDeptExportFacade.java

@@ -520,6 +520,8 @@ public class ConsoleByDeptExportFacade {
                 exportWideExcelByDeptDTO.setAvgScore(exportExcelByDeptDTO.getAvgScore());
                 exportNinetyByDeptDTO.setBehDeptName( exportExcelByDeptDTO.getBehDeptName());
                 exportWideExcelByDeptDTO.setDoctorName(exportExcelByDeptDTO.getDoctorName());
+                exportWideExcelByDeptDTO.setWardName(exportExcelByDeptDTO.getWardName());
+                exportWideExcelByDeptDTO.setMedoupName(exportExcelByDeptDTO.getMedoupName());
                 List<ExportExcelBehByDeptDTO> exportExcelBehByDeptDTOS = exportExcelByDeptDTO.getExcelBehospitalDTOS();
                 List<ExportExcelWideBehByDeptDTO> exportExcelWideBehByDepDTOs = new ArrayList<>();
 

+ 12 - 0
src/main/java/com/diagbot/vo/QcResultPageVO.java

@@ -45,6 +45,18 @@ public class QcResultPageVO extends Page {
      */
     private String diagnose;
 
+    /**
+     * 病区name
+     */
+    private String wardName;
+
+
+    /**
+     * 医疗组name
+     */
+    private String medoupName;
+
+
     /**
      * 条目id
      */

+ 48 - 1
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -11121,6 +11121,7 @@
 
     <!-- 不合格/合格数病历号(内页)科室-->
     <select id="getIsGoodLevelByDept" resultType="com.diagbot.dto.QcResultShortDTO">
+        select m.*,t3.name as medoupName from(
         SELECT t.*
         FROM
         (SELECT DISTINCT
@@ -11252,6 +11253,9 @@
         <if test="diagnose != null and diagnose != ''">
             AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
         </if>
+        <if test="wardName != null and wardName != ''">
+            AND a.ward_name LIKE CONCAT( '%', #{wardName}, '%' )
+        </if>
         <if test="behospitalCode != null and behospitalCode != ''">
             AND a.behospital_code LIKE CONCAT( '%', #{behospitalCode}, '%' )
         </if>
@@ -11360,6 +11364,9 @@
         <if test="diagnose != null and diagnose != ''">
             AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
         </if>
+        <if test="wardName != null and wardName != ''">
+            AND a.ward_name LIKE CONCAT( '%', #{wardName}, '%' )
+        </if>
         <if test="behospitalCode != null and behospitalCode != ''">
             AND a.behospital_code LIKE CONCAT( '%', #{behospitalCode}, '%' )
         </if>
@@ -11396,6 +11403,16 @@
         </if>
         <if test="mrTimeEnd != null ">
             <![CDATA[ AND t.mrTime <= #{mrTimeEnd}]]>
+        </if>)m LEFT JOIN bas_doctor_info t2 ON m.doctorId = t2.doctor_id
+        AND t2.is_deleted = 'N'
+        LEFT JOIN sys_medoup t3 ON t2.group_id = t3.`code`
+        AND t3.is_deleted = 'N'
+        where
+         <if test="hospitalId != null and hospitalId != ''">
+             t2.hospital_id = #{hospitalId}
+    </if>
+        <if test="medoupName != null and medoupName != ''">
+            AND t3.name = #{medoupName}
         </if>
     </select>
 
@@ -12554,6 +12571,8 @@
         f1.patName,
         f1.behospitalCode,
         f1.hospitalId,
+        f1.wardName,
+        f1.medoupName,
         f1.behospitalDate,
         f1.leaveHospitalDate,
         f1.score,
@@ -12574,6 +12593,7 @@
         t.doctorName AS doctorName,
         t.doctorId,
         t.`name` AS patName,
+        t.wardName,
         t.behospitalCode AS behospitalCode,
         t.behospitalDate AS behospitalDate,
         t.leaveHospitalDate AS leaveHospitalDate,
@@ -12591,7 +12611,8 @@
         t.chName,
         t.mrName,
         t.chTime,
-        t.mrTime
+        t.mrTime,
+        t3.name as medoupName
         FROM
         (SELECT DISTINCT
         t1.hospital_id AS hospitalId,
@@ -12717,6 +12738,9 @@
         <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
             AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
         </if>
+        <if test="qcResultShortPageVO.wardName != null and qcResultShortPageVO.wardName != ''">
+            AND a.ward_name LIKE CONCAT( '%', #{qcResultShortPageVO.wardName}, '%' )
+        </if>
         <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
             AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
         </if>
@@ -12774,6 +12798,10 @@
         LEFT JOIN med_qcresult_info qi ON qi.is_deleted = 'N'
         AND t.hospitalId = qi.hospital_id
         AND t.behospitalCode = qi.behospital_code
+        LEFT JOIN bas_doctor_info t2 ON t.doctorId = t2.doctor_id
+        AND t2.is_deleted = 'N'
+        LEFT JOIN sys_medoup t3 ON t2.group_id = t3.`code`
+        AND t3.is_deleted = 'N'
         <if test="qcResultShortPageVO.radioCheck !=null and qcResultShortPageVO.radioCheck == 1">
             LEFT JOIN med_qcresult_detail qd ON qd.is_deleted = 'N'
             AND t.hospitalId = qd.hospital_id
@@ -12785,6 +12813,12 @@
             AND qd.cases_entry_id = qce.id
         </if>
         where 1=1
+        <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
+            AND t2.hospital_id = #{qcResultShortPageVO.hospitalId}
+        </if>
+        <if test="qcResultShortPageVO.medoupName != null and qcResultShortPageVO.medoupName != ''">
+            AND t3.name = #{qcResultShortPageVO.medoupName}
+        </if>
         <if test="qcResultShortPageVO.checkStatus != null">
             AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
         </if>
@@ -12950,6 +12984,9 @@
         <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
             AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
         </if>
+        <if test="qcResultShortPageVO.wardName != null and qcResultShortPageVO.wardName != ''">
+            AND a.ward_name LIKE CONCAT( '%', #{qcResultShortPageVO.wardName}, '%' )
+        </if>
         <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
             AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
         </if>
@@ -13004,7 +13041,17 @@
         LEFT JOIN med_qcresult_info qi ON qi.is_deleted = 'N'
         AND t.hospitalId = qi.hospital_id
         AND t.behospitalCode = qi.behospital_code
+        LEFT JOIN bas_doctor_info t2 ON t.doctorId = t2.doctor_id
+        AND t2.is_deleted = 'N'
+        LEFT JOIN sys_medoup t3 ON t2.group_id = t3.`code`
+        AND t3.is_deleted = 'N'
         where 1=1
+        <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
+            AND t2.hospital_id = #{qcResultShortPageVO.hospitalId}
+        </if>
+        <if test="qcResultShortPageVO.medoupName != null and qcResultShortPageVO.medoupName != ''">
+            AND t3.name = #{qcResultShortPageVO.medoupName}
+        </if>
         <if test="qcResultShortPageVO.checkStatus != null">
             AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
         </if>