瀏覽代碼

增加统计功能,统计诊断依据和药品

liuqq 6 年之前
父節點
當前提交
35c8f6308d

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

@@ -97,8 +97,8 @@ mybatis-plus:
 
 ai:
   server:
-    address: http://192.168.2.105:5008
+    address: http://101.37.151.162:5008
 
 nlp:
   server:
-    address: http://192.168.2.105:5002
+    address: http://101.37.151.162:5002

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

@@ -95,11 +95,4 @@ mybatis-plus:
     map-underscore-to-camel-case: true
     cache-enabled: false
 
-ai:
-  server:
-    address: http://192.168.4.177:5050
-          
-bigdata:
-  server:
-    address: http://192.168.4.177:5008
 

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

@@ -12,7 +12,7 @@ spring:
 
   #mq
   rabbitmq:
-    host: 192.168.2.105
+    host: localhost
     port: 5672
     username: lantone
     password: lantone

+ 4 - 0
data-service/src/main/java/com/diagbot/client/TranServiceClient.java

@@ -12,6 +12,7 @@ import com.diagbot.client.hystrix.TranServiceHystrix;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.SysSetInfoDTO;
 import com.diagbot.vo.HospitalSetVO;
+import com.diagbot.vo.InputInfoVO;
 
 /**
  * @Description: 调用信息对接层服务
@@ -28,4 +29,7 @@ public interface TranServiceClient {
 	 */
     @PostMapping("/sysSet/getSysSetInfoDatas")
     RespDTO<List<SysSetInfoDTO>> getSysSetInfoDatas(@Valid @RequestBody HospitalSetVO hospitalSetVO);
+    
+    @PostMapping("/inputInfo/saveInputInfo")
+    RespDTO<Boolean> saveInputInfo(@RequestBody InputInfoVO inputInfoVO);
 }

+ 7 - 0
data-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java

@@ -10,6 +10,7 @@ import com.diagbot.client.TranServiceClient;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.SysSetInfoDTO;
 import com.diagbot.vo.HospitalSetVO;
+import com.diagbot.vo.InputInfoVO;
 
 import lombok.extern.slf4j.Slf4j;
 
@@ -27,4 +28,10 @@ public class TranServiceHystrix implements TranServiceClient {
 		log.error("【hystrix】调用{}异常", "getSysSetInfoDatas");
 		return null;
 	}
+
+	@Override
+	public RespDTO<Boolean> saveInputInfo(InputInfoVO inputInfoVO) {
+		log.error("【hystrix】调用{}异常", "saveInputInfo");
+		return null;
+	}
 }

+ 65 - 0
data-service/src/main/java/com/diagbot/enums/ConceptTypeEnum.java

