/// <summary> /// method /// loads all the os definitions into a drop down list /// </summary> /// <param name="BaseMstr"></param> /// <param name="ddl"></param> /// <returns></returns> public static CStatus LoadOSDefinitionDDL(CData Data, DropDownList ddl) { //get the dataset DataSet dsOS = null; CSTATData data = new CSTATData(Data); CStatus status = data.GetOSDefinitionDS(out dsOS); if (!status.Status) { return(status); } //render the dataset status = CDropDownList.RenderDataSet( dsOS, ddl, "OS_DEFINITION_LABEL", "OS_DEFINITION_ID"); if (!status.Status) { return(status); } return(new CStatus()); }
/// <summary> /// sets the time given hh,mm,ss /// </summary> /// <param name="lHH"></param> /// <param name="lMM"></param> /// <param name="lSS"></param> public void SetTime(long lHH, long lMM, long lSS) { string strHH = Convert.ToString(lHH); if (lHH < 10) { strHH = "0" + strHH; } CDropDownList.SelectItemByText(ddlHH, strHH); string strMM = Convert.ToString(lMM); if (lMM < 10) { strMM = "0" + strMM; } CDropDownList.SelectItemByText(ddlMM, strMM); string strSS = Convert.ToString(lSS); if (lSS < 10) { strSS = "0" + strSS; } CDropDownList.SelectItemByText(ddlSS, strSS); }
/// <summary> /// Load services label data into dropdownlist /// </summary> /// <param name="BaseMstr"></param> /// <param name="ActiveFilter"></param> /// <param name="ddl"></param> /// <returns></returns> public static CStatus LoadServiceDDL( CData Data, k_ACTIVE_ID ActiveFilter, DropDownList ddl) { ddl.Items.Clear(); DataSet dsService = null; CServiceData data = new CServiceData(Data); CStatus status = data.GetServiceDS(ActiveFilter, out dsService); if (!status.Status) { return(status); } status = CDropDownList.RenderDataSet( dsService, ddl, "SERVICE_LABEL", "SERVICE_ID"); if (!status.Status) { return(status); } return(new CStatus()); }
/// <summary> /// method /// loads all the checklist states into a drop down list /// </summary> /// <param name="BaseMstr"></param> /// <param name="ddl"></param> /// <returns></returns> public static CStatus LoadChecklistStateDDL(CData Data, DropDownList ddl) { //get the dataset DataSet ds = null; CSTATData data = new CSTATData(Data); CStatus status = data.GetChecklistStateDS(out ds); if (!status.Status) { return(status); } //render the dataset status = CDropDownList.RenderDataSet( ds, ddl, "CHECKLIST_STATE_LABEL", "CHECKLIST_STATE_ID"); if (!status.Status) { return(status); } return(new CStatus()); }
public static CStatus LoadClinicDLL(CData Data, DropDownList ddl) { ddl.Items.Clear(); DataSet dsClinics = null; CClinicData cd = new CClinicData(Data); CStatus status = cd.GetClinicDS(out dsClinics); if (!status.Status) { return(status); } status = CDropDownList.RenderDataSet( dsClinics, ddl, "CLINIC_LABEL", "CLINIC_ID"); if (!status.Status) { return(status); } return(new CStatus()); }
/// <summary> /// method /// loads all the item groups that satisfy the active filter into a ddl /// </summary> /// <param name="Data"></param> /// <param name="ddl"></param> /// <param name="ActiveFilter"></param> /// <returns></returns> public static CStatus LoadItemGroupDDL( CData Data, DropDownList ddl, k_ACTIVE_ID ActiveFilter) { //get the dataset DataSet dsItemGroups = null; CItemGroupData data = new CItemGroupData(Data); CStatus status = data.GetItemGroupDS(ActiveFilter, out dsItemGroups); if (!status.Status) { return(status); } //render the dataset status = CDropDownList.RenderDataSet( dsItemGroups, ddl, "ITEM_GROUP_LABEL", "ITEM_GROUP_ID"); if (!status.Status) { return(status); } return(new CStatus()); }
/// <summary> /// method /// loads items in the specified collection into the ddl /// </summary> /// <param name="Data"></param> /// <param name="ddl"></param> /// <param name="lItemID"></param> /// <returns></returns> public static CStatus LoadItemCollectionDDL( CData Data, DropDownList ddl, long lItemID) { CItemCollectionData coll = new CItemCollectionData(Data); DataSet dsColl = null; CStatus status = coll.GetItemCollectionDS(lItemID, out dsColl); if (!status.Status) { return(status); } status = CDropDownList.RenderDataSet( dsColl, ddl, "item_label", "item_id"); if (!status.Status) { return(status); } return(new CStatus()); }
/// <summary> /// method /// loads all the item types into a drop down list /// </summary> /// <param name="BaseMstr"></param> /// <param name="ddl"></param> /// <returns></returns> public static CStatus LoadItemTypeDDL(CData Data, DropDownList ddl) { //get the dataset DataSet dsItemTypes = null; CSTATData data = new CSTATData(Data); CStatus status = data.GetItemTypeDS(out dsItemTypes); if (!status.Status) { return(status); } //render the dataset status = CDropDownList.RenderDataSet( dsItemTypes, ddl, "ITEM_TYPE_LABEL", "ITEM_TYPE_ID"); if (!status.Status) { return(status); } return(new CStatus()); }
/// <summary> /// US:912 /// loads a dropdown list of decision states /// </summary> /// <returns></returns> public static CStatus LoadCLIDecisionStatesDDL( CData Data, long lChecklistID, long lItemID, DropDownList ddl) { ddl.Items.Clear(); DataSet dsDS = null; CChecklistItemData cid = new CChecklistItemData(Data); CStatus status = cid.GetDecisionStateDS(lChecklistID, lItemID, out dsDS); if (!status.Status) { return(status); } //render the dataset status = CDropDownList.RenderDataSet( dsDS, ddl, "DS_LABEL", "DS_ID"); if (!status.Status) { return(status); } return(new CStatus()); }
/// <summary> /// selected region was changed. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ddlRegion_SelectedIndexChanged(object sender, EventArgs e) { if (!IsPostBack) { return; } if (ddlRegion.SelectedIndex != -1) { ddlSite.Items.Clear(); DataSet dsSite = null; long lRegionID = CDataUtils.ToLong(ddlRegion.SelectedValue); CSiteData siteData = new CSiteData(BaseMstr.BaseData); //get all sites for this region siteData.GetSiteDS(lRegionID, out dsSite); CDropDownList.RenderDataSet(dsSite, ddlSite, "SITE_NAME", "SITE_ID"); } ShowMPE(); }
/// <summary> /// method /// loads all of the patient's items into the specified ddl /// for the specified item /// </summary> /// <param name="BaseMstr"></param> /// <param name="ddl"></param> /// <returns></returns> public static CStatus LoadPatientItemsDDL( CData Data, DropDownList ddl, string strPatientID, long lItemID) { CPatientItemData dta = new CPatientItemData(Data); DataSet dsItems = null; CStatus status = dta.GetPatientItemDS( strPatientID, lItemID, out dsItems); if (!status.Status) { return(status); } status = CDropDownList.RenderDataSet( dsItems, ddl, "ENTRY_DATE", "PAT_ITEM_ID"); if (!status.Status) { return(status); } return(new CStatus()); }
/// <summary> /// method /// Load temporal state data into a drop down list /// </summary> /// <param name="BaseMstr"></param> /// <param name="ddl"></param> /// <returns></returns> public static CStatus LoadTSDropDownList(CData Data, DropDownList ddl) { ddl.Items.Clear(); //get the dataset DataSet dsTS = null; CTemporalStateData tsd = new CTemporalStateData(Data); CStatus status = tsd.GetTemporalStateDS((long)k_ACTIVE_ID.All, out dsTS); if (!status.Status) { return(status); } //render the dataset status = CDropDownList.RenderDataSet( dsTS, ddl, "TS_LABEL", "TS_ID"); if (!status.Status) { return(status); } return(new CStatus()); }
/// <summary> /// method /// loads all the unit options into a drop down list /// </summary> /// <param name="BaseMstr"></param> /// <param name="ddl"></param> /// <returns></returns> public static CStatus LoadUnitDDL(CData Data, DropDownList ddl) { //get the dataset DataSet dsUnit = null; CSTATData data = new CSTATData(Data); CStatus status = data.GetUnitDS(out dsUnit); if (!status.Status) { return(status); } //render the dataset status = CDropDownList.RenderDataSet( dsUnit, ddl, "TIME_UNIT_LABEL", "TIME_UNIT_ID"); if (!status.Status) { return(status); } return(new CStatus()); }
/// <summary> /// method /// loads all the active options into a drop down list /// </summary> /// <param name="BaseMstr"></param> /// <param name="ddl"></param> /// <returns></returns> public static CStatus LoadActiveDDL(CData Data, DropDownList ddl) { //get the dataset DataSet dsActive = null; CSTATData data = new CSTATData(Data); CStatus status = data.GetActiveDS(out dsActive); if (!status.Status) { return(status); } //render the dataset status = CDropDownList.RenderDataSet( dsActive, ddl, "ACTIVE_LABEL", "ACTIVE_ID"); if (!status.Status) { return(status); } return(new CStatus()); }
/// <summary> /// US:912 /// Abstract save control method /// </summary> /// <returns></returns> public override CStatus SaveControl() { //update the checklist item states... CPatChecklistItemDataItem diCLItem = null; CPatChecklistItemData cid = new CPatChecklistItemData(BaseMstr.BaseData); CStatus status = cid.GetPatCLItemDI(PatientChecklistID, ItemID, out diCLItem); if (!status.Status) { return(status); } //per customer we only override decision state if (diCLItem.DSID != Convert.ToInt64(ddlDS.SelectedValue)) { diCLItem.IsOverridden = k_TRUE_FALSE_ID.True; diCLItem.OverrideDate = DateTime.Now; } diCLItem.DSID = CDropDownList.GetSelectedLongID(ddlDS); //update status = cid.UpdatePatChecklistItem(diCLItem); if (!status.Status) { return(status); } //keep a history of the ds override with comment if (diCLItem.IsOverridden == k_TRUE_FALSE_ID.True) { cid.OverridePatChecklistItem(diCLItem, txtComment.Text); } //TODO: this is obsolete, will delete after testing //we now keep a history of ds overrides with comment //using OverridePatChecklistItem above // //if (!string.IsNullOrEmpty(txtComment.Text)) //{ //CPatChecklistItemData item = new CPatChecklistItemData(BaseMstr.BaseData); //status = item.InsertPatientItemComment( // PatientChecklistID, // ChecklistID, // ItemID, // txtComment.Text); // if (!status.Status) // { // return status; // } // } return(new CStatus()); }
protected void loadEmergencyContactInput() { //demographic Emergency Contact State CDropDownList emergStateList = new CDropDownList(); CDropDownList emergRelationshipList = new CDropDownList(); CPatient pat = new CPatient(); DataSet patEmergContact = pat.GetPatientEmergencyContactDS(Master); //load all available fields if (patEmergContact != null) { foreach (DataTable patTable in patEmergContact.Tables) { foreach (DataRow patRow in patTable.Rows) { if (!patRow.IsNull("NAME")) { txtEmergencyName.Text = patRow["NAME"].ToString(); } if (!patRow.IsNull("RELATIONSHIP_ID")) { emergRelationshipList.SelectValue(cboEmergencyRelationship, Convert.ToString(patRow["RELATIONSHIP_ID"])); } if (!patRow.IsNull("ADDRESS1")) { txtEmergencyAddress1.Text = patRow["ADDRESS1"].ToString(); } if (!patRow.IsNull("CITY")) { txtEmergencyCity.Text = patRow["CITY"].ToString(); } if (!patRow.IsNull("POSTAL_CODE")) { txtEmergencyPostCode.Text = patRow["POSTAL_CODE"].ToString(); } if (!patRow.IsNull("WORKPHONE")) { txtEmergencyWPhone.Text = patRow["WORKPHONE"].ToString(); } if (!patRow.IsNull("HOMEPHONE")) { txtEmergencyHPhone.Text = patRow["HOMEPHONE"].ToString(); } if (!patRow.IsNull("STATE_ID")) { emergStateList.SelectValue(cboEmergencyState, Convert.ToString(patRow["STATE_ID"])); } } } } }
/// <summary> /// US:864 US:876 loads a dropdown list with patient checklists, will screen out /// check lists that the user does not have view permissions for. /// </summary> /// <param name="BaseMastr"></param> /// <param name="strPatientID"></param> /// <param name="ddl"></param> /// <returns></returns> public CStatus LoadPatientChecklists(CBaseMaster BaseMstr, string strPatientID, DropDownList ddl) { CPatientChecklistLogic pcl = new CPatientChecklistLogic(BaseMstr.BaseData); CStatus status = pcl.RunLogic(strPatientID); if (!status.Status) { return(status); } CPatChecklistData pc = new CPatChecklistData(BaseMstr.BaseData); DataSet ds = null; status = pc.GetPatChecklistDS(strPatientID, out ds); if (!status.Status) { return(status); } //remove records from the ds that the user is not allowed to view foreach (DataTable table in ds.Tables) { foreach (DataRow dr in table.Rows) { long lChecklistID = CDataUtils.GetDSLongValue(dr, "CHECKLIST_ID"); CChecklistPermissionsDataItem pdi = null; CChecklistData clData = new CChecklistData(BaseMstr.BaseData); clData.GetCheckListPermissionsDI(lChecklistID, out pdi); //is the user allowed to view this checklist if (!pdi.HasPermission(BaseMstr.AppUser, k_CHECKLIST_PERMISSION.Viewable)) { dr.Delete(); } } } ds.AcceptChanges(); //render the dataset status = CDropDownList.RenderDataSet( ds, ddl, "CHECKLIST_LABEL", "PAT_CL_ID"); if (!status.Status) { return(status); } return(new CStatus()); }
/// <summary> ///US:1883 Abstract save control method /// </summary> /// <returns></returns> public override CStatus SaveControl() { CPatientItemData itemData = new CPatientItemData(BaseMstr.BaseData); CStatus status = new CStatus(); long lPatItemID = -1; if (ddlItems.SelectedItem.Text == "[New Result]") { //load an item for insert CPatientItemDataItem di = new CPatientItemDataItem(); di.PatientID = PatientID; di.ItemID = ItemID; di.SourceTypeID = (long)k_SOURCE_TYPE_ID.VAPPCT; //get the date time, which is a combination of the 2 controls di.EntryDate = CDataUtils.GetDate(txtEntryDate.Text, ucTimePicker.HH, ucTimePicker.MM, ucTimePicker.SS); // build a list of all the item components in the grid view CPatientItemCompList PatItemCompList = null; status = BuildPatItemCompList(out PatItemCompList); if (!status.Status) { return(status); } // insert the patient item and all of its item components status = itemData.InsertPatientItem(di, PatItemCompList, out lPatItemID); if (!status.Status) { return(status); } } else { lPatItemID = CDropDownList.GetSelectedLongID(ddlItems); } // update the comments if there is a new one if (!string.IsNullOrEmpty(txtComment.Text)) { status = itemData.InsertPatientItemComment(lPatItemID, ItemID, txtComment.Text); if (!status.Status) { return(status); } } //show status return(new CStatus()); }
//public bool public bool LoadTemplateTypeCombo(BaseMaster BaseMstr, DropDownList cboType) { CDropDownList cbo = new CDropDownList(); DataSet ds = GetTemplateTypeDS(BaseMstr); cbo.RenderDataSet(BaseMstr, ds, cboType, "DESCRIPTION", "TYPE_ID", ""); return(true); }
//load a dropdown list of Supervisor Relations public void LoadDemSupervisorRelationDropDownList(BaseMaster BaseMstr, DropDownList cbo, string strSelectedID) { //get the data to load DataSet ds = GetSupervisorRelationDS(BaseMstr); //load the combo CDropDownList dl = new CDropDownList(); dl.RenderDataSet(BaseMstr, ds, cbo, "RELATION_DESC", "RELATION_DESC", strSelectedID); }
/// <summary> /// event /// sets dialog title /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { Title = "Login"; txtUID.Focus(); if (ddlSite.Items.Count < 1) { DataSet dsRegion = null; DataSet dsSite = null; CSiteData siteData = new CSiteData(BaseMstr.BaseData); //get the regions CStatus status = siteData.GetRegionDS(out dsRegion); CDropDownList.RenderDataSet(dsRegion, ddlRegion, "REGION_NAME", "REGION_ID"); //select the default region if set long lRegionID = 0; if (System.Configuration.ConfigurationManager.AppSettings["MDWSEmrSvcRegionID"] != null) { string strRegion = System.Configuration.ConfigurationManager.AppSettings["MDWSEmrSvcRegionID"].ToString(); lRegionID = CDataUtils.ToLong(strRegion); CDropDownList.SelectItemByValue(ddlRegion, lRegionID); } //get all sites for this region status = siteData.GetSiteDS(lRegionID, out dsSite); CDropDownList.RenderDataSet(dsSite, ddlSite, "SITE_NAME", "SITE_ID"); long lSiteID = 0; if (System.Configuration.ConfigurationManager.AppSettings["MDWSEmrSvcSiteList"] != null) { string strSite = System.Configuration.ConfigurationManager.AppSettings["MDWSEmrSvcSiteList"].ToString(); lSiteID = CDataUtils.ToLong(strSite); CDropDownList.SelectItemByValue(ddlSite, lSiteID); } } }
//load a dropdown list of military duty station name public void LoadMilDutyStationNameDropDownList(BaseMaster BaseMstr, DropDownList cbo, string strSelectedID) { //get the data to load DataSet ds = m_Military.GetMilitaryDutyStationNameDS(BaseMstr); //load the combo CDropDownList dl = new CDropDownList(); dl.RenderDataSet(BaseMstr, ds, cbo, "BASE", "DIMS_ID", strSelectedID); }
//load a dropdown list of military pay grade public void LoadMilPayGradeDropDownList(BaseMaster BaseMstr, DropDownList cbo, string strSelectedID) { //get the data to load DataSet ds = m_Military.GetMilitaryPayGradeDS(BaseMstr); //load the combo CDropDownList dl = new CDropDownList(); dl.RenderDataSet(BaseMstr, ds, cbo, "GRADE", "RANK_ID", strSelectedID); }
//load a dropdown list of military services public void LoadMilStatusDropDownList(BaseMaster BaseMstr, DropDownList cbo, string strSelectedID) { //get the data to load DataSet ds = m_Military.GetMilitaryStatusDS(BaseMstr); //load the combo CDropDownList dl = new CDropDownList(); dl.RenderDataSet(BaseMstr, ds, cbo, "MILITARY_STATUS_TITLE", "MILITARY_STATUS_ID", strSelectedID); }
//load a dropdown list of all the majcoms public void LoadAllMAJCOMDDL(BaseMaster BaseMstr, DropDownList cbo, string strSelectedID) { //get the data to load DataSet ds = m_Military.GetAllMAJCOMDS(BaseMstr); //load the combo CDropDownList dl = new CDropDownList(); dl.RenderDataSet(BaseMstr, ds, cbo, "MAJCOM_TITLE", "MAJCOM_ID", strSelectedID); }
//load a dropdown list of military services public void LoadDemStateDropDownList(BaseMaster BaseMstr, DropDownList cbo, string strSelectedID) { //get the data to load DataSet ds = GetStateDS(BaseMstr); //load the combo CDropDownList dl = new CDropDownList(); dl.RenderDataSet(BaseMstr, ds, cbo, "ABBREBIATION,STATE_TITLE", "STATE_ID", strSelectedID); }
//load a dropdown list of Supervisor relationship public void LoadDemRelationshipDropDownList(BaseMaster BaseMstr, DropDownList cbo, string strSelectedID) { //get the data to load DataSet ds = GetRelationshipSelfDS(BaseMstr); //load the combo CDropDownList dl = new CDropDownList(); dl.RenderDataSet(BaseMstr, ds, cbo, "DESCRIPTION", "RELATIONSHIP_ID", strSelectedID); }
//load a dropdown list of Client Work Performance public void LoadDemWorkPerformanceDropDownList(BaseMaster BaseMstr, DropDownList cbo, string strSelectedID) { //get the data to load DataSet ds = GetWorkPerformanceDS(BaseMstr); //load the combo CDropDownList dl = new CDropDownList(); dl.RenderDataSet(BaseMstr, ds, cbo, "SUPERVISORY_ASSESSMENT", "SUPERVISORY_ASSESSMENT", strSelectedID); }
//load a dropdown list of Genders public void LoadDemGenderDropDownList(BaseMaster BaseMstr, DropDownList cbo, string strSelectedID) { //get the data to load DataSet ds = GetGenderDS(BaseMstr); //load the combo CDropDownList dl = new CDropDownList(); dl.RenderDataSet(BaseMstr, ds, cbo, "GENDER_DESC", "GENDER_ID", strSelectedID); }
//load a dropdown list of majcoms public void LoadMAJCOMBaseDropDownList(BaseMaster BaseMstr, DropDownList cbo, long lMAJCOMID, string strSelectedID) { //get the data to load DataSet ds = m_Military.GetMAJCOMBaseDS(BaseMstr, lMAJCOMID); //load the combo CDropDownList dl = new CDropDownList(); dl.RenderDataSet(BaseMstr, ds, cbo, "BASE", "DIMS_ID", strSelectedID); }