wangzhinan 3 lat temu
rodzic
commit
22484695b6

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

@ -0,0 +1,216 @@
package com.yihu.jw.entrance.controller.healthCare;
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 io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
 * @author wangzhinan
 *
 * Created at 20211003
 */
@RestController
@RequestMapping(value = BaseHospitalRequestMapping.HealthCare.PREFIX)
@Api(value = "互联网医保", description = "互联网医保")
public class HealthCareEndPoint extends EnvelopRestEndpoint {
    private static final Logger logger = LoggerFactory.getLogger(HealthCareEndPoint.class);
    @Autowired
    private HealthCareService healthCareService;
    @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));
    }
    @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));
    }
    @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));
    }
    @PostMapping(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));
    }
    @PostMapping(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));
    }
    @PostMapping(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));
    }
    @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));
    }
    @PostMapping(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));
    }
    @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));
    }
    @PostMapping(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));
    }
    @PostMapping(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));
    }
    @GetMapping(value = "/getYlzToken")
    @ApiOperation(value = "获取医保accessToken", notes = "获取医保accessToken")
    public ObjEnvelop getChargeDict()throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.getYlzToken());
    }
    @PostMapping(value = "/authorized")
    @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));
    }
    @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));
    }
    @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));
    }
    @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));
    }
    @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));
    }
    @PostMapping(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,
                                      @ApiParam(name = "remark", value = "作废原因", required = false)
                                          @RequestParam(value = "remark", required = true)String remark)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.feeDetailRefund(outpatientId,remark));
    }
    @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));
    }
    @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));
    }
    @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));
    }
    @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));
    }
    @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));
    }
    @PostMapping(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,
                                           @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")
    @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));
    }
}