/// <summary> /// Gets the collection of PatientInfos existing in the database. /// </summary> /// <returns> The collection of PatientView objects.</returns> public IEnumerable <PatientView> GetPatients() { IEnumerable <PatientInfo> patients = _data.GetPatients().Where(p => p.IsDeleted != true); List <PatientView> result = _mapper.Map <IEnumerable <PatientInfo>, IEnumerable <PatientView> >(patients).ToList(); result.Sort(); return(result); }
public IActionResult OnGet(int?id) { if (id.HasValue) { Appointment = appointmentData.GetAppointmentById(id.Value); if (Appointment == null) { return(RedirectToPage("./NotFound")); } } else { Appointment = new Core.Appointment(); } var patients = patientData.GetPatients().ToList().Select(p => new { Id = p.Id, Display = $"{p.FirstName} {p.LastName}" }); Patients = new SelectList(patients, "Id", "Display"); Symptom = htmlHelper.GetEnumSelectList <Symptom>(); return(Page()); }
//public int GetActiveCases() //{ // return coronaStatistics.ActiveCases(); //} public void OnGet() { Patients = patientData.GetPatients(); Appointments = appointmentData.GetAppointments(); }
public void OnGet() { Patients = patientData.GetPatients(SearchName); }
public List <Patient> GetPatients() { var allPatients = _patientData.GetPatients(); return(allPatients); }
public IActionResult GetPatients() { var data = patientData.GetPatients(); return(Ok(data)); }