/// <summary> /// method /// adds a new item to the item list /// </summary> /// <param name="args"></param> protected void OnSelectItem(object sender, CAppUserControlArgs args) { if (!string.IsNullOrEmpty(args.EventData)) { CStatus status = AddItem(Convert.ToInt64(args.EventData)); if (!status.Status) { ShowStatusInfo(status); } } }
/// <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()); }
/// <summary> /// event /// loads the item selector dialog /// displays the item selector dialog /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void OnClickAddItem(object sender, EventArgs e) { CStatus status = ucItemSelector.LoadControl(k_EDIT_MODE.UPDATE); if (!status.Status) { ShowStatusInfo(status); return; } //show the popup ucItemSelector.ShowMPE(); }
/// <summary> /// event /// US:1945 US:1880 displays the map note title dialog /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void OnClickMap(object sender, EventArgs e) { CStatus status = ucMapNoteTitle.LoadControl(k_EDIT_MODE.INITIALIZE); if (!status.Status) { ShowStatusInfo(status); return; } ucMapNoteTitle.ShowMPE(); }
/// <summary> /// override /// loads the item lookup user control /// </summary> /// <param name="lEditMode"></param> /// <returns></returns> public override CStatus LoadControl(k_EDIT_MODE lEditMode) { EditMode = lEditMode; CStatus status = ucItemLookup.LoadControl(EditMode); if (!status.Status) { return(status); } return(new CStatus()); }
/// <summary> /// override /// loads drop downs and sets focus /// </summary> /// <param name="lEditMode"></param> /// <returns></returns> public override CStatus LoadControl(k_EDIT_MODE lEditMode) { CStatus status = LoadServiceDDL(); if (!status.Status) { return(status); } chkFilterByCLName.Focus(); return(new CStatus()); }
protected CStatus LoadPatComponents() { CPatientItemData pid = new CPatientItemData(BaseMstr.BaseData); DataSet dsComps = null; CStatus status = pid.GetPatientItemComponentDS( PatientID, Convert.ToInt64(ddlItems.SelectedValue), ItemID, out dsComps); if (!status.Status) { return(status); } DataTable dtComps = dsComps.Tables[0]; if (dtComps == null || dtComps.Rows.Count != gvComponents.Rows.Count) { return(new CStatus(false, k_STATUS_CODE.Failed, "TODO")); } foreach (GridViewRow gvr in gvComponents.Rows) { RadioButton rbSelect = (RadioButton)gvr.FindControl("rbSelComponent"); TextBox txtVal = (TextBox)gvr.FindControl("txtValue"); if (rbSelect == null || txtVal == null) { return(new CStatus(false, k_STATUS_CODE.Failed, "TODO")); } DataRow drComp = dtComps.Select("ITEM_COMPONENT_ID = " + gvComponents.DataKeys[gvr.DataItemIndex][nItemComponentIDIndex].ToString())[0]; switch ((k_ITEM_TYPE_ID)ItemTypeID) { case k_ITEM_TYPE_ID.Laboratory: txtVal.Text = drComp["COMPONENT_VALUE"].ToString(); break; case k_ITEM_TYPE_ID.QuestionFreeText: txtVal.Text = drComp["COMPONENT_VALUE"].ToString(); break; case k_ITEM_TYPE_ID.QuestionSelection: rbSelect.Checked = (drComp["COMPONENT_VALUE"].ToString() == "1") ? true : false; break; default: return(new CStatus(false, k_STATUS_CODE.Failed, "TODO")); } } return(new CStatus()); }
/// <summary> /// override /// calls the validate methods for the checklist and items /// </summary> /// <param name="lStatusCode"></param> /// <param name="plistStatus"></param> /// <returns></returns> public override CStatus ValidateUserInput(out CParameterList plistStatus) { plistStatus = null; CStatus status = ValidateChecklist(out plistStatus); if (status.Status) { status = ucItemEntry.ValidateUserInput(out plistStatus); } return(status); }
/// <summary> /// US:892 /// US:894 /// override /// does nothing /// </summary> /// <param name="lEditMode"></param> /// <returns></returns> public override CStatus LoadControl(k_EDIT_MODE lEditMode) { EditMode = lEditMode; CStatus status = ucSinglePatientEditor.LoadControl(EditMode); if (!status.Status) { return(status); } return(new CStatus()); }
/// <summary> /// event /// US:838 /// user clicked the search button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSearch_Click(object sender, EventArgs e) { CStatus status = PatientLookup(sender, e, string.Empty); if (!status.Status) { ShowStatusInfo(status); upucPatientLookup.Update(); } btnSearch.Focus(); }
/// <summary> /// US:834 writes an event to the communicator event table /// </summary> /// <param name="strEventName"></param> /// <param name="strEventDetails"></param> public void WriteEvent(CData data, string strEventName, string strEventDetails) { //comm data class CVAPPCTCommData commData = new CVAPPCTCommData(data); CStatus status = new CStatus(); //com data object for logging etc... status = commData.SaveCommEvent(strEventName, strEventDetails); }
/// <summary> /// does the user have a security keys by key name /// </summary> /// <param name="ds"></param> /// <returns></returns> public bool HasSecurityKey(long lUserID, string strKeyName) { //initialize parameters DataSet ds = null; CStatus status = new CStatus(); //transfer from MDWS if needed if (MDWSTransfer) { long lCount = 0; CMDWSOps ops = new CMDWSOps(this); status = ops.GetMDWSSecurityKeys(lUserID, true, out lCount); if (!status.Status) { return(false); } } //load the paramaters list CParameterList pList = new CParameterList(base.SessionID, base.ClientIP, base.UserID); pList.AddInputParameter("pi_vSecurityKeyName", strKeyName.Trim().ToUpper()); //get the dataset CDataSet cds = new CDataSet(); status = cds.GetOracleDataSet(base.DBConn, "PCK_SECURITY_KEY.GetSecurityKeyByNameRS", pList, out ds); if (!status.Status) { return(false); } string strKey = CDataUtils.GetDSStringValue(ds, "security_key_name"); if (!String.IsNullOrEmpty(strKey)) { if (strKey.Trim().ToLower() == strKeyName.Trim().ToLower()) { return(true); } } return(false); }
/// <summary> /// enter a new outcome state /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void OnClickNew(object sender, EventArgs e) { CStatus status = ucOutcomeStateEdit.LoadControl(k_EDIT_MODE.INSERT); if (!status.Status) { ShowStatusInfo(status); return; } ucOutcomeStateEdit.ShowMPE(); }
/// <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> /// override /// saves the values in the dialog and fires the save /// event if the save was successful /// </summary> /// <returns></returns> public override CStatus SaveControl() { CServiceDataItem di = new CServiceDataItem(); di.ServiceLabel = txtService.Text; di.IsActive = chkActive.Checked; CServiceData service = new CServiceData(BaseMstr.BaseData); CStatus status = new CStatus(); switch (EditMode) { case k_EDIT_MODE.INSERT: long lServiceID = -1; status = service.InsertService(di, out lServiceID); if (status.Status) { LongID = lServiceID; EditMode = k_EDIT_MODE.UPDATE; } break; case k_EDIT_MODE.UPDATE: di.ServiceID = LongID; status = service.UpdateService(di); break; default: status.Status = false; status.StatusCode = k_STATUS_CODE.Failed; status.StatusComment = Resources.ErrorMessages.ERROR_INVALID_EDITMODE; break; } if (!status.Status) { return(status); } if (_Save != null) { CAppUserControlArgs args = new CAppUserControlArgs( k_EVENT.INSERT, k_STATUS_CODE.Success, string.Empty, LongID.ToString()); _Save(this, args); } return(new CStatus()); }
/// <summary> /// US:1945 load gridview row values /// </summary> /// <param name="gvr"></param> protected CStatus LoadGridViewRowValues(GridViewRow gvr) { DataRowView drv = (DataRowView)gvr.DataItem; if (drv == null) { return(new CStatus(false, k_STATUS_CODE.Failed, "TODO")); } DataRow dr = drv.Row; if (dr == null) { return(new CStatus(false, k_STATUS_CODE.Failed, "TODO")); } CStatus status = LoadGridViewCompValues(gvr, dr); if (!status.Status) { return(status); } switch (ItemTypeID) { case (long)k_ITEM_TYPE_ID.Laboratory: status = LoadGridViewRangeValues(gvr, dr); if (!status.Status) { return(status); } break; case (long)k_ITEM_TYPE_ID.QuestionSelection: LoadGridViewSelectionValues(gvr, dr); if (!status.Status) { return(status); } break; case (long)k_ITEM_TYPE_ID.QuestionFreeText: case (long)k_ITEM_TYPE_ID.NoteTitle: // nothing to load break; default: return(new CStatus(false, k_STATUS_CODE.Failed, "TODO")); } return(new CStatus()); }
/// <summary> /// load the control /// </summary> /// <param name="lEditMode"></param> /// <returns></returns> public override CStatus LoadControl(k_EDIT_MODE lEditMode) { //cache the editmode for postbacks EditMode = lEditMode; //load the DS definition drop down CStatus status = LoadDSDefinitionDropDown(); if (!status.Status) { return(status); } //clear/reset the controls ddlDSDefinition.SelectedIndex = -1; txtDSLabel.Text = string.Empty; chkDSActive.Checked = false; txtDSLabel.Focus(); //default active check to true if (lEditMode == k_EDIT_MODE.INSERT) { chkDSActive.Checked = true; } else if (lEditMode == k_EDIT_MODE.UPDATE) { if (LongID < 1) { return(new CStatus(false, k_STATUS_CODE.Failed, "TODO")); } //get a 1 record TS dataset CDecisionStateDataItem di = null; CDecisionStateData dsData = new CDecisionStateData(BaseMstr.BaseData); status = dsData.GetDecisionStateDI(LongID, out di); if (!status.Status) { //if the load failed, disable the save and return btnucDSESave.Enabled = false; ShowStatusInfo(status); return(status); } //load the forms controls with data ddlDSDefinition.SelectedValue = di.DSDefinitionID.ToString(); txtDSLabel.Text = di.DSLabel; OriginalLabel = txtDSLabel.Text; chkDSActive.Checked = di.IsActive; } 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(); 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> /// event /// US:902 /// loads the logic view in the multiview /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected CStatus LoadLogicView() { ucLogicSelector.ChecklistID = ChecklistID; ucLogicSelector.ChecklistItemID = ChecklistItemID; CStatus status = ucLogicSelector.LoadControl(EditMode); if (!status.Status) { return(status); } return(new CStatus()); }
public virtual void Init(CUnit unit) { m_unit = unit; m_rBody = GetComponent <Rigidbody>(); m_rBody.angularDrag = 999f; m_rBody.drag = 4f; m_rBody.constraints = RigidbodyConstraints.FreezeRotation; m_actCtrl = GetComponent <CActionCtrl>(); m_status = GetComponent <CStatus>(); }
/// <summary> /// US:1945 US:1883 user clicked the add button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void OnClickAdd(object sender, EventArgs e) { ShowMPE(); ucItemSelector.ParentMPE = MPE; CStatus status = ucItemSelector.LoadControl(k_EDIT_MODE.INITIALIZE); if (!status.Status) { ShowStatusInfo(status); return; } ucItemSelector.ShowMPE(); }
/// <summary> /// event /// US:838 /// user clicked the select checklist button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSelectChecklist_Click(object sender, EventArgs e) { CStatus status = ucChecklistSelector.LoadControl(k_EDIT_MODE.INITIALIZE); if (!status.Status) { ShowStatusInfo(status); } else { ucChecklistSelector.ShowMPE(); } }
/// <summary> /// fired when a note is successfully saved /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void OnNoteSaved(object sender, CAppUserControlArgs e) { //if we are closing this checklist then save it. if (CDataUtils.ToLong(ddlChecklistState.SelectedValue) == (long)k_CHECKLIST_STATE_ID.Closed) { CStatus status = SaveControl(); if (!status.Status) { ShowStatusInfo(status.StatusCode, status.StatusComment); return; } } }
/// <summary> /// event /// clears the checklist controls of their values /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void OnClickNew(object sender, EventArgs e) { CStatus status = ucChecklistEntry.LoadControl(k_EDIT_MODE.INSERT); if (!status.Status) { Master.ShowStatusInfo(status); return; } btnCLSave.Enabled = true; btnCLSaveAs.Enabled = true; }
public override CStatus LoadControl(k_EDIT_MODE lEditMode) { EditMode = lEditMode; CStatus status = LoadItemGroups(); if (!status.Status) { return(status); } return(status); }
/// <summary> /// load the temporal state definition drop down /// </summary> /// <returns></returns> private CStatus LoadTSDefinitionDropDown() { if (ddlTSDefinition.Items.Count < 1) { CStatus status = CSTAT.LoadTSDefinitionDDL(BaseMstr.BaseData, ddlTSDefinition); if (!status.Status) { return(status); } } return(new CStatus()); }
/// <summary> /// event /// loads checklist selector user control /// displays checklist selector user control /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void OnClickLoad(object sender, EventArgs e) { CStatus status = ucChecklistSelector.LoadControl(k_EDIT_MODE.UPDATE); if (!status.Status) { Master.ShowStatusInfo(status); return; } //show the popup ucChecklistSelector.ShowMPE(); }
/// <summary> /// event /// US:838 /// displays the checklist selector dialog /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void OnSelectChecklist(object sender, EventArgs e) { ucChecklistSelector.ActiveChecklistsOnly = true; CStatus status = ucChecklistSelector.LoadControl(k_EDIT_MODE.INITIALIZE); if (!status.Status) { Master.ShowStatusInfo(status); return; } ucChecklistSelector.ShowMPE(); }
public override CStatus LoadControl(k_EDIT_MODE lEditMode) { Title = "Item History"; CItemData id = new CItemData(BaseMstr.BaseData); CItemDataItem diItem = null; CStatus status = id.GetItemDI(ItemID, out diItem); if (!status.Status) { return(status); } hItem.InnerText = diItem.ItemLabel; CPatientItemData pid = new CPatientItemData(BaseMstr.BaseData); DataSet dsPIC = null; status = pid.GetPatItemCompDS(PatientID, ItemID, out dsPIC); if (!status.Status) { return(status); } PatientItemComponents = dsPIC.Tables[0]; CItemComponentData icd = new CItemComponentData(BaseMstr.BaseData); DataSet dsIC = null; status = icd.GetItemComponentOJDS(ItemID, k_ACTIVE_ID.Active, out dsIC); if (!status.Status) { return(status); } ItemComponents = dsIC.Tables[0]; if (ItemComponents.Rows.Count > 1) { pnlComponents.Visible = true; rblComponents.DataSource = ItemComponents; rblComponents.DataBind(); DataRow rdItemComponent = ItemComponents.Rows[0]; rblComponents.SelectedValue = rdItemComponent["item_component_id"].ToString(); GraphItemComponent(rdItemComponent); } else { pnlComponents.Visible = false; GraphItemComponent(ItemComponents.Rows[0]); } return(new CStatus()); }
/// <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); }