Browse Source

优化接入层—2

liuqq 5 years ago
parent
commit
c4b27d4ae9
20 changed files with 639 additions and 61 deletions
  1. 1 1
      config-server/src/main/resources/shared/tran-service-local.yml
  2. 30 0
      tran-service/src/main/java/com/diagbot/client/LtapiServiceClient.java
  3. 16 0
      tran-service/src/main/java/com/diagbot/client/bean/ConceptBaseDTO.java
  4. 38 0
      tran-service/src/main/java/com/diagbot/client/bean/ConceptDetailDTO.java
  5. 17 0
      tran-service/src/main/java/com/diagbot/client/bean/ConceptIntroduceDTO.java
  6. 19 0
      tran-service/src/main/java/com/diagbot/client/bean/ConceptPushDTO.java
  7. 22 0
      tran-service/src/main/java/com/diagbot/client/bean/MedicalIndication.java
  8. 17 0
      tran-service/src/main/java/com/diagbot/client/bean/MedicalIndicationDetail.java
  9. 25 0
      tran-service/src/main/java/com/diagbot/client/bean/PushDTO.java
  10. 44 0
      tran-service/src/main/java/com/diagbot/client/hystrix/LtapiServiceHystrix.java
  11. 74 0
      tran-service/src/main/java/com/diagbot/facade/LtapiFacade.java
  12. 13 0
      tran-service/src/main/java/com/diagbot/facade/PacsConfigFacade.java
  13. 219 57
      tran-service/src/main/java/com/diagbot/facade/PushFacade.java
  14. 13 0
      tran-service/src/main/java/com/diagbot/facade/TranDiseaseIcdFacade.java
  15. 14 0
      tran-service/src/main/java/com/diagbot/facade/TranLisConfigFacade.java
  16. 13 0
      tran-service/src/main/java/com/diagbot/vo/ConceptVO.java
  17. 7 0
      tran-service/src/main/java/com/diagbot/vo/PushVO.java
  18. 55 0
      tran-service/src/main/java/com/diagbot/web/LtapiController.java
  19. 0 1
      tran-service/src/main/java/com/diagbot/web/PushController.java
  20. 2 2
      tran-service/src/main/resources/jdbc.properties

+ 1 - 1
config-server/src/main/resources/shared/tran-service-local.yml

@@ -71,7 +71,7 @@ spring:
     database:
       mr: 7 # Redis病历索引
     host: 101.37.151.162  #Redis服务器地址
-    port: 6378 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
+    port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
     password: lantone # Redis服务器连接密码(默认为空)
     lettuce:
       pool:

+ 30 - 0
tran-service/src/main/java/com/diagbot/client/LtapiServiceClient.java

@@ -0,0 +1,30 @@
+package com.diagbot.client;
+
+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.bean.ConceptIntroduceDTO;
+import com.diagbot.client.bean.PushDTO;
+import com.diagbot.client.hystrix.LtapiServiceHystrix;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.ConceptIntroduceVO;
+import com.diagbot.vo.PushVO;
+
+@FeignClient(value = "ltapi-service", fallback = LtapiServiceHystrix.class)
+public interface LtapiServiceClient {
+	
+	@PostMapping("/push/push")
+	RespDTO<PushDTO> push(@RequestBody PushVO pushVO);
+	
+	@PostMapping("/push/pushTreatment")
+	RespDTO<Map<String, Object>> pushTreatment(@RequestBody PushVO pushVO);
+	
+	@PostMapping("/push/pushScale")
+	RespDTO<Map<String, Object>> pushScale(@RequestBody PushVO pushVO);
+	
+	@PostMapping("/conceptDetail/getConceptDetail")
+	RespDTO<ConceptIntroduceDTO> getConceptDetail(@RequestBody ConceptIntroduceVO conceptIntroduceVO);
+}

+ 16 - 0
tran-service/src/main/java/com/diagbot/client/bean/ConceptBaseDTO.java

@@ -0,0 +1,16 @@
+package com.diagbot.client.bean;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description: 概念出参基础实体类
+ * @author: gaodm
+ * @time: 2019/5/7 9:44
+ */
+@Getter
+@Setter
+public class ConceptBaseDTO {
+    private Long conceptId; // 概念id
+    private String name;    //概念名称
+}