@@ -0,0 +1,65 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/5/7 14:06
+ */
+public enum ConceptTypeEnum implements KeyedNamed {
+    Symptom(1, "症状"),
+    Past(2, "既往史"),
+    Other(3, "其他史"),
+    Vital(4, "查体"),
+    Lis(5, "化验"),
+    Pacs(6, "辅检"),
+    Disease(7, "诊断"),
+    Drug(8, "药品"),
+    Drug_Category_Big(9, "药品分类-大类"),
+    SIDE_EFFECTS(10, "不良反应"),
+    Drug_Category_Small(11, "药品分类-小类"),
+    LIS_TABLES(12,"化验公表项"),
+    DEPARTMENT(15,"科室"),
+    Scale(21, "量表"),
+    Indication(22, "指标"),
+    LisDetail(51, "化验明细");
+
+
+
+    @Setter
+    private Integer key;
+
+    @Setter
+    private String name;
+
+    ConceptTypeEnum(Integer key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static ConceptTypeEnum getEnum(Integer key) {
+        for (ConceptTypeEnum item : ConceptTypeEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer key) {
+        ConceptTypeEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 34 - 0
data-service/src/main/java/com/diagbot/facade/ConceptDetailFacade.java

@@ -1,10 +1,18 @@
 package com.diagbot.facade;
 
+import com.alibaba.fastjson.JSONObject;
 import com.diagbot.client.AiptServiceClient;
+import com.diagbot.client.TranServiceClient;
 import com.diagbot.dto.ConceptIntroduceDTO;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.enums.ConceptTypeEnum;
+import com.diagbot.util.DateUtil;
 import com.diagbot.util.RespDTOUtil;
 import com.diagbot.vo.ConceptIntroduceVO;
+import com.diagbot.vo.InputInfoVO;
+
+import java.util.Date;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -17,10 +25,36 @@ import org.springframework.stereotype.Component;
 public class ConceptDetailFacade {
     @Autowired
     private AiptServiceClient aiptServiceClient;
+    
+    @Autowired
+    private TranServiceClient tranServiceClient;
 
     public ConceptIntroduceDTO getConceptDetail(ConceptIntroduceVO conceptIntroduceVO) {
         RespDTO<ConceptIntroduceDTO> res = aiptServiceClient.getConceptDetail(conceptIntroduceVO);
         RespDTOUtil.respNGDeal(res, "获取提示信息失败");
+        
+        //增加统计功能
+        saveInputInfo(conceptIntroduceVO,res);
         return res.data;
     }
+    
+    private void saveInputInfo(ConceptIntroduceVO conceptIntroduceVO,RespDTO<ConceptIntroduceDTO> res) {
+    	InputInfoVO inputInfo=new InputInfoVO();
+		inputInfo.setHospitalCode(conceptIntroduceVO.getHospitalCode());
+		inputInfo.setHosptialName(conceptIntroduceVO.getHosptialName());
+		inputInfo.setHosptialDeptCode(conceptIntroduceVO.getHosptialDeptCode());
+		inputInfo.setHosptialDeptName(conceptIntroduceVO.getHosptialDeptName());
+		inputInfo.setDoctorCode(conceptIntroduceVO.getDoctorCode());
+		inputInfo.setDoctorName(conceptIntroduceVO.getDoctorName());
+		inputInfo.setInquiryCode(conceptIntroduceVO.getInquiryCode());
+		inputInfo.setDiseaseName(conceptIntroduceVO.getName());
+		inputInfo.setAge(conceptIntroduceVO.getAge());
+		inputInfo.setSexType(conceptIntroduceVO.getSexType());
+		inputInfo.setTransTime(DateUtil.format(new Date(), DateUtil.DATE_TIME_FORMAT));
+		
+		inputInfo.setRemark(ConceptTypeEnum.getEnum(conceptIntroduceVO.getType()).toString());
+		inputInfo.setParamIn(JSONObject.toJSONString(conceptIntroduceVO));
+		inputInfo.setParamOut(JSONObject.toJSONString(res));
+        tranServiceClient.saveInputInfo(inputInfo);
+    }
 }

+ 13 - 0
data-service/src/main/java/com/diagbot/vo/ConceptIntroduceVO.java

@@ -26,4 +26,17 @@ public class ConceptIntroduceVO {
     //此版本暂不提供该过滤条件
     @ApiModelProperty(hidden = true)
     private List<String> titles;
+    
+    
+    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;//疾病名称
 }

+ 25 - 0
data-service/src/main/java/com/diagbot/vo/InputInfoVO.java

@@ -0,0 +1,25 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Setter
+@Getter
+public class InputInfoVO {
+	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;
+}

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

@@ -1,7 +1,6 @@
 package com.diagbot.entity;
 
 import java.io.Serializable;
-import java.util.Date;
 
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;

+ 2 - 1
tran-service/src/main/java/com/diagbot/facade/InputInfoFacade.java

@@ -13,7 +13,8 @@ import com.diagbot.service.impl.InputInfoServiceImpl;
 @Component
 public class InputInfoFacade extends InputInfoServiceImpl{
 
-	public void saveInputInfo(InputInfo inputInfo){
+	public Boolean saveInputInfo(InputInfo inputInfo){
 		this.save(inputInfo);
+		return true;
 	}
 }

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

@@ -77,7 +77,7 @@ public class PushFacade {
 	 * @return
 	 */
 	public Map<String, String> pushDisease(@Valid @RequestBody PushDiseaseVO pushDiseaseVO){
-		String url=readProperties.getRemoteAddress()+"landscapeMedical.html?"+pushDiseaseVO.toString();
+		String url=readProperties.getRemoteAddress()+"indexHorizontal.html?"+pushDiseaseVO.toString();
 		
 		Map<String, String> map=new HashMap<String, String>();
 		map.put("url", url);

+ 3 - 1
tran-service/src/main/java/com/diagbot/vo/PushDiseaseVO.java

@@ -29,7 +29,9 @@ public class PushDiseaseVO {
     private String inquiryCode; //就诊ID
     
     public String toString(){
-    	return "age="+this.age+"&sexType="+this.sexType+"&diagJson="+this.diagJson+"&hospitalCode="+this.hospitalCode;
+    	return "age="+this.age+"&sex="+this.sexType+"&diagJson="+this.diagJson+"&hospitalCode="+this.hospitalCode
+    	+"&hosptialName="+this.hosptialName+"&hosptialDeptCode="+this.hosptialDeptCode+"&hosptialDeptName="+this.hosptialDeptName
+    	+"&doctorCode="+this.doctorCode+"&doctorName="+this.doctorName+"&inquiryCode="+this.inquiryCode;
     }
     
 }

+ 4 - 1
tran-service/src/main/java/com/diagbot/vo/PushInquiryVO.java

@@ -37,7 +37,10 @@ public class PushInquiryVO {
     
     @Override
 	public String toString() {
-		return "age="+this.age+"&sexType="+this.sexType+"&symptomJson="+ this.symptomJson+"";
+		return "age="+this.age+"&sex="+this.sexType+"&symptomJson="+ this.symptomJson
+		+"&hospitalCode="+this.hospitalCode+"&hosptialName="+this.hosptialName+"&hosptialDeptCode="+this.hosptialDeptCode
+		+"&hosptialDeptName="+this.hosptialDeptName+"&doctorCode="+this.doctorCode+"&doctorName="+this.doctorName
+		+"&inquiryCode="+this.inquiryCode;
 	}
     
     

+ 14 - 18
tran-service/src/main/java/com/diagbot/web/DoctorInfoController.java

@@ -41,24 +41,20 @@ public class DoctorInfoController {
     @Autowired
     private DoctorInfoFacade doctorInfoFacade;
     
-    @ApiOperation(value = "医生信息——保存[by:QQ]",
-            notes = "deptCode:科室编号,必填<br>" +
-                    "hospitalCode: 医院编号,必填<br>" +
-                    "doctorCode: 医生编号,必填<br>"+
-                    "type: 数据来源类型 ,api:接口;view:数据库;<br>"+
-                    "name:医生名称,必填<br>"+
-                    "sex:医生性别,必填;1:男,2:女<br>"+
-                    "idType:证件类型,选填<br>"+
-                    "idNo:证件号码,必填<br>"+
-                    "address:地址,选填<br>"+
-                    "phone:手机号码,选填<br>"+
-                    "remark:备注,选填<br>")
-    @PostMapping("/saveDoctorInfo")
-    @SysLogger("saveDoctorInfo")
-    public RespDTO<List<DoctorInfoDTO>> saveDoctorInfo(@Valid @RequestBody DoctorInfoVO doctorInfoVo){
-    	List<DoctorInfoDTO> data = doctorInfoFacade.saveDoctorInfo(doctorInfoVo);
-    	return RespDTO.onSuc(data);
-    }
+	/*
+	 * @ApiOperation(value = "医生信息——保存[by:QQ]", notes = "deptCode:科室编号,必填<br>" +
+	 * "hospitalCode: 医院编号,必填<br>" + "doctorCode: 医生编号,必填<br>"+
+	 * "type: 数据来源类型 ,api:接口;view:数据库;<br>"+ "name:医生名称,必填<br>"+
+	 * "sex:医生性别,必填;1:男,2:女<br>"+ "idType:证件类型,选填<br>"+ "idNo:证件号码,必填<br>"+
+	 * "address:地址,选填<br>"+ "phone:手机号码,选填<br>"+ "remark:备注,选填<br>")
+	 * 
+	 * @PostMapping("/saveDoctorInfo")
+	 * 
+	 * @SysLogger("saveDoctorInfo") public RespDTO<List<DoctorInfoDTO>>
+	 * saveDoctorInfo(@Valid @RequestBody DoctorInfoVO doctorInfoVo){
+	 * List<DoctorInfoDTO> data = doctorInfoFacade.saveDoctorInfo(doctorInfoVo);
+	 * return RespDTO.onSuc(data); }
+	 */
 
     @ApiOperation(value = "医生信息——查询[by:wangyu]",
             notes = "deptCode:科室编号,必填<br>" +

+ 8 - 6
tran-service/src/main/java/com/diagbot/web/HospitalInfoController.java

@@ -42,10 +42,12 @@ public class HospitalInfoController {
         return RespDTO.onSuc(data);
     }
     
-    @PostMapping("/saveHospitalInfo")
-    @SysLogger("saveHospitalInfo")
-    public RespDTO<HospitalInfoDTO> saveHospitalInfo(@Valid @RequestBody HospitalInfoVO hospitalInfoVO){
-    	HospitalInfoDTO data=hospitalInfoFacade.saveHospitalInfo(hospitalInfoVO);
-    	return RespDTO.onSuc(data);
-    }
+	/*
+	 * @PostMapping("/saveHospitalInfo")
+	 * 
+	 * @SysLogger("saveHospitalInfo") public RespDTO<HospitalInfoDTO>
+	 * saveHospitalInfo(@Valid @RequestBody HospitalInfoVO hospitalInfoVO){
+	 * HospitalInfoDTO data=hospitalInfoFacade.saveHospitalInfo(hospitalInfoVO);
+	 * return RespDTO.onSuc(data); }
+	 */
 }

+ 38 - 0
tran-service/src/main/java/com/diagbot/web/InputInfoController.java

@@ -0,0 +1,38 @@
+package com.diagbot.web;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+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.entity.InputInfo;
+import com.diagbot.facade.InputInfoFacade;
+
+import io.swagger.annotations.Api;
+import springfox.documentation.annotations.ApiIgnore;
+
+@RestController
+@RequestMapping("/inputInfo")
+@Api(value = "对接层-统计信息API", tags = { "对接层-统计信息API" })
+@SuppressWarnings("unchecked")
+public class InputInfoController {
+	@Autowired
+	private InputInfoFacade inputInfoFacade;
+	
+	/**
+	  * 统计记录保存
+	  * @param saveInputInfo
+	  * @return
+	  */
+	 @PostMapping("/saveInputInfo")
+	 @SysLogger("saveInputInfo")
+	 @Transactional
+	 @ApiIgnore
+	 public RespDTO<Boolean> saveInputInfo(@RequestBody InputInfo inputInfo) {
+	     return RespDTO.onSuc(inputInfoFacade.saveInputInfo(inputInfo));
+	 }
+}

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

@@ -6,6 +6,6 @@ jdbc.password=root
 
 
 #\u6570\u636e\u670d\u52a1\u6a21\u5f0f
-remote.address=http://192.168.4.177:55/static/pages/
+remote.address=http://192.168.4.177:8080/
 #his\u65b9\u60a3\u8005\u63a5\u53e3\u5730\u5740
 his.patient.url=