Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
        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());
        }
Exemplo n.º 3
0
        //public int GetActiveCases()
        //{
        //    return coronaStatistics.ActiveCases();
        //}

        public void OnGet()
        {
            Patients     = patientData.GetPatients();
            Appointments = appointmentData.GetAppointments();
        }
Exemplo n.º 4
0
 public void OnGet()
 {
     Patients = patientData.GetPatients(SearchName);
 }
Exemplo n.º 5
0
        public List <Patient> GetPatients()
        {
            var allPatients = _patientData.GetPatients();

            return(allPatients);
        }
        public IActionResult GetPatients()
        {
            var data = patientData.GetPatients();

            return(Ok(data));
        }