ソースを参照

其他值提醒辅检

gaodm 4 年 前
コミット
35b640e03a

+ 1 - 1
src/main/java/com/diagbot/entity/KlRuleBase.java

@@ -60,7 +60,7 @@ public class KlRuleBase implements Serializable {
     private String description;
 
     /**
-     * 基础规则类型(1:开单外等于术语本身;2:开单外存在比较;3:过敏原;4:开单项;)
+     * 基础规则类型(1:开单外等于术语本身;2:开单外存在比较;3:开单外不等于术语本身;4:过敏原;5:开单项;)
      */
     private Integer type;
 

+ 48 - 5
src/main/java/com/diagbot/facade/ExportFacade.java

@@ -809,9 +809,27 @@ public class ExportFacade {
         MultipartFile file = null;
         file = testFacade.getMulFileByPath(mapPath.get("【其他值提醒_化验】"));
         List<ImportDataVO> data = ExcelUtils.importExcel(file, 0, 1, ImportDataVO.class);
-        List<String> lis = new ArrayList<>();
         for (ImportDataVO importDataVO : data) {
+            if (null != map.get(importDataVO.getLisGBName() + "_108")) {
+                KlRule klRule = new KlRule();
+                klRule.setConceptId(map.get(importDataVO.getLisGBName() + "_112").getId());
+                klRule.setDescription("其他值提醒_化验_" + importDataVO.getLisGBName().trim());
+                klRule.setRuleType(4);
+                klRule.setHasSubCond(1);
+                klRuleService.save(klRule);
+                if (StringUtil.isNotBlank(importDataVO.getLisGBName())){
+                    KlRuleBase klRuleBase = new KlRuleBase();
+                    klRuleBase.setConceptId(map.get(importDataVO.getLisGBName() + "_112").getId());
+                    klRuleBase.setDescription(importDataVO.getOtherLisTipName());
+                    klRuleBaseService.save(klRuleBase);
+                    KlRuleCondition klRuleCondition = new KlRuleCondition();
+                    klRuleCondition.setGroupType(1);
+                    klRuleCondition.setRuleId(klRule.getId());
+                    klRuleCondition.setRuleBaseId(klRuleBase.getId());
+                    klRuleConditionService.save(klRuleCondition);
+                }
 
+            }
         }
     }
 
@@ -828,6 +846,8 @@ public class ExportFacade {
                 klRule.setHasSubCond(1);
                 if (null != importDataVO.getAgeMax()
                         || null != importDataVO.getAgeMin()
+                        || StringUtil.isNotBlank(importDataVO.getDisName())
+                        || StringUtil.isNotBlank(importDataVO.getSexStr())
                         || StringUtil.isNotBlank(importDataVO.getPacsDescHas())
                         || StringUtil.isNotBlank(importDataVO.getPacsDescNotHas())) {
                     klRule.setHasSubCond(1);
@@ -842,6 +862,7 @@ public class ExportFacade {
                     if (null != importDataVO.getAgeMax() || null != importDataVO.getAgeMin()) {
                         KlRuleBase klRuleBase = new KlRuleBase();
                         klRuleBase.setConceptId(map.get("年龄_410").getId());
+                        klRuleBase.setType(2);
                         klRuleBase.setDescription("年龄范围");
                         if (null != importDataVO.getAgeMax()) {
                             klRuleBase.setMaxOperator(">=");
@@ -858,12 +879,35 @@ public class ExportFacade {
                         klRuleCondition.setRuleBaseId(klRuleBase.getId());
                         klRuleConditionService.save(klRuleCondition);
                     }
+                    if (StringUtil.isNotBlank(importDataVO.getDisName())) {
+                        KlRuleBase klRuleBase = new KlRuleBase();
+                        klRuleBase.setConceptId(map.get(importDataVO.getDisName().trim() + "_117").getId());
+                        klRuleBase.setDescription("人群_" + importDataVO.getDisName().trim());
+                        klRuleBase.setType(1);
+                        klRuleBaseService.save(klRuleBase);
+                        KlRuleCondition klRuleCondition = new KlRuleCondition();
+                        klRuleCondition.setGroupType(1);
+                        klRuleCondition.setRuleId(klRule.getId());
+                        klRuleCondition.setRuleBaseId(klRuleBase.getId());
+                        klRuleConditionService.save(klRuleCondition);
+                    }
+                    if (StringUtil.isNotBlank(importDataVO.getSexStr())) {
+                        KlRuleBase klRuleBase = new KlRuleBase();
+                        klRuleBase.setConceptId(map.get(importDataVO.getSexStr().trim() + "_116").getId());
+                        klRuleBase.setDescription("性别_" + importDataVO.getSexStr().trim());
+                        klRuleBase.setType(1);
+                        klRuleBaseService.save(klRuleBase);
+                        KlRuleCondition klRuleCondition = new KlRuleCondition();
+                        klRuleCondition.setGroupType(1);
+                        klRuleCondition.setRuleId(klRule.getId());
+                        klRuleCondition.setRuleBaseId(klRuleBase.getId());
+                        klRuleConditionService.save(klRuleCondition);
+                    }
                     if (StringUtil.isNotBlank(importDataVO.getPacsDescHas())) {
                         KlRuleBase klRuleBase = new KlRuleBase();
                         klRuleBase.setConceptId(map.get(importDataVO.getPacsDescHas().trim() + "_112").getId());
                         klRuleBase.setDescription("检查结论有_" + importDataVO.getPacsDescHas().trim());
-                        klRuleBase.setEqUnit("=");
-                        klRuleBase.setEqValue(importDataVO.getPacsDescHas().trim());
+                        klRuleBase.setType(1);
                         klRuleBaseService.save(klRuleBase);
                         KlRuleCondition klRuleCondition = new KlRuleCondition();
                         klRuleCondition.setGroupType(1);
@@ -875,8 +919,7 @@ public class ExportFacade {
                         KlRuleBase klRuleBase = new KlRuleBase();
                         klRuleBase.setConceptId(map.get(importDataVO.getPacsDescNotHas().trim() + "_112").getId());
                         klRuleBase.setDescription("检查结论无_" + importDataVO.getPacsDescNotHas().trim());
-                        klRuleBase.setEqUnit("!=");
-                        klRuleBase.setEqValue(importDataVO.getPacsDescNotHas().trim());
+                        klRuleBase.setType(3);
                         klRuleBaseService.save(klRuleBase);
                         KlRuleCondition klRuleCondition = new KlRuleCondition();
                         klRuleCondition.setGroupType(1);

+ 2 - 0
src/main/java/com/diagbot/vo/ImportDataVO.java

@@ -56,6 +56,8 @@ public class ImportDataVO {
     private String otherTipNodeType;
     @Excel(name="名称")
     private String otherTipNodeName;
+    @Excel(name="化验提醒指标")
+    private String otherLisTipName;
     @Excel(name="医保疾病名称")
     private String disName;
     @Excel(name="指标名称")