|
@@ -28,6 +28,7 @@ import com.diagbot.util.MsgUtil;
|
|
|
import com.diagbot.util.RedisUtil;
|
|
|
import com.diagbot.util.ReflectUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
+import com.diagbot.vo.ItemExt;
|
|
|
import com.diagbot.vo.RuleVO;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -188,6 +189,7 @@ public class OtherTipProcess {
|
|
|
public void processTransfusion(WordCrfDTO wordCrfDTO, IndicationDTO res) {
|
|
|
List<Lis> lisList = wordCrfDTO.getLis();
|
|
|
List<BillMsg> otherList = res.getOtherList();
|
|
|
+ // 1、化验为key
|
|
|
for (Lis lis : lisList) {
|
|
|
RuleVO ruleVO = getRuleVO(lis, RuleTypeEnum.transfusion.getKey());
|
|
|
// 1、获取相关数据
|
|
@@ -204,6 +206,35 @@ public class OtherTipProcess {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ // 2、输血为key
|
|
|
+ List<ItemExt> transfusionList = wordCrfDTO.getTransfusion();
|
|
|
+ if (ListUtil.isNotEmpty(transfusionList)) {
|
|
|
+ Long dateInterval = redisUtil.getByKeyAndField(RedisEnum.dateInterval.getName(), RedisEnum.dateInterval.getField().get(1));
|
|
|
+ Long minute = (-1L == dateInterval) ? 99999999999L : 60L * dateInterval;
|
|
|
+
|
|
|
+ for (ItemExt bean : transfusionList) {
|
|
|
+ RuleVO ruleVO = getRuleVO(bean, RuleTypeEnum.transfusion.getKey());
|
|
|
+ // 1、获取相关数据
|
|
|
+ if (ruleVO != null) {
|
|
|
+ RuleExtDTO ruleExtDTO = commonFacade.getRuleData(ruleVO);
|
|
|
+ if (ruleExtDTO == null) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ // int dateFlag = CoreUtil.compareTime(ruleExtDTO.getFinishDateValue(), "2022-01-25 15:00:00", minute, false, false);
|
|
|
+ int dateFlag = CoreUtil.compareTime(ruleExtDTO.getFinishDateValue(), DateUtil.formatDateTime(DateUtil.now()), minute, false, false);
|
|
|
+ if (dateFlag != 1) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ List<RuleConditionDTO> ruleConditionDTOList = ruleExtDTO.getRuleConditionDTOList();
|
|
|
+ for (RuleConditionDTO ruleConditionDTO : ruleConditionDTOList) {
|
|
|
+ List<RuleBaseDTO> ruleBaseDTOList = ruleConditionDTO.getRuleBaseDTOList();
|
|
|
+ // 2、规则匹配
|
|
|
+ lisRule.otherTransfusionLis(bean, ruleBaseDTOList, ruleConditionDTO.getMsg(), otherList, wordCrfDTO, minute);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -355,4 +386,25 @@ public class OtherTipProcess {
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取其他值提醒入参——输血
|
|
|
+ *
|
|
|
+ * @param i
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public RuleVO getRuleVO(ItemExt i, Integer key) {
|
|
|
+ if (StringUtil.isNotBlank(i.getUniqueName())) {
|
|
|
+ RuleVO ruleVO = new RuleVO();
|
|
|
+ ruleVO.setInputName(i.getName());
|
|
|
+ ruleVO.setLibName(i.getUniqueName());
|
|
|
+ ruleVO.setLibType(LexiconEnum.Transfusion.getKey());
|
|
|
+ ruleVO.setLibTypeName(LexiconEnum.Transfusion.getName());
|
|
|
+ ruleVO.setDateValue(i.getDateValue());
|
|
|
+ ruleVO.setFinishDateValue(i.getFinishDateValue());
|
|
|
+ ruleVO.setSuffix(String.valueOf(key));
|
|
|
+ return ruleVO;
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}
|