public ActionResult Update(String patient) { if (User.IsInRole("Patient")) { patient = User.Identity.Name; } MedicalRecord model = svc.getMedicalRecordsForPatient(patient); //Only the patient should be able to update their Previous Medical History /*if (!String.IsNullOrEmpty(Request.Form["previousMedicalHistory"])) * { * model.prevMedHistory.other = Request.Form["previousMedicalHistory"]; * }*/ if (!String.IsNullOrEmpty(Request.Form["currentMedicalHistory"])) { model.currentMedicalHistory = Request.Form["curentMedicalHistory"]; } /*if (!String.IsNullOrEmpty(Request.Form["prescriptions"])) * { * String[] separated = Request.Form["prescriptions"].Split(new string[] { "\n", "\r\n" }, StringSplitOptions.RemoveEmptyEntries); * model.prescriptions = new List<String>(separated); * }*/ svc.updateMedicalecordsForPatient(patient, model); return(RedirectToAction("Medical", "Records", new { patient = patient })); }