diff --git a/IRaCIS.Core.Application/Service/Visit/HospitalGroupService.cs b/IRaCIS.Core.Application/Service/Visit/HospitalGroupService.cs index 4dda40933..efde8bd31 100644 --- a/IRaCIS.Core.Application/Service/Visit/HospitalGroupService.cs +++ b/IRaCIS.Core.Application/Service/Visit/HospitalGroupService.cs @@ -47,6 +47,7 @@ public class HospitalGroupService(IRepository _hospitalGroupRepos .WhereIf(!string.IsNullOrWhiteSpace(inQuery.Affiliation), t => t.Affiliation.Contains(inQuery.Affiliation)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.ContactPhone), t => t.ContactPhone.Contains(inQuery.ContactPhone)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.ContactName), t => t.ContactName.Contains(inQuery.ContactName)) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.GA, t => _userInfo.HospitalGroupIdList.Contains(t.Id)) .WhereIf(!inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable) .ProjectTo(_mapper.ConfigurationProvider);