+ 38 - 0
tran-service/src/main/java/com/diagbot/client/bean/ConceptDetailDTO.java

@@ -0,0 +1,38 @@
+package com.diagbot.client.bean;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:提示信息明细
+ * @Author:zhaops
+ * @time: 2019/5/6 16:33
+ */
+@Getter
+@Setter
+public class ConceptDetailDTO {
+    /**
+     * 提示明细标题
+     */
+    private String title;
+
+    /**
+     * 提示明细内容
+     */
+    private String content;
+
+    /**
+     * 纯文本
+     */
+    private String text;
+
+    /**
+     * 是否诊断依据(1-是,0-否)
+     */
+    private Integer isReason;
+
+    /**
+     * 显示位置(多选):1-推送展示,2-更多展示,3-一般治疗展示,4-手术治疗展示,5-药品说明书,6-不良反应,7-症状描述信息(智能分诊)
+     */
+    private String position;
+}

+ 17 - 0
tran-service/src/main/java/com/diagbot/client/bean/ConceptIntroduceDTO.java

@@ -0,0 +1,17 @@
+package com.diagbot.client.bean;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/5/13 20:24
+ */
+@Getter
+@Setter
+public class ConceptIntroduceDTO extends ConceptBaseDTO {
+    private List<ConceptDetailDTO> details;
+}

+ 19 - 0
tran-service/src/main/java/com/diagbot/client/bean/ConceptPushDTO.java

@@ -0,0 +1,19 @@
+package com.diagbot.client.bean;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:推理返回标签(概念)
+ * @Author:zhaops
+ * @time: 2019/5/7 20:06
+ */
+@Getter
+@Setter
+public class ConceptPushDTO extends ConceptBaseDTO {
+    private Integer libType;  //词性
+    private List<String> clientNames;//数据服务模式调用方名称
+    private Integer type;
+}

+ 22 - 0
tran-service/src/main/java/com/diagbot/client/bean/MedicalIndication.java

@@ -0,0 +1,22 @@
+package com.diagbot.client.bean;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+
+/**
+ * @Description:推送指标
+ * @Author:zhaops
+ * @time: 2019/3/14 14:40
+ */
+@Getter
+@Setter
+public class MedicalIndication {
+    private Long conceptId;
+    private Integer libType;
+    private Integer type;
+    private String name;
+    private List<MedicalIndicationDetail> details;
+}

+ 17 - 0
tran-service/src/main/java/com/diagbot/client/bean/MedicalIndicationDetail.java

@@ -0,0 +1,17 @@
+package com.diagbot.client.bean;
+
+import com.alibaba.fastjson.JSONObject;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:推送指标明细
+ * @Author:zhaops
+ * @time: 2019/4/11 10:15
+ */
+@Getter
+@Setter
+public class MedicalIndicationDetail {
+    private Integer type; //1-量表,2-公式,3-其他指标,4-危机值
+    private JSONObject content;  //type<>1 非量表,返回内容;type=1 量表,返回量表名称{"name":""} ,controlType:0-radio,1-checkbox,2-text,3-dropdownlist
+}

+ 25 - 0
tran-service/src/main/java/com/diagbot/client/bean/PushDTO.java

@@ -0,0 +1,25 @@
+package com.diagbot.client.bean;
+
+import com.diagbot.client.bean.MedicalIndication;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 推理出参
+ * @Author:zhaops
+ * @time: 2018/11/20 13:44
+ */
+@Getter
+@Setter
+public class PushDTO {
+    private List<ConceptPushDTO> symptom;
+    private List<ConceptPushDTO> other;
+    private List<ConceptPushDTO> vital;
+    private List<ConceptPushDTO> lab;
+    private List<ConceptPushDTO> pacs;
+    private Map<String, List<ConceptPushDTO>> dis;
+    private List<MedicalIndication> medicalIndications;
+}

+ 44 - 0
tran-service/src/main/java/com/diagbot/client/hystrix/LtapiServiceHystrix.java

