Bläddra i källkod

Merge remote-tracking branch 'origin/dev/20200903_1.4.5' into test

chengyao 4 år sedan
förälder
incheckning
433e0452df

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 10 - 10
doc/022.20200911v1.4.5/qc_initv1.4.5.sql


+ 2 - 2
pom.xml

@@ -37,8 +37,8 @@
         <okhttp.version>4.2.2</okhttp.version>
         <easypoi.version>4.2.0</easypoi.version>
         <docker-maven-plugin.version>1.2.1</docker-maven-plugin.version>
-        <docker.image.prefix>192.168.2.241:5000/diagbotcloud</docker.image.prefix>
-        <registryUrl>http://192.168.2.241:5000/repository/diagbotcloud/</registryUrl>
+        <docker.image.prefix>192.168.2.236:5000/diagbotcloud</docker.image.prefix>
+        <registryUrl>http://192.168.2.236:5000/repository/diagbotcloud/</registryUrl>
     </properties>
 
     <dependencyManagement>

+ 2 - 0
src/main/java/com/diagbot/dto/CheckInfoDTO.java

@@ -46,11 +46,13 @@ public class CheckInfoDTO {
     /**
      * 入院时间
      */
+    @JsonIgnore
     private Date behospitalDate;
 
     /**
      * 出院时间
      */
+    @JsonIgnore
     private Date leaveHospitalDate;
 
     /**

+ 2 - 0
src/main/java/com/diagbot/dto/ExamineInfoDTO.java

@@ -48,11 +48,13 @@ public class ExamineInfoDTO {
     /**
      * 入院时间
      */
+    @JsonIgnore
     private Date behospitalDate;
 
     /**
      * 出院时间
      */
+    @JsonIgnore
     private Date leaveHospitalDate;
 
     /**

+ 7 - 2
src/main/java/com/diagbot/facade/ConsoleExportFacade.java

@@ -67,7 +67,7 @@ public class ConsoleExportFacade {
     }
 
     /**
-     * 运行病历稽查统计导出(首页)
+     * 病历稽查统计导出(首页)
      *
      * @param filterVO
      * @return
@@ -76,8 +76,13 @@ public class ConsoleExportFacade {
         filterVO.setCurrent(1L);
         filterVO.setSize(Long.MAX_VALUE);
         filterVO.setSearchCount(false);
+        String fileName = null;
+        if ( "1".equals(filterVO.getIsPlacefile())) {
+            fileName = "终末病历稽查表.xls";
+        } else {
+            fileName = "运行病历稽查表.xls";
+        }
         List<MedicalCheckExportDTO> records = consoleFacade.medicalCheckExport(filterVO);
-        String fileName = "病历稽查统计表.xls";
         ExcelUtils.exportExcelUser(records, null, "sheet1", MedicalCheckExportDTO.class, fileName, response);
     }
 

+ 7 - 0
src/main/java/com/diagbot/service/MedLisInfoService.java

@@ -1,7 +1,12 @@
 package com.diagbot.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.ExamineInfoDTO;
+import com.diagbot.dto.ExamineSonInfoDTO;
 import com.diagbot.entity.MedLisInfo;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.vo.ExamineInfoVO;
+import com.diagbot.vo.ExamineSonInfoVO;
 
 /**
  * <p>
@@ -12,5 +17,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @since 2020-07-28
  */
 public interface MedLisInfoService extends IService<MedLisInfo> {
+    IPage<ExamineInfoDTO> getExamineInfo(ExamineInfoVO examineInfoVO);
+    IPage<ExamineSonInfoDTO> getExamineSonInfo(ExamineSonInfoVO examineSonInfoVO);
 
 }

+ 4 - 0
src/main/java/com/diagbot/service/MedPacsInfoService.java

@@ -1,7 +1,10 @@
 package com.diagbot.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.CheckInfoDTO;
 import com.diagbot.entity.MedPacsInfo;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.vo.CheckInfoVO;
 
 /**
  * <p>
@@ -12,5 +15,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @since 2020-07-28
  */
 public interface MedPacsInfoService extends IService<MedPacsInfo> {
+    IPage<CheckInfoDTO> getCheckInfo(CheckInfoVO checkInfoVO);
 
 }

+ 1 - 1
src/main/java/com/diagbot/service/impl/DoctorAdviceServiceImpl.java

@@ -40,7 +40,7 @@ public class DoctorAdviceServiceImpl extends ServiceImpl<DoctorAdviceMapper, Doc
         Set<String> infoSet = new HashSet<>();
         for (String s : infos) {
             if (s.contains("医嘱:")) {
-                String[] split = s.split("");
+                String[] split = s.split("-");
                 for (String info : split) {
                     String[] targetInfos = info.split(":");
                     for (String target : targetInfos) {

+ 11 - 7
src/main/java/com/diagbot/service/impl/MedLisInfoServiceImpl.java

@@ -39,7 +39,7 @@ public class MedLisInfoServiceImpl extends ServiceImpl<MedLisInfoMapper, MedLisI
         Set<String> infoSet = new HashSet<>();
         for (String s : infos) {
             if (s.contains("化验:")) {
-                String[] split = s.split("");
+                String[] split = s.split("-");
                 for (String info : split) {
                     String[] targetInfos = info.split(":");
                     for (String targetInfo : targetInfos) {
@@ -53,13 +53,17 @@ public class MedLisInfoServiceImpl extends ServiceImpl<MedLisInfoMapper, MedLisI
 
         //获取病人进出院时间
         Map<String, Object> timeMap = this.baseMapper.getTime(examineInfoVO);
-        Date behospital_date = (Date) timeMap.get("behospital_date");
-        examineInfoVO.setBehospitalDate(behospital_date);
-        Date leaveHospitalDate = (Date) timeMap.get("leave_hospital_date");
-        examineInfoVO.setLeaveHospitalDate(leaveHospitalDate);
+        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);
+        }
 
-        String s = examineInfoVO.getBehospitalCode();
-        examineInfoVO.setBehospitalCode(s.split("_")[0]);
+        String behospitalCode = examineInfoVO.getBehospitalCode();
+        if(2l == examineInfoVO.getHospitalId()){
+            examineInfoVO.setBehospitalCode(behospitalCode.split("_")[0]);
+        }
 
         IPage<ExamineInfoDTO> page = this.baseMapper.getExamineInfo(examineInfoVO, infoSet);
         return page;

+ 6 - 3
src/main/java/com/diagbot/service/impl/MedPacsInfoServiceImpl.java

@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.diagbot.vo.CheckInfoVO;
 import org.springframework.stereotype.Service;
 
+import javax.validation.constraints.NotBlank;
 import java.util.*;
 
 /**
@@ -30,7 +31,7 @@ public class MedPacsInfoServiceImpl extends ServiceImpl<MedPacsInfoMapper, MedPa
         Set<String> infoSet = new HashSet<>();
         for (String s : infos) {
             if (s.contains("检查:")) {
-                String[] split = s.split("");
+                String[] split = s.split("-");
                 for (String info : split) {
                     String[] targetInfos = info.split(":");
                     for (String targetInfo : targetInfos) {
@@ -52,9 +53,11 @@ public class MedPacsInfoServiceImpl extends ServiceImpl<MedPacsInfoMapper, MedPa
             Date leaveHospitalDate = (Date) timeMap.get("leave_hospital_date");
             checkInfoVO.setLeaveHospitalDate(leaveHospitalDate);
         }
+        String behospitalCode = checkInfoVO.getBehospitalCode();
+        if(2l == checkInfoVO.getHospitalId()){
+            checkInfoVO.setBehospitalCode(behospitalCode.split("_")[0]);
+        }
 
-        String s = checkInfoVO.getBehospitalCode();
-        checkInfoVO.setBehospitalCode(s.split("_")[0]);
         IPage<CheckInfoDTO> page = this.baseMapper.getCheckInfo(checkInfoVO, infoSet);
         return page;
     }

+ 1 - 1
src/main/resources/mapper/DoctorAdviceMapper.xml

@@ -47,7 +47,7 @@
         t.da_start_date,
         t.da_stop_date,
         t.da_item_name,
-        CONCAT( t.da_item_name, '(',DATE_FORMAT( t.da_start_date,'%Y-%m-%d'),')')as info,
+        CONCAT( t.da_item_name, '(',DATE_FORMAT( t.da_start_date,'%Y-%m-%d %H:%i:%s'),')')as info,
         t.da_prescription_type,
         t.medicine_type,
         t.dose,

+ 9 - 4
src/main/resources/mapper/MedLisInfoMapper.xml

@@ -54,9 +54,9 @@
         t1.rep_no as repNo,
         t1.rep_name as examineItemName,
         t1.rep_type_name as examineItemType,
-        CONCAT( t2.item_name, '(',DATE_FORMAT( t1.check_date,'%Y-%m-%d'),')')as info,
-        DATE_FORMAT( t1.rep_date, '%Y-%m-%d %h:%i:%s' ) as rTime,
-        DATE_FORMAT( t1.check_date, '%Y-%m-%d %h:%i:%s' ) as cTime,
+        CONCAT( t2.item_name, '(',DATE_FORMAT( t1.check_date,'%Y-%m-%d %H:%i:%s'),')')as info,
+        DATE_FORMAT( t1.rep_date, '%Y-%m-%d %H:%i:%s' ) as rTime,
+        DATE_FORMAT( t1.check_date, '%Y-%m-%d %H:%i:%s' ) as cTime,
         t1.apply_doctor as doctorName,
         t1.hospital_id as hospitalId,
         t1.behospital_code as behospitalCode
@@ -73,7 +73,12 @@
         AND t1.hospital_id = t2.hospital_id
         and t1.hospital_id = t3.hospital_id
         AND t1.behospital_code = t2.behospital_code
-        and t1.behospital_code = t3.file_code
+        <if test="examineInfoVO.hospitalId != null and examineInfoVO.hospitalId == 1l">
+            and t1.behospital_code = t3.behospital_code
+        </if>
+        <if test="examineInfoVO.hospitalId != null and examineInfoVO.hospitalId == 2l">
+            and t1.behospital_code = t3.file_code
+        </if>
         AND t1.rep_no = t2.rep_no
         <if test="examineInfoVO.hospitalId != null">
             and t1.hospital_id = #{examineInfoVO.hospitalId}

+ 21 - 13
src/main/resources/mapper/MedPacsInfoMapper.xml

@@ -45,28 +45,36 @@
         SELECT
         t1.rep_name as checkItemName,
         t1.rep_type_name as checkItemType,
-        CONCAT( t1.rep_name, '(',DATE_FORMAT( t1.check_date,'%Y-%m-%d'),')')as info,
+        CONCAT( t1.rep_name, '(',DATE_FORMAT( t1.check_date,'%Y-%m-%d %H:%i:%s'),')')as info,
         date_format (t1.rep_date,'%Y-%m-%d %H:%i:%s') as reptTime,
         date_format (t1.check_date,'%Y-%m-%d %H:%i:%s') as checkTime,
-        t1.apply_doctor as doctorName,
+        t2.apply_doctor as doctorName,
         t2.hospital_id as hospitalId,
         t2.behospital_code as behospitalCode,
         t2.rept_diag as checkResult
         FROM
-        med_pacs_info t1,
-        med_pacs_result t2,
+        med_pacs_info t1
+        right join
         med_behospital_info t3
-        WHERE
-        t1.is_deleted = "N"
-        AND t2.is_deleted = "N"
+        on t1.hospital_id = t3.hospital_id
+        AND t1.is_deleted = "N"
         AND t3.is_deleted = "N"
         AND t1.rep_name IS NOT NULL
         AND t1.check_date IS NOT NULL
-        and t1.hospital_id = t2.hospital_id
-        and t1.hospital_id = t3.hospital_id
-        and t1.behospital_code = t2.behospital_code
-        and t1.behospital_code = t3.file_code
-        and t1.rep_no = t2.rep_no
+        <if test="checkInfoVO.hospitalId != null and checkInfoVO.hospitalId == 1l">
+            and t1.behospital_code = t3.behospital_code
+        </if>
+        <if test="checkInfoVO.hospitalId != null and checkInfoVO.hospitalId == 2l">
+            and t1.behospital_code = t3.file_code
+        </if>
+        left join
+        med_pacs_result t2
+        on t1.hospital_id = t2.hospital_id
+        AND t2.is_deleted = "N"
+        AND t1.behospital_code = t2.behospital_code
+        AND t1.rep_no = t2.rep_no
+        WHERE
+        1=1
         <if test="checkInfoVO.hospitalId != null">
             and t1.hospital_id = #{checkInfoVO.hospitalId}
         </if>
@@ -77,7 +85,7 @@
             and t1.rep_type_name like CONCAT('%',#{checkInfoVO.checkItemType},'%')
         </if>
         <if test="checkInfoVO.checkItemName != null and checkInfoVO.checkItemName != ''">
-            and t2.rept_name like CONCAT('%',#{checkInfoVO.checkItemName},'%')
+            and t1.rep_name like CONCAT('%',#{checkInfoVO.checkItemName},'%')
         </if>
         <if test="checkInfoVO.jxDateStart != null">
             <![CDATA[ AND date_format (t1.check_date,'%Y-%m-%d %H:%i:%s')  >= #{checkInfoVO.jxDateStart}]]>