Esempio n. 1
0
        public ActionResult Appointments()
        {
            int                      patientId = _identityProvider.GetAuthenticatedUserId();
            Patient                  patient   = _patientRepository.GetPatient(patientId);
            List <Appointment>       appointmentsForPatient   = _schedulingService.ViewPatientSchedule(patientId);
            PatientScheduleViewModel patientScheduleViewModel = new PatientScheduleViewModel {
                Patient = patient, SingleAppointmentViewModels = new List <SingleAppointmentViewModel>()
            };

            foreach (Appointment appointment in appointmentsForPatient)
            {
                SingleAppointmentViewModel singleAppointment = new SingleAppointmentViewModel();
                singleAppointment.SDoctor      = _schedulingService.GetDoctorForAppointment(appointment.AppointmentId);
                singleAppointment.SAppointment = _appointmentRepository.GetAppointment(appointment.AppointmentId);
                patientScheduleViewModel.SingleAppointmentViewModels.Add(singleAppointment);
            }
            return(View(patientScheduleViewModel));
        }
Esempio n. 2
0
        public ActionResult Patients()
        {
            IEnumerable <Patient>      patients      = _patientManagementService.ViewPatientsForStaff(_identityProvider.GetAuthenticatedUserId());
            IEnumerable <Notification> notifications = _notificationManagementService.GetNotificationsForStaff(_identityProvider.GetAuthenticatedUserId());

            return(View(new StaffHomeViewModel {
                Patients = patients, Notifications = notifications
            }));
        }
Esempio n. 3
0
        public ActionResult Home()
        {
            IEnumerable <Notification> notifications =
                _notificationManagementService.GetNotificationsForDoctor(_identityProvider.GetAuthenticatedUserId());

            return(View(notifications));
        }