|
@@ -8,7 +8,7 @@ import com.diagbot.dto.NodeNeoDTO;
|
|
import com.diagbot.dto.RuleBaseDTO;
|
|
import com.diagbot.dto.RuleBaseDTO;
|
|
import com.diagbot.dto.RuleSimpleDTO;
|
|
import com.diagbot.dto.RuleSimpleDTO;
|
|
import com.diagbot.dto.WordCrfDTO;
|
|
import com.diagbot.dto.WordCrfDTO;
|
|
-import com.diagbot.enums.NeoEnum;
|
|
|
|
|
|
+import com.diagbot.enums.ConEnum;
|
|
import com.diagbot.enums.TypeEnum;
|
|
import com.diagbot.enums.TypeEnum;
|
|
import com.diagbot.model.entity.Negative;
|
|
import com.diagbot.model.entity.Negative;
|
|
import com.diagbot.util.CatalogueUtil;
|
|
import com.diagbot.util.CatalogueUtil;
|
|
@@ -18,7 +18,6 @@ import com.diagbot.util.ListUtil;
|
|
import com.diagbot.util.MsgUtil;
|
|
import com.diagbot.util.MsgUtil;
|
|
import com.diagbot.util.StringUtil;
|
|
import com.diagbot.util.StringUtil;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
-import org.apache.poi.ss.formula.functions.T;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
@@ -59,17 +58,10 @@ public class CommonRule {
|
|
String c = (String) CoreUtil.getFieldValue(d, "standName");
|
|
String c = (String) CoreUtil.getFieldValue(d, "standName");
|
|
String c_name = (String) CoreUtil.getFieldValue(d, "name");
|
|
String c_name = (String) CoreUtil.getFieldValue(d, "name");
|
|
if (StringUtils.isNotBlank(c) && CoreUtil.compareName(ruleBaseDTO, c)) {
|
|
if (StringUtils.isNotBlank(c) && CoreUtil.compareName(ruleBaseDTO, c)) {
|
|
- if ("禁忌手术".equals(conType)) {
|
|
|
|
- BillMsg commonBillMsg = MsgUtil.getCommonSurgeryMsg(
|
|
|
|
- ruleSimpleDTO.getInputName(), ruleSimpleDTO.getLibName(),
|
|
|
|
- c_name, conType, ruleSimpleDTO.getLibTypeName());
|
|
|
|
- billMsgList.add(commonBillMsg);
|
|
|
|
- } else {
|
|
|
|
- BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(
|
|
|
|
- ruleSimpleDTO.getInputName(), ruleSimpleDTO.getLibName(),
|
|
|
|
- c_name, conType, ruleSimpleDTO.getLibTypeName());
|
|
|
|
- billMsgList.add(commonBillMsg);
|
|
|
|
- }
|
|
|
|
|
|
+ BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(
|
|
|
|
+ ruleSimpleDTO.getInputName(), ruleSimpleDTO.getLibName(),
|
|
|
|
+ c_name, conType, ruleSimpleDTO.getLibTypeName());
|
|
|
|
+ billMsgList.add(commonBillMsg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -164,7 +156,7 @@ public class CommonRule {
|
|
String c = (String) CoreUtil.getFieldValue(t, "uniqueName"); // 标准名称
|
|
String c = (String) CoreUtil.getFieldValue(t, "uniqueName"); // 标准名称
|
|
String c_name = (String) CoreUtil.getFieldValue(t, "name"); // 界面名称
|
|
String c_name = (String) CoreUtil.getFieldValue(t, "name"); // 界面名称
|
|
if (CoreUtil.compareName(ruleBaseDTO, c)) {
|
|
if (CoreUtil.compareName(ruleBaseDTO, c)) {
|
|
- BillMsg billMsg = MsgUtil.getComplexOperationMsg(c_name, ruleSimpleDTO.getInputName(), ruleSimpleDTO.getLibTypeName());
|
|
|
|
|
|
+ BillMsg billMsg = MsgUtil.getCommonHighRiskMsg(c_name, ruleSimpleDTO.getInputName(), ruleSimpleDTO.getLibTypeName());
|
|
highRiskList.add(billMsg);
|
|
highRiskList.add(billMsg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -179,7 +171,7 @@ public class CommonRule {
|
|
* @param billMsgList
|
|
* @param billMsgList
|
|
* @param ruleSimpleDTO
|
|
* @param ruleSimpleDTO
|
|
*/
|
|
*/
|
|
- public void needlessRepeatOrder(WordCrfDTO wordCrfDTO, RuleBaseDTO ruleBaseDTO, List<BillMsg> billMsgList, RuleSimpleDTO ruleSimpleDTO) {
|
|
|
|
|
|
+ public void needlessRepeatOrder(WordCrfDTO wordCrfDTO, RuleBaseDTO ruleBaseDTO, List<BillMsg> billMsgList, String conType, RuleSimpleDTO ruleSimpleDTO) {
|
|
String orderStandName = ruleBaseDTO.getBaseLibName();
|
|
String orderStandName = ruleBaseDTO.getBaseLibName();
|
|
Map<String, List<Pacs>> map = EntityUtil.makeEntityListMap(wordCrfDTO.getPacs(), "uniqueName");
|
|
Map<String, List<Pacs>> map = EntityUtil.makeEntityListMap(wordCrfDTO.getPacs(), "uniqueName");
|
|
List<Pacs> pacsList = map.get(orderStandName);
|
|
List<Pacs> pacsList = map.get(orderStandName);
|
|
@@ -195,10 +187,10 @@ public class CommonRule {
|
|
Date dateValueDate = CatalogueUtil.parseStringDate(dateValue);
|
|
Date dateValueDate = CatalogueUtil.parseStringDate(dateValue);
|
|
Date orderDateValueDate = CatalogueUtil.parseStringDate(orderDateValue);
|
|
Date orderDateValueDate = CatalogueUtil.parseStringDate(orderDateValue);
|
|
if (dateValueDate != null && orderDateValueDate != null) {
|
|
if (dateValueDate != null && orderDateValueDate != null) {
|
|
- if (!CatalogueUtil.compareTime(dateValueDate, orderDateValueDate, 60L * 24 * 7)) {
|
|
|
|
- BillMsg commonBillMsg = MsgUtil.getNeedlessRepeatOrderMsg(
|
|
|
|
|
|
+ if (!CatalogueUtil.compareTime(dateValueDate, orderDateValueDate, 60L * 24 * 7, false)) {
|
|
|
|
+ BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(
|
|
ruleSimpleDTO.getInputName(), ruleSimpleDTO.getLibName(),
|
|
ruleSimpleDTO.getInputName(), ruleSimpleDTO.getLibName(),
|
|
- pacs.getName(), ruleSimpleDTO.getLibTypeName());
|
|
|
|
|
|
+ pacs.getName(), conType, ruleSimpleDTO.getLibTypeName());
|
|
billMsgList.add(commonBillMsg);
|
|
billMsgList.add(commonBillMsg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -265,11 +257,11 @@ public class CommonRule {
|
|
* @param billMsgList
|
|
* @param billMsgList
|
|
*/
|
|
*/
|
|
public void repeat24Bill(WordCrfDTO wordCrfDTO, List<BillMsg> billMsgList) {
|
|
public void repeat24Bill(WordCrfDTO wordCrfDTO, List<BillMsg> billMsgList) {
|
|
- repeat24BillWithType(billMsgList, wordCrfDTO.getLisOrder(), TypeEnum.lis.getName()); // 化验重复开单
|
|
|
|
- repeat24BillWithType(billMsgList, wordCrfDTO.getPacsOrder(), TypeEnum.pacs.getName()); // 辅检重复开单
|
|
|
|
- // repeat24BillWithType(billMsgList, wordCrfDTO.getDrugOrder(), TypeEnum.drug.getName()); // 药品重复开单
|
|
|
|
- // repeat24BillWithType(billMsgList, wordCrfDTO.getOperationOrder(), TypeEnum.operation.getName()); // 手术重复开单
|
|
|
|
- // repeat24BillWithType(billMsgList, wordCrfDTO.getTransfusionOrder(), TypeEnum.transfusion.getName()); // 输血重复开单
|
|
|
|
|
|
+ repeat24BillWithType(billMsgList, wordCrfDTO.getLisOrder(), TypeEnum.lis.getName(), ConEnum.repeat24.getName()); // 化验重复开单
|
|
|
|
+ repeat24BillWithType(billMsgList, wordCrfDTO.getPacsOrder(), TypeEnum.pacs.getName(), ConEnum.repeat24.getName()); // 辅检重复开单
|
|
|
|
+ // repeat24BillWithType(billMsgList, wordCrfDTO.getDrugOrder(), TypeEnum.drug.getName(), ConEnum.repeat24.getName()); // 药品重复开单
|
|
|
|
+ // repeat24BillWithType(billMsgList, wordCrfDTO.getOperationOrder(), TypeEnum.operation.getName(), ConEnum.repeat24.getName()); // 手术重复开单
|
|
|
|
+ // repeat24BillWithType(billMsgList, wordCrfDTO.getTransfusionOrder(), TypeEnum.transfusion.getName(), ConEnum.repeat24.getName()); // 输血重复开单
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -281,7 +273,7 @@ public class CommonRule {
|
|
* @param ruleSimpleDTO
|
|
* @param ruleSimpleDTO
|
|
* @param set 用于记录:A与B不宜同时进行, B与A不宜同时进行 只能提示一个
|
|
* @param set 用于记录:A与B不宜同时进行, B与A不宜同时进行 只能提示一个
|
|
*/
|
|
*/
|
|
- public void exclusionBill(WordCrfDTO wordCrfDTO, RuleBaseDTO ruleBaseDTO, List<BillMsg> billMsgList, RuleSimpleDTO ruleSimpleDTO, Set<String> set) {
|
|
|
|
|
|
+ public void exclusionBill(WordCrfDTO wordCrfDTO, RuleBaseDTO ruleBaseDTO, List<BillMsg> billMsgList, String conType, RuleSimpleDTO ruleSimpleDTO, Set<String> set) {
|
|
// 辅检开单项互斥
|
|
// 辅检开单项互斥
|
|
List<Pacs> pacsOrder = wordCrfDTO.getPacsOrder();
|
|
List<Pacs> pacsOrder = wordCrfDTO.getPacsOrder();
|
|
if (ListUtil.isNotEmpty(pacsOrder) && pacsOrder.size() > 1) {
|
|
if (ListUtil.isNotEmpty(pacsOrder) && pacsOrder.size() > 1) {
|
|
@@ -295,10 +287,9 @@ public class CommonRule {
|
|
if (!set.contains(ruleSimpleDTO.getLibName() + "******" + orginName)) {
|
|
if (!set.contains(ruleSimpleDTO.getLibName() + "******" + orginName)) {
|
|
set.add(ruleSimpleDTO.getLibName() + "******" + orginName);
|
|
set.add(ruleSimpleDTO.getLibName() + "******" + orginName);
|
|
set.add(orginName + "******" + ruleSimpleDTO.getLibName());
|
|
set.add(orginName + "******" + ruleSimpleDTO.getLibName());
|
|
- BillMsg commonBillMsg = MsgUtil.getBillExclusionMsg(
|
|
|
|
- ruleSimpleDTO.getInputName(), orginName,
|
|
|
|
- ruleSimpleDTO.getInputName() + "," + orginName,
|
|
|
|
- NeoEnum.exclusion.getName());
|
|
|
|
|
|
+ BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(
|
|
|
|
+ ruleSimpleDTO.getInputName(), "",
|
|
|
|
+ orginName, conType, ruleSimpleDTO.getLibTypeName());
|
|
billMsgList.add(commonBillMsg);
|
|
billMsgList.add(commonBillMsg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -312,8 +303,10 @@ public class CommonRule {
|
|
* @param billMsgList
|
|
* @param billMsgList
|
|
* @param itemList
|
|
* @param itemList
|
|
* @param type
|
|
* @param type
|
|
|
|
+ * @param conType 禁忌条件
|
|
|
|
+ * @param <T>
|
|
*/
|
|
*/
|
|
- public <T> void repeat24BillWithType(List<BillMsg> billMsgList, List<T> itemList, String type) {
|
|
|
|
|
|
+ public <T> void repeat24BillWithType(List<BillMsg> billMsgList, List<T> itemList, String type, String conType) {
|
|
if (ListUtil.isEmpty(itemList)) {
|
|
if (ListUtil.isEmpty(itemList)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -351,8 +344,8 @@ public class CommonRule {
|
|
if (!CatalogueUtil.compareTime(last, cur, 60L * 24)) {
|
|
if (!CatalogueUtil.compareTime(last, cur, 60L * 24)) {
|
|
String name = (String) CoreUtil.getFieldValue(it, "name");
|
|
String name = (String) CoreUtil.getFieldValue(it, "name");
|
|
String uniqueName = (String) CoreUtil.getFieldValue(it, "uniqueName");
|
|
String uniqueName = (String) CoreUtil.getFieldValue(it, "uniqueName");
|
|
- BillMsg commonBillMsg = MsgUtil.getBill24RepeatMsg(
|
|
|
|
- name, uniqueName, name, type);
|
|
|
|
|
|
+ BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(
|
|
|
|
+ name, uniqueName, name, ConEnum.repeat24.getName(), type);
|
|
billMsgList.add(commonBillMsg);
|
|
billMsgList.add(commonBillMsg);
|
|
break;
|
|
break;
|
|
} else {
|
|
} else {
|
|
@@ -387,8 +380,8 @@ public class CommonRule {
|
|
* @param highRiskList
|
|
* @param highRiskList
|
|
*/
|
|
*/
|
|
public void highRisk(RuleSimpleDTO ruleSimpleDTO, List<BillMsg> highRiskList) {
|
|
public void highRisk(RuleSimpleDTO ruleSimpleDTO, List<BillMsg> highRiskList) {
|
|
- BillMsg billMsg = MsgUtil.getCommonHighRiskMsg(ruleSimpleDTO.getInputName(),
|
|
|
|
- ruleSimpleDTO.getMsg(), ruleSimpleDTO.getLibTypeName());
|
|
|
|
|
|
+ BillMsg billMsg = MsgUtil.getCommonHighRiskMsg(ruleSimpleDTO.getMsg(),
|
|
|
|
+ ruleSimpleDTO.getInputName(), ruleSimpleDTO.getLibTypeName());
|
|
highRiskList.add(billMsg);
|
|
highRiskList.add(billMsg);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -399,7 +392,7 @@ public class CommonRule {
|
|
* @param highRiskList
|
|
* @param highRiskList
|
|
*/
|
|
*/
|
|
public void highRiskComplex(NodeNeoDTO nodeNeoDTO, List<BillMsg> highRiskList, HighRiskNeoDTO highRiskNeoDTO) {
|
|
public void highRiskComplex(NodeNeoDTO nodeNeoDTO, List<BillMsg> highRiskList, HighRiskNeoDTO highRiskNeoDTO) {
|
|
- BillMsg billMsg = MsgUtil.getComplexOperationMsg(nodeNeoDTO.getVal(), highRiskNeoDTO.getName(), nodeNeoDTO.getTermtype());
|
|
|
|
|
|
+ BillMsg billMsg = MsgUtil.getCommonHighRiskMsg(nodeNeoDTO.getVal(), highRiskNeoDTO.getName(), nodeNeoDTO.getTermtype());
|
|
highRiskList.add(billMsg);
|
|
highRiskList.add(billMsg);
|
|
}
|
|
}
|
|
|
|
|