@@ -0,0 +1,44 @@
+package com.diagbot.client.hystrix;
+
+import java.util.Map;
+
+import org.springframework.stereotype.Component;
+
+import com.diagbot.client.LtapiServiceClient;
+import com.diagbot.client.bean.ConceptIntroduceDTO;
+import com.diagbot.client.bean.PushDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.ConceptIntroduceVO;
+import com.diagbot.vo.PushVO;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Component
+@Slf4j
+public class LtapiServiceHystrix  implements LtapiServiceClient{
+
+	@Override
+	public RespDTO<PushDTO> push(PushVO pushVO) {
+		log.error("【hystrix】调用{}异常", "push");
+		return null;
+	}
+
+	@Override
+	public RespDTO<Map<String, Object>> pushTreatment(PushVO pushVO) {
+		log.error("【hystrix】调用{}异常", "pushTreatment");
+		return null;
+	}
+
+	@Override
+	public RespDTO<Map<String, Object>> pushScale(PushVO pushVO) {
+		log.error("【hystrix】调用{}异常", "pushScale");
+		return null;
+	}
+
+	@Override
+	public RespDTO<ConceptIntroduceDTO> getConceptDetail(ConceptIntroduceVO conceptIntroduceVO) {
+		log.error("【hystrix】调用{}异常", "getConceptDetail");
+		return null;
+	}
+
+}

+ 74 - 0
tran-service/src/main/java/com/diagbot/facade/LtapiFacade.java

@@ -0,0 +1,74 @@
+package com.diagbot.facade;
+
+import java.util.Date;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.alibaba.fastjson.JSONObject;
+import com.diagbot.client.LtapiServiceClient;
+import com.diagbot.client.bean.ConceptIntroduceDTO;
+import com.diagbot.client.bean.PushDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.InputInfo;
+import com.diagbot.util.DateUtil;
+import com.diagbot.vo.ConceptIntroduceVO;
+import com.diagbot.vo.ConceptVO;
+import com.diagbot.vo.PushVO;
+
+/**
+ * 数据引擎模式接口对接业务
+ * @author QQ
+ *
+ */
+@Component
+public class LtapiFacade {
+
+	@Autowired
+	InputInfoFacade inputInfoFacade;
+	
+	@Autowired
+	LtapiServiceClient ltapiServiceClient;
+	
+	public RespDTO<PushDTO> push(PushVO pushVO) {
+		RespDTO<PushDTO> pushResp=ltapiServiceClient.push(pushVO);
+		saveInputInfo(pushVO,JSONObject.toJSONString(pushResp));
+		return pushResp;
+	}
+
+	public RespDTO<Map<String, Object>> pushTreatment(PushVO pushVO) {
+		RespDTO<Map<String, Object>> treatmentResp=ltapiServiceClient.pushTreatment(pushVO);
+		saveInputInfo(pushVO,JSONObject.toJSONString(treatmentResp));
+		return treatmentResp;
+	}
+
+	public RespDTO<Map<String, Object>> pushScale(PushVO pushVO) {
+		RespDTO<Map<String, Object>> scaleResp=ltapiServiceClient.pushScale(pushVO);
+		saveInputInfo(pushVO,JSONObject.toJSONString(scaleResp));
+		return scaleResp;
+	}
+
+	public RespDTO<ConceptIntroduceDTO> getConceptDetail(ConceptVO conceptVO) {
+		ConceptIntroduceVO conceptIntroduceVO=new ConceptIntroduceVO();
+		RespDTO<ConceptIntroduceDTO> concepResp=ltapiServiceClient.getConceptDetail(conceptIntroduceVO);
+		//saveInputInfo(pushVO,"");
+		return concepResp;
+	}
+	
+	private void saveInputInfo(PushVO pushVO,String paramOut) {
+		InputInfo inputInfo = new InputInfo();
+		inputInfo.setHospitalCode(pushVO.getHosCode());
+		inputInfo.setHosptialDeptCode(pushVO.getHospitalDeptCopde());
+		inputInfo.setDoctorCode(pushVO.getDoctorCode());
+		inputInfo.setInquiryCode(pushVO.getInquiryCode());
+		inputInfo.setAge(pushVO.getAge());
+		inputInfo.setSexType(pushVO.getSex().toString());
+		inputInfo.setDiseaseName(pushVO.getDiseaseName());
+		inputInfo.setParamIn(JSONObject.toJSONString(pushVO));
+		inputInfo.setParamOut(paramOut);
+		inputInfo.setTransTime(DateUtil.format(new Date(), DateUtil.DATE_TIME_FORMAT));
+		inputInfo.setRemark(pushVO.getCode());
+		inputInfoFacade.saveInputInfo(inputInfo);
+	}
+}

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

