瀏覽代碼

Merge remote-tracking branch 'origin/dev/KLBstand' into dev/KLBstand

zhoutg 6 年之前
父節點
當前提交
7d8fbd094e
共有 77 個文件被更改,包括 2119 次插入584 次删除
  1. 24 0
      aipt-service/src/main/java/com/diagbot/client/TranServiceClient.java
  2. 19 0
      aipt-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java
  3. 38 0
      aipt-service/src/main/java/com/diagbot/dto/DiseaseIcdDTO.java
  4. 22 0
      aipt-service/src/main/java/com/diagbot/dto/EvaluationDTO.java
  5. 0 4
      icss-service/src/main/java/com/diagbot/dto/GetDiseaseIcdDTO.java
  6. 156 0
      aipt-service/src/main/java/com/diagbot/dto/GetTopPatientInfoDTO.java
  7. 20 0
      aipt-service/src/main/java/com/diagbot/dto/IndexConfigAndDataDTO.java
  8. 28 0
      aipt-service/src/main/java/com/diagbot/dto/IndexConfigDTO.java
  9. 25 0
      aipt-service/src/main/java/com/diagbot/dto/IndexDTO.java
  10. 25 0
      aipt-service/src/main/java/com/diagbot/dto/IndexDataDTO.java
  11. 2 1
      aipt-service/src/main/java/com/diagbot/dto/PushDTO.java
  12. 11 1
      icss-service/src/main/java/com/diagbot/entity/DiseaseIcd.java
  13. 166 0
      aipt-service/src/main/java/com/diagbot/entity/Evaluation.java
  14. 170 133
      icss-service/src/main/java/com/diagbot/entity/VitalOrder.java
  15. 1 0
      aipt-service/src/main/java/com/diagbot/enums/ConceptTypeEnum.java
  16. 53 0
      aipt-service/src/main/java/com/diagbot/enums/IntroducePositionEnum.java
  17. 19 0
      aipt-service/src/main/java/com/diagbot/facade/ConceptDetailFacade.java
  18. 76 0
      aipt-service/src/main/java/com/diagbot/facade/DiseaseIcdFacade.java
  19. 8 0
      aipt-service/src/main/java/com/diagbot/facade/EvaluationFacade.java
  20. 26 0
      aipt-service/src/main/java/com/diagbot/facade/IndexConfigFacade.java
  21. 50 0
      aipt-service/src/main/java/com/diagbot/facade/PatientInfoFacade.java
  22. 111 2
      aipt-service/src/main/java/com/diagbot/facade/PushFacade.java
  23. 91 0
      aipt-service/src/main/java/com/diagbot/facade/TreatmentFacade.java
  24. 27 0
      aipt-service/src/main/java/com/diagbot/mapper/EvaluationMapper.java
  25. 26 0
      aipt-service/src/main/java/com/diagbot/mapper/IndexConfigMapper.java
  26. 25 0
      aipt-service/src/main/java/com/diagbot/service/EvaluationService.java
  27. 24 0
      aipt-service/src/main/java/com/diagbot/service/IndexConfigService.java
  28. 33 0
      aipt-service/src/main/java/com/diagbot/service/impl/EvaluationServiceImpl.java
  29. 31 0
      aipt-service/src/main/java/com/diagbot/service/impl/IndexConfigServiceImpl.java
  30. 7 0
      aipt-service/src/main/java/com/diagbot/util/ParamConvertUtil.java
  31. 18 0
      aipt-service/src/main/java/com/diagbot/vo/EvaluationdiseaseNameVO.java
  32. 23 0
      aipt-service/src/main/java/com/diagbot/vo/GetDiseaseIcdVO.java
  33. 56 0
      aipt-service/src/main/java/com/diagbot/vo/GetTopPatientInfoVO.java
  34. 16 0
      aipt-service/src/main/java/com/diagbot/vo/IndexConfigdiseaseNameVO.java
  35. 35 0
      aipt-service/src/main/java/com/diagbot/vo/IndexDataFindVO.java
  36. 33 0
      aipt-service/src/main/java/com/diagbot/vo/IndexDataSaveVO.java
  37. 48 0
      aipt-service/src/main/java/com/diagbot/vo/IndexDataVO.java
  38. 19 0
      aipt-service/src/main/java/com/diagbot/vo/IndexDataiIds.java
  39. 8 6
      icss-service/src/main/java/com/diagbot/web/TranDiseaseIcdController.java
  40. 44 0
      aipt-service/src/main/java/com/diagbot/web/EvaluationController.java
  41. 44 0
      aipt-service/src/main/java/com/diagbot/web/IndexConfigController.java
  42. 49 0
      aipt-service/src/main/java/com/diagbot/web/PatientInfoController.java
  43. 37 0
      aipt-service/src/main/resources/mapper/EvaluationMapper.xml
  44. 38 0
      aipt-service/src/main/resources/mapper/IndexConfigMapper.xml
  45. 2 1
      docs/009.20190425知识库标准化脚本/init_cloud_service.sql
  46. 23 0
      icss-service/src/main/java/com/diagbot/client/AiptServiceClient.java
  47. 7 30
      icss-service/src/main/java/com/diagbot/client/TranServiceClient.java
  48. 33 8
      icss-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java
  49. 9 24
      icss-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java
  50. 38 0
      icss-service/src/main/java/com/diagbot/dto/DiseaseIcdDTO.java
  51. 0 142
      icss-service/src/main/java/com/diagbot/entity/User.java
  52. 35 0
      icss-service/src/main/java/com/diagbot/facade/DiseaseIcdFacade.java
  53. 1 1
      icss-service/src/main/java/com/diagbot/facade/LisMappingFacade.java
  54. 12 20
      icss-service/src/main/java/com/diagbot/facade/PatientInfoFacade.java
  55. 0 68
      icss-service/src/main/java/com/diagbot/facade/TranDiseaseIcdFacade.java
  56. 0 13
      icss-service/src/main/java/com/diagbot/facade/VitalOrderFacade.java
  57. 0 16
      icss-service/src/main/java/com/diagbot/mapper/SysLogMapper.java
  58. 0 16
      icss-service/src/main/java/com/diagbot/mapper/VitalOrderMapper.java
  59. 0 16
      icss-service/src/main/java/com/diagbot/service/VitalOrderService.java
  60. 1 1
      icss-service/src/main/java/com/diagbot/service/impl/impl/LisMappingServiceImpl.java
  61. 0 20
      icss-service/src/main/java/com/diagbot/service/impl/VitalOrderServiceImpl.java
  62. 1 1
      icss-service/src/main/java/com/diagbot/vo/GetDiseaseIcdVO.java
  63. 1 1
      icss-service/src/main/java/com/diagbot/web/DeptInfoController.java
  64. 44 0
      icss-service/src/main/java/com/diagbot/web/DiseaseIcdController.java
  65. 9 7
      icss-service/src/main/java/com/diagbot/web/PatientInfoController.java
  66. 0 17
      icss-service/src/main/resources/mapper/VitalOrderMapper.xml
  67. 31 0
      knowledgeman-service/src/main/java/com/diagbot/config/MultipartConfigurer.java
  68. 3 3
      knowledgeman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  69. 20 20
      knowledgeman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  70. 1 1
      tran-service/src/main/java/com/diagbot/entity/DiseaseIcd.java
  71. 3 3
      tran-service/src/main/java/com/diagbot/facade/TranDiseaseIcdFacade.java
  72. 2 2
      tran-service/src/main/java/com/diagbot/vo/GetDiseaseIcdVO.java
  73. 2 2
      tran-service/src/main/resources/mapper/DiseaseIcdMapper.xml
  74. 6 0
      triage-service/src/main/java/com/diagbot/client/AiptServiceClient.java
  75. 9 0
      triage-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java
  76. 19 4
      triage-service/src/main/java/com/diagbot/facade/SymptomFacade.java
  77. 25 0
      triage-service/src/main/java/com/diagbot/vo/ConceptUsualVO.java

+ 24 - 0
aipt-service/src/main/java/com/diagbot/client/TranServiceClient.java

@@ -1,13 +1,20 @@
 package com.diagbot.client;
 
 import com.diagbot.client.hystrix.TranServiceHystrix;
+import com.diagbot.dto.GetDiseaseIcdDTO;
+import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.HospitalDeptInfoDTO;
 import com.diagbot.dto.HospitalDeptInfoVO;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.GetDiseaseIcdVO;
+import com.diagbot.vo.GetTopPatientInfoVO;
+
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 
+import java.util.List;
+
 /**
  * @Description: 调用信息对接层服务
  * @author: gaodm
@@ -24,4 +31,21 @@ public interface TranServiceClient {
     @PostMapping("/hospitalDeptInfo/getHospitalDeptInfo")
     RespDTO<HospitalDeptInfoDTO> getHospitalDeptInfo(@RequestBody HospitalDeptInfoVO hospitalDeptInfoVO);
 
+    /**
+     * 根据医院编号疾病概念名称获取各医院对应的诊断icd
+     *
+     * @param getDiseaseIcdVO
+     * @return
+     */
+    @PostMapping("/diseaseIcd/getDiseaseIcds")
+    RespDTO<List<GetDiseaseIcdDTO>> getDiseaseIcds(@RequestBody GetDiseaseIcdVO getDiseaseIcdVO);
+    
+    /**
+     * 获取页面顶部病人医生科室信息
+     *
+     * @param getTopPatientInfoVO
+     * @return
+     */
+    @PostMapping("/patientInfo/getTopPatientInfo")
+    RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(@RequestBody GetTopPatientInfoVO getTopPatientInfoVO);
 }

+ 19 - 0
aipt-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java

@@ -1,12 +1,19 @@
 package com.diagbot.client.hystrix;
 
 import com.diagbot.client.TranServiceClient;
+import com.diagbot.dto.GetDiseaseIcdDTO;
+import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.HospitalDeptInfoDTO;
 import com.diagbot.dto.HospitalDeptInfoVO;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.GetDiseaseIcdVO;
+import com.diagbot.vo.GetTopPatientInfoVO;
+
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 
+import java.util.List;
+
 /**
  * @Description: 调用信息对接层服务
  * @author: gaodm
@@ -20,4 +27,16 @@ public class TranServiceHystrix implements TranServiceClient {
         log.error("【hystrix】调用{}异常", "getHospitalDeptInfo");
         return null;
     }
+
+    @Override
+    public RespDTO<List<GetDiseaseIcdDTO>> getDiseaseIcds(GetDiseaseIcdVO getDiseaseIcdVO) {
+        log.error("【hystrix】调用{}异常", "getDiseaseIcds");
+        return null;
+    }
+    
+    @Override
+    public RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(GetTopPatientInfoVO getTopPatientInfoVO) {
+        log.error("【hystrix】调用{}异常", "getTopPatientInfo");
+        return null;
+    }
 }

+ 38 - 0
aipt-service/src/main/java/com/diagbot/dto/DiseaseIcdDTO.java

@@ -0,0 +1,38 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: wangyu
+ * @time: 2019/2/14 14:59
+ */
+@Getter
+@Setter
+public class DiseaseIcdDTO  {
+    /**
+     * 医院编码
+     */
+    private String hospitalCode;
+
+    /**
+     * HIS疾病名称
+     */
+    private String diseaseName;
+
+    /**
+     * icd编码
+     */
+    private String icd;
+
+    /**
+     * 朗通疾病概念id
+     */
+    private Long conceptId;
+
+    /**
+     * 朗通疾病名称
+     */
+    private String conceptDisName;
+}

+ 22 - 0
aipt-service/src/main/java/com/diagbot/dto/EvaluationDTO.java

@@ -0,0 +1,22 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年5月6日 下午5:14:02
+ */
+@Getter
+@Setter
+public class EvaluationDTO {
+
+	private String diseaseName;// 对应术语疾病名
+	private Long conceptId;// 术语概念id
+	private String regionName; // 区域名
+	private String regionType; // 区域类型
+	private Integer orderNo; // 区域顺序
+	private Object data;
+}

+ 0 - 4
icss-service/src/main/java/com/diagbot/dto/GetDiseaseIcdDTO.java

@@ -12,8 +12,4 @@ import lombok.Setter;
 @Getter
 @Setter
 public class GetDiseaseIcdDTO extends DiseaseIcd {
-    /**
-     * 疾病id
-     */
-    private Long questionId;
 }

+ 156 - 0
aipt-service/src/main/java/com/diagbot/dto/GetTopPatientInfoDTO.java

@@ -0,0 +1,156 @@
+package com.diagbot.dto;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description
+ * @author rgb
+ * @time 2018年11月19日下午4:57:43
+ */
+@ApiModel(value="页面顶部病人医生科室信息查询接口出参")
+@Getter
+@Setter
+public class GetTopPatientInfoDTO {
+	
+	/**
+	 * 医院id
+	 */
+	@ApiModelProperty(value="医院id")
+	private Long hospitalId;
+	
+	/**
+     * 医院编码
+     */
+	@ApiModelProperty(value="医院编码")
+    private String hospitalCode;
+
+    /**
+     * 医院名称
+     */
+	@ApiModelProperty(value="医院名称")
+    private String hospitalName;
+    
+    /**
+	 * 医院科室id
+	 */
+	@ApiModelProperty(value="医院科室id")
+	private Long hospitalDeptId;
+	
+    /**
+	 * 自己科室id
+	 */
+	@ApiModelProperty(value="自己科室id")
+	private Long selfDeptId;
+	
+	/**
+	 * 自己科室名称
+	 */
+	@ApiModelProperty(value="自己科室名称")
+	private String selfDeptName;
+    
+    /**
+     * 医院科室编码
+     */
+	@ApiModelProperty(value="医院科室编码")
+    private String hospitalDeptCode;
+
+    /**
+     * 医院科室名称
+     */
+	@ApiModelProperty(value="医院科室名称")
+    private String hospitalDeptName;
+    
+    /**
+	 * 医生id
+	 */
+	@ApiModelProperty(value="医生id")
+	private Long doctorId;
+	
+	/**
+     * 医生编码
+     */
+	@ApiModelProperty(value="医生编码")
+    private String doctorCode;
+
+    /**
+     * 医生姓名
+     */
+	@ApiModelProperty(value="医生姓名")
+    private String doctorName;
+    
+    /**
+   	 * 病人id
+   	 */
+	@ApiModelProperty(value="病人id")
+   	private Long patientId;
+   	
+   	/**
+     * 病人编号
+     */
+	@ApiModelProperty(value="病人编号")
+    private String patientCode;
+
+    /**
+     * 病人姓名
+     */
+	@ApiModelProperty(value="病人姓名")
+    private String patientName;
+
+    /**
+     * 病人性别
+     */
+	@ApiModelProperty(value="病人性别")
+    private String patientSex;
+    
+    /**
+     * 病人年龄
+     */
+	@ApiModelProperty(value="病人年龄")
+    private Integer patientAge;
+    
+    /**
+     * 病人证件号码
+     */
+	@ApiModelProperty(value="病人证件号码")
+    private String patientIdNo;
+
+	/**
+	 * 系统时间
+	 */
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+	@ApiModelProperty(value="系统时间")
+	private Date systemTime;
+	
+	/**
+     * 出生日期
+     */
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+	@ApiModelProperty(value="出生日期")
+    private Date birthday;
+	
+	/**
+     * 门诊号
+     */
+	@ApiModelProperty(value="门诊号")
+	private String recordId;
+	
+    /**
+     * 模式分类
+     */
+	@ApiModelProperty(value="模式分类")
+    private Integer modeClassify;
+
+    /**
+     * 模式值
+     */
+	@ApiModelProperty(value="模式值")
+    private Integer modeValue;
+	
+}

+ 20 - 0
aipt-service/src/main/java/com/diagbot/dto/IndexConfigAndDataDTO.java

@@ -0,0 +1,20 @@
+package com.diagbot.dto;
+
+import java.util.List;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年5月6日 下午8:08:22
+ */
+@Getter
+@Setter
+public class IndexConfigAndDataDTO {
+
+	private List<IndexDTO> IndexData;
+	private List<IndexConfigDTO> IndexConfigData;
+}

+ 28 - 0
aipt-service/src/main/java/com/diagbot/dto/IndexConfigDTO.java

@@ -0,0 +1,28 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年5月6日 下午6:45:29
+ */
+@Getter
+@Setter
+public class IndexConfigDTO {
+	
+	private Long uniqueId;// 指标公表概念id
+	
+	private Long diseaseId;// 疾病概念id
+
+	private Integer groupType;// 指标项组别
+	
+	private Integer orderNo;// 显示顺序
+	
+	private String indexUnique;// 指标公表名
+
+	private String diseaseName;// 疾病概念名
+
+}

+ 25 - 0
aipt-service/src/main/java/com/diagbot/dto/IndexDTO.java

@@ -0,0 +1,25 @@
+package com.diagbot.dto;
+
+import java.util.Date;
+import java.util.List;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年5月6日 下午8:09:16
+ */
+@Getter
+@Setter
+public class IndexDTO {
+	
+	private String itemName; // 指标名称
+	private Integer groupType;
+	private List<String> indexUnit;//单位
+	private List<Integer> isAbnormal;//是否异常
+	private List<String> indexValue; 
+	private List<Date> creatTime;
+}

+ 25 - 0
aipt-service/src/main/java/com/diagbot/dto/IndexDataDTO.java

@@ -0,0 +1,25 @@
+package com.diagbot.dto;
+
+import java.util.Date;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年5月7日 上午10:22:12
+ */
+@Setter
+@Getter
+public class IndexDataDTO {
+	private Long uniqueId;// 指标id
+	private String indexValue;// 指标值
+	private String indexUnit;// 指标单位
+	private Integer isAbnormal;// 是否异常
+	private Date creatTime;// 化验时间
+	private Long patientId;// 患者id
+	private String inquiryCode;// 就诊号
+	private String indexUnique;// 指标名
+}

+ 2 - 1
aipt-service/src/main/java/com/diagbot/dto/PushDTO.java

@@ -17,11 +17,12 @@ public class PushDTO {
     private List<ConceptPushDTO> symptom;
     private List<ConceptPushDTO> other;
     private List<ConceptPushDTO> vital;
-    private List<Long> markedVitalIds;
+    private List<ConceptPushDTO> moduleVital;
     private List<ConceptPushDTO> lab;
     private List<ConceptPushDTO> pacs;
     private Map<String, List<ConceptPushDTO>> dis;
     private Map<String, Object> treat;
+    private String deptName;
     //private List<MedicalIndicationDTO> medicalIndications;
     //private List<EvaluationModuleMappingDTO> evaluationModule;
 }

+ 11 - 1
icss-service/src/main/java/com/diagbot/entity/DiseaseIcd.java

@@ -54,7 +54,7 @@ public class DiseaseIcd implements Serializable {
     private String hospitalCode;
 
     /**
-     * icss疾病名称
+     * HIS疾病名称
      */
     private String diseaseName;
 
@@ -93,6 +93,7 @@ public class DiseaseIcd implements Serializable {
     public void setId(Long id) {
         this.id = id;
     }
+
     public String getIsDeleted() {
         return isDeleted;
     }
@@ -100,6 +101,7 @@ public class DiseaseIcd implements Serializable {
     public void setIsDeleted(String isDeleted) {
         this.isDeleted = isDeleted;
     }
+
     public Date getGmtCreate() {
         return gmtCreate;
     }
@@ -107,6 +109,7 @@ public class DiseaseIcd implements Serializable {
     public void setGmtCreate(Date gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
+
     public Date getGmtModified() {
         return gmtModified;
     }
@@ -114,6 +117,7 @@ public class DiseaseIcd implements Serializable {
     public void setGmtModified(Date gmtModified) {
         this.gmtModified = gmtModified;
     }
+
     public String getCreator() {
         return creator;
     }
@@ -121,6 +125,7 @@ public class DiseaseIcd implements Serializable {
     public void setCreator(String creator) {
         this.creator = creator;
     }
+
     public String getModifier() {
         return modifier;
     }
@@ -128,6 +133,7 @@ public class DiseaseIcd implements Serializable {
     public void setModifier(String modifier) {
         this.modifier = modifier;
     }
+
     public String getHospitalCode() {
         return hospitalCode;
     }
@@ -135,6 +141,7 @@ public class DiseaseIcd implements Serializable {
     public void setHospitalCode(String hospitalCode) {
         this.hospitalCode = hospitalCode;
     }
+
     public String getDiseaseName() {
         return diseaseName;
     }
@@ -142,6 +149,7 @@ public class DiseaseIcd implements Serializable {
     public void setDiseaseName(String diseaseName) {
         this.diseaseName = diseaseName;
     }
+
     public String getIcd() {
         return icd;
     }
@@ -149,6 +157,7 @@ public class DiseaseIcd implements Serializable {
     public void setIcd(String icd) {
         this.icd = icd;
     }
+
     public String getStatus() {
         return status;
     }
@@ -156,6 +165,7 @@ public class DiseaseIcd implements Serializable {
     public void setStatus(String status) {
         this.status = status;
     }
+
     public String getRemark() {
         return remark;
     }

+ 166 - 0
aipt-service/src/main/java/com/diagbot/entity/Evaluation.java

@@ -0,0 +1,166 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 管理与评估模板表
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2019-05-06
+ */
+@TableName("kl_evaluation")
+public class Evaluation implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 术语概念id
+     */
+    private Long conceptId;
+
+    /**
+     * 区域名
+     */
+    private String regionName;
+
+    /**
+     * 区域类型(0默认自定义,1大数据,2内部数据)
+     */
+    private String regionType;
+
+    /**
+     * 区域顺序
+     */
+    private Integer orderNo;
+
+    private String remark;
+
+    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 LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime 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 getConceptId() {
+        return conceptId;
+    }
+
+    public void setConceptId(Long conceptId) {
+        this.conceptId = conceptId;
+    }
+    public String getRegionName() {
+        return regionName;
+    }
+
+    public void setRegionName(String regionName) {
+        this.regionName = regionName;
+    }
+    public String getRegionType() {
+        return regionType;
+    }
+
+    public void setRegionType(String regionType) {
+        this.regionType = regionType;
+    }
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "Evaluation{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", conceptId=" + conceptId +
+        ", regionName=" + regionName +
+        ", regionType=" + regionType +
+        ", orderNo=" + orderNo +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 170 - 133
icss-service/src/main/java/com/diagbot/entity/VitalOrder.java

@@ -1,133 +1,170 @@
-package com.diagbot.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import java.util.Date;
-import java.io.Serializable;
-
-/**
- * <p>
- * 查体全局排序
- * </p>
- *
- * @author zhaops
- * @since 2018-11-15
- */
-@TableName("icss_vital_order")
-public class VitalOrder 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;
-
-    /**
-     * 查体id
-     */
-    private Long questionId;
-
-    /**
-     * 排序号
-     */
-    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 getQuestionId() {
-        return questionId;
-    }
-
-    public void setQuestionId(Long questionId) {
-        this.questionId = questionId;
-    }
-    public Integer getOrderNo() {
-        return orderNo;
-    }
-
-    public void setOrderNo(Integer orderNo) {
-        this.orderNo = orderNo;
-    }
-
-    @Override
-    public String toString() {
-        return "VitalOrder{" +
-        "id=" + id +
-        ", isDeleted=" + isDeleted +
-        ", gmtCreate=" + gmtCreate +
-        ", gmtModified=" + gmtModified +
-        ", creator=" + creator +
-        ", modifier=" + modifier +
-        ", questionId=" + questionId +
-        ", orderNo=" + orderNo +
-        "}";
-    }
-}
+package com.diagbot.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+/**
+ * <p>
+ * 指标配置
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2019-05-06
+ */
+@TableName("kl_index_config")
+public class IndexConfig 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;
+
+    /**
+     * 指标公表名概念id
+     */
+    private Long conceptId;
+
+    /**
+     * 疾病概念id
+     */
+    private Long diseaseId;
+
+    /**
+     * 指标描述
+     */
+    private Integer indexDesc;
+
+    /**
+     * 显示顺序
+     */
+    private Integer orderNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    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 getConceptId() {
+        return conceptId;
+    }
+
+    public void setConceptId(Long conceptId) {
+        this.conceptId = conceptId;
+    }
+    public Long getDiseaseId() {
+        return diseaseId;
+    }
+
+    public void setDiseaseId(Long diseaseId) {
+        this.diseaseId = diseaseId;
+    }
+    public Integer getIndexDesc() {
+        return indexDesc;
+    }
+
+    public void setIndexDesc(Integer indexDesc) {
+        this.indexDesc = indexDesc;
+    }
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "IndexConfig{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", conceptId=" + conceptId +
+        ", diseaseId=" + diseaseId +
+        ", indexDesc=" + indexDesc +
+        ", orderNo=" + orderNo +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 1 - 0
aipt-service/src/main/java/com/diagbot/enums/ConceptTypeEnum.java

@@ -20,6 +20,7 @@ public enum  ConceptTypeEnum implements KeyedNamed {
     Drug_Category_Big(9, "药品分类-大类"),
     SIDE_EFFECTS(10, "不良反应"),
     Drug_Category_Small(11, "药品分类-小类"),
+    LIS_TABLES(12,"化验公表项"),
     Scale(21, "量表"),
     Indication(22, "指标");
 

+ 53 - 0
aipt-service/src/main/java/com/diagbot/enums/IntroducePositionEnum.java

@@ -0,0 +1,53 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description:提示信息展示位置
+ * @Author:zhaops
+ * @time: 2018/11/23 10:12
+ */
+public enum IntroducePositionEnum implements KeyedNamed {
+    Push(1, "推送展示"),
+    More(2, "更多展示"),
+    CommonTreatment(3, "一般治疗展示"),
+    SurgeryTreatment(4, "手术治疗展示"),
+    Drug(5, "药品说明书"),
+    AdverseReaction(6, "不良反应");
+
+    @Setter
+    private Integer key;
+
+    @Setter
+    private String name;
+
+    IntroducePositionEnum(Integer key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static IntroducePositionEnum getEnum(Integer key) {
+        for (IntroducePositionEnum item : IntroducePositionEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer key) {
+        IntroducePositionEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 19 - 0
aipt-service/src/main/java/com/diagbot/facade/ConceptDetailFacade.java

@@ -60,4 +60,23 @@ public class ConceptDetailFacade extends ConceptDetailServiceImpl {
         conceptIntroduceDTO.setDetails(conceptDetailDTOList);
         return conceptIntroduceDTO;
     }
+
+    /**
+     * 获取静态知识明细
+     * @param conceptIntroduceVO
+     * @return
+     */
+    public List<ConceptDetail> getConceptDetailList(ConceptIntroduceVO conceptIntroduceVO) {
+        //验证存在并且获取概念基本信息
+        Concept concept = conceptFacade.exist(conceptIntroduceVO);
+
+        //获取概念提示信息
+        QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
+        conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("concept_id", concept.getId())
+                .apply("find_in_set({0},position)", conceptIntroduceVO.getPosition())
+                .orderByAsc("order_no");
+        List<ConceptDetail> conceptDetailList = this.list(conceptDetailQueryWrapper);
+        return conceptDetailList;
+    }
 }

+ 76 - 0
aipt-service/src/main/java/com/diagbot/facade/DiseaseIcdFacade.java

@@ -0,0 +1,76 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.client.TranServiceClient;
+import com.diagbot.dto.DiseaseIcdDTO;
+import com.diagbot.dto.GetDiseaseIcdDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.Concept;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.enums.LexiconTypeEnum;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.GetDiseaseIcdVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @author: wangyu
+ * @time: 2019/2/14 15:25
+ */
+@Component
+public class DiseaseIcdFacade {
+
+    @Autowired
+    TranServiceClient tranServiceClient;
+    @Autowired
+    ConceptFacade conceptFacade;
+
+    /**
+     * 根据医院编号和诊断ids获取各自的icd编码
+     *
+     * @param getDiseaseIcdVO
+     * @return
+     */
+    public List<DiseaseIcdDTO> getDiseaseIcds(GetDiseaseIcdVO getDiseaseIcdVO) {
+        RespDTO<List<GetDiseaseIcdDTO>> getDiseaseIcdsList = tranServiceClient.getDiseaseIcds(getDiseaseIcdVO);
+        RespDTOUtil.respNGDealCover(getDiseaseIcdsList, "获取icd编码失败");
+
+        List<DiseaseIcdDTO> res = new ArrayList<>();
+
+        List<String> disNames
+                = getDiseaseIcdsList.data.stream().map(g -> g.getConceptDisName()).distinct().collect(Collectors.toList());
+        if (ListUtil.isEmpty(disNames)) {
+            return res;
+        }
+
+        QueryWrapper<Concept> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("lib_type", LexiconTypeEnum.DIAGNOSIS.getKey())
+                .in("lib_name", disNames);
+
+        List<Concept> conceptDisNames = conceptFacade.list(queryWrapper);
+
+        Map<String, Long> map
+                = conceptDisNames.stream().collect(Collectors.toMap(c -> c.getLibName(), c -> c.getId()));
+        if (null != map) {
+            DiseaseIcdDTO diseaseIcdDTO = null;
+            for (GetDiseaseIcdDTO getDiseaseIcdDTO : getDiseaseIcdsList.data) {
+                if (null != map.get(getDiseaseIcdDTO.getConceptDisName())) {
+                    diseaseIcdDTO = new DiseaseIcdDTO();
+                    BeanUtil.copyProperties(getDiseaseIcdDTO, diseaseIcdDTO);
+                    diseaseIcdDTO.setConceptId(map.get(getDiseaseIcdDTO.getConceptDisName()));
+                    res.add(diseaseIcdDTO);
+                }
+            }
+        }
+        return res;
+    }
+}

+ 8 - 0
aipt-service/src/main/java/com/diagbot/facade/EvaluationFacade.java

@@ -0,0 +1,8 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.EvaluationServiceImpl;
+import org.springframework.stereotype.Component;
+
+@Component
+public class EvaluationFacade extends EvaluationServiceImpl {
+}

+ 26 - 0
aipt-service/src/main/java/com/diagbot/facade/IndexConfigFacade.java

@@ -0,0 +1,26 @@
+package com.diagbot.facade;
+
+import com.diagbot.dto.IndexConfigDTO;
+import com.diagbot.service.impl.IndexConfigServiceImpl;
+import org.springframework.stereotype.Component;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年5月6日 下午6:35:58
+ */
+@Component
+public class IndexConfigFacade extends IndexConfigServiceImpl {
+
+
+    public List<IndexConfigDTO> getIndexConfig(String diseaseName) {
+        Map<String, Object> indexConfigMap = new HashMap<>();
+        indexConfigMap.put("diseaseName", diseaseName);
+        return this.getIndexConfig(indexConfigMap);
+    }
+
+}

+ 50 - 0
aipt-service/src/main/java/com/diagbot/facade/PatientInfoFacade.java

@@ -0,0 +1,50 @@
+package com.diagbot.facade;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import com.diagbot.client.TranServiceClient;
+import com.diagbot.dto.GetTopPatientInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.Concept;
+import com.diagbot.enums.LexiconTypeEnum;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.ConceptBaseVO;
+import com.diagbot.vo.GetTopPatientInfoVO;
+
+/**
+ * @Description: 患者业务逻辑
+ * @author: wangyu
+ * @time: 2018/11/19 13:19
+ */
+@Component
+public class PatientInfoFacade {
+
+	@Autowired
+    private ConceptFacade conceptFacade;
+    @Autowired
+    TranServiceClient tranServiceClient;
+
+    /**
+     * 页面顶部病人医生科室信息查询
+     *
+     * @param getTopPatientInfoVO
+     * @return
+     */
+    public GetTopPatientInfoDTO getTopPatientInfo(@RequestBody GetTopPatientInfoVO getTopPatientInfoVO) {
+        RespDTO<GetTopPatientInfoDTO> respDTO = tranServiceClient.getTopPatientInfo(getTopPatientInfoVO);
+        RespDTOUtil.respNGDealCover(respDTO, "获取页面顶部病人医生科室信息失败");
+
+        GetTopPatientInfoDTO getTopPatientInfoDTO = respDTO.data;
+        
+        ConceptBaseVO conceptBaseVO = new ConceptBaseVO();
+        conceptBaseVO.setLibType(LexiconTypeEnum.DEPARTMENT.getKey());
+        conceptBaseVO.setName(getTopPatientInfoDTO.getSelfDeptName());
+        Concept concept = conceptFacade.exist(conceptBaseVO);
+        getTopPatientInfoDTO.setSelfDeptId(concept.getId());
+        
+        return getTopPatientInfoDTO;
+    }
+
+}

+ 111 - 2
aipt-service/src/main/java/com/diagbot/facade/PushFacade.java

@@ -1,24 +1,38 @@
 package com.diagbot.facade;
 
+import com.alibaba.fastjson.JSONObject;
 import com.diagbot.client.TranServiceClient;
+import com.diagbot.client.bean.Feature;
 import com.diagbot.client.bean.FeatureRate;
+import com.diagbot.client.bean.GdbResponse;
 import com.diagbot.client.bean.ResponseData;
+import com.diagbot.client.bean.SearchData;
 import com.diagbot.dto.ConceptPushDTO;
 import com.diagbot.dto.PushDTO;
+import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.Concept;
 import com.diagbot.enums.ConceptTypeEnum;
 import com.diagbot.enums.FeatureTypeEnum;
 import com.diagbot.enums.LexiconTypeEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.FastJsonUtils;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.ParamConvertUtil;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.util.StringUtil;
 import com.diagbot.vo.SearchVo;
 import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.HashSet;
+import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 import java.util.stream.Collectors;
 
@@ -45,13 +59,30 @@ public class PushFacade {
     public void pushInner(SearchVo searchVo) {
         PushDTO pushDTO = new PushDTO();
         ResponseData data = clinicalFacade.processClinicalData(searchVo);
-        //大数据返回内容
-        List<FeatureRate> dis = data.getDis();
 
         String featureType = searchVo.getFeatureType();
         String[] featureTypes = featureType.split(",|,");
         Set<String> featureTypeSet = new HashSet(Arrays.asList(featureTypes));
 
+        //诊断
+        List<FeatureRate> dis = data.getDis();
+        //推送科室
+        String deptName = "";
+        if (ListUtil.isNotEmpty(dis)) {
+            for (FeatureRate featureRate : dis) {
+                if (StringUtil.isNotBlank(featureRate.getExtraProperty())) {
+                    deptName = featureRate.getExtraProperty();
+                    break;
+                }
+            }
+        }
+        //没有推送信息时,默认取全科模板
+        if (StringUtil.isBlank(deptName)) {
+            deptName = "全科";
+        }
+        pushDTO.setDeptName(deptName);
+
+
         //症状 概念列表
         if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Symptom.getKey()))) {
             List<FeatureRate> symptom = data.getSymptom();
@@ -74,6 +105,17 @@ public class PushFacade {
                 }
             }
         }
+        //化验 概念列表-公表项
+        if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Lis.getKey()))) {
+            List<FeatureRate> lis = data.getLabs();
+            if (ListUtil.isNotEmpty(lis)) {
+                List<String> nameList = lis.stream().map(featureRate -> featureRate.getFeatureName()).collect(Collectors.toList());
+                List<Concept> concepts = conceptFacade.getListByNamesAndType(nameList, LexiconTypeEnum.LIS_TABLES.getKey());
+                if (ListUtil.isNotEmpty(concepts)) {
+                    pushDTO.setLab(getConceptDTOList(concepts, LexiconTypeEnum.LIS_TABLES.getKey()));
+                }
+            }
+        }
         //辅检 概念列表
         if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Pacs.getKey()))) {
             List<FeatureRate> pacs = data.getPacs();
@@ -85,6 +127,73 @@ public class PushFacade {
                 }
             }
         }
+        //诊断 map
+        if(featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Disease.getKey()))){
+            if (ListUtil.isNotEmpty(dis)) {
+                List<String> nameList = dis.stream().map(featureRate -> featureRate.getFeatureName()).collect(Collectors.toList());
+                Map<String, List<ConceptPushDTO>> disMapDTO = new LinkedHashMap<>();
+                Map<String, List<FeatureRate>> disFeatureMap = new LinkedHashMap<>();
+                //警惕
+                Map<String, String> highRiskMap = new HashMap<>();
+                highRiskMap.put("disease", String.join(",", nameList));
+                SearchData searchData = new SearchData();
+                searchData.setDiag(String.join(",", nameList));
+                GdbResponse graphRes = clinicalFacade.highRiskPageData(searchVo);
+                if (graphRes!=null) {
+                    Map<String, String> graphResult = graphRes.getResult();
+                    if (graphResult.size() > 0) {
+                        List<String> hrNameList = Lists.newLinkedList();
+                        for (Map.Entry<String, String> entry : graphResult.entrySet()) {
+                            if (entry.getValue().equals("1")) {
+                                hrNameList.add(entry.getKey());
+                            }
+                        }
+                        List<Concept> concepts = conceptFacade.getListByNamesAndType(hrNameList, ParamConvertUtil.conceptConvert2Lib(ConceptTypeEnum.Disease.getKey()));
+                        if (ListUtil.isNotEmpty(concepts)) {
+                            List<ConceptPushDTO> hrDisDTO = getConceptDTOList(concepts, LexiconTypeEnum.PACS_ITEMS.getKey());
+                            disMapDTO.put("警惕", hrDisDTO);
+                        }
+                    }
+                }
+                //诊断分类
+                for (FeatureRate featureRate : dis) {
+                    if (StringUtil.isBlank(featureRate.getDesc())) {
+                        featureRate.setDesc("{\"可能诊断\":\"\"}");
+                    }
+                    Map<String, Object> descMap = FastJsonUtils.getJsonToMap(featureRate.getDesc());
+                    for (String disClass : descMap.keySet()) {
+                        List<FeatureRate> featureRateList = Lists.newLinkedList();
+                        if (disFeatureMap.get(disClass) != null) {
+                            featureRateList = disFeatureMap.get(disClass);
+                        }
+                        featureRateList.add(featureRate);
+                        disFeatureMap.put(disClass, featureRateList);
+                    }
+                }
+                for (Map.Entry<String, List<FeatureRate>> entry : disFeatureMap.entrySet()) {
+                    List<String> nameListByDisClass = entry.getValue().stream().map(featureRate -> featureRate.getFeatureName()).collect(Collectors.toList());
+                    List<Concept> concepts = conceptFacade.getListByNamesAndType(nameListByDisClass, ParamConvertUtil.conceptConvert2Lib(ConceptTypeEnum.Disease.getKey()));
+                    if (ListUtil.isNotEmpty(concepts)) {
+                        List<ConceptPushDTO> disDTO = getConceptDTOList(concepts, LexiconTypeEnum.PACS_ITEMS.getKey());
+                        disMapDTO.put(entry.getKey(), disDTO);
+                    }
+                }
+                pushDTO.setDis(disMapDTO);
+            }
+
+        }
+
+    }
+
+    public Map<String, Object>  getTreatment(SearchVo searchVo) {
+        Map<String, Object> treatDTO = new LinkedHashMap<>();
+        ResponseData data = clinicalFacade.processClinicalData(searchVo);
+        Map<String, JSONObject> treat = data.getTreat();
+        if (StringUtil.isBlank(searchVo.getDiseaseName())) {
+            throw new CommonException(CommonErrorCode.PARAM_ERROR, "请输入需获取治疗方案的诊断名称");
+        }
+        //Map<String, Object> treatmentMap = treatmentFacade.getTreatment(treat, pushVO.getDiseaseId(), pushVO.getPatientId());
+        return treatDTO;
     }
 
     /**

+ 91 - 0
aipt-service/src/main/java/com/diagbot/facade/TreatmentFacade.java

@@ -0,0 +1,91 @@
+package com.diagbot.facade;
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.dto.ConceptDetailDTO;
+import com.diagbot.entity.Concept;
+import com.diagbot.entity.ConceptDetail;
+import com.diagbot.enums.IntroducePositionEnum;
+import com.diagbot.enums.LexiconTypeEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.vo.ConceptBaseVO;
+import com.diagbot.vo.ConceptIntroduceVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:治疗方案业务处理
+ * @Author:zhaops
+ * @time: 2019/5/8 17:16
+ */
+@Component
+public class TreatmentFacade {
+    @Autowired
+    ConceptFacade conceptFacade;
+    @Autowired
+    ConceptDetailFacade conceptDetailFacade;
+
+
+    /**
+     * 获取治疗方案
+     *
+     * @param
+     * @return
+     */
+    public Map<String, Object> getTreatment(Map<String, JSONObject> treatmentMap, String diseaseName) {
+        Map<String, Object> retMap = new LinkedHashMap<>();
+        QueryWrapper<Concept> conceptQueryWrapper=new QueryWrapper<>();
+        ConceptBaseVO conceptBaseVO=new ConceptBaseVO();
+        conceptBaseVO.setName(diseaseName);
+        conceptBaseVO.setLibType(LexiconTypeEnum.DIAGNOSIS.getKey());
+        Concept disease =conceptFacade.exist(conceptBaseVO);
+        if (disease == null) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "诊断不存在");
+        }
+        if (treatmentMap==null||treatmentMap.size() == 0) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "未找到治疗方案");
+        }
+        if (!treatmentMap.containsKey(diseaseName)) {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "诊断名不在诊断列表中");
+        }
+
+        //一般治疗
+        ConceptIntroduceVO conceptIntroduceVO=new ConceptIntroduceVO();
+        conceptIntroduceVO.setName(diseaseName);
+        conceptIntroduceVO.setLibType(LexiconTypeEnum.DIAGNOSIS.getKey());
+        conceptIntroduceVO.setPosition(IntroducePositionEnum.CommonTreatment.getKey());
+        List<ConceptDetail> commonTreatmentDetailList=conceptDetailFacade.getConceptDetailList(conceptIntroduceVO);
+        ConceptDetailDTO commonDetailDTO=new ConceptDetailDTO();
+        if (ListUtil.isNotEmpty(commonTreatmentDetailList)) {
+            BeanUtil.copyProperties(commonTreatmentDetailList.get(0), commonDetailDTO);
+        }
+        retMap.put("commonTreatment", commonDetailDTO);
+
+        //手术治疗
+        conceptIntroduceVO.setPosition(IntroducePositionEnum.SurgeryTreatment.getKey());
+        List<ConceptDetail> surgeryTreatmentDetailList = conceptDetailFacade.getConceptDetailList(conceptIntroduceVO);
+        ConceptDetailDTO surgeryDetailDTO = new ConceptDetailDTO();
+        if (ListUtil.isNotEmpty(surgeryTreatmentDetailList)) {
+            BeanUtil.copyProperties(surgeryTreatmentDetailList.get(0), surgeryDetailDTO);
+        }
+        retMap.put("surgeryTreatment", surgeryDetailDTO);
+
+
+        //获取知识图谱治疗方案
+        JSONObject treatmentJson = treatmentMap.get(diseaseName);
+        if (treatmentJson == null || treatmentJson.isEmpty()) {
+            return retMap;
+        }
+
+
+        return retMap;
+    }
+
+}

