package thyyxxk.webserver.controller.medicalinsurance;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import thyyxxk.webserver.config.auth.PassToken;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.medicalinsurance.inpatient.ZyPatientInfo;
import thyyxxk.webserver.entity.inpatient.patient.Overview;
import thyyxxk.webserver.service.medicalinsurance.SiZyService;

/**
 * @description: 住院医保入口
 * @author: DingJie
 * @create: 2021-06-08 16:18:53
 **/
@RestController
@RequestMapping("/siZy")
public class SiZyController {
    private final SiZyService service;

    @Autowired
    public SiZyController(SiZyService service) {
        this.service = service;
    }

    @PostMapping("/admissRegister")
    public ResultVo<String> admissRegister(@RequestBody ZyPatientInfo p) {
        return service.admissRegister(p);
    }

    @PassToken
    @PostMapping("/modifyAdmissionInfo")
    public ResultVo<String> modifyAdmissionInfo(@RequestBody ZyPatientInfo p) {
        return service.modifyAdmissionInfo(p);
    }

    @PassToken
    @PostMapping("/revokeAdmission")
    public ResultVo<String> revokeAdmission(@RequestBody ZyPatientInfo p) {
        return service.revokeAdmission(p);
    }

    @PostMapping("/uploadFeeDetail")
    public ResultVo<String> uploadFeeDetail(@RequestBody Overview o) {
        return service.uploadFeeDetail(o);
    }

    @PostMapping("/revokeUploadFees")
    public ResultVo<String> revokeUploadFees(@RequestBody ZyPatientInfo p) {
        return service.revokeUploadFees(p);
    }

    @PostMapping("/hospitalizationPreSettlement")
    public ResultVo<String> hospitalizationPreSettlement(@RequestBody ZyPatientInfo p) {
        return service.hospitalizationPreSettlement(p);
    }

    @PassToken
    @PostMapping("/dischargeProcessing")
    public ResultVo<String> dischargeProcessing(@RequestBody ZyPatientInfo p) {
        return service.dischargeProcessing(p);
    }

    @PassToken
    @PostMapping("/revokeDischarge")
    public ResultVo<String> revokeDischarge(@RequestBody ZyPatientInfo p) {
        return service.revokeDischarge(p);
    }

    @PassToken
    @PostMapping("/revokeSettlement")
    public ResultVo<String> revokeSettlement(@RequestBody ZyPatientInfo p) {
        return service.revokeSettlement(p);
    }
}
