public RedirectToRouteResult Create(LabRequestViewModel model) { if (TempData.ContainsKey("PatientName")) { model.Name = (HumanName)TempData["PatientName"]; } string sample = model.Sample; LabService lab = new LabService(); lab.SendLabRequest(model); return(RedirectToAction("List", "LabList")); }
// GET: LabRequest public ActionResult GenerateLabRequest(SearchPatientViewModel model) { LabRequestViewModel labRequest = new LabRequestViewModel(); if (TempData.ContainsKey("PatientDetails")) { model.patient = (Patient)TempData["PatientDetails"]; labRequest.Patient = model.patient; labRequest.Sample = "Blood"; } else { TempData["_Error"] = "Some Error Occurred"; return(RedirectToAction("Error", "Error")); } return(View(labRequest)); }