package com.diagbot.web;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.diagbot.annotation.SysLogger;
import com.diagbot.dto.DoctorAdviceDTO;
import com.diagbot.dto.ExamineInfoDTO;
import com.diagbot.dto.ExamineSonInfoDTO;
import com.diagbot.dto.RespDTO;
import com.diagbot.facade.DoctorAdviceFacade;
import com.diagbot.facade.MedLisInfoFacade;
import com.diagbot.vo.CheckInfoVO;
import com.diagbot.vo.ExamineInfoVO;
import com.diagbot.vo.ExamineSonInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author cy
 * @time: 2024-09-07
 */

@RestController
@RequestMapping("/qc/medLisInfo")
@Api(value = "检验信息API", tags = { "检验信息API" })
public class MedLisInfoController {
    @Autowired
    private MedLisInfoFacade medLisInfoFacade;

    @ApiOperation(value = "获取检验信息[by:cy]",
            notes = "behospitalCode：病人住院序号<br>" +
                    "examineType：检验项类型缺陷判别<br>" +
                    "examineItemType：检验类型判别（模糊搜索）<br>" +
                    "examineItemName：检验项目名称（模糊搜索）<br>" +
                    "jyDateStart：检验开始时间<br>" +
                    "jyDateEnd：检验结束时间<br>")
    @PostMapping("/getExaminePage")
    @SysLogger("getExaminePage")
    public RespDTO<IPage<ExamineInfoDTO>> getExaminePage(@RequestBody @Valid ExamineInfoVO examineInfoVO) {
        return RespDTO.onSuc(medLisInfoFacade.getExaminePage(examineInfoVO));
    }

    @ApiOperation(value = "获取检验子项信息[by:cy]",
            notes = "behospitalCode：病人住院序号<br>" +
                    "repNo：报告单号<br>")
    @PostMapping("/getExamineSonPage")
    @SysLogger("getExamineSonPage")
    public RespDTO<IPage<ExamineSonInfoDTO>> getExamineSonPage(@RequestBody @Valid ExamineSonInfoVO examineSonInfoVO) {
        return RespDTO.onSuc(medLisInfoFacade.getExamineSonPage(examineSonInfoVO));
    }

}
