Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. (await Context.Procedures
  2. .Where(p => p.SessionId == null)
  3. .Where(p => p.WaitingList != null)
  4. .Where(p => specialityIds.All(id => id == 0) || specialityIds.Contains(p.Speciality.Id))
  5. .Where(p => specialityAccess || p.Speciality.Id == userSpecialityId)
  6. .Where(p => p.WaitingList.Consultant == null || p.WaitingList.Consultant.UserId.HasValue)
  7. .Where(p => consultantIds.All(id => id == 0) ||
  8. consultantIds.Contains(p.WaitingList.Consultant.UserId.Value))
  9. .Where(p => siteIds.All(id => id == 0) || siteIds.Contains(p.WaitingList.Site.Id))
  10. .Include(p => p.WaitingList.Site)
  11. .Include(p => p.WaitingList.Consultant.User)
  12. .Include(p => p.WaitingList.IntendedProcedureCode)
  13. .Include(p => p.WaitingList.Pathway.PathwayThresholds)
  14. .Include(p => p.WaitingList.Patient.Allergies).ThenInclude(p => p.Allergy)
  15. .AsNoTracking()
  16. .ToListAsync())
  17. .Select(p => p.WaitingList);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement