瀏覽代碼

Merge branch 'dev/ruleNew20210727' into debug

wangfeng 4 年之前
父節點
當前提交
5af99fd1a9
共有 24 個文件被更改,包括 364 次插入145 次删除
  1. 1 1
      cdssman-service/src/main/java/com/diagbot/dto/KlRuleByIdParDTO.java
  2. 1 0
      cdssman-service/src/main/java/com/diagbot/dto/KlRuleByIdSubDTO.java
  3. 153 0
      cdssman-service/src/main/java/com/diagbot/entity/KlDiagnoseBaseRelation.java
  4. 36 14
      cdssman-service/src/main/java/com/diagbot/entity/KlRuleCondition.java
  5. 6 2
      cdssman-service/src/main/java/com/diagbot/entity/MappingConfig.java
  6. 1 1
      cdssman-service/src/main/java/com/diagbot/entity/OperationConfig.java
  7. 20 92
      cdssman-service/src/main/java/com/diagbot/entity/ScaleConfig.java
  8. 2 2
      cdssman-service/src/main/java/com/diagbot/entity/TransfusionConfig.java
  9. 8 8
      cdssman-service/src/main/java/com/diagbot/entity/wrapper/MappingConfigWrapper.java
  10. 7 3
      cdssman-service/src/main/java/com/diagbot/facade/KlConceptFacade.java
  11. 13 0
      cdssman-service/src/main/java/com/diagbot/facade/KlDiagnoseBaseRelationFacade.java
  12. 16 12
      cdssman-service/src/main/java/com/diagbot/facade/KlRelationFacade.java
  13. 6 3
      cdssman-service/src/main/java/com/diagbot/facade/RelationContactFacade.java
  14. 16 0
      cdssman-service/src/main/java/com/diagbot/mapper/KlDiagnoseBaseRelationMapper.java
  15. 16 0
      cdssman-service/src/main/java/com/diagbot/service/KlDiagnoseBaseRelationService.java
  16. 20 0
      cdssman-service/src/main/java/com/diagbot/service/impl/KlDiagnoseBaseRelationServiceImpl.java
  17. 1 0
      cdssman-service/src/main/java/com/diagbot/vo/KlRuleInfoSaveSubVO.java
  18. 1 1
      cdssman-service/src/main/java/com/diagbot/vo/KlRuleInfoSaveVO.java
  19. 18 0
      cdssman-service/src/main/resources/mapper/KlDiagnoseBaseRelationMapper.xml
  20. 6 2
      cdssman-service/src/main/resources/mapper/KlDiseaseMapper.xml
  21. 4 4
      cdssman-service/src/main/resources/mapper/KlRelationMapper.xml
  22. 4 0
      common/src/main/java/com/diagbot/biz/push/entity/Item.java
  23. 4 0
      common/src/main/java/com/diagbot/biz/push/entity/Lis.java
  24. 4 0
      common/src/main/java/com/diagbot/biz/push/entity/Pacs.java

+ 1 - 1
cdssman-service/src/main/java/com/diagbot/dto/KlRuleByIdParDTO.java

