浏览代码

调整数据库配置

liuqq 5 年之前
父节点
当前提交
d4b11531cd

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

@@ -7,7 +7,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://10.48.45.180:3306/med?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://10.48.45.182:3306/med?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
       password: lt@great
       # 连接池的配置信息
@@ -99,12 +99,12 @@ io.github.lvyahui8.spring.base-packages: com.diagbot.aggregate
 
 ai:
   server:
-    address: http://10.48.45.180:5008
+    address: http://10.48.45.182:5008
 
 nlp:
   server:
-    address: http://10.48.45.180:5002
+    address: http://10.48.45.182:5002
 
 aineo:
   server:
-    address: http://10.48.45.180:8888
+    address: http://10.48.45.182:8888

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

@@ -7,7 +7,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://10.48.45.180:3306/sys-log?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://10.48.45.182:3306/sys-log?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
       password: lt@great
       # 连接池的配置信息

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

@@ -7,7 +7,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://10.48.45.180:3306/sys-tran?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://10.48.45.182:3306/sys-tran?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
       password: lt@great
       # 连接池的配置信息

+ 6 - 284
tran-service/src/main/java/com/diagbot/facade/PushFacade.java

@@ -1,22 +1,20 @@
 package com.diagbot.facade;
 
 import com.alibaba.fastjson.JSONObject;
-import com.diagbot.biz.push.entity.Item;
-import com.diagbot.biz.push.entity.Lis;
-import com.diagbot.biz.push.entity.Pacs;
-import com.diagbot.dto.SysSetInfoDTO;
 import com.diagbot.entity.InputInfo;
 import com.diagbot.enums.SysTypeEnum;
-import com.diagbot.util.*;
-import com.diagbot.vo.*;
-import com.google.common.collect.Lists;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.ReadProperties;
+import com.diagbot.vo.ConceptIntroduceVO;
+import com.diagbot.vo.PushJoinVO;
+import com.diagbot.vo.PushVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
-import java.util.Map;
 
 /**
  * HIS接口对接业务
@@ -62,89 +60,6 @@ public class PushFacade {
 		BeanUtil.copyProperties(pushVO, pushJoinVO);
 
 		List<ConceptIntroduceVO> conceptIntroduceVOList = new ArrayList<ConceptIntroduceVO>();
-		List<Pacs> pacsList= Lists.newArrayList();
-		List<Lis> lisList= Lists.newArrayList();
-		List<Item> diagList= Lists.newArrayList();
-		List<Item> operationList= Lists.newArrayList();
-		List<Item> drugList= Lists.newArrayList();
-		//格式化化验、辅检、诊断
-		// 比对映射表中的辅检项
-		if(StringUtil.isNotBlank(pushVO.getPacsOrder())){
-			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())){
-			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())){
-			String[] diseaseNames = pushVO.getDiagOrder().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);
-
-							if(i==0){
-								pushJoinVO.setDiseaseName(item);
-							}
-						}
-					}
-				}
-			}
-		}
-
-		// 比对映射表中的药品项
-		if(StringUtil.isNotBlank(pushVO.getDrugOrder())){
-			String[] drugNames = pushVO.getDrugOrder().split("\\|");
-			if (drugNames.length > 0) {
-				for (int i = 0; i < drugNames.length; i++) {
-					Item item=new Item();
-					item.setName(drugNames[i]);
-					item.setUniqueName(drugNames[i]);
-					drugList.add(item);
-				}
-			}
-		}
-		// 比对映射表中的药品项
-		if(StringUtil.isNotBlank(pushVO.getOperationOrder())){
-			String[] operationNames = pushVO.getOperationOrder().split("\\|");
-			if (operationNames.length > 0) {
-				for (int i = 0; i < operationNames.length; i++) {
-					Item item=new Item();
-					item.setName(operationNames[i]);
-					item.setUniqueName(operationNames[i]);
-					operationList.add(item);
-				}
-			}
-		}
 
 		//病史
 		if(pushVO.getMedicalHistory()!=null){
@@ -159,11 +74,6 @@ public class PushFacade {
 			pushJoinVO.setMenstrual(pushVO.getMedicalHistory().getMenstrual());
 			pushJoinVO.setOther(pushVO.getMedicalHistory().getOther());
 		}
-		pushJoinVO.setPacsOrder(pacsList);
-		pushJoinVO.setLisOrder(lisList);
-		pushJoinVO.setDiagOrder(diagList);
-		pushJoinVO.setOperationOrder(operationList);
-		pushJoinVO.setDrugOrder(drugList);
 
 		// 将基本参数保存到redis
 		String mrId = mrFacade.createMr(pushJoinVO);
@@ -203,192 +113,4 @@ public class PushFacade {
 		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;
-	}
 }

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

@@ -80,45 +80,45 @@ public class PushVO {
 	/**
 	 * 化验项目和结果
 	 */
-	private String lis;
+	private List<Lis> lis;
 	/**
 	 * 辅检项目和结果
 	 */
-	private String pacs;
+	private List<Pacs> pacs;
 	/**
 	 * 诊断
 	 */
-	private String diag;
+	private List<Item> diag;
 	/**
 	 * 药品
 	 */
-	private String drug;
+	private List<Item> drug;
 	/**
 	 * 当前化验开单项
 	 */
-	private String lisOrder;
+	private List<Lis> lisOrder;
 	/**
 	 * 当前辅检开单项
 	 */
-	private String pacsOrder;
+	private List<Pacs> pacsOrder;
 	/**
 	 * 当前诊断开单项
 	 */
-	private String diagOrder;
+	private List<Item> diagOrder;
 	/**
 	 * 当前药品开单项
 	 */
-	private String drugOrder;
+	private List<Item> drugOrder;
 	/**
 	 * 当前手术开单项
 	 */
-	private String operationOrder;
+	private List<Item> operationOrder;
 	/**
 	 * 其他开单项
 	 */
-	private String otherOrder;
+	private List<Item> otherOrder;
 	/**
 	 * 选中诊断
 	 */
-	private String diseaseName;
+	private Item diseaseName;
 }