浏览代码

电子病历评级指标解读

Zhaops 6 年之前
父节点
当前提交
fcb2cd3d76
共有 28 个文件被更改,包括 932 次插入6 次删除
  1. 16 0
      icss-service/src/main/java/com/diagbot/dto/EMRIntroduceDTO.java
  2. 40 0
      icss-service/src/main/java/com/diagbot/facade/IntroduceInfoFacade.java
  3. 17 0
      icss-service/src/main/java/com/diagbot/vo/EMRIntroduceVO.java
  4. 13 0
      icss-service/src/main/java/com/diagbot/web/IntroduceInfoController.java
  5. 28 0
      tran-service/src/main/java/com/diagbot/client/ICSSServiceClient.java
  6. 26 0
      tran-service/src/main/java/com/diagbot/client/hystrix/ICSSServiceHystrix.java
  7. 14 0
      tran-service/src/main/java/com/diagbot/dto/EMRInfoDTO.java
  8. 16 0
      tran-service/src/main/java/com/diagbot/dto/EMRIntroduceDTO.java
  9. 146 0
      tran-service/src/main/java/com/diagbot/entity/IntroduceTitleConfig.java
  10. 154 0
      tran-service/src/main/java/com/diagbot/entity/PacsConfig.java
  11. 50 0
      tran-service/src/main/java/com/diagbot/enums/TypeEnum.java
  12. 79 0
      tran-service/src/main/java/com/diagbot/facade/EMRInfoFacade.java
  13. 33 0
      tran-service/src/main/java/com/diagbot/facade/IntroduceTitleConfigFacade.java
  14. 33 0
      tran-service/src/main/java/com/diagbot/facade/PacsConfigFacade.java
  15. 25 1
      tran-service/src/main/java/com/diagbot/facade/TranLisConfigFacade.java
  16. 16 0
      tran-service/src/main/java/com/diagbot/mapper/IntroduceTitleConfigMapper.java
  17. 16 0
      tran-service/src/main/java/com/diagbot/mapper/PacsConfigMapper.java
  18. 16 0
      tran-service/src/main/java/com/diagbot/service/IntroduceTitleConfigService.java
  19. 16 0
      tran-service/src/main/java/com/diagbot/service/PacsConfigService.java
  20. 20 0
      tran-service/src/main/java/com/diagbot/service/impl/IntroduceTitleConfigServiceImpl.java
  21. 20 0
      tran-service/src/main/java/com/diagbot/service/impl/PacsConfigServiceImpl.java
  22. 24 0
      tran-service/src/main/java/com/diagbot/vo/EMRInfoVO.java
  23. 17 0
      tran-service/src/main/java/com/diagbot/vo/EMRIntroduceVO.java
  24. 14 0
      tran-service/src/main/java/com/diagbot/vo/EMRPushVO.java
  25. 42 0
      tran-service/src/main/java/com/diagbot/web/EMRInfoController.java
  26. 18 0
      tran-service/src/main/resources/mapper/IntroduceTitleConfigMapper.xml
  27. 18 0
      tran-service/src/main/resources/mapper/PacsConfigMapper.xml
  28. 5 5
      tran-service/src/test/java/com/diagbot/CodeGeneration.java

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

@@ -0,0 +1,16 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/3/11 14:00
+ */
+@Getter
+@Setter
+public class EMRIntroduceDTO {
+    private String title;
+    private String text;
+}

+ 40 - 0
icss-service/src/main/java/com/diagbot/facade/IntroduceInfoFacade.java

@@ -1,6 +1,7 @@
 package com.diagbot.facade;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.dto.EMRIntroduceDTO;
 import com.diagbot.dto.IntroduceDTO;
 import com.diagbot.entity.IntroduceDetail;
 import com.diagbot.entity.IntroduceInfo;
@@ -13,7 +14,9 @@ import com.diagbot.exception.CommonException;
 import com.diagbot.service.impl.IntroduceInfoServiceImpl;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.StringUtil;
+import com.diagbot.vo.EMRIntroduceVO;
 import com.diagbot.vo.IntroduceByQuestionVO;
+import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -135,4 +138,41 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
     public IntroduceDTO getRecordById(Long id) {
         return getRecordByIdAndPosition(id, null);
     }
