Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (await Context.Procedures
- .Where(p => p.SessionId == null)
- .Where(p => p.WaitingList != null)
- .Where(p => specialityIds.All(id => id == 0) || specialityIds.Contains(p.Speciality.Id))
- .Where(p => specialityAccess || p.Speciality.Id == userSpecialityId)
- .Where(p => p.WaitingList.Consultant == null || p.WaitingList.Consultant.UserId.HasValue)
- .Where(p => consultantIds.All(id => id == 0) ||
- consultantIds.Contains(p.WaitingList.Consultant.UserId.Value))
- .Where(p => siteIds.All(id => id == 0) || siteIds.Contains(p.WaitingList.Site.Id))
- .Include(p => p.WaitingList.Site)
- .Include(p => p.WaitingList.Consultant.User)
- .Include(p => p.WaitingList.IntendedProcedureCode)
- .Include(p => p.WaitingList.Pathway.PathwayThresholds)
- .Include(p => p.WaitingList.Patient.Allergies).ThenInclude(p => p.Allergy)
- .AsNoTracking()
- .ToListAsync())
- .Select(p => p.WaitingList);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement