//load text boxes
    protected void LoadTextBoxes(DataSet dsEnc)
    {
        CDataUtils utils = new CDataUtils();

        txtVisitDate.Text   = utils.GetDateValueAsStringFromDS(dsEnc, "ENCOUNTER_DATE");
        txtSessionTime.Text = utils.GetStringValueFromDS(dsEnc, "SESSION_TIME");

        txtSubjective.Text = utils.GetStringValueFromDS(dsEnc, "SUBJECTIVE");
        txtObjective.Text  = utils.GetStringValueFromDS(dsEnc, "OBJECTIVE");
        txtAssessment.Text = utils.GetStringValueFromDS(dsEnc, "ASSESSMENT");
    }
    //load Modality Desc
    protected void LoadModaliltyInfo(DataSet dsEnc)
    {
        CDataUtils utils = new CDataUtils();

        strEncounterType = utils.GetStringValueFromDS(dsEnc, "ENCOUNTER_TYPE_ID");

        CTreatment trt = new CTreatment();

        DataSet dsTrt = trt.GetStatModalityByModalityIDDS(BaseMstr, Convert.ToInt64(strEncounterType));

        string strModalityDesc     = utils.GetStringValueFromDS(dsTrt, "MODALITY");
        string strModalityDuration = utils.GetStringValueFromDS(dsTrt, "DURATION");

        txtSessionTime.Text     = strModalityDuration;
        txtSessionTime.ReadOnly = true;
        txtSessionTime.Enabled  = false;

        spModalityInfo.InnerText = strModalityDesc;
    }
Beispiel #3
0
    public void loadPatientPortalAccount()
    {
        //Delete divPassword.Visible = false;
        txtPassword.Enabled       = false;
        txtVerifyPassword.Enabled = false;

        BaseMstr.SetVSValue("NewPatientPortalAcct", false);

        BaseMstr.SetVSValue("PatientFXUserIDExists", false);

        BaseMstr.SetVSValue("PatientFXUserIDExists", CheckIfPatientFXUserRecExists());

        bool bFXUserIDExists = BaseMstr.GetVSBoolValue("PatientFXUserIDExists");

        if (!bFXUserIDExists)
        {
            //Delete divPassword.Visible = true;
            txtPassword.Enabled       = true;
            txtVerifyPassword.Enabled = true;
            txtUserId.Enabled         = true;
            //btnResetPassword.Enabled = false;
            chkResetPassword.Enabled = false;

            BaseMstr.SetVSValue("NewPatientPortalAcct", true);
        }
        else
        {
            CDataUtils utils = new CDataUtils();
            CSec       sec   = new CSec();

            DataSet dsSecData = new DataSet();

            //attempt to grab the user's profile
            dsSecData = sec.GetPatientFXUsernamePasswordDS(BaseMstr);

            //load FXUser Username and Password fields
            if (dsSecData != null)
            {
                txtUserId.Text = sec.dec(utils.GetStringValueFromDS(dsSecData, "USER_NAME"), "");
                //chkbxAccountLocked.Checked = Convert.ToBoolean(utils.GetLongValueFromDS(dsSecData, "IS_LOCKED"));
                //chkbxAccountInactive.Checked = Convert.ToBoolean(utils.GetLongValueFromDS(dsSecData, "IS_INACTIVE"));

                txtUserId.Enabled         = false;
                divResetPWDButton.Visible = true;
                chkResetPassword.Enabled  = true;
                txtPassword.Enabled       = false;
                txtVerifyPassword.Enabled = false;
            }
        }

        Page_Load(null, EventArgs.Empty);
    }