+
+    /**
+     * 获取电子病历评级提示信息
+     *
+     * @param emrIntroduceVO
+     * @return
+     */
+    public List<EMRIntroduceDTO> getIntroduceByEMR(EMRIntroduceVO emrIntroduceVO) {
+        QueryWrapper<QuestionInfo> questionInfoQueryWrapper = new QueryWrapper<>();
+        questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("tag_name", emrIntroduceVO.getName())
+                .eq("type", emrIntroduceVO.getType());
+        QuestionInfo questionInfo = questionFacade.getOne(questionInfoQueryWrapper);
+        if (questionInfo == null) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "标签不存在");
+        }
+
+        QueryWrapper<IntroduceMap> introduceMapQueryWrapper = new QueryWrapper<>();
+        introduceMapQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
+                eq("question_id", questionInfo.getId()).
+                eq("type", emrIntroduceVO.getType());
+        IntroduceMap introduceMap = introduceMapFacade.getOne(introduceMapQueryWrapper);
+        if (introduceMap == null) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "提示信息未维护");
+        }
+
+        QueryWrapper<IntroduceDetail> introduceDetailQueryWrapper = new QueryWrapper<>();
+        introduceDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
+                eq("introduce_id", introduceMap.getIntroduceId()).orderByAsc("order_no");
+        //如果标题不为空,按标题返回,否则,全部返回
+        if (emrIntroduceVO.getTitles().length > 0) {
+            introduceDetailQueryWrapper.in("title", emrIntroduceVO.getTitles());
+        }
+        List<IntroduceDetail> introduceDetailList = introduceDetailFacade.list(introduceDetailQueryWrapper);
+        List<EMRIntroduceDTO> emrIntroduceDTOList = BeanUtil.listCopyTo(introduceDetailList, EMRIntroduceDTO.class);
+        return emrIntroduceDTOList;
+    }
 }

+ 17 - 0
icss-service/src/main/java/com/diagbot/vo/EMRIntroduceVO.java

@@ -0,0 +1,17 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/3/11 13:50
+ */
+@Getter
+@Setter
+public class EMRIntroduceVO {
+    private String name;
+    private Integer type;
+    private String[] titles;
+}

+ 13 - 0
icss-service/src/main/java/com/diagbot/web/IntroduceInfoController.java

@@ -1,9 +1,11 @@
 package com.diagbot.web;
 
 
+import com.diagbot.dto.EMRIntroduceDTO;
 import com.diagbot.dto.IntroduceDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.IntroduceInfoFacade;
+import com.diagbot.vo.EMRIntroduceVO;
 import com.diagbot.vo.IntroduceByQuestionVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -15,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
+import java.util.List;
 
 /**
  * <p>
@@ -60,4 +63,14 @@ public class IntroduceInfoController {
         IntroduceDTO introduceDTO = introduceInfoFacade.getRecordById(id);
         return RespDTO.onSuc(introduceDTO);
     }
+
+    @ApiOperation(value = "获取电子病历评级提示信息[by:zhaops]",
+            notes = "hosCode: 医院编码,必填<br>" +
+                    "type: 检验检查类型,5-检验,6-检查,必填<br>" +
+                    "titles(数组): 提示信息标题列表<br>")
+    @PostMapping("/getIntroduceByEMR")
+    public RespDTO<List<EMRIntroduceDTO>> getIntroduceByEMR(@RequestBody EMRIntroduceVO emrIntroduceVO) {
+        List<EMRIntroduceDTO> data = introduceInfoFacade.getIntroduceByEMR(emrIntroduceVO);
+        return RespDTO.onSuc(data);
+    }
 }

+ 28 - 0
tran-service/src/main/java/com/diagbot/client/ICSSServiceClient.java

@@ -0,0 +1,28 @@
+package com.diagbot.client;
+
+import com.diagbot.client.hystrix.ICSSServiceHystrix;
+import com.diagbot.dto.EMRIntroduceDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.EMRIntroduceVO;
+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:zhaops
+ * @time: 2019/3/11 14:33
+ */
+@FeignClient(value = "icss-service", fallback = ICSSServiceHystrix.class)
+public interface ICSSServiceClient {
+    /**
+     * 获取检验检查提示信息
+     *
+     * @param emrIntroduceVO
+     * @return
+     */
+    @PostMapping("/introduceInfo/getIntroduceByEMR")
+    RespDTO<List<EMRIntroduceDTO>> getIntroduceByEMR(@RequestBody EMRIntroduceVO emrIntroduceVO);
+}

+ 26 - 0
tran-service/src/main/java/com/diagbot/client/hystrix/ICSSServiceHystrix.java

@@ -0,0 +1,26 @@
+package com.diagbot.client.hystrix;
+
+import com.diagbot.client.ICSSServiceClient;
+import com.diagbot.dto.EMRIntroduceDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.EMRIntroduceVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/3/11 14:33
+ */
+@Component
+@Slf4j
+public class ICSSServiceHystrix implements ICSSServiceClient {
+    @Override
+    public RespDTO<List<EMRIntroduceDTO>> getIntroduceByEMR(@RequestBody EMRIntroduceVO emrIntroduceVO) {
+        log.error("【hystrix】调用{}异常", "getIntroduceByEMR");
+        return null;
+    }
+}

+ 14 - 0
tran-service/src/main/java/com/diagbot/dto/EMRInfoDTO.java

@@ -0,0 +1,14 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/3/11 11:23
+ */
+@Getter
+@Setter
+public class EMRInfoDTO {
+}

+ 16 - 0
tran-service/src/main/java/com/diagbot/dto/EMRIntroduceDTO.java

@@ -0,0 +1,16 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/3/11 14:00
+ */
+@Getter
+@Setter
+public class EMRIntroduceDTO {
+    private String title;
+    private String text;
+}

+ 146 - 0
tran-service/src/main/java/com/diagbot/entity/IntroduceTitleConfig.java

@@ -0,0 +1,146 @@
+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 zhaops
+ * @since 2019-03-11
+ */
+@TableName("tran_introduce_title_config")
+public class IntroduceTitleConfig 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;
+
+    /**
+     * 医院编码
+     */
+    private String hospitalCode;
+
+    /**
+     * 项目名
+     */
+    private String itemName;
+
+    /**
+     * 公表名
+     */
+    private String uniqueName;
+
+    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 String getHospitalCode() {
+        return hospitalCode;
+    }
+
+    public void setHospitalCode(String hospitalCode) {
+        this.hospitalCode = hospitalCode;
+    }
+    public String getItemName() {
+        return itemName;
+    }
+
+    public void setItemName(String itemName) {
+        this.itemName = itemName;
+    }
+    public String getUniqueName() {
+        return uniqueName;
+    }
+
+    public void setUniqueName(String uniqueName) {
+        this.uniqueName = uniqueName;
+    }
+
+    @Override
+    public String toString() {
+        return "IntroduceTitleConfig{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", hospitalCode=" + hospitalCode +
+        ", itemName=" + itemName +
+        ", uniqueName=" + uniqueName +
+        "}";
+    }
+}

+ 154 - 0
tran-service/src/main/java/com/diagbot/entity/PacsConfig.java

@@ -0,0 +1,154 @@
+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 zhaops
+ * @since 2019-03-11
+ */
+@TableName("tran_pacs_config")
+public class PacsConfig 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;
+
+    /**
+     * 医院编码
+     */
+    private String hospitalCode;
+
+    /**
+     * 套餐名
+     */
+    private String mealName;
+
+    /**
+     * 公表名
+     */
+    private String uniqueName;
+
+    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 String getHospitalCode() {
+        return hospitalCode;
+    }
+
+    public void setHospitalCode(String hospitalCode) {
+        this.hospitalCode = hospitalCode;
+    }
+
+    public String getMealName() {
+        return mealName;
+    }
+
+    public void setMealName(String mealName) {
+        this.mealName = mealName;
+    }
+
+    public String getUniqueName() {
+        return uniqueName;
+    }
+
+    public void setUniqueName(String uniqueName) {
+        this.uniqueName = uniqueName;
+    }
+
+    @Override
+    public String toString() {
+        return "PacsConfig{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", hospitalCode=" + hospitalCode +
+                ", mealName=" + mealName +
+                ", uniqueName=" + uniqueName +
+                "}";
+    }
+}

+ 50 - 0
tran-service/src/main/java/com/diagbot/enums/TypeEnum.java

@@ -0,0 +1,50 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/3/11 13:32
+ */
+public enum TypeEnum implements KeyedNamed {
+    Lis(5, "检查"),
+
+    Pacs(6, "检验");
+
+    @Setter
+    private Integer key;
+
+    @Setter
+    private String name;
+
+    TypeEnum(Integer key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static TypeEnum getEnum(Integer key) {
+        for (TypeEnum item : TypeEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer key) {
+        TypeEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 79 - 0
tran-service/src/main/java/com/diagbot/facade/EMRInfoFacade.java

@@ -0,0 +1,79 @@
+package com.diagbot.facade;
+
+import com.diagbot.client.ICSSServiceClient;
+import com.diagbot.dto.EMRIntroduceDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.enums.TypeEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.util.StringUtil;
+import com.diagbot.vo.EMRInfoVO;
+import com.diagbot.vo.EMRIntroduceVO;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/3/11 13:09
+ */
+@Component
+public class EMRInfoFacade {
+    @Autowired
+    private TranLisConfigFacade tranLisConfigFacade;
+    @Autowired
+    private PacsConfigFacade pacsConfigFacade;
+    @Autowired
+    private IntroduceTitleConfigFacade introduceTitleConfigFacade;
+    @Autowired
+    private ICSSServiceClient icssServiceClient;
+
+    public List<EMRIntroduceDTO> getEMRInfo(EMRInfoVO emrInfoVO) {
+        String hoscode = emrInfoVO.getHosCode();
+        Map<String, Map<String, String>> lisConfigMap = tranLisConfigFacade.getLisConfigByHosCode(hoscode);
+        Map<String, String> pacsConfigMap = pacsConfigFacade.getPacsConfigByHosCode(hoscode);
+        Map<String, String> titleMappingMap = introduceTitleConfigFacade.getTitleMappingHosCode(hoscode);
+
+        //公表转换
+        String uniqueName = "";
+        Integer type = emrInfoVO.getType();
+        if (type.equals(TypeEnum.Lis)) {
+            uniqueName = lisConfigMap.get(emrInfoVO.getMealName()).get(emrInfoVO.getItemName());
+        } else if (type.equals(TypeEnum.Pacs)) {
+            uniqueName = pacsConfigMap.get(emrInfoVO.getMealName());
+        }
+
+        //未找到公表映射项目
+        if (uniqueName == null || StringUtil.isBlank(uniqueName)) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "项目未找到");
+        }
+
+        String[] titles = emrInfoVO.getTitles();
+        List<String> titleList = Lists.newLinkedList();
+        if (titles.length > 0) {
+            for (String title : titles) {
+                String innerTitle = titleMappingMap.get(title);
+                if (StringUtil.isNotBlank(innerTitle)) {
+                    titleList.add(innerTitle);
+                }
+            }
+        }
+
+        //标题转换
+        EMRIntroduceVO introduceVO = new EMRIntroduceVO();
+        introduceVO.setName(uniqueName);
+        introduceVO.setType(type);
+        if (titleList.size() > 0) {
+            String[] mappingTitles = null;
+            introduceVO.setTitles(titleList.toArray(mappingTitles));
+        }
+
+        RespDTO<List<EMRIntroduceDTO>> respDTO = icssServiceClient.getIntroduceByEMR(introduceVO);
+        List<EMRIntroduceDTO> emrIntroduceDTOList = respDTO.data;
+        return emrIntroduceDTOList;
+    }
+}

+ 33 - 0
tran-service/src/main/java/com/diagbot/facade/IntroduceTitleConfigFacade.java

@@ -0,0 +1,33 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.entity.IntroduceTitleConfig;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.impl.IntroduceTitleConfigServiceImpl;
+import com.diagbot.util.EntityUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/3/11 13:16
+ */
+@Component
+public class IntroduceTitleConfigFacade extends IntroduceTitleConfigServiceImpl {
+
+    /**
+     * 根据医院编码获取静态知识标题公表映射关系 Map<itemName,uniqueName>
+     *
+     * @return
+     */
+    public Map<String, String> getTitleMappingHosCode(String hosCode) {
+        QueryWrapper<IntroduceTitleConfig> titleMappingQueryWrapper = new QueryWrapper<>();
+        titleMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("hospital_code",hosCode);
+        List<IntroduceTitleConfig> titleMappingList = this.list(titleMappingQueryWrapper);
+        Map<String, String> retMap= EntityUtil.makeMapWithKeyValue(titleMappingList, "itemName", "uniqueName");
+        return retMap;
+    }
+}

+ 33 - 0
tran-service/src/main/java/com/diagbot/facade/PacsConfigFacade.java

@@ -0,0 +1,33 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.entity.PacsConfig;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.impl.PacsConfigServiceImpl;
+import com.diagbot.util.EntityUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/3/11 13:10
+ */
+@Component
+public class PacsConfigFacade extends PacsConfigServiceImpl{
+
+    /**
+     * 根据医院编码获取辅检公表映射关系 Map<mealName,uniqueName>
+     *
+     * @return
+     */
+    public Map<String, String> getPacsConfigByHosCode(String hosCode) {
+        QueryWrapper<PacsConfig> pacsConfigQueryWrapper = new QueryWrapper<>();
+        pacsConfigQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("hospital_code",hosCode);
+        List<PacsConfig> pacsConfigList = this.list(pacsConfigQueryWrapper);
+        Map<String, String> retMap=EntityUtil.makeMapWithKeyValue(pacsConfigList, "mealName", "uniqueName");
+        return retMap;
+    }
+}

+ 25 - 1
tran-service/src/main/java/com/diagbot/facade/TranLisConfigFacade.java

@@ -1,7 +1,10 @@
 package com.diagbot.facade;
 
+import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Map;
 
+import com.diagbot.util.EntityUtil;
 import org.springframework.stereotype.Component;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -36,4 +39,25 @@ public class TranLisConfigFacade extends TranLisConfigServiceImpl{
 		//System.out.println("json=="+GsonUtil.toJson(datas));
 		return datas;
 	}
-}
+
+	/**
+	 * 根据医院编码获取化验公表映射关系 Map<mealName,Map<itemName,uniqueName>>
+	 *
+	 * @return
+	 */
+	public Map<String, Map<String, String>> getLisConfigByHosCode(String hosCode) {
+		Map<String, Map<String, String>> retMap = new LinkedHashMap<>();
+		QueryWrapper<TranLisConfig> lisConfigQueryWrapper = new QueryWrapper<>();
+		lisConfigQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("hospital_code",hosCode);
+		List<TranLisConfig> lisConfigList = this.list(lisConfigQueryWrapper);
+		Map<String, List<TranLisConfig>> lisConfigMap = EntityUtil.makeEntityListMap(lisConfigList, "mealName");
+		for (Map.Entry<String, List<TranLisConfig>> entry : lisConfigMap.entrySet()) {
+			if (entry.getValue().size() > 0) {
+				retMap.put(entry.getKey(), EntityUtil.makeMapWithKeyValue(entry.getValue(), "itemName", "uniqueName"));
+			} else {
+				retMap.put(entry.getKey(), null);
+			}
+		}
+		return retMap;
+	}
+}

