Beispiel #1
0
    /// <summary>
    /// US:1945 US:1880 override
    /// Loads the note titles listbox with all note tiles
    /// </summary>
    /// <param name="lEditMode"></param>
    /// <returns></returns>
    public override CStatus LoadControl(k_EDIT_MODE lEditMode)
    {
        CStatus status = new CStatus();

        if (lbNoteTitles.Items.Count < 1)
        {
            CNoteTitleData ntd          = new CNoteTitleData(BaseMstr.BaseData);
            DataSet        dsNoteTitles = null;
            status = ntd.GetNoteTitleDS(out dsNoteTitles);
            if (status.Status)
            {
                lbNoteTitles.DataTextField = "note_title_label";
                //note: the tag is not unique so it cannot be used
                //as the datavaluefield, will map incorrectly...
                //lbNoteTitles.DataValueField = "note_title_tag";
                lbNoteTitles.DataValueField = "note_title_label";
                lbNoteTitles.DataSource     = dsNoteTitles;
                lbNoteTitles.DataBind();
            }
            else
            {
                ShowStatusInfo(status);
            }
        }

        txtSearchOptions.Focus();
        return(status);
    }
Beispiel #2
0
    /// <summary>
    /// US:1945 US:1880 search the list of note titles
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSearchOptions_Click(object sender, EventArgs e)
    {
        //re-load the note titles
        lbNoteTitles.Items.Clear();

        CNoteTitleData ntd          = new CNoteTitleData(BaseMstr.BaseData);
        DataSet        dsNoteTitles = null;
        CStatus        status       = ntd.GetNoteTitleDS(out dsNoteTitles);

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

        lbNoteTitles.DataTextField = "note_title_label";
        //note: the tag is not unique so it cannot be used
        //as the datavaluefield, will map incorrectly...
        //lbNoteTitles.DataValueField = "note_title_tag";
        lbNoteTitles.DataValueField = "note_title_label";
        lbNoteTitles.DataSource     = dsNoteTitles;
        lbNoteTitles.DataBind();

        //filter the listbox using helper
        CListBox clb = new CListBox();

        clb.FilterListBox(lbNoteTitles, txtSearchOptions.Text);

        //show the parents MPE and then this controls MPE
        ShowMPE();
    }
Beispiel #3
0
    /// <summary>
    /// US:1956 US:885 load the control with data
    /// </summary>
    /// <param name="lEditMode"></param>
    /// <returns></returns>
    public override CStatus LoadControl(k_EDIT_MODE lEditMode)
    {
        CStatus status = CClinic.LoadClinicDLL(BaseMstr.BaseData, ddlClinics);

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

        //load the tiu note
        string strTIU       = String.Empty;
        string strNoteTitle = String.Empty;

        CPatChecklistData clData = new CPatChecklistData(BaseMstr.BaseData);

        status = clData.GetTIUText(
            PatientID,
            PatChecklistID,
            out strNoteTitle,
            out strTIU);
        if (!status.Status)
        {
            return(status);
        }

        //keep the note title as a property
        NoteTitle = strNoteTitle;

        //select the note title default clinic from the checklist
        CPatChecklistDataItem pdi = new CPatChecklistDataItem();

        status = clData.GetPatChecklistDI(PatChecklistID, out pdi);
        if (!status.Status)
        {
            return(status);
        }

        CChecklistDataItem cli = new CChecklistDataItem();
        CChecklistData     cld = new CChecklistData(BaseMstr.BaseData);

        status = cld.GetCheckListDI(pdi.ChecklistID, out cli);
        if (!status.Status)
        {
            return(status);
        }

        if (cli.NoteTitleClinicID > 0)
        {
            ddlClinics.SelectedValue = cli.NoteTitleClinicID.ToString();
        }

        //show the note title at the top of the popup
        lblNoteTitle.Text = strNoteTitle;

        //the note title tag is the title of the note, but we need the ien
        //to write the note...
        long           lNoteTitleIEN = 0;
        CNoteTitleData nd            = new CNoteTitleData(BaseMstr.BaseData);

        status = nd.GetNoteTitleIEN(strNoteTitle, out lNoteTitleIEN);
        if (!status.Status)
        {
            return(status);
        }

        NoteTitleIEN = Convert.ToString(lNoteTitleIEN);

        //set the text for the note
        txtTIU.Text = strTIU;

        return(new CStatus());
    }