+ 27 - 0
aipt-service/src/main/java/com/diagbot/mapper/EvaluationMapper.java

@@ -0,0 +1,27 @@
+package com.diagbot.mapper;
+
+import com.diagbot.dto.EvaluationDTO;
+import com.diagbot.entity.Evaluation;
+import com.diagbot.vo.EvaluationdiseaseNameVO;
+
+import java.util.List;
+
+import javax.validation.Valid;
+
+import org.apache.ibatis.annotations.Param;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 管理与评估模板表 Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2019-05-06
+ */
+public interface EvaluationMapper extends BaseMapper<Evaluation> {
+
+	List<EvaluationDTO> getEvaluationModule(@Param("evaluationModule") EvaluationdiseaseNameVO evaluationdiseaseNameVO);
+
+}

+ 26 - 0
aipt-service/src/main/java/com/diagbot/mapper/IndexConfigMapper.java

@@ -0,0 +1,26 @@
+package com.diagbot.mapper;
+
+import com.diagbot.dto.IndexConfigDTO;
+import com.diagbot.entity.IndexConfig;
+import com.diagbot.vo.IndexConfigdiseaseNameVO;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Param;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 指标配置 Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2019-05-06
+ */
+public interface IndexConfigMapper extends BaseMapper<IndexConfig> {
+
+	List<IndexConfigDTO> getIndexConfig(@Param("indexConfig") Map<String, Object> indexConfigMap);
+
+}

+ 25 - 0
aipt-service/src/main/java/com/diagbot/service/EvaluationService.java

@@ -0,0 +1,25 @@
+package com.diagbot.service;
+
+import com.diagbot.dto.EvaluationDTO;
+import com.diagbot.entity.Evaluation;
+import com.diagbot.vo.EvaluationdiseaseNameVO;
+
+import java.util.List;
+
+import javax.validation.Valid;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 管理与评估模板表 服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2019-05-06
+ */
+public interface EvaluationService extends IService<Evaluation> {
+
+	List<EvaluationDTO> getEvaluationModule(@Valid EvaluationdiseaseNameVO evaluationdiseaseNameVO);
+
+}

+ 24 - 0
aipt-service/src/main/java/com/diagbot/service/IndexConfigService.java

@@ -0,0 +1,24 @@
+package com.diagbot.service;
+
+import com.diagbot.dto.IndexConfigDTO;
+import com.diagbot.entity.IndexConfig;
+import com.diagbot.vo.IndexConfigdiseaseNameVO;
+
+import java.util.List;
+import java.util.Map;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 指标配置 服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2019-05-06
+ */
+public interface IndexConfigService extends IService<IndexConfig> {
+
+	List<IndexConfigDTO> getIndexConfig(Map<String, Object> indexConfigMap);
+
+}

+ 33 - 0
aipt-service/src/main/java/com/diagbot/service/impl/EvaluationServiceImpl.java

@@ -0,0 +1,33 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.dto.EvaluationDTO;
+import com.diagbot.entity.Evaluation;
+import com.diagbot.mapper.EvaluationMapper;
+import com.diagbot.service.EvaluationService;
+import com.diagbot.vo.EvaluationdiseaseNameVO;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import java.util.List;
+
+import javax.validation.Valid;
+
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 管理与评估模板表 服务实现类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2019-05-06
+ */
+@Service
+public class EvaluationServiceImpl extends ServiceImpl<EvaluationMapper, Evaluation> implements EvaluationService {
+
+	@Override
+	public List<EvaluationDTO> getEvaluationModule(@Valid EvaluationdiseaseNameVO evaluationdiseaseNameVO) {
+		
+		return baseMapper.getEvaluationModule(evaluationdiseaseNameVO);
+	}
+
+}

+ 31 - 0
aipt-service/src/main/java/com/diagbot/service/impl/IndexConfigServiceImpl.java

@@ -0,0 +1,31 @@
+package com.diagbot.service.impl;
+
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.IndexConfigDTO;
+import com.diagbot.entity.IndexConfig;
+import com.diagbot.mapper.IndexConfigMapper;
+import com.diagbot.service.IndexConfigService;
+
+/**
+ * <p>
+ * 指标配置 服务实现类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2019-05-06
+ */
+@Service
+public class IndexConfigServiceImpl extends ServiceImpl<IndexConfigMapper, IndexConfig> implements IndexConfigService {
+
+	@Override
+	public List<IndexConfigDTO> getIndexConfig(Map<String, Object> indexConfigMap) {
+		// TODO Auto-generated method stub
+		return baseMapper.getIndexConfig(indexConfigMap);
+	}
+
+}

+ 7 - 0
aipt-service/src/main/java/com/diagbot/util/ParamConvertUtil.java

@@ -2,6 +2,7 @@ package com.diagbot.util;
 
 import com.diagbot.enums.ConceptTypeEnum;
 import com.diagbot.enums.LexiconTypeEnum;
+import org.apache.ibatis.javassist.compiler.Lex;
 
 /**
  * @Description:参数转换
@@ -32,6 +33,9 @@ public class ParamConvertUtil {
             case Lis:
                 libType = LexiconTypeEnum.LIS_PACKAGE.getKey();
                 break;
+            case LIS_TABLES:
+                libType = LexiconTypeEnum.LIS_TABLES.getKey();
+                break;
             case Pacs:
                 libType = LexiconTypeEnum.PACS_ITEMS.getKey();
                 break;
@@ -83,6 +87,9 @@ public class ParamConvertUtil {
             case LIS_PACKAGE:
                 type = ConceptTypeEnum.Lis.getKey();
                 break;
+            case LIS_TABLES:
+                type = ConceptTypeEnum.LIS_TABLES.getKey();
+                break;
             case PACS_ITEMS:
                 type = ConceptTypeEnum.Pacs.getKey();
                 break;

+ 18 - 0
aipt-service/src/main/java/com/diagbot/vo/EvaluationdiseaseNameVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年5月6日 下午5:11:54
+ */
+@Setter
+@Getter
+public class EvaluationdiseaseNameVO {
+
+	private String diseaseName;
+	
+}

+ 23 - 0
aipt-service/src/main/java/com/diagbot/vo/GetDiseaseIcdVO.java

@@ -0,0 +1,23 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @author: wangyu
+ * @time: 2019/2/14 14:56
+ */
+@Getter
+@Setter
+public class GetDiseaseIcdVO {
+    //疾病名称
+    @NotBlank(message="疾病名称必传")
+    private String disNames;
+    //医院编码
+    @NotBlank(message="医院编码必传")
+    private String hospitalCode;
+}

