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

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

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

            return(Ok(data));
        }