zhoutg 4 лет назад
Родитель
Сommit
ca6b32a67e
1 измененных файлов с 43 добавлено и 0 удалено
  1. 43 0
      src/main/java/com/diagbot/rule/OtherRule.java

+ 43 - 0
src/main/java/com/diagbot/rule/OtherRule.java

@@ -0,0 +1,43 @@
+package com.diagbot.rule;
+
+import com.diagbot.biz.push.entity.Pacs;
+import com.diagbot.dto.IndicationDTO;
+import com.diagbot.dto.WordCrfDTO;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.google.common.collect.Lists;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @description: 特殊规则
+ * @author: zhoutg
+ * @time: 2021/5/24 13:23
+ */
+@Component
+public class OtherRule {
+
+    /**
+     * 70岁及以上开内镜检查时,需要做心电图检查
+     *
+     * @param wordCrfDTO
+     * @param res
+     */
+    public void otherRule(WordCrfDTO wordCrfDTO, IndicationDTO res) {
+        if (wordCrfDTO.getAgeNum() != null && wordCrfDTO.getAgeNum() >= 70) {
+            List<Pacs> pacsOrder = wordCrfDTO.getPacsOrder();
+            if (ListUtil.isNotEmpty(pacsOrder)) {
+                List<String> orderNameList = Lists.newArrayList("胃镜"); // 内镜检查
+                List<String> ecgList = Lists.newArrayList("心电图"); // 心电图检查
+                for (Pacs pacs : pacsOrder) {
+                    String ordreName = pacs.getName();
+                    if (StringUtil.isNotBlank(ordreName) && orderNameList.contains(ordreName)) {
+                        // TODO 检查时效内辅检
+
+                    }
+                }
+            }
+        }
+    }
+}