package cn.hnthyy.thmz.mapper.his.mz;

import cn.hnthyy.thmz.entity.his.mz.CovidPojo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface CovidPojoMapper {
    /**
     * 根据病人身份证号码查询最近三天的流行性病调查
     * @param idcard
     * @return
     */
    @Select(" select  top 1 * from  t_covid19_assessment where (idcard=#{idcard} or  patient_id =#{patientId})and date>=DateAdd(Day,-3,GETDATE()) order by date desc  ")
    CovidPojo selectLastCovidPojoByIdcard(@Param("idcard") String idcard,@Param("patientId") String patientId);
}
