|
@@ -32,11 +32,13 @@ import com.diagbot.facade.TranLisConfigIcssFacade;
|
|
|
import com.diagbot.model.entity.Clinical;
|
|
|
import com.diagbot.model.entity.Operation;
|
|
|
import com.diagbot.model.label.ChiefLabel;
|
|
|
-import com.diagbot.model.label.PacsLabel;
|
|
|
import com.diagbot.model.label.PastLabel;
|
|
|
import com.diagbot.model.label.PresentLabel;
|
|
|
+import com.diagbot.rule.AgeRule;
|
|
|
import com.diagbot.rule.CommonRule;
|
|
|
+import com.diagbot.rule.GroupRule;
|
|
|
import com.diagbot.rule.LisRule;
|
|
|
+import com.diagbot.rule.VitalRule;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.CoreUtil;
|
|
|
import com.diagbot.util.ListUtil;
|
|
@@ -59,6 +61,7 @@ import org.springframework.stereotype.Component;
|
|
|
import java.lang.reflect.Field;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
+import java.util.Collections;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.HashSet;
|
|
|
import java.util.LinkedHashMap;
|
|
@@ -92,6 +95,12 @@ public class PushProcess {
|
|
|
LisRule lisRule;
|
|
|
@Autowired
|
|
|
KlDiagnoseFacade klDiagnoseFacade;
|
|
|
+ @Autowired
|
|
|
+ AgeRule ageRule;
|
|
|
+ @Autowired
|
|
|
+ VitalRule vitalRule;
|
|
|
+ @Autowired
|
|
|
+ GroupRule groupRule;
|
|
|
|
|
|
|
|
|
public PushDTO processIcss(PushVO pushVo) {
|
|
@@ -381,7 +390,7 @@ public class PushProcess {
|
|
|
* @param wordCrfDTO
|
|
|
*/
|
|
|
public void pushDiagnose(WordCrfDTO wordCrfDTO, PushDTO pushDTO) {
|
|
|
- // 读取所有的诊断依据规则——已去重处理
|
|
|
+ // 读取所有的诊断依据规则——已去重
|
|
|
List<BaseDiagnoseDTO> diagnoselist = redisUtil.get(RedisEnum.allBaseDiagnose.getName());
|
|
|
// 匹配的诊断依据规则
|
|
|
List<Long> baseIdList = new ArrayList<>();
|
|
@@ -396,9 +405,6 @@ public class PushProcess {
|
|
|
List<Item> medicineAll = wordCrfDTO.getDrugSource();
|
|
|
// 【诊断数据来源】
|
|
|
List<Item> diags = wordCrfDTO.getDiagSource();
|
|
|
- // 【辅检结果数据来源】
|
|
|
- PacsLabel pacsLabel = wordCrfDTO.getPacsLabel();
|
|
|
- List<Item> pacsDescList = pacsLabel.getRes();
|
|
|
// 【手术数据来源】
|
|
|
List<Operation> operations_all = new ArrayList<>();
|
|
|
List<Item> operation = wordCrfDTO.getOperation();
|
|
@@ -437,6 +443,7 @@ public class PushProcess {
|
|
|
case Group: // 人群
|
|
|
break;
|
|
|
case PacsResult: // 辅助检查结果
|
|
|
+ commonRule.compareItemWithPush(wordCrfDTO.getPacsLabel().getRes(), ruleBaseDTO, baseIdList, baseIds);
|
|
|
break;
|
|
|
}
|
|
|
break;
|
|
@@ -446,18 +453,24 @@ public class PushProcess {
|
|
|
lisRule.push(wordCrfDTO.getLis(), ruleBaseDTO, baseIdList, baseIds);
|
|
|
break;
|
|
|
case Age: // 年龄
|
|
|
+ ageRule.push(wordCrfDTO, ruleBaseDTO, baseIdList, baseIds);
|
|
|
break;
|
|
|
- case VitalResult: // 体格检查结果
|
|
|
+ case Vital: // 体格检查项目
|
|
|
break;
|
|
|
}
|
|
|
break;
|
|
|
case B3: // 主诉现病史正则
|
|
|
+ commonRule.getRegexResPush(wordCrfDTO.getChief() + wordCrfDTO.getSymptom(),
|
|
|
+ base.getBaseEqValue(), baseIdList, baseIds);
|
|
|
break;
|
|
|
case B4: // 既往史正则
|
|
|
+ commonRule.getRegexResPush(wordCrfDTO.getPasts() + wordCrfDTO.getPersonal() + wordCrfDTO.getMenstrual() + wordCrfDTO.getMarital() + wordCrfDTO.getFamily(),
|
|
|
+ base.getBaseEqValue(), baseIdList, baseIds);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
// 根据诊断依据推送诊断
|
|
|
+ Collections.sort(baseIdList); // id排序,方便调试查看
|
|
|
pushDTO.getDebug().put("诊断依据ID列表", StringUtils.join(baseIdList, ","));
|
|
|
Map<String, List<PushBaseDTO>> pushDiagnoseDTO = setPushDiagnose(wordCrfDTO, baseIdList);
|
|
|
pushDTO.setDis(pushDiagnoseDTO);
|