Beispiel #4
0
    //page load
    protected void Page_Load(object sender, EventArgs e)
    {
        CSec       sec   = new CSec();
        CDataUtils utils = new CDataUtils();

        if (!IsPostBack)
        {
            //if we are already logged in put us in change pwd mode
            if (BaseMstr.IsLoggedIn())
            {
                //we are in change pwd mode since we are already logged in
                SetMode(2);

                //get the username from db
                DataSet dsSecData = sec.GetFXUsernamePasswordDS(BaseMstr);
                txtUN.Text     = sec.dec(utils.GetStringValueFromDS(dsSecData, "USER_NAME"), "");
                txtUN.ReadOnly = true;
            }
            else
            {
                //we are in login mode because we have not logged in yet
                SetMode(1);

                //when we time out session wise we dont want to ask the user
                //for  a user name/password if they have a valid cert...
                //if (sec.CertLogin(BaseMstr))
                //{
                //    BaseMstr.StatusCode = 0;
                //    BaseMstr.StatusComment = "";
                //    Response.Redirect(strPageAfterLogin);
                //}

                BaseMstr.StatusCode    = 0;
                BaseMstr.StatusComment = "";
            }
        }
        else //a post back
        {
            //clear the divs html on the postback
            PopupPostLogin.InnerHtml = "";

            //only if not logged in set the un on the change pwd dive = to the u
            //this is so we dont have to re-type it if forced to change pwd
            if (!BaseMstr.IsLoggedIn())
            {
                txtUN.Text = txtU.Text;
            }
        }
    }
Beispiel #5
0
    public string GetParsedTemplateText2(BaseMaster BaseMstr,
                                         string strPatientID,
                                         string strEncounterID,
                                         long lTemplateID)
    {
        DataSet ds = GetParsedTemplate2DS(BaseMstr,
                                          strPatientID,
                                          strEncounterID,
                                          lTemplateID);

        CDataUtils utils   = new CDataUtils();
        string     strText = utils.GetStringValueFromDS(ds, "TEMPLATE_TEXT");

        return(strText);
    }
Beispiel #6
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;
                }
            }
        }
    }
Beispiel #7
0
    // 2011-07-21 D.S.
    // Get "Last Updated" info
    public bool getLastUpdated(DataSet ds)
    {
        if (ds != null)
        {
            DateTime dtLastUpdated;
            DateTime.TryParse("1900-01-01", out dtLastUpdated);
            long lLastUpdatedBy = -1;

            foreach (DataTable dt in ds.Tables)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    if (!dr.IsNull("last_updated") && !dr.IsNull("last_updated_by"))
                    {
                        DateTime dtRecUpdated = Convert.ToDateTime(dr["last_updated"]);
                        if (dtRecUpdated > dtLastUpdated)
                        {
                            dtLastUpdated  = dtRecUpdated;
                            lLastUpdatedBy = Convert.ToInt32(dr["last_updated_by"]);
                        }
                    }
                }
            }

            if (lLastUpdatedBy > -1)
            {
                string strLastUpdatedBy = "";
                string strLastUpdated   = dtLastUpdated.ToString();

                CUser   user   = new CUser();
                DataSet dsUser = user.GetLoginUserDS(this, lLastUpdatedBy);

                if (dsUser != null)
                {
                    CDataUtils utils = new CDataUtils();
                    strLastUpdatedBy = utils.GetStringValueFromDS(dsUser, "name");
                    string strUpdated = "Last updated on " + strLastUpdated + " by " + strLastUpdatedBy + ".";
                    this.SetVSValue("LAST_UPDATED", strUpdated);
                    return(true);
                }
            }
        }
        return(false);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        CSec usrsec = new CSec();

        bAllowUpdate = (usrsec.GetRightMode(Master, (long)SUATUserRight.AdministratorUR) > (long)RightMode.ReadOnly) &&
                       (Master.APPMaster.UserType == (long)SUATUserType.ADMINISTRATOR);

        if (!IsPostBack)
        {
            CDataUtils utils = new CDataUtils();
            //get system settings
            DataSet dsSys = new DataSet();
            if (Session["SYSSETTINGS"] == null)
            {
                CSystemSettings sys = new CSystemSettings();
                Session["SYSSETTINGS"] = sys.GetSystemSettingsDS(Master);
            }
            dsSys = (DataSet)Session["SYSSETTINGS"];


            txtMailSMTPHost.Text       = utils.GetStringValueFromDS(dsSys, "MAIL_SMTP_HOST");
            txtSenderEmailAddress.Text = utils.GetStringValueFromDS(dsSys, "MAIL_SMTP_SENDER");
            txtMailSMTPPort.Text       = Convert.ToString(utils.GetLongValueFromDS(dsSys, "MAIL_SMTP_PORT"));
            txtWebSiteUrl.Text         = utils.GetStringValueFromDS(dsSys, "SITE_URL");
            txtNotifyEmailAddress.Text = utils.GetStringValueFromDS(dsSys, "NOTIFY_EMAIL");

            //New Text Message Fields
            txtTextingHost.Text = utils.GetStringValueFromDS(dsSys, "TEXTING_HOST");
            txtTextingPort.Text = Convert.ToString(utils.GetLongValueFromDS(dsSys, "TEXTING_PORT"));
            txtTextingUser.Text = utils.GetStringValueFromDS(dsSys, "TEXTING_USER");
            txtTextingPswd.Text = utils.GetStringValueFromDS(dsSys, "TEXTING_PSWD");
            txtOraWinDir.Text   = utils.GetStringValueFromDS(dsSys, "ORA_WIN_DIR");

            Master.ClosePatient();
        }

        if (Master.OnMasterSAVE())
        {
            Save();
        }
    }
