public static ViewNotesModel GetVisitDetails(int iVisitID) { string sql = @"select ID as VisitID, VisitDate, Problem_ID as ProblemID from dbo.Patient_Visits WHERE ID=" + iVisitID + ";"; ViewNotesModel rec = SqlDataAccessProd.LoadRecord(sql); return(rec); }
public static ViewNotesModel LoadRecord(string sql) { using (IDbConnection cnn = new SqlConnection(GetConnectionString())) { ViewNotesModel record = cnn.QuerySingle <ViewNotesModel>(sql); return(record); } }
public ActionResult GetNotesPartialView(int?visitId = 0) { int visitID = (int)visitId; List <SelectListItem> resources = GetSelectList("Resources"); ViewNotesModel model = new ViewNotesModel(); model = GetVisitNotes(visitID); model.ResourceList = resources; return(PartialView("GetNotesPartialView", model)); }
public JsonResult AjaxMethod(int ID, string name) { ViewNotesModel person = new ViewNotesModel { Name = name, PatientID = ID //DateTime = DateTime.Now.ToString() }; return(Json(person)); }
public void GetVisitDetails(int visitID, ViewNotesModel model) { //ViewNotesModel model = new ViewNotesModel(); if (visitID > 0) { var row = DataLibrary.BusinessLogic.ViewNotesProcessor.GetVisitDetails(visitID); if (row != null) { model.VisitDate = row.visitDate; model.ProblemID = row.ProblemID; model.VisitID = row.VisitID; } } else { RedirectToAction("Index", "ViewNotes"); } }
public ActionResult SelectedPatient(int?id, string name) { int patientID = 0; ViewBag.patientName = name; var model = new ViewNotesModel(); if (id != null) { patientID = (int)id; Session["patientID"] = patientID; Session["patientName"] = name; model.PatientWasSelected = true; model.VisitWasSelected = false; model.Name = name; } ViewData["currentFilter"] = ""; //reset search filter return(RedirectToAction("Index", "ViewNotes", new { patientId = patientID, searchingFor = "" })); }
public ViewNotesModel GetVisitNotes(int visitID) { ViewNotesModel visitNotes = new ViewNotesModel(); var data = DataLibrary.BusinessLogic.ViewNotesProcessor.spGetPatientVisit70(visitID); foreach (var row in data) { visitNotes.SubjectiveText = row.SubjectiveText; visitNotes.ObjectiveText = row.ObjectiveText; visitNotes.AssessmentText = row.AssessmentText; visitNotes.PlanText = row.PlanText; visitNotes.Duration = row.Duration; visitNotes.Resource_ID = row.Resource_ID; visitNotes.Cancellation = row.Cancellation; visitNotes.NoShow = row.NoShow; } // Now add the other details GetVisitDetails(visitID, visitNotes); return(visitNotes); }
public ActionResult SelectedVisit(int?visit_id, string visitdate) { int visitID = 0; int patientID = 0; patientID = (int)Session["patientID"]; ViewBag.visitDate = visitdate; var model = new ViewNotesModel(); model.ControllerInvoking = "ViewNotes"; // for partial view if (visit_id != null) { visitID = (int)visit_id; GetVisitDetails(visitID, model); Session["visitID"] = model.VisitID; Session["visitDate"] = model.VisitDate; Session["problemID"] = model.ProblemID; model.PatientWasSelected = true; model.VisitWasSelected = true; } return(RedirectToAction("Index", "ViewNotes", new { patientId = patientID, visitId = visitID, searchingFor = "" })); }
public ActionResult Index(int?patientId, int?visitId, int?page, int?iTabOption = 1, string LeaveModalOpen = "false", string searchString = "") { ViewBag.TabOption = (int)iTabOption; ViewBag.LeaveModalOpen = false; if (LeaveModalOpen == "true") { ViewBag.LeaveModalOpen = true; } var model = new ViewNotesModel(); model.ControllerInvoking = "ViewNotes"; // for partial view int patientID = 0; int visitID = 0; if (patientId != null) { patientID = (int)patientId; ViewBag.patientID = patientID; //ViewBag.patientName = patientName; model.PatientWasSelected = true; if (visitId != null) { visitID = (int)visitId; ViewBag.visitID = visitID; model.VisitWasSelected = true; } else { model.VisitsSelectList = GetVisitsList(patientID); } } return(View(model)); }