فهرست منبع

医嘱/检查/检验 缺陷条目格式定位统一

chengyao 4 سال پیش
والد
کامیت
a56f730601

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

@@ -37,22 +37,17 @@ public class DoctorAdviceServiceImpl extends ServiceImpl<DoctorAdviceMapper, Doc
     public IPage<DoctorAdviceDTO> getPage(DoctorAdviceVO doctorAdviceVO) {
 
         List<String> infos = this.baseMapper.getInfo(doctorAdviceVO.getHospitalId(), doctorAdviceVO.getBehospitalCode());
-
         Set<String> infoSet = new HashSet<>();
-
         for (String s : infos) {
             if (s.contains("医嘱:")) {
                 String[] split = s.split("、");
                 for (String info : split) {
                     String[] targetInfos = info.split(":");
-                    for (String targetInfo : targetInfos) {
-                        if (!targetInfo.contains("医嘱")) {
-                            String[] target = targetInfo.split(",");
-                            infoSet.add(target[0] + ")");
+                    for (String target : targetInfos) {
+                        if (!"医嘱".equals(target)) {
+                            infoSet.add(target);
                         }
-
                     }
-
                 }
             }
         }

+ 5 - 6
src/main/java/com/diagbot/service/impl/MedLisInfoServiceImpl.java

@@ -41,21 +41,20 @@ public class MedLisInfoServiceImpl extends ServiceImpl<MedLisInfoMapper, MedLisI
 
         Set<String> infoSet = new HashSet<>();
         for (String s : infos) {
-            if (s.contains("验:")) {
+            if (s.contains("验:")) {
                 String[] split = s.split("、");
                 for (String info : split) {
                     String[] targetInfos = info.split(":");
                     for (String targetInfo : targetInfos) {
-                        if (!targetInfo.contains("检验")) {
-                            String[] target = targetInfo.split(",");
-                            infoSet.add(target[0] + ")");
+                        if (!"化验".equals(targetInfo)) {
+                            infoSet.add(targetInfo);
                         }
-
                     }
-
                 }
             }
         }
+        String s = examineInfoVO.getBehospitalCode();
+        examineInfoVO.setBehospitalCode( s.split("_")[0]);
 
         IPage<ExamineInfoDTO> page = this.baseMapper.getExamineInfo(examineInfoVO, infoSet);
         return page;

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

@@ -34,10 +34,8 @@ public class MedPacsInfoServiceImpl extends ServiceImpl<MedPacsInfoMapper, MedPa
                 for (String info : split) {
                     String[] targetInfos = info.split(":");
                     for (String targetInfo : targetInfos) {
-                        if (!targetInfo.contains("检查")) {
-                            String[] target = targetInfo.split(",");
-                           // infoSet.add(target[0] + ")");
-                            infoSet.add(target[0]);
+                        if (!"检查".equals(targetInfo)) {
+                            infoSet.add(targetInfo);
                         }
 
                     }

+ 8 - 2
src/main/resources/mapper/MedLisInfoMapper.xml

@@ -31,17 +31,23 @@
         t1.rep_no as repNo,
         t1.rep_name as examineItemName,
         t1.rep_type_name as examineItemType,
-        CONCAT( t1.rep_name, '(',DATE_FORMAT( t1.check_date,'%Y-%m-%d'),')')as info,
+        CONCAT( t2.item_name, '(',DATE_FORMAT( t2.gmt_create,'%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,
         t1.apply_doctor as doctorName,
         t1.hospital_id as hospitalId,
         t1.behospital_code as behospitalCode
         FROM
-        med_lis_info t1
+        med_lis_info t1,
+        med_lis_result t2
         WHERE
         t1.is_deleted = "N"
+        AND t2.is_deleted = "N"
         AND t1.check_date IS NOT NULL
+        AND t2.item_name IS NOT NULL
+        AND t1.hospital_id = t2.hospital_id
+        AND t1.behospital_code = t2.behospital_code
+        AND t1.rep_no = t2.rep_no
         <if test="examineInfoVO.hospitalId != null">
             and t1.hospital_id = #{examineInfoVO.hospitalId}
         </if>

+ 18 - 3
src/main/resources/mapper/MedLisResultMapper.xml

@@ -25,9 +25,24 @@
     <select id="getMedLisResults" parameterType="com.diagbot.entity.BehospitalInfo"
             resultType="com.diagbot.dto.MedLisResultDTO">
         SELECT
-        t1.rep_no,t1.rep_name repName,t2.behospital_code,t2.hospital_id,t2.item_code,t2.item_name
-        reportName,t2.result,t2.reference,t2.reference_max,t2.reference_min,
-        t2.unit,t2.abnormal,t2.color,t2.is_deleted,t2.gmt_create,t2.gmt_modified,t2.creator,t2.modifier
+        t1.rep_no,
+        t1.rep_name as repName,
+        t2.behospital_code,
+        t2.hospital_id,
+        t2.item_code,
+        t2.item_name as reportName,
+        t2.result,
+        t2.reference,
+        t2.reference_max,
+        t2.reference_min,
+        t2.unit,
+        t2.abnormal,
+        t2.color,
+        t2.is_deleted,
+        t2.gmt_create,
+        t2.gmt_modified,
+        t2.creator,
+        t2.modifier
         FROM
         med_lis_info t1,
         med_lis_result t2

+ 2 - 2
src/main/resources/mapper/MedPacsInfoMapper.xml

@@ -32,7 +32,7 @@
         SELECT
         t2.rept_name as checkItemName,
         t1.rep_type_name as checkItemType,
-        CONCAT( t2.rept_name, '(',DATE_FORMAT( t1.check_date,'%Y-%m-%d'),')')as info,
+        CONCAT( t2.rept_name, '(',DATE_FORMAT( t2.gmt_create,'%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,
         t1.apply_doctor as doctorName,
@@ -45,6 +45,7 @@
         WHERE
         t1.is_deleted = "N"
         AND t2.is_deleted = "N"
+        AND t2.rept_name IS NOT NULL
         AND t1.check_date IS NOT NULL
         and t1.hospital_id = t2.hospital_id
         and t1.behospital_code = t2.behospital_code
@@ -110,5 +111,4 @@
             and a.behospital_code = #{behospitalCode}
         </if>
     </select>
-
 </mapper>