package com.diagbot.web;

import com.diagbot.annotation.SysLogger;
import com.diagbot.dto.RespDTO;
import com.diagbot.facade.str.*;
import com.diagbot.vo.str.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
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.RestController;

import java.util.List;

@RestController
@RequestMapping("/qc/data_str")
@Api(value = "对接接口API-结构化", tags = { "对接接口API-结构化" })
public class DataStrController {

    @Autowired
    private BStrAdmissionNoteFacade bStrAdmissionNoteFacade;

    @Autowired
    private BStrBloodResultFacade bStrBloodResultFacade;

    @Autowired
    private BStrBloodTransfusionFacade bStrBloodTransfusionFacade;

    @Autowired
    private BStrConsultationApplyFacade bStrConsultationApplyFacade;

    @Autowired
    private BStrCrisisNoteFacade bStrCrisisNoteFacade;

    @Autowired
    private BStrConsultationRecordFacade bStrConsultationRecordFacade;

    @Autowired
    private BStrConsultationResultFacade bStrConsultationResultFacade;

    @Autowired
    private BStrConsultationNoteFacade bStrConsultationNoteFacade;

    @Autowired
    private BStrFirstRecordFacade bStrFirstRecordFacade;

    @Autowired
    private BStrDifficultCaseFacade bStrDifficultCaseFacade;

    @Autowired
    private BStrDeathDiscussionFacade bStrDeathDiscussionFacade;

    @Autowired
    private BStrDeathNoteFacade bStrDeathNoteFacade;

    @Autowired
    private BStrOperativeFirstRecordFacade bStrOperativeFirstRecordFacade;

    @Autowired
    private BStrLeaveHospitalFacade bStrLeaveHospitalFacade;

    @Autowired
    private BStrIllCriticallyFacade bStrIllCriticallyFacade;

    @Autowired
    private BStrIllSeriouslFacade bStrIllSeriouslFacade;

    @Autowired
    private BStrPreoperativeDiscussionFacade bStrPreoperativeDiscussionFacade;

    @Autowired
    private BStrPeriodConclusionFacade bStrPeriodConclusionFacade;

    @Autowired
    private BStrRescueNoteFacade bStrRescueNoteFacade;

    @Autowired
    private BStrTransferInNoteFacade bStrTransferInNoteFacade;

    @Autowired
    private BStrTransferOutNoteFacade bStrTransferOutNoteFacade;

    @Autowired
    private BStrWardRecordFacade bStrWardRecordFacade;

    @Autowired
    private BStrOperativeNoteFacade bStrOperativeNoteFacade;

    @Autowired
    private BStrTalkInformFacade bStrTalkInformFacade;

    @Autowired
    private BStrInformedConsentFacade bStrInformedConsentFacade;

    @Autowired
    private BStrContentFacade bStrContentFacade;

    @ApiOperation(value = "文书内容")
    @PostMapping("/sendContent")
    @SysLogger("sendContent")
    public RespDTO sendContent(@RequestBody StrContentVO strContentVO){
        return bStrContentFacade.execDealData(strContentVO);
    }

    @ApiOperation(value = "入院记录")
    @PostMapping("/sendAdmissionNote")
    @SysLogger("sendAdmissionNote")
    public RespDTO sendAdmissionNote(@RequestBody List<StrAdmissionNoteVO> list){
        return bStrAdmissionNoteFacade.execDealData(list);
    }

    @ApiOperation(value = "输血后效果评价")
    @PostMapping("/sendBloodResult")
    @SysLogger("sendBloodResult")
    public RespDTO sendBloodResult(@RequestBody List<StrBloodResultVO> list){
        return bStrBloodResultFacade.execDealData(list);
    }

    @ApiOperation(value = "输血/血制品病程记录")
    @PostMapping("/sendBloodTransfusion")
    @SysLogger("sendBloodTransfusion")
    public RespDTO sendBloodTransfusion(@RequestBody List<StrBloodTransfusionVO> list){
        return bStrBloodTransfusionFacade.execDealData(list);
    }

    @ApiOperation(value = "会诊申请单")
    @PostMapping("/sendConsultationApply")
    @SysLogger("sendConsultationApply")
    public RespDTO<?> sendConsultationApply(@RequestBody List<StrConsultationApplyVO> list){
        return bStrConsultationApplyFacade.execDealData(list);
    }

    @ApiOperation(value = "会诊单（申请和结果）")
    @PostMapping("/sendConsultationNote")
    @SysLogger("sendConsultationNote")
    public RespDTO sendConsultationNote(@RequestBody List<StrConsultationNoteVO> list){
        return bStrConsultationNoteFacade.execDealData(list);
    }

    @ApiOperation(value = "会诊记录")
    @PostMapping("/sendConsultationRecord")
    @SysLogger("sendConsultationRecord")
    public RespDTO sendConsultationRecord(@RequestBody List<StrConsultationRecordVO> list){
        return bStrConsultationRecordFacade.execDealData(list);
    }

    @ApiOperation(value = "会诊结果单")
    @PostMapping("/sendConsultationResult")
    @SysLogger("sendConsultationResult")
    public RespDTO sendConsultationResult(@RequestBody List<StrConsultationResultVO> list){
        return bStrConsultationResultFacade.execDealData(list);
    }

    @ApiOperation(value = "危急值记录")
    @PostMapping("/sendCrisisNote")
    @SysLogger("sendCrisisNote")
    public RespDTO sendCrisisNote(@RequestBody List<StrCrisisNoteVO> list){
        return bStrCrisisNoteFacade.execDealData(list);
    }

