Пример #1
0
    /// <summary>
    /// override
    /// saves the user's input
    /// raises an event with the new checklist id
    /// </summary>
    /// <returns></returns>
    public override CStatus SaveControl()
    {
        //save
        long           lNewChecklistID = -1;
        CChecklistData data            = new CChecklistData(BaseMstr.BaseData);
        CStatus        status          = data.SaveAs(
            ChecklistID,
            txtAs.Text,
            out lNewChecklistID);

        if (!status.Status)
        {
            return(status);
        }

        //cache the new id
        LongID = lNewChecklistID;

        if (_SaveAs != null)
        {
            CAppUserControlArgs args = new CAppUserControlArgs(
                k_EVENT.INSERT,
                k_STATUS_CODE.Success,
                string.Empty,
                lNewChecklistID.ToString());

            _SaveAs(this, args);
        }

        return(new CStatus());
    }
Пример #2
0
    /// <summary>
    /// US:1945 US:1880
    /// maps the selected note title to the item
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void OnSelectNoteTitle(object sender, CAppUserControlArgs e)
    {
        ShowMPE();

        if (string.IsNullOrEmpty(tbLabel.Text))
        {
            tbLabel.Text = ucMapNoteTitle.SelectedText;
        }

        hfMapID.Value = ucMapNoteTitle.SelectedValue;
        tbMapID.Text  = (hfMapID.Value != "-1") ? hfMapID.Value : string.Empty;

        ucItemComponentEditor.ItemTypeID = Convert.ToInt64(ddlType.SelectedValue);
        ucItemComponentEditor.Clear();

        CItemComponentDataItem di = new CItemComponentDataItem();

        di.ItemComponentLabel = "Text";
        di.SortOrder          = ucItemComponentEditor.Count + 1;
        di.ActiveID           = k_ACTIVE_ID.Active;

        CStatus status = ucItemComponentEditor.AddComponent(di);

        if (!status.Status)
        {
            ShowStatusInfo(status);
            return;
        }

        ucItemComponentEditor.AddEnabled = false;
    }
    /// <summary>
    /// loop and update the users checklists
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSave_Click(object sender, EventArgs e)
    {
        bool bUpdated = false;

        foreach (GridViewRow gvr in gvOutOfDateCL.Rows)
        {
            CheckBox cb = gvr.FindControl("chkSelect") as CheckBox;
            if (cb != null)
            {
                if (cb.Checked)
                {
                    CStatus           status = new CStatus();
                    CPatChecklistData dta    = new CPatChecklistData(BaseMstr.BaseData);
                    dta.UpdatePatCLVersion(Convert.ToInt32(gvOutOfDateCL.DataKeys[gvr.RowIndex].Value));
                    bUpdated = true;
                }
            }
        }

        if (bUpdated)
        {
            if (_UpdateVersion != null)
            {
                CAppUserControlArgs args = new CAppUserControlArgs(
                    k_EVENT.UPDATE,
                    k_STATUS_CODE.Success,
                    string.Empty,
                    "1");

                _UpdateVersion(this, args);
            }
        }
    }
Пример #4
0
    /// <summary>
    /// US:885 save the control
    /// </summary>
    /// <returns></returns>
    public override CStatus SaveControl()
    {
        CMDWSOps ops    = new CMDWSOps(this.BaseMstr.BaseData);
        CStatus  status = ops.WriteNote(
            PatientID,
            this.BaseMstr.UserID.ToString(),
            txtSign.Text,
            ddlClinics.SelectedValue,
            NoteTitleIEN,
            txtTIU.Text);

        if (!status.Status)
        {
            return(status);
        }

        //fire the NoteSaved event
        if (_NoteSaved != null)
        {
            CAppUserControlArgs args = new CAppUserControlArgs(
                k_EVENT.SELECT,
                k_STATUS_CODE.Success,
                string.Empty,
                "1");

            _NoteSaved(this, args);
        }

        return(new CStatus());
    }
