package com.openhis.administration.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.administration.domain.Encounter;
import com.openhis.administration.dto.EncounterAccountDto;
import com.openhis.administration.dto.EncounterDataDto;

/**
 * 就诊管理Mapper接口
 *
 * @author system
 * @date 2025-02-20
 */
@Repository
public interface EncounterMapper extends BaseMapper<Encounter> {

    /**
     * 查询挂号信息
     *
     * @param startDate 开始时间
     * @param endDate 结束时间
     * @return 集合
     */
    List<EncounterAccountDto> getEncounterInfoByTime(@Param("startDate") Date startDate,
        @Param("endDate") Date endDate);
    /**
     * Desc: 根据条件查询 encounter 数据
     * @param imp
     * @param amb
     * @param encounterStatus
     * @param encounterIds
     * @Author raymond
     * @Date 12:36 2025/10/28
     * @return java.util.List<com.openhis.administration.dto.EncounterDataDto>
     **/
    List<EncounterDataDto> searchEncounterDataByIds(@Param("imp") Integer imp, @Param("amb") Integer amb,
        @Param("encounterStatus") Long encounterStatus, @Param("encounterIds") List<Long> encounterIds);
    /**
     * Desc: 根据参数加载 患者记录信息
     * @param classEnum
     * @param encounterId
     * @Author raymond
     * @Date 12:34 2025/11/3
     * @return com.openhis.administration.dto.EncounterDataDto
     **/
    EncounterDataDto getPatientIdByParam(@Param("classEnum") Integer classEnum,
                                         @Param("encounterId") Long encounterId);
}