+ 56 - 0
aipt-service/src/main/java/com/diagbot/vo/GetTopPatientInfoVO.java

@@ -0,0 +1,56 @@
+package com.diagbot.vo;
+
+import javax.validation.constraints.NotBlank;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description
+ * @author rgb
+ * @time 2018年11月19日下午4:58:37
+ */
+@ApiModel(value="页面顶部病人医生科室信息查询接口传参")
+@Getter
+@Setter
+public class GetTopPatientInfoVO {
+	
+	/**
+	 * 医院编号
+	 */
+	@ApiModelProperty(value="医院编号",required=true)
+	@NotBlank(message="医院编号必填")
+	private String hospitalCode;
+	
+	/**
+	 * 医院科室编号
+	 */
+	@ApiModelProperty(value="医院科室编号",required=true)
+	@NotBlank(message="医院科室编号必填")
+	private String hospitalDeptCode;
+	
+	/**
+	 * 医院医生编号
+	 */
+	@ApiModelProperty(value="医院医生编号",required=true)
+	@NotBlank(message="医院医生编号必填")
+	private String doctorCode;
+	
+	/**
+	 * 医院患者编号
+	 */
+	@ApiModelProperty(value="医院患者编号",required=true)
+	@NotBlank(message="医院患者编号必填")
+	private String patientCode;
+	
+	/**
+	 * 门诊号
+	 */
+	@ApiModelProperty(value="门诊号",required=true)
+	@NotBlank(message="门诊号必填")
+	private String recordId;
+	
+
+}

+ 16 - 0
aipt-service/src/main/java/com/diagbot/vo/IndexConfigdiseaseNameVO.java

@@ -0,0 +1,16 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年5月6日 下午6:41:38
+ */
+@Setter
+@Getter
+public class IndexConfigdiseaseNameVO {
+	private String diseaseName;
+}

+ 35 - 0
aipt-service/src/main/java/com/diagbot/vo/IndexDataFindVO.java

@@ -0,0 +1,35 @@
+package com.diagbot.vo;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年5月7日 上午10:00:15
+ */
+@Getter
+@Setter
+public class IndexDataFindVO {
+
+	/**
+	 * 疾病ID
+	 */
+	@NotNull(message = "请输入疾病名")
+	private String diseaseName;
+	/**
+	 * 患者id
+	 */
+	@NotNull(message = "请输入患者id")
+	private Long patientId;
+
+	@NotBlank(message = "请输入开始时间")
+	private String startTime;
+
+	@NotBlank(message = "请输入结束时间")
+	private String endTime;
+}

+ 33 - 0
aipt-service/src/main/java/com/diagbot/vo/IndexDataSaveVO.java

@@ -0,0 +1,33 @@
+package com.diagbot.vo;
+
+import java.util.List;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+import lombok.Getter;
+import lombok.Setter;
+@Setter
+@Getter
+public class IndexDataSaveVO {
+	 /**
+     * 患者id
+     */
+	@NotNull(message = "请输入患者id")
+    private Long patientId;
+
+    /**
+     * 就诊号
+     */
+	@NotBlank(message = "请输入就诊号")
+    private String inquiryCode;
+	 /**
+     * 医生id
+     */
+	@NotNull(message = "请输入医生id")
+    private Long doctorId;
+    /**
+     * 指标值
+     */
+	private List<IndexDataVO> IndexData;
+}

+ 48 - 0
aipt-service/src/main/java/com/diagbot/vo/IndexDataVO.java

@@ -0,0 +1,48 @@
+package com.diagbot.vo;
+
+import java.util.Date;
+import java.util.List;
+
+import javax.validation.constraints.NotBlank;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年5月7日 上午10:05:39
+ */
+@Setter
+@Getter
+public class IndexDataVO {
+	/**
+     * 指标公表名
+     */
+	@NotBlank(message = "请输入指标公表名")
+    private String indexUnique;
+
+    /**
+     * 指标值
+     */
+	@NotBlank(message = "指标值")
+    private String indexValue;
+
+    /**
+     * 指标单位
+     */
+    private String indexUnit;
+
+    /**
+     * 是否异常
+     */
+    private Integer isAbnormal;
+
+    /**
+     * 化验时间
+     */
+    @NotBlank(message = "请输入化验时间")
+    private String creatTime;
+
+}

+ 19 - 0
aipt-service/src/main/java/com/diagbot/vo/IndexDataiIds.java

@@ -0,0 +1,19 @@
+package com.diagbot.vo;
+
+import java.util.List;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年5月8日 下午6:54:28
+ */
+@Setter
+@Getter
+public class IndexDataiIds extends IndexDataFindVO{
+
+	private List<Long> ids;
+}

+ 8 - 6
icss-service/src/main/java/com/diagbot/web/TranDiseaseIcdController.java

@@ -2,9 +2,9 @@ package com.diagbot.web;
 
 
 import com.diagbot.annotation.SysLogger;
-import com.diagbot.dto.GetDiseaseIcdDTO;
+import com.diagbot.dto.DiseaseIcdDTO;
 import com.diagbot.dto.RespDTO;
-import com.diagbot.facade.TranDiseaseIcdFacade;
+import com.diagbot.facade.DiseaseIcdFacade;
 import com.diagbot.vo.GetDiseaseIcdVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.annotations.ApiIgnore;
 
 import javax.validation.Valid;
 import java.util.List;
@@ -29,17 +30,18 @@ import java.util.List;
 @RequestMapping("/diseaseIcd")
 @Api(value = "对应的诊断icd API", tags = { "对应的诊断icd API" })
 @SuppressWarnings("unchecked")
