public ActionResult Doctors(int hospitalId) { var model = new DoctorsViewModel { Hospital = _hospitalRepo.Get(hospitalId), Doctors = _doctorRepo.GetDoctors().Where(d => d.HospitalID == hospitalId).ToList() }; return(View(model)); }
public IEnumerable <PeriodPerformanceInfo> GetPeriodPerformanceReport() { var hospitals = _hospitalRepository.Get().ToArray(); var hospitalIds = hospitals.Select(hospital => hospital.Id); var allCompletedEvents = _completedEventRepository .Get(completedEvent => hospitalIds.Contains(completedEvent.Clinician.Hospital.Id) && completedEvent.Period.ShouldCountForBreaches, null, null, completedEvent => completedEvent.Period.CompletedEvents.Select(e => e.Name), completedEvent => completedEvent.Clinician.Hospital) .ToList(); return(from hospitalId in hospitalIds let completedEventsForHospital = allCompletedEvents .Where(completedEventForHospital => completedEventForHospital.Clinician.Hospital.Id == hospitalId) .ToList() let periodBreachesCounter = _periodBreachesCounterReportService .GetPeriodBreachesCounterInfo(completedEventsForHospital, hospitals.Single(hospital => hospital.Id == hospitalId).Name, hospitalId.ToString(CultureInfo.InvariantCulture)) where periodBreachesCounter != null select periodBreachesCounter); }
public virtual IEnumerable <HospitalInfo> GetHospitals() { return(_hospitalRepository.Get(hospital => true).Select(hospital => _hospitalToHospitalInfoMapper.Map(hospital))); }
public Hospital Get(int id) { return(_hospitalRepository.Get(id)); }
public async Task <IEnumerable <Hospital> > Get() => await _repository.Get();