/// <summary> /// US:864 US:876 loads closeable properties from the dataset /// </summary> /// <param name="dsViewable"></param> protected CStatus LoadCloseableRoles(DataSet dsCloseable) { CStatus status = new CStatus(); if (CDataUtils.IsEmpty(dsCloseable)) { return(status); } foreach (DataTable table in dsCloseable.Tables) { foreach (DataRow dr in table.Rows) { long lRoleID = CDataUtils.GetDSLongValue(dr, "USER_ROLE_ID"); if (lRoleID == (long)k_USER_ROLE_ID.Administrator) { CloseableAdministrator = true; } else if (lRoleID == (long)k_USER_ROLE_ID.Doctor) { CloseableDoctor = true; } else if (lRoleID == (long)k_USER_ROLE_ID.Nurse) { CloseableNurse = true; } } } return(status); }
public CStateDataItem(DataSet ds) { if (!CDataUtils.IsEmpty(ds)) { StateID = CDataUtils.GetDSLongValue(ds, "STATE_ID"); StateLabel = CDataUtils.GetDSStringValue(ds, "STATE_LABEL"); } }
public CServiceDataItem(DataSet ds) { if (!CDataUtils.IsEmpty(ds)) { ServiceID = CDataUtils.GetDSLongValue(ds, "SERVICE_ID"); ServiceLabel = CDataUtils.GetDSStringValue(ds, "SERVICE_LABEL"); IsActive = (CDataUtils.GetDSLongValue(ds, "IS_ACTIVE") == (long)k_TRUE_FALSE_ID.True) ? true : false; } }
public CItemGroupDataItem(DataSet ds) { if (!CDataUtils.IsEmpty(ds)) { ItemGroupLabel = CDataUtils.GetDSStringValue(ds, "ITEM_GROUP_LABEL"); ItemGroupID = CDataUtils.GetDSLongValue(ds, "ITEM_GROUP_ID"); IsActive = (CDataUtils.GetDSLongValue(ds, "IS_ACTIVE") == (long)k_TRUE_FALSE_ID.True) ? true : false; } }
public CICStateDataItem(DataSet ds) { if (!CDataUtils.IsEmpty(ds)) { ItemID = CDataUtils.GetDSLongValue(ds, "ITEM_ID"); ItemComponentID = CDataUtils.GetDSLongValue(ds, "ITEM_COMPONENT_ID"); ICStateID = CDataUtils.GetDSLongValue(ds, "IC_STATE_ID"); StateID = CDataUtils.GetDSLongValue(ds, "STATE_ID"); } }
public CDecisionStateDataItem(DataSet ds) { if (!CDataUtils.IsEmpty(ds)) { DSLabel = CDataUtils.GetDSStringValue(ds, "DS_LABEL"); DSDefinitionID = CDataUtils.GetDSLongValue(ds, "DS_DEFINITION_ID"); DSID = CDataUtils.GetDSLongValue(ds, "DS_ID"); IsActive = (CDataUtils.GetDSLongValue(ds, "IS_ACTIVE") == (long)k_TRUE_FALSE_ID.True) ? true : false; IsDefault = (CDataUtils.GetDSLongValue(ds, "IS_DEFAULT") == (long)k_TRUE_FALSE_ID.True) ? true : false; } }
public CItemComponentDataItem(DataSet ds) { if (!CDataUtils.IsEmpty(ds)) { ItemID = CDataUtils.GetDSLongValue(ds, "ITEM_ID"); ItemComponentID = CDataUtils.GetDSLongValue(ds, "ITEM_COMPONENT_ID"); ItemComponentLabel = CDataUtils.GetDSStringValue(ds, "ITEM_COMPONENT_LABEL"); SortOrder = CDataUtils.GetDSLongValue(ds, "SORT_ORDER"); ActiveID = (k_ACTIVE_ID)CDataUtils.GetDSLongValue(ds, "ACTIVE_ID"); } }
public CPlaceHolderDataItem(DataSet ds) { if (!CDataUtils.IsEmpty(ds)) { PlaceHolderID = CDataUtils.GetDSLongValue(ds, "PLACE_HOLDER_ID"); PlaceHolderLabel = CDataUtils.GetDSStringValue(ds, "PLACE_HOLDER_LABEL"); PlaceHolderSyntax = CDataUtils.GetDSStringValue(ds, "PLACE_HOLDER_SYNTAX"); PHParentID = CDataUtils.GetDSLongValue(ds, "PH_PARENT_ID"); IsGroup = (CDataUtils.GetDSLongValue(ds, "IS_GROUP") == (long)k_TRUE_FALSE_ID.True) ? true : false; } }
public CPatientItemComponentDataItem(DataSet ds) { if (!CDataUtils.IsEmpty(ds)) { PatientID = CDataUtils.GetDSStringValue(ds, "PATIENT_ID"); EntryDate = CDataUtils.GetDSDateTimeValue(ds, "ENTRY_DATE"); ItemID = CDataUtils.GetDSLongValue(ds, "ITEM_ID"); PatItemID = CDataUtils.GetDSLongValue(ds, "PAT_ITEM_ID"); SourceTypeID = CDataUtils.GetDSLongValue(ds, "SOURCE_TYPE_ID"); ComponentValue = CDataUtils.GetDSStringValue(ds, "COMPONENT_VALUE"); ComponentID = CDataUtils.GetDSLongValue(ds, "ITEM_COMPONENT_ID"); } }
/// <summary> /// US:1951 US:1945 loads data item from data set /// </summary> /// <param name="ds"></param> public CChecklistDataItem(DataSet ds) { if (!CDataUtils.IsEmpty(ds)) { ChecklistID = CDataUtils.GetDSLongValue(ds, "CHECKLIST_ID"); ChecklistLabel = CDataUtils.GetDSStringValue(ds, "CHECKLIST_LABEL"); ServiceID = CDataUtils.GetDSLongValue(ds, "SERVICE_ID"); ChecklistDescription = CDataUtils.GetDSStringValue(ds, "CHECKLIST_DESCRIPTION"); NoteTitleTag = CDataUtils.GetDSStringValue(ds, "NOTE_TITLE_TAG"); NoteTitleClinicID = CDataUtils.GetDSLongValue(ds, "NOTE_TITLE_CLINIC_ID"); ActiveID = (k_ACTIVE_ID)CDataUtils.GetDSLongValue(ds, "ACTIVE_ID"); } }
public CChecklistItemDataItem(DataSet ds) { if (!CDataUtils.IsEmpty(ds)) { ChecklistID = CDataUtils.GetDSLongValue(ds, "CHECKLIST_ID"); ItemID = CDataUtils.GetDSLongValue(ds, "ITEM_ID"); CLITSTimePeriod = CDataUtils.GetDSLongValue(ds, "CLI_TS_TIME_PERIOD"); TimeUnitID = (k_TIME_UNIT_ID)CDataUtils.GetDSLongValue(ds, "TIME_UNIT_ID"); SortOrder = CDataUtils.GetDSLongValue(ds, "SORT_ORDER"); ActiveID = (k_ACTIVE_ID)CDataUtils.GetDSLongValue(ds, "ACTIVE_ID"); Logic = CDataUtils.GetDSStringValue(ds, "LOGIC");; } }
public CPatChecklistDataItem(DataSet ds) { if (!CDataUtils.IsEmpty(ds)) { PatientID = CDataUtils.GetDSStringValue(ds, "PATIENT_ID"); ChecklistID = CDataUtils.GetDSLongValue(ds, "CHECKLIST_ID"); AssignmentDate = CDataUtils.GetDSDateTimeValue(ds, "ASSIGNMENT_DATE"); ProcedureDate = CDataUtils.GetDSDateTimeValue(ds, "PROCEDURE_DATE"); StateID = (k_STATE_ID)CDataUtils.GetDSLongValue(ds, "STATE_ID"); ChecklistStateID = (k_CHECKLIST_STATE_ID)CDataUtils.GetDSLongValue(ds, "CHECKLIST_STATE_ID"); PatCLID = CDataUtils.GetDSLongValue(ds, "PAT_CL_ID"); } }
public CItemDataItem(DataSet ds) { if (!CDataUtils.IsEmpty(ds)) { ItemID = CDataUtils.GetDSLongValue(ds, "ITEM_ID"); ItemTypeID = CDataUtils.GetDSLongValue(ds, "ITEM_TYPE_ID"); ItemGroupID = CDataUtils.GetDSLongValue(ds, "ITEM_GROUP_ID"); ItemLabel = CDataUtils.GetDSStringValue(ds, "ITEM_LABEL"); ItemDescription = CDataUtils.GetDSStringValue(ds, "ITEM_DESCRIPTION"); LookbackTime = CDataUtils.GetDSLongValue(ds, "LOOKBACK_TIME"); ActiveID = (k_ACTIVE_ID)CDataUtils.GetDSLongValue(ds, "ACTIVE_ID"); MapID = CDataUtils.GetDSStringValue(ds, "MAP_ID"); } }
public CTrueFalseDataItem(DataSet ds) { if (!CDataUtils.IsEmpty(ds)) { TrueFalseID = CDataUtils.GetDSLongValue(ds, "TRUE_FALSE_ID"); TrueLabel = CDataUtils.GetDSStringValue(ds, "TRUE_LABEL"); ActiveLabel = CDataUtils.GetDSStringValue(ds, "ACTIVE_LABEL"); DefaultLabel = CDataUtils.GetDSStringValue(ds, "DEFAULT_LABEL"); YesLabel = CDataUtils.GetDSStringValue(ds, "YES_LABEL"); EnableLabel = CDataUtils.GetDSStringValue(ds, "ENABLE_LABEL"); OverrideLabel = CDataUtils.GetDSStringValue(ds, "OVERRIDE_LABEL"); SelectedLabel = CDataUtils.GetDSStringValue(ds, "SELECTED_LABEL"); } }
public CPatientItemDataItem(DataSet ds) { if (!CDataUtils.IsEmpty(ds)) { PatientID = CDataUtils.GetDSStringValue(ds, "PATIENT_ID"); EntryDate = CDataUtils.GetDSDateTimeValue(ds, "ENTRY_DATE"); ItemDescription = CDataUtils.GetDSStringValue(ds, "ITEM_DESCRIPTION"); ItemGroupID = CDataUtils.GetDSLongValue(ds, "ITEM_GROUP_ID"); ItemID = CDataUtils.GetDSLongValue(ds, "ITEM_ID"); ItemLabel = CDataUtils.GetDSStringValue(ds, "ITEM_LABEL"); ItemTypeID = CDataUtils.GetDSLongValue(ds, "ITEM_TYPE_ID"); LookbackTime = CDataUtils.GetDSLongValue(ds, "LOOKBACK_TIME"); PatItemID = CDataUtils.GetDSLongValue(ds, "PAT_ITEM_ID"); SourceTypeID = CDataUtils.GetDSLongValue(ds, "SOURCE_TYPE_ID"); } }
public CICRangeDataItem(DataSet ds) { if (!CDataUtils.IsEmpty(ds)) { ItemID = CDataUtils.GetDSLongValue(ds, "ITEM_ID"); ItemComponentID = CDataUtils.GetDSLongValue(ds, "ITEM_COMPONENT_ID"); ICRangeID = CDataUtils.GetDSLongValue(ds, "IC_RANGE_ID"); Units = CDataUtils.GetDSStringValue(ds, "UNITS"); LegalMin = CDataUtils.GetDSDoubleValue(ds, "LEGAL_MIN"); CriticalLow = CDataUtils.GetDSDoubleValue(ds, "CRITICAL_LOW"); Low = CDataUtils.GetDSDoubleValue(ds, "LOW"); High = CDataUtils.GetDSDoubleValue(ds, "HIGH"); CriticalHigh = CDataUtils.GetDSDoubleValue(ds, "CRITICAL_HIGH"); LegalMax = CDataUtils.GetDSDoubleValue(ds, "LEGAL_MAX"); } }
public CPatientDataItem(DataSet ds) { if (!CDataUtils.IsEmpty(ds)) { PatientID = CDataUtils.GetDSStringValue(ds, "PATIENT_ID"); FirstName = CDataUtils.GetDSStringValue(ds, "FIRST_NAME"); MI = CDataUtils.GetDSStringValue(ds, "MIDDLE_INITIAL"); LastName = CDataUtils.GetDSStringValue(ds, "LAST_NAME"); SSN = CDataUtils.GetDSStringValue(ds, "SSN"); DOB = CDataUtils.GetDSDateTimeValue(ds, "DATE_OF_BIRTH"); Sex = (k_SEX)CDataUtils.GetDSLongValue(ds, "SEX_ID"); SexLabel = CDataUtils.GetDSStringValue(ds, "SEX_LABEL"); SexAbbreviation = CDataUtils.GetDSStringValue(ds, "SEX_ABBREVIATION"); SSNLast4 = CDataUtils.GetDSStringValue(ds, "SSN_LAST_4"); Age = CDataUtils.GetDSLongValue(ds, "PATIENT_AGE"); } }
public CPatChecklistItemDataItem(DataSet ds) { if (!CDataUtils.IsEmpty(ds)) { PatCLID = CDataUtils.GetDSLongValue(ds, "PAT_CL_ID"); PatientID = CDataUtils.GetDSStringValue(ds, "PATIENT_ID"); ChecklistID = CDataUtils.GetDSLongValue(ds, "CHECKLIST_ID"); ItemID = CDataUtils.GetDSLongValue(ds, "ITEM_ID"); TSID = CDataUtils.GetDSLongValue(ds, "TS_ID"); TSStateID = CDataUtils.GetDSLongValue(ds, "TS_STATE_ID"); OSID = CDataUtils.GetDSLongValue(ds, "OS_ID"); OSStateID = CDataUtils.GetDSLongValue(ds, "OS_STATE_ID"); DSID = CDataUtils.GetDSLongValue(ds, "DS_ID"); DSStateID = CDataUtils.GetDSLongValue(ds, "DS_STATE_ID"); IsOverridden = (k_TRUE_FALSE_ID)CDataUtils.GetDSLongValue(ds, "IS_OVERRIDDEN"); IsEnabled = (k_TRUE_FALSE_ID)CDataUtils.GetDSLongValue(ds, "IS_ENABLED"); OverrideDate = CDataUtils.GetDSDateTimeValue(ds, "OVERRIDE_DATE"); } }
/// <summary> /// looks up a user by user id /// </summary> /// <param name="lUserID"></param> /// <param name="ds"></param> /// <returns></returns> public CStatus GetUserDS(long lUserID, out DataSet ds) { //initialize parameters ds = null; //create a status object and check for valid dbconnection CStatus status = DBConnValid(); if (!status.Status) { return(status); } //load standard paramaters CParameterList pList = new CParameterList(SessionID, ClientIP, UserID); //load additional paramaters pList.AddInputParameter("pi_nLookupUserID", lUserID); //get the dataset CDataSet cds = new CDataSet(); status = cds.GetOracleDataSet(DBConn, "PCK_USR.GetUserRS", pList, out ds); if (status.Status) { if (CDataUtils.IsEmpty(ds)) { status.Status = false; status.StatusCode = k_STATUS_CODE.Failed; status.StatusComment = "Could not retrieve user information!"; } } return(status); }
/// <summary> /// US:1880 US:885 gets the note title ien (tag) for the note title passed in /// </summary> /// <param name="strNoteTitle"></param> /// <param name="lNoteTitleIEN"></param> /// <returns></returns> public CStatus GetNoteTitleIEN(string strNoteTitle, out long lNoteTitleIEN) { lNoteTitleIEN = 0; CStatus status = new CStatus(); //make sure we have a valid note title if (String.IsNullOrEmpty(strNoteTitle)) { //todo error? return(status); } DataSet dsNoteTitles = null; GetNoteTitleDS(out dsNoteTitles); //loop and find the title and return the ien if (!CDataUtils.IsEmpty(dsNoteTitles)) { foreach (DataTable table in dsNoteTitles.Tables) { foreach (DataRow dr in table.Rows) { string strTitle = Convert.ToString(dr["note_title_label"]); if (strTitle.ToLower().Trim() == strNoteTitle.ToLower().Trim()) { lNoteTitleIEN = CDataUtils.ToLong(Convert.ToString(dr["note_title_tag"])); break; } } } } return(status); }
/// <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()); }
/// <summary> /// Generates the TIU text for a patient checklist /// </summary> /// <param name="strPatientID"></param> /// <param name="lPatCLID"></param> /// <param name="strText"></param> /// <returns></returns> public CStatus GetTIUText(string strPatientID, long lPatCLID, out string strNoteTitleTag, out string strText) { strText = string.Empty; strNoteTitleTag = string.Empty; CStatus status = new CStatus(); //patient data - get the di just in case we need more than the blurb CPatientDataItem diPat = new CPatientDataItem(); CPatientData patData = new CPatientData(this); status = patData.GetPatientDI(strPatientID, out diPat); //get the patient blurb string strBlurb = String.Empty; patData.GetPatientBlurb(strPatientID, out strBlurb); //build the TIU note text... //legend strText += "Definitions:\r\n"; //ts strText += CDataUtils.DelimitString("TS = The temporal state of an attribute defines whether the patient has had the test or event within a given time period", "\r\n", 80); strText += "\r\n"; //os strText += CDataUtils.DelimitString("OS = The outcome state of an attribute defines the resultant state of an attribute (e.g. normal, abnormal, problem/decision required)", "\r\n", 80); strText += "\r\n"; //ds strText += CDataUtils.DelimitString("DS = The decision state of an attribute defines a rule-based state of an attribute (e.g. Go, No-Go)", "\r\n", 80); strText += "\r\n"; strText += "\r\n"; DateTime dtNoteDate = DateTime.Now; string strNoteDate = CDataUtils.GetDateTimeAsString(dtNoteDate); strText += "Date: " + strNoteDate; strText += "\r\n\r\n"; //--demographics strText += CDataUtils.DelimitString(strBlurb, "\r\n", 80); strText += "\r\n"; //patient checklist data CPatChecklistDataItem diPatChecklist = new CPatChecklistDataItem(); status = GetPatChecklistDI(lPatCLID, out diPatChecklist); //checklist data CChecklistDataItem diChecklist = new CChecklistDataItem(); CChecklistData clData = new CChecklistData(this); status = clData.GetCheckListDI(diPatChecklist.ChecklistID, out diChecklist); //get the note title tag for the checklist, this is used to //write the correct note to MDWS strNoteTitleTag = diChecklist.NoteTitleTag; //--Checklist Name strText += "Checklist: "; strText += CDataUtils.DelimitString(diChecklist.ChecklistLabel, "\r\n", 80); strText += "\r\n"; //--Procedure Date strText += "Procedure Date: "; if (!CDataUtils.IsDateNull(diPatChecklist.ProcedureDate)) { strText += CDataUtils.GetDateAsString(diPatChecklist.ProcedureDate); } else { strText += "None"; } strText += "\r\n\r\n"; //patient checklist items and overall state long lColTSStateID = 0; long lColOSStateID = 0; long lColDSStateID = 0; long lSummaryStateID = 0; DataSet dsItems = null; CPatChecklistItemData diCLI = new CPatChecklistItemData(this); status = diCLI.GetPatCLItemsByPatCLIDDS(lPatCLID, out lColTSStateID, out lColOSStateID, out lColDSStateID, out lSummaryStateID, out dsItems); //--overall Checklist state string strOverallState = "Unknown"; switch (lSummaryStateID) { case (long)k_STATE_ID.Bad: strOverallState = "Bad"; break; case (long)k_STATE_ID.Good: strOverallState = "Good"; break; } strText += "Overall Checklist State: "; strText += strOverallState; strText += "\r\n\r\n"; strText += "Checklist Items:"; strText += "\r\n\r\n"; //loop over checklist items foreach (DataTable table in dsItems.Tables) { foreach (DataRow dr in table.Rows) { CPatChecklistItemDataItem itm = new CPatChecklistItemDataItem(dr); if (itm != null) { //get the data for the item CItemDataItem idi = new CItemDataItem(); CItemData itmData = new CItemData(this); itmData.GetItemDI(itm.ItemID, out idi); strText += CDataUtils.DelimitString("* " + idi.ItemLabel, "\r\n", 80); strText += "\r\n"; //temporal state CTemporalStateDataItem diTSi = new CTemporalStateDataItem(); CTemporalStateData tsdi = new CTemporalStateData(this); tsdi.GetTemporalStateDI(itm.TSID, out diTSi); strText += "TS: "; strText += CDataUtils.DelimitString(diTSi.TSLabel, "\r\n", 80); strText += " "; //outcome state COutcomeStateDataItem diOSi = new COutcomeStateDataItem(); COutcomeStateData osdi = new COutcomeStateData(this); osdi.GetOutcomeStateDI(itm.OSID, out diOSi); strText += "OS: "; strText += CDataUtils.DelimitString(diOSi.OSLabel, "\r\n", 80); strText += " "; //decision state CDecisionStateDataItem diDSi = new CDecisionStateDataItem(); CDecisionStateData dsdi = new CDecisionStateData(this); dsdi.GetDecisionStateDI(itm.DSID, out diDSi); string strDS = String.Empty; strDS += "DS: "; strDS += diDSi.DSLabel; //if decision state is overriden pull out the //last comment if (itm.IsOverridden == k_TRUE_FALSE_ID.True) { DataSet dsComments = null; //todo: override history is now stored in a diff table //this is obsolete will delete after testing //status = diCLI.GetPatientItemCommmentDS( // itm.PatCLID, // itm.ItemID, // out dsComments); status = diCLI.GetPatItemOverrideCommmentDS(itm.PatCLID, itm.ChecklistID, itm.ItemID, out dsComments); //first record is the newest comment if (!CDataUtils.IsEmpty(dsComments)) { //string strComment = CDataUtils.GetDSStringValue(dsComments, "comment_text"); //DateTime dtComment = CDataUtils.GetDSDateTimeValue(dsComments, "comment_date"); // string strComment = CDataUtils.GetDSStringValue(dsComments, "override_comment"); DateTime dtComment = CDataUtils.GetDSDateTimeValue(dsComments, "override_date"); long lCommentUserID = CDataUtils.GetDSLongValue(dsComments, "user_id"); DataSet dsUser = null; CUserData ud = new CUserData(this); ud.GetUserDS(lCommentUserID, out dsUser); string strUser = String.Empty; if (!CDataUtils.IsEmpty(dsUser)) { strUser = CDataUtils.GetDSStringValue(dsUser, "name"); } strDS += " Overridden "; strDS += CDataUtils.GetDateAsString(dtComment); strDS += " "; strDS += strUser; strDS += "\r\n\r\n"; strDS += strComment; } } //ds strText += CDataUtils.DelimitString(strDS, "\r\n", 80); strText += "\r\n\r\n"; } } } 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()); }