zengsj hai 10 meses
pai
achega
26562dfabc

+ 4 - 0
pom.xml

@@ -74,6 +74,10 @@
             <artifactId>hutool-all</artifactId>
             <version>5.8.3</version>
         </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
     </dependencies>
     <dependencyManagement>
         <dependencies>

+ 0 - 1
src/main/java/com/yizhu/supervise/SuperviseServiceApplication.java

@@ -5,7 +5,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 
 @SpringBootApplication
 public class SuperviseServiceApplication {
-
     public static void main(String[] args) {
         SpringApplication.run(SuperviseServiceApplication.class, args);
     }

+ 2 - 1
src/main/java/com/yizhu/supervise/common/enums/ServiceMethodEnum.java

@@ -13,7 +13,8 @@ public enum ServiceMethodEnum {
     REMOTE_IMAGING(10, "远程影像诊断记录", "his.provinceDataUploadService", "pushRemoteRadiology"),
     REMOTE_ELECTROCARDIOGRAM(11, "远程心电诊断记录", "his.provinceDataUploadService", "pushRemoteECG"),
     REMOTE_MEDICAL_RECORDS(12, "远程病理记录", "his.provinceDataUploadService", "pushRemotePathology"),
-    REMOTE_REFERRAL(13, "远程转诊记录", "his.provinceDataUploadService", "pushRemoteTransfer");
+    REMOTE_REFERRAL(13, "远程转诊记录", "his.provinceDataUploadService", "pushRemoteTransfer"),
+    MEDICAL_DISPUTES(14, "医疗争议(不良事件)记录", "his.provinceDataUploadService", "pushMedicalDispute");
 
     ServiceMethodEnum(Integer code, String serviceName, String serviceId, String serviceMethod) {
         this.code = code;

+ 140 - 0
src/main/java/com/yizhu/supervise/common/util/PostUtil.java

@@ -0,0 +1,140 @@
+package com.yizhu.supervise.common.util;
+
+import cn.hutool.http.HttpRequest;
+import cn.hutool.http.HttpResponse;
+import lombok.extern.slf4j.Slf4j;
+import openapi.Client;
+import openapi.Response;
+import openapi.Request;
+import openapi.updateInterface.FileResponseTO;
+import openapi.updateInterface.HisResponseTO;
+import openapi.util.*;
+
+import java.util.*;
+
+@Slf4j
+public class PostUtil {
+    static String serviceId = "his.provinceDataUploadService";
+    static String apiUrl = "http://192.168.30.79:8080/openapi/api";
+    static String appKey = "ngari5fd5ad2196834aa7";
+    static String appSecret = "bbf1dd188b8b4629853f06f118d11e4a";
+    static String encodingAesKey = "5fab98da9cd05057";
+
+    public PostUtil() {
+    }
+
+    public static HisResponseTO post(String method,String jsonStr) {
+        HisResponseTO<?> hisResponse = new HisResponseTO();
+       // Client client = new Client(apiUrl, appKey, appSecret, encodingAesKey);
+//        List bodyList = new ArrayList();
+//        bodyList.add(param);
+        // Request request = new Request(serviceId, method, bodyList);
+     //   Response response = null;
+        HttpRequest request = HttpRequest.post(apiUrl);
+        // 设置请求头
+        request.header("Content-Type", "application/json"); // 设置Content-Type为JSON格式
+        request.header("Authorization", "Bearer your_access_token_here"); // 示例:设置Authorization头
+        request.header("apiUrl",apiUrl);
+        request.header("appKey", appKey);
+        request.header("appSecret", appSecret);
+        request.header("X-Ca-Key", appKey);
+        request.header("X-Ca-Nonce", UUID.randomUUID().toString());
+        request.header("X-Ca-Timestamp", String.valueOf(System.currentTimeMillis()));
+        log.info("请求方法:"+method+"request参数" + request);
+        log.info("请求方法:"+method+"实际请求参数" +jsonStr );
+        String encryptStr = SM4Utils.encryptNationalSerAlgorithmCBC(jsonStr, appSecret);
+        String contentMd5 = SM3Util.encode(encryptStr);
+        request.header("X-Content-MD5", contentMd5);
+        Map<String,String> headers = new HashMap();
+        headers.put("X-Ca-Key", appKey);
+        headers.put("X-Service-Id", serviceId);
+        headers.put("X-Service-Method", method);
+        String signature = SignUtil.signWithSm3(headers);
+        request.header("X-Ca-Signature", signature);
+        request.header("stringBody",encryptStr);
+        // 设置请求体(JSON格式)
+        request.body(jsonStr);
+        // 发送请求并获取响应
+        try {
+            HttpResponse response = request.execute();
+            log.debug("监管平台返回结果:" + JSONUtils.toString(response));
+            String body = response.body();
+            if (body != null) {
+                hisResponse = (HisResponseTO)JSONUtils.parse(body, HisResponseTO.class);
+                hisResponse.setMsg(hisResponse.getBody().getMsg());
+            } else {
+                hisResponse.setMsgCode("-1");
+                hisResponse.setMsg("监管平台返回异常");
+            }
+        } catch (Exception var11) {
+            log.debug("调用异常:", var11);
+            hisResponse.setMsgCode("-1");
+            hisResponse.setMsg("监管平台调用异常");
+        } finally {
+            log.debug("监管平台执行完成");
+        }
+
+        return hisResponse;
+    }
+
+    public static FileResponseTO postFile(List<Object> param) {
+        FileResponseTO<?> fileResponse = new FileResponseTO();
+        Client client = new Client(apiUrl, appKey, appSecret, encodingAesKey);
+        Request request = new Request(serviceId, "upload", param);
+        Response response = null;
+
+        try {
+            response = client.executeNoEncode(request);
+            log.debug("监管平台返回结果:" + JSONUtils.toString(response));
+            String body = response.getBody();
+            log.debug("body:" + body);
+            if (body != null) {
+                fileResponse = (FileResponseTO)JSONUtils.parse(body, fileResponse.getClass());
+                fileResponse.setMsg("上传成功");
+            } else {
+                fileResponse.setMsgCode("-1");
+                fileResponse.setMsg("监管平台返回异常");
+            }
+        } catch (Exception var9) {
+            log.debug("调用异常:", var9);
+            fileResponse.setMsgCode("-1");
+            fileResponse.setMsg("监管平台调用异常");
+        } finally {
+            log.debug("监管平台执行完成");
+        }
+
+        return fileResponse;
+    }
+
+    public static String getApiUrl() {
+        return apiUrl;
+    }
+
+    public static void setApiUrl(String apiUrl) {
+        PostUtil.apiUrl = apiUrl;
+    }
+
+    public static String getAppKey() {
+        return appKey;
+    }
+
+    public static void setAppKey(String appKey) {
+        PostUtil.appKey = appKey;
+    }
+
+    public static String getAppSecret() {
+        return appSecret;
+    }
+
+    public static void setAppSecret(String appSecret) {
+        PostUtil.appSecret = appSecret;
+    }
+
+    public static String getEncodingAesKey() {
+        return encodingAesKey;
+    }
+
+    public static void setEncodingAesKey(String encodingAesKey) {
+        PostUtil.encodingAesKey = encodingAesKey;
+    }
+}

+ 388 - 0
src/main/java/com/yizhu/supervise/controllers/SuperviseController.java

@@ -0,0 +1,388 @@
+package com.yizhu.supervise.controllers;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.yizhu.supervise.common.enums.ServiceMethodEnum;
+import com.yizhu.supervise.common.util.PostUtil;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import openapi.mode.*;
+import openapi.updateInterface.HisResponseTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Controller;
+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.ResponseBody;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.validation.Valid;
+import java.util.List;
+
+@Tag(name = "监管平台接口", description = "监管平台接口 请求头增加urlType 1专网 2外网 默认外网")
+@Controller
+@Slf4j
+@RequestMapping("/supervise")
+public class SuperviseController {
+    //专网地址
+    @Value("${param.local-url}")
+    private String  localUrl;
+    //外网地址
+    @Value("${param.url}")
+    private String  url;
+    @Value("${param.appSecret}")
+    private String  appSecret;
+    @Value("${param.appKey}")
+    private String  appKey;
+
+    @Operation(summary = "2.1.1.2.互联网医院药品目录推送接口", description = "互联网医院药品目录推送接口")
+    @PostMapping("/sendDrugCategory")
+    @ResponseBody
+    public HisResponseTO sendDrugCategory(HttpServletRequest request,@Valid  @RequestBody List<DrugCategoryReq> list) {
+        String urlType = request.getHeader("urlType");
+        String apiUrl = url;
+        if(StringUtils.isNotBlank(urlType)&&"1".equals(urlType)){
+            apiUrl = localUrl;
+        }
+        PostUtil.setApiUrl(apiUrl);
+        PostUtil.setAppKey(appKey);
+        PostUtil.setAppSecret(appSecret);
+        try{
+            return PostUtil.post(ServiceMethodEnum.DRUG_PUSH.getServiceMethod(), JSONObject.toJSONString(list));
+        }catch (Exception e){
+            log.error("方法名称:-/supervise/sendDrugCategory  错误信息:"+e.getMessage());
+            HisResponseTO<?> hisResponse = new HisResponseTO();
+            hisResponse.setCode(40012);
+            hisResponse.setMsg("错误信息:"+e.getMessage());
+            return hisResponse;
+        }
+    }
+
+    @Operation(summary = "测试医院药品目录推送单对象接口", description = "互联网医院药品目录推送接口")
+    @PostMapping("/sendDrugCategoryOne")
+    @ResponseBody
+    public HisResponseTO sendDrugCategoryOne(HttpServletRequest request,@Valid  @RequestBody DrugCategoryReq list) {
+        String urlType = request.getHeader("urlType");
+        String apiUrl = url;
+        if(StringUtils.isNotBlank(urlType)&&"1".equals(urlType)){
+            apiUrl = localUrl;
+        }
+        PostUtil.setApiUrl(apiUrl);
+        PostUtil.setAppKey(appKey);
+        PostUtil.setAppSecret(appSecret);
+        try{
+            return PostUtil.post(ServiceMethodEnum.DRUG_PUSH.getServiceMethod(), JSONObject.toJSONString(list));
+        }catch (Exception e){
+            log.error("方法名称:-/supervise/sendDrugCategory  错误信息:"+e.getMessage());
+            HisResponseTO<?> hisResponse = new HisResponseTO();
+            hisResponse.setCode(40012);
+            hisResponse.setMsg("错误信息:"+e.getMessage());
+            return hisResponse;
+        }
+    }
+
+
+    @Operation(summary = "2.2.1.2.在线咨询信息推送接口", description = "在线咨询信息推送接口")
+    @PostMapping("/sendNursingMaterial")
+    @ResponseBody
+    public HisResponseTO sendNursingMaterial(HttpServletRequest request,@Valid  @RequestBody List<NursingMaterialReq> list) {
+        String urlType = request.getHeader("urlType");
+        String apiUrl = url;
+        if(StringUtils.isNotBlank(urlType)&&"1".equals(urlType)){
+            apiUrl = localUrl;
+        }
+        PostUtil.setApiUrl(apiUrl);
+        PostUtil.setAppKey(appKey);
+        PostUtil.setAppSecret(appSecret);
+        try{
+            return PostUtil.post(ServiceMethodEnum.ONLINE_CONSULTATION.getServiceMethod(), JSONObject.toJSONString(list));
+        }catch (Exception e){
+            log.error("方法名称:-/supervise/sendNursingMaterial  错误信息:"+e.getMessage());
+            HisResponseTO<?> hisResponse = new HisResponseTO();
+            hisResponse.setCode(40012);
+            hisResponse.setMsg("错误信息:"+e.getMessage());
+            return hisResponse;
+        }
+    }
+
+    @Operation(summary = "2.2.2.2.在线复诊信息", description = "在线复诊信息")
+    @PostMapping("/sendReferralIndicator")
+    @ResponseBody
+    public HisResponseTO sendReferralIndicator(HttpServletRequest request,@Valid  @RequestBody List<FuzhenIndicatorsReq> list) {
+        String urlType = request.getHeader("urlType");
+        String apiUrl = url;
+        if(StringUtils.isNotBlank(urlType)&&"1".equals(urlType)){
+            apiUrl = localUrl;
+        }
+        PostUtil.setApiUrl(apiUrl);
+        PostUtil.setAppKey(appKey);
+        PostUtil.setAppSecret(appSecret);
+        try{
+            return PostUtil.post(ServiceMethodEnum.ONLINE_FOLLOW_UP.getServiceMethod(), JSONObject.toJSONString(list));
+        }catch (Exception e){
+            log.error("方法名称:在线复诊信息接口-/supervise/sendReferralIndicator  错误信息:"+e.getMessage());
+            HisResponseTO<?> hisResponse = new HisResponseTO();
+            hisResponse.setCode(40012);
+            hisResponse.setMsg("错误信息:"+e.getMessage());
+            return hisResponse;
+        }
+    }
+
+    @Operation(summary = "2.2.3.在线处方信息", description = "在线处方信息")
+    @PostMapping("/sendRecipeIndicators")
+    @ResponseBody
+    public HisResponseTO sendRecipeIndicators(HttpServletRequest request,@Valid  @RequestBody List<RecipeIndicatorsReq> list) {
+        String urlType = request.getHeader("urlType");
+        String apiUrl = url;
+        if(StringUtils.isNotBlank(urlType)&&"1".equals(urlType)){
+            apiUrl = localUrl;
+        }
+        PostUtil.setApiUrl(apiUrl);
+        PostUtil.setAppKey(appKey);
+        PostUtil.setAppSecret(appSecret);
+        try{
+            return PostUtil.post(ServiceMethodEnum.ONLINE_PRESCRIPTION.getServiceMethod(), JSONObject.toJSONString(list));
+        }catch (Exception e){
+            log.error("方法名称:-/supervise/sendRecipeIndicators  错误信息:"+e.getMessage());
+            HisResponseTO<?> hisResponse = new HisResponseTO();
+            hisResponse.setCode(40012);
+            hisResponse.setMsg("错误信息:"+e.getMessage());
+            return hisResponse;
+        }
+    }
+
+    @Operation(summary = "2.2.2.4.在线处方核销(配送、发药、购药)信息", description = "在线处方核销(配送、发药、购药)信息")
+    @PostMapping("/sendRecipeVerificationIndicators")
+    @ResponseBody
+    public HisResponseTO sendRecipeVerificationIndicators(HttpServletRequest request,@Valid  @RequestBody List<RecipeVerificationIndicatorsReq> list) {
+        String urlType = request.getHeader("urlType");
+        String apiUrl = url;
+        if(StringUtils.isNotBlank(urlType)&&"1".equals(urlType)){
+            apiUrl = localUrl;
+        }
+        PostUtil.setApiUrl(apiUrl);
+        PostUtil.setAppKey(appKey);
+        PostUtil.setAppSecret(appSecret);
+        try{
+            return PostUtil.post(ServiceMethodEnum.ONLINE_PRESCRIPTION_VERIFICATION.getServiceMethod(), JSONObject.toJSONString(list));
+        }catch (Exception e){
+            log.error("方法名称:-/supervise/sendRecipeVerificationIndicators  错误信息:"+e.getMessage());
+            HisResponseTO<?> hisResponse = new HisResponseTO();
+            hisResponse.setCode(40012);
+            hisResponse.setMsg("错误信息:"+e.getMessage());
+            return hisResponse;
+        }
+    }
+
+    @Operation(summary = "2.2.9.互联网预约挂号记录", description = "互联网预约挂号记录")
+    @PostMapping("/sendAppointRecord")
+    @ResponseBody
+    public HisResponseTO sendAppointRecord(HttpServletRequest request,@Valid  @RequestBody List<AppointRecordIndicatorsReq> list) {
+        String urlType = request.getHeader("urlType");
+        String apiUrl = url;
+        if(StringUtils.isNotBlank(urlType)&&"1".equals(urlType)){
+            apiUrl = localUrl;
+        }
+        PostUtil.setApiUrl(apiUrl);
+        PostUtil.setAppKey(appKey);
+        PostUtil.setAppSecret(appSecret);
+        try{
+            return PostUtil.post(ServiceMethodEnum.ONLINE_APPOINTMENT_REGISTRATION.getServiceMethod(), JSONObject.toJSONString(list));
+        }catch (Exception e){
+            log.error("方法名称:-/supervise/sendAppointRecord  错误信息:"+e.getMessage());
+            HisResponseTO<?> hisResponse = new HisResponseTO();
+            hisResponse.setCode(40012);
+            hisResponse.setMsg("错误信息:"+e.getMessage());
+            return hisResponse;
+        }
+    }
+
+    @Operation(summary = "2.2.10电子病历信息", description = "电子病历信息")
+    @PostMapping("/sendElectMedicalRecord")
+    @ResponseBody
+    public HisResponseTO sendElectMedicalRecord(HttpServletRequest request,@Valid  @RequestBody List<uploadElectMedicalRecordReq> list) {
+        String urlType = request.getHeader("urlType");
+        String apiUrl = url;
+        if(StringUtils.isNotBlank(urlType)&&"1".equals(urlType)){
+            apiUrl = localUrl;
+        }
+        PostUtil.setApiUrl(apiUrl);
+        PostUtil.setAppKey(appKey);
+        PostUtil.setAppSecret(appSecret);
+        try{
+            return PostUtil.post(ServiceMethodEnum.ELECTRONIC_MEDICAL_RECORD.getServiceMethod(), JSONObject.toJSONString(list));
+        }catch (Exception e){
+            log.error("方法名称:-/supervise/sendElectMedicalRecord  错误信息:"+e.getMessage());
+            HisResponseTO<?> hisResponse = new HisResponseTO();
+            hisResponse.setCode(40012);
+            hisResponse.setMsg("错误信息:"+e.getMessage());
+            return hisResponse;
+        }
+    }
+
+    @Operation(summary = "2.3.1.远程门诊记录", description = "远程门诊记录")
+    @PostMapping("/sendCloudAppointRecordIndicators")
+    @ResponseBody
+    public HisResponseTO sendCloudAppointRecordIndicators(HttpServletRequest request,@Valid  @RequestBody List<uploadCloudAppointRecordIndicatorsReq> list) {
+        String urlType = request.getHeader("urlType");
+        String apiUrl = url;
+        if(StringUtils.isNotBlank(urlType)&&"1".equals(urlType)){
+            apiUrl = localUrl;
+        }
+        PostUtil.setApiUrl(apiUrl);
+        PostUtil.setAppKey(appKey);
+        PostUtil.setAppSecret(appSecret);
+        try{
+            return PostUtil.post(ServiceMethodEnum.ONLINE_CONSULTATION.getServiceMethod(), JSONObject.toJSONString(list));
+        }catch (Exception e){
+            log.error("方法名称:-/supervise/sendCloudAppointRecordIndicators  错误信息:"+e.getMessage());
+            HisResponseTO<?> hisResponse = new HisResponseTO();
+            hisResponse.setCode(40012);
+            hisResponse.setMsg("错误信息:"+e.getMessage());
+            return hisResponse;
+        }
+    }
+
+
+    @Operation(summary = "2.3.2.2.远程会诊记录推送接口", description = "远程会诊记录推送接口")
+    @PostMapping("/sendMeetClinicIndicators")
+    @ResponseBody
+    public HisResponseTO sendMeetClinicIndicators(HttpServletRequest request,@Valid  @RequestBody List<MeetClinicIndicatorsReq> list) {
+        String urlType = request.getHeader("urlType");
+        String apiUrl = url;
+        if(StringUtils.isNotBlank(urlType)&&"1".equals(urlType)){
+            apiUrl = localUrl;
+        }
+        PostUtil.setApiUrl(apiUrl);
+        PostUtil.setAppKey(appKey);
+        PostUtil.setAppSecret(appSecret);
+        try{
+            return PostUtil.post(ServiceMethodEnum.REMOTE_CONSULTATION.getServiceMethod(), JSONObject.toJSONString(list));
+        }catch (Exception e){
+            log.error("方法名称:-/supervise/sendMeetClinicIndicators  错误信息:"+e.getMessage());
+            HisResponseTO<?> hisResponse = new HisResponseTO();
+            hisResponse.setCode(40012);
+            hisResponse.setMsg("错误信息:"+e.getMessage());
+            return hisResponse;
+        }
+    }
+
+
+    @Operation(summary = "2.3.3.2.远程影像诊断记录推送接口", description = "远程影像诊断记录推送接口")
+    @PostMapping("/pushRemoteRadiology")
+    @ResponseBody
+    public HisResponseTO pushRemoteRadiology(HttpServletRequest request,@Valid  @RequestBody List<pushRemoteRadiologyReq> list) {
+        String urlType = request.getHeader("urlType");
+        String apiUrl = url;
+        if(StringUtils.isNotBlank(urlType)&&"1".equals(urlType)){
+            apiUrl = localUrl;
+        }
+        PostUtil.setApiUrl(apiUrl);
+        PostUtil.setAppKey(appKey);
+        PostUtil.setAppSecret(appSecret);
+        try{
+            return PostUtil.post(ServiceMethodEnum.REMOTE_IMAGING.getServiceMethod(), JSONObject.toJSONString(list));
+        }catch (Exception e){
+            log.error("方法名称:-/supervise/pushRemoteRadiology  错误信息:"+e.getMessage());
+            HisResponseTO<?> hisResponse = new HisResponseTO();
+            hisResponse.setCode(40012);
+            hisResponse.setMsg("错误信息:"+e.getMessage());
+            return hisResponse;
+        }
+    }
+
+    @Operation(summary = "2.3.4.2.远程心电诊断记录推送接口", description = "远程心电诊断记录推送接口")
+    @PostMapping("/pushRemoteECG")
+    @ResponseBody
+    public HisResponseTO pushRemoteECG(HttpServletRequest request,@Valid  @RequestBody List<pushRemoteECGReq> list) {
+        String urlType = request.getHeader("urlType");
+        String apiUrl = url;
+        if(StringUtils.isNotBlank(urlType)&&"1".equals(urlType)){
+            apiUrl = localUrl;
+        }
+        PostUtil.setApiUrl(apiUrl);
+        PostUtil.setAppKey(appKey);
+        PostUtil.setAppSecret(appSecret);
+        try{
+            return PostUtil.post(ServiceMethodEnum.REMOTE_ELECTROCARDIOGRAM.getServiceMethod(), JSONObject.toJSONString(list));
+        }catch (Exception e){
+            log.error("方法名称:-/supervise/pushRemoteECG  错误信息:"+e.getMessage());
+            HisResponseTO<?> hisResponse = new HisResponseTO();
+            hisResponse.setCode(40012);
+            hisResponse.setMsg("错误信息:"+e.getMessage());
+            return hisResponse;
+        }
+    }
+
+
+    @Operation(summary = "2.3.5.2.远程病理诊断记录推送接口", description = "远程病理诊断记录推送接口")
+    @PostMapping("/pushRemotePathology")
+    @ResponseBody
+    public HisResponseTO pushRemotePathology(HttpServletRequest request,@Valid  @RequestBody List<pushRemotePathologyReq> list) {
+        String urlType = request.getHeader("urlType");
+        String apiUrl = url;
+        if(StringUtils.isNotBlank(urlType)&&"1".equals(urlType)){
+            apiUrl = localUrl;
+        }
+        PostUtil.setApiUrl(apiUrl);
+        PostUtil.setAppKey(appKey);
+        PostUtil.setAppSecret(appSecret);
+        try{
+            return PostUtil.post(ServiceMethodEnum.REMOTE_MEDICAL_RECORDS.getServiceMethod(), JSONObject.toJSONString(list));
+        }catch (Exception e){
+            log.error("方法名称:-/supervise/pushRemotePathology  错误信息:"+e.getMessage());
+            HisResponseTO<?> hisResponse = new HisResponseTO();
+            hisResponse.setCode(40012);
+            hisResponse.setMsg("错误信息:"+e.getMessage());
+            return hisResponse;
+        }
+    }
+
+
+    @Operation(summary = "2.3.6.2.远程转诊记录推送接口", description = "远程病理诊断记录推送接口")
+    @PostMapping("/pushRemoteTransfer")
+    @ResponseBody
+    public HisResponseTO pushRemoteTransfer(HttpServletRequest request,@Valid  @RequestBody List<pushRemoteTransferReq> list) {
+        String urlType = request.getHeader("urlType");
+        String apiUrl = url;
+        if(StringUtils.isNotBlank(urlType)&&"1".equals(urlType)){
+            apiUrl = localUrl;
+        }
+        PostUtil.setApiUrl(apiUrl);
+        PostUtil.setAppKey(appKey);
+        PostUtil.setAppSecret(appSecret);
+        try{
+            return PostUtil.post(ServiceMethodEnum.REMOTE_REFERRAL.getServiceMethod(), JSONObject.toJSONString(list));
+        }catch (Exception e){
+            log.error("方法名称:-/supervise/pushRemotePathology  错误信息:"+e.getMessage());
+            HisResponseTO<?> hisResponse = new HisResponseTO();
+            hisResponse.setCode(40012);
+            hisResponse.setMsg("错误信息:"+e.getMessage());
+            return hisResponse;
+        }
+    }
+
+    @Operation(summary = "2.4.2.2.医疗争议(不良事件)记录推送接口", description = "医疗争议(不良事件)记录推送接口")
+    @PostMapping("/pushMedicalDispute")
+    @ResponseBody
+    public HisResponseTO pushMedicalDispute(HttpServletRequest request,@Valid  @RequestBody List<MedicalDisputeReq> list) {
+        String urlType = request.getHeader("urlType");
+        String apiUrl = url;
+        if(StringUtils.isNotBlank(urlType)&&"1".equals(urlType)){
+            apiUrl = localUrl;
+        }
+        PostUtil.setApiUrl(apiUrl);
+        PostUtil.setAppKey(appKey);
+        PostUtil.setAppSecret(appSecret);
+        try{
+            return PostUtil.post(ServiceMethodEnum.MEDICAL_DISPUTES.getServiceMethod(), JSONObject.toJSONString(list));
+        }catch (Exception e){
+            log.error("方法名称:-/supervise/pushMedicalDispute  错误信息:"+e.getMessage());
+            HisResponseTO<?> hisResponse = new HisResponseTO();
+            hisResponse.setCode(40012);
+            hisResponse.setMsg("错误信息:"+e.getMessage());
+            return hisResponse;
+        }
+    }
+}

+ 0 - 9
src/main/java/com/yizhu/supervise/controllers/demo.java

@@ -1,9 +0,0 @@
-package com.yizhu.supervise.controllers;
-
-import openapi.mode.DrugCategoryReq;
-
-public class demo {
-    public static void main(String[] args) {
-        DrugCategoryReq req  = new DrugCategoryReq();
-    }
-}

+ 1 - 1
src/main/resources/application.yml

@@ -1,6 +1,6 @@
 #端口号
 server:
-  port: 8081
+  port: 9880
 ##启用swagger
 springfox:
   documentation: