Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        RenderEducationTree();

        htxtOPT0.Value = Master.SelectedPatientID;

        if (!IsPostBack)
        {
            divEduInfo.Style.Add("display", "block");
        }

        if (Request.QueryString["opt1"] != null)
        {
            long          lEventID = Convert.ToInt32(Request.QueryString["opt1"]);
            CPatientEvent evt      = new CPatientEvent(Master);
            evt.CompletedEvent(lEventID);
        }

        if (IsPostBack)
        {
            string strControlName = Request.Params["__EVENTTARGET"];
            if (strControlName.IndexOf("upCheckVideosStatus") > -1)
            {
                if (HasViewedVideos())
                {
                    Response.Redirect("portal_start.aspx");
                }
            }
        }
    }
Ejemplo n.º 2
0
    protected void CheckModuleGroupStatus(BaseMaster BaseMstr)
    {
        CPatientEvent evt = new CPatientEvent(BaseMstr);

        CEncounter enc    = new CEncounter();
        DataSet    dsGrps = enc.GetModuleGroupStatusDS(BaseMstr);
        DataSet    dsEvts = evt.GetPatientEventsDS();
        bool       bRedirectToBaselineScreen = false;

        if (dsGrps != null)
        {
            foreach (DataTable dt in dsGrps.Tables)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    long lEventID = 0;
                    long lPending = 1;

                    if (!dr.IsNull("EVENT_ID"))
                    {
                        lEventID = Convert.ToInt32(dr["EVENT_ID"]);
                    }

                    if (!dr.IsNull("PENDING"))
                    {
                        lPending = Convert.ToInt32(dr["PENDING"]);
                    }

                    if (lPending == 0 && lEventID != 0)
                    {
                        if (lEventID == _BASELINE_INTAKES_EVENT)
                        {
                            bRedirectToBaselineScreen = !IsBaselineMarkedCompleted(dsEvts, _BASELINE_INTAKES_EVENT);
                        }
                        evt.CompletedEvent(lEventID);
                    }
                }
            }

            if (bRedirectToBaselineScreen)
            {
                Response.Redirect("portal_start.aspx");
            }
        }
    }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["id"] != null)
            {
                long lPageID = Convert.ToInt32(Request.QueryString["id"]);
                GetPageContents(lPageID);
            }
            else
            {
                litContents.Text = "<h1>Empty page.</h1>";
            }
        }

        htxtOPT0.Value = Master.SelectedPatientID;

        if (Request.QueryString["opt1"] != null)
        {
            long          lEventID = Convert.ToInt32(Request.QueryString["opt1"]);
            CPatientEvent evt      = new CPatientEvent(Master);
            evt.CompletedEvent(lEventID);
        }
    }
Ejemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack && Master.SelectedPatientID == "")
        {
            GetPatientID();
        }

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

        strSaveBtnID = Master.FindControl("btnMasterSave").ClientID;

        SetJSAttributes();

        //-----------------------------------------------------------------------
        //      NOT POSTBACK
        //-----------------------------------------------------------------------
        #region NotPostback
        if (!IsPostBack)
        {
            //Load combos
            loadAllCombos();
            LoadEthnicityRaceLists();

            if (Master.SelectedPatientID == "")
            {
                return;
            }
            else
            {
                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 (Master.OnMasterSAVE())
        {
            if (Save())
            {
                CPatientTxStep patstep = new CPatientTxStep(Master);
                CPatientEvent  patevt  = new CPatientEvent(Master);

                if ((Master.PatientTxStep & (long)PatientStep.SavedProfile) == 0)
                {
                    patevt.CompletedEvent(1);
                }

                upWrapperUpdatePanel.Update();
                if (patstep.InsertPatientStep(1))
                {
                    Response.Redirect("portal_start.aspx");
                }
            }
        }
    }
Ejemplo n.º 5
0
    protected void btnChangePWD_Click(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(txtNewP.Text) ||
            string.IsNullOrEmpty(txtVNewP.Text) ||
            string.IsNullOrEmpty(txtOldP.Text))
        {
            Master.StatusCode    = 1;
            Master.StatusComment = "Password entries are empty!";
            ShowSysFeedback();
            return;
        }

        if (txtNewP.Text != txtVNewP.Text)
        {
            Master.StatusCode    = 1;
            Master.StatusComment = "New Password and Verify Password do not match!";
            ShowSysFeedback();
            return;
        }

        if (pnlSecQuestions.Visible)
        {
            if (cboQuestion1.SelectedIndex < 1 ||
                cboQuestion2.SelectedIndex < 1 ||
                txtAnswer1.Text.Trim().Length < 1 ||
                txtAnswer2.Text.Trim().Length < 1)
            {
                Master.StatusCode    = 1;
                Master.StatusComment = "Please select two challenge questions and enter the corresponding answers!";
                ShowSysFeedback();
                return;
            }
        }

        long   lStatusCode      = 0;
        string strStatusComment = string.Empty;

        //validate the password rules
        CSec sec = new CSec();

        if (!sec.ValidateUserAccountRules(Master, (string)Session["USER_NAME"], txtNewP.Text))
        {
            Master.StatusCode    = lStatusCode;
            Master.StatusComment = strStatusComment;
            ShowSysFeedback();
            return;
        }

        //all good so far, change the pwd, login and redirect
        lStatusCode = sec.ChangePassword(Master, (string)Session["USER_NAME"], txtOldP.Text, txtNewP.Text);

        if (lStatusCode != 0)
        {
            Master.StatusCode    = lStatusCode;
            Master.StatusComment = strStatusComment;
            ShowSysFeedback();
            return;
        }

        //update security challenge questions & answers
        CSecQuestions secquest = new CSecQuestions(Master);

        if (!secquest.UpdateSecQuestions(Convert.ToInt32(cboQuestion1.SelectedValue),
                                         txtAnswer1.Text.Trim(),
                                         Convert.ToInt32(cboQuestion2.SelectedValue),
                                         txtAnswer2.Text.Trim(),
                                         -1,
                                         String.Empty))
        {
            Master.StatusCode    = lStatusCode;
            Master.StatusComment = strStatusComment;
            ShowSysFeedback();
            return;
        }

        //if we get here we have successfully changed the password
        //now login with the new account
        if (sec.Login(Master, (string)Session["USER_NAME"], txtNewP.Text) != 0)
        {
            Master.StatusCode    = lStatusCode;
            Master.StatusComment = strStatusComment;
            ShowSysFeedback();
            return;
        }

        Master.StatusCode    = lStatusCode;
        Master.StatusComment = strStatusComment;

        CPatient   pat   = new CPatient();
        CDataUtils utils = new CDataUtils();
        DataSet    dsPat = pat.GetPatientIDRS(Master, Master.FXUserID);

        Master.SelectedPatientID = utils.GetDSStringValue(dsPat, "PATIENT_ID");

        CPatientEvent evt = new CPatientEvent(Master);

        evt.CompletedEvent(1);


        ShowSysFeedback();

        //successful login so clear txt boxes
        lblUID.Text          = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
        txtOldP.Text         = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
        txtNewP.Text         = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
        txtVNewP.Text        = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
        lblUID.Text          = string.Empty;
        txtOldP.Text         = string.Empty;
        txtNewP.Text         = string.Empty;
        txtVNewP.Text        = string.Empty;
        Session["USER_NAME"] = null;

        //set a session variable with the login time
        Session["SESSION_INITIATED"] = DateTime.Now;

        //redirect, we are now logged in
        //Master.Response.Redirect("portal_revamp.aspx");
        Master.Response.Redirect("portal_start.aspx");
    }