diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs index 75f2862b4..76384ac9b 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs @@ -261,8 +261,8 @@ namespace IRaCIS.Core.Application.Service inDto.IndicationEn = "Default"; } var exists = await _doctorSummarizeRepository - .WhereIf(_userInfo.IsEn_Us, x => x.IndicationEn == inDto.IndicationEn) - .WhereIf(!_userInfo.IsEn_Us, x => x.Indication == inDto.Indication) + .Where( x => x.IndicationEn == inDto.IndicationEn|| x.Indication == inDto.Indication) + .AnyAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == null&&x.Id!=inDto.Id); if (exists) {