Bladeren bron

主诊断搜索添加

chengyao 4 jaren geleden
bovenliggende
commit
dddbfbd25b

+ 3 - 0
doc/026.20201123v1.4.8/qc_initv1.4.8.sql

@@ -0,0 +1,3 @@
+use `qc`;
+ALTER TABLE `med_behospital_info` ADD `trans_in_time` datetime DEFAULT NULL COMMENT '转入时间' AFTER `leave_hospital_date`;
+ALTER TABLE `med_behospital_info` ADD `trans_out_time` datetime DEFAULT NULL COMMENT '转出时间' AFTER `trans_in_time`;

+ 9 - 4
src/main/java/com/diagbot/service/impl/MedLisInfoServiceImpl.java

@@ -13,6 +13,7 @@ import com.diagbot.vo.CheckInfoVO;
 import com.diagbot.vo.DoctorAdviceVO;
 import com.diagbot.vo.ExamineInfoVO;
 import com.diagbot.vo.ExamineSonInfoVO;
+import org.apache.commons.lang3.ObjectUtils;
 import org.springframework.stereotype.Service;
 
 import java.text.ParseException;
@@ -54,10 +55,14 @@ public class MedLisInfoServiceImpl extends ServiceImpl<MedLisInfoMapper, MedLisI
         //获取病人进出院时间
         Map<String, Object> timeMap = this.baseMapper.getTime(examineInfoVO.getBehospitalCode());
         if (null != timeMap) {
-            Date behospital_date = (Date) timeMap.get("behospital_date");
-            examineInfoVO.setBehospitalDate(behospital_date);
-            Date leaveHospitalDate = (Date) timeMap.get("leave_hospital_date");
-            examineInfoVO.setLeaveHospitalDate(leaveHospitalDate);
+            if(!ObjectUtils.isEmpty( timeMap.get("behospital_date"))){
+                Date behospital_date = (Date) timeMap.get("behospital_date");
+                examineInfoVO.setBehospitalDate(behospital_date);
+            }
+            if(!ObjectUtils.isEmpty(timeMap.get("leave_hospital_date"))){
+                Date leaveHospitalDate = (Date) timeMap.get("leave_hospital_date");
+                examineInfoVO.setLeaveHospitalDate(leaveHospitalDate);
+            }
         }
 
         String behospitalCode = examineInfoVO.getBehospitalCode();

+ 9 - 4
src/main/java/com/diagbot/service/impl/MedPacsInfoServiceImpl.java

@@ -7,6 +7,7 @@ import com.diagbot.mapper.MedPacsInfoMapper;
 import com.diagbot.service.MedPacsInfoService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.diagbot.vo.CheckInfoVO;
+import org.apache.commons.lang3.ObjectUtils;
 import org.springframework.stereotype.Service;
 
 import javax.validation.constraints.NotBlank;
@@ -48,10 +49,14 @@ public class MedPacsInfoServiceImpl extends ServiceImpl<MedPacsInfoMapper, MedPa
         //获取病人进出院时间
         Map<String, Object> timeMap = this.baseMapper.getTime(checkInfoVO.getBehospitalCode());
         if (null != timeMap) {
-            Date behospital_date = (Date) timeMap.get("behospital_date");
-            checkInfoVO.setBehospitalDate(behospital_date);
-            Date leaveHospitalDate = (Date) timeMap.get("leave_hospital_date");
-            checkInfoVO.setLeaveHospitalDate(leaveHospitalDate);
+            if(!ObjectUtils.isEmpty( timeMap.get("behospital_date"))){
+                Date behospital_date = (Date) timeMap.get("behospital_date");
+                checkInfoVO.setBehospitalDate(behospital_date);
+            }
+            if(!ObjectUtils.isEmpty(timeMap.get("leave_hospital_date"))){
+                Date leaveHospitalDate = (Date) timeMap.get("leave_hospital_date");
+                checkInfoVO.setLeaveHospitalDate(leaveHospitalDate);
+            }
         }
         String behospitalCode = checkInfoVO.getBehospitalCode();
         if(2l == checkInfoVO.getHospitalId()){

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

@@ -71,6 +71,11 @@ public class BehospitalPageVO extends Page implements Serializable {
      */
     private String deptId;
 
+    /**
+     * 主诊断
+     */
+    private String diagnose;
+
     /**
      * 医生姓名
      */

+ 5 - 2
src/main/java/com/diagbot/vo/ExportQcresultVO.java

@@ -29,7 +29,10 @@ public class ExportQcresultVO {
     private String hospitalId;
     @ApiModelProperty(hidden = true)
     private Long userId;
-
+    /**
+     * 主诊断
+     */
+    private String diagnose;
     private String behospitalCode;
     private String level;
     private String doctorName;
@@ -49,4 +52,4 @@ public class ExportQcresultVO {
      * 是否归档(0:未归档,1:已归档)
      */
     private String isPlacefile = "1";
-}
+}

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

@@ -39,6 +39,12 @@ public class QcResultPageVO extends Page {
      * 条目名称
      */
     private String casesEntryName;
+
+    /**
+     * 主诊断
+     */
+    private String diagnose;
+
     /**
      * 条目id
      */

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

@@ -33,6 +33,11 @@ public class QcResultShortPageVO extends Page {
      */
     private String casesEntryName;
 
+    /**
+     * 主诊断
+     */
+    private String diagnose;
+
     /**
      * title名称
      */

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

@@ -69,6 +69,9 @@
         ON t.behospital_code = h.behospital_code
         AND t.hospital_id = h.hospital_id
         where t.is_deleted = 'N'
+        <if test="diagnose != null and diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
         <if test="deptId != null and deptId != ''">
             and t.beh_dept_id = #{deptId}
         </if>
@@ -372,6 +375,9 @@
         ON t.behospital_code = h.behospital_code
         AND t.hospital_id = h.hospital_id
         where t.is_deleted = 'N'
+        <if test="diagnose != null and diagnose != ''">
+            AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
         <if test="deptId != null and deptId != ''">
             and t.beh_dept_id = #{deptId}
         </if>
@@ -501,6 +507,9 @@
         ON t.behospital_code = h.behospital_code
         AND t.hospital_id = h.hospital_id
         WHERE t.is_deleted = 'N'
+        <if test="diagnose != null and diagnose != ''">
+            AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
         <if test="deptId != null and deptId != ''">
             and t.beh_dept_id = #{deptId}
         </if>
@@ -605,6 +614,9 @@
         <if test="deptId != null and deptId != ''">
             and t.beh_dept_id = #{deptId}
         </if>
+        <if test="diagnose != null and diagnose != ''">
+            AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
         <if test="doctorName != null and doctorName != ''">
             and (t.doctor_name like CONCAT('%',#{doctorName},'%')
             or t.beh_doctor_name like CONCAT('%',#{doctorName},'%')
@@ -3292,6 +3304,9 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
+        <if test="diagnose != null and diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
         <if test="behosDateStart != null">
             <![CDATA[ and a.behospital_date >= #{behosDateStart}]]>
         </if>
@@ -3347,6 +3362,9 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
+        <if test="diagnose != null and diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
         <if test="behosDateStart != null">
             <![CDATA[ and a.behospital_date >= #{behosDateStart}]]>
         </if>
@@ -3451,7 +3469,7 @@
         t1.leaveHospitalDate,
         t1.score,
         t2.avgScore,
-        t1.scoreBn,
+        e.score_res as scoreBn,
         t1.msg,
         t1.caseName
         FROM
@@ -3464,7 +3482,6 @@
         a.behospital_date AS behospitalDate,
         a.leave_hospital_date AS leaveHospitalDate,
         b.score_res AS score,
-        e.score_res as scoreBn,
         c.msg AS msg,
         d.NAME AS caseName,
         a.beh_dept_id AS behDeptId,
@@ -3489,6 +3506,9 @@
         AND a.behospital_code = c.behospital_code
         AND c.cases_id = d.id
         AND a.beh_dept_id = e.dept_id
+        <if test="diagnose != null and diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
         <if test="isPlacefile != null and isPlacefile != ''">
             and a.is_placefile = #{isPlacefile}
         </if>
@@ -3556,6 +3576,9 @@
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = b.behospital_code
         AND a.beh_dept_id = c.dept_id
+        <if test="diagnose != null and diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
         <if test="isPlacefile != null and isPlacefile != ''">
             and a.is_placefile = #{isPlacefile}
         </if>
@@ -3670,6 +3693,7 @@
         t1.leaveHospitalDate,
         t1.score,
         t2.avgScore,
+        e.score_res as scoreBn,
         t1.msg,
         t1.caseName
         FROM
@@ -3718,6 +3742,9 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
+        <if test="diagnose != null and diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
         <if test="behosDateStart != null">
             <![CDATA[ and a.behospital_date >= #{behosDateStart}]]>
         </if>
@@ -3752,7 +3779,11 @@
         <if test="name != null and name != ''">
             AND a.name like CONCAT('%',#{name},'%')
         </if>
-        ) t1,
+        ) t1 LEFT JOIN med_qcresult_cases e
+        on  t1.behospitalCode = e.behospital_code
+        and t1.hospital_id = e.hospital_id
+        AND e.is_deleted = 'N'
+        and e.cases_id = 243,
         (
         SELECT
         ROUND( AVG( b.score_res ), 2 ) AS avgScore,
@@ -3776,6 +3807,9 @@
         AND b.is_deleted = 'N'
         AND a.hospital_id = b.hospital_id
         AND a.behospital_code = b.behospital_code
+        <if test="diagnose != null and diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
         <if test="isPlacefile != null and isPlacefile != ''">
             and a.is_placefile = #{isPlacefile}
         </if>
@@ -3981,6 +4015,9 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
         <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
         </if>
@@ -5280,6 +5317,9 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
         <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
         </if>
@@ -6019,6 +6059,9 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
         <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
         </if>
@@ -6247,6 +6290,9 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
         <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
         </if>
@@ -6493,6 +6539,9 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
         <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
         </if>
@@ -6758,6 +6807,9 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
         <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
         </if>
@@ -7317,10 +7369,12 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultPageVO.endDate}]]>
             </if>
         </if>
+        <if test="qcResultPageVO.diagnose != null and qcResultPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultPageVO.diagnose}, '%' )
+        </if>
         <if test="qcResultPageVO.behDeptName != null and qcResultPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultPageVO.behDeptName}
         </if>
-
         <if test="qcResultPageVO.behospitalCode != null and qcResultPageVO.behospitalCode != ''">
             AND a.behospital_code LIKE CONCAT( '%', #{qcResultPageVO.behospitalCode}, '%' )
         </if>
@@ -7415,6 +7469,9 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultPageVO.endDate}]]>
             </if>
         </if>
+        <if test="qcResultPageVO.diagnose != null and qcResultPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultPageVO.diagnose}, '%' )
+        </if>
         <if test="qcResultPageVO.behDeptName != null and qcResultPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultPageVO.behDeptName}
         </if>
@@ -7580,6 +7637,9 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
         <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
         </if>
@@ -7816,6 +7876,9 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
         <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
         </if>
@@ -8034,6 +8097,9 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
         <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
         </if>
@@ -8274,6 +8340,9 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
         <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
         </if>
@@ -8484,6 +8553,9 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
         <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
         </if>
@@ -9279,6 +9351,9 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
         <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
         </if>
@@ -10029,6 +10104,9 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
         <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
         </if>
@@ -10210,6 +10288,9 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
         <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
         </if>