Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack && Master.SelectedPatientID == "")
        {
            GetPatientID();
        }

        CDataUtils   utils  = new CDataUtils();
        CCPAPResults cpap   = new CCPAPResults(Master);
        CIntake      intake = new CIntake();

        if (!IsPostBack)
        {
            //load questionnaires dropdown
            //cpap.LoadQuestionnaireCombo(cboQuestionnaireScores);

            //get graphic raw data
            htxtTxAdherence.Value    = cpap.GetTxAdherence();
            htxtAHI.Value            = cpap.GetAHI();
            htxtMaskLeak.Value       = cpap.GetMaskLeak();
            htxtQuestionnaires.Value = utils.GetJSONString(intake.GetPatIntakeScoresDS(Master));
        }

        cboSummaryTimeWindow.Attributes.Add("onchange", "patient.summary.timewindow(this);");
        //cboQuestionnaireScores.Attributes.Add("onchange", "patient.summary.renderQuestionnaires(this);");

        ShowSysFeedback();
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        CCPAPResults cpap   = new CCPAPResults(Master);
        CDataUtils   utils  = new CDataUtils();
        CIntake      intake = new CIntake();

        if (!IsPostBack)
        {
            rblGraphicsMode.SelectedIndex = (int)Master.GraphicOption;
            rblGraphicsMode_OnSelectedIndexChanged(null, EventArgs.Empty);

            htxtTxAdherence.Value = cpap.GetTxAdherence();
            htxtAHI.Value         = cpap.GetAHI();
            htxtBaselineAHI.Value = cpap.GetBaselineAHI();

            string strLeakType;
            htxtMaskLeak.Value       = cpap.GetMaskLeak(out strLeakType);
            htxtLeakType.Value       = strLeakType;
            htxtQuestionnaires.Value = utils.GetStringValueFromDS(intake.GetScoreDataStringDS(Master, Master.SelectedPatientID), "MID_DATA");

            CPatientEvent evt = new CPatientEvent(Master);
            evt.CheckPAPEvent();
            ClearTxSessionVars();
            loadPatient();

            cpap.LoadQuestionnaireCombo(cboQuestionnaireScores);
        }

        cboSummaryTimeWindow.Attributes.Add("onchange", "patient.summary.timewindow(this);");
        cboSummaryTimeWindow2.Attributes.Add("onchange", "patient.summary.graphs.timewindow(this);");
        cboQuestionnaireScores.Attributes.Add("onchange", "patient.summary.renderQuestionnaires(this);");

        ucPatEvt.BaseMstr = Master;

        //move to events tab if this is an event lookup
        if (!IsPostBack)
        {
            if (Session["EVENT_LOOKUP"] != null)
            {
                if ((bool)Session["EVENT_LOOKUP"])
                {
                    tcPatSummary.ActiveTabIndex = 1;
                    Session["EVENT_LOOKUP"]     = null;
                }
            }
        }
    }
Exemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        lPatInfoRightMode = usrsec.GetRightMode(Master, (long)SUATUserRight.ProcessNewPatientsUR);

        //pass the master to the user control
        ucPatientPortalAccount.BaseMstr = Master;
        ucPAPDevice.BaseMstr            = Master;

        if (Master.IsPatientLocked)
        {
            lPatInfoRightMode = (long)RightMode.ReadOnly;
        }

        //disable the cpap machine tab until the patient is created (patient_id assigned)
        if (String.IsNullOrEmpty(Master.SelectedPatientID))
        {
            lnkCPAPMachine.Enabled = false;
        }
        else
        {
            lnkCPAPMachine.Enabled = true;
        }

        SetJSAttributes();

        //-----------------------------------------------------------------------
        //      NOT POSTBACK
        //-----------------------------------------------------------------------
        #region NotPostback
        if (!IsPostBack)
        {
            rblHomePhoneMsg.ClearSelection();

            //Load combos
            loadAllCombos();
            LoadEthnicityRaceLists();

            CCPAPResults cpap = new CCPAPResults(Master);
            htxtDevicePatient.Value = cpap.GetDevicePatient();

            bool bNewEntry = Convert.ToBoolean(Request.QueryString["newpatient"]);

            if (bNewEntry)
            {
                Master.ClosePatient();
            }

            if (Master.SelectedPatientID == "")
            {
                Master.SetVSValue("IsNewPatient", true);
                addNewPatient();
            }
            else
            {
                Master.SetVSValue("IsNewPatient", false);
                loadPatient();

                loadEmergencyContactInput();
                ucPatientPortalAccount.loadPatientPortalAccount();
            }

            //set hidden field's value to the current tab index
            htxtCurrTab.Value = tabContDemographics.ActiveTabIndex.ToString();
        }
        #endregion

        //if the user pushed the master save button
        //then save the form
        if (IsPostBack)
        {
            if (Master.OnMasterSAVE())
            {
                Session["PATIENTNAME"] = null;

                Save();

                if (Master.StatusCode <= 0)
                {
                    Master.SetVSValue("VS_PATIENT_TREATMENTS", "");
                    upWrapperUpdatePanel.Update();

                    if (Master.GetVSBoolValue("ReloadPage"))
                    {
                        ViewState["ReloadPage"] = null;
                        Response.Redirect("pat_demographics.aspx");
                    }
                }
                else
                {
                    ShowSysFeedback();
                }
            }
        }

        //check patient's record status
        bRecLocked = Master.IsPatientLocked;

        CheckUserRightsMode();
    }