Exemple #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();
    }
    protected void GetRightsTemplate()
    {
        CDataUtils utils    = new CDataUtils();
        CUserAdmin usradmin = new CUserAdmin();
        DataSet    ds       = usradmin.GetRightsTemplateDS(BaseMstr);

        htxtRightsTemplate.Value = utils.GetJSONString(ds);
    }
Exemple #3
0
    protected void RenderMenuTree()
    {
        CContentManagement cms = new CContentManagement(BaseMstr);

        cms.RenderTreePanel(divMenuTree);

        DataSet dsMenus = cms.GetALLMenuItems();

        htxtMenuData.Value = utils.GetJSONString(dsMenus);
    }
Exemple #4
0
    public string GetDevicePatient()
    {
        string     str   = String.Empty;
        CDataUtils utils = new CDataUtils();
        DataSet    ds    = this.GetDevicePatientDS();

        if (ds != null)
        {
            str = utils.GetJSONString(ds);
        }
        return(str);
    }
    protected void LoadPatientsData()
    {
        //load users list
        CPatient patadmin   = new CPatient();
        DataSet  dsPatients = patadmin.GetPatientPortalListDS(BaseMstr);

        storePatAccount.DataSource = m_utils.GetDataTable(dsPatients);
        storePatAccount.DataBind();

        //generates user data JSON string
        ProcessPatientData(dsPatients);
        htxtPatientData.Value = utils.GetJSONString(dsPatients);
    }
    protected void LoadUsersData()
    {
        //load users list
        CUserAdmin usradmin = new CUserAdmin();
        DataSet    dsUsers  = usradmin.GetSUATUserListDS(BaseMstr);

        repUsersList.DataSource = dsUsers;
        repUsersList.DataBind();

        //generates user data JSON string
        ProcessUserData(dsUsers);
        htxtUserData.Value = utils.GetJSONString(dsUsers);
    }
    public bool LoadReferralClinic()
    {
        DataSet dsReferralClinics = rfc.GetReferralClinicLookupDS(BaseMstr);

        if (dsReferralClinics != null)
        {
            //Create a JSON string of the Clinics Dataset and
            //hold it in a hidden field in order to re-use the data without
            //the need of further call to the DB server.
            htxtClinicData.Value = utils.GetJSONString(dsReferralClinics);

            repReferralClinic.DataSource = dsReferralClinics;
            repReferralClinic.DataBind();
            return(true);
        }
        return(false);
    }
Exemple #8
0
    protected void GetPrevResponses()
    {
        CDataUtils utils  = new CDataUtils();
        CIntake    intake = new CIntake();

        DataSet ds = intake.GetSymptomsFUResponsesDS(Master);

        if (ds != null)
        {
            if (ds.Tables[0].Rows.Count > 0)
            {
                htxtResponses.Value = utils.GetJSONString(ds);
            }
            else
            {
                mvSymptoms.SetActiveView(vwMessage);
            }
        }
        else
        {
            mvSymptoms.SetActiveView(vwMessage);
        }
    }
