فهرست منبع

出院/入院病历展示导出字段调整

chengyao 3 سال پیش
والد
کامیت
dbc2a87d9f

+ 1 - 4
src/main/java/com/diagbot/dto/QcResultShortDTO.java

@@ -82,10 +82,7 @@ public class QcResultShortDTO {
      */
     @Excel(name = "科室", width = 70, orderNum = "18")
     private String behDeptName;
-    //医疗组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;

+ 136 - 0
src/main/java/com/diagbot/dto/QcResultShortDeptDTO.java

@@ -0,0 +1,136 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/6/16 16:54
+ */
+@Getter
+@Setter
+public class QcResultShortDeptDTO {
+    /**
+     * 医院id
+     */
+    private String hospitalId;
+
+    /**
+     * 病历等级
+     */
+    @Excel(name = "病历等级", width = 30, orderNum = "1")
+    private String level;
+    /**
+     * 病历得分
+     */
+    @Excel(name = "病历得分", width = 30, orderNum = "2")
+    private Double scoreRes;
+    @Excel(name = "病案首页得分", width = 30, orderNum = "2.5")
+    private Double scoreBn;
+    @Excel(name = "病人住院序号", width = 40, orderNum = "3")
+    private String behospitalCode;
+    @Excel(name = "病案号", width = 30, orderNum = "5")
+    private String fileCode;
+    @Excel(name = "病人姓名", width = 30, orderNum = "6")
+    private String name;
+    @Excel(name = "性别", width = 20, orderNum = "7")
+    private String sex;
+    @Excel(name = "年龄", width = 20, orderNum = "8")
+    private String age;
+    @Excel(name = "床号", width = 30, orderNum = "9")
+    private String bedCode;
+    @Excel(name = "入院日期", format = "yyyy-MM-dd", width = 30, orderNum = "10")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date behospitalDate;
+    @Excel(name = "出院日期", format = "yyyy-MM-dd", width = 30, orderNum = "11")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date leaveHospitalDate;
+    @Excel(name = "归档日期", format = "yyyy-MM-dd", width = 30, orderNum = "12")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date placefileDate;
+    @Excel(name = "主诊断", width = 60, orderNum = "13")
+    private String diagnose;
+    private String behDoctorId;
+    @Excel(name = "住院医生", width = 30, orderNum = "14")
+    private String behDoctorName;
+    /**
+     * 主治医生id
+     */
+    private String doctorId;
+    /**
+     * 主治医生姓名
+     */
+    @Excel(name = "主管医生", width = 30, orderNum = "15")
+    private String doctorName;
+
+    //病区code
+    private String ward_code;
+    /**
+     * 病区
+     */
+    @Excel(name = "病区", width = 30, orderNum = "16")
+    private String wardName;
+
+    private String directorDoctorId;
+    @Excel(name = "主任医生", width = 30, orderNum = "17")
+    private String directorDoctorName;
+
+    /**
+     * 科室编码
+     */
+    private String behDeptId;
+    /**
+     * 科室名称
+     */
+    @Excel(name = "科室", width = 70, orderNum = "18")
+    private String behDeptName;
+    //医疗组id
+    private String MedoupId;
+
+    //医疗组
+    @Excel(name = "科室", width = 70, orderNum = "19")
+    private String medoupName;
+    @Excel(name = "评分时间", format = "yyyy-MM-dd", width = 30, orderNum = "20")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date gradeTime;
+
+    /**
+     * 评分类型
+     */
+    private Integer gradeType;
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date birthday;
+
+    /**
+     * 病历核查状态
+     */
+    //@Excel(name = "核查状态", width = 20, orderNum = "4",replace = { "已核查_1", "未核查_0", "_null" })
+    private Integer checkStatus;
+    /**
+     * 首页核查状态
+     */
+    private Integer mrStatus;
+    /**
+     * 病历核查人员
+     */
+    private String chName;
+    /**
+     * 首页核查人员
+     */
+    private String mrName;
+    /**
+     * 病历核查时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date chTime;
+    /**
+     * 首页核查时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date mrTime;
+}

+ 2 - 2
src/main/java/com/diagbot/facade/ConsoleByDeptFacade.java

@@ -854,9 +854,9 @@ public class ConsoleByDeptFacade {
      * @param qcResultShortPageVO
      * @return
      */
-    public IPage<QcResultShortDTO> leaveHosMRPageByDept(QcResultShortPageVO qcResultShortPageVO) {
+    public IPage<QcResultShortDeptDTO> leaveHosMRPageByDept(QcResultShortPageVO qcResultShortPageVO) {
         filterFacade.qcResultShortPageVOSet(qcResultShortPageVO);
-        IPage<QcResultShortDTO> page = behospitalInfoFacade.leaveHosMRPageByDept(qcResultShortPageVO);
+        IPage<QcResultShortDeptDTO> page = behospitalInfoFacade.leaveHosMRPageByDept(qcResultShortPageVO);
         return page;
     }
 

+ 1 - 1
src/main/java/com/diagbot/mapper/BehospitalInfoMapper.java

@@ -391,7 +391,7 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      * @param qcResultShortPageVO
      * @return
      */
-    public IPage<QcResultShortDTO> leaveHosMRPageByDept(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+    public IPage<QcResultShortDeptDTO> leaveHosMRPageByDept(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
 
 
     /**

+ 1 - 1
src/main/java/com/diagbot/service/BehospitalInfoService.java

@@ -401,7 +401,7 @@ public interface BehospitalInfoService extends IService<BehospitalInfo> {
      * @param qcResultShortPageVO
      * @return
      */
-    public IPage<QcResultShortDTO> leaveHosMRPageByDept(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+    public IPage<QcResultShortDeptDTO> leaveHosMRPageByDept(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
 
     /**
      * 改善率统计-全院(首页)

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

@@ -503,8 +503,8 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
      * @return
      */
     @Override
-    public IPage<QcResultShortDTO> leaveHosMRPageByDept(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO) {
-        IPage<QcResultShortDTO> qcResultShortDTOIPage = baseMapper.leaveHosMRPageByDept(qcResultShortPageVO);
+    public IPage<QcResultShortDeptDTO> leaveHosMRPageByDept(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO) {
+        IPage<QcResultShortDeptDTO> qcResultShortDTOIPage = baseMapper.leaveHosMRPageByDept(qcResultShortPageVO);
         return qcResultShortDTOIPage;
     }
 

+ 1 - 1
src/main/java/com/diagbot/web/ConsoleByDeptController.java

@@ -328,7 +328,7 @@ public class ConsoleByDeptController {
                     "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/leaveHosMRPageByDept")
     @SysLogger("leaveHosMRPageByDept")
-    public RespDTO<IPage<QcResultShortDTO>> leaveHosMRPageByDept(@RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
+    public RespDTO<IPage<QcResultShortDeptDTO>> leaveHosMRPageByDept(@RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
         return RespDTO.onSuc(consoleByDeptFacade.leaveHosMRPageByDept(qcResultShortPageVO));
     }
 

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

@@ -7309,9 +7309,9 @@
     </select>
 
     <!-- 离院病人评分详情页-科室-->
-    <select id="leaveHosMRPageByDept" resultType="com.diagbot.dto.QcResultShortDTO">
+    <select id="leaveHosMRPageByDept" resultType="com.diagbot.dto.QcResultShortDeptDTO">
         SELECT
-        t.*
+        t.*,t3.name as medoupName
         FROM
         (SELECT DISTINCT
         t1.hospital_id AS hospitalId,
@@ -7428,6 +7428,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>
@@ -7520,8 +7523,17 @@
             AND t1.hospital_id = t2.hospital_id
             AND t1.behospital_code = t2.behospital_code
         </if>
-        )t
+        )t  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>
@@ -8915,6 +8927,8 @@
         f1.behospitalDate,
         f1.leaveHospitalDate,
         f1.score,
+        f1.medoupName,
+        f1.wardName,
         f2.avgScore,
         f1.scoreBn,
         <if test="qcResultShortPageVO.radioCheck !=null and qcResultShortPageVO.radioCheck == 1">
@@ -8932,6 +8946,7 @@
         t.doctorName,
         t.doctorId,
         t.`name` AS patName,
+        t3.name as medoupName,
         t.behospitalCode AS behospitalCode,
         t.behospitalDate AS behospitalDate,
         t.leaveHospitalDate AS leaveHospitalDate,
@@ -8943,6 +8958,7 @@
         </if>
         t.behDeptId,
         t.behDeptName,
+        t.wardName,
         t.hospitalId,
         t.checkStatus,
         t.mrStatus,
@@ -9066,6 +9082,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>
@@ -9154,6 +9173,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
@@ -9162,6 +9185,12 @@
             AND qd.cases_id = qc.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>
@@ -9308,6 +9337,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>
@@ -9391,7 +9423,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>