Explorar el Código

远程调用病历质控接口

gaodm hace 4 años
padre
commit
d98c4523ef

+ 9 - 1
src/main/java/com/diagbot/client/MrqcClient.java

@@ -1,7 +1,14 @@
 package com.diagbot.client;
 
 import com.diagbot.client.hystrix.MrqcHystrix;
+import com.diagbot.dto.AnalyzeRunDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.AnalyzeRunVO;
 import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.validation.Valid;
 
 /**
  * @Description: 病历质控客户端
@@ -10,7 +17,8 @@ import org.springframework.cloud.openfeign.FeignClient;
  */
 @FeignClient(name = "mrqc", url = "${mrqc.url}", fallback = MrqcHystrix.class)
 public interface MrqcClient {
-
+    @PostMapping("/qc/behospitalInfo/analyze_run")
+    RespDTO<AnalyzeRunDTO> analyzeRun(@Valid @RequestBody AnalyzeRunVO analyzeRunVO);
 }
 
 

+ 12 - 0
src/main/java/com/diagbot/client/hystrix/MrqcHystrix.java

@@ -1,8 +1,14 @@
 package com.diagbot.client.hystrix;
 
 import com.diagbot.client.MrqcClient;
+import com.diagbot.dto.AnalyzeRunDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.AnalyzeRunVO;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.validation.Valid;
 
 /**
  * @Description: 病历质控客户端(请求失败熔断)
@@ -12,4 +18,10 @@ import org.springframework.stereotype.Component;
 @Component
 @Slf4j
 public class MrqcHystrix implements MrqcClient {
+
+    @Override
+    public RespDTO<AnalyzeRunDTO> analyzeRun(@Valid @RequestBody AnalyzeRunVO analyzeRunVO) {
+        log.error("【hystrix】调用{}异常", "analyzeRun");
+        return null;
+    }
 }

+ 1 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -47,6 +47,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/sys/mr/createMr").permitAll()
                 .antMatchers("/sys/mr/getMr").permitAll()
                 .antMatchers("/sys/sysPlan/getSysPlanInfoDatas").permitAll()
+                .antMatchers("/sys/mrqc/analyze_run").permitAll()
                 .antMatchers("/**").authenticated();
 //                .antMatchers("/**").permitAll();
     }

+ 2 - 1
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -89,7 +89,8 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/sys/disclaimerInfo/getDisclaimerInfo", request)
                 || matchers("/sys/mr/createMr", request)
                 || matchers("/sys/mr/getMr", request)
-                 || matchers("/sys/sysPlan/getSysPlanInfoDatas", request)
+                || matchers("/sys/sysPlan/getSysPlanInfoDatas", request)
+                || matchers("/sys/mrqc/analyze_run", request)
                 || matchers("/", request)) {
             return true;
         }

+ 23 - 0
src/main/java/com/diagbot/dto/AnalyzeRunDTO.java

@@ -0,0 +1,23 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: zhoutg
+ * @time: 2020/4/15 12:24
+ */
+@Getter
+@Setter
+public class AnalyzeRunDTO {
+    // //得分
+    // private BigDecimal scoreRes;
+    // //等级
+    // private String level;
+    // 缺陷条目
+    private List<MsgDTO> msgDTOList = new ArrayList<>();
+}

+ 57 - 0
src/main/java/com/diagbot/dto/MsgDTO.java

@@ -0,0 +1,57 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: zhoutg
+ * @time: 2020/4/14 13:07
+ */
+@Getter
+@Setter
+public class MsgDTO {
+    //明细主键
+    private Long id;
+    //得分
+    private BigDecimal score;
+    //提示信息
+    private String msg;
+    // 控费标识(1:是控费条目,2:不是控费条目)
+    private Integer drgs;
+    // 质控形式(1:形式质控,2:内涵质控)
+    private Integer type;
+    //提示信息
+    private String code;
+    //提示信息
+    private String info;
+    //标准提示信息
+    private String standardMsg;
+    // 操作类型(1:新增,2:删除,3:修改)
+    private Integer optType;
+    // 初始类型(1:机器,2:人工)
+    private Integer gradeType;
+    //单项否决
+    private String isReject;
+    //模块名称
+    private String modelName;
+    //模块id
+    private String modelId;
+    //模块ID
+    private Long casesId;
+    //模块分数
+    private BigDecimal casesScore;
+    // 条目ID
+    private Long casesEntryId;
+    // 记录创建时间
+    private Date gmtCreate;
+    // 记录修改时间,如果时间是1970年则表示纪录未修改
+    private Date gmtModified;
+    // 条目id对应页面数据的key值
+    private List<Long> pageKeyList = new ArrayList<>();
+}

+ 29 - 0
src/main/java/com/diagbot/facade/MrqcFacade.java

@@ -0,0 +1,29 @@
+package com.diagbot.facade;
+
+import com.diagbot.client.MrqcClient;
+import com.diagbot.dto.AnalyzeRunDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.AnalyzeRunVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.validation.Valid;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/7/28 9:57
+ */
+@Component
+public class MrqcFacade {
+    @Autowired
+    private MrqcClient mrqcClient;
+
+    public AnalyzeRunDTO analyzeRun(@Valid @RequestBody AnalyzeRunVO analyzeRunVO) {
+        RespDTO<AnalyzeRunDTO> analyzeRunDTO = mrqcClient.analyzeRun(analyzeRunVO);
+        RespDTOUtil.respNGDealCover(analyzeRunDTO, "远程调用病历质控接口失败");
+        return analyzeRunDTO.data;
+    }
+}

+ 26 - 0
src/main/java/com/diagbot/vo/AnalyzeRunVO.java

@@ -0,0 +1,26 @@
+package com.diagbot.vo;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @description:
+ * @author: zhoutg
+ * @time: 2020/4/13 18:31
+ */
+@Data
+public class AnalyzeRunVO {
+    // 病历id
+    @NotBlank(message = "behospitalCode不能为空")
+    private String behospitalCode;
+    // 医院ID
+    @NotNull(message = "hospitalId不能为空")
+    private Long hospitalId;
+    // 模块id
+    @NotNull(message = "modeId不能为空")
+    private Long modeId;
+    // 归档字段
+    private String isPlacefile = "1";
+}

+ 45 - 0
src/main/java/com/diagbot/web/MrqcController.java

@@ -0,0 +1,45 @@
+package com.diagbot.web;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.AnalyzeRunDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.MrqcFacade;
+import com.diagbot.vo.AnalyzeRunVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+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 javax.validation.Valid;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/7/28 9:54
+ */
+@RestController
+@RequestMapping("/sys/mrqc")
+@Api(value = "病历质控API[by:gaodm]", tags = { "病历质控API" })
+@SuppressWarnings("unchecked")
+public class MrqcController {
+    @Autowired
+    private MrqcFacade mrqcFacade;
+
+    @ApiOperation(value = "评分-运行质控[by:zhoutg]",
+            notes = "    // 病历id\n" +
+                    "    String behospitalCode;\n" +
+                    "    // 医院ID\n" +
+                    "    Long hospitalId;\n" +
+                    "    // 模块id\n" +
+                    "    Long modeId;\n" +
+                    "    // 归档字段\n" +
+                    "    String isPlacefile;")
+    @PostMapping("/analyze_run")
+    @SysLogger("analyze_run")
+    public RespDTO<AnalyzeRunDTO> analyzeRun(@Valid @RequestBody AnalyzeRunVO analyzeRunVO) {
+        return RespDTO.onSuc(mrqcFacade.analyzeRun(analyzeRunVO));
+    }
+}