Exemple #9
0
    protected void loadPatient()
    {
        CPatient   pat   = new CPatient();
        CDataUtils utils = new CDataUtils();

        if (Session["PAT_DEMOGRAPHICS_DS"] == null)
        {
            Session["PAT_DEMOGRAPHICS_DS"] = pat.GetPatientDemographicsDS(Master);
        }

        DataSet clientDemographics = (DataSet)Session["PAT_DEMOGRAPHICS_DS"];

        //create a hash with the patient's address data
        //to automatically fill out textboxes in the
        //Sponsor view if the "Same as patient" checkbox is checked
        getPatAddress(clientDemographics);

        CDropDownList   DropDownList   = new CDropDownList();
        CMilitaryRender MilitaryRender = new CMilitaryRender();
        CDemographics   Demographics   = new CDemographics();

        //load all of the user's available fields
        if (clientDemographics != null)
        {
            //2012-02-15 DS
            //create a hash of patient demo data in a hidden field
            //so it can be retrieved on specific client side event
            //without a new roundtrip to the server

            htxtPatDemo.Value = utils.GetJSONString(clientDemographics);

            //clear all preference dropdown
            cboCallPreference.SelectedValue = "0";

            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;
                        }
                    }

                    // if the column for the first name isn't null
                    // then
                    // assign the string for the column
                    if (!patRow.IsNull("FIRST_NAME"))
                    {
                        txtFirstName.Text = patRow["FIRST_NAME"].ToString();
                    }

                    // middle initial
                    txtMiddleName.Text = "";
                    if (!patRow.IsNull("MI"))
                    {
                        txtMiddleName.Text = patRow["MI"].ToString();
                    }

                    // last name
                    if (!patRow.IsNull("LAST_NAME"))
                    {
                        txtLastName.Text = patRow["LAST_NAME"].ToString();
                    }

                    string strFMPSSN_Concat         = "";
                    string strFMPSSN_Confirm_Concat = "";

                    if (!patRow.IsNull("SSN"))
                    {
                        string strSponsorSSN = patRow["SSN"].ToString();
                        strFMPSSN_Concat = strSponsorSSN.Substring(0, 3) + "-" + strSponsorSSN.Substring(3, 2) + "-" + strSponsorSSN.Substring(5);
                    }
                    txtFMPSSN.Text = strFMPSSN_Concat;

                    if (!patRow.IsNull("SSN"))
                    {
                        string strConfirmSSN = patRow["SSN"].ToString();
                        strFMPSSN_Confirm_Concat = strConfirmSSN.Substring(0, 3) + "-" + strConfirmSSN.Substring(3, 2) + "-" + strConfirmSSN.Substring(5);
                    }
                    txtFMPSSN_Confirm.Text = strFMPSSN_Confirm_Concat;

                    if (!patRow.IsNull("GENDER"))
                    {
                        if (patRow["GENDER"].ToString() == "M")
                        {
                            DropDownList.SelectValue(cboGender, "1");
                        }
                        else if (patRow["GENDER"].ToString() == "F")
                        {
                            DropDownList.SelectValue(cboGender, "2");
                        }
                    }

                    if (!patRow.IsNull("DOB"))
                    {
                        //Convert to Short Date - remove TimeStamp
                        DateTime dtBirthDate = Convert.ToDateTime(patRow["DOB"]);
                        dtBirthDate.ToShortDateString();
                        txtDateOfBirth.Text = dtBirthDate.ToString("MM/dd/yyyy");
                    }

                    if (!patRow.IsNull("PROVIDER_ID"))
                    {
                        DropDownList.SelectValue(cboProvider, Convert.ToString(patRow["PROVIDER_ID"]));
                    }

                    if (!patRow.IsNull("ADDRESS1"))
                    {
                        txtAddress1.Text = patRow["ADDRESS1"].ToString();
                    }

                    if (!patRow.IsNull("ADDRESS2"))
                    {
                        txtAddress2.Text = patRow["ADDRESS2"].ToString();
                    }

                    if (!patRow.IsNull("CITY"))
                    {
                        txtCity.Text = patRow["CITY"].ToString();
                    }

                    if (!patRow.IsNull("POSTAL_CODE"))
                    {
                        txtPostCode.Text = patRow["POSTAL_CODE"].ToString();
                    }

                    if (!patRow.IsNull("HOMEPHONE"))
                    {
                        string strHomePhone = Regex.Replace(patRow["HOMEPHONE"].ToString(), @"[\(|\)|\s|\.|\-]", String.Empty);
                        txtHomePhone.Text = Regex.Replace(strHomePhone, @"(\d{3})(\d{3})(\d{4})", "($1)$2-$3");
                    }

                    if (!patRow.IsNull("CELLPHONE"))
                    {
                        string strCellPhone = Regex.Replace(patRow["CELLPHONE"].ToString(), @"[\(|\)|\s|\.|\-]", String.Empty);
                        txtCelPhone.Text = Regex.Replace(strCellPhone, @"(\d{3})(\d{3})(\d{4})", "($1)$2-$3");
                    }

                    if (!patRow.IsNull("WORKPHONE"))
                    {
                        txtWorkPhone.Text = patRow["WORKPHONE"].ToString();
                    }

                    if (!patRow.IsNull("EMAIL"))
                    {
                        txtPatEmail.Text = patRow["EMAIL"].ToString();
                    }

                    if (!patRow.IsNull("STATE_ID"))
                    {
                        DropDownList.SelectValue(cboState, Convert.ToString(patRow["STATE_ID"]));
                    }

                    if (!patRow.IsNull("HOME_PHONE_CALL"))
                    {
                        if (Convert.ToInt32(patRow["HOME_PHONE_CALL"]) == 1)
                        {
                            cboCallPreference.SelectedValue = "1";
                        }
                    }

                    if (!patRow.IsNull("CELL_PHONE_CALL"))
                    {
                        if (Convert.ToInt32(patRow["CELL_PHONE_CALL"]) == 1)
                        {
                            cboCallPreference.SelectedValue = "2";
                        }
                    }

                    if (!patRow.IsNull("WRK_PHONE_CALL"))
                    {
                        if (Convert.ToInt32(patRow["WRK_PHONE_CALL"]) == 1)
                        {
                            cboCallPreference.SelectedValue = "4";
                        }
                    }

                    if (!patRow.IsNull("HOME_PHONE_MSG"))
                    {
                        rblHomePhoneMsg.SelectedValue = patRow["HOME_PHONE_MSG"].ToString();
                    }

                    if (!patRow.IsNull("EMAIL_MSG"))
                    {
                        rblEmailMessage.SelectedValue = patRow["EMAIL_MSG"].ToString();
                    }
                }
            }
        }

        ucPAPDevice.LoadPatientDevice();
        LoadPatEthnicityRaceSource();
    }