@@ -19,7 +19,7 @@ public class KlRuleByIdParDTO {
     private Long parConceptId;//提示概念id
     private String parlibName;
     private Integer parHasSub;//是否有子条件(0:无,1:有)
-    private String parMsg;//附加信息
+    //private String parMsg;//附加信息
     private Integer parStatus;//启用状态(0:禁用,1:启用)
     private String parLenName;
     private String parLenCode;

+ 1 - 0
cdssman-service/src/main/java/com/diagbot/dto/KlRuleByIdSubDTO.java

@@ -28,4 +28,5 @@ public class KlRuleByIdSubDTO {
     private String subEqOperator;//等于域比较符
     private String subEqValue;//等于域值
     private String subEqUnit;//等于域单位
+    private String subMsg;
 }

+ 153 - 0
cdssman-service/src/main/java/com/diagbot/entity/KlDiagnoseBaseRelation.java

@@ -0,0 +1,153 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 基础规则关联表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2021-07-15
+ */
+public class KlDiagnoseBaseRelation implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * diagnose_base_id
+     */
+    private Long diagnoseBaseId;
+
+    /**
+     * concept_id
+     */
+    private Long conceptId;
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public Long getDiagnoseBaseId() {
+        return diagnoseBaseId;
+    }
+
+    public void setDiagnoseBaseId(Long diagnoseBaseId) {
+        this.diagnoseBaseId = diagnoseBaseId;
+    }
+
+    public Long getConceptId() {
+        return conceptId;
+    }
+
+    public void setConceptId(Long conceptId) {
+        this.conceptId = conceptId;
+    }
+
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    @Override
+    public String toString() {
+        return "KlDiagnoseBaseRelation{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", diagnoseBaseId=" + diagnoseBaseId +
+                ", conceptId=" + conceptId +
+                ", orderNo=" + orderNo +
+                "}";
+    }
+}

+ 36 - 14
cdssman-service/src/main/java/com/diagbot/entity/KlRuleCondition.java

@@ -11,8 +11,8 @@ import java.util.Date;
  * 规则条件表
  * </p>
  *
