public ActionResult Create(PatientLogCreateViewModel viewM) { if (ModelState.IsValid) { viewM.Patient.Physician = HubSecurity.getLoggedInUserID(); DataSubmissions.CreatePatient(db, viewM.Patient); return(RedirectToAction("Index")); } return(View(viewM.Patient)); }
// GET: PatientLog/Create public ActionResult Create() { PatientLogCreateViewModel viewM = new PatientLogCreateViewModel(); viewM.GenderList = DataCollections.getGender(db); viewM.ServiceTypeList = DataCollections.getServiceType(db); viewM.HospitalList = DataCollections.getHospital(db); viewM.PatientClassList = DataCollections.getPatientClass(db); viewM.PCPList = DataCollections.getPCP(db, "BRO"); return(View(viewM)); }