示例#1
0
        public IActionResult Records(int id)
        {
            var patient = PatientsDAO.GetById(id);

            if (patient == null)
            {
                return(RedirectToAction("Index", "Dashboard"));
            }

            var patientRecord = PatientRecordDAO.GetById(id);

            if (patientRecord != null)
            {
                patientRecord.Diseases   = PatientRecordDAO.GetDiseases(id);
                patientRecord.Procedures = PatientRecordDAO.GetProcedures(id);
                patient.Record           = patientRecord;
            }

            ViewData["Section"] = "Pacientes";
            ViewData["Action"]  = "Prontuário Odontológico";
            ViewBag.CanRender   = AccessControl.CanRender(new string[] { "ADMIN", "DENTIST" }, HttpContext);
            return(View(patient));
        }