浏览代码

代码修改

LAPTOP-KB9HII50\70708 3 年之前
父节点
当前提交
3404751bc9

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/healthCare/service/HealthCareService.java

@ -226,7 +226,7 @@ public class HealthCareService {
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
        return "0";
    }
    /**

+ 26 - 9
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -329,6 +329,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    public static String entranceUrl = "http://172.16.100.240:10023/xzzx/";
    public static String entranceHealthCareUrl = "http://172.16.100.240:10023/healthCare/";
    @Value("${demo.flag}")
    private boolean demoFlag;
    @Value("${wechat.id}")
@ -3909,9 +3911,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            //医保是否有处方权
            if(healthCareService.isHospitalFlag()){
                rs.put("is_prescribe", healthCareService.doctorAuthentication(doctorDO.getId()));//is_prescribe	是否具备处方权	1-有处方权,0无处方权
                String doctorAuthenticationUrl = entranceHealthCareUrl + "doctorAuthentication?doctorId="+doctorDO.getId();
                String infoResponse = httpClientUtil.get(doctorAuthenticationUrl,"GBK");
                com.alibaba.fastjson.JSONObject doctorAuthentication = com.alibaba.fastjson.JSONObject.parseObject(infoResponse);
                if(doctorAuthentication.getInteger("status")==200){
                    rs.put("is_prescribe", doctorAuthentication.get("obj"));//is_prescribe	是否具备处方权	1-有处方权,0无处方权
                }else {
                    rs.put("is_prescribe",0);
                }
            }else{
                rs.put("is_prescribe", null);//is_prescribe	是否具备处方权	1-有处方权,0无处方权
                rs.put("is_prescribe", 0);//is_prescribe	是否具备处方权	1-有处方权,0无处方权
            }
            //医生角色
@ -4214,9 +4223,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            //医保是否有处方权
            if(healthCareService.isHospitalFlag()){
                rs.put("is_prescribe", healthCareService.doctorAuthentication(doctorDO.getId()));//is_prescribe	是否具备处方权	1-有处方权,0无处方权
                String doctorAuthenticationUrl = entranceHealthCareUrl + "doctorAuthentication?doctorId="+doctorDO.getId();
                String infoResponse = httpClientUtil.get(doctorAuthenticationUrl,"GBK");
                com.alibaba.fastjson.JSONObject doctorAuthentication = com.alibaba.fastjson.JSONObject.parseObject(infoResponse);
                if(doctorAuthentication.getInteger("status")==200){
                    rs.put("is_prescribe", doctorAuthentication.get("obj"));//is_prescribe	是否具备处方权	1-有处方权,0无处方权
                }else {
                    rs.put("is_prescribe",0);
                }
            }else{
                rs.put("is_prescribe", null);//is_prescribe	是否具备处方权	1-有处方权,0无处方权
                rs.put("is_prescribe", 0);//is_prescribe	是否具备处方权	1-有处方权,0无处方权
            }
            //医生角色
@ -9185,14 +9201,15 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                            wlyyPrescriptionDO.setAdmNo(outpatientDO.getAdmNo());
                            wlyyPrescriptionDO.setSerialNo(outpatientDO.getAdmNo());
                            wlyyPrescriptionDO.setRealOrder(realOrder);
                            //调医保接口
                            try {
                                if(healthCareService.isHospitalFlag()){
                                    a
                                    healthCareService.advanceWarning(wlyyPrescriptionDO.getId());
                                    healthCareService.doctorPrescriptionUpload(wlyyPrescriptionDO.getId());
                                    String doctorPrescriptionUpload = entranceHealthCareUrl + "doctorPrescriptionUpload?prescriptionId="+wlyyPrescriptionDO.getId();
                                    String advanceWarning = entranceHealthCareUrl + "advanceWarning?outpatientId="+wlyyPrescriptionDO.getId();
                                    String infoResponse1 = httpClientUtil.get(doctorPrescriptionUpload,"GBK");
                                    logger.info("doctorPrescriptionUpload:"+infoResponse1);
                                    String infoResponse2 = httpClientUtil.get(advanceWarning,"GBK");
                                    logger.info("advanceWarning:"+infoResponse2);
                                }
                            }catch (Exception e){
                                e.printStackTrace();

+ 343 - 38
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/healthCare/HealthCareEndPoint.java

@ -1,9 +1,11 @@
package com.yihu.jw.hospital.endpoint.healthCare;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.healthCare.service.HealthCareService;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import com.yihu.jw.util.http.HttpClientUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -26,96 +28,243 @@ public class HealthCareEndPoint extends EnvelopRestEndpoint {
    @Autowired
    private HealthCareService healthCareService;
    @Autowired
    private HttpClientUtil httpClientUtil;
    public static String entranceHealthCareUrl = "http://172.16.100.240:10023/healthCare/";
    @GetMapping(value = "doctorAuthentication")
    @ApiOperation(value = "医师身份验证", notes = "医师身份验证")
    public ObjEnvelop doctorAuthentication(@ApiParam(name = "doctorId", value = "医生id", required = true)
                                           @RequestParam(value = "doctorId",required = true) String doctorId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.doctorAuthentication(doctorId));
                                           @RequestParam(value = "doctorId",required = true) String doctorId){
        try {
            String url = entranceHealthCareUrl + "doctorAuthentication?doctorId="+doctorId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @GetMapping(value = "doctorFaceCheckInAddress")
    @ApiOperation(value = "医师人脸签到表单地址", notes = "医师人脸签到表单地址")
    public ObjEnvelop doctorFaceCheckInAddress(@ApiParam(name = "doctorId", value = "医生id", required = true)
                                           @RequestParam(value = "doctorId",required = true) String doctorId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.doctorFaceCheckInAddress(doctorId));
                                           @RequestParam(value = "doctorId",required = true) String doctorId){
        try {
            String url = entranceHealthCareUrl + "doctorFaceCheckInAddress?doctorId="+doctorId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @GetMapping(value = "doctorFaceCheckInData")
    @ApiOperation(value = "获取医师人脸签到数据", notes = "获取医师人脸签到数据")
    public ObjEnvelop doctorFaceCheckInData(@ApiParam(name = "doctorId", value = "医生id", required = true)
                                               @RequestParam(value = "doctorId",required = true) String doctorId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.doctorFaceCheckInData(doctorId));
                                               @RequestParam(value = "doctorId",required = true) String doctorId){
        try {
            String url = entranceHealthCareUrl + "doctorFaceCheckInData?doctorId="+doctorId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "advanceWarning")
    @GetMapping(value = "advanceWarning")
    @ApiOperation(value = "事前提醒", notes = "事前提醒")
    public ObjEnvelop advanceWarning(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
                                            @RequestParam(value = "outpatientId",required = true) String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.advanceWarning(outpatientId));
                                            @RequestParam(value = "outpatientId",required = true) String outpatientId){
        try {
            String url = entranceHealthCareUrl + "advanceWarning?outpatientId="+outpatientId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "doctorPrescriptionUpload")
    @GetMapping(value = "doctorPrescriptionUpload")
    @ApiOperation(value = "医师开方上传", notes = "医师开方上传")
    public ObjEnvelop doctorPrescriptionUpload(@ApiParam(name = "prescriptionId", value = "处方id", required = true)
                                     @RequestParam(value = "prescriptionId",required = true) String prescriptionId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.doctorPrescriptionUpload(prescriptionId));
                                     @RequestParam(value = "prescriptionId",required = true) String prescriptionId){
        try {
            String url = entranceHealthCareUrl + "doctorPrescriptionUpload?outpatientId="+prescriptionId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "doctorPrescriptionUploadCancle")
    @GetMapping(value = "doctorPrescriptionUploadCancle")
    @ApiOperation(value = "医师开方上传取消", notes = "医师开方上传取消")
    public ObjEnvelop doctorPrescriptionUploadCancle(@ApiParam(name = "prescriptionId", value = "处方id", required = true)
                                               @RequestParam(value = "prescriptionId",required = true) String prescriptionId,
                                               @ApiParam(name = "cancelReason",value="取消原因",required = true)
                                               @RequestParam(value = "cancelReason",required = true) String cancelReason)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.doctorPrescriptionUploadCancle(prescriptionId,cancelReason));
                                               @RequestParam(value = "cancelReason",required = true) String cancelReason){
        try {
            String url = entranceHealthCareUrl + "doctorPrescriptionUploadCancle?prescriptionId="+prescriptionId+"&cancelReason="+cancelReason;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @GetMapping(value = "electronicPrescriptionReceiving")
    @ApiOperation(value = "电子处方订单接收", notes = "电子处方订单接收")
    public ObjEnvelop electronicPrescriptionReceiving(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
                                                     @RequestParam(value = "outpatientId",required = true) String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.electronicPrescriptionReceiving(outpatientId));
        try {
            String url = entranceHealthCareUrl + "electronicPrescriptionReceiving?outpatientId="+outpatientId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "electronicPrescriptionCancle")
    @GetMapping(value = "electronicPrescriptionCancle")
    @ApiOperation(value = "电子处方订单取消", notes = "电子处方订单取消")
    public ObjEnvelop electronicPrescriptionCancle(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
                                                      @RequestParam(value = "outpatientId",required = true) String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.electronicPrescriptionCancle(outpatientId));
        try {
            String url = entranceHealthCareUrl + "electronicPrescriptionCancle?outpatientId="+outpatientId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @GetMapping(value = "pharmacistReviewResults")
    @ApiOperation(value = "获取处方流转平台药师审方结果", notes = "获取处方流转平台药师审方结果")
    public ObjEnvelop pharmacistReviewResults(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
                                                      @RequestParam(value = "outpatientId",required = true) String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.pharmacistReviewResults(outpatientId));
        try {
            String url = entranceHealthCareUrl + "pharmacistReviewResults?outpatientId="+outpatientId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "outpatientReminder")
    @GetMapping(value = "outpatientReminder")
    @ApiOperation(value = "门诊提醒", notes = "门诊提醒")
    public ObjEnvelop outpatientReminder(@ApiParam(name = "outpatientId", value = "处方id", required = true)
                                                     @RequestParam(value = "outpatientId",required = true) String outpatientId,
                                                     @ApiParam(name = "doctorCode",value="医保医生code",required = true)
                                                     @RequestParam(value = "doctorCode",required = true) String doctorCode)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.outpatientReminder(outpatientId,doctorCode));
        try {
            String url = entranceHealthCareUrl + "outpatientReminder?outpatientId="+outpatientId+"&doctorCode="+doctorCode;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "outpatientEventReminder")
    @GetMapping(value = "outpatientEventReminder")
    @ApiOperation(value = "门诊事中提醒", notes = "门诊事中提醒")
    public ObjEnvelop outpatientEventReminder(@ApiParam(name = "outpatientId", value = "处方id", required = true)
                                                     @RequestParam(value = "outpatientId",required = true) String outpatientId,
                                                     @ApiParam(name = "doctorCode",value="医保医生code",required = true)
                                                     @RequestParam(value = "doctorCode",required = true) String doctorCode)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.outpatientEventReminder(outpatientId,doctorCode));
        try {
            String url = entranceHealthCareUrl + "outpatientEventReminder?outpatientId="+outpatientId+"&doctorCode="+doctorCode;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @GetMapping(value = "/getYlzToken")
    @ApiOperation(value = "获取医保accessToken", notes = "获取医保accessToken")
    public ObjEnvelop getChargeDict()throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.getYlzToken());
        try {
            String url = entranceHealthCareUrl + "getYlzToken";
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
@ -123,35 +272,95 @@ public class HealthCareEndPoint extends EnvelopRestEndpoint {
    @ApiOperation(value = "渠道应用是否已授权", notes = "渠道应用是否已授权")
    public ObjEnvelop authorized(@ApiParam(name = "patient", value = "患者id", required = true)
                                     @RequestParam(value = "patient", required = true)String patient)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.authorized(patient));
        try {
            String url = entranceHealthCareUrl + "authorized?patient="+patient;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "/medicareOnline")
    @ApiOperation(value = "医保在线服务授权表单(H5表单/小程序)(N20.17.01.02)", notes = "医保在线服务授权表单(H5表单/小程序)(N20.17.01.02)")
    public ObjEnvelop medicareOnline(@ApiParam(name = "patient", value = "患者id", required = true)
                                 @RequestParam(value = "patient", required = true)String patient)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.medicareOnline(patient));
        try {
            String url = entranceHealthCareUrl + "medicareOnline?patient="+patient;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "/register")
    @ApiOperation(value = "2.5.1医保挂号(N20.17.04.01)", notes = "2.5.1医保挂号(N20.17.04.01)")
    public ObjEnvelop register(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
                                     @RequestParam(value = "outpatientId", required = true)String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.register(outpatientId));
        try {
            String url = entranceHealthCareUrl + "register?outpatientId="+outpatientId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "/registerBack")
    @ApiOperation(value = " 2.5.2医保挂号冲销(N20.17.04.02)", notes = " 2.5.2医保挂号冲销(N20.17.04.02)")
    public ObjEnvelop registerBack(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
                               @RequestParam(value = "outpatientId", required = true)String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.registerBack(outpatientId));
        try {
            String url = entranceHealthCareUrl + "registerBack?outpatientId="+outpatientId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "/feeDetailUpload")
    @ApiOperation(value = " 2.5.3医保费用明细上传(N20.17.04.03)", notes = " 2.5.3医保费用明细上传(N20.17.04.03)")
    public ObjEnvelop feeDetailUpload(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
                                   @RequestParam(value = "outpatientId", required = true)String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.feeDetailUpload(outpatientId));
        try {
            String url = entranceHealthCareUrl + "feeDetailUpload?outpatientId="+outpatientId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "/feeDetailRefund")
@ -160,42 +369,114 @@ public class HealthCareEndPoint extends EnvelopRestEndpoint {
                                      @RequestParam(value = "outpatientId", required = false)String outpatientId,
                                      @ApiParam(name = "remark", value = "作废原因", required = false)
                                          @RequestParam(value = "remark", required = true)String remark)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.feeDetailRefund(outpatientId,remark));
        try {
            String url = entranceHealthCareUrl + "feeDetailRefund?outpatientId="+outpatientId+"&remark="+remark;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "/preSettlement")
    @ApiOperation(value = " 2.5.5医保预结算服务(N20.17.04.05)", notes = " 2.5.5医保预结算服务(N20.17.04.05)")
    public ObjEnvelop preSettlement(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
                                      @RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.preSettlement(outpatientId));
        try {
            String url = entranceHealthCareUrl + "preSettlement?outpatientId="+outpatientId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "/preSettlementRefund")
    @ApiOperation(value = " 2.5.6医保结算冲销服务(N20.17.04.06)", notes = " 2.5.6医保结算冲销服务(N20.17.04.06)")
    public ObjEnvelop preSettlementRefund(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
                                    @RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.preSettlementRefund(outpatientId));
        try {
            String url = entranceHealthCareUrl + "preSettlementRefund?outpatientId="+outpatientId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "/getSettlementResultUrl")
    @ApiOperation(value = " 2.5.7获取医保结算页面地址(N20.17.04.07)", notes = " 2.5.7获取医保结算页面地址(N20.17.04.07)")
    public ObjEnvelop getSettlementResultUrl(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
                                          @RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.getSettlementResultUrl(outpatientId));
        try {
            String url = entranceHealthCareUrl + "getSettlementResultUrl?outpatientId="+outpatientId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "/getSettlementResult")
    @ApiOperation(value = " 2.5.8获取医保结算结果(N20.17.04.08)", notes = " 2.5.8获取医保结算结果(N20.17.04.08)")
    public ObjEnvelop getSettlementResult(@ApiParam(name = "code", value = "结果回参", required = true)
                                             @RequestParam(value = "code", required = false)String code)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.getSettlementResult(code));
        try {
            String url = entranceHealthCareUrl + "getSettlementResult?code="+code;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "/uploadMedicalHistory")
    @ApiOperation(value = " 2.7.1上传用户病史病情及医学报告(N20.17.06.01)", notes = " 2.7.1上传用户病史病情及医学报告(N20.17.06.01)")
    public ObjEnvelop uploadMedicalHistory(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
                                          @RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.uploadMedicalHistory(outpatientId));
        try {
            String url = entranceHealthCareUrl + "uploadMedicalHistory?outpatientId="+outpatientId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "/refundMedicalHistory")
@ -204,13 +485,37 @@ public class HealthCareEndPoint extends EnvelopRestEndpoint {
                                          @RequestParam(value = "outpatientId", required = false)String outpatientId,
                                           @ApiParam(name = "remark", value = "作废原因", required = false)
                                           @RequestParam(value = "remark", required = false)String remark)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.refundMedicalHistory(outpatientId,remark));
        try {
            String url = entranceHealthCareUrl + "refundMedicalHistory?outpatientId="+outpatientId+"&remark="+remark;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
    @PostMapping(value = "/uploadIcdProcess")
    @ApiOperation(value = " 2.7.3获取问诊过程数据(N20.17.06.02)", notes = " 2.7.3获取问诊过程数据(N20.17.06.02)")
    public ObjEnvelop uploadIcdProcess(@ApiParam(name = "outpatientId", value = "门诊id", required = false)
                                           @RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.uploadIcdProcess(outpatientId));
        try {
            String url = entranceHealthCareUrl + "uploadIcdProcess?outpatientId="+outpatientId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
            }
        }catch (Exception e){
            e.printStackTrace();
            return failedObjEnvelopException(e);
        }
    }
}