package com.openhis.web.inpatientmanage.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.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.openhis.document.domain.VitalSigns;
import com.openhis.web.inpatientmanage.dto.PatientHomeDto;
import com.openhis.web.inpatientmanage.dto.VitalSignsDto;

/**
 * 三测单
 *
 * @author SY
 * @since 2025/05/29
 */
@Repository
public interface VitalSignsAppMapper {

    /**
     * 三测单查询
     *
     * @param page 分页
     * @param patientId 患者ID
     * @param searchKey 查询条件
     * @return 三测单信息
     */
    IPage<VitalSignsDto> getVitalSignsInfo(@Param("page") Page<PatientHomeDto> page, @Param("patientId") Long patientId,
        @Param("searchKey") String searchKey, @Param(Constants.WRAPPER) QueryWrapper<VitalSignsDto> queryWrapper);

    /**
     * 查询记录
     *
     * @param startTime 开始时间
     * @param endTime 结束时间
     * @return 查询记录结果
     */
    List<VitalSigns> searchVitalSigns(@Param("startTime") String startTime, @Param("endTime") String endTime);

    /**
     * 删除记录
     *
     * @param patientId 患者ID
     * @param encounterId 就诊ID
     * @param recordingDate 记录日期
     * @param timePoint 记录时间
     * @return 查询记录结果
     */
    boolean deleteVitalSigns(@Param("patientId") Long patientId, @Param("encounterId") Long encounterId,
        @Param("recordingDate") Date recordingDate, @Param("timePoint") Date timePoint);
}
