public ActionResult Index() { var vm = new DoctorDashboardViewModel { AcceptedPatients = _patientProfileService.All().Count(), Prescription = _prescriptionService.All().Count() }; return(View(vm)); }
public ActionResult Invoice(int prescribtionId) { var prescribtion = _prescriptionService.All().Include(x => x.Patient).SingleOrDefault(x => x.Id == prescribtionId); if (prescribtion != null) { prescribtion.MedicalTests = _testService.All().Where(x => x.PrescriptionId == prescribtion.Id).ToList(); prescribtion.Medicines = _medicineForPrescriptionService.All().Where(x => x.PrescriptionId == prescribtion.Id).ToList(); } var invoice = new InvoiceViewModel { Prescribtion = prescribtion, Doctor = _doctorProfileService.All().FirstOrDefault() }; return(View(invoice)); }