public IList <PatientRequest> GetPengingQueue() { //TODO: add filters var patientQueries = _patientRequestsRepository.GetAll(x => x.Status == PatientRequestStatuses.AwaitingForDonor, q => q.Include(x => x.PatientInfo)); return(SortQueue(patientQueries)); }
public IList <PatientRequest> GetPatientRequests() { return(_patientRequestsRepository.GetAll( include: x => x.Include(p => p.RequestsRelation) .Include(p => p.OrganInfo) .Include(p => p.PatientInfo) .Include(p => p.RequestsRelation)) .OrderBy(p => p.OrganInfo.Name) .ThenByDescending(p => p.Priority) .ThenBy(p => p.Created) .ToList()); }