public ActionResult CreateAdverseEvent(int patientId) { IClinicalStudyDesign studyDesign = clinicalStudyDesignFactory.Create(); Visit aeVisit = studyDesign.AddAdverseEventVisit(patientId); clinicalStudyDesignFactory.Release(studyDesign); if (aeVisit == null) { return(null); } return(Content(aeVisit.Caption)); }
public ActionResult EditPatient([ModelBinder(typeof(DevExpressEditorsBinder))] PatientViewModel model) { Patient patient = patientRepository.GetByKey(model.Id); if (patient == null) { IClinicalStudyDesign studyDesign = clinicalStudyDesignFactory.Create(); patient = studyDesign.CreatePatientForDoctor(User.Identity.Name); clinicalStudyDesignFactory.Release(studyDesign); } patient.IsActive = model.IsActive; patient.IsEnrolled = model.IsEnrolled; patient.EnrollDate = model.EnrollDate; patient.PatientInitials = model.PatientInitials; patient.RandomisationNumber = model.RandomisationNumber; patient.RandomisationDate = model.RandomisationDate; patient.IsCompleted = true; patientRepository.Edit(patient); patientRepository.Save(); return(RedirectToAction("ShowPatient", new { patientNumber = patient.PatientNumber, DXScript = Request["DXScript"] })); }