Selaa lähdekoodia

管理与评估 和 指标配置

wangfeng 6 vuotta sitten
vanhempi
commit
8774c4cab7
25 muutettua tiedostoa jossa 1040 lisäystä ja 0 poistoa
  1. 22 0
      aipt-service/src/main/java/com/diagbot/dto/EvaluationDTO.java
  2. 20 0
      aipt-service/src/main/java/com/diagbot/dto/IndexConfigAndDataDTO.java
  3. 32 0
      aipt-service/src/main/java/com/diagbot/dto/IndexConfigDTO.java
  4. 25 0
      aipt-service/src/main/java/com/diagbot/dto/IndexDTO.java
  5. 26 0
      aipt-service/src/main/java/com/diagbot/dto/IndexDataDTO.java
  6. 166 0
      aipt-service/src/main/java/com/diagbot/entity/Evaluation.java
  7. 170 0
      aipt-service/src/main/java/com/diagbot/entity/IndexConfig.java
  8. 31 0
      aipt-service/src/main/java/com/diagbot/facade/EvaluationFacade.java
  9. 41 0
      aipt-service/src/main/java/com/diagbot/facade/IndexConfigFacade.java
  10. 27 0
      aipt-service/src/main/java/com/diagbot/mapper/EvaluationMapper.java
  11. 26 0
      aipt-service/src/main/java/com/diagbot/mapper/IndexConfigMapper.java
  12. 25 0
      aipt-service/src/main/java/com/diagbot/service/EvaluationService.java
  13. 24 0
      aipt-service/src/main/java/com/diagbot/service/IndexConfigService.java
  14. 33 0
      aipt-service/src/main/java/com/diagbot/service/impl/EvaluationServiceImpl.java
  15. 31 0
      aipt-service/src/main/java/com/diagbot/service/impl/IndexConfigServiceImpl.java
  16. 18 0
      aipt-service/src/main/java/com/diagbot/vo/EvaluationdiseaseNameVO.java
  17. 16 0
      aipt-service/src/main/java/com/diagbot/vo/IndexConfigdiseaseNameVO.java
  18. 35 0
      aipt-service/src/main/java/com/diagbot/vo/IndexDataFindVO.java
  19. 33 0
      aipt-service/src/main/java/com/diagbot/vo/IndexDataSaveVO.java
  20. 48 0
      aipt-service/src/main/java/com/diagbot/vo/IndexDataVO.java
  21. 19 0
      aipt-service/src/main/java/com/diagbot/vo/IndexDataiIds.java
  22. 49 0
      aipt-service/src/main/java/com/diagbot/web/EvaluationController.java
  23. 48 0
      aipt-service/src/main/java/com/diagbot/web/IndexConfigController.java
  24. 37 0
      aipt-service/src/main/resources/mapper/EvaluationMapper.xml
  25. 38 0
      aipt-service/src/main/resources/mapper/IndexConfigMapper.xml

+ 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;
+}

+ 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;
+}

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

@@ -0,0 +1,32 @@
+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;
+}

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

@@ -0,0 +1,26 @@
+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;// 指标名
+}

+ 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 - 0
aipt-service/src/main/java/com/diagbot/entity/IndexConfig.java

@@ -0,0 +1,170 @@
+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 +
+        "}";
+    }
+}

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

@@ -0,0 +1,31 @@
+package com.diagbot.facade;
+
+import java.util.List;
+
+import javax.validation.Valid;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.diagbot.dto.EvaluationDTO;
+import com.diagbot.service.EvaluationService;
+import com.diagbot.service.impl.EvaluationServiceImpl;
+import com.diagbot.vo.EvaluationdiseaseNameVO;
+
+@Component
+public class EvaluationFacade extends EvaluationServiceImpl{
+
+	@Autowired
+	EvaluationService evaluationService;
+	
+	/**
+	 * 
+	 * @param evaluationdiseaseNameVO
+	 * @return
+	 */
+	public List<EvaluationDTO> getEvaluationModule(@Valid EvaluationdiseaseNameVO evaluationdiseaseNameVO) {
+		List<EvaluationDTO> data = evaluationService.getEvaluationModule(evaluationdiseaseNameVO);
+		return data;
+	}
+
+}

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

@@ -0,0 +1,41 @@
+package com.diagbot.facade;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.dto.IndexConfigDTO;
+import com.diagbot.entity.Concept;
+import com.diagbot.entity.ConceptDetail;
+import com.diagbot.entity.IndexConfig;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.enums.LexiconTypeEnum;
+import com.diagbot.service.IndexConfigService;
+import com.diagbot.service.impl.IndexConfigServiceImpl;
+import com.diagbot.vo.ConceptBaseVO;
+import com.diagbot.vo.IndexConfigdiseaseNameVO;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年5月6日 下午6:35:58
+ */
+@Component
+public class IndexConfigFacade extends IndexConfigServiceImpl{
+
+	@Autowired 
+	IndexConfigService indexConfigService;	
+	
+	
+	public List<IndexConfigDTO> getIndexConfig(String diseaseName) {
+		Map<String, Object> indexConfigMap = new HashMap<>();
+		indexConfigMap.put("diseaseName",diseaseName);
+		return indexConfigService.getIndexConfig(indexConfigMap);
+	}
+
+}

+ 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);
+	}
+
+}

+ 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;
+	
+}

+ 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;
+}

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

@@ -0,0 +1,49 @@
+package com.diagbot.web;
+
+import java.util.List;
+
+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.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;
+
+/**
+ * <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);
+	}
+
+}

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

@@ -0,0 +1,48 @@
+package com.diagbot.web;
+
+import java.util.List;
+
+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.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 springfox.documentation.annotations.ApiIgnore;
+
+/**
+ * <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);
+	}
+}

+ 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
+		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
+		LEFT JOIN kl_concept c ON a.disease_id = c.id
+		WHERE a.is_deleted ="N"
+		and c.lib_type = 18
+		<if test="indexConfig.diseaseName != ''">
+		AND c.lib_name =  #{indexConfig.diseaseName}
+		</if>
+		 
+	</select>
+</mapper>