Browse Source

患者信息获取

rgb 6 years ago
parent
commit
33c3746cae

+ 12 - 0
prec-service/src/main/java/com/diagbot/client/AiptServiceClient.java

@@ -2,8 +2,11 @@ package com.diagbot.client;
 
 import com.diagbot.client.bean.SearchData;
 import com.diagbot.client.hystrix.AiptServiceHystrix;
+import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.GetTopPatientInfoVO;
+
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -23,4 +26,13 @@ public interface AiptServiceClient {
      */
     @PostMapping("/push/pushInner")
     RespDTO<PushDTO> pushInner(@RequestBody SearchData searchData);
+    
+    /**
+     * 获取页面顶部病人医生科室信息
+     *
+     * @param getTopPatientInfoVO
+     * @return
+     */
+    @PostMapping("/patientInfo/getTopPatientInfo")
+    RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(@RequestBody GetTopPatientInfoVO getTopPatientInfoVO);
 }

+ 9 - 0
prec-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java

@@ -2,8 +2,11 @@ package com.diagbot.client.hystrix;
 
 import com.diagbot.client.AiptServiceClient;
 import com.diagbot.client.bean.SearchData;
+import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.GetTopPatientInfoVO;
+
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -27,4 +30,10 @@ public class AiptServiceHystrix implements AiptServiceClient {
         log.error("【hystrix】调用{}异常", "pushInner");
         return null;
     }
+    
+    @Override
+    public RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(GetTopPatientInfoVO getTopPatientInfoVO) {
+        log.error("【hystrix】调用{}异常", "getTopPatientInfo");
+        return null;
+    }
 }

+ 156 - 0
prec-service/src/main/java/com/diagbot/dto/GetTopPatientInfoDTO.java

@@ -0,0 +1,156 @@
+package com.diagbot.dto;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description
+ * @author rgb
+ * @time 2018年11月19日下午4:57:43
+ */
+@ApiModel(value="页面顶部病人医生科室信息查询接口出参")
+@Getter
+@Setter
+public class GetTopPatientInfoDTO {
+	
+	/**
+	 * 医院id
+	 */
+	@ApiModelProperty(value="医院id")
+	private Long hospitalId;
+	
+	/**
+     * 医院编码
+     */
+	@ApiModelProperty(value="医院编码")
+    private String hospitalCode;
+
+    /**
+     * 医院名称
+     */
+	@ApiModelProperty(value="医院名称")
+    private String hospitalName;
+    
+    /**
+	 * 医院科室id
+	 */
+	@ApiModelProperty(value="医院科室id")
+	private Long hospitalDeptId;
+	
+    /**
+	 * 自己科室id
+	 */
+	@ApiModelProperty(value="自己科室id")
+	private Long selfDeptId;
+	
+	/**
+	 * 自己科室名称
+	 */
+	@ApiModelProperty(value="自己科室名称")
+	private String selfDeptName;
+    
+    /**
+     * 医院科室编码
+     */
+	@ApiModelProperty(value="医院科室编码")
+    private String hospitalDeptCode;
+
+    /**
+     * 医院科室名称
+     */
+	@ApiModelProperty(value="医院科室名称")
+    private String hospitalDeptName;
+    
+    /**
+	 * 医生id
+	 */
+	@ApiModelProperty(value="医生id")
+	private Long doctorId;
+	
+	/**
+     * 医生编码
+     */
+	@ApiModelProperty(value="医生编码")
+    private String doctorCode;
+
+    /**
+     * 医生姓名
+     */
+	@ApiModelProperty(value="医生姓名")
+    private String doctorName;
+    
+    /**
+   	 * 病人id
+   	 */
+	@ApiModelProperty(value="病人id")
+   	private Long patientId;
+   	
+   	/**
+     * 病人编号
+     */
+	@ApiModelProperty(value="病人编号")
+    private String patientCode;
+
+    /**
+     * 病人姓名
+     */
+	@ApiModelProperty(value="病人姓名")
+    private String patientName;
+
+    /**
+     * 病人性别
+     */
+	@ApiModelProperty(value="病人性别")
+    private String patientSex;
+    
+    /**
+     * 病人年龄
+     */
+	@ApiModelProperty(value="病人年龄")
+    private Integer patientAge;
+    
+    /**
+     * 病人证件号码
+     */
+	@ApiModelProperty(value="病人证件号码")
+    private String patientIdNo;
+
+	/**
+	 * 系统时间
+	 */
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+	@ApiModelProperty(value="系统时间")
+	private Date systemTime;
+	
+	/**
+     * 出生日期
+     */
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+	@ApiModelProperty(value="出生日期")
+    private Date birthday;
+	
+	/**
+     * 门诊号
+     */
+	@ApiModelProperty(value="门诊号")
+	private String recordId;
+	
+//    /**
+//     * 模式分类
+//     */
+//	@ApiModelProperty(value="模式分类")
+//    private Integer modeClassify;
+//
+//    /**
+//     * 模式值
+//     */
+//	@ApiModelProperty(value="模式值")
+//    private Integer modeValue;
+	
+}