@@ -19,6 +19,19 @@ import java.util.Map;
 @Component
 public class PacsConfigFacade extends PacsConfigServiceImpl{
 
+	/**
+	 * 根据医院编码和his辅检名称获取公表项
+	 * @param hosCode
+	 * @param mealName
+	 * @return
+	 */
+	public Map<String, Object> getPacsConfigByMealname(String hosCode,String mealName){
+		QueryWrapper<PacsConfig> pacsConfigQueryWrapper = new QueryWrapper<>();
+		pacsConfigQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("hospital_code",hosCode).eq("meal_name", mealName);
+		Map<String, Object> retMap = this.getMap(pacsConfigQueryWrapper);
+		return retMap;
+	}
+	
     /**
      * 根据医院编码获取辅检公表映射关系 Map<mealName,uniqueName>
      *

+ 219 - 57
tran-service/src/main/java/com/diagbot/facade/PushFacade.java

@@ -3,21 +3,29 @@ package com.diagbot.facade;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import com.alibaba.fastjson.JSONObject;
+import com.diagbot.dto.SysSetInfoDTO;
 import com.diagbot.entity.InputInfo;
+import com.diagbot.enums.SysTypeEnum;
 import com.diagbot.util.DateUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
 import com.diagbot.utils.ReadProperties;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.vo.ConceptIntroduceVO;
+import com.diagbot.vo.HosCodeVO;
+import com.diagbot.vo.HospitalSetVO;
 import com.diagbot.vo.PushJoinVO;
 import com.diagbot.vo.PushVO;
 
 /**
  * HIS接口对接业务
+ * 
  * @author QQ
  *
  */
@@ -25,79 +33,73 @@ import com.diagbot.vo.PushVO;
 public class PushFacade {
 	@Autowired
 	MrFacade mrFacade;
-	
+
 	@Autowired
 	ReadProperties readProperties;
-	
+
 	@Autowired
 	InputInfoFacade inputInfoFacade;
-	
+
+	@Autowired
+	SysSetFacade sysSetFacade;
+
 	@Autowired
 	TranLisConfigFacade tranLisConfigFacade;
-	
+
 	@Autowired
-    PacsConfigFacade pacsConfigFacade;
-	
+	PacsConfigFacade pacsConfigFacade;
+
 	@Autowired
-    TranDiseaseIcdFacade diseaseIcdFacade;
+	TranDiseaseIcdFacade diseaseIcdFacade;
 	
 	/**
-	 * plan: 配置信息编号,默认0
-	 * hospitalCode:医院code
-	 * mrId:医院数据唯一标识
-	 * tipsName: 静态信息名称(化验项名称、辅捡项名称)
-	 * tipsType: 静态信息类型(1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标)
+	 * plan: 配置信息编号,默认0 hospitalCode:医院code mrId:医院数据唯一标识 tipsName:
+	 * 静态信息名称(化验项名称、辅捡项名称) tipsType:
+	 * 静态信息类型(1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标)
 	 * showTab: 0默认显示治疗方案 1默认显示静态信息
+	 * 
 	 * @param pushVO
 	 * @return
 	 */
 	public String getDataService(PushVO pushVO) {
-		if(!"".equals(pushVO.getLisOrder()) && pushVO.getLisOrder()!=null) {
-			pushVO.setLisOrder(pushVO.getLisOrder().replace("(", "(").replace(")", ")"));
-		}
-		if(!"".equals(pushVO.getPacsOrder()) && pushVO.getPacsOrder() !=null) {
-			pushVO.setPacsOrder(pushVO.getPacsOrder().replace("(", "(").replace(")", ")"));
-		}
-		
-		List<ConceptIntroduceVO> conceptIntroduceVOList=new ArrayList<ConceptIntroduceVO>();
-		
-		
-		PushJoinVO pushJoinVO=new PushJoinVO();
+		PushJoinVO pushJoinVO = new PushJoinVO();
 		BeanUtil.copyProperties(pushVO, pushJoinVO);
-		//将基本参数保存到redis
-		String mrId=mrFacade.createMr(pushJoinVO);
-		//竖版
-		String url="";
-		String urlVer=readProperties.remoteAddressVer+"?hospitalCode="+pushVO.getHosCode()+"&mrId="+mrId;
-		String urlHor=readProperties.remoteAddressHor+"?hospitalCode="+pushVO.getHosCode()+"&mrId="+mrId;
-		 
-		if(("6").equals(pushVO.getCode())) {
-			//化验静态知识
-			//1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标
-			//urlHor+="&showTab=1&tipsName="+pushVO.getLisOrder()+"&tipsType=12&plan="+pushVO.getCode();
-			urlHor+="&showTab=1&tipsInfoList="+JSONObject.toJSONString(conceptIntroduceVOList)+"&plan="+pushVO.getCode();
-			url=urlHor;
-		}else if(("7").equals(pushVO.getCode())) {
-			//检查静态知识
-			//urlHor+="&showTab=1&tipsName="+pushVO.getPacsOrder()+"&tipsType=6&plan="+pushVO.getCode();
-			urlHor+="&showTab=1&tipsInfoList="+JSONObject.toJSONString(conceptIntroduceVOList)+"&plan="+pushVO.getCode();
-			url=urlHor;
-		}else if(("9").equals(pushVO.getCode())) {
-			//门诊医嘱
-			urlHor+="&showTab=0&tipsName="+pushVO.getDiag()+"&tipsType=7&plan="+pushVO.getCode();
-			url=urlHor;
-		}else {
-			//首程、大病历、门诊病历
-			urlVer+="&showTab=0&tipsName=&tipsType=&plan="+pushVO.getCode() ;
-			url=urlVer;
+		pushVO.setSysType(SysTypeEnum.DATA_SERVICE.getKey());//数据服务模式
+		// 将基本参数保存到redis
+		String mrId = mrFacade.createMr(pushJoinVO);
+		// 竖版
+		String url = "";
+		String urlVer = readProperties.remoteAddressVer + "?hospitalCode=" + pushVO.getHosCode() + "&mrId=" + mrId;
+		String urlHor = readProperties.remoteAddressHor + "?hospitalCode=" + pushVO.getHosCode() + "&mrId=" + mrId;
+
+		List<ConceptIntroduceVO> conceptIntroduceVOList = new ArrayList<ConceptIntroduceVO>();
+		if (isConnect(pushVO)) {
+			// 比对映射表中的辅检项
+			getPacsConfig(conceptIntroduceVOList, pushVO);
+			// 比对映射表中的化验项
+			getLisConfig(conceptIntroduceVOList, pushVO);
 		}
+		// 比对映射表中的诊断名称
+		getDisease(conceptIntroduceVOList, pushVO);
+
+		// 1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标
+		if ("hor".equalsIgnoreCase(pushVO.getShowType())) {
+			// 横版
+			urlHor += "&showTab=1&tipsInfoList=" + JSONObject.toJSONString(conceptIntroduceVOList) + "&plan=" + pushVO.getCode();
+			url = urlHor;
+		} else {
+			// 竖版
+			urlVer += "&showTab=0&tipsInfoList=" + JSONObject.toJSONString(conceptIntroduceVOList) + "&plan=" + pushVO.getCode();
+			url = urlVer;
+		}
+
 		//将请求记录到统计表
-		saveInputInfo(pushVO,url);
+		saveInputInfo(pushVO, url);
 		return url;
-	 }
-	 
-	 private void saveInputInfo(PushVO pushVO,String url) {
-		InputInfo inputInfo=new InputInfo();
+	}
+
+	private void saveInputInfo(PushVO pushVO, String url) {
+		InputInfo inputInfo = new InputInfo();
 		inputInfo.setHospitalCode(pushVO.getHosCode());
 		inputInfo.setHosptialDeptCode(pushVO.getHospitalDeptCopde());
 		inputInfo.setDoctorCode(pushVO.getDoctorCode());
@@ -110,7 +112,167 @@ public class PushFacade {
 		inputInfo.setTransTime(DateUtil.format(new Date(), DateUtil.DATE_TIME_FORMAT));
 		inputInfo.setRemark(pushVO.getCode());
 		inputInfoFacade.saveInputInfo(inputInfo);
-		
-	 }
-	 
+	}
+
+	/**
+	 * 比对诊断映射表公表项
+	 * 
+	 * @param conceptIntroduceVOList
+	 * @param pushVO
+	 */
+	private void getDisease(List<ConceptIntroduceVO> conceptIntroduceVOList, PushVO pushVO) {
+		// 比对映射表中的诊断名称
+		if (!"".equals(pushVO.getDiag()) && pushVO.getDiag() != null) {
+			String[] diagNames = pushVO.getDiag().split("\\|");
+			if (diagNames.length > 0) {
+				pushVO.setDiag(diagNames[0].toString());
+				if (isConnect(pushVO)) {
+					for (int i = 0; i < diagNames.length; i++) {
+						Map<String, Object> diseaseMap = diseaseIcdFacade.getDiseaseIcdByDiseaseName(pushVO.getHosCode(), diagNames[i].toString());
+						if (diseaseMap!=null) {
+							String diseaseName = diseaseMap.get("disease_name").toString();
+							if (!"".equals(diseaseName) && diseaseName != null) {
+								ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
+								conceptIntroduceVO.setName(diseaseName);
+								conceptIntroduceVO.setType(7);// 1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标
+								conceptIntroduceVO.setPosition(1);// 1-摘要,2-全文,5-药品说明书,6-不良反应
+								conceptIntroduceVOList.add(conceptIntroduceVO);
+							}
+						}
+					}
+				} else {
+					for (int i = 0; i < diagNames.length; i++) {
+						ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
+						conceptIntroduceVO.setName(diagNames[i]);
+						conceptIntroduceVO.setType(7);// 1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标
+						conceptIntroduceVO.setPosition(1);// 1-摘要,2-全文,5-药品说明书,6-不良反应
+						conceptIntroduceVOList.add(conceptIntroduceVO);
+					}
+				}
+
+			}
+		}
+
+	}
+
+	/**
+	 * 获取公表项中对应的辅检,未查询到时去化验公表项再查
+	 * 
+	 * @param pushVO
+	 */
+	private void getPacsConfig(List<ConceptIntroduceVO> conceptIntroduceVOList, PushVO pushVO) {
+		// 调整入参中的中文符号问题,包含括号、加号等
+		if (!"".equals(pushVO.getPacsOrder()) && pushVO.getPacsOrder() != null) {
+			pushVO.setPacsOrder(pushVO.getPacsOrder().replace("(", "(").replace(")", ")"));
+			// 比对映射表中的辅检项
+			Map<String, Object> pacsMap = pacsConfigFacade.getPacsConfigByMealname(pushVO.getHosCode(),
+					pushVO.getPacsOrder());
+			if (pacsMap!=null) {
+				String uniqueName = pacsMap.get("unique_name").toString();
+				if (!"".equals(uniqueName) && uniqueName != null) {
+					String[] uniqueNames = uniqueName.split("、");
+					for (int i = 0; i < uniqueNames.length; i++) {
+						ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
+						conceptIntroduceVO.setName(uniqueNames[i]);
+						conceptIntroduceVO.setType(6);// 1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标
+						conceptIntroduceVO.setPosition(1);// 1-摘要,2-全文,5-药品说明书,6-不良反应
+						conceptIntroduceVOList.add(conceptIntroduceVO);
+					}
+				}
+			} else {
+				Map<String, Object> lisMap = tranLisConfigFacade.getLisConfigByMealName(pushVO.getHosCode(),
+						pushVO.getPacsOrder());
+				if (lisMap!=null) {
+					String uniqueName = lisMap.get("unique_name").toString();
+					String[] uniqueNames = uniqueName.split("、");
+					for (int i = 0; i < uniqueNames.length; i++) {
+						ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
+						conceptIntroduceVO.setName(uniqueNames[i]);
+						conceptIntroduceVO.setType(12);// 1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标
+						conceptIntroduceVO.setPosition(1);// 1-摘要,2-全文,5-药品说明书,6-不良反应
+						conceptIntroduceVOList.add(conceptIntroduceVO);
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * 获取公表项中对应的化验,未查询到时去辅检公表项再查
+	 * 
+	 * @param conceptIntroduceVOList
+	 * @param pushVO
+	 */
+	private void getLisConfig(List<ConceptIntroduceVO> conceptIntroduceVOList, PushVO pushVO) {
+		// 比对映射表中的化验项
+		if (!"".equals(pushVO.getLisOrder()) && pushVO.getLisOrder() != null) {
+			pushVO.setLisOrder(pushVO.getLisOrder().replace("(", "(").replace(")", ")"));
+			Map<String, Object> lisMap = tranLisConfigFacade.getLisConfigByMealName(pushVO.getHosCode(),
+					pushVO.getLisOrder());
+			if (lisMap!=null) {
+				String uniqueName = lisMap.get("unique_name").toString();
+				String[] uniqueNames = uniqueName.split("、");
+				for (int i = 0; i < uniqueNames.length; i++) {
+					ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
+					conceptIntroduceVO.setName(uniqueNames[i]);
+					conceptIntroduceVO.setType(12);// 1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标
+					conceptIntroduceVO.setPosition(1);// 1-摘要,2-全文,5-药品说明书,6-不良反应
+					conceptIntroduceVOList.add(conceptIntroduceVO);
+				}
+			} else {
+				// 比对映射表中的辅检项
+				Map<String, Object> pacsMap = pacsConfigFacade.getPacsConfigByMealname(pushVO.getHosCode(),
+						pushVO.getLisOrder());
+				if (pacsMap != null) {
+					String uniqueName = pacsMap.get("unique_name").toString();
+					if (!"".equals(uniqueName) && uniqueName != null) {
+						String[] uniqueNames = uniqueName.split("、");
+						for (int i = 0; i < uniqueNames.length; i++) {
+							ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
+							conceptIntroduceVO.setName(uniqueNames[i]);
+							conceptIntroduceVO.setType(6);// 1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标
+							conceptIntroduceVO.setPosition(1);// 1-摘要,2-全文,5-药品说明书,6-不良反应
+							conceptIntroduceVOList.add(conceptIntroduceVO);
+						}
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * 查询是否开启对接公表
+	 * 
+	 * @param pushVO
+	 * @return
+	 */
+	private Boolean isConnect(PushVO pushVO) {
+		// 是否对接
+		Boolean isConnect = false;
+		if (StringUtil.isNotBlank(pushVO.getHosCode())) {
+			HosCodeVO hosCodeVO = new HosCodeVO();
+			hosCodeVO.setHosCode(pushVO.getHosCode());
+			HospitalSetVO hospitalSetVO = new HospitalSetVO();
+			hospitalSetVO.setHospitalCode(pushVO.getHosCode());
+			hospitalSetVO.setCode("connect");
+			if (pushVO.getSysType() != null) {
+				hospitalSetVO.setSysType(pushVO.getSysType());
+			} else {
+				hospitalSetVO.setSysType(SysTypeEnum.DATA_SERVICE.getKey());
+			}
+			List<SysSetInfoDTO> sysSetInfoList = sysSetFacade.getSysSetInfoData(hospitalSetVO);
+			if (sysSetInfoList.size() > 0) {
+				if (ListUtil.isNotEmpty(sysSetInfoList)) {
+					if (sysSetInfoList.get(0).getValue().equals(1)) {
+						isConnect = true;
+					} else {
+						isConnect = false;
+					}
+				} else {
+					isConnect = false;
+				}
+			}
+		}
+		return isConnect;
+	}
 }

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

@@ -22,6 +22,19 @@ import java.util.Map;
 @Component
 public class TranDiseaseIcdFacade extends DiseaseIcdServiceImpl {
 
+	/**
+	 * 根据医院编号和诊断名称获取公表项
+	 * @param hosCode
+	 * @param diseaseName
+	 * @return
+	 */
+	public Map<String, Object> getDiseaseIcdByDiseaseName(String hosCode,String diseaseName) {
+        QueryWrapper<DiseaseIcd> diseaseIcdQueryWrapper = new QueryWrapper<>();
+        diseaseIcdQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("hospital_code",hosCode).eq("disease_name", diseaseName);
+        Map<String, Object> retMap = this.getMap(diseaseIcdQueryWrapper);
+        return retMap;
+    }
+	
     /**
      * 根据医院编号和诊断ids获取各自的icd编码
      *

+ 14 - 0
tran-service/src/main/java/com/diagbot/facade/TranLisConfigFacade.java

@@ -22,6 +22,20 @@ import java.util.Map;
  */
 @Component
 public class TranLisConfigFacade extends TranLisConfigServiceImpl{
+	
+	/**
+	 * 根据医院编码和his化验名称获取公表项
+	 * @param hosCode
+	 * @param mealName
+	 * @return
+	 */
+	public Map<String, Object> getLisConfigByMealName(String hosCode,String mealName) {
+		QueryWrapper<TranLisConfig> lisConfigQueryWrapper = new QueryWrapper<>();
+		lisConfigQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("hospital_code",hosCode).eq("meal_name", mealName);
+		
+		Map<String, Object> retMap = this.getMap(lisConfigQueryWrapper);
+		return retMap;
+	}
 
 	/**
 	 * 根据医院编码查询公表映射配置

+ 13 - 0
tran-service/src/main/java/com/diagbot/vo/ConceptVO.java

@@ -0,0 +1,13 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class ConceptVO extends ConceptIntroduceVO{
+	private String hosCode;
+	private String hospitalDeptCopde;//科室编码
+	private String doctorCode;//医生编码
+	private String inquiryCode;//就诊编码
+}

+ 7 - 0
tran-service/src/main/java/com/diagbot/vo/PushVO.java

@@ -1,6 +1,7 @@
 package com.diagbot.vo;
 
 
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -14,4 +15,10 @@ public class PushVO extends PushJoinVO {
 	private String inquiryCode;//就诊编码
 	private String inquiryNum;//就诊次数
 	private String inquiryType;//就诊类别:1门诊,2住院
+	private String showType;//展示类型,ver:竖版,hor:横版
+	/**
+     * 访问的系统类型 1:user-service,2:diagbotman-service,3:uaa-service,4:log-service,5:bi-service,6:knowledge-service,7:feedback-service,8:icss-web
+     */
+	@ApiModelProperty(hidden = true)
+	private Integer sysType;
 }

+ 55 - 0
tran-service/src/main/java/com/diagbot/web/LtapiController.java

@@ -0,0 +1,55 @@
+package com.diagbot.web;
+
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.client.bean.ConceptIntroduceDTO;
+import com.diagbot.client.bean.PushDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.LtapiFacade;
+import com.diagbot.vo.ConceptVO;
+import com.diagbot.vo.PushVO;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+@RestController
+@RequestMapping("/ltapi")
+@Api(value = "HIS引擎模式接口对接", tags = { "HIS引擎模式接口对接" })
+public class LtapiController {
+	@Autowired
+	LtapiFacade ltapiFacade;
+	
+	@ApiOperation(value = "推理-数据引擎模式对接")
+    @PostMapping("/pushApi")
+    @SysLogger("pushApi")
+    public RespDTO<PushDTO> push(PushVO pushVO) {
+		return ltapiFacade.push(pushVO);
+	}
+
+    @ApiOperation(value = "治疗方案推理-数据引擎模式对接")
+    @PostMapping("/treatmentApi")
+    @SysLogger("treatmentApi")
+	public RespDTO<Map<String, Object>> pushTreatment(PushVO pushVO) {
+		return ltapiFacade.pushTreatment(pushVO);
+	}
+
+    @ApiOperation(value = "量表-数据引擎模式对接")
+    @PostMapping("/scaleApi")
+    @SysLogger("scaleApi")
+	public RespDTO<Map<String, Object>> pushScale(PushVO pushVO) {
+		return ltapiFacade.pushScale(pushVO);
+	}
+
+    @ApiOperation(value = "治疗方案推理-数据引擎模式对接")
+    @PostMapping("/conceptDetailApi")
+    @SysLogger("conceptDetailApi")
+	public RespDTO<ConceptIntroduceDTO> getConceptDetail(ConceptVO conceptVO) {
+		return ltapiFacade.getConceptDetail(conceptVO);
+	}
+}

+ 0 - 1
tran-service/src/main/java/com/diagbot/web/PushController.java

@@ -32,5 +32,4 @@ public class PushController {
 		String data=pushFacade.getDataService(pushVO);
 		return RespDTO.onSuc(data);
 	}
-
 }

+ 2 - 2
tran-service/src/main/resources/jdbc.properties

@@ -5,8 +5,8 @@ jdbc.username=root
 jdbc.password=root
 
 #\u6570\u636e\u670d\u52a1\u6a21\u5f0f
-remote.address.ver=http://192.18.101.207:2030/index.html
-remote.address.hor=http://192.18.101.207:2030/indexHorizontal.html
+remote.address.ver=http://192.168.2.122:5446/index.html
+remote.address.hor=http://192.168.2.122:5446/indexHorizontal.html
 
 #his\u65b9\u60a3\u8005\u63a5\u53e3\u5730\u5740
 his.patient.url=