package com.xinelu.manage.mapper.screeningrecord;

import com.xinelu.common.core.domain.TimelineVo;
import com.xinelu.manage.domain.screeningrecord.ScreeningRecord;
import com.xinelu.manage.dto.screeningrecord.ScreeningRecordApplyDTO;
import com.xinelu.manage.dto.screeningrecord.ScreeningRecordDTO;
import com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
* @author mengkuiliang
* @description 针对表【sd_screening_record(居民预约记录表)】的数据库操作Mapper
* @createDate 2023-01-29 13:53:13
* @Entity com.disease.business.domain.entity.ScreeningRecord
*/
public interface ScreeningRecordMapper {

    /**
     * @Author mengkuiliang
     * @Description 新增
     * @Date 2023-01-29 14:13
     * @Param [body]
     * @return void
     **/
    int insert(ScreeningRecordApplyDTO body);

    /**
     * @Author mengkuiliang
     * @Description 修改
     * @Date 2023-01-29 14:14
     * @Param [record]
     * @return int
     **/
    int update(ScreeningRecord record);

    /**
     * @Author mengkuiliang
     * @Description 更新预约状态
     * @Date 2023-01-29 14:14
     * @Param [screeningId]
     * @return void
     **/
    void updateStatus(@Param("screeningId") String screeningId, @Param("screeningStatus") String screeningStatus, @Param("screeningDate") Date screeningDate);

    /**
     * @Author mengkuiliang
     * @Description 获取预约详情
     * @Date 2023-01-29 14:14
     * @Param [screeningId]
     * @return com.disease.business.domain.vo.ScreeningRecordVo
     **/
    ScreeningRecordVo detail(String screeningId);

    /**
     * @Author mengkuiliang
     * @Description 获取当前居民预约信息
     * @Date 2023-01-29 14:51
     * @Param [patientId]
     * @return com.disease.business.domain.vo.ScreeningRecordVo
     **/
    ScreeningRecordVo getScreeningByPatientId(String patientId);

    /**
     * @Author mengkuiliang
     * @Description 获取预约记录
     * @Date 2023-01-29 15:56
     * @Param [query]
     * @return java.util.List<com.disease.business.domain.vo.ScreeningRecordVo>
     **/
    List<ScreeningRecordVo> list(ScreeningRecordDTO query);

    /**
     * @Author mengkuiliang
     * @Description 获取筛查结果记录
     * @Date 2023-01-29 15:56
     * @Param [query]
     * @return java.util.List<com.disease.business.domain.vo.ScreeningRecordVo>
     **/
    List<ScreeningRecordVo> record(ScreeningRecordDTO query);

    /**
     * @Author mengkuiliang
     * @Description 获取最新一次筛查结果
     * @Date 2023-01-30 13:07
     * @Param [patientId]
     * @return com.disease.business.domain.vo.ScreeningRecordVo
     **/
    ScreeningRecordVo getScreeningOfLast(@Param("patientId") String patientId, @Param("screeningStatus")String screeningStatus, @Param("screeningType") String screeningType, @Param("projectId") String projectId);

	ScreeningRecord selectByScreeningId(String screeningId);

	List<TimelineVo> selectTimeLineList(@Param("patientId") String patientId);

	List<ScreeningRecordVo> screeningList(ScreeningRecordDTO query);
}




