/// <summary>
    /// US:1951 method
    /// loads the checklist's service drop down list
    /// </summary>
    /// <returns></returns>
    protected CStatus LoadChecklistDDLs()
    {
        if (ddlCLService.Items.Count < 1)
        {
            CStatus status = CService.LoadServiceDDL(
                BaseMstr.BaseData,
                k_ACTIVE_ID.Active,
                ddlCLService);
            if (!status.Status)
            {
                return(status);
            }
        }

        if (ddlClinics.Items.Count < 1)
        {
            CStatus status = CClinic.LoadClinicDLL(BaseMstr.BaseData, ddlClinics);
            if (!status.Status)
            {
                return(status);
            }
        }

        return(new CStatus());
    }
Ejemplo n.º 2
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());
    }