Beispiel #9
0
    protected void GetCreateSelfMgntEncounter(BaseMaster BaseMstr)
    {
        CDataUtils utils = new CDataUtils();
        CEncounter enc   = new CEncounter();
        DataSet    dsEnc = enc.GetSelfMgntEncounterDS(BaseMstr);
        string     strNewEncounterID;

        if (dsEnc != null)
        {
            string strEncounterID = utils.GetStringValueFromDS(dsEnc, "ENCOUNTER_ID");
            if (!String.IsNullOrEmpty(strEncounterID))
            {
                BaseMstr.SelectedEncounterID = strEncounterID;

                //Check if the module group is complete -> trigger event
                CheckModuleGroupStatus(BaseMstr);

                //If no more pending modules, close the encounter
                enc.CloseSelfMgntEncounter(BaseMstr, BaseMstr.SelectedEncounterID);
            }
            else
            {
                if (HasPendingModules(Master))
                {
                    if (enc.CreateSelfMgntEncounter(BaseMstr, out strNewEncounterID))
                    {
                        BaseMstr.SelectedEncounterID = strNewEncounterID;
                    }
                }
            }
        }
        else
        {
            if (HasPendingModules(Master))
            {
                if (enc.CreateSelfMgntEncounter(BaseMstr, out strNewEncounterID))
                {
                    BaseMstr.SelectedEncounterID = strNewEncounterID;
                }
            }
        }
    }