+ 16 - 0
tran-service/src/main/java/com/diagbot/mapper/IntroduceTitleConfigMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.IntroduceTitleConfig;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 提示信息标签映射表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2019-03-11
+ */
+public interface IntroduceTitleConfigMapper extends BaseMapper<IntroduceTitleConfig> {
+
+}

+ 16 - 0
tran-service/src/main/java/com/diagbot/mapper/PacsConfigMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.PacsConfig;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 辅检项目公表映射配置表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2019-03-11
+ */
+public interface PacsConfigMapper extends BaseMapper<PacsConfig> {
+
+}

+ 16 - 0
tran-service/src/main/java/com/diagbot/service/IntroduceTitleConfigService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.IntroduceTitleConfig;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 提示信息标签映射表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2019-03-11
+ */
+public interface IntroduceTitleConfigService extends IService<IntroduceTitleConfig> {
+
+}

+ 16 - 0
tran-service/src/main/java/com/diagbot/service/PacsConfigService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.PacsConfig;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 辅检项目公表映射配置表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2019-03-11
+ */
+public interface PacsConfigService extends IService<PacsConfig> {
+
+}

+ 20 - 0
tran-service/src/main/java/com/diagbot/service/impl/IntroduceTitleConfigServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.IntroduceTitleConfig;
+import com.diagbot.mapper.IntroduceTitleConfigMapper;
+import com.diagbot.service.IntroduceTitleConfigService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 提示信息标签映射表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2019-03-11
+ */
+@Service
+public class IntroduceTitleConfigServiceImpl extends ServiceImpl<IntroduceTitleConfigMapper, IntroduceTitleConfig> implements IntroduceTitleConfigService {
+
+}

+ 20 - 0
tran-service/src/main/java/com/diagbot/service/impl/PacsConfigServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.PacsConfig;
+import com.diagbot.mapper.PacsConfigMapper;
+import com.diagbot.service.PacsConfigService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 辅检项目公表映射配置表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2019-03-11
+ */
+@Service
+public class PacsConfigServiceImpl extends ServiceImpl<PacsConfigMapper, PacsConfig> implements PacsConfigService {
+
+}

+ 24 - 0
tran-service/src/main/java/com/diagbot/vo/EMRInfoVO.java

@@ -0,0 +1,24 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/3/11 11:19
+ */
+@Getter
+@Setter
+public class EMRInfoVO {
+    @NotBlank(message = "请输入医院编码")
+    private String hosCode;
+    @NotBlank(message = "请输入检查或检验类型")
+    private Integer type;
+    @NotBlank(message = "请输入检查或检验套餐名称")
+    private String mealName;
+    private String itemName;
+    private String[] titles;
+}

