예제 #1
0
        public ActionResult Index()
        {
            var vm = new DoctorDashboardViewModel
            {
                AcceptedPatients = _patientProfileService.All().Count(),
                Prescription     = _prescriptionService.All().Count()
            };

            return(View(vm));
        }
예제 #2
0
        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));
        }