Beispiel #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsLoggedIn())
        {
            Response.Redirect("Default.aspx", true);
        }

        //set session time remaining
        strMilisecondsSessionExpire = SessionTimeRemaining();
        strSessionTimeout           = SessionTimeRemaining();

        // register Ext.NET library icons
        ResourceManager1.RegisterIcon(Icon.Information);

        //pass the master to the popup
        ucPatLookup.BaseMstr     = this;
        ucLogin.BaseMstr         = this;
        ucVerticalMenu.BaseMstr  = this;
        ucEncounterType.BaseMstr = this;

        if (!this.IsLoggedIn())
        {
            //put us back in login mode
            ucLogin.SetMode(1);

            this.ClosePatient();
        }

        //------------------------------------------------------------------------------
        // Get "Last updated" info
        string strLastUpdated = this.GetVSStringValue("LAST_UPDATED");

        if (!String.IsNullOrEmpty(strLastUpdated))
        {
            divLastModified.Visible   = true;
            divLastModified.InnerText = strLastUpdated;
        }

        //remove PATIENTNAME session variable if
        //not logged in and patient_id is empty
        if (!this.IsLoggedIn() || String.IsNullOrEmpty(this.SelectedPatientID))
        {
            Session["PATIENTNAME"] = null;
        }

        //------------------------------------------------------------------------------
        // NOT POSTBACK
        //------------------------------------------------------------------------------
        #region not_postback
        if (!IsPostBack)
        {
            //get system settings
            DataSet dsSys = new DataSet();

            if (Session["SYSSETTINGS"] == null)
            {
                CSystemSettings sys = new CSystemSettings();
                Session["SYSSETTINGS"] = sys.GetSystemSettingsDS(this);
            }
            dsSys = (DataSet)Session["SYSSETTINGS"];

            //get site
            if (Session["SiteID"] == null)
            {
                CSystemSettings SysSettings = new CSystemSettings();
                DataSet         dsSite      = SysSettings.GetSiteDS(this);
                string          strSiteID   = utils.GetStringValueFromDS(dsSite, "SITE_ID");
                Session["SiteID"] = strSiteID;
            }
        }
        #endregion

        //------------------------------------------------------------------------------
        // IS POSTBACK
        //------------------------------------------------------------------------------
        #region isPostBack
        if (IsPostBack)
        {
            //get the postback control
            string strPostBackControl = Request.Params["__EVENTTARGET"];
            if (strPostBackControl != null)
            {
                #region PatientLookup
                //did we do a patient lookup?
                if (strPostBackControl.Equals("PATIENT_LOOKUP"))
                {
                    //Clears previously looked up patient id, treatment id
                    this.SelectedPatientID   = "";
                    this.SelectedTreatmentID = -1;
                    this.SelectedEncounterID = "";
                    this.SelectedProblemID   = -1;

                    this.ClosePatient();


                    //get the patient id
                    string[] strArg = Request.Form["__EVENTARGUMENT"].Split('|');

                    //pass the patient id to the base, this will cache
                    //it in the db fx_session_value table
                    this.SelectedPatientID = strArg[0];

                    //check if it is an event lookup
                    if (strArg.Length > 1)
                    {
                        if (strArg[1].ToLower().Equals("event"))
                        {
                            Session["EVENT_LOOKUP"] = true;
                        }
                    }

                    //set the current treatment id, gets list of records with newest first
                    DataSet t_recs = treatment.GetRecordList(this,
                                                             this.SelectedPatientID,
                                                             2);  //OPEN CASES - Revamp only uses this

                    if (t_recs != null && t_recs.Tables[0].Rows.Count > 0)
                    {
                        this.SelectedTreatmentID = Convert.ToInt32(t_recs.Tables[0].Rows[0]["treatment_id"].ToString());
                    }

                    //------------------------------------------------------------------------------
                    //GET INITIAL VISIT ID
                    //GET PATIENT NAME FOR THE DEMOGRAPHICS BLURB
                    if (this.IsLoggedIn() && !String.IsNullOrEmpty(this.SelectedPatientID))//must be logged in too...
                    {
                        if (Session["InitialVisit"] == null)
                        {
                            CEncounter patInitVisit = new CEncounter();
                            CDataUtils dUtils       = new CDataUtils();
                            DataSet    dsInitVisit  = patInitVisit.GetInitialVisitDS(this, this.SelectedPatientID, this.SelectedTreatmentID);
                            Session["InitialVisit"] = dUtils.GetStringValueFromDS(dsInitVisit, "encounter_id");
                        }

                        if (Session["PATIENTNAME"] == null)
                        {
                            CPatient cpat = new CPatient();
                            Session["PATIENTNAME"] = cpat.GetPatientName(this);
                        }

                        //GET SELECTED PATIENT'S DEMOGRAPHICS
                        CPatient   pat   = new CPatient();
                        CDataUtils utils = new CDataUtils();
                        DataSet    clientDemographics = new DataSet();

                        Session["PAT_DEMOGRAPHICS_DS"] = pat.GetPatientDemographicsDS(this);
                        clientDemographics             = (DataSet)Session["PAT_DEMOGRAPHICS_DS"];

                        foreach (DataTable patTable in clientDemographics.Tables)
                        {
                            foreach (DataRow patRow in patTable.Rows)
                            {
                                this.APPMaster.PatientHasOpenCase = false;
                                if (!patRow.IsNull("OPENCASE_COUNT"))
                                {
                                    if (Convert.ToInt32(patRow["OPENCASE_COUNT"]) > 0)
                                    {
                                        this.APPMaster.PatientHasOpenCase = true;
                                    }
                                }
                            }
                        }
                    }
                    //--------------------------------------------------------------------------------------

                    //VERIFY STATUS OF THE PATIENT RECORD
                    CPatientLock plock = new CPatientLock(this);

                    string strLockProviderName  = String.Empty;
                    string strLockProviderEmail = String.Empty;

                    this.IsPatientLocked         = plock.IsPatientLocked(this.SelectedPatientID, out strLockProviderName, out strLockProviderEmail);
                    Session["PAT_LOCK_PROVIDER"] = strLockProviderName;
                    Session["PAT_LOCK_EMAIL"]    = strLockProviderEmail;

                    //REDIRECT USER ------------------------------------------------------------------------
                    long lSoapNoteUR = (long)SUATUserRight.NoteSubjectiveUR
                                       + (long)SUATUserRight.NoteObjectiveUR
                                       + (long)SUATUserRight.NoteAssessmentUR
                                       + (long)SUATUserRight.NotePlanUR;


                    if (this.APPMaster.HasUserRight(lSoapNoteUR))
                    {
                        Response.Redirect("pat_summary.aspx", true);
                    }
                    else if (this.APPMaster.HasUserRight((long)SUATUserRight.ProcessNewPatientsUR))
                    {
                        Response.Redirect("pat_demographics.aspx", false);
                    }
                    else
                    {
                        Response.Redirect("revamp.aspx", true);
                    }
                }
                #endregion

                #region OtherLookups
                //did we do a user lookup?
                if (strPostBackControl.Equals("USER_LOOKUP"))
                {
                    //get the uidpwd
                    string strArg = Request.Form["__EVENTARGUMENT"];
                    //pass the patient id to the base, this will cache
                    //it in the db fx_session_value table
                    this.SelectedProviderID = strArg;

                    Response.Redirect("user_admin.aspx", true);
                }

                //did we do a Portal Patient Lookup?
                if (strPostBackControl.Equals("PORTAL_PATIENT_LOOKUP"))
                {
                    //get the uidpwd
                    string strArg = Request.Form["__EVENTARGUMENT"];
                    //pass the patient id to the base, this will cache
                    //it in the db fx_session_value table
                    this.SelectedPatientID = strArg;

                    Response.Redirect("pat_portal_account.aspx", true);
                }

                //-- 2/22/2011 close currently looked up patient
                if (strPostBackControl.Equals("CLOSE_PATIENT"))
                {
                    this.SelectedPatientID   = "";
                    this.SelectedTreatmentID = -1;
                    this.LookupSearchCase    = -1;

                    Response.Redirect("revamp.aspx", true);
                }
                #endregion
            }
        }
        #endregion

        #region ShowUsernameAndPatientDemographics
        if (this.IsLoggedIn())
        {
            //Name Of User Currently logged on.
            string strUserLoggedOn = String.Empty;
            if (Session["USERLOGGEDON"] == null)
            {
                strUserLoggedOn        += "<img alt=\"Account Activity\" src=\"Images/information.png\" style=\"cursor: pointer; vertical-align: middle; margin-right: 3px;\" onclick=\"showAccDetails();\" />";
                strUserLoggedOn        += UserLoggedOn();
                strUserLoggedOn        += " - ";
                strUserLoggedOn        += DateTime.Now.ToShortDateString();
                strUserLoggedOn        += " ";
                strUserLoggedOn        += DateTime.Now.ToShortTimeString();
                lblUserLoggedOn.Text    = strUserLoggedOn;
                Session["USERLOGGEDON"] = strUserLoggedOn;
            }
            else
            {
                lblUserLoggedOn.Text = Session["USERLOGGEDON"].ToString();
            }

            //draw the patient info bar at the top
            patDemoInfoBar.InnerHtml = "";

            //GET PATIENT NAME for the demographics blurb
            //Render Left Vertical Menu for selected patient
            if (this.IsLoggedIn() && !String.IsNullOrEmpty(this.SelectedPatientID))//must be logged in too...
            {
                if (Session["PATIENTNAME"] == null)
                {
                    CPatient cpat = new CPatient();
                    Session["PATIENTNAME"] = cpat.GetPatientName(this);
                }
                string[] strPatInfo = (string[])Session["PATIENTNAME"];

                patDemoInfoBar.InnerHtml = strPatInfo[0];

                //render vertical menu
                ucVerticalMenu.RenderVerticalMenu();
            }
            else
            {
                this.ClosePatient();
            }
        }
        #endregion

        //load the patient treatment/encounter info
        //if we are in group note, hide it...

        bool   bSkipSelectedPatientCheck = false;
        string strPage = "";
        strPage = this.GetPageName().ToLower();
        if (strPage.IndexOf("pat_portal_account.aspx") > -1)
        {
            pnlTxTree.Visible         = false;
            bSkipSelectedPatientCheck = true;
        }
        else if (strPage.IndexOf("cms_menu_edit.aspx") > -1)
        {
            pnlTxTree.Visible         = false;
            bSkipSelectedPatientCheck = true;

            if (IsPostBack)
            {
                if (this.OnMasterSAVE())
                {
                    BuildMenu();
                }
            }
        }
        else if (strPage.IndexOf("cms_page_edit.aspx") > -1)
        {
            pnlTxTree.Visible         = false;
            bSkipSelectedPatientCheck = true;
        }
        else
        {
            pnlTxTree.Visible         = true;
            patDemoInfoBar.Visible    = true;
            bSkipSelectedPatientCheck = false;
        }

        // ----------------
        if (!bSkipSelectedPatientCheck)
        {
            if (!String.IsNullOrEmpty(this.SelectedPatientID))
            {
                pnlTxTree.Visible      = true;
                pnlDemoInfoBar.Visible = true;
            }
            else
            {
                pnlTxTree.Visible      = false;
                pnlDemoInfoBar.Visible = false;
            }
        }

        if (!this.IsLoggedIn())
        {
            pnlLogoff.Visible = false;
        }
        else
        {
            pnlLogoff.Visible = true;
        }

        //get account activity details
        GetAccountDetails();

        // Build the Menu & Toolbar HTML string
        BuildMenu();

        //check if user has new messages
        btnEmailNew.Attributes.CssStyle.Add("vertical-align", "middle");
        btnEmailNew.Attributes.CssStyle.Add("margin-right", "8px");
        btnEmailNew.Attributes.CssStyle.Add("cursor", "pointer");
        btnEmailNew.Visible = this.HasNewMessage();
        btnEmailNew.Attributes.Add("onclick", "winrpt.showReport('messagescenter',['null'],{maximizable:false, width:($(window).width() - 50), height:($(window).height() - 50)});");
    }
