瀏覽代碼

提示信息修改

kwzbigdata 4 年之前
父節點
當前提交
fee35f1e40

+ 3 - 6
src/main/java/com/diagbot/process/BillProcess.java

@@ -93,19 +93,16 @@ public class BillProcess {
             SexRule.compareSexWithBill(wordCrfDTO, bill, billMsgList);
 
             // 诊断
-            BillMsg billMsg_disease = DiagRule.compareDiseaseWithBill(bill.getDisease(), diags, bill);
-            CoreUtil.addBeanToList(billMsgList, billMsg_disease);
+            DiagRule.compareDiseaseWithBill(bill.getDisease(), diags, bill, billMsgList);
 
             //化验
             LisRule.compareLisWithBill(lis, bill, billMsgList);
 
              //辅检
-            BillMsg pacsMsg = PacsRule.comparePacsWithBill(bill.getPacs(), pacs, bill);
-            CoreUtil.addBeanToList(billMsgList, pacsMsg);
+            PacsRule.comparePacsWithBill(bill.getPacs(), pacs, bill, billMsgList);
 
             //临床表现
-            BillMsg clinicalMsg = DiagRule.compareDiseaseWithBill(bill.getClinicfindings(), clinicals, bill);
-            CoreUtil.addBeanToList(billMsgList, clinicalMsg);
+            DiagRule.compareDiseaseWithBill(bill.getClinicfindings(), clinicals, bill, billMsgList);
 
             // 年龄
             AgeRule.compareAgeWithBill(wordCrfDTO, bill, billMsgList);

+ 6 - 6
src/main/java/com/diagbot/rule/DiagRule.java

@@ -29,7 +29,7 @@ public class DiagRule {
      * @param inputLises
      * @return
      */
-    public static <T> BillMsg compareDiseaseWithBill(List<NodeNeoDTO> drugLises, List<T> inputLises, BillNeoMaxDTO billNeoMaxDTO) {
+    public static <T> void compareDiseaseWithBill(List<NodeNeoDTO> drugLises, List<T> inputLises, BillNeoMaxDTO billNeoMaxDTO, List<BillMsg> billMsgList) {
         Map<String,String> old_stand = new HashMap<>();
         if(ListUtil.isNotEmpty(drugLises) && ListUtil.isNotEmpty(inputLises)){
             List<String> dl = drugLises.stream().map(x -> x.getName()).collect(Collectors.toList());
@@ -44,12 +44,12 @@ public class DiagRule {
                 }
             }
             if(old_stand.size() > 0){
-                String message = StringUtils.join(old_stand.keySet(), ",");
-                String standNames = StringUtils.join(old_stand.values().stream().collect(Collectors.toList()),",");
-                BillMsg commonBillMsg = CoreUtil.getCommonBillMsg(billNeoMaxDTO.getOrderName(),billNeoMaxDTO.getOrderStandName(),message,standNames);
-                return commonBillMsg;
+                for (Map.Entry<String,String> d:old_stand.entrySet()) {
+                    BillMsg commonBillMsg = CoreUtil.getCommonBillMsg(billNeoMaxDTO.getOrderName(),billNeoMaxDTO.getOrderStandName(),d.getKey(),d.getValue());
+                    billMsgList.add(commonBillMsg);
+                }
             }
         }
-        return null;
+
     }
 }

+ 9 - 6
src/main/java/com/diagbot/rule/PacsRule.java

@@ -25,7 +25,7 @@ public class PacsRule {
      * @param inputLis
      * @return
      */
-    public static <T> BillMsg comparePacsWithBill(List<NodeNeoDTO> drugLis, List<T> inputLis, BillNeoMaxDTO billNeoMaxDTO) {
+    public static <T> void comparePacsWithBill(List<NodeNeoDTO> drugLis, List<T> inputLis, BillNeoMaxDTO billNeoMaxDTO, List<BillMsg> billMsgList) {
 
         Map<String,String> old_stand = new HashMap<>();
         if(ListUtil.isNotEmpty(drugLis) && ListUtil.isNotEmpty(inputLis)){
@@ -39,11 +39,14 @@ public class PacsRule {
             }
         }
         if(old_stand.size() > 0){
-            String message = StringUtils.join(old_stand.keySet(), ",");
-            String standNames = StringUtils.join(old_stand.values().stream().collect(Collectors.toList()),",");
-            BillMsg commonBillMsg = CoreUtil.getCommonBillMsg(billNeoMaxDTO.getOrderName(),billNeoMaxDTO.getOrderStandName(),message,standNames);
-            return commonBillMsg;
+            for (Map.Entry<String,String> d: old_stand.entrySet()
+                 ) {
+                BillMsg commonBillMsg = CoreUtil.getCommonBillMsg(billNeoMaxDTO.getOrderName(),billNeoMaxDTO.getOrderStandName(),d.getKey(),d.getValue());
+                billMsgList.add(commonBillMsg);
+            }
+
+
+
         }
-        return null;
     }
 }