Пример #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);
        }
Пример #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());
        }
Пример #3
0
        //public int GetActiveCases()
        //{
        //    return coronaStatistics.ActiveCases();
        //}

        public void OnGet()
        {
            Patients     = patientData.GetPatients();
            Appointments = appointmentData.GetAppointments();
        }
Пример #4
0
 public void OnGet()
 {
     Patients = patientData.GetPatients(SearchName);
 }
Пример #5
0
        public List <Patient> GetPatients()
        {
            var allPatients = _patientData.GetPatients();

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

            return(Ok(data));
        }