Beispiel #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        #region notpostback
        if (!IsPostBack)
        {
            //get values from the query string for this encounter
            Master.SelectedPatientID   = Request.QueryString[0].ToString();
            Master.SelectedEncounterID = Request.QueryString[1].ToString();
            Master.SelectedTreatmentID = Convert.ToInt32(Request.QueryString[2].ToString());

            //------------------------------------------------------------------------------
            //GET INITIAL VISIT ID
            //GET PATIENT NAME FOR THE DEMOGRAPHICS BLURB
            if (Master.IsLoggedIn() && !String.IsNullOrEmpty(Master.SelectedPatientID))//must be logged in too...
            {
                if (Session["InitialVisit"] == null)
                {
                    CEncounter patInitVisit = new CEncounter();
                    CDataUtils dUtils       = new CDataUtils();
                    DataSet    dsInitVisit  = patInitVisit.GetInitialVisitDS(Master, Master.SelectedPatientID, Master.SelectedTreatmentID);
                    Session["InitialVisit"] = dUtils.GetStringValueFromDS(dsInitVisit, "encounter_id");
                }

                if (Session["PATIENTNAME"] == null)
                {
                    CPatient cpat = new CPatient();
                    Session["PATIENTNAME"] = cpat.GetPatientName(Master);
                }

                //GET SELECTED PATIENT'S DEMOGRAPHICS
                CPatient   pat   = new CPatient();
                CDataUtils utils = new CDataUtils();
                DataSet    clientDemographics = new DataSet();

                Session["PAT_DEMOGRAPHICS_DS"] = pat.GetPatientDemographicsDS(Master);
                clientDemographics             = (DataSet)Session["PAT_DEMOGRAPHICS_DS"];

                foreach (DataTable patTable in clientDemographics.Tables)
                {
                    foreach (DataRow patRow in patTable.Rows)
                    {
                        Master.APPMaster.PatientHasOpenCase = false;
                        if (!patRow.IsNull("OPENCASE_COUNT"))
                        {
                            if (Convert.ToInt32(patRow["OPENCASE_COUNT"]) > 0)
                            {
                                Master.APPMaster.PatientHasOpenCase = true;
                            }
                        }
                    }
                }
            }

            CEncounter enc = new CEncounter();

            //Reset all Sessions valriables related to the Encounter
            Session["ENCOUNTERDS"]        = null;
            Session["ENCOUNTERS_LIST_DS"] = null;
            Session["INTAKESCOREDS"]      = null;
            Session["INTAKE_SCORES_DS"]   = null;

            //------------------
            Session["PROBLEMS_LIST_DS"] = null;
        }
        #endregion

        ucPatSOAPP.BaseMstr = Master;

        if (!IsPostBack)
        {
            //todo: a readonly mode if already signed, waiting on jeff
            //init the soap with the values passed in

            ucPatSOAPP.Initialize(Master.SelectedPatientID,
                                  Master.SelectedTreatmentID,
                                  Master.SelectedEncounterID,
                                  "",
                                  "",
                                  "",
                                  "");
        }
    }
