Selaa lähdekoodia

新增分支-银江

lantone 5 vuotta sitten
vanhempi
commit
0e0ab5d9f3
22 muutettua tiedostoa jossa 924 lisäystä ja 26 poistoa
  1. 7 7
      config-server/src/main/resources/shared/aipt-service-local.yml
  2. 1 1
      config-server/src/main/resources/shared/application-local.yml
  3. 2 2
      config-server/src/main/resources/shared/data-service-local.yml
  4. 4 4
      config-server/src/main/resources/shared/gateway-service-local.yml
  5. 4 4
      config-server/src/main/resources/shared/logger-service-local.yml
  6. 2 2
      config-server/src/main/resources/shared/ltapi-service-local.yml
  7. 6 6
      config-server/src/main/resources/shared/tran-service-local.yml
  8. 133 0
      tran-service/src/main/java/com/diagbot/entity/InputInfo.java
  9. 20 0
      tran-service/src/main/java/com/diagbot/facade/InputInfoFacade.java
  10. 13 0
      tran-service/src/main/java/com/diagbot/facade/PacsConfigFacade.java
  11. 372 0
      tran-service/src/main/java/com/diagbot/facade/PushFacade.java
  12. 13 0
      tran-service/src/main/java/com/diagbot/facade/TranDiseaseIcdFacade.java
  13. 8 0
      tran-service/src/main/java/com/diagbot/mapper/InputInfoMapper.java
  14. 13 0
      tran-service/src/main/java/com/diagbot/service/InputInfoService.java
  15. 18 0
      tran-service/src/main/java/com/diagbot/service/impl/InputInfoServiceImpl.java
  16. 32 0
      tran-service/src/main/java/com/diagbot/util/ReadProperties.java
  17. 29 0
      tran-service/src/main/java/com/diagbot/vo/ConceptIntroduceVO.java
  18. 50 0
      tran-service/src/main/java/com/diagbot/vo/MedicalHistory.java
  19. 124 0
      tran-service/src/main/java/com/diagbot/vo/PushVO.java
  20. 35 0
      tran-service/src/main/java/com/diagbot/web/PushController.java
  21. 12 0
      tran-service/src/main/resources/jdbc.properties
  22. 26 0
      tran-service/src/main/resources/mapper/InputInfoMapper.xml

+ 7 - 7
config-server/src/main/resources/shared/aipt-service-local.yml

@@ -7,9 +7,9 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.236:3306/med?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://192.168.2.132:3306/med?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
-      password: lantone
+      password: zjltzk@2020
       # 连接池的配置信息
       # 初始化大小,最小,最大
       initialSize: 5
@@ -61,8 +61,8 @@ spring:
   rabbitmq:
     host: localhost
     port: 5672
-    username: guest
-    password: guest
+    username: lantone
+    password: lantone
     publisher-confirms: true
     virtual-host: /
 
@@ -99,12 +99,12 @@ io.github.lvyahui8.spring.base-packages: com.diagbot.aggregate
 
 ai:
   server:
-    address: http://192.168.2.234:5008
+    address: http://192.168.2.132:5008
 
 nlp:
   server:
-    address: http://192.168.2.234:5002
+    address: http://192.168.2.132:5002
 
 aineo:
   server:
-    address: http://192.168.2.234:8888
+    address: http://192.168.2.132:8888

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

@@ -103,4 +103,4 @@ crypt:
 
 mrqc:
   server:
-    address: http://192.168.2.234:8090
+    address: http://192.168.2.132:8090

+ 2 - 2
config-server/src/main/resources/shared/data-service-local.yml

@@ -16,7 +16,7 @@ spring:
   rabbitmq:
     host: localhost
     port: 5672
-    username: guest
-    password: guest
+    username: lantone
+    password: lantone
     publisher-confirms: true
     virtual-host: /

+ 4 - 4
config-server/src/main/resources/shared/gateway-service-local.yml

@@ -18,8 +18,8 @@ spring:
   redis:
     database:
       cache: 0 # Redis限流缓存索引
-    host: 192.168.2.236  #Redis服务器地址
-    port: 6378 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
+    host: 192.168.2.132  #Redis服务器地址
+    port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
     password: lantone # Redis服务器连接密码(默认为空)
     lettuce:
       pool:
@@ -32,8 +32,8 @@ spring:
   rabbitmq:
     host: localhost
     port: 5672
-    username: guest
-    password: guest
+    username: lantone
+    password: lantone
     publisher-confirms: true
     virtual-host: /
   cloud:

+ 4 - 4
config-server/src/main/resources/shared/logger-service-local.yml

@@ -7,9 +7,9 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.236:3306/sys-log?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://192.168.2.132:3306/sys-log?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
-      password: lantone
+      password: zjltzk@2020
       # 连接池的配置信息
       # 初始化大小,最小,最大
       initialSize: 5
@@ -69,8 +69,8 @@ spring:
   rabbitmq:
     host: localhost
     port: 5672
-    username: guest
-    password: guest
+    username: lantone
+    password: lantone
     publisher-confirms: true
     virtual-host: /
 

+ 2 - 2
config-server/src/main/resources/shared/ltapi-service-local.yml

@@ -16,7 +16,7 @@ spring:
   rabbitmq:
     host: localhost
     port: 5672
-    username: guest
-    password: guest
+    username: lantone
+    password: lantone
     publisher-confirms: true
     virtual-host: /

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

@@ -7,9 +7,9 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.236:3306/sys-tran?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://192.168.2.132:3306/sys-tran?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
-      password: lantone
+      password: zjltzk@2020
       # 连接池的配置信息
       # 初始化大小,最小,最大
       initialSize: 5
@@ -61,8 +61,8 @@ spring:
   rabbitmq:
     host: localhost
     port: 5672
-    username: guest
-    password: guest
+    username: lantone
+    password: lantone
     publisher-confirms: true
     virtual-host: /
 
@@ -70,8 +70,8 @@ spring:
   redis:
     database:
       mr: 7 # Redis病历索引
-    host: 192.168.2.236  #Redis服务器地址
-    port: 6378 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
+    host: 192.168.2.132  #Redis服务器地址
+    port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
     password: lantone # Redis服务器连接密码(默认为空)
     lettuce:
       pool:

+ 133 - 0
tran-service/src/main/java/com/diagbot/entity/InputInfo.java

@@ -0,0 +1,133 @@
+package com.diagbot.entity;
+
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+@TableName("tran_input_info")
+public class InputInfo implements Serializable{
+	private static final long serialVersionUID = 1L;
+	
+	/**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+	private Long id;
+
+    private String hospitalCode; //医院编码、ID
+    private String hosptialName;//医院名称
+    private String hosptialDeptCode;//科室编码、ID
+    private String hosptialDeptName;//科室名称
+    private String doctorCode;//医生编码、ID
+    private String doctorName;//医生名称
+    private String inquiryCode; //就诊ID
+    private String patientId;
+    private long age;//年龄
+	private String sexType;//性别,1:男,2:女
+	private String diseaseName;//疾病名称
+	
+	private String paramIn;
+	private String paramOut;
+	private String transTime;
+	private String remark;
+	
+	public long getAge() {
+		return age;
+	}
+	public void setAge(long age) {
+		this.age = age;
+	}
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public String getHospitalCode() {
+		return hospitalCode;
+	}
+	public void setHospitalCode(String hospitalCode) {
+		this.hospitalCode = hospitalCode;
+	}
+	public String getHosptialName() {
+		return hosptialName;
+	}
+	public void setHosptialName(String hosptialName) {
+		this.hosptialName = hosptialName;
+	}
+	public String getHosptialDeptCode() {
+		return hosptialDeptCode;
+	}
+	public void setHosptialDeptCode(String hosptialDeptCode) {
+		this.hosptialDeptCode = hosptialDeptCode;
+	}
+	public String getHosptialDeptName() {
+		return hosptialDeptName;
+	}
+	public void setHosptialDeptName(String hosptialDeptName) {
+		this.hosptialDeptName = hosptialDeptName;
+	}
+	public String getDoctorCode() {
+		return doctorCode;
+	}
+	public void setDoctorCode(String doctorCode) {
+		this.doctorCode = doctorCode;
+	}
+	public String getDoctorName() {
+		return doctorName;
+	}
+	public void setDoctorName(String doctorName) {
+		this.doctorName = doctorName;
+	}
+	public String getInquiryCode() {
+		return inquiryCode;
+	}
+	public void setInquiryCode(String inquiryCode) {
+		this.inquiryCode = inquiryCode;
+	}
+	public String getPatientId() {
+		return patientId;
+	}
+	public void setPatientId(String patientId) {
+		this.patientId = patientId;
+	}
+	public String getSexType() {
+		return sexType;
+	}
+	public void setSexType(String sexType) {
+		this.sexType = sexType;
+	}
+	public String getDiseaseName() {
+		return diseaseName;
+	}
+	public void setDiseaseName(String diseaseName) {
+		this.diseaseName = diseaseName;
+	}
+	public String getParamIn() {
+		return paramIn;
+	}
+	public void setParamIn(String paramIn) {
+		this.paramIn = paramIn;
+	}
+	public String getParamOut() {
+		return paramOut;
+	}
+	public void setParamOut(String paramOut) {
+		this.paramOut = paramOut;
+	}
+	public String getTransTime() {
+		return transTime;
+	}
+	public void setTransTime(String transTime) {
+		this.transTime = transTime;
+	}
+	public String getRemark() {
+		return remark;
+	}
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+	
+}

+ 20 - 0
tran-service/src/main/java/com/diagbot/facade/InputInfoFacade.java

@@ -0,0 +1,20 @@
+package com.diagbot.facade;
+
+import org.springframework.stereotype.Component;
+
+import com.diagbot.entity.InputInfo;
+import com.diagbot.service.impl.InputInfoServiceImpl;
+
+/**
+ * 
+ * @author QQ
+ * @time 2019-05-13
+ */
+@Component
+public class InputInfoFacade extends InputInfoServiceImpl{
+
+	public Boolean saveInputInfo(InputInfo inputInfo){
+		this.save(inputInfo);
+		return true;
+	}
+}

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

@@ -23,6 +23,19 @@ import java.util.stream.Collectors;
 @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>
      *

+ 372 - 0
tran-service/src/main/java/com/diagbot/facade/PushFacade.java

@@ -0,0 +1,372 @@
+package com.diagbot.facade;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import com.diagbot.biz.push.entity.Item;
+import com.diagbot.biz.push.entity.Lis;
+import com.diagbot.biz.push.entity.Pacs;
+import com.google.common.collect.Lists;
+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.util.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
+ *
+ */
+@Component
+public class PushFacade {
+	@Autowired
+	MrFacade mrFacade;
+
+	@Autowired
+	ReadProperties readProperties;
+
+	@Autowired
+	InputInfoFacade inputInfoFacade;
+
+	@Autowired
+	SysSetFacade sysSetFacade;
+
+	@Autowired
+	TranLisConfigFacade tranLisConfigFacade;
+
+	@Autowired
+	PacsConfigFacade pacsConfigFacade;
+
+	@Autowired
+	TranDiseaseIcdFacade diseaseIcdFacade;
+	
+	/**
+	 * 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) {
+		PushJoinVO pushJoinVO = new PushJoinVO();
+		BeanUtil.copyProperties(pushVO, pushJoinVO);
+		//病史
+		if(pushVO.getMedicalHistory()!=null){
+			pushJoinVO.setPasts(pushVO.getMedicalHistory().getPasts());
+			pushJoinVO.setInfectious(pushVO.getMedicalHistory().getInfectious());
+			pushJoinVO.setOperation(pushVO.getMedicalHistory().getOther());
+			pushJoinVO.setAllergy(pushVO.getMedicalHistory().getAllergy());
+			pushJoinVO.setVaccination(pushVO.getMedicalHistory().getVaccination());
+			pushJoinVO.setPersonal(pushVO.getMedicalHistory().getPersonal());
+			pushJoinVO.setMarital(pushVO.getMedicalHistory().getMarital());
+			pushJoinVO.setFamily(pushVO.getMedicalHistory().getFamily());
+			pushJoinVO.setMenstrual(pushVO.getMedicalHistory().getMenstrual());
+			pushJoinVO.setOther(pushVO.getMedicalHistory().getOther());
+		}
+		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>();
+		List<Pacs> pacsList= Lists.newArrayList();
+		List<Lis> lisList= Lists.newArrayList();
+		List<Item> diagList= Lists.newArrayList();
+		//格式化化验、辅检、诊断
+		if (isConnect(pushVO)) {
+			// 比对映射表中的辅检项
+			if(StringUtil.isNotBlank(pushVO.getPacsOrder())){
+				//getPacsConfig(conceptIntroduceVOList, pushVO,pacs);
+				String[] pacsNames = pushVO.getPacsOrder().split("\\|");
+				if (pacsNames.length > 0) {
+					for (int i = 0; i < pacsNames.length; i++) {
+						Pacs pacs=new Pacs();
+						pacs.setName(pacsNames[i]);
+						pacsList.add(pacs);
+					}
+				}
+			}
+
+			// 比对映射表中的化验项
+			if(StringUtil.isNotBlank(pushVO.getLisOrder())){
+				//getLisConfig(conceptIntroduceVOList, pushVO);
+				String[] lisNames = pushVO.getLisOrder().split("\\|");
+				if (lisNames.length > 0) {
+					for (int i = 0; i < lisNames.length; i++) {
+						Lis lis=new Lis();
+						lis.setName(lisNames[i]);
+						lisList.add(lis);
+					}
+				}
+			}
+
+			// 比对映射表中的诊断名称
+			if(StringUtil.isNotBlank(pushVO.getDiagOrder())){
+				//getDisease(conceptIntroduceVOList, pushVO);
+				String[] diseaseNames = pushVO.getPacsOrder().split("\\|");
+				if (diseaseNames.length > 0) {
+					for (int i = 0; i < diseaseNames.length; i++) {
+						Map<String, Object> diseaseMap = diseaseIcdFacade.getDiseaseIcdByDiseaseName(pushVO.getHosCode(), diseaseNames[i].toString());
+						if (diseaseMap!=null) {
+							String diseaseName = diseaseMap.get("concept_dis_name").toString();
+							if (StringUtil.isNotBlank(diseaseName)) {
+								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);
+
+								Item item=new Item();
+								item.setName(diseaseNames[i]);
+								item.setUniqueName(diseaseName);
+								diagList.add(item);
+							}
+						}
+					}
+				}
+			}
+		}
+
+
+		// 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);
+		return url;
+	}
+
+	private void saveInputInfo(PushVO pushVO, String url) {
+		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(url);
+		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());
+				//pushVO.setDiseaseName(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("concept_dis_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,List<Pacs> pacsList) {
+
+			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);
+
+					}
+				}
+			}
+			/*
+		// 调整入参中的中文符号问题,包含括号、加号等
+		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

@@ -24,6 +24,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编码
      *

+ 8 - 0
tran-service/src/main/java/com/diagbot/mapper/InputInfoMapper.java

@@ -0,0 +1,8 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.InputInfo;
+
+public interface InputInfoMapper extends BaseMapper<InputInfo>{
+
+}

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

@@ -0,0 +1,13 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.InputInfo;
+
+/**
+ * 
+ * @author QQ
+ * @time 2019-05-13
+ */
+public interface InputInfoService extends IService<InputInfo>{
+
+}

+ 18 - 0
tran-service/src/main/java/com/diagbot/service/impl/InputInfoServiceImpl.java

@@ -0,0 +1,18 @@
+package com.diagbot.service.impl;
+
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.InputInfo;
+import com.diagbot.mapper.InputInfoMapper;
+import com.diagbot.service.InputInfoService;
+
+/**
+ * 统计用
+ * @author QQ
+ * @time 2019-05-13
+ */
+@Service
+public class InputInfoServiceImpl extends ServiceImpl<InputInfoMapper, InputInfo> implements InputInfoService{
+
+}

+ 32 - 0
tran-service/src/main/java/com/diagbot/util/ReadProperties.java

@@ -0,0 +1,32 @@
+package com.diagbot.util;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.stereotype.Component;
+
+@Component
+@PropertySource(value={"classpath:jdbc.properties"})
+public class ReadProperties {
+
+	@Value(value="${remote.address.ver}")
+	public String remoteAddressVer;
+	
+	@Value(value="${remote.address.hor}")
+	public String remoteAddressHor;
+
+	public String getRemoteAddressVer() {
+		return remoteAddressVer;
+	}
+
+	public String getRemoteAddressHor() {
+		return remoteAddressHor;
+	}
+
+	@Value(value="${his.patient.url}")
+	public String hisPatientUrl;
+
+	public String getHisPatientUrl() {
+		return hisPatientUrl;
+	}
+	
+}

+ 29 - 0
tran-service/src/main/java/com/diagbot/vo/ConceptIntroduceVO.java

@@ -0,0 +1,29 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @Description:获取提示信息入参
+ * @Author:zhaops
+ * @time: 2019/5/6 15:43
+ */
+@Getter
+@Setter
+public class ConceptIntroduceVO {
+    @NotBlank(message = "请输入概念名称")
+    private String name;
+    @NotNull(message = "请输入概念词性")
+    private Integer type;
+    //此版本暂不提供该过滤条件
+    @ApiModelProperty(hidden = true)
+    private Integer position;
+    //此版本暂不提供该过滤条件
+    @ApiModelProperty(hidden = true)
+    private List<String> titles;
+}

+ 50 - 0
tran-service/src/main/java/com/diagbot/vo/MedicalHistory.java

@@ -0,0 +1,50 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class MedicalHistory {
+
+    /**
+     * 既往史
+     */
+    private String pasts;
+    /**
+     * 传染病史
+     */
+    private String infectious;
+    /**
+     * 手术外伤史
+     */
+    private String operation;
+    /**
+     * 过敏史
+     */
+    private String allergy;
+    /**
+     * 接种史
+     */
+    private String vaccination;
+    /**
+     * 个人史
+     */
+    private String personal;
+    /**
+     * 婚育史
+     */
+    private String marital;
+    /**
+     * 家族史
+     */
+    private String family;
+    /**
+     * 月经史
+     */
+    private String menstrual;
+    /**
+     * 其他史
+     */
+    private String other;
+}

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

@@ -0,0 +1,124 @@
+package com.diagbot.vo;
+
+
+import com.diagbot.biz.push.entity.Item;
+import com.diagbot.biz.push.entity.Lis;
+import com.diagbot.biz.push.entity.Pacs;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+@Getter
+@Setter
+public class PushVO {
+	private String code;//接口类型:2首程 ,3大病历,6化验静态知识, 7辅检静态知识,8门诊病历,9门诊医嘱
+	private String hospitalDeptCopde;//科室编码
+	private String doctorCode;//医生编码
+	private String inquiryCode;//就诊编码
+	private String inquiryNum;//就诊次数
+	private String inquiryType;//就诊类别:1门诊,2住院
+	private String showType;//展示类型,ver:竖版,Hor:横版
+	private Integer sysType;
+
+	/**
+	 * 医院编码
+	 */
+	private String hosCode;
+
+	/**
+	 * 年龄
+	 */
+	@NotNull(message = "请输入年龄")
+	private Integer age;
+	/**
+	 * 性别
+	 */
+	@NotNull(message = "请输入性别")
+	private Integer sex;
+
+	/**
+	 * 婚姻
+	 */
+	private String marriage;
+	/**
+	 * 主诉
+	 */
+	private String chief;
+	/**
+	 * 现病史
+	 */
+	private String symptom;
+	/**
+	 * 查体
+	 */
+	private String vital;
+
+	private MedicalHistory medicalHistory;
+
+	/**
+	 * 化验文本数据
+	 */
+	private String lisString;
+	/**
+	 * 辅检文本数据
+	 */
+	private String pacsString;
+	/**
+	 * 诊断文本数据
+	 */
+	private String diagString;
+	/**
+	 * 药品文本数据
+	 */
+	private String drugString;
+	/**
+	 * 不能分类文本
+	 */
+	private String unknown;
+	/**
+	 * 化验项目和结果
+	 */
+	private String lis;
+	/**
+	 * 辅检项目和结果
+	 */
+	private String pacs;
+	/**
+	 * 诊断
+	 */
+	private String diag;
+	/**
+	 * 药品
+	 */
+	private String drug;
+	/**
+	 * 当前化验开单项
+	 */
+	private String lisOrder;
+	/**
+	 * 当前辅检开单项
+	 */
+	private String pacsOrder;
+	/**
+	 * 当前诊断开单项
+	 */
+	private String diagOrder;
+	/**
+	 * 当前药品开单项
+	 */
+	private String drugOrder;
+	/**
+	 * 当前手术开单项
+	 */
+	private String operationOrder;
+	/**
+	 * 其他开单项
+	 */
+	private String otherOrder;
+	/**
+	 * 选中诊断
+	 */
+	private String diseaseName;
+}

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

@@ -0,0 +1,35 @@
+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.RespDTO;
+import com.diagbot.facade.PushFacade;
+import com.diagbot.vo.PushVO;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+@RestController
+@RequestMapping("/push")
+@Api(value = "HIS接口对接", tags = { "HIS接口对接" })
+@SuppressWarnings("unchecked")
+public class PushController {
+
+	@Autowired
+    PushFacade pushFacade;
+
+    @ApiOperation(value = "HIS接口对接")
+    @PostMapping("/getDataService")
+    @SysLogger("getDataService")
+	public RespDTO<String> getDataService(@RequestBody @Valid PushVO pushVO) {
+		String data=pushFacade.getDataService(pushVO);
+		return RespDTO.onSuc(data);
+	}
+}

+ 12 - 0
tran-service/src/main/resources/jdbc.properties

@@ -0,0 +1,12 @@
+#\u6570\u636e\u5e93\u914d\u7f6e
+jdbc.driverClassName=com.mysql.jdbc.Driver
+jdbc.url=jdbc:mysql://127.0.0.1:3306/diagbot-app?useUnicode=true&characterEncoding=UTF-8
+jdbc.username=root
+jdbc.password=root
+
+#\u6570\u636e\u670d\u52a1\u6a21\u5f0f
+remote.address.ver=http://192.162.2.132:5547/index.html
+remote.address.hor=http://192.162.2.132:5547/indexHorizontal.html
+
+#his\u65b9\u60a3\u8005\u63a5\u53e3\u5730\u5740
+his.patient.url=

+ 26 - 0
tran-service/src/main/resources/mapper/InputInfoMapper.xml

@@ -0,0 +1,26 @@
+<?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.InputInfoMapper">
+	
+	<!-- 通用查询映射结果 -->
+	<resultMap type="com.diagbot.entity.InputInfo" id="BaseResultMap">
+		<id property="id" column="id"/>
+		<result property="hospitalCode" column="hospital_code"/>
+		<result property="hosptialName" column="hosptial_name"/>
+		<result property="hosptialDeptCode" column="hosptial_dept_code"/>
+		<result property="hosptialDeptName" column="hosptial_dept_name"/>
+		<result property="doctorCode" column="doctor_code"/>
+		<result property="doctorName" column="doctor_name"/>
+		<result property="inquiryCode" column="inquiry_code"/>
+		<result property="diseaseName" column="disease_name"/>
+		<result property="patientId" column="patient_id"/>
+		<result property="age" column="age"/>
+		<result property="sexType" column="sex_type"/>
+		<result property="paramIn" column="param_in"/>
+		<result property="paramOut" column="param_out"/>
+		<result property="transTime" column="trans_time"/>
+		<result property="remark" column="remark"/>
+	</resultMap>
+
+</mapper>