+ 17 - 0
tran-service/src/main/java/com/diagbot/vo/EMRIntroduceVO.java

@@ -0,0 +1,17 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/3/11 13:50
+ */
+@Getter
+@Setter
+public class EMRIntroduceVO {
+    private String name;
+    private Integer type;
+    private String[] titles;
+}

+ 14 - 0
tran-service/src/main/java/com/diagbot/vo/EMRPushVO.java

@@ -0,0 +1,14 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/3/11 11:19
+ */
+@Getter
+@Setter
+public class EMRPushVO {
+}

+ 42 - 0
tran-service/src/main/java/com/diagbot/web/EMRInfoController.java

@@ -0,0 +1,42 @@
+package com.diagbot.web;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.LisConfigDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.EMRInfoFacade;
+import com.diagbot.vo.EMRInfoVO;
+import com.diagbot.vo.LisHospitalCodeVO;
+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;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/3/11 11:40
+ */
+@RestController
+@RequestMapping("/EMRInfo")
+@Api(value = "电子病历评级-检验检查指标解读相关API", tags = { "电子病历评级-检验检查指标解读相关API" })
+public class EMRInfoController {
+    @Autowired
+    EMRInfoFacade emrInfoFacade;
+
+    @ApiOperation(value = "电子病历评级检验检测项解读:[by:zhaops]",
+            notes = "name: 标签名称,必填<br>" +
+                    "type: 标签类型,必填<br>" +
+                    "mealName: 套餐名称(检验检查),必填<br>" +
+                    "itemName: 项目名称(检验)<br>" +
+                    "titles(数组): 标题列表<br>")
+    @PostMapping("/getEMRInfo")
+    @SysLogger("getEMRInfo")
+    public RespDTO<List<LisConfigDTO>> getEMRInfo(@RequestBody EMRInfoVO emrInfoVO) {
+        return RespDTO.onSuc(emrInfoFacade.getEMRInfo(emrInfoVO));
+    }
+}

+ 18 - 0
tran-service/src/main/resources/mapper/IntroduceTitleConfigMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.IntroduceTitleConfigMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.IntroduceTitleConfig">
+        <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="hospital_code" property="hospitalCode" />
+        <result column="item_name" property="itemName" />
+        <result column="unique_name" property="uniqueName" />
+    </resultMap>
+
+</mapper>

+ 18 - 0
tran-service/src/main/resources/mapper/PacsConfigMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.PacsConfigMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.PacsConfig">
+        <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="hospital_code" property="hospitalCode" />
+        <result column="meal_name" property="mealName" />
+        <result column="unique_name" property="uniqueName" />
+    </resultMap>
+
+</mapper>

+ 5 - 5
tran-service/src/test/java/com/diagbot/CodeGeneration.java

@@ -33,7 +33,7 @@ public class CodeGeneration {
         gc.setEnableCache(false);// XML 二级缓存
         gc.setBaseResultMap(true);// XML ResultMap
         gc.setBaseColumnList(false);// XML columList
-        gc.setAuthor("gaodm");// 作者
+        gc.setAuthor("zhaops");// 作者
 
         // 自定义文件命名,注意 %s 会自动填充表实体属性!
         gc.setControllerName("%sController");
@@ -48,15 +48,15 @@ public class CodeGeneration {
         dsc.setDbType(DbType.MYSQL);
         dsc.setDriverName("com.mysql.jdbc.Driver");
         dsc.setUsername("root");
-        dsc.setPassword("root");
-        dsc.setUrl("jdbc:mysql://127.0.0.1:3306/sys-tran?useUnicode=true&characterEncoding=utf-8");
+        dsc.setPassword("lantone");
+        dsc.setUrl("jdbc:mysql://192.168.2.236:3306/sys-tran?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false");
         mpg.setDataSource(dsc);
 
         // 策略配置
         StrategyConfig strategy = new StrategyConfig();
-//        strategy.setTablePrefix(new String[] { "sys_" });// 此处可以修改为您的表前缀
+        strategy.setTablePrefix(new String[] { "tran_" });// 此处可以修改为您的表前缀
         strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
-        strategy.setInclude(new String[] { "sys_log" }); // 需要生成的表
+        strategy.setInclude(new String[] { "tran_introduce_title_config","tran_pacs_config" }); // 需要生成的表
 
         strategy.setSuperServiceClass(null);
         strategy.setSuperServiceImplClass(null);