diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs index b541b8e8c..d21fd09e9 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs @@ -262,8 +262,10 @@ namespace IRaCIS.Core.Application.Service } } - var exists = await _doctorSummarizeRepository.AnyAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == null && - (x.IndicationEn == inDto.IndicationEn && x.Indication == inDto.Indication)); + var exists = await _doctorSummarizeRepository + .WhereIf(_userInfo.IsEn_Us, x=>x.IndicationEn == inDto.IndicationEn) + .WhereIf(!_userInfo.IsEn_Us, x=>x.Indication == inDto.Indication) + .AnyAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == null); if (exists) { throw new BusinessValidationFailedException(_localizer["DoctorSummarize_repeat"]);