diff --git a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs index a2850c379..867638b3a 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs @@ -169,6 +169,16 @@ namespace IRaCIS.Application.Contracts public class ReviewerConfirmationQueryDTO : PageInput { public Guid TrialId { get; set; } = Guid.Empty; + + public DateTime? OptStartTime{ get; set; } + + public DateTime? OptEndTime { get; set; } + + public string? Code { get; set; } + + public int? OptUserType { get; set; } + + public string? OptUserName { get; set; } } public class SelectionReviewerDTO : DoctorDTO diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs index c64db3edf..002dbf7e9 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs @@ -244,7 +244,12 @@ namespace IRaCIS.Core.Application.Service var doctorQuery = _enrollRepository.Where(x => x.TrialId == inQuery.TrialId && x.EnrollStatus >= EnrollStatus.InviteIntoGroup) - .ProjectTo(_mapper.ConfigurationProvider); + .ProjectTo(_mapper.ConfigurationProvider) + .WhereIf(inQuery.OptStartTime != null, x => x.OptTime >= inQuery.OptStartTime) + .WhereIf(inQuery.OptEndTime != null, x => x.OptTime <= inQuery.OptEndTime) + .WhereIf(inQuery.Code.IsNotNullOrEmpty(), x => x.Code.Contains(inQuery.Code)) + .WhereIf(inQuery.OptUserType!=null, x => x.OptUserType==inQuery.OptUserType) + .WhereIf(inQuery.OptUserName.IsNotNullOrEmpty(), x => x.OptUserName.Contains(inQuery.OptUserName)); var doctorPageList = await doctorQuery.ToPagedListAsync(inQuery);