|
@@ -6,6 +6,7 @@ import com.diagbot.dto.BillNeoMaxDTO;
|
|
|
import com.diagbot.dto.HighRiskNeoDTO;
|
|
|
import com.diagbot.dto.NodeNeoDTO;
|
|
|
import com.diagbot.dto.WordCrfDTO;
|
|
|
+import com.diagbot.enums.NeoEnum;
|
|
|
import com.diagbot.enums.TypeEnum;
|
|
|
import com.diagbot.model.entity.Negative;
|
|
|
import com.diagbot.util.CatalogueUtil;
|
|
@@ -22,8 +23,10 @@ import java.util.Collections;
|
|
|
import java.util.Comparator;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
+import java.util.LinkedHashSet;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.Set;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -117,9 +120,32 @@ public class CommonRule {
|
|
|
* @param wordCrfDTO
|
|
|
* @param billMsgList
|
|
|
*/
|
|
|
- public void exclusionBill(WordCrfDTO wordCrfDTO, List<BillMsg> billMsgList) {
|
|
|
- // 当前辅检开单项
|
|
|
+ public void exclusionBill(List<BillNeoMaxDTO> billNeoMaxDTOList, WordCrfDTO wordCrfDTO, List<BillMsg> billMsgList) {
|
|
|
+ // 辅检开单项互斥
|
|
|
List<Pacs> pacsOrder = wordCrfDTO.getPacsOrder();
|
|
|
+ Set<String> set = new LinkedHashSet<>(); // A与B不宜同时进行, B与A不宜同时进行 只能提示一个
|
|
|
+ if (ListUtil.isNotEmpty(pacsOrder) && pacsOrder.size() > 1) {
|
|
|
+ Map<String, String> map = pacsOrder.stream().collect(Collectors.toMap(k -> k.getUniqueName(), v -> v.getName()));
|
|
|
+ for (BillNeoMaxDTO billNeoMaxDTO : billNeoMaxDTOList) {
|
|
|
+ List<NodeNeoDTO> nodeList = billNeoMaxDTO.getPacsOrder();
|
|
|
+ if (ListUtil.isNotEmpty(nodeList)) {
|
|
|
+ for (NodeNeoDTO nodeNeoDTO : nodeList) {
|
|
|
+ String orginName = map.get(nodeNeoDTO.getName());
|
|
|
+ if (map.get(nodeNeoDTO.getName()) != null) {
|
|
|
+ if (!set.contains(billNeoMaxDTO.getOrderName() + "******" + orginName)) {
|
|
|
+ set.add(billNeoMaxDTO.getOrderName() + "******" + orginName);
|
|
|
+ set.add(orginName + "******" + billNeoMaxDTO.getOrderName());
|
|
|
+ BillMsg commonBillMsg = MsgUtil.getBillExclusionMsg(
|
|
|
+ billNeoMaxDTO.getOrderName(), orginName,
|
|
|
+ billNeoMaxDTO.getOrderName() + "," + orginName,
|
|
|
+ NeoEnum.exclusion.getName());
|
|
|
+ billMsgList.add(commonBillMsg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -199,7 +225,7 @@ public class CommonRule {
|
|
|
* @param highRiskNeoDTO
|
|
|
* @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());
|
|
|
highRiskList.add(billMsg);
|
|
|
}
|