/// <summary>
    /// disable soap note
    /// </summary>
    protected void DisableSOAPNote()
    {
        dsEnc = (DataSet)Session["ENCOUNTERDS"];

        CDataUtils utils = new CDataUtils();

        long lCaseClosed      = utils.GetLongValueFromDS(dsEnc, "CASE_CLOSED");
        long lEncounterClosed = utils.GetLongValueFromDS(dsEnc, "CLOSED");

        bNoteLocked = (lEncounterClosed == 1);

        //set label of "Lock Note" button
        btnLockNote.Text = bNoteLocked ? "Unlock Note" : "Lock Note";

        //TIU SUPPORT
        if (m_BaseMstr.APPMaster.TIU)
        {
            if (bNoteLocked)
            {
                tpTIUNote.Visible = true;
            }
            else
            {
                tpTIUNote.Visible = false;
            }
        }

        if (lCaseClosed == 1 || lEncounterClosed == 1)
        {
            txtVisitDate.ReadOnly   = true;
            txtSessionTime.ReadOnly = true;
            txtSubjective.ReadOnly  = true;
            txtObjective.ReadOnly   = true;
            txtAssessment.ReadOnly  = true;

            cboSTemplates.Enabled = false;
            cboATemplates.Enabled = false;
            cboOTemplates.Enabled = false;

            ucAxes.bAllowUpdate = false;
        }
        else
        {
            ucAxes.bAllowUpdate = true;

            //enable/disable tabs by Right mode value
            CheckTabAccessModes();
        }
    }
    public void loadPatientPortalAccount()
    {
        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)
        {
            txtPassword.Enabled       = true;
            txtVerifyPassword.Enabled = true;
            txtUserId.Enabled         = true;
            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);
    }
Exemple #3
0
    //get a dataset of the open treatment
    public bool GetCurrentTreatmentID(BaseMaster BaseMstr,
                                      string strPatientID,
                                      out long lTreatmentID)
    {
        //status info
        long   lStatusCode      = -1;
        string strStatusComment = "";

        lTreatmentID = 0;

        //create a new parameter list with standard params from basemstr
        CDataParameterList plist = new CDataParameterList(BaseMstr);

        plist.AddInputParameter("pi_vPatientID", strPatientID);

        CDataSet cds = new CDataSet();
        DataSet  ds  = cds.GetOracleDataSet(BaseMstr.DBConn,
                                            "PCK_ENCOUNTER.GetCurrentTreatmentRS",
                                            plist,
                                            out lStatusCode,
                                            out strStatusComment);

        CDataUtils utils = new CDataUtils();

        if (lStatusCode == 0)
        {
            lTreatmentID = utils.GetLongValueFromDS(ds, "TREATMENT_ID");
            return(true);
        }

        return(false);
    }
Exemple #4
0
    public void SetBaseMstrPatientStep()
    {
        CDataUtils utils             = new CDataUtils();
        long       lStep             = -1,
                   lNotificationStep = -1;
        DataSet ds                   = this.GetPatientStepDS();

        lStep             = utils.GetLongValueFromDS(ds, "STEP");
        lNotificationStep = utils.GetLongValueFromDS(ds, "notification_step");

        if (lStep > -1)
        {
            m_BaseMstr.PatientTxStep = lStep;
        }

        if (lNotificationStep > -1)
        {
            m_BaseMstr.NotificationTxStep = lNotificationStep;
        }
    }
    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();
        }
    }
    //runs when user presses the master save button in the app
    protected void MasterSave()
    {
        if (BaseMstr.IsPatientLocked)
        {
            string strBMComment = "<img alt=\"\" src=\"Images/lock16x16.png\" /> <b>Read-Only Access</b>: ";
            strBMComment          += "The patient's record is in use by " + Session["PAT_LOCK_PROVIDER"].ToString() + ".";
            BaseMstr.StatusCode    = 1;
            BaseMstr.StatusComment = strBMComment;
            ShowSysFeedback();
            return;
        }

        DataSet ds = (DataSet)Session["ENCOUNTERDS"];

        CDataUtils utils = new CDataUtils();

        long lCaseClosed      = utils.GetLongValueFromDS(ds, "CASE_CLOSED");
        long lEncounterClosed = utils.GetLongValueFromDS(ds, "CLOSED");

        bNoteLocked = (lEncounterClosed == 1);

        CSoapp soapp = new CSoapp();

        if (tabContSOAP.ActiveTab == btnSubjective)//subjective
        {
            if (lROSubjective > (long)RightMode.ReadOnly)
            {
                UpdateSubjectiveNote();
            }

            if (lROSubjective == (long)RightMode.ReadOnly)
            {
                BaseMstr.StatusCode    = 1;
                BaseMstr.StatusComment = "<img alt=\"\" src=\"Images/lock16x16.png\" /> You have <b>Read-Only Access</b> to this section.";
            }
        }

        if (tabContSOAP.ActiveTab == btnObjective)//objective
        {
            if (lROObjective > (long)RightMode.ReadOnly)
            {
                UpdateObjectiveNote();
            }

            if (lROObjective == (long)RightMode.ReadOnly)
            {
                BaseMstr.StatusCode    = 1;
                BaseMstr.StatusComment = "<img alt=\"\" src=\"Images/lock16x16.png\" /> You have <b>Read-Only Access</b> to this section.";
            }
        }

        if (tabContSOAP.ActiveTab == btnAssessment)//assessment
        {
            if (lROAssessment > (long)RightMode.ReadOnly)
            {
                long lDLC = 0;
                UpdateAssessmentNote();
            }

            if (lROAssessment == (long)RightMode.ReadOnly)
            {
                BaseMstr.StatusCode    = 1;
                BaseMstr.StatusComment = "<img alt=\"\" src=\"Images/lock16x16.png\" /> You have <b>Read-Only Access</b> to this section.";
            }
        }

        //TIU SUPPORT
        //they saved the note so update the text that
        //will go to tiu
        if (BaseMstr.APPMaster.TIU)
        {
            GetTIUNote();
        }

        // save session time
        soapp.updtSessionTime(BaseMstr,
                              BaseMstr.SelectedEncounterID,
                              BaseMstr.SelectedTreatmentID,
                              "N/A",
                              txtSessionTime.Text);

        //soapp.updtTreatmentPlan(BaseMstr,
        //                        BaseMstr.SelectedPatientID,
        //                        BaseMstr.SelectedEncounterID,
        //                        BaseMstr.SelectedTreatmentID);

        //get the data for this encounter
        Session["ENCOUNTERDS"] = enc.GetEncounterDS(BaseMstr,
                                                    BaseMstr.SelectedPatientID,
                                                    BaseMstr.SelectedTreatmentID,
                                                    BaseMstr.SelectedEncounterID);

        DisableSOAPNote();

        ShowSysFeedback();
    }
Exemple #7
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;
            }
        }
    }