|
@@ -0,0 +1,44 @@
|
|
|
+package com.diagbot.rule;
|
|
|
+
|
|
|
+import com.diagbot.dto.BillMsg;
|
|
|
+import com.diagbot.dto.BillNeoMaxDTO;
|
|
|
+import com.diagbot.dto.NodeNeoDTO;
|
|
|
+import com.diagbot.util.ListUtil;
|
|
|
+import com.diagbot.util.MsgUtil;
|
|
|
+import com.diagbot.util.StringUtil;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @description: 禁忌医疗器械及物品规则
|
|
|
+ * @author: zhoutg
|
|
|
+ * @time: 2020/8/3 14:47
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class MedEquRule {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 比较文本内容是否存在
|
|
|
+ *
|
|
|
+ * @param text
|
|
|
+ * @param billNeoMaxDTO
|
|
|
+ * @param billMsgList
|
|
|
+ * @param type
|
|
|
+ */
|
|
|
+ public void bill(String text, BillNeoMaxDTO billNeoMaxDTO, List<BillMsg> billMsgList, String type) {
|
|
|
+ if (StringUtil.isNotBlank(text)) {
|
|
|
+ List<NodeNeoDTO> medEquList = billNeoMaxDTO.getProcedures();
|
|
|
+ if (ListUtil.isNotEmpty(medEquList)) {
|
|
|
+ for (NodeNeoDTO node : medEquList) {
|
|
|
+ if (text.contains(node.getName())) {
|
|
|
+ BillMsg billMsg = MsgUtil.getBillMedEquMsg(billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
|
|
|
+ node.getName(), type, billNeoMaxDTO.getType());
|
|
|
+ billMsgList.add(billMsg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|