Ejemplo n.º 1
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);
    }
Ejemplo n.º 2
0
    /// <summary>
    /// method
    /// loads the selected patient's checklists in the checklist drop down list
    /// </summary>
    /// <returns></returns>
    protected CStatus LoadDDLs()
    {
        CPatientChecklist pcl    = new CPatientChecklist();
        CStatus           status = pcl.LoadPatientChecklists(BaseMstr, PatientID, ddlPatChecklist);

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

        status = CSTAT.LoadChecklistStateDDL(BaseMstr.BaseData, ddlChecklistState);
        if (!status.Status)
        {
            return(status);
        }

        return(new CStatus());
    }
Ejemplo n.º 3
0
    /// <summary>
    /// US:1880 method
    /// loads the selected checklist
    /// </summary>
    /// <returns></returns>
    protected CStatus LoadChecklist()
    {
        PatCLID = Convert.ToInt64(ddlPatChecklist.SelectedValue);
        if (PatCLID < 1)
        {
            return(new CStatus(false, k_STATUS_CODE.Failed, "TODO"));
        }

        CPatientChecklist pcl    = new CPatientChecklist();
        CStatus           status = pcl.LoadPatientChecklists(BaseMstr, PatientID, ddlPatChecklist);

        if (!status.Status)
        {
            return(status);
        }
        ddlPatChecklist.SelectedValue = PatCLID.ToString();

        CPatChecklistData     pcld = new CPatChecklistData(BaseMstr.BaseData);
        CPatChecklistDataItem di   = null;

        status = pcld.GetPatChecklistDI(PatCLID, out di);
        if (!status.Status)
        {
            return(status);
        }
        ddlChecklistState.SelectedValue = Convert.ToInt64(di.ChecklistStateID).ToString();
        ChecklistID      = di.ChecklistID;
        ChecklistStateID = di.ChecklistStateID;
        EnableBasedOnChecklistState();

        //enable/disable the button based on the checklist selected
        CPatChecklistData dta  = new CPatChecklistData(BaseMstr.BaseData);
        DataSet           dsCL = null;

        dta.GetOutOfDatePatCLDS(PatientID, ChecklistID, out dsCL);
        if (!CDataUtils.IsEmpty(dsCL))
        {
            btnUpdateCLVersion.Enabled = true;
            lblVersion.Text            = "New Version Available!";
        }
        else
        {
            btnUpdateCLVersion.Enabled = false;
            lblVersion.Text            = "Version is Current.";
        }


        if (!CDataUtils.IsDateNull(di.ProcedureDate))
        {
            tbProcedureDate.Text          = CDataUtils.GetDateAsString(di.ProcedureDate);
            calProcedureDate.SelectedDate = di.ProcedureDate;
            ucProcedureTime.SetTime(di.ProcedureDate);
        }
        else
        {
            tbProcedureDate.Text          = string.Empty;
            calProcedureDate.SelectedDate = null;
            ucProcedureTime.HH            = 0;
            ucProcedureTime.MM            = 0;
            ucProcedureTime.SS            = 0;
        }

        //checklist data - check for notetitle and disable tiu if we dont have one
        CChecklistData     clData      = new CChecklistData(BaseMstr.BaseData);
        CChecklistDataItem diChecklist = null;

        status = clData.GetCheckListDI(di.ChecklistID, out diChecklist);
        if (!status.Status)
        {
            return(status);
        }

        btnTIU.Enabled = (diChecklist.NoteTitleTag != "-1") ? true: false;

        CPatientData p        = new CPatientData(BaseMstr.BaseData);
        string       strBlurb = string.Empty;

        status = p.GetPatientBlurb(PatientID, out strBlurb);
        if (!status.Status)
        {
            return(status);
        }

        sPatientBlurb.InnerText = strBlurb + " for " + diChecklist.ChecklistLabel;

        ucPatCLItems.PatientChecklistID = di.PatCLID;
        ucPatCLItems.PatientID          = di.PatientID;
        ucPatCLItems.ChecklistID        = di.ChecklistID;
        status = LoadPatientChecklistItems();
        if (!status.Status)
        {
            return(status);
        }

        EnableTIU();

        return(new CStatus());
    }