Explorar el Código

修改规则 THR03010 入院后没有连续记录3天

hecc hace 3 años
padre
commit
93aec3991e

+ 6 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/xiamen/threelevelward/THR03010.java

@@ -13,10 +13,7 @@ import org.apache.commons.lang3.time.DateUtils;
 import org.springframework.stereotype.Component;
 
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * @author wangfeng
@@ -34,6 +31,9 @@ public class THR03010 extends QCCatalogue {
         if (inputInfo.getFirstPageRecordDoc() == null || inputInfo.getFirstPageRecordDoc().getStructureMap().size() == 0) {
             return;
         }
+        if (inputInfo.getBeHospitalizedDoc() == null || inputInfo.getBeHospitalizedDoc().getStructureMap().size() == 0) {
+            return;
+        }
         //获取入院记录文档集合
         Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
         //入院日期为空前面就是入院日期,入院日期不为空 前面就为空
@@ -97,6 +97,8 @@ public class THR03010 extends QCCatalogue {
                     }
                 }
 
+                //把病程录里的时=时间按照从小到大排序
+                Collections.sort(wordDateList,Comparator.comparing(Date::getTime));
                 //如果记录时间没有3天
                 if (wordDateList.size() < 3) {
                     status.set("-1");