Jelajahi Sumber

导入描述详细

gaodm 4 tahun lalu
induk
melakukan
b1f6459dfc
1 mengubah file dengan 23 tambahan dan 6 penghapusan
  1. 23 6
      src/main/java/com/diagbot/facade/ExportFacade.java

+ 23 - 6
src/main/java/com/diagbot/facade/ExportFacade.java

@@ -578,10 +578,6 @@ public class ExportFacade {
                         break;
                 }
                 if (canInsert) {
-                    klRule.setRuleType(1);
-                    klRule.setHasSubCond(1);
-                    klRuleService.save(klRule);
-                    cnt++;
                     Boolean baseCanInsert = false;
                     KlRuleBase klRuleBase = new KlRuleBase();
                     //1性别,2实验室检查,3临床表现,4辅助检查名称描述,5疾病,6服用药品,
@@ -767,6 +763,13 @@ public class ExportFacade {
                             }
                             break;
                     }
+                    //组装规则维护数据
+                    klRule.setRuleType(1);
+                    klRule.setHasSubCond(1);
+                    String description = klRule.getDescription() + "_" + klRuleBase.getDescription();
+                    klRule.setDescription(description);
+                    klRuleService.save(klRule);
+                    cnt++;
                     if (baseCanInsert) {
                         klRuleBaseService.save(klRuleBase);
                         KlRuleCondition klRuleCondition = new KlRuleCondition();
@@ -868,7 +871,6 @@ public class ExportFacade {
                 klRule.setDescription("开单合理性_输血_" + importDataVO.getTransfusionName().trim());
                 klRule.setRuleType(1);
                 klRule.setHasSubCond(1);
-                klRuleService.save(klRule);
                 if (StringUtil.isNotBlank(importDataVO.getTransfusionNodeName())
                         && StringUtil.isNotBlank(importDataVO.getStandName())) {
                     KlRuleBase klRuleBase = new KlRuleBase();
@@ -908,6 +910,10 @@ public class ExportFacade {
                     } else {
 
                     }
+                    //组装规则维护数据
+                    String description = klRule.getDescription() + "_" + klRuleBase.getDescription();
+                    klRule.setDescription(description);
+                    klRuleService.save(klRule);
                     klRuleBaseService.save(klRuleBase);
                     KlRuleCondition klRuleCondition = new KlRuleCondition();
                     klRuleCondition.setGroupType(1);
@@ -1078,7 +1084,6 @@ public class ExportFacade {
                     klRule.setRuleType(2);
                     klRule.setMsg(importDataVO.getDrugLevel().trim());
                     klRule.setHasSubCond(1);
-                    klRuleService.save(klRule);
                     KlRuleBase klRuleBase = new KlRuleBase();
                     klRuleBase.setType(1);
                     String drugForm = importDataVO.getDrugForm().trim();
@@ -1087,6 +1092,11 @@ public class ExportFacade {
                     }
                     klRuleBase.setConceptId(map.get(drugForm + "_102").getId());
                     klRuleBase.setDescription(drugForm);
+                    //组装规则维护数据
+                    String description = klRule.getDescription() + "_" + klRuleBase.getDescription();
+                    klRule.setDescription(description);
+                    klRuleService.save(klRule);
+
                     klRuleBaseService.save(klRuleBase);
                     KlRuleCondition klRuleCondition = new KlRuleCondition();
                     klRuleCondition.setGroupType(1);
@@ -1427,6 +1437,7 @@ public class ExportFacade {
                 if (StringUtil.isNotBlank(importDataVO.getTransfusionType())) {
                     klRule.setMsg(importDataVO.getTransfusionType().replace("建议输注", ""));
                 }
+                String description = klRule.getDescription();
                 klRuleService.save(klRule);
                 if (StringUtil.isNotBlank(importDataVO.getItemName())
                         && StringUtil.isNotBlank(importDataVO.getSymbol())) {
@@ -1455,6 +1466,8 @@ public class ExportFacade {
                         klRuleBase.setDescription(importDataVO.getItemName() + importDataVO.getSymbol()
                                 + importDataVO.getValue() + " ");
                     }
+                    //组装规则维护数据
+                    description = description + "_" + klRuleBase.getDescription();
                     klRuleBaseService.save(klRuleBase);
                     KlRuleCondition klRuleCondition = new KlRuleCondition();
                     klRuleCondition.setGroupType(1);
@@ -1474,6 +1487,8 @@ public class ExportFacade {
                         klRuleBase.setConceptId(map.get(importDataVO.getOperationName() + "_106").getId());
                         klRuleBase.setDescription("操作和手术_" + importDataVO.getOperationName());
                     }
+                    //组装规则维护数据
+                    description = description + "_" + klRuleBase.getDescription();
                     klRuleBaseService.save(klRuleBase);
                     KlRuleCondition klRuleCondition = new KlRuleCondition();
                     klRuleCondition.setGroupType(1);
@@ -1481,6 +1496,8 @@ public class ExportFacade {
                     klRuleCondition.setRuleBaseId(klRuleBase.getId());
                     klRuleConditionService.save(klRuleCondition);
                 }
+                klRule.setDescription(description);
+                klRuleService.updateById(klRule);
             }
         }
     }