/// <summary> /// override /// sets focus /// </summary> /// <param name="lEditMode"></param> /// <param name="lStatusCode"></param> /// <param name="strStatusComment"></param> /// <returns></returns> public override CStatus LoadControl(k_EDIT_MODE lEditMode) { CStatus status = new CStatus(); CPatChecklistData dta = new CPatChecklistData(BaseMstr.BaseData); DataSet dsCL = null; dta.GetOutOfDatePatCLDS(PatientID, ChecklistID, out dsCL); gvOutOfDateCL.DataSource = dsCL.Tables[0]; gvOutOfDateCL.DataBind(); return(status); }
/// <summary> /// override /// sets focus /// </summary> /// <param name="lEditMode"></param> /// <param name="lStatusCode"></param> /// <param name="strStatusComment"></param> /// <returns></returns> public override CStatus LoadControl(k_EDIT_MODE lEditMode) { CStatus status = new CStatus(); //get all the patients for the mulitpatient string strCLIDs = String.Empty; string strPatIDs = String.Empty; CPatientData pat = new CPatientData(BaseMstr.BaseData); DataSet dsMultiPatientSearch = null; status = pat.GetMultiPatientSearchDS(EventStartDate, EventEndDate, ChecklistID, ChecklistStatusID, ChecklistServiceID, out dsMultiPatientSearch); //get patient ids CDataUtils.GetDSDelimitedData(dsMultiPatientSearch, "PATIENT_ID", ",", out strPatIDs); strPatIDs = "," + strPatIDs; //get pat cl ids CDataUtils.GetDSDelimitedData(dsMultiPatientSearch, "CHECKLIST_ID", ",", out strCLIDs); strCLIDs = "," + strCLIDs; CPatChecklistData dta = new CPatChecklistData(BaseMstr.BaseData); DataSet dsCL = null; status = dta.GetOutOfDatePatCLDS(EventStartDate, EventEndDate, ChecklistID, ChecklistStatusID, strPatIDs, strCLIDs, out dsCL); //if (!CDataUtils.IsEmpty(dsCL)) //{ gvOutOfDateCL.DataSource = dsCL.Tables[0]; gvOutOfDateCL.DataBind(); //} return(status); }
/// <summary> /// US:1880 method /// loads the selected checklist /// </summary> /// <returns></returns> protected CStatus LoadChecklist() { PatCLID = Convert.ToInt64(ddlPatChecklist.SelectedValue); if (PatCLID < 1) { return(new CStatus(false, k_STATUS_CODE.Failed, "TODO")); } CPatientChecklist pcl = new CPatientChecklist(); CStatus status = pcl.LoadPatientChecklists(BaseMstr, PatientID, ddlPatChecklist); if (!status.Status) { return(status); } ddlPatChecklist.SelectedValue = PatCLID.ToString(); CPatChecklistData pcld = new CPatChecklistData(BaseMstr.BaseData); CPatChecklistDataItem di = null; status = pcld.GetPatChecklistDI(PatCLID, out di); if (!status.Status) { return(status); } ddlChecklistState.SelectedValue = Convert.ToInt64(di.ChecklistStateID).ToString(); ChecklistID = di.ChecklistID; ChecklistStateID = di.ChecklistStateID; EnableBasedOnChecklistState(); //enable/disable the button based on the checklist selected CPatChecklistData dta = new CPatChecklistData(BaseMstr.BaseData); DataSet dsCL = null; dta.GetOutOfDatePatCLDS(PatientID, ChecklistID, out dsCL); if (!CDataUtils.IsEmpty(dsCL)) { btnUpdateCLVersion.Enabled = true; lblVersion.Text = "New Version Available!"; } else { btnUpdateCLVersion.Enabled = false; lblVersion.Text = "Version is Current."; } if (!CDataUtils.IsDateNull(di.ProcedureDate)) { tbProcedureDate.Text = CDataUtils.GetDateAsString(di.ProcedureDate); calProcedureDate.SelectedDate = di.ProcedureDate; ucProcedureTime.SetTime(di.ProcedureDate); } else { tbProcedureDate.Text = string.Empty; calProcedureDate.SelectedDate = null; ucProcedureTime.HH = 0; ucProcedureTime.MM = 0; ucProcedureTime.SS = 0; } //checklist data - check for notetitle and disable tiu if we dont have one CChecklistData clData = new CChecklistData(BaseMstr.BaseData); CChecklistDataItem diChecklist = null; status = clData.GetCheckListDI(di.ChecklistID, out diChecklist); if (!status.Status) { return(status); } btnTIU.Enabled = (diChecklist.NoteTitleTag != "-1") ? true: false; CPatientData p = new CPatientData(BaseMstr.BaseData); string strBlurb = string.Empty; status = p.GetPatientBlurb(PatientID, out strBlurb); if (!status.Status) { return(status); } sPatientBlurb.InnerText = strBlurb + " for " + diChecklist.ChecklistLabel; ucPatCLItems.PatientChecklistID = di.PatCLID; ucPatCLItems.PatientID = di.PatientID; ucPatCLItems.ChecklistID = di.ChecklistID; status = LoadPatientChecklistItems(); if (!status.Status) { return(status); } EnableTIU(); return(new CStatus()); }
/// <summary> /// loads the gridview after we are done updating the checklists /// </summary> protected CStatus LoadGridView() { //done processing the logic so now load the gridview //set the date from and date to DateTime dtFrom = CDataUtils.GetNullDate(); DateTime dtTo = CDataUtils.GetNullDate(); if (chkFilterByEvent.Checked) { dtFrom = CDataUtils.GetDate(txtFromDate.Text); dtTo = CDataUtils.GetDate(txtToDate.Text); } MPEventStartDate = dtFrom; MPEventEndDate = dtTo; //checklist id long lChecklistID = -1; if (chkChecklist.Checked) { lChecklistID = ChecklistID; } MPChecklistID = lChecklistID; //set the checklist Status long lChecklistStatusID = -1; if (chkChecklistStatus.Checked && ddlChecklistStatus.SelectedItem != null && ddlChecklistStatus.SelectedValue != "-1") { lChecklistStatusID = CDataUtils.ToLong(ddlChecklistStatus.SelectedValue); } MPChecklistStatusID = lChecklistStatusID; long lChecklistServiceID = -1; if (chkFilterByCLService.Checked && ddlFilterByService.SelectedItem != null && ddlFilterByService.SelectedValue != "-1") { lChecklistServiceID = CDataUtils.ToLong(ddlFilterByService.SelectedValue); } MPChecklistServiceID = lChecklistServiceID; CStatus status = GetPatients(dtFrom, dtTo, lChecklistID, lChecklistStatusID, lChecklistServiceID); if (!status.Status) { return(status); } AddColumns(); gvMultiPatientView.EmptyDataText = "No result(s) found."; gvMultiPatientView.DataSource = MultiPatients; gvMultiPatientView.DataBind(); //now that the grid is loaded check for new versions... //get all the patients for the mulitpatient string strCLIDs = string.Empty; string strPatIDs = string.Empty; CPatientData pat = new CPatientData(Master.BaseData); DataSet dsMultiPatientSearch = null; status = pat.GetMultiPatientSearchDS( MPEventStartDate, MPEventEndDate, MPChecklistID, MPChecklistStatusID, MPChecklistServiceID, out dsMultiPatientSearch); if (!status.Status) { return(status); } //patient ids CDataUtils.GetDSDelimitedData( dsMultiPatientSearch, "PATIENT_ID", ",", out strPatIDs); strPatIDs = "," + strPatIDs; //pat cl ids CDataUtils.GetDSDelimitedData( dsMultiPatientSearch, "CHECKLIST_ID", ",", out strCLIDs); strCLIDs = "," + strCLIDs; CPatChecklistData dta = new CPatChecklistData(Master.BaseData); DataSet dsCL = null; status = dta.GetOutOfDatePatCLDS( MPEventStartDate, MPEventEndDate, MPChecklistID, MPChecklistStatusID, strPatIDs, strCLIDs, out dsCL); if (!status.Status) { return(status); } btnUpdateCLVersion.Enabled = (!CDataUtils.IsEmpty(dsCL)) ? true : false; //EnableVersionUpdate = (!CDataUtils.IsEmpty(dsCL)) ? true : false; upLookup.Update(); return(new CStatus()); }