-public class TranDiseaseIcdController {
+public class DiseaseIcdController {
     @Autowired
-    TranDiseaseIcdFacade tranDiseaseIcdFacade;
+    DiseaseIcdFacade diseaseIcdFacade;
 
     @ApiOperation(value = "各医院对应的诊断icd——查询[by:wangyu]",
             notes = "questions:疾病id,必填<br>" +
                     "hospitalCode:医院编号,必填<br>")
     @PostMapping("/getDiseaseIcds")
     @SysLogger("getDiseaseIcds")
-    public RespDTO<List<GetDiseaseIcdDTO>> getDiseaseIcds(@RequestBody @Valid GetDiseaseIcdVO getDiseaseIcdVO) {
-        List<GetDiseaseIcdDTO> data = tranDiseaseIcdFacade.getDiseaseIcds(getDiseaseIcdVO);
+    @ApiIgnore
+    public RespDTO<List<DiseaseIcdDTO>> getDiseaseIcds(@RequestBody @Valid GetDiseaseIcdVO getDiseaseIcdVO) {
+        List<DiseaseIcdDTO> data = diseaseIcdFacade.getDiseaseIcds(getDiseaseIcdVO);
         return RespDTO.onSuc(data);
     }
 }

+ 44 - 0
aipt-service/src/main/java/com/diagbot/web/EvaluationController.java

@@ -0,0 +1,44 @@
+package com.diagbot.web;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.EvaluationDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.EvaluationFacade;
+import com.diagbot.vo.EvaluationdiseaseNameVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * <p>
+ * 管理与评估模板表 前端控制器
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2019-05-06
+ */
+@RestController
+@RequestMapping("/evaluation")
+@Api(value = "管理与评估模板API[by:wangfeng]", tags = { "知识库标准化-管理与评估模板API" })
+@SuppressWarnings("unchecked")
+public class EvaluationController {
+
+    @Autowired
+    EvaluationFacade evaluationFacade;
+
+    @ApiOperation(value = "获取管理与评估模板[by:wangfeng]", notes = "获取管理与评估模板")
+    @PostMapping("/getEvaluationModules")
+    @SysLogger("getEvaluationModules")
+    public RespDTO<List<EvaluationDTO>> getEvaluationModules(@Valid @RequestBody EvaluationdiseaseNameVO evaluationdiseaseNameVO) {
+        List<EvaluationDTO> data = evaluationFacade.getEvaluationModule(evaluationdiseaseNameVO);
+        return RespDTO.onSuc(data);
+    }
+
+}

+ 44 - 0
aipt-service/src/main/java/com/diagbot/web/IndexConfigController.java

@@ -0,0 +1,44 @@
+package com.diagbot.web;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.IndexConfigDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.IndexConfigFacade;
+import com.diagbot.vo.IndexConfigdiseaseNameVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 指标配置 前端控制器
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2019-05-06
+ */
+@RestController
+@RequestMapping("/indexConfig")
+@Api(value = "指标配置API[by:wangfeng]", tags = { "知识库标准化-指标配置API" })
+@SuppressWarnings("unchecked")
+@ApiIgnore
+public class IndexConfigController {
+
+    @Autowired
+    IndexConfigFacade indexConfigFacade;
+
+    @ApiOperation(value = "知识库标准化-根据疾病获取指标配置[by:wangfeng]", notes = "根据疾病获取指标配置")
+    @PostMapping("/getindexConfigs")
+    @SysLogger("getindexConfigs")
+    public RespDTO<List<IndexConfigDTO>> getindexConfigs(@RequestBody IndexConfigdiseaseNameVO indexConfigdiseaseNameVO) {
+        List<IndexConfigDTO> data = indexConfigFacade.getIndexConfig(indexConfigdiseaseNameVO.getDiseaseName());
+        return RespDTO.onSuc(data);
+    }
+}

+ 49 - 0
aipt-service/src/main/java/com/diagbot/web/PatientInfoController.java

@@ -0,0 +1,49 @@
+package com.diagbot.web;
+
+import javax.validation.Valid;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.GetTopPatientInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.PatientInfoFacade;
+import com.diagbot.vo.GetTopPatientInfoVO;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import springfox.documentation.annotations.ApiIgnore;
+
+/**
+ * <p>
+ * 患者信息表 前端控制器
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-11-19
+ */
+@RestController
+@RequestMapping("/patientInfo")
+@Api(value = "患者信息API", tags = { "知识库标准化-患者信息API" })
+@SuppressWarnings("unchecked")
+@ApiIgnore
+public class PatientInfoController {
+    @Autowired
+    private PatientInfoFacade patientInfoFacade;
+
+    @ApiOperation(value = "知识库标准化-页面顶部病人医生科室信息——查询[by:rengb]",
+            notes = "hospitalCode:医院编号,必填<br>" +
+                    "hospitalDeptCode:医院科室编号,必填<br>" +
+                    "doctorCode:医院医生编号,必填<br>" +
+                    "patientCode:医院患者编号,必填<br>")
+    @PostMapping("/getTopPatientInfo")
+    @SysLogger("getTopPatientInfo")
+    public RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(@Valid @RequestBody GetTopPatientInfoVO getTopPatientInfoVO) {
+        return RespDTO.onSuc(patientInfoFacade.getTopPatientInfo(getTopPatientInfoVO));
+    }
+
+}

+ 37 - 0
aipt-service/src/main/resources/mapper/EvaluationMapper.xml

@@ -0,0 +1,37 @@
+<?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.EvaluationMapper">
+
+	<!-- 通用查询映射结果 -->
+	<resultMap id="BaseResultMap" type="com.diagbot.entity.Evaluation">
+		<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="concept_id" property="conceptId" />
+		<result column="region_name" property="regionName" />
+		<result column="region_type" property="regionType" />
+		<result column="order_no" property="orderNo" />
+		<result column="remark" property="remark" />
+	</resultMap>
+
+	<select id="getEvaluationModule" resultType="com.diagbot.dto.EvaluationDTO">
+		SELECT
+		b.lib_name AS diseaseName,
+		a.concept_id AS conceptId,
+		a.region_name AS regionName,
+		a.region_type AS regionType,
+		a.order_no AS orderNo
+		FROM
+		kl_evaluation a
+		JOIN kl_concept b
+		ON b.id = a.concept_id and b.is_deleted = "N"
+		WHERE a.is_deleted = "N"
+		AND b.lib_type = 18
+		<if test="evaluationModule.diseaseName != null">
+		AND b.lib_name  LIKE CONCAT('%', #{evaluationModule.diseaseName}, '%')
+		</if>
+	</select>
+</mapper>

+ 38 - 0
aipt-service/src/main/resources/mapper/IndexConfigMapper.xml

@@ -0,0 +1,38 @@
+<?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.IndexConfigMapper">
+
+	<!-- 通用查询映射结果 -->
+	<resultMap id="BaseResultMap" type="com.diagbot.entity.IndexConfig">
+		<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="concept_id" property="conceptId" />
+		<result column="disease_id" property="diseaseId" />
+		<result column="index_desc" property="indexDesc" />
+		<result column="order_no" property="orderNo" />
+		<result column="remark" property="remark" />
+	</resultMap>
+	<select id="getIndexConfig" resultType="com.diagbot.dto.IndexConfigDTO">
+		SELECT
+		a.concept_id AS uniqueId,
+		a.disease_id AS diseaseId,
+		a.index_desc AS groupType,
+		a.order_no AS orderNo,
+		b.lib_name AS indexUnique,
+		c.lib_name AS diseaseName
+		FROM kl_index_config a
+		LEFT JOIN kl_concept b ON a.concept_id = b.id and  b.is_deleted ="N"
+		LEFT JOIN kl_concept c ON a.disease_id = c.id and  c.is_deleted ="N"
+		WHERE a.is_deleted ="N"
+		and b.lib_type = 46
+		and c.lib_type = 18
+		<if test="indexConfig.diseaseName != ''">
+		AND c.lib_name =  #{indexConfig.diseaseName}
+		</if>
+		 
+	</select>
+</mapper>

+ 2 - 1
docs/009.20190425知识库标准化脚本/init_cloud_service.sql

@@ -1,4 +1,5 @@
 -- 高达明
 use `sys-tran`;
 ALTER TABLE `tran_hospital_dept` CHANGE `icss_dept_name` `concept_dept_name` varchar(200) DEFAULT NULL COMMENT '朗通科室名称';
-ALTER TABLE `tran_disease_icd` CHANGE `icss_question_name` `concept_dis_name` varchar(200) DEFAULT NULL COMMENT '朗通疾病名称';
+ALTER TABLE `tran_disease_icd` CHANGE `icss_question_name` `concept_dis_name` varchar(200) DEFAULT NULL COMMENT '朗通疾病名称';
+ALTER TABLE `tran_disease_icd` MODIFY COLUMN `disease_name` varchar(200) DEFAULT NULL COMMENT 'HIS疾病名称';

+ 23 - 0
icss-service/src/main/java/com/diagbot/client/AiptServiceClient.java

@@ -10,12 +10,17 @@ import com.diagbot.dto.ConceptIntroduceDTO;
 import com.diagbot.dto.DeptInfoDTO;
 import com.diagbot.dto.DisScaleDTO;
 import com.diagbot.dto.DisTypeDTO;
+import com.diagbot.dto.DiseaseIcdDTO;
+import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.ScaleContent;
 import com.diagbot.vo.ConceptIntroduceVO;
 import com.diagbot.vo.ConceptUsualVO;
 import com.diagbot.vo.DeptInfoVO;
 import com.diagbot.vo.DisScaleVO;
+import com.diagbot.vo.GetDiseaseIcdVO;
+import com.diagbot.vo.GetTopPatientInfoVO;
+
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -64,4 +69,22 @@ public interface AiptServiceClient {
 
     @PostMapping(value = "/deptInfo/getDeptInfo")
     RespDTO<DeptInfoDTO> getDeptInfo(@Valid @RequestBody DeptInfoVO deptInfoVO);
+
+    /**
+     * 根据医院编号疾病概念名称获取各医院对应的诊断icd
+     *
+     * @param getDiseaseIcdVO
+     * @return
+     */
+    @PostMapping("/diseaseIcd/getDiseaseIcds")
+    RespDTO<List<DiseaseIcdDTO>> getDiseaseIcds(@RequestBody GetDiseaseIcdVO getDiseaseIcdVO);
+    
+    /**
+     * 获取页面顶部病人医生科室信息
+     *
+     * @param getTopPatientInfoVO
+     * @return
+     */
+    @PostMapping("/patientInfo/getTopPatientInfo")
+    RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(@RequestBody GetTopPatientInfoVO getTopPatientInfoVO);
 }

+ 7 - 30
icss-service/src/main/java/com/diagbot/client/TranServiceClient.java

@@ -1,10 +1,14 @@
 package com.diagbot.client;
 
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
 import com.diagbot.client.hystrix.TranServiceHystrix;
 import com.diagbot.dto.DoctorInfoDTO;
-import com.diagbot.dto.GetDiseaseIcdDTO;
-import com.diagbot.dto.GetTopPatientInfoDTO;
-import com.diagbot.dto.HospitalDeptInfoDTO;
 import com.diagbot.dto.HospitalInfoDTO;
 import com.diagbot.dto.LisConfigDTO;
 import com.diagbot.dto.PatientInfoDTO;
@@ -14,21 +18,12 @@ import com.diagbot.entity.DoctorInfo;
 import com.diagbot.entity.HospitalDept;
 import com.diagbot.entity.PatientInfo;
 import com.diagbot.vo.DoctorInfoVO;
-import com.diagbot.vo.GetDiseaseIcdVO;
-import com.diagbot.vo.GetTopPatientInfoVO;
 import com.diagbot.vo.HosCodeVO;
-import com.diagbot.vo.HospitalDeptInfoVO;
 import com.diagbot.vo.HospitalInfoVO;
 import com.diagbot.vo.LisHospitalCodeVO;
 import com.diagbot.vo.PatientInfoVO;
 import com.diagbot.vo.SaveInquiryToHisVO;
 import com.diagbot.vo.TranFieldInfoVO;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-
-import java.util.List;
-import java.util.Map;
 
 /**
  * @Description: 调用信息对接层服务
@@ -92,15 +87,6 @@ public interface TranServiceClient {
     @PostMapping("/patientInfo/getPatientInfo")
     RespDTO<PatientInfoDTO> getPatientInfo(@RequestBody PatientInfoVO patientInfoVO);
 
-    /**
-     * 获取页面顶部病人医生科室信息
-     *
-     * @param getTopPatientInfoVO
-     * @return
-     */
-    @PostMapping("/patientInfo/getTopPatientInfo")
-    RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(@RequestBody GetTopPatientInfoVO getTopPatientInfoVO);
-
     /**
      * 根据ids获取病人信息
      *
@@ -119,15 +105,6 @@ public interface TranServiceClient {
     @PostMapping("/tranFieldInfo/getInfoByUuid")
     RespDTO<List<TranFieldInfoDTO>> getInfoByUuid(@RequestBody TranFieldInfoVO tranFieldInfoVO);
 
-    /**
-     * 根据医院编号疾病id获取各医院对应的诊断icd
-     *
-     * @param getDiseaseIcdVO
-     * @return
-     */
-    @PostMapping("/diseaseIcd/getDiseaseIcds")
-    RespDTO<List<GetDiseaseIcdDTO>> getDiseaseIcds(@RequestBody GetDiseaseIcdVO getDiseaseIcdVO);
-
     /**
      * 将问诊保存的一些相关信息发送到对接层
      *

+ 33 - 8
icss-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java

@@ -1,5 +1,14 @@
 package com.diagbot.client.hystrix;
 
+import java.util.List;
+import java.util.Map;
+
+import javax.validation.Valid;
+
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
 import com.diagbot.client.AiptServiceClient;
 import com.diagbot.client.bean.CalculateData;
 import com.diagbot.client.bean.GdbResponse;
@@ -10,20 +19,18 @@ import com.diagbot.dto.ConceptIntroduceDTO;
 import com.diagbot.dto.DeptInfoDTO;
 import com.diagbot.dto.DisScaleDTO;
 import com.diagbot.dto.DisTypeDTO;
+import com.diagbot.dto.DiseaseIcdDTO;
+import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.ScaleContent;
 import com.diagbot.vo.ConceptIntroduceVO;
 import com.diagbot.vo.ConceptUsualVO;
 import com.diagbot.vo.DeptInfoVO;
 import com.diagbot.vo.DisScaleVO;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
+import com.diagbot.vo.GetDiseaseIcdVO;
+import com.diagbot.vo.GetTopPatientInfoVO;
 
-import javax.validation.Valid;
-import java.util.List;
-import java.util.Map;
+import lombok.extern.slf4j.Slf4j;
 
 /**
  * @Description:调用中间层服务
@@ -94,8 +101,26 @@ public class AiptServiceHystrix implements AiptServiceClient {
     }
 
     @Override
-    public RespDTO<DeptInfoDTO> getDeptInfo(@Valid @RequestBody DeptInfoVO deptInfoVO){
+    public RespDTO<DeptInfoDTO> getDeptInfo(@Valid @RequestBody DeptInfoVO deptInfoVO) {
         log.error("【hystrix】调用{}异常", "getDeptInfo");
         return null;
     }
+
+    /**
+     * 根据医院编号疾病概念名称获取各医院对应的诊断icd
+     *
+     * @param getDiseaseIcdVO
+     * @return
+     */
+    @Override
+    public RespDTO<List<DiseaseIcdDTO>> getDiseaseIcds(@RequestBody GetDiseaseIcdVO getDiseaseIcdVO) {
+        log.error("【hystrix】调用{}异常", "getDiseaseIcds");
+        return null;
+    }
+    
+    @Override
+    public RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(GetTopPatientInfoVO getTopPatientInfoVO) {
+        log.error("【hystrix】调用{}异常", "getTopPatientInfo");
+        return null;
+    }
 }

+ 9 - 24
icss-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java

@@ -1,10 +1,15 @@
 package com.diagbot.client.hystrix;
 
+import java.util.List;
+import java.util.Map;
+
+import javax.validation.Valid;
+
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
 import com.diagbot.client.TranServiceClient;
 import com.diagbot.dto.DoctorInfoDTO;
-import com.diagbot.dto.GetDiseaseIcdDTO;
-import com.diagbot.dto.GetTopPatientInfoDTO;
-import com.diagbot.dto.HospitalDeptInfoDTO;
 import com.diagbot.dto.HospitalInfoDTO;
 import com.diagbot.dto.LisConfigDTO;
 import com.diagbot.dto.PatientInfoDTO;
@@ -14,22 +19,14 @@ import com.diagbot.entity.DoctorInfo;
 import com.diagbot.entity.HospitalDept;
 import com.diagbot.entity.PatientInfo;
 import com.diagbot.vo.DoctorInfoVO;
-import com.diagbot.vo.GetDiseaseIcdVO;
-import com.diagbot.vo.GetTopPatientInfoVO;
 import com.diagbot.vo.HosCodeVO;
-import com.diagbot.vo.HospitalDeptInfoVO;
 import com.diagbot.vo.HospitalInfoVO;
 import com.diagbot.vo.LisHospitalCodeVO;
 import com.diagbot.vo.PatientInfoVO;
 import com.diagbot.vo.SaveInquiryToHisVO;
 import com.diagbot.vo.TranFieldInfoVO;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.RequestBody;
 
-import javax.validation.Valid;
-import java.util.List;
-import java.util.Map;
+import lombok.extern.slf4j.Slf4j;
 
 /**
  * @Description: 调用信息对接层服务
@@ -75,12 +72,6 @@ public class TranServiceHystrix implements TranServiceClient {
         return null;
     }
 
-    @Override
-    public RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(GetTopPatientInfoVO getTopPatientInfoVO) {
-        log.error("【hystrix】调用{}异常", "getTopPatientInfo");
-        return null;
-    }
-
     @Override
     public RespDTO<Map<Long, PatientInfo>> patientInfoMapByIds(List<Long> ids) {
         log.error("【hystrix】调用{}异常", "patientInfoMapByIds");
@@ -93,12 +84,6 @@ public class TranServiceHystrix implements TranServiceClient {
         return null;
     }
 
-    @Override
-    public RespDTO<List<GetDiseaseIcdDTO>> getDiseaseIcds(GetDiseaseIcdVO getDiseaseIcdVO) {
-        log.error("【hystrix】调用{}异常", "getDiseaseIcds");
-        return null;
-    }
-
     @Override
     public RespDTO<Boolean> saveInquiryToHis(SaveInquiryToHisVO saveInquiryToHisVO) {
         log.error("【hystrix】调用{}异常", "saveInquiryToHis");

+ 38 - 0
icss-service/src/main/java/com/diagbot/dto/DiseaseIcdDTO.java

@@ -0,0 +1,38 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: wangyu
+ * @time: 2019/2/14 14:59
+ */
+@Getter
+@Setter
+public class DiseaseIcdDTO {
+    /**
+     * 医院编码
+     */
+    private String hospitalCode;
+
+    /**
+     * HIS疾病名称
+     */
+    private String diseaseName;
+
+    /**
+     * icd编码
+     */
+    private String icd;
+
+    /**
+     * 朗通疾病概念id
+     */
+    private Long conceptId;
+
+    /**
+     * 朗通疾病名称
+     */
+    private String conceptDisName;
+}

+ 0 - 142
icss-service/src/main/java/com/diagbot/entity/User.java

@@ -1,142 +0,0 @@
-package com.diagbot.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * <p>
- * 系统用户表
- * </p>
- *
- * @author gaodm
- * @since 2018-08-30
- */
-@TableName("sys_user")
-public class User implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 用户ID
-     */
-    @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;
-
-    /**
-     * 用户密码
-     */
-    private String password;
-
-    /**
-     * 用户名
-     */
-    private String username;
-
-
-    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 String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public String getUsername() {
-        return username;
-    }
-
-    public void setUsername(String username) {
-        this.username = username;
-    }
-
-    @Override
-    public String toString() {
-        return "User{" +
-                "id=" + id +
-                ", isDeleted=" + isDeleted +
-                ", gmtCreate=" + gmtCreate +
-                ", gmtModified=" + gmtModified +
-                ", creator=" + creator +
-                ", modifier=" + modifier +
-                ", password=" + password +
-                ", username=" + username +
-                "}";
-    }
-}

+ 35 - 0
icss-service/src/main/java/com/diagbot/facade/DiseaseIcdFacade.java

@@ -0,0 +1,35 @@
+package com.diagbot.facade;
+
+import com.diagbot.client.AiptServiceClient;
+import com.diagbot.dto.DiseaseIcdDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.GetDiseaseIcdVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: wangyu
+ * @time: 2019/2/14 15:25
+ */
+@Component
+public class DiseaseIcdFacade {
+
+    @Autowired
+    AiptServiceClient aiptServiceClient;
+
+    /**
+     * 根据医院编号和诊断ids获取各自的icd编码
+     *
+     * @param getDiseaseIcdVO
+     * @return
+     */
+    public List<DiseaseIcdDTO> getDiseaseIcds(GetDiseaseIcdVO getDiseaseIcdVO) {
+        RespDTO<List<DiseaseIcdDTO>> res = aiptServiceClient.getDiseaseIcds(getDiseaseIcdVO);
+        RespDTOUtil.respNGDealCover(res, "获取icd编码失败");
+        return res.data;
+    }
+}

+ 1 - 1
icss-service/src/main/java/com/diagbot/facade/LisMappingFacade.java

@@ -3,7 +3,7 @@ package com.diagbot.facade;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.entity.LisMapping;
 import com.diagbot.enums.IsDeleteEnum;
-import com.diagbot.service.impl.impl.LisMappingServiceImpl;
+import com.diagbot.service.impl.LisMappingServiceImpl;
 import com.diagbot.util.EntityUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.StringUtil;

+ 12 - 20
icss-service/src/main/java/com/diagbot/facade/PatientInfoFacade.java

@@ -1,23 +1,24 @@
 package com.diagbot.facade;
 
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.client.AiptServiceClient;
 import com.diagbot.client.TranServiceClient;
 import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.PatientInfoDTO;
 import com.diagbot.dto.RespDTO;
-import com.diagbot.entity.DeptInfo;
 import com.diagbot.entity.DoctorPageMode;
 import com.diagbot.entity.PatientInfo;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.util.RespDTOUtil;
 import com.diagbot.vo.GetTopPatientInfoVO;
 import com.diagbot.vo.PatientInfoVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.RequestBody;
-
-import java.util.List;
-import java.util.Map;
 
 /**
  * @Description: 患者业务逻辑
@@ -30,9 +31,9 @@ public class PatientInfoFacade {
     @Autowired
     private DoctorPageModeFacade doctorPageModeFacade;
     @Autowired
-    private DeptInfoFacade deptInfoFacade;
-    @Autowired
     TranServiceClient tranServiceClient;
+    @Autowired
+    private AiptServiceClient aiptServiceClient;
 
     /**
      * 获取患者信息
@@ -53,20 +54,11 @@ public class PatientInfoFacade {
      * @return
      */
     public GetTopPatientInfoDTO getTopPatientInfo(@RequestBody GetTopPatientInfoVO getTopPatientInfoVO) {
-        RespDTO<GetTopPatientInfoDTO> respDTO = tranServiceClient.getTopPatientInfo(getTopPatientInfoVO);
-        RespDTOUtil.respNGDealCover(respDTO, "页面顶部病人医生科室信息");
+        RespDTO<GetTopPatientInfoDTO> respDTO = aiptServiceClient.getTopPatientInfo(getTopPatientInfoVO);
+        RespDTOUtil.respNGDealCover(respDTO, "获取页面顶部病人医生科室信息失败");
 
         GetTopPatientInfoDTO getTopPatientInfoDTO = respDTO.data;
 
-        QueryWrapper<DeptInfo> deptInfoQ = new QueryWrapper<>();
-        deptInfoQ.eq("is_deleted", IsDeleteEnum.N.getKey())
-                .eq("name", getTopPatientInfoDTO.getSelfDeptName());
-        DeptInfo deptInfo = deptInfoFacade.getOne(deptInfoQ);
-        if (null != deptInfo) {
-            getTopPatientInfoDTO.setSelfDeptName(deptInfo.getName());
-            getTopPatientInfoDTO.setSelfDeptId(deptInfo.getId());
-        }
-
         QueryWrapper<DoctorPageMode> doctorPageModeQe = new QueryWrapper<>();
         doctorPageModeQe.eq("is_deleted", IsDeleteEnum.N.getKey());
         doctorPageModeQe.eq("doctor_id", getTopPatientInfoDTO.getDoctorId());

+ 0 - 68
icss-service/src/main/java/com/diagbot/facade/TranDiseaseIcdFacade.java

@@ -1,68 +0,0 @@
-package com.diagbot.facade;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.diagbot.client.TranServiceClient;
-import com.diagbot.dto.GetDiseaseIcdDTO;
-import com.diagbot.dto.RespDTO;
-import com.diagbot.entity.QuestionInfo;
-import com.diagbot.enums.IsDeleteEnum;
-import com.diagbot.enums.QuestionTypeEnum;
-import com.diagbot.util.ListUtil;
-import com.diagbot.util.RespDTOUtil;
-import com.diagbot.vo.GetDiseaseIcdVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * @Description:
- * @author: wangyu
- * @time: 2019/2/14 15:25
- */
-@Component
-public class TranDiseaseIcdFacade {
-
-    @Autowired
-    TranServiceClient tranServiceClient;
-    @Autowired
-    QuestionFacade questionFacade;
-
-    /**
-     * 根据医院编号和诊断ids获取各自的icd编码
-     *
-     * @param getDiseaseIcdVO
-     * @return
-     */
-    public List<GetDiseaseIcdDTO> getDiseaseIcds(GetDiseaseIcdVO getDiseaseIcdVO) {
-        RespDTO<List<GetDiseaseIcdDTO>> getDiseaseIcdsList = tranServiceClient.getDiseaseIcds(getDiseaseIcdVO);
-        RespDTOUtil.respNGDealCover(getDiseaseIcdsList, "获取icd编码失败");
-
-        List<GetDiseaseIcdDTO> res = new ArrayList<>();
-
-        List<String> questionNames
-                = getDiseaseIcdsList.data.stream().map(getDiseaseIcdDTO -> getDiseaseIcdDTO.getConceptDisName()).collect(Collectors.toList());
-        if (ListUtil.isEmpty(questionNames)) {
-            return res;
-        }
-
-        QueryWrapper<QuestionInfo> questionInfoQueryWrapper = new QueryWrapper<>();
-        questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
-                .eq("type", QuestionTypeEnum.Disease.getKey())
-                .in("name", questionNames);
-
-        List<String> icssQuestionNames
-                = questionFacade.list(questionInfoQueryWrapper).stream()
-                .map(r -> r.getName()).collect(Collectors.toList());
-        if (ListUtil.isNotEmpty(icssQuestionNames)) {
-            for (GetDiseaseIcdDTO getDiseaseIcdDTO : getDiseaseIcdsList.data) {
-                if (icssQuestionNames.contains(getDiseaseIcdDTO.getConceptDisName())) {
-                    res.add(getDiseaseIcdDTO);
-                }
-            }
-        }
-        return res;
-    }
-}

+ 0 - 13
icss-service/src/main/java/com/diagbot/facade/VitalOrderFacade.java

@@ -1,13 +0,0 @@
-package com.diagbot.facade;
-
-import com.diagbot.service.impl.VitalOrderServiceImpl;
-import org.springframework.stereotype.Component;
-
-/**
- * @Description:
- * @Author:zhaops
- * @time: 2018/11/20 17:17
- */
-@Component
-public class VitalOrderFacade extends VitalOrderServiceImpl {
-}

+ 0 - 16
icss-service/src/main/java/com/diagbot/mapper/SysLogMapper.java

@@ -1,16 +0,0 @@
-package com.diagbot.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.diagbot.entity.SysLog;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author gaodm
- * @since 2018-08-02
- */
-public interface SysLogMapper extends BaseMapper<SysLog> {
-
-}

+ 0 - 16
icss-service/src/main/java/com/diagbot/mapper/VitalOrderMapper.java

@@ -1,16 +0,0 @@
-package com.diagbot.mapper;
-
-import com.diagbot.entity.VitalOrder;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-/**
- * <p>
- * 查体全局排序 Mapper 接口
- * </p>
- *
- * @author zhaops
- * @since 2018-11-15
- */
-public interface VitalOrderMapper extends BaseMapper<VitalOrder> {
-
-}

+ 0 - 16
icss-service/src/main/java/com/diagbot/service/VitalOrderService.java

@@ -1,16 +0,0 @@
-package com.diagbot.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.diagbot.entity.VitalOrder;
-
-/**
- * <p>
- * 查体全局排序 服务类
- * </p>
- *
- * @author zhaops
- * @since 2018-11-15
- */
-public interface VitalOrderService extends IService<VitalOrder> {
-
-}

+ 1 - 1
icss-service/src/main/java/com/diagbot/service/impl/impl/LisMappingServiceImpl.java

@@ -1,4 +1,4 @@
-package com.diagbot.service.impl.impl;
+package com.diagbot.service.impl;
 
 import com.diagbot.entity.LisMapping;
 import com.diagbot.mapper.LisMappingMapper;

+ 0 - 20
icss-service/src/main/java/com/diagbot/service/impl/VitalOrderServiceImpl.java

@@ -1,20 +0,0 @@
-package com.diagbot.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.diagbot.entity.VitalOrder;
-import com.diagbot.mapper.VitalOrderMapper;
-import com.diagbot.service.VitalOrderService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 查体全局排序 服务实现类
- * </p>
- *
- * @author zhaops
- * @since 2018-11-15
- */
-@Service
-public class VitalOrderServiceImpl extends ServiceImpl<VitalOrderMapper, VitalOrder> implements VitalOrderService {
-
-}

+ 1 - 1
icss-service/src/main/java/com/diagbot/vo/GetDiseaseIcdVO.java

@@ -12,7 +12,7 @@ import lombok.Setter;
 @Setter
 public class GetDiseaseIcdVO {
     //疾病名称
-    private String questions;
+    private String disNames;
     //医院编码
     private String hospitalCode;
 }

+ 1 - 1
icss-service/src/main/java/com/diagbot/web/DeptInfoController.java

@@ -29,7 +29,7 @@ import javax.validation.Valid;
 @RequestMapping("/deptInfo")
 @Api(value = "科室信息API", tags = { "科室信息API" })
 @SuppressWarnings("unchecked")
-//@ApiIgnore
+@ApiIgnore
 @Deprecated
 public class DeptInfoController {
 

+ 44 - 0
icss-service/src/main/java/com/diagbot/web/DiseaseIcdController.java

@@ -0,0 +1,44 @@
+package com.diagbot.web;
+
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.DiseaseIcdDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.DiseaseIcdFacade;
+import com.diagbot.vo.GetDiseaseIcdVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 各医院对应的诊断icd 前端控制器
+ * </p>
+ *
+ * @author wangyu
+ * @since 2019-02-14
+ */
+@RestController
+@RequestMapping("/diseaseIcd")
+@Api(value = "知识化标准化-对应的诊断icd API", tags = { "知识化标准化-对应的诊断icd API" })
+@SuppressWarnings("unchecked")
+public class DiseaseIcdController {
+    @Autowired
+    DiseaseIcdFacade diseaseIcdFacade;
+
+    @ApiOperation(value = "知识化标准化-各医院对应的诊断icd——查询[by:wangyu]",
+            notes = "questions:疾病id,必填<br>" +
+                    "hospitalCode:医院编号,必填<br>")
+    @PostMapping("/getDiseaseIcds")
+    @SysLogger("getDiseaseIcds")
+    public RespDTO<List<DiseaseIcdDTO>> getDiseaseIcds(@RequestBody GetDiseaseIcdVO getDiseaseIcdVO) {
+        List<DiseaseIcdDTO> data = diseaseIcdFacade.getDiseaseIcds(getDiseaseIcdVO);
+        return RespDTO.onSuc(data);
+    }
+}

+ 9 - 7
icss-service/src/main/java/com/diagbot/web/PatientInfoController.java

@@ -1,6 +1,14 @@
 package com.diagbot.web;
 
 
+import javax.validation.Valid;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.PatientInfoDTO;
@@ -8,17 +16,11 @@ import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.PatientInfoFacade;
 import com.diagbot.vo.GetTopPatientInfoVO;
 import com.diagbot.vo.PatientInfoVO;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
 import springfox.documentation.annotations.ApiIgnore;
 
-import javax.validation.Valid;
-
 /**
  * <p>
  * 患者信息表 前端控制器

+ 0 - 17
icss-service/src/main/resources/mapper/VitalOrderMapper.xml

@@ -1,17 +0,0 @@
-<?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.VitalOrderMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.diagbot.entity.VitalOrder">
-        <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="question_id" property="questionId" />
-        <result column="order_no" property="orderNo" />
-    </resultMap>
-
-</mapper>

+ 31 - 0
knowledgeman-service/src/main/java/com/diagbot/config/MultipartConfigurer.java

@@ -0,0 +1,31 @@
+package com.diagbot.config;
+
+import org.springframework.boot.web.servlet.MultipartConfigFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.util.unit.DataSize;
+
+import javax.servlet.MultipartConfigElement;
+
+/**
+ * @Description: 配置上传文件大小的配置
+ * @author: gaodm
+ * @time: 2019/5/9 11:18
+ */
+@Configuration
+public class MultipartConfigurer {
+    /**
+     * 配置上传文件大小的配置
+     *
+     * @return
+     */
+    @Bean
+    public MultipartConfigElement multipartConfigElement() {
+        MultipartConfigFactory factory = new MultipartConfigFactory();
+        //  单个数据大小
+        factory.setMaxFileSize(DataSize.ofMegabytes(500));
+        /// 总上传数据大小
+        factory.setMaxRequestSize(DataSize.ofMegabytes(500));
+        return factory.createMultipartConfig();
+    }
+}

+ 3 - 3
knowledgeman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -25,9 +25,9 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
         http
                 .csrf().disable()
                 .authorizeRequests()
-//                .regexMatchers(".*swagger.*", ".*v2.*", ".*webjars.*", "/druid.*", "/actuator.*", "/hystrix.*").permitAll()
-//                .antMatchers("/**").authenticated();
-                .antMatchers("/**").permitAll();
+                .regexMatchers(".*swagger.*", ".*v2.*", ".*webjars.*", "/druid.*", "/actuator.*", "/hystrix.*").permitAll()
+                .antMatchers("/**").authenticated();
+//                .antMatchers("/**").permitAll();
     }
 
 

+ 20 - 20
knowledgeman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -23,26 +23,26 @@ import java.util.Collection;
 public class UrlAccessDecisionManager implements AccessDecisionManager {
     @Override
     public void decide(Authentication authentication, Object object, Collection<ConfigAttribute> configAttributes) throws AccessDeniedException, InsufficientAuthenticationException {
-//        HttpServletRequest request = ((FilterInvocation) object).getHttpRequest();
-//        String url, method;
-//        if (matchPermitAllUrl(request)) {
-//            return;
-//        }
-//        if ("anonymousUser".equals(authentication.getPrincipal())) {
-//            throw new AccessDeniedException("no right");
-//        } else {
-//            for (GrantedAuthority ga : authentication.getAuthorities()) {
-//                String[] authority = ga.getAuthority().split(";");
-//                url = authority[0];
-//                method = authority[1];
-//                if (matchers(url, request)) {
-//                    if (method.equals(request.getMethod()) || "ALL".equals(method)) {
-//                        return;
-//                    }
-//                }
-//            }
-//        }
-//        throw new AccessDeniedException("no right");
+        HttpServletRequest request = ((FilterInvocation) object).getHttpRequest();
+        String url, method;
+        if (matchPermitAllUrl(request)) {
+            return;
+        }
+        if ("anonymousUser".equals(authentication.getPrincipal())) {
+            throw new AccessDeniedException("no right");
+        } else {
+            for (GrantedAuthority ga : authentication.getAuthorities()) {
+                String[] authority = ga.getAuthority().split(";");
+                url = authority[0];
+                method = authority[1];
+                if (matchers(url, request)) {
+                    if (method.equals(request.getMethod()) || "ALL".equals(method)) {
+                        return;
+                    }
+                }
+            }
+        }
+        throw new AccessDeniedException("no right");
     }
 
 

+ 1 - 1
tran-service/src/main/java/com/diagbot/entity/DiseaseIcd.java

@@ -54,7 +54,7 @@ public class DiseaseIcd implements Serializable {
     private String hospitalCode;
 
     /**
-     * icss疾病名称
+     * HIS疾病名称
      */
     private String diseaseName;
 

+ 3 - 3
tran-service/src/main/java/com/diagbot/facade/TranDiseaseIcdFacade.java

@@ -30,13 +30,13 @@ public class TranDiseaseIcdFacade extends DiseaseIcdServiceImpl {
      */
     public List<GetDiseaseIcdDTO> getDiseaseIcds(GetDiseaseIcdVO getDiseaseIcdVO) {
         Map paramMap = new HashMap<>();
-        paramMap.put("questions", Arrays.asList(getDiseaseIcdVO.getQuestions().split(",")));
+        paramMap.put("disNames", Arrays.asList(getDiseaseIcdVO.getDisNames().split(",")));
         paramMap.put("hospitalCode", getDiseaseIcdVO.getHospitalCode());
         return this.getDiseaseIcds(paramMap);
     }
 
     /**
-     * 根据医院编码获取疾病映射关系 Map<icssName,diseaseName>
+     * 根据医院编码获取疾病映射关系 Map<conceptDisName,diseaseName>
      *
      * @return
      */
@@ -44,7 +44,7 @@ public class TranDiseaseIcdFacade extends DiseaseIcdServiceImpl {
         QueryWrapper<DiseaseIcd> diseaseIcdQueryWrapper = new QueryWrapper<>();
         diseaseIcdQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("hospital_code",hosCode);
         List<DiseaseIcd> diseaseIcdList = this.list(diseaseIcdQueryWrapper);
-        Map<String, String> retMap= EntityUtil.makeMapWithKeyValue(diseaseIcdList, "icssQuestionName", "diseaseName");
+        Map<String, String> retMap= EntityUtil.makeMapWithKeyValue(diseaseIcdList, "conceptDisName", "diseaseName");
         return retMap;
     }
 }

+ 2 - 2
tran-service/src/main/java/com/diagbot/vo/GetDiseaseIcdVO.java

@@ -14,8 +14,8 @@ import javax.validation.constraints.NotNull;
 @Setter
 public class GetDiseaseIcdVO {
     //疾病id
-    @NotNull(message="疾病id必传")
-    private String questions;
+    @NotNull(message="疾病名称必传")
+    private String disNames;
     //医院编码
     @NotNull(message="医院编码必传")
     private String hospitalCode;

+ 2 - 2
tran-service/src/main/resources/mapper/DiseaseIcdMapper.xml

@@ -22,8 +22,8 @@
         select * from tran_disease_icd t where
         FIND_IN_SET(#{hospitalCode},hospital_code)
         and
-        icss_question_name in
-        <foreach item="item" collection="questions" open="(" separator="," close=")">
+        concept_dis_name in
+        <foreach item="item" collection="disNames" open="(" separator="," close=")">
             #{item}
         </foreach>
         and status = '1'

+ 6 - 0
triage-service/src/main/java/com/diagbot/client/AiptServiceClient.java

@@ -1,13 +1,16 @@
 package com.diagbot.client;
 
 import com.diagbot.client.hystrix.AiptServiceHystrix;
+import com.diagbot.dto.ConceptBaseDTO;
 import com.diagbot.dto.PartSymptomDTO;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.ConceptUsualVO;
 import com.diagbot.vo.PartSymptomVO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 
+import javax.validation.Valid;
 import java.util.List;
 
 /**
@@ -21,4 +24,7 @@ public interface AiptServiceClient {
     @PostMapping(value = "/part/getSymptomByPartName")
     RespDTO<List<PartSymptomDTO>> getSymptomByPartName(@RequestBody PartSymptomVO partSymptomVO);
 
+    @PostMapping(value = "/concept/getConceptUsual")
+    RespDTO<List<ConceptBaseDTO>> getConceptUsual(@RequestBody @Valid ConceptUsualVO conceptUsualVO);
+
 }

+ 9 - 0
triage-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java

@@ -1,12 +1,15 @@
 package com.diagbot.client.hystrix;
 
 import com.diagbot.client.AiptServiceClient;
+import com.diagbot.dto.ConceptBaseDTO;
 import com.diagbot.dto.PartSymptomDTO;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.ConceptUsualVO;
 import com.diagbot.vo.PartSymptomVO;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 
+import javax.validation.Valid;
 import java.util.List;
 
 /**
@@ -22,4 +25,10 @@ public class AiptServiceHystrix implements AiptServiceClient {
         log.error("【hystrix】调用{}异常", "getSymptomByPartName");
         return null;
     }
+
+    @Override
+    public RespDTO<List<ConceptBaseDTO>> getConceptUsual(@Valid ConceptUsualVO conceptUsualVO) {
+        log.error("【hystrix】调用{}异常", "getConceptUsual");
+        return null;
+    }
 }

+ 19 - 4
triage-service/src/main/java/com/diagbot/facade/SymptomFacade.java

@@ -1,12 +1,19 @@
 package com.diagbot.facade;
 
+import com.diagbot.client.AiptServiceClient;
+import com.diagbot.dto.ConceptBaseDTO;
+import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.SymptomSearchDTO;
 import com.diagbot.entity.Symptom;
 import com.diagbot.entity.SymptomWrapper;
 import com.diagbot.enums.ShowTypeEnum;
 import com.diagbot.service.impl.SymptomServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.ConceptUsualVO;
 import com.diagbot.vo.SymptomSearchVO;
 import com.diagbot.vo.SymptomUsualVO;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.util.ArrayList;
@@ -21,16 +28,24 @@ import java.util.Map;
  */
 @Component
 public class SymptomFacade extends SymptomServiceImpl{
+    @Autowired
+    AiptServiceClient aiptServiceClient;
+
     /**
      *  获取常用症状
      *
      * @return
      */
     public List<Symptom> getUsualFac(SymptomUsualVO symptomUsualVO) {
-        Map paramMap = new HashMap();
-        paramMap.put("sexType", symptomUsualVO.getSexType());
-        paramMap.put("age", symptomUsualVO.getAge());
-        return this.getUsual(paramMap);
+        ConceptUsualVO conceptUsualVO = new ConceptUsualVO();
+        BeanUtil.copyProperties(symptomUsualVO,conceptUsualVO);
+        conceptUsualVO.setDeptName("全科");
+        conceptUsualVO.setType(1);
+        //从知识库获取常用标签
+        RespDTO<List<ConceptBaseDTO>> conceptBaseDTORespDTO = aiptServiceClient.getConceptUsual(conceptUsualVO);
+        RespDTOUtil.respNGDeal(conceptBaseDTORespDTO,"获取常用标签失败");
+        List<Symptom> symptomList = BeanUtil.listCopyTo(conceptBaseDTORespDTO.data,Symptom.class);
+        return symptomList;
     }
 
 

+ 25 - 0
triage-service/src/main/java/com/diagbot/vo/ConceptUsualVO.java

@@ -0,0 +1,25 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @author: wangyu
+ * @time: 2019/5/7 10:00
+ */
+@Getter
+@Setter
+public class ConceptUsualVO {
+
+    @NotNull(message = "请输入科室名称")
+    private String deptName;
+    @NotNull(message = "请输入病人年龄")
+    private Integer age;
+    @NotNull(message = "请输入病人性别")
+    private Integer sexType;
+    @NotNull(message = "请输入标签类型")
+    private Integer type;
+}