Пример #5
0
    protected void OnContinueExisting(object sender, CAppUserControlArgs e)
    {
        CPatChecklistDataItem di = new CPatChecklistDataItem();

        di.ProcedureDate    = CDataUtils.GetNullDate();
        di.AssignmentDate   = DateTime.Now;
        di.ChecklistID      = ucExistingChecklist.ChecklistID;
        di.ChecklistStateID = k_CHECKLIST_STATE_ID.Open;
        di.PatientID        = PatientID;
        di.StateID          = k_STATE_ID.Unknown;

        long lPatCLID            = 0;
        CPatChecklistData pcld   = new CPatChecklistData(BaseMstr.BaseData);
        CStatus           status = pcld.InsertPatChecklist(di, out lPatCLID);

        if (!status.Status)
        {
            ShowStatusInfo(status);
            return;
        }

        if (BaseMstr.MDWSTransfer)
        {
            //talk to the communicator to update the
            //patient checklist from mdws
            CCommunicator com = new CCommunicator();
            status = com.RefreshPatientCheckList(
                BaseMstr.DBConn,
                BaseMstr.BaseData,
                PatientID,
                lPatCLID);
            if (!status.Status)
            {
                ShowStatusInfo(status);
                return;
            }
        }

        CPatientChecklist pcl = new CPatientChecklist();

        status = pcl.LoadPatientChecklists(BaseMstr, PatientID, ddlPatChecklist);
        if (!status.Status)
        {
            ShowStatusInfo(status);
            return;
        }
        ddlPatChecklist.SelectedValue = lPatCLID.ToString();

        status = LoadChecklist();
        if (!status.Status)
        {
            ShowStatusInfo(status);
            return;
        }

        //set the UI permissions based on the user logged in
        SetPermissions(btnTIU.Enabled);
    }
 /// <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);
         }
     }
 }
Пример #7
0
    /// <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());
    }
Пример #8
0
 /// <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;
         }
     }
 }
Пример #9
0
    /// <summary>
    /// event
    /// reloads the service list and selects the changed item
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void OnSaveService(object sender, CAppUserControlArgs e)
    {
        CStatus status = LoadServices();

        if (!status.Status)
        {
            ShowStatusInfo(status);
            return;
        }

        ServiceID = Convert.ToInt64(e.EventData);
        CGridView.SetSelectedRow(gvService, e.EventData);
        CGridView.SetSelectedLinkButtonForeColor(gvService, "lnkSelect", Color.White);
    }
Пример #10
0
    /// <summary>
    /// event
    /// US:838
    /// user selected a checklist item
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void OnChecklistSelect(object sender, CAppUserControlArgs e)
    {
        CChecklistData     cld    = new CChecklistData(BaseMstr.BaseData);
        CChecklistDataItem di     = null;
        CStatus            status = cld.GetCheckListDI(Convert.ToInt32(e.EventData), out di);

        if (!status.Status)
        {
            ShowStatusInfo(status);
        }

        txtChecklist.Text = di.ChecklistLabel;
        ChecklistID       = di.ChecklistID;
    }
Пример #11
0
    /// <summary>
    /// event
    /// loads the checklist controls with the new checklist
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void OnSaveAsChecklist(object sender, CAppUserControlArgs e)
    {
        ucChecklistEntry.ChecklistID = Convert.ToInt64(e.EventData);
        CStatus status = ucChecklistEntry.LoadControl(k_EDIT_MODE.UPDATE);

        if (!status.Status)
        {
            Master.ShowStatusInfo(status);
            return;
        }

        btnCLSave.Enabled   = true;
        btnCLSaveAs.Enabled = true;
    }
Пример #12
0
    protected void OnClickContinue(object sender, EventArgs e)
    {
        Visible = false;

        if (_Continue != null)
        {
            CAppUserControlArgs args = new CAppUserControlArgs(
                k_EVENT.SELECT,
                k_STATUS_CODE.Success,
                string.Empty,
                "1");

            _Continue(this, args);
        }
    }
    protected void OnClickCancel(object sender, EventArgs e)
    {
        ShowParentMPE();

        if (_Cancel != null)
        {
            CAppUserControlArgs args = new CAppUserControlArgs(
                k_EVENT.SELECT,
                k_STATUS_CODE.Success,
                string.Empty,
                "1");

            _Cancel(this, args);
        }
    }
