Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

MarkHuang 4 lat temu
rodzic
commit
a8c160ad5b

+ 15 - 11
src/main/java/com/diagbot/rule/CommonRule.java

@@ -125,21 +125,25 @@ public class CommonRule {
         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()));
+            // 不同的辅检项目可能对应同一个uniqueName,提示显示多条
+            Map<String, List<Pacs>> map = EntityUtil.makeEntityListMap(pacsOrder, "uniqueName");
             for (BillNeoMaxDTO billNeoMaxDTO : billNeoMaxDTOList) {
                 List<NodeNeoDTO> nodeList = billNeoMaxDTO.getPacsOrder();
                 if (ListUtil.isNotEmpty(nodeList)) {
                     for (NodeNeoDTO nodeNeoDTO : nodeList) {
-                        String orginName = map.get(nodeNeoDTO.getName());
+                        List<Pacs> orginNameList = 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);
+                            for (Pacs pacs : orginNameList) {
+                                String orginName = pacs.getName();
+                                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);
+                                }
                             }
                         }
                     }
@@ -159,7 +163,7 @@ public class CommonRule {
         if (ListUtil.isEmpty(itemList)) {
             return ;
         }
-        Map<String, List<T>> map = EntityUtil.makeEntityListMap(itemList, "uniqueName");
+        Map<String, List<T>> map = EntityUtil.makeEntityListMap(itemList, "name");
         for (String key : map.keySet()) {
             List<T> items = map.get(key);
 

+ 2 - 2
src/main/java/com/diagbot/rule/GroupRule.java

@@ -75,7 +75,7 @@ public class GroupRule {
                     break;
                 case "幼儿":
                     if (age != null) {
-                        if (age <= 2.5D) {
+                        if (age < 6.0D && 1.0D <= age) {
                             BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(
                                     billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
                                     "幼儿", type, billNeoMaxDTO.getType());
@@ -85,7 +85,7 @@ public class GroupRule {
                     break;
                 case "儿童":
                     if (age != null) {
-                        if (age <= 15.0D && age > 2.5D) {
+                        if (age < 18.0D && age >= 6.0D) {
                             BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(
                                     billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
                                     "儿童", type, billNeoMaxDTO.getType());