Beispiel #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //doesn't cache the page so users cannot back into sensitive information after logging off
        //Response.AddHeader("X-UA-Compatible", "IE=9");
        //Response.Cache.SetAllowResponseInBrowserHistory(false);
        //Response.Cache.SetCacheability(HttpCacheability.NoCache);
        //Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
        //Response.Cache.SetNoStore();
        //Response.AddHeader("Pragma", "no-cache");

        //loads version
        lblVersion.Text = ConfigurationManager.AppSettings["Version"];

        //set session time remaining
        strMilisecondsSessionExpire = SessionTimeRemaining();
        strSessionTimeout           = SessionTimeRemaining();

        // register Ext.NET library icons
        ResourceManager1.RegisterIcon(Icon.Information);

        if (!IsPostBack)
        {
            //get site
            if (Session["SiteID"] == null)
            {
                CSystemSettings SysSettings = new CSystemSettings();
                DataSet         dsSite      = SysSettings.GetSiteDS(this);
                string          strSiteID   = utils.GetStringValueFromDS(dsSite, "SITE_ID");
                Session["SiteID"] = strSiteID;
            }
        }


        //------------------------------------------------------------------------------
        // IS POSTBACK
        //------------------------------------------------------------------------------
        #region isPostBack
        if (IsPostBack)
        {
            //get the postback control
            string strPostBackControl = Request.Params["__EVENTTARGET"];
            if (strPostBackControl != null)
            {
            }
        }
        #endregion

        #region ShowUsernameAndPatientDemographics
        if (this.IsLoggedIn())
        {
            //Name Of User Currently logged on.
            string strLoginDateTime = String.Empty;
            if (Session["LOGINDATETIME"] == null)
            {
                strLoginDateTime        += DateTime.Now.ToShortDateString();
                strLoginDateTime        += " ";
                strLoginDateTime        += DateTime.Now.ToShortTimeString();
                Session["LOGINDATETIME"] = strLoginDateTime;
            }

            string strUserLoggedOn = String.Empty;
            if (Session["USERLOGGEDON"] == null)
            {
                strUserLoggedOn += "<img alt=\"Account Activity\" src=\"Images/information.png\" style=\"cursor: pointer; vertical-align: middle; margin-right: 3px;\" onclick=\"showAccDetails();\" />";
                strUserLoggedOn += UserLoggedOn();
                strUserLoggedOn += " - ";
                strUserLoggedOn += Session["LOGINDATETIME"].ToString();

                lblUserLoggedOn.Text    = strUserLoggedOn;
                Session["USERLOGGEDON"] = strUserLoggedOn;
            }
            else
            {
                lblUserLoggedOn.Text = Session["USERLOGGEDON"].ToString();
            }

            //draw the patient info bar at the top
            //patDemoInfoBar.InnerHtml = "";
        }
        #endregion

        string strPage = this.GetPageName().ToLower();

        if (!this.IsLoggedIn())
        {
            pnlLogoff.Visible = false;
        }
        else
        {
            pnlLogoff.Visible = true;
        }

        //get account activity details
        GetAccountDetails();

        // Build the Menu & Toolbar HTML string
        BuildMenu();

        //check if user has new messages
        btnEmailNew.Attributes.CssStyle.Add("vertical-align", "middle");
        btnEmailNew.Attributes.CssStyle.Add("margin-right", "8px");
        btnEmailNew.Visible = this.HasNewMessage();
    }
