public ActionResult RequestAppointment(int patientId) { Patient patient = _patientManagementService.ViewPatient(patientId); ViewBag.ReturnUrl = Url.Action("RequestAppointment"); return(View(new AppointmentRequestViewModel { Patient = patient })); }
public ActionResult ReferPatient(int patientId) { int thisDocId = _identityProvider.GetAuthenticatedUserId(); Patient patient = _patientManagementService.ViewPatient(patientId); List <Doctor> allDoctors = _doctorRepository.GetDoctors(); List <Referral> referralsForDoctor = _referralRepository.GetReferralsForReferringDoctor(thisDocId).ToList(); var referredDoctors = new List <Doctor>(); foreach (Referral r in referralsForDoctor) { if (r.PatientId == patientId) { referredDoctors.Add(_doctorRepository.GetDoctor(r.ReferredDoctorId)); } } return(View(new ReferPatientViewModel { Patient = patient, Doctors = allDoctors, ReferredDoctors = referredDoctors })); }
public ActionResult PatientProfile(int patientId) { Patient patient = _patientManagementService.ViewPatient(patientId); return(View(patient)); }