|
@@ -13,12 +13,10 @@ import com.diagbot.enums.*;
|
|
|
import com.diagbot.facade.*;
|
|
|
import com.diagbot.model.entity.Doctor;
|
|
|
import com.diagbot.model.entity.PacsNum;
|
|
|
+import com.diagbot.model.entity.Vital;
|
|
|
import com.diagbot.model.label.PacsLabel;
|
|
|
-import com.diagbot.rule.AgeRule;
|
|
|
-import com.diagbot.rule.CommonRule;
|
|
|
-import com.diagbot.rule.GroupRule;
|
|
|
-import com.diagbot.rule.LisRule;
|
|
|
-import com.diagbot.rule.PacsRule;
|
|
|
+import com.diagbot.model.label.VitalLabel;
|
|
|
+import com.diagbot.rule.*;
|
|
|
import com.diagbot.util.CoreUtil;
|
|
|
import com.diagbot.util.DateUtil;
|
|
|
import com.diagbot.util.ListUtil;
|
|
@@ -58,6 +56,8 @@ public class OtherTipProcess {
|
|
|
RedisUtil redisUtil;
|
|
|
@Autowired
|
|
|
AgeRule ageRule;
|
|
|
+ @Autowired
|
|
|
+ VitalRule vitalRule;
|
|
|
|
|
|
@Autowired
|
|
|
private KlDiagHospitalFacade klDiagHospitalFacade;
|
|
@@ -104,6 +104,41 @@ public class OtherTipProcess {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 处理业务——查体
|
|
|
+ *
|
|
|
+ * @param wordCrfDTO
|
|
|
+ * @param res
|
|
|
+ */
|
|
|
+ public void processVital(WordCrfDTO wordCrfDTO, IndicationDTO res) {
|
|
|
+ VitalLabel vitalLabel = wordCrfDTO.getVitalLabel();
|
|
|
+ List<Vital> vitals = vitalLabel.getVitals();
|
|
|
+
|
|
|
+ List<BillMsg> otherList = res.getOtherList();
|
|
|
+ for (Vital vital : vitals) {
|
|
|
+ RuleVO ruleVO = getRuleVO(vital, RuleTypeEnum.other.getKey());
|
|
|
+ // 1、获取相关数据
|
|
|
+ if (ruleVO != null) {
|
|
|
+ RuleExtDTO ruleExtDTO = commonFacade.getRuleData(ruleVO);
|
|
|
+ if (ruleExtDTO == null) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ List<RuleConditionDTO> ruleConditionDTOList = ruleExtDTO.getRuleConditionDTOList();
|
|
|
+ for (RuleConditionDTO ruleConditionDTO : ruleConditionDTOList) {
|
|
|
+ List<RuleBaseDTO> ruleBaseDTOList = ruleConditionDTO.getRuleBaseDTOList();
|
|
|
+
|
|
|
+ for (RuleBaseDTO ruleBaseDTO : ruleBaseDTOList) {
|
|
|
+ Map<String, Object> map = CoreUtil.compareVitalMulti(ruleBaseDTO, vitalLabel);
|
|
|
+ if (CoreUtil.getMapFlag(map)) {
|
|
|
+ String msg = "该患者"+vital.getName()+"结果" + vital.getPd().getValue() + ",请留意," + ruleConditionDTO.getMsg();
|
|
|
+ BillMsg billMsg = MsgUtil.getCommonOtherMsg(TypeEnum.other.getName(), msg, null, null, null);
|
|
|
+ CoreUtil.addBeanToList(otherList, billMsg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
/**
|
|
|
* 处理业务——辅检
|
|
|
*
|
|
@@ -606,4 +641,24 @@ public class OtherTipProcess {
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取其他值提醒入参--查体
|
|
|
+ *
|
|
|
+ * @param vital
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public RuleVO getRuleVO(Vital vital, Integer key) {
|
|
|
+ if (StringUtil.isNotBlank(vital.getName())) {
|
|
|
+ RuleVO ruleVO = new RuleVO();
|
|
|
+ ruleVO.setInputName(vital.getName());
|
|
|
+ ruleVO.setLibName(vital.getName());
|
|
|
+ ruleVO.setLibType(LexiconEnum.Vital.getKey());
|
|
|
+ ruleVO.setLibTypeName(TypeEnum.vital.getName());
|
|
|
+ ruleVO.setDateValue(vital.getValue());
|
|
|
+ ruleVO.setSuffix(String.valueOf(key));
|
|
|
+ return ruleVO;
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}
|