|
@@ -1,5 +1,7 @@
|
|
package com.diagbot.rule;
|
|
package com.diagbot.rule;
|
|
|
|
|
|
|
|
+import com.diagbot.biz.push.entity.Item;
|
|
|
|
+import com.diagbot.biz.push.entity.Pacs;
|
|
import com.diagbot.dto.BillMsg;
|
|
import com.diagbot.dto.BillMsg;
|
|
import com.diagbot.dto.IndicationDTO;
|
|
import com.diagbot.dto.IndicationDTO;
|
|
import com.diagbot.dto.RuleSimpleDTO;
|
|
import com.diagbot.dto.RuleSimpleDTO;
|
|
@@ -16,6 +18,7 @@ import com.diagbot.util.MsgNewUtil;
|
|
import com.diagbot.util.RedisUtil;
|
|
import com.diagbot.util.RedisUtil;
|
|
import com.diagbot.util.StringUtil;
|
|
import com.diagbot.util.StringUtil;
|
|
import com.diagbot.vo.Drug;
|
|
import com.diagbot.vo.Drug;
|
|
|
|
+import com.google.common.collect.Lists;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -35,7 +38,7 @@ public class OtherRule {
|
|
RedisUtil redisUtil;
|
|
RedisUtil redisUtil;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 过敏原自身过敏,如果规则已存在,就不再比较;如果不存在,比较是否与自身过敏
|
|
|
|
|
|
+ * 过敏原自身过敏,如果规则已维护,就不再比较;如果没有维护,比较是否与自身过敏
|
|
*
|
|
*
|
|
* @param
|
|
* @param
|
|
* @return
|
|
* @return
|
|
@@ -71,4 +74,61 @@ public class OtherRule {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 七院需求:
|
|
|
|
+ * 非阻塞性睡眠呼吸暂停综合征和非混合性睡眠呼吸暂停综合征,不宜同时开立呼吸睡眠监测和眼电图(EOG)
|
|
|
|
+ *
|
|
|
|
+ * @param
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public void smhxjcAndYdteog(WordCrfDTO wordCrfDTO, IndicationDTO res) {
|
|
|
|
+ // 七院特有
|
|
|
|
+ if (6 != wordCrfDTO.getHospitalId()) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // 1、比较是否包含2种诊断
|
|
|
|
+ List<Item> diagAllList = wordCrfDTO.getDiag(); // 结构化诊断
|
|
|
|
+ List<String> zsxList = Lists.newArrayList();// 阻塞性睡眠呼吸暂停综合征医院名称
|
|
|
|
+ List<String> hhxList = Lists.newArrayList();// 混合性睡眠呼吸暂停综合征医院名称
|
|
|
|
+ for (Item item : diagAllList) {
|
|
|
|
+ if ("阻塞性睡眠呼吸暂停综合征".equals(item.getUniqueName())) {
|
|
|
|
+ zsxList.add(item.getName());
|
|
|
|
+ } else if ("混合性睡眠呼吸暂停综合征".equals(item.getUniqueName())) {
|
|
|
|
+ hhxList.add((item.getName()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 如果两种疾病有其一,就不提示
|
|
|
|
+ if (ListUtil.isNotEmpty(zsxList) || ListUtil.isNotEmpty(hhxList)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 2、比较是否包含2种辅检开单项
|
|
|
|
+ List<Pacs> pacsList = wordCrfDTO.getPacsOrder(); // 辅检开单项
|
|
|
|
+ List<String> hxsmjcList = Lists.newArrayList();// 呼吸睡眠监测医院名称
|
|
|
|
+ List<String> ydteogList = Lists.newArrayList();// 眼电图(EOG)医院名称
|
|
|
|
+ for (Pacs pacs : pacsList) {
|
|
|
|
+ if ("呼吸睡眠监测".equals(pacs.getUniqueName())) {
|
|
|
|
+ hxsmjcList.add(pacs.getName());
|
|
|
|
+ } else if ("眼电图(EOG)".equals(pacs.getUniqueName())) {
|
|
|
|
+ ydteogList.add(pacs.getName());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 辅检开单项必须有两个,否则就不提示
|
|
|
|
+ if (ListUtil.isEmpty(hxsmjcList) || ListUtil.isEmpty(ydteogList)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 3、提示语组合
|
|
|
|
+ List<BillMsg> billMsgList = res.getBillMsgList();
|
|
|
|
+ for (String hxsm : hxsmjcList) {
|
|
|
|
+ for (String ydt : ydteogList) {
|
|
|
|
+ BillMsg billMsg = new BillMsg();
|
|
|
|
+ billMsg.setType(TypeEnum.pacs.getName());
|
|
|
|
+ billMsg.setMsg(String.format("非阻塞性睡眠呼吸暂停综合征和非混合性睡眠呼吸暂停综合征患者,不宜同时开立%s和%s",
|
|
|
|
+ hxsm, ydt));
|
|
|
|
+ billMsgList.add(billMsg);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|