Beispiel #13
0
    protected void GetPatientDetails()
    {
        trEditInfo.Visible = true;
        trReadInfo.Visible = false;

        Session["PATIENT_DOB"]    = null;
        Session["PATIENT_AGE"]    = null;
        Session["PATIENT_GENDER"] = null;
        Session["PATIENT_WEIGHT"] = null;
        Session["PATIENT_HEIGHT"] = null;

        CDataUtils utils   = new CDataUtils();
        CPatient   patient = new CPatient();
        CEncounter enc     = new CEncounter();

        DataSet dsPat = patient.GetPatientDemographicsDS(Master);

        if (dsPat != null)
        {
            Master.PatientDOB    = Convert.ToDateTime(utils.GetDateValueAsStringFromDS(dsPat, "DOB"));
            Master.PatientAge    = utils.GetLongValueFromDS(dsPat, "PATIENT_AGE");
            Master.PatientGender = utils.GetStringValueFromDS(dsPat, "GENDER");
        }

        DataSet dsEnc = enc.GetPatientDetailsDS(Master, Master.SelectedEncounterID);

        if (dsEnc != null)
        {
            long lPatHeight = utils.GetLongValueFromDS(dsEnc, "PATIENT_HEIGHT");
            if (lPatHeight > 0)
            {
                int iFeet   = (int)lPatHeight / 12;
                int iInches = (int)lPatHeight % 12;

                lblPatHeight.Text      = iFeet.ToString() + "' - " + iInches.ToString() + "\"";
                htxtHeightFeet.Value   = iFeet.ToString();
                htxtHeightInches.Value = iInches.ToString();

                Master.PatientHeight = lPatHeight;

                foreach (ListItem li in cboFeet.Items)
                {
                    if (li.Value == iFeet.ToString())
                    {
                        li.Selected = true;
                    }
                }

                foreach (ListItem li in cboInches.Items)
                {
                    if (li.Value == iInches.ToString())
                    {
                        li.Selected = true;
                    }
                }
            }
            else
            {
                lblPatHeight.Text      = String.Empty;
                htxtHeightFeet.Value   = String.Empty;
                htxtHeightInches.Value = String.Empty;

                cboFeet.SelectedIndex   = 0;
                cboInches.SelectedIndex = 0;

                Master.PatientHeight = 0;
            }

            long lPatWeight = utils.GetLongValueFromDS(dsEnc, "PATIENT_WEIGHT");
            if (lPatWeight > 0)
            {
                txtWeight.Text = lPatWeight.ToString();

                lblPatWeight.Text      = lPatWeight.ToString() + " pounds";
                htxtWeightPounds.Value = lPatWeight.ToString();

                Master.PatientWeight = lPatWeight;
            }
            else
            {
                txtWeight.Text = String.Empty;

                lblPatWeight.Text      = String.Empty;
                htxtWeightPounds.Value = String.Empty;

                Master.PatientWeight = 0;
            }

            if (lPatHeight > 0 && lPatWeight > 0)
            {
                trEditInfo.Visible = false;
                trReadInfo.Visible = true;
                HasWeightHeight    = true;
            }
            else
            {
                trEditInfo.Visible = true;
                trReadInfo.Visible = false;
                HasWeightHeight    = false;
            }
        }
    }