+ 39 - 0
prec-service/src/main/java/com/diagbot/facade/PatientInfoFacade.java

@@ -0,0 +1,39 @@
+package com.diagbot.facade;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import com.diagbot.client.AiptServiceClient;
+import com.diagbot.dto.GetTopPatientInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.GetTopPatientInfoVO;
+
+/**
+ * @Description: 患者业务逻辑
+ * @author: wangyu
+ * @time: 2018/11/19 13:19
+ */
+@Component
+public class PatientInfoFacade {
+
+    @Autowired
+    private AiptServiceClient aiptServiceClient;
+
+    /**
+     * 页面顶部病人医生科室信息查询
+     *
+     * @param getTopPatientInfoVO
+     * @return
+     */
+    public GetTopPatientInfoDTO getTopPatientInfo(@RequestBody GetTopPatientInfoVO getTopPatientInfoVO) {
+        RespDTO<GetTopPatientInfoDTO> respDTO = aiptServiceClient.getTopPatientInfo(getTopPatientInfoVO);
+        RespDTOUtil.respNGDealCover(respDTO, "获取页面顶部病人医生科室信息失败");
+
+        GetTopPatientInfoDTO getTopPatientInfoDTO = respDTO.data;
+
+        return getTopPatientInfoDTO;
+    }
+
+}

+ 56 - 0
prec-service/src/main/java/com/diagbot/vo/GetTopPatientInfoVO.java

@@ -0,0 +1,56 @@
+package com.diagbot.vo;
+
+import javax.validation.constraints.NotBlank;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description
+ * @author rgb
+ * @time 2018年11月19日下午4:58:37
+ */
+@ApiModel(value="页面顶部病人医生科室信息查询接口传参")
+@Getter
+@Setter
+public class GetTopPatientInfoVO {
+	
+	/**
+	 * 医院编号
+	 */
+	@ApiModelProperty(value="医院编号",required=true)
+	@NotBlank(message="医院编号必填")
+	private String hospitalCode;
+	
+	/**
+	 * 医院科室编号
+	 */
+	@ApiModelProperty(value="医院科室编号",required=true)
+	@NotBlank(message="医院科室编号必填")
+	private String hospitalDeptCode;
+	
+	/**
+	 * 医院医生编号
+	 */
+	@ApiModelProperty(value="医院医生编号",required=true)
+	@NotBlank(message="医院医生编号必填")
+	private String doctorCode;
+	
+	/**
+	 * 医院患者编号
+	 */
+	@ApiModelProperty(value="医院患者编号",required=true)
+	@NotBlank(message="医院患者编号必填")
+	private String patientCode;
+	
+	/**
+	 * 门诊号
+	 */
+	@ApiModelProperty(value="门诊号",required=true)
+	@NotBlank(message="门诊号必填")
+	private String recordId;
+	
+
+}

+ 49 - 0
prec-service/src/main/java/com/diagbot/web/PatientInfoController.java

@@ -0,0 +1,49 @@
+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.GetTopPatientInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.PatientInfoFacade;
+import com.diagbot.vo.GetTopPatientInfoVO;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * <p>
+ * 患者信息表 前端控制器
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-11-19
+ */
+@RestController
+@RequestMapping("/patientInfo")
+@Api(value = "患者信息API", tags = { "患者信息API" })
+@SuppressWarnings("unchecked")
+public class PatientInfoController {
+	
+    @Autowired
+    private PatientInfoFacade patientInfoFacade;
+
+    @ApiOperation(value = "知识库标准化-页面顶部病人医生科室信息——查询[by:rengb]",
+            notes = "hospitalCode:医院编号,必填<br>" +
+                    "hospitalDeptCode:医院科室编号,必填<br>" +
+                    "doctorCode:医院医生编号,必填<br>" +
+                    "patientCode:医院患者编号,必填<br>")
+    @PostMapping("/getTopPatientInfo")
+    @SysLogger("getTopPatientInfo")
+    public RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(@Valid @RequestBody GetTopPatientInfoVO getTopPatientInfoVO) {
+        return RespDTO.onSuc(patientInfoFacade.getTopPatientInfo(getTopPatientInfoVO));
+    }
+
+}