Jelajahi Sumber

病案首页缺陷病历增加病区、医疗组字段并导出

chengyao 3 tahun lalu
induk
melakukan
608fa962f7

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

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

+ 9 - 6
src/main/java/com/diagbot/dto/QcResultShortDTO.java

@@ -70,6 +70,9 @@ public class QcResultShortDTO {
     private String directorDoctorId;
     @Excel(name = "主任医生", width = 30, orderNum = "16")
     private String directorDoctorName;
+    //病区code
+    private String ward_code;
+    private String wardName;
     /**
      * 科室编码
      */
@@ -77,9 +80,13 @@ public class QcResultShortDTO {
     /**
      * 科室名称
      */
-    @Excel(name = "科室", width = 70, orderNum = "17")
+    @Excel(name = "科室", width = 70, orderNum = "18")
     private String behDeptName;
-    @Excel(name = "评分时间", format = "yyyy-MM-dd", width = 30, orderNum = "18")
+    //医疗组id
+    private String MedoupId;
+    //医疗组
+    private String medoupName;
+    @Excel(name = "评分时间", format = "yyyy-MM-dd", width = 30, orderNum = "20")
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private Date gradeTime;
 
@@ -89,10 +96,6 @@ public class QcResultShortDTO {
     private Integer gradeType;
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private Date birthday;
-    /**
-     * 病区名称
-     */
-    private String wardName;
 
     /**
      * 病历核查状态

+ 11 - 0
src/main/java/com/diagbot/vo/QcResultShortPageVO.java

@@ -43,6 +43,17 @@ public class QcResultShortPageVO extends Page {
      */
     private String diagnose;
 
+    /**
+     * 病区name
+     */
+    private String wardName;
+
+
+    /**
+     * 医疗组name
+     */
+    private String medoupName;
+
     /**
      * title名称
      */

+ 36 - 4
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -4110,6 +4110,8 @@
 
     <resultMap id="ExportExcelMapByDept" type="com.diagbot.dto.ExportExcelByDeptDTO">
         <result column="behDeptName" property="behDeptName"/>
+        <result column="wardName" property="wardName"/>
+        <result column="medoupName" property="medoupName"/>
         <result column="doctorName" property="doctorName"/>
         <result column="avgScore" property="avgScore"/>
         <collection property="excelBehospitalDTOS"
@@ -5366,7 +5368,7 @@
 
     <!-- 条目缺陷质控评分页-科室(内页)-->
     <select id="qcResultShortByDeptPage" resultType="com.diagbot.dto.QcResultShortDTO">
-        SELECT t.*
+        SELECT t.*,t3.name as medoupName
         FROM
         (SELECT DISTINCT
         t1.hospital_id AS hospitalId,
@@ -5491,6 +5493,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 = #{qcResultShortPageVO.deptName}
         </if>
@@ -5591,7 +5596,17 @@
             AND t3.is_deleted = 'N'
         </if>
         ) t
-        where 1=1
+        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
+        <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
+             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>
@@ -9417,7 +9432,7 @@
 
     <!--缺陷详情质控评分页导出-科室-->
     <select id="qcResultShortByDeptPageExport" resultMap="ExportExcelMapByDept">
-        SELECT * from(
+        SELECT m.*, t3.name as medoupName from(
         SELECT
         f1.*,
         f2.avgScore
@@ -9550,6 +9565,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 = #{qcResultShortPageVO.deptName}
         </if>
@@ -9821,6 +9839,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 = #{qcResultShortPageVO.deptName}
         </if>
@@ -9953,7 +9974,18 @@
         WHERE
         f1.doctorId = f2.doctorId
         AND f1.doctorName = f2.doctorName
-        )m
+        AND f1.doctorName = f2.doctorName
+        )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="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
+             t2.hospital_id = #{qcResultShortPageVO.hospitalId}
+        </if>
+        <if test="qcResultShortPageVO.medoupName != null and qcResultShortPageVO.medoupName != ''">
+            AND t3.name LIKE CONCAT( '%', #{qcResultShortPageVO.medoupName}, '%' )
+        </if>
     </select>
     <!-- 条目缺陷评分详情页导出-->
     <select id="qcResultShortPageExport" resultMap="ExportExcelMap">