Пример #14
0
    /// <summary>
    /// event
    /// reloads the grid view when an outcome state is saved
    /// </summary>
    /// <param name="args"></param>
    protected void OnSaveOutcomeState(object sender, CAppUserControlArgs e)
    {
        //reload the temporal states
        CStatus status = LoadOutcomeStates();

        if (!status.Status)
        {
            ShowStatusInfo(status);
            return;
        }

        //select the item we just updated
        OutcomeStateID = Convert.ToInt64(e.EventData);
        CGridView.SetSelectedRow(gvOutcomeStates, e.EventData);
        CGridView.SetSelectedLinkButtonForeColor(gvOutcomeStates, "lnkSelect", Color.White);
    }
    /// <summary>
    /// save the control
    /// </summary>
    /// <returns></returns>
    public override CStatus SaveControl()
    {
        CStatus status = new CStatus();

        //user input is ok so save
        switch (EditMode)
        {
        case k_EDIT_MODE.INSERT:
            long lOSID = -1;
            status = InsertOutcomeState(out lOSID);
            if (status.Status)
            {
                LongID   = lOSID;
                EditMode = k_EDIT_MODE.UPDATE;
            }
            break;

        case k_EDIT_MODE.UPDATE:
            status = UpdateOutcomeState(LongID);
            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:1883 event
    /// adds the selected item to the item collection
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="args"></param>
    protected void OnSelectItem(object sender, CAppUserControlArgs e)
    {
        ShowMPE();
        if (string.IsNullOrEmpty(e.EventData))
        {
            ShowStatusInfo(k_STATUS_CODE.Failed, "TODO");
            return;
        }

        CStatus status = AddItem(Convert.ToInt64(e.EventData));

        if (!status.Status)
        {
            ShowStatusInfo(status);
            return;
        }
    }
Пример #17
0
    protected void OnCheckedChangedGroup(object sender, EventArgs e)
    {
        ShowMPE();
        ddlFilterByGroup.Enabled = chkFilterByGroup.Checked;
        chkFilterByGroup.Focus();

        if (_OptionSelect != null)
        {
            CAppUserControlArgs args = new CAppUserControlArgs(
                k_EVENT.SELECT,
                k_STATUS_CODE.Success,
                string.Empty,
                "");

            _OptionSelect(this, args);
        }
    }
Пример #18
0
    /// <summary>
    /// event
    /// raises an event with the selected item id
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void OnClickSelect(object sender, EventArgs e)
    {
        if (ItemID < 1)
        {
            return;
        }

        if (_Select != null)
        {
            CAppUserControlArgs args = new CAppUserControlArgs(
                k_EVENT.SELECT,
                k_STATUS_CODE.Success,
                string.Empty,
                ItemID.ToString());

            _Select(this, args);
        }
    }
Пример #19
0
    /// <summary>
    /// US:852 fires an event when the lab test is selected
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void OnClickSelect(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(SelectedLabTestID))
        {
            ShowMPE();
            return;
        }

        if (_SelectLabTest != null)
        {
            CAppUserControlArgs args = new CAppUserControlArgs(
                k_EVENT.SELECT,
                k_STATUS_CODE.Success,
                string.Empty,
                SelectedLabTestID);

            _SelectLabTest(this, args);
        }
    }
Пример #20
0
    /// <summary>
    /// event
    /// captures the selected checklist id and assigns it
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void OnChecklistSelect(object sender, CAppUserControlArgs e)
    {
        ShowMPE();
        ChecklistID = Convert.ToInt32(e.EventData);
        if (ChecklistID < 1)
        {
            ShowStatusInfo(k_STATUS_CODE.Failed, Resources.ErrorMessages.ERROR_SP_CHECKLIST);
            return;
        }

        ucExistingChecklist.ChecklistID = ChecklistID;
        ucExistingChecklist.PatientID   = PatientID;
        CStatus status = ucExistingChecklist.LoadControl(k_EDIT_MODE.READ_ONLY);

        if (!status.Status)
        {
            ShowStatusInfo(status);
            return;
        }
    }
Пример #21
0
    /// <summary>
    /// event
    /// US:838
    /// captures the selected checklist id and displays the selected checklist's label
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void OnChecklistSelect(object sender, CAppUserControlArgs e)
    {
        ChecklistID = Convert.ToInt32(e.EventData);
        if (ChecklistID < 1)
        {
            Master.ShowStatusInfo(k_STATUS_CODE.Failed, "TODO");
            return;
        }

        CChecklistData     cld    = new CChecklistData(Master.BaseData);
        CChecklistDataItem di     = new CChecklistDataItem();
        CStatus            status = cld.GetCheckListDI(ChecklistID, out di);

        if (!status.Status)
        {
            Master.ShowStatusInfo(status);
            return;
        }

        tbChecklist.Text = di.ChecklistLabel;
    }
Пример #22
0
    /// <summary>
    /// event
    /// raises an event with the selected checklist id
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void OnClickSelect(object sender, EventArgs e)
    {
        if (ChecklistID < 1)
        {
            ShowMPE();
            return;
        }

        if (_Select != null)
        {
            CAppUserControlArgs args = new CAppUserControlArgs(
                k_EVENT.SELECT,
                k_STATUS_CODE.Success,
                string.Empty,
                ChecklistID.ToString());

            _Select(this, args);
        }

        ShowParentMPE();
    }
Пример #23
0
    /// <summary>
    /// US:1945 US:1880 save the selected note title to the note title property and fire the
    /// SelectNoteTitle property.
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSelect_Click(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(lbNoteTitles.SelectedValue))
        {
            ShowMPE();
            return;
        }

        //fire the SelectNoteTitle event for the parent to handle
        if (_SelectNoteTitle != null)
        {
            CAppUserControlArgs args = new CAppUserControlArgs(
                k_EVENT.SELECT,
                k_STATUS_CODE.Success,
                string.Empty,
                lbNoteTitles.SelectedValue);
            _SelectNoteTitle(this, args);
        }

        ShowParentMPE();
    }