    @ApiOperation(value = "死亡病例讨论记录")
    @PostMapping("/sendDeathDiscussion")
    @SysLogger("sendDeathDiscussion")
    public RespDTO sendDeathDiscussion(@RequestBody List<StrDeathDiscussionVO> list){
        return bStrDeathDiscussionFacade.execDealData(list);
    }

    @ApiOperation(value = "死亡记录")
    @PostMapping("/sendDeathNote")
    @SysLogger("sendDeathNote")
    public RespDTO sendDeathNote(@RequestBody List<StrDeathNoteVO> list){
        return bStrDeathNoteFacade.execDealData(list);
    }

    @ApiOperation(value = "疑难病例讨论记录")
    @PostMapping("/sendDifficultCase")
    @SysLogger("sendDifficultCase")
    public RespDTO sendDifficultCase(@RequestBody List<StrDifficultCaseVO> list){
        return bStrDifficultCaseFacade.execDealData(list);
    }

    @ApiOperation(value = "首次病程录")
    @PostMapping("/sendFirstRecord")
    @SysLogger("sendFirstRecord")
    public RespDTO sendFirstRecord(@RequestBody List<StrFirstRecordVO> list){
        return bStrFirstRecordFacade.execDealData(list);
    }

    @ApiOperation(value = "病危通知单")
    @PostMapping("/sendIllCritically")
    @SysLogger("sendIllCritically")
    public RespDTO sendIllCritically(@RequestBody List<StrIllCriticallyVO> list){
        return bStrIllCriticallyFacade.execDealData(list);
    }

    @ApiOperation(value = "病重通知单")
    @PostMapping("/sendIllSeriousl")
    @SysLogger("sendIllSeriousl")
    public RespDTO sendIllSeriousl(@RequestBody List<StrIllSeriouslVO> list){
        return bStrIllSeriouslFacade.execDealData(list);
    }

    @ApiOperation(value = "出院小结")
    @PostMapping("/sendLeaveHospital")
    @SysLogger("sendLeaveHospital")
    public RespDTO sendLeaveHospital(@RequestBody List<StrLeaveHospitalVO> list){
        return bStrLeaveHospitalFacade.execDealData(list);
    }

    @ApiOperation(value = "术后首程")
    @PostMapping("/sendOperativeFirstRecord")
    @SysLogger("sendOperativeFirstRecord")
    public RespDTO sendOperativeFirstRecord(@RequestBody List<StrOperativeFirstRecordVO> list){
        return bStrOperativeFirstRecordFacade.execDealData(list);
    }

    @ApiOperation(value = "手术记录")
    @PostMapping("/sendOperativeNote")
    @SysLogger("sendOperativeNote")
    public RespDTO sendOperativeNote(@RequestBody List<StrOperativeNoteVO> list){
        return bStrOperativeNoteFacade.execDealData(list);
    }

    @ApiOperation(value = "查房记录")
    @PostMapping("/sendWardRecord")
    @SysLogger("sendWardRecord")
    public RespDTO sendWardRecord(@RequestBody List<StrWardRecordVO> list){
        return bStrWardRecordFacade.execDealData(list);
    }

    @ApiOperation(value = "转出记录")
    @PostMapping("/sendTransferOutNote")
    @SysLogger("sendTransferOutNote")
    public RespDTO sendTransferOutNote(@RequestBody List<StrTransferOutNoteVO> list){
        return bStrTransferOutNoteFacade.execDealData(list);
    }

    @ApiOperation(value = "转入记录")
    @PostMapping("/sendTransferInNote")
    @SysLogger("sendTransferInNote")
    public RespDTO sendTransferInNote(@RequestBody List<StrTransferInNoteVO> list){
        return bStrTransferInNoteFacade.execDealData(list);
    }

    @ApiOperation(value = "抢救记录")
    @PostMapping("/sendRescueNote")
    @SysLogger("sendRescueNote")
    public RespDTO sendRescueNote(@RequestBody List<StrRescueNoteVO> list){
        return bStrRescueNoteFacade.execDealData(list);
    }

    @ApiOperation(value = "阶段小结")
    @PostMapping("/sendPeriodConclusion")
    @SysLogger("sendPeriodConclusion")
    public RespDTO sendPeriodConclusion(@RequestBody List<StrPeriodConclusionVO> list){
        return bStrPeriodConclusionFacade.execDealData(list);
    }

    @ApiOperation(value = "术前讨论小结")
    @PostMapping("/sendPreoperativeDiscussion")
    @SysLogger("sendPreoperativeDiscussion")
    public RespDTO sendPreoperativeDiscussion(@RequestBody List<StrPreoperativeDiscussionVO> list){
        return bStrPreoperativeDiscussionFacade.execDealData(list);
    }

    @ApiOperation(value = "告知书记录")
    @PostMapping("/sendTalkInform")
    @SysLogger("sendTalkInform")
    public RespDTO sendTalkInform(@RequestBody List<StrTalkInformVO> list){
        return bStrTalkInformFacade.execDealData(list);
    }

    @ApiOperation(value = "知情同意书")
    @PostMapping("/sendInformedConsent")
    @SysLogger("sendInformedConsent")
    public RespDTO sendInformedConsent(@RequestBody List<StrInformedConsentVO> list){
        return bStrInformedConsentFacade.execDealData(list);
    }

}