- * @author zhaops
- * @since 2021-03-01
+ * @author zhoutg
+ * @since 2021-07-27
  */
 public class KlRuleCondition implements Serializable {
 
@@ -50,7 +50,7 @@ public class KlRuleCondition implements Serializable {
     private String modifier;
 
     /**
-     * 提示概念id
+     * 规则主表id
      */
     private Long ruleId;
 
@@ -60,10 +60,15 @@ public class KlRuleCondition implements Serializable {
     private Integer groupType;
 
     /**
-     * 提示概念id
+     * 基础规则id
      */
     private Long ruleBaseId;
 
+    /**
+     * 附加信息
+     */
+    private String msg;
+
     public Long getId() {
         return id;
     }
@@ -71,6 +76,7 @@ public class KlRuleCondition implements Serializable {
     public void setId(Long id) {
         this.id = id;
     }
+
     public String getIsDeleted() {
         return isDeleted;
     }
@@ -78,6 +84,7 @@ public class KlRuleCondition implements Serializable {
     public void setIsDeleted(String isDeleted) {
         this.isDeleted = isDeleted;
     }
+
     public Date getGmtCreate() {
         return gmtCreate;
     }
@@ -85,6 +92,7 @@ public class KlRuleCondition implements Serializable {
     public void setGmtCreate(Date gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
+
     public Date getGmtModified() {
         return gmtModified;
     }
@@ -92,6 +100,7 @@ public class KlRuleCondition implements Serializable {
     public void setGmtModified(Date gmtModified) {
         this.gmtModified = gmtModified;
     }
+
     public String getCreator() {
         return creator;
     }
@@ -99,6 +108,7 @@ public class KlRuleCondition implements Serializable {
     public void setCreator(String creator) {
         this.creator = creator;
     }
+
     public String getModifier() {
         return modifier;
     }
@@ -106,6 +116,7 @@ public class KlRuleCondition implements Serializable {
     public void setModifier(String modifier) {
         this.modifier = modifier;
     }
+
     public Long getRuleId() {
         return ruleId;
     }
@@ -113,6 +124,7 @@ public class KlRuleCondition implements Serializable {
     public void setRuleId(Long ruleId) {
         this.ruleId = ruleId;
     }
+
     public Integer getGroupType() {
         return groupType;
     }
@@ -120,6 +132,7 @@ public class KlRuleCondition implements Serializable {
     public void setGroupType(Integer groupType) {
         this.groupType = groupType;
     }
+
     public Long getRuleBaseId() {
         return ruleBaseId;
     }
@@ -128,18 +141,27 @@ public class KlRuleCondition implements Serializable {
         this.ruleBaseId = ruleBaseId;
     }
 
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
     @Override
     public String toString() {
         return "KlRuleCondition{" +
-            "id=" + id +
-            ", isDeleted=" + isDeleted +
-            ", gmtCreate=" + gmtCreate +
-            ", gmtModified=" + gmtModified +
-            ", creator=" + creator +
-            ", modifier=" + modifier +
-            ", ruleId=" + ruleId +
-            ", groupType=" + groupType +
-            ", ruleBaseId=" + ruleBaseId +
-        "}";
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", ruleId=" + ruleId +
+                ", groupType=" + groupType +
+                ", ruleBaseId=" + ruleBaseId +
+                ", msg=" + msg +
+                "}";
     }
 }

+ 6 - 2
cdssman-service/src/main/java/com/diagbot/entity/MappingConfig.java

@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.diagbot.util.StringUtil;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -19,6 +21,7 @@ import java.util.Objects;
  * @author zhaops
  * @since 2021-06-09
  */
+@EqualsAndHashCode
 @TableName("tran_mapping_config")
 public class MappingConfig implements Serializable {
 
@@ -84,6 +87,7 @@ public class MappingConfig implements Serializable {
     /**
      * 医学标准术语id
      */
+    @TableField(updateStrategy = FieldStrategy.IGNORED)
     private Long conceptId;
 
     /**
@@ -257,7 +261,7 @@ public class MappingConfig implements Serializable {
                 "}";
     }
 
-    @Override
+    /*@Override
     public boolean equals(Object o) {
         if (this == o) {
             return true;
@@ -283,7 +287,7 @@ public class MappingConfig implements Serializable {
     @Override
     public int hashCode() {
         return Objects.hash(id, isDeleted, hospitalId, type, hisName, hisCode, hisDetailName, conceptId, formConceptId, isMatch);
-    }
+    }*/
 
     public static boolean nonNull(MappingConfig o) {
         return !(o == null

+ 1 - 1
cdssman-service/src/main/java/com/diagbot/entity/OperationConfig.java

@@ -72,7 +72,7 @@ public class OperationConfig{
     /**
      * 对应项编码
      */
-    //@Excel(name = "对应项编码", width = 40, orderNum = "2")
+    @Excel(name = "手术和操作代码", width = 40, orderNum = "2", isImportField = "true")
     private String code;
 
     /**

+ 20 - 92
cdssman-service/src/main/java/com/diagbot/entity/ScaleConfig.java

@@ -1,13 +1,11 @@
 package com.diagbot.entity;
 
 import cn.afterturn.easypoi.excel.annotation.Excel;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
 import com.diagbot.util.StringUtil;
+import lombok.Getter;
+import lombok.Setter;
 
 import javax.validation.constraints.NotBlank;
-import java.io.Serializable;
 import java.util.Date;
 import java.util.Objects;
 
@@ -19,15 +17,12 @@ import java.util.Objects;
  * @author zhaops
  * @since 2021-04-13
  */
-@TableName("tran_scale_config")
-public class ScaleConfig implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
+@Getter
+@Setter
+public class ScaleConfig{
     /**
      * 主键
      */
-    @TableId(value = "id", type = IdType.AUTO)
     private Long id;
 
     /**
@@ -77,87 +72,20 @@ public class ScaleConfig implements Serializable {
     /**
      * 标准编码
      */
-    private String uniqueCode;
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getIsDeleted() {
-        return isDeleted;
-    }
-
-    public void setIsDeleted(String isDeleted) {
-        this.isDeleted = isDeleted;
-    }
-
-    public Date getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(Date gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-
-    public Date getGmtModified() {
-        return gmtModified;
-    }
-
-    public void setGmtModified(Date gmtModified) {
-        this.gmtModified = gmtModified;
-    }
-
-    public String getCreator() {
-        return creator;
-    }
-
-    public void setCreator(String creator) {
-        this.creator = creator;
-    }
+    private String code;
 
-    public String getModifier() {
-        return modifier;
-    }
-
-    public void setModifier(String modifier) {
-        this.modifier = modifier;
-    }
-
-    public Long getHospitalId() {
-        return hospitalId;
-    }
-
-    public void setHospitalId(Long hospitalId) {
-        this.hospitalId = hospitalId;
-    }
-
-    public String getHisName() {
-        return hisName;
-    }
-
-    public void setHisName(String hisName) {
-        this.hisName = hisName;
-    }
-
-    public String getUniqueName() {
-        return uniqueName;
-    }
-
-    public void setUniqueName(String uniqueName) {
-        this.uniqueName = uniqueName;
-    }
+    /**
+     * 是否匹配(0-未匹配、1-已匹配)
+     */
+    @Excel(name = "是否匹配【未匹配、已匹配】", width = 20, orderNum = "4", replace = { "未匹配_0", "已匹配_1" }, isImportField = "true")
+    private Integer isMatch;
 
-    public String getUniqueCode() {
-        return uniqueCode;
-    }
+    /**
+     * 数据来源(1-标准词、2-同义词、3-编码、4-历史数据、5-相似词、99-数据迁移)
+     */
+    @Excel(name = "数据来源【不填、标准词、同义词、编码、历史数据、相似词】", width = 20, orderNum = "5", replace = { "标准词_1", "同义词_2", "编码_3", "历史数据_4", "相似词_5", "数据迁移_99", "_null" }, isImportField = "true")
+    private Integer source;
 
-    public void setUniqueCode(String uniqueCode) {
-        this.uniqueCode = uniqueCode;
-    }
 
     @Override
     public String toString() {
@@ -171,7 +99,7 @@ public class ScaleConfig implements Serializable {
                 ", hospitalId=" + hospitalId +
                 ", hisName=" + hisName +
                 ", uniqueName=" + uniqueName +
-                ", uniqueCode=" + uniqueCode +
+                ", code=" + code +
                 "}";
     }
 
@@ -189,12 +117,12 @@ public class ScaleConfig implements Serializable {
                 && Objects.equals(hospitalId, scaleConfig.hospitalId)
                 && Objects.equals(hisName, scaleConfig.hisName)
                 && Objects.equals(uniqueName, scaleConfig.uniqueName)
-                && Objects.equals(uniqueCode, scaleConfig.uniqueCode);
+                && Objects.equals(code, scaleConfig.code);
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(id, isDeleted, hospitalId, hisName, uniqueName, uniqueCode);
+        return Objects.hash(id, isDeleted, hospitalId, hisName, uniqueName, code);
     }
 
     public static boolean nonNull(ScaleConfig o) {
@@ -202,6 +130,6 @@ public class ScaleConfig implements Serializable {
                 || (o.hospitalId == null
                 && StringUtil.isBlank(o.hisName)
                 && StringUtil.isBlank(o.uniqueName)
-                && StringUtil.isBlank(o.uniqueCode)));
+                && StringUtil.isBlank(o.code)));
     }
 }

+ 2 - 2
cdssman-service/src/main/java/com/diagbot/entity/TransfusionConfig.java

@@ -78,13 +78,13 @@ public class TransfusionConfig {
     /**
      * 是否匹配(0-未匹配、1-已匹配)
      */
-    @Excel(name = "是否匹配", width = 20, orderNum = "4", replace = { "未匹配_0", "已匹配_1" }, isImportField = "true")
+    @Excel(name = "是否匹配【未匹配、已匹配】", width = 20, orderNum = "4", replace = { "未匹配_0", "已匹配_1" }, isImportField = "true")
     private Integer isMatch;
 
     /**
      * 数据来源(1-标准词、2-同义词、3-编码、4-历史数据、5-相似词、99-数据迁移)
      */
-    @Excel(name = "数据来源", width = 20, orderNum = "5", replace = { "标准词_1", "同义词_2", "编码_3", "历史数据_4", "相似词_5", "数据迁移_99", "_null" }, isImportField = "true")
+    @Excel(name = "数据来源【不填、标准词、同义词、编码、历史数据、相似词】", width = 20, orderNum = "5", replace = { "标准词_1", "同义词_2", "编码_3", "历史数据_4", "相似词_5", "数据迁移_99", "_null" }, isImportField = "true")
     private Integer source;
 
     @Override

+ 8 - 8
cdssman-service/src/main/java/com/diagbot/entity/wrapper/MappingConfigWrapper.java

@@ -2,24 +2,24 @@ package com.diagbot.entity.wrapper;
 
 import com.diagbot.entity.MappingConfig;
 import com.diagbot.util.StringUtil;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.Objects;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
 
 /**
  * @Description:
  * @Author:zhaops
  * @time: 2021/6/10 19:27
  */
-@Getter
-@Setter
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
 public class MappingConfigWrapper extends MappingConfig {
     private String uniqueName;
     private String form;
     private String code;
 
-    @Override
+   /* @Override
     public boolean equals(Object o) {
         if (this == o) {
             return true;
@@ -37,7 +37,7 @@ public class MappingConfigWrapper extends MappingConfig {
     @Override
     public int hashCode() {
         return Objects.hash(uniqueName, form, code) + super.hashCode();
-    }
+    }*/
 
     public static boolean nonNull(MappingConfigWrapper o) {
         return !(o == null

+ 7 - 3
cdssman-service/src/main/java/com/diagbot/facade/KlConceptFacade.java

@@ -16,6 +16,7 @@ import com.diagbot.entity.KlConceptCommon;
 import com.diagbot.entity.KlConceptStatic;
 import com.diagbot.entity.KlDiagnose;
 import com.diagbot.entity.KlDiagnoseBase;
+import com.diagbot.entity.KlDiagnoseBaseRelation;
 import com.diagbot.entity.KlDrugMapping;
 import com.diagbot.entity.KlLexicon;
 import com.diagbot.entity.KlLibraryInfo;
@@ -92,6 +93,8 @@ public class KlConceptFacade extends KlConceptServiceImpl {
     @Autowired
     KlDiagnoseBaseFacade klDiagnoseBaseFacade;
     @Autowired
+    KlDiagnoseBaseRelationFacade klDiagnoseBaseRelationFacade;
+    @Autowired
     KlDrugFacade klDrugFacade;
     @Autowired
     KlSymptomFacade klSymptomFacade;
@@ -579,10 +582,11 @@ public class KlConceptFacade extends KlConceptServiceImpl {
             if (diagnosesum > 0) {
                 throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该医学标准术语与诊断依据维护存在关系!");
             }
-            //kl_diagnose_base
-            int diagnoseBasesum = klDiagnoseBaseFacade.count(new QueryWrapper<KlDiagnoseBase>().eq("is_deleted", IsDeleteEnum.N.getKey())
+            //kl_diagnose_base_relation
+            int diagnoseBaseRelationsum = klDiagnoseBaseRelationFacade.count(new QueryWrapper<KlDiagnoseBaseRelation>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
                     .eq("concept_id", klConceptSatarOrdisaVO.getConceptId()));
-            if (diagnoseBasesum > 0) {
+            if (diagnoseBaseRelationsum > 0) {
                 throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该医学标准术语与诊断依据维护明细存在关系!");
             }
             //kl_drug_mapping

+ 13 - 0
cdssman-service/src/main/java/com/diagbot/facade/KlDiagnoseBaseRelationFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.KlDiagnoseBaseRelationServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/7/15 13:50
+ */
+@Component
+public class KlDiagnoseBaseRelationFacade extends KlDiagnoseBaseRelationServiceImpl {
+}

+ 16 - 12
cdssman-service/src/main/java/com/diagbot/facade/KlRelationFacade.java

@@ -4,10 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.RelationDTO;
 import com.diagbot.dto.TreeAllDTO;
 import com.diagbot.dto.TreeDTO;
-import com.diagbot.entity.CommonParam;
-import com.diagbot.entity.KlRelation;
-import com.diagbot.entity.KlRelationOrder;
-import com.diagbot.entity.KlVitalResult;
+import com.diagbot.entity.*;
+import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.enums.RelationLibTypeEnum;
 import com.diagbot.service.KlRelationOrderService;
 import com.diagbot.service.KlRelationService;
@@ -16,11 +14,7 @@ import com.diagbot.service.impl.KlRelationServiceImpl;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.EntityUtil;
 import com.diagbot.util.ListUtil;
-import com.diagbot.vo.KlDiseaseVO;
-import com.diagbot.vo.KlSymptomVO;
-import com.diagbot.vo.KlVitalResultVO;
-import com.diagbot.vo.RelationVO;
-import com.diagbot.vo.TreeVO;
+import com.diagbot.vo.*;
 import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
@@ -80,7 +74,7 @@ public class KlRelationFacade extends KlRelationServiceImpl {
         List<RelationDTO> root = this.getRelations(relationVO);
         TreeAllDTO treeAllDTO = new TreeAllDTO();
         treeAllDTO.setTypes(types);
-
+        TreeDTO treeDTO = new TreeDTO();
         if (ListUtil.isNotEmpty(root)) {
             RelationVO relationVO2 = new RelationVO();
             relationVO2.setSType(pList.get(index)[2]);
@@ -89,7 +83,7 @@ public class KlRelationFacade extends KlRelationServiceImpl {
             List<RelationDTO> sub = this.getRelations(relationVO2);
             Map<Long, List<RelationDTO>> map = EntityUtil.makeEntityListMap(sub, "sId");
 
-            TreeDTO treeDTO = new TreeDTO();
+
             treeDTO.setId(root.get(0).getSId());
             treeDTO.setName(root.get(0).getSName());
             for (RelationDTO relationDTO : root) {
@@ -107,8 +101,18 @@ public class KlRelationFacade extends KlRelationServiceImpl {
                 }
                 treeDTO.getNextTree().add(treeDTO2);
             }
-            treeAllDTO.setTreeDTO(treeDTO);
+
+        }else {
+            List<KlConcept> klConcepts = klConceptFacade.list(new QueryWrapper<KlConcept>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("lib_type", types.get(0)));
+            if(ListUtil.isNotEmpty(klConcepts)){
+                treeDTO.setId(klConcepts.get(0).getId());
+                treeDTO.setName(klConcepts.get(0).getLibName());
+            }
+
         }
+        treeAllDTO.setTreeDTO(treeDTO);
         return treeAllDTO;
     }
 

+ 6 - 3
cdssman-service/src/main/java/com/diagbot/facade/RelationContactFacade.java

@@ -80,9 +80,12 @@ public class RelationContactFacade extends KlRelationServiceImpl {
                     }
                 }
             }
-            List<KlRelation> relationList = this.list(new QueryWrapper<KlRelation>()
-                    .in("start_id", sids)
-                    .eq("relation_id", rid));
+            List<KlRelation> relationList = Lists.newArrayList();
+            if(ListUtil.isNotEmpty(sids)){
+                relationList = this.list(new QueryWrapper<KlRelation>()
+                        .in("start_id", sids)
+                        .eq("relation_id", rid));
+            }
             List<Long> ids = relationList.stream().map(x -> x.getId()).collect(Collectors.toList());
             //先删除
             if (ListUtil.isNotEmpty(ids)) {

+ 16 - 0
cdssman-service/src/main/java/com/diagbot/mapper/KlDiagnoseBaseRelationMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.KlDiagnoseBaseRelation;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 基础规则关联表 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2021-07-15
+ */
+public interface KlDiagnoseBaseRelationMapper extends BaseMapper<KlDiagnoseBaseRelation> {
+
+}

+ 16 - 0
cdssman-service/src/main/java/com/diagbot/service/KlDiagnoseBaseRelationService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.KlDiagnoseBaseRelation;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 基础规则关联表 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2021-07-15
+ */
+public interface KlDiagnoseBaseRelationService extends IService<KlDiagnoseBaseRelation> {
+
+}

+ 20 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/KlDiagnoseBaseRelationServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.KlDiagnoseBaseRelation;
+import com.diagbot.mapper.KlDiagnoseBaseRelationMapper;
+import com.diagbot.service.KlDiagnoseBaseRelationService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 基础规则关联表 服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2021-07-15
+ */
+@Service
+public class KlDiagnoseBaseRelationServiceImpl extends ServiceImpl<KlDiagnoseBaseRelationMapper, KlDiagnoseBaseRelation> implements KlDiagnoseBaseRelationService {
+
+}

+ 1 - 0
cdssman-service/src/main/java/com/diagbot/vo/KlRuleInfoSaveSubVO.java

@@ -27,4 +27,5 @@ public class KlRuleInfoSaveSubVO {
     private String subEqOperator;//等于域比较符
     private String subEqValue;//等于域值
     private String subEqUnit;//等于域单位
+    private String subMsg;
 }

+ 1 - 1
cdssman-service/src/main/java/com/diagbot/vo/KlRuleInfoSaveVO.java

@@ -25,7 +25,7 @@ public class KlRuleInfoSaveVO {
     private Long parConceptId;//提示概念id
     @NotNull(message = "请输入概念id")
     private Integer parHasSub;//是否有子条件(0:无,1:有)
-    private String parMsg;//附加信息
+    //private String parMsg;//附加信息
     @ApiModelProperty(hidden = true)
     private Integer parStatus = 1;//启用状态(0:禁用,1:启用)
     /*    private String parlibName;

+ 18 - 0
cdssman-service/src/main/resources/mapper/KlDiagnoseBaseRelationMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.KlDiagnoseBaseRelationMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.KlDiagnoseBaseRelation">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="diagnose_base_id" property="diagnoseBaseId" />
+        <result column="concept_id" property="conceptId" />
+        <result column="order_no" property="orderNo" />
+    </resultMap>
+
+</mapper>

+ 6 - 2
cdssman-service/src/main/resources/mapper/KlDiseaseMapper.xml

@@ -65,7 +65,9 @@
         505,
         506,
         507,
-        508
+        508,
+        509,
+        510
         )
         GROUP BY b.lib_name
         ORDER BY
@@ -99,7 +101,9 @@
         505,
         506,
         507,
-        508
+        508,
+        509,
+        510
         )
         GROUP BY b.lib_name
         ORDER BY

+ 4 - 4
cdssman-service/src/main/resources/mapper/KlRelationMapper.xml

@@ -141,14 +141,14 @@
         <if test="relationId!=null">
             AND relation_id = #{relationId}
         </if>
-        ) k,
+        ) k LEFT JOIN
         kl_relation r
-        WHERE
+        ON
         k.endId = r.start_id
         AND k.relationId = r.relation_id
-        ) m,
+        ) m LEFT JOIN
         kl_concept kc
-        WHERE
+        ON
         m.medId = kc.id
     </select>
     <select id="findDisNameAll" resultType="com.diagbot.dto.GetAllForRelationDTO">

+ 4 - 0
common/src/main/java/com/diagbot/biz/push/entity/Item.java

@@ -23,4 +23,8 @@ public class Item {
      * 结果时间
      */
     private String dateValue;
+    /**
+     * 频次
+     */
+    private String frequency;
 }

+ 4 - 0
common/src/main/java/com/diagbot/biz/push/entity/Lis.java

@@ -55,4 +55,8 @@ public class Lis {
      * HIS比较结果
      */
     private String result;
+    /**
+     * 频次
+     */
+    private String frequency;
 }

+ 4 - 0
common/src/main/java/com/diagbot/biz/push/entity/Pacs.java

@@ -31,4 +31,8 @@ public class Pacs {
      * 结果时间
      */
     private String dateValue;
+    /**
+     * 频次
+     */
+    private String frequency;
 }