Пример #24
0
    private void StoreAndContinue()
    {
        List <string> lstIDs = CGridView.GetUncheckedRowsList(
            gvExistingCL,
            "chkSelect");

        foreach (string strID in lstIDs)
        {
            PatientIDs = PatientIDs.Replace("," + strID + ",", ",");
        }

        if (_Continue != null)
        {
            CAppUserControlArgs args = new CAppUserControlArgs(
                k_EVENT.SELECT,
                k_STATUS_CODE.Success,
                string.Empty,
                "1");

            _Continue(this, args);
        }
    }
Пример #25
0
    public override CStatus LoadControl(k_EDIT_MODE lEditMode)
    {
        //get the data
        CPatChecklistData cld = new CPatChecklistData(BaseMstr.BaseData);
        bool    bHasPatCL     = false;
        CStatus status        = cld.HasPatientChecklist(
            ChecklistID,
            (long)k_CHECKLIST_STATE_ID.Open,
            PatientID,
            out bHasPatCL);

        if (!status.Status)
        {
            return(status);
        }

        if (bHasPatCL)
        {
            ShowMPE();
        }
        else
        {
            if (_Continue != null)
            {
                CAppUserControlArgs args = new CAppUserControlArgs(
                    k_EVENT.SELECT,
                    k_STATUS_CODE.Success,
                    string.Empty,
                    "1");

                _Continue(this, args);
            }
        }

        return(new CStatus());
    }
Пример #26
0
 /// <summary>
 /// reload the selected checklist after updaing the CL version
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void OnUpdateCLVersion(object sender, CAppUserControlArgs e)
 {
     LoadGridView();
 }
Пример #27
0
 /// <summary>
 /// reload the selected checklist after updaing the CL version
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void OnUpdateCLVersion(object sender, CAppUserControlArgs e)
 {
     LoadChecklist();
 }
Пример #28
0
 protected void OnCancelProcessing(object sender, CAppUserControlArgs e)
 {
     ProcessingCancelled = true;
     Master.ShowStatusInfo(k_STATUS_CODE.Success, Resources.SuccessMessages.SUCCESS_CANCEL_PROCESSING);
 }
Пример #29
0
 /// <summary>
 /// event
 /// US:838
 /// displays the existing checklist dialog
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void OnContinueExisting(object sender, CAppUserControlArgs e)
 {
     ACPatientIDs        = ucExistingChecklist.PatientIDs;
     ProcessingCancelled = false;
     Master.ShowStatusInfo(ThreadAssignChecklists());
 }
 /// <summary>
 /// event
 /// US:1945 US:1880 displays the selected note title text
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void OnSelectNoteTitle(object sender, CAppUserControlArgs e)
 {
     txtCLNoteTitle.Text = ucMapNoteTitle.SelectedText;
 }