Browse Source

[医保代码]

wangzhinan 3 years ago
parent
commit
0b95bdeac9

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

@ -822,6 +822,26 @@ public class HealthCareService {
    }
    /**
     * 2.2.1渠道应用是否已授权(N20.17.01.01)
     *
     * @param patient
     * @return
     * @throws Exception
     */
    public String authorizedToEntrace(String patient) throws Exception{
        String result = "";
        String response="";
        String url = entranceHealthCareUrl+"authorized?patient="+patient;
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
            result = object.getString("obj");
        }
        return result;
    }
    /**
     * 2.2.2医保在线服务授权表单(H5表单/小程序)(N20.17.01.02)
     *
@ -856,6 +876,26 @@ public class HealthCareService {
    }
    /**
     * 2.2.2医保在线服务授权表单(H5表单/小程序)(N20.17.01.02)
     *
     * @param patient
     * @return
     * @throws Exception
     */
    public String medicareOnlineToEntrance(String patient) throws Exception{
        String result = "";
        String response="";
        String url = entranceHealthCareUrl+"medicareOnline?patient="+patient;
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
            result = object.getString("obj");
        }
        return result;
    }
    /**
     * 2.5.1医保挂号(N20.17.04.01)
     *
@ -900,6 +940,27 @@ public class HealthCareService {
        return result;
    }
    /**
     * 2.5.1医保挂号(N20.17.04.01)
     *
     * 返回值
     *
     * @param registerNo 挂号号
     * @return
     * @throws Exception
     */
    public String registerToEntrance(String registerNo) throws Exception{
        String result = "";
        String response="";
        String url = entranceHealthCareUrl+"register?registerNo="+registerNo;
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
            result = object.getString("obj");
        }
        return result;
    }
    /**
     * 2.5.2医保挂号冲销(N20.17.04.02)
@ -940,6 +1001,28 @@ public class HealthCareService {
    }
    /**
     * 2.5.2医保挂号冲销(N20.17.04.02)
     *
     * 返回值
     *
     * @param registerNo 挂号号
     * @return
     * @throws Exception
     */
    public String registerBackToEntrance(String registerNo) throws Exception{
        String result = "";
        String response="";
        String url = entranceHealthCareUrl+"registerBack?registerNo="+registerNo;
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
            result = object.getString("obj");
        }
        return result;
    }
    /**
     * 2.5.3医保费用明细上传(N20.17.04.03)
     *
@ -1024,6 +1107,26 @@ public class HealthCareService {
        return result;
    }
    /**
     * 2.5.3医保费用明细上传(N20.17.04.03)
     *
     * @param registerNo 挂号号
     * @return
     * @throws Exception
     */
    public String feeDetailUploadToEntrance(String registerNo) throws Exception{
        String result = "";
        String response="";
        String url = entranceHealthCareUrl+"feeDetailUpload?registerNo="+registerNo;
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
            result = object.getString("obj");
        }
        return result;
    }
    /**
     * 2.5.4医保费用明细上传冲销(N20.17.04.04)
     *
@ -1060,6 +1163,30 @@ public class HealthCareService {
        return result;
    }
    /**
     * 2.5.4医保费用明细上传冲销(N20.17.04.04)
     *
     * 返回值
     *
     * @param registerNo 挂号号
     * @return
     * @throws Exception
     */
    public String feeDetailRefundToEntrance(String registerNo,String remark) throws Exception{
        String result = "";
        String response="";
        String url = entranceHealthCareUrl+"feeDetailRefund?registerNo="+registerNo+"&remark="+remark;
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
            result = object.getString("obj");
        }
        return result;
    }
    /**
     * 2.5.5医保预结算服务(N20.17.04.05)
     *
@ -1071,19 +1198,10 @@ public class HealthCareService {
     */
    public YlzMedicalRelationDO preSettlement(String registerNo) throws Exception{
        String funid = "N20.17.04.05";
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(registerNo);
        if (ylzMedicalRelationDO==null){
            throw new Exception("医保费用明细上传:结算信息为空!");
        }
        List<YlzMedicalIcdDO> icdDOList = ylzMedicailIcdDao.findByMedicalId(ylzMedicalRelationDO.getId());;
        if (icdDOList!=null){
            ylzMedicalRelationDO.setYlzMedicalIcdDOList(icdDOList);
        }
        List<YlzMedicalMxDO> mxDOList = ylzMedicailMxDao.findByMedicalId(ylzMedicalRelationDO.getId());;
        if (mxDOList!=null){
            ylzMedicalRelationDO.setYlzMedicalMxDOList(mxDOList);
        }
        JSONObject data = new JSONObject();
        data.put("region_code",ylzMedicalRelationDO.getRegionCode());//参保地区划代码
        data.put("idcard",ylzMedicalRelationDO.getIdcard());//证件号码
@ -1109,59 +1227,117 @@ public class HealthCareService {
        if (result==null){
            throw new Exception("医保预结算服务失败!");
        }
        JSONObject object = JSONObject.parseObject(result);
        if (object.getString("flag").equalsIgnoreCase("1")){
            JSONObject encryptData = object.getJSONObject("encrypt_data");
            String billSerial = encryptData.getString("bill_serial");
            ylzMedicalRelationDO.setInsuranceSerial(encryptData.getString("insurance_serial"));
            ylzMedicalRelationDO.setBillSerial(encryptData.getString("bill_serial"));
            ylzMedicalRelationDO.setHisBillSerial(encryptData.getString("his_bill_serial"));
            ylzMedicalRelationDO.setSexMc(encryptData.getString("sex_mc"));
            ylzMedicalRelationDO.setPersonCash(encryptData.getString("person_cash"));
            ylzMedicalRelationDO.setPersonAccount(encryptData.getString("person_account"));
            ylzMedicalRelationDO.setFundPrice(encryptData.getString("fund_price"));
            ylzMedicalRelationDO.setJkzhPay(encryptData.getString("jkzh_pay"));
            ylzMedicalRelationDO.setOwnPay(encryptData.getString("own_pay"));
            ylzMedicalRelationDO.setAccountBalance(encryptData.getString("account_balance"));
            ylzMedicalRelationDO.setHospitalizationQty(encryptData.getString("hospitalization_qty"));
            ylzMedicalRelationDO.setPayDate(DateUtil.strToDateLong(encryptData.getString("pay_date")));
            ylzMedicalRelationDO.setInvoiceJj(encryptData.getString("invoice_jj"));
            ylzMedicalRelationDO.setInvoiceXj(encryptData.getString("invoice_xj"));
            ylzMedicalRelationDO.setInvoiceZh(encryptData.getString("invoice_zh"));
            ylzMedicalRelationDO.setCreateTime(new Date());
            ylzMedicalRelationDO = ylzMedicailRelationDao.save(ylzMedicalRelationDO);
            JSONArray jsonArray = encryptData.getJSONArray("fplist");
            for (int i=0;i<jsonArray.size();i++){
                JSONObject jsonObject = jsonArray.getJSONObject(i);
                YlzMedicalBillDO ylzMb = new YlzMedicalBillDO();
                ylzMb.setMedicalId(ylzMedicalRelationDO.getId());
                ylzMb.setInvoicePay(jsonObject.getString("invoice_pay"));
                ylzMb.setInvoiceType(jsonObject.getString("invoice_type"));
                ylzMb.setInvoiceTypeName(jsonObject.getString("invoice_type_name"));
                ylzMb.setProjectPay(jsonObject.getString("project_pay"));
                ylzMb.setOwnPay(jsonObject.getString("own_pay"));
                ylzMb.setSpecialPay(jsonObject.getString("special_pay"));
                ylzMb.setUninsurancePay(jsonObject.getString("uninsurance_pay"));
                ylzMb.setCreateTime(new Date());
                ylzMedicailBillDao.save(ylzMb);
        return ylzMedicalRelationDO;
    }
    /**
     * 2.5.5医保预结算服务(N20.17.04.05)
     *
     * 返回值
     *
     * @param registerNo 挂号号
     * @return
     * @throws Exception
     */
    public YlzMedicalRelationDO preSettlementToEntrance(String registerNo) throws Exception{
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(registerNo);
        if (ylzMedicalRelationDO==null){
            throw new Exception("医保费用明细上传:结算信息为空!");
        }
        List<YlzMedicalIcdDO> icdDOList = ylzMedicailIcdDao.findByMedicalId(ylzMedicalRelationDO.getId());;
        if (icdDOList!=null){
            ylzMedicalRelationDO.setYlzMedicalIcdDOList(icdDOList);
        }
        List<YlzMedicalMxDO> mxDOList = ylzMedicailMxDao.findByMedicalId(ylzMedicalRelationDO.getId());;
        if (mxDOList!=null){
            ylzMedicalRelationDO.setYlzMedicalMxDOList(mxDOList);
        }
        String result = "";
        String response="";
        String url = entranceHealthCareUrl+"preSettlement?registerNo="+registerNo;
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
            result = object.getString("obj");
            JSONObject jsonObject1 = JSONObject.parseObject(result);
            if (jsonObject1.getString("flag").equalsIgnoreCase("1")){
                JSONObject encryptData = jsonObject1.getJSONObject("encrypt_data");
                String billSerial = encryptData.getString("bill_serial");
                ylzMedicalRelationDO.setInsuranceSerial(encryptData.getString("insurance_serial"));
                ylzMedicalRelationDO.setBillSerial(encryptData.getString("bill_serial"));
                ylzMedicalRelationDO.setHisBillSerial(encryptData.getString("his_bill_serial"));
                ylzMedicalRelationDO.setSexMc(encryptData.getString("sex_mc"));
                ylzMedicalRelationDO.setPersonCash(encryptData.getString("person_cash"));
                ylzMedicalRelationDO.setPersonAccount(encryptData.getString("person_account"));
                ylzMedicalRelationDO.setFundPrice(encryptData.getString("fund_price"));
                ylzMedicalRelationDO.setJkzhPay(encryptData.getString("jkzh_pay"));
                ylzMedicalRelationDO.setOwnPay(encryptData.getString("own_pay"));
                ylzMedicalRelationDO.setAccountBalance(encryptData.getString("account_balance"));
                ylzMedicalRelationDO.setHospitalizationQty(encryptData.getString("hospitalization_qty"));
                ylzMedicalRelationDO.setPayDate(DateUtil.strToDateLong(encryptData.getString("pay_date")));
                ylzMedicalRelationDO.setInvoiceJj(encryptData.getString("invoice_jj"));
                ylzMedicalRelationDO.setInvoiceXj(encryptData.getString("invoice_xj"));
                ylzMedicalRelationDO.setInvoiceZh(encryptData.getString("invoice_zh"));
                ylzMedicalRelationDO.setCreateTime(new Date());
                ylzMedicalRelationDO = ylzMedicailRelationDao.save(ylzMedicalRelationDO);
                JSONArray jsonArray = encryptData.getJSONArray("fplist");
                for (int i=0;i<jsonArray.size();i++){
                    JSONObject jsonObject = jsonArray.getJSONObject(i);
                    YlzMedicalBillDO ylzMb = new YlzMedicalBillDO();
                    ylzMb.setMedicalId(ylzMedicalRelationDO.getId());
                    ylzMb.setInvoicePay(jsonObject.getString("invoice_pay"));
                    ylzMb.setInvoiceType(jsonObject.getString("invoice_type"));
                    ylzMb.setInvoiceTypeName(jsonObject.getString("invoice_type_name"));
                    ylzMb.setProjectPay(jsonObject.getString("project_pay"));
                    ylzMb.setOwnPay(jsonObject.getString("own_pay"));
                    ylzMb.setSpecialPay(jsonObject.getString("special_pay"));
                    ylzMb.setUninsurancePay(jsonObject.getString("uninsurance_pay"));
                    ylzMb.setCreateTime(new Date());
                    ylzMedicailBillDao.save(ylzMb);
                }
                logger.info("医保预结算服务保存成功");
            }
            logger.info("医保预结算服务保存成功");
        }else {
            return null;
        }
        return ylzMedicalRelationDO;
    }
    /**
     * 2.5.6医保结算冲销服务(N20.17.04.06)
     *
     * 返回值
     *
     * @param registerNo
     * @return
     * @throws Exception
     */
    public String preSettlementRefundToEntrance(String registerNo) throws Exception{
        String result = "";
        String response="";
        String url = entranceHealthCareUrl+"feeDetailRefund?registerNo="+registerNo;
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
            result = object.getString("obj");
        }
        return result;
    }
    /**
     * 2.5.6医保结算冲销服务(N20.17.04.06)
     *
     * 返回值
     *
     * @param outpatientId
     * @param registerNo
     * @return
     * @throws Exception
     */
    public String preSettlementRefund(String outpatientId) throws Exception{
    public String preSettlementRefund(String registerNo) throws Exception{
        String funid = "N20.17.04.06";
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(outpatientId);
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(registerNo);
        if (ylzMedicalRelationDO==null){
            throw new Exception("医保结算冲销上传:结算信息为空!");
        }
@ -1234,6 +1410,29 @@ public class HealthCareService {
        return result;
    }
    /**
     * 2.5.7获取医保结算页面地址(N20.17.04.07)
     *
     * 返回值
     *
     * @param registerNo 挂号号
     * @return
     * @throws Exception
     */
    public String getSettlementResultUrlToEntrance(String registerNo) throws Exception{
        String result = "";
        String response="";
        String url = entranceHealthCareUrl+"getSettlementResultUrl?registerNo="+registerNo;
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
            result = object.getString("obj");
        }
        return result;
    }
    /**
     * 2.5.8获取医保结算结果(N20.17.04.08)
     *
@ -1254,6 +1453,28 @@ public class HealthCareService {
        return result;
    }
    /**
     * 2.5.8获取医保结算结果(N20.17.04.08)
     *
     * 返回值
     *
     * @param code
     * @return
     * @throws Exception
     */
    public String getSettlementResultToEntrance(String code) throws Exception{
        String result = "";
        String response="";
        String url = entranceHealthCareUrl+"getSettlementResultUrl?code="+code;
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
            result = object.getString("obj");
        }
        return result;
    }
    /**
     * 2.7.1上传用户病史病情及医学报告(N20.17.06.01)
     *
@ -1300,6 +1521,29 @@ public class HealthCareService {
        return result;
    }
    /**
     * 2.7.1上传用户病史病情及医学报告(N20.17.06.01)
     *
     * 返回值
     *
     * @param outpatientId
     * @return
     * @throws Exception
     */
    public String uploadMedicalHistoryToEntrance(String outpatientId) throws Exception{
        String result = "";
        String response="";
        String url = entranceHealthCareUrl+"uploadMedicalHistory?outpatientId="+outpatientId;
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
            result = object.getString("obj");
        }
        return result;
    }
    /**
     * 2.7.2作废用户病史病情及医学报告(N20.17.06.06)
     *
@ -1332,6 +1576,28 @@ public class HealthCareService {
        return result;
    }
    /**
     * 2.7.2作废用户病史病情及医学报告(N20.17.06.06)
     *
     * 返回值
     *
     * @param outpatientId
     * @return
     * @throws Exception
     */
    public String refundMedicalHistoryToEntrance(String outpatientId,String remark) throws Exception{
        String result = "";
        String response="";
        String url = entranceHealthCareUrl+"refundMedicalHistory?outpatientId="+outpatientId+"&remark="+remark;
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
            result = object.getString("obj");
        }
        return result;
    }
    /**
     * 2.7.3获取问诊过程数据(N20.17.06.02)
     *
@ -1372,6 +1638,28 @@ public class HealthCareService {
        return result;
    }
    /**
     * 2.7.3获取问诊过程数据(N20.17.06.02)
     *
     * 返回值
     *
     * @param outpatientId
     * @return
     * @throws Exception
     */
    public String uploadIcdProcessToEntrance(String outpatientId) throws Exception{
        String result = "";
        String response="";
        String url = entranceHealthCareUrl+"uploadIcdProcess?outpatientId="+outpatientId;
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
            result = object.getString("obj");
        }
        return result;
    }
    public Boolean isHospitalFlag(){
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("medicalFlag");
        if (hospitalSysDictDO!=null){

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

@ -6769,7 +6769,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        Boolean flag = healthCareService.isHospitalFlag();
        if (flag){
            try{
                String result = healthCareService.authorized(basePatientDO.getId());
                String result = healthCareService.authorizedToEntrace(basePatientDO.getId());
                com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(result);
                if (object.getString("flag").equalsIgnoreCase("1")){
                    com.alibaba.fastjson.JSONObject encryptData = object.getJSONObject("encrypt_data");

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/patient/service/BasePatientService.java

@ -373,7 +373,7 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
        }
        Boolean flag = healthCareService.isHospitalFlag();
        if (flag){
            String result = healthCareService.authorized(basePatientDO.getId());
            String result = healthCareService.authorizedToEntrace(basePatientDO.getId());
            JSONObject object = JSONObject.parseObject(result);
            if (object.getString("flag").equalsIgnoreCase("1")){
                JSONObject encryptData = object.getJSONObject("encrypt_data");

+ 61 - 61
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/healthCare/HealthCareEndPoint.java

@ -38,77 +38,77 @@ public class HealthCareEndPoint extends EnvelopRestEndpoint {
    @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{
                                               @RequestParam(value = "doctorId",required = true) String doctorId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.doctorFaceCheckInAddress(doctorId));
    }
    @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{
                                            @RequestParam(value = "doctorId",required = true) String doctorId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.doctorFaceCheckInData(doctorId));
    }
    @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{
                                     @RequestParam(value = "outpatientId",required = true) String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.advanceWarning(outpatientId));
    }
    @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{
                                               @RequestParam(value = "prescriptionId",required = true) String prescriptionId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.doctorPrescriptionUpload(prescriptionId));
    }
    @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{
                                                     @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));
    }
    @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{
                                                      @RequestParam(value = "outpatientId",required = true) String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.electronicPrescriptionReceiving(outpatientId));
    }
    @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{
                                                   @RequestParam(value = "outpatientId",required = true) String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.electronicPrescriptionCancle(outpatientId));
    }
    @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{
                                              @RequestParam(value = "outpatientId",required = true) String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.pharmacistReviewResults(outpatientId));
    }
    @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{
                                         @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));
    }
    @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{
                                              @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));
    }
@ -119,98 +119,98 @@ public class HealthCareEndPoint extends EnvelopRestEndpoint {
    }
    @PostMapping(value = "/authorized")
    @GetMapping(value = "/authorized")
    @ApiOperation(value = "渠道应用是否已授权", notes = "渠道应用是否已授权")
    public ObjEnvelop authorized(@ApiParam(name = "patient", value = "患者id", required = true)
                                     @RequestParam(value = "patient", required = true)String patient)throws Exception{
                                 @RequestParam(value = "patient", required = true)String patient)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.authorized(patient));
    }
    @PostMapping(value = "/medicareOnline")
    @GetMapping(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{
                                     @RequestParam(value = "patient", required = true)String patient)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.medicareOnline(patient));
    }
    @PostMapping(value = "/register")
    @GetMapping(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));
    public ObjEnvelop register(@ApiParam(name = "registerNo", value = "挂号号", required = true)
                               @RequestParam(value = "registerNo", required = true)String registerNo)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.register(registerNo));
    }
    @PostMapping(value = "/registerBack")
    @GetMapping(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));
    public ObjEnvelop registerBack(@ApiParam(name = "registerNo", value = "挂号号", required = true)
                                   @RequestParam(value = "registerNo", required = true)String registerNo)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.registerBack(registerNo));
    }
    @PostMapping(value = "/feeDetailUpload")
    @GetMapping(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));
    public ObjEnvelop feeDetailUpload(@ApiParam(name = "registerNo", value = "挂号号", required = true)
                                      @RequestParam(value = "registerNo", required = true)String registerNo)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.feeDetailUpload(registerNo));
    }
    @PostMapping(value = "/feeDetailRefund")
    @GetMapping(value = "/feeDetailRefund")
    @ApiOperation(value = " 2.5.4医保费用明细上传冲销(N20.17.04.04)", notes = " 2.5.4医保费用明细上传冲销(N20.17.04.04)")
    public ObjEnvelop feeDetailRefund(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
                                      @RequestParam(value = "outpatientId", required = false)String outpatientId,
    public ObjEnvelop feeDetailRefund(@ApiParam(name = "registerNo", value = "挂号号", required = true)
                                      @RequestParam(value = "registerNo", required = false)String registerNo,
                                      @ApiParam(name = "remark", value = "作废原因", required = false)
                                          @RequestParam(value = "remark", required = true)String remark)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.feeDetailRefund(outpatientId,remark));
                                      @RequestParam(value = "remark", required = true)String remark)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.feeDetailRefund(registerNo,remark));
    }
    @PostMapping(value = "/preSettlement")
    @GetMapping(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{
                                    @RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.preSettlement(outpatientId));
    }
    @PostMapping(value = "/preSettlementRefund")
    @GetMapping(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));
    public ObjEnvelop preSettlementRefund(@ApiParam(name = "registerNo", value = "门诊id", required = true)
                                          @RequestParam(value = "registerNo", required = false)String registerNo)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.preSettlementRefund(registerNo));
    }
    @PostMapping(value = "/getSettlementResultUrl")
    @GetMapping(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));
    public ObjEnvelop getSettlementResultUrl(@ApiParam(name = "registerNo", value = "门诊id", required = true)
                                             @RequestParam(value = "registerNo", required = false)String registerNo)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.getSettlementResultUrl(registerNo));
    }
    @PostMapping(value = "/getSettlementResult")
    @GetMapping(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{
                                          @RequestParam(value = "code", required = false)String code)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.getSettlementResult(code));
    }
    @PostMapping(value = "/uploadMedicalHistory")
    @GetMapping(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{
                                           @RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.uploadMedicalHistory(outpatientId));
    }
    @PostMapping(value = "/refundMedicalHistory")
    @GetMapping(value = "/refundMedicalHistory")
    @ApiOperation(value = " 2.7.2作废用户病史病情及医学报告(N20.17.06.06)", notes = " 2.7.2作废用户病史病情及医学报告(N20.17.06.06)")
    public ObjEnvelop refundMedicalHistory(@ApiParam(name = "outpatientId", value = "门诊id", required = false)
                                          @RequestParam(value = "outpatientId", required = false)String outpatientId,
                                           @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));
    }
    @PostMapping(value = "/uploadIcdProcess")
    @GetMapping(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{
                                       @RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.uploadIcdProcess(outpatientId));
    }
}