ソースを参照

配置变更、统计

liuqq 5 年 前
コミット
16b29e766f

+ 4 - 4
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.156.176:3306/med?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
-      password: lantone
+      password: lt@great
       # 连接池的配置信息
       # 初始化大小,最小,最大
       initialSize: 5
@@ -97,8 +97,8 @@ mybatis-plus:
 
 ai:
   server:
-    address: http://192.168.2.234:5008
+    address: http://192.168.156.176:5008
 
 nlp:
   server:
-    address: http://192.168.2.234:5002
+    address: http://192.168.156.176:5002

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

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

+ 2 - 2
config-server/src/main/resources/shared/icss-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-icss?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://192.168.156.176:3306/sys-icss?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
-      password: lantone
+      password: lt@great
       # 连接池的配置信息
       # 初始化大小,最小,最大
       initialSize: 5

+ 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.156.176:3306/sys-log?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
-      password: lantone
+      password: lt@great
       # 连接池的配置信息
       # 初始化大小,最小,最大
       initialSize: 5
@@ -64,8 +64,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

@@ -14,7 +14,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/prec-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-prec?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://192.168.156.176:3306/sys-prec?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
-      password: lantone
+      password: lt@great
       # 连接池的配置信息
       # 初始化大小,最小,最大
       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: /
 
@@ -101,7 +101,7 @@ fastdfs:
   charset: UTF-8
   http_tracker_http_port: 8080
   http_anti_steal_token: no
-  tracker_servers: 192.168.2.236:22122
+  tracker_servers: 192.168.156.176:22122
 
 imageUrl:
-  prefix: http://192.168.2.236:82
+  prefix: http://192.168.156.176:82

+ 5 - 5
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.156.176:3306/sys-tran?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
-      password: lantone
+      password: lt@great
       # 连接池的配置信息
       # 初始化大小,最小,最大
       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,7 +70,7 @@ spring:
   redis:
     database:
       mr: 8 # Redis病历索引
-    host: 192.168.2.236  #Redis服务器地址
+    host: 192.168.156.176  #Redis服务器地址
     port: 6379 # Redis服务器连接端口
     password: lantone # Redis服务器连接密码(默认为空)
     lettuce:

+ 12 - 0
tran-service/src/main/java/com/diagbot/dto/InputInfoDTO.java

@@ -0,0 +1,12 @@
+package com.diagbot.dto;
+
+import com.diagbot.entity.InputInfo;
+
+/**
+ * 
+ * @author QQ
+ * @time: 2019/5/13
+ */
+public class InputInfoDTO extends InputInfo{
+
+}

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

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

@@ -0,0 +1,77 @@
+package com.diagbot.facade;
+
+import java.util.Date;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.alibaba.fastjson.JSONObject;
+import com.diagbot.entity.InputInfo;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.utils.ReadProperties;
+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;
+	/**
+	 * 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) {
+		//竖版
+		String url=readProperties.remoteAddressVer+"?hospitalCode="+pushVO.getHosCode();
+		 
+		PushJoinVO pushJoinVO=new PushJoinVO();
+		BeanUtil.copyProperties(pushVO, pushJoinVO);
+		 
+		//将基本参数保存到redis
+		String mrId=mrFacade.createMr(pushJoinVO);
+		url+="&mrId="+mrId;
+		if(pushVO.getCode()!=null) {
+			url+="&plan="+pushVO.getCode() ;
+		}
+		url+="&tipsName=&tipsType=";
+		url+="&showTab=0";
+		 //将请求记录到统计表
+		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);
+		
+	 }
+}

+ 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/utils/ReadProperties.java

@@ -0,0 +1,32 @@
+package com.diagbot.utils;
+
+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;
+	}
+	
+}

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

@@ -0,0 +1,15 @@
+package com.diagbot.vo;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class PushVO extends PushJoinVO {
+	private String code;
+	private String hosCode;
+	private String hospitalDeptCopde;
+	private String doctorCode;
+	private String inquiryCode;
+}

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

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

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

@@ -0,0 +1,13 @@
+#\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.168.156.176:5545/index.html
+remote.address.hor=http://192.168.156.176:5545/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>