Browse Source

1、每周无两次主任,三次主治查房 时间提示信息修改

louhr 5 years ago
parent
commit
e9e76b3b55

+ 6 - 2
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0127.java

@@ -9,6 +9,7 @@ import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
 import com.lantone.qc.pub.model.doc.operation.OperationDoc;
 import com.lantone.qc.pub.util.DateUtil;
 import com.lantone.qc.pub.util.StringUtil;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Component;
 
 import java.util.ArrayList;
@@ -85,16 +86,19 @@ public class THR0127 extends QCCatalogue {
                 status.set("0");
                 return;
             }
+            List<String> resultInfos = new ArrayList<>();
             for (int j = 0; j < roundRecordEveryWeek.size(); j++) {
                 int directorNum = CatalogueUtil.appearNumber(roundRecordEveryWeek.get(j).split(","), Content.director);
                 int dept_doctorNum = CatalogueUtil.appearNumber(roundRecordEveryWeek.get(j).split(","), Content.dept_doctor);
                 if (directorNum + dept_doctorNum < 2) {
                     //每周无2次主任医师查房记录/科主任查房记录
                     status.set("-1");
-                    info.set(lastWardDateRangeList.get(j));
-                    return;
+                    resultInfos.add(lastWardDateRangeList.get(j));
                 }
             }
+            if (resultInfos.size() > 0) {
+                info.set(StringUtils.join(resultInfos.toArray(), ";"));
+            }
         }
     }
 

+ 7 - 2
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0128.java

@@ -12,6 +12,7 @@ import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
 import com.lantone.qc.pub.model.doc.operation.OperationDoc;
 import com.lantone.qc.pub.util.DateUtil;
 import com.lantone.qc.pub.util.StringUtil;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -91,6 +92,7 @@ public class THR0128 extends QCCatalogue {
                 return;
             }
             boolean firstRecordAttendExist = findfirstRecordAttend(inputInfo);
+            List<String> resultInfos = new ArrayList<>();
             for (int j = 0; j < roundRecordEveryWeek.size(); j++) {
                 int indicationsNum = CatalogueUtil.appearNumber(roundRecordEveryWeek.get(j).split(","), Content.attend);
                 if (j == 0 && firstRecordAttendExist) { //如果首程中医师签名为主治医师,第一周查房记录也要加上
@@ -99,10 +101,13 @@ public class THR0128 extends QCCatalogue {
                 if (indicationsNum < 3) {
                     //每周无3次主治医师查房记录
                     status.set("-1");
-                    info.set(lastWardDateRangeList.get(j));
-                    return;
+                    resultInfos.add(lastWardDateRangeList.get(j));
                 }
             }
+
+            if (resultInfos.size() > 0) {
+                info.set(StringUtils.join(resultInfos.toArray(), ";"));
+            }
         }
     }
 

+ 8 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0602.java

@@ -48,6 +48,14 @@ public class THR0602 extends QCCatalogue {
             if (CatalogueUtil.isEmpty(operationEndDateStr)) {
                 continue;
             }
+
+            //和系统当前时间做比较,如果未超过48小时,条目不做判断
+            Date admisDate = StringUtil.parseDateTime(operationEndDateStr);
+            boolean isExceed = CatalogueUtil.compareTime(admisDate, new Date(), 48 * 60L);
+            if (!isExceed) {
+                return;
+            }
+
             Map<String, String> doctorRecord = extractWardRecord(
                     allDoctorWradDocs,
                     operationEndDateStr,