Example #1
0
    protected void loadAllCombos()
    {
        //LOAD COMBOS --------------------------------------------------------------------

        //demographic State
        CDemographics   Demographics   = new CDemographics();
        CMilitaryRender MilitaryRender = new CMilitaryRender();

        Demographics.LoadDemStateDropDownList(Master,
                                              cboState,
                                              "");

        //demographic Gender
        Demographics.LoadDemGenderDropDownList(Master,
                                               cboGender,
                                               "");

        //load emergency contact
        CDemographics emergState        = new CDemographics();
        CDemographics emergRelationship = new CDemographics();

        emergRelationship.LoadDemRelationshipDropDownList(Master,
                                                          cboEmergencyRelationship,
                                                          "");

        emergState.LoadDemStateDropDownList(Master,
                                            cboEmergencyState,
                                            "");

        //--------------------------------------------------------------------
    }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //add js onclick event listener
        //to "reset password" checkbox
        chkResetPasswd.Attributes.Add("onclick", "admin.user.resetPasswd(this);");

        if (!IsPostBack)
        {
            BaseMstr.ClosePatient();

            LoadUsersData();

            GetRightsTemplate();

            //User Types
            useradmin.LoadUserTypesRadioButtonList(BaseMstr,
                                                   rblUserType,
                                                   "");

            //User Rights
            DataSet dsUsrRights = useradmin.GetUserRightsDS(BaseMstr);
            repUserRights.DataSource = dsUsrRights;
            repUserRights.DataBind();

            CMilitaryRender MilitaryRender = new CMilitaryRender();

            //military duty station
            MilitaryRender.LoadMilDutyStationDropDownList(BaseMstr,
                                                          cboSite,
                                                          "");
        }

        //if the user pushed the master save button
        //then save the form
        if (BaseMstr.OnMasterSAVE())
        {
            bool bSaved = false;
            Save(out bSaved);
            if (bSaved)
            {
                divStatus.InnerHtml = "<font color=\"green\"><img alt=\"\" src=\"Images/tick.png\">&nbsp;User's data was saved!</font>";
                ScriptManager.RegisterClientScriptBlock(upUserAdmin, typeof(string), "saved", "clearStatusDiv(4);", true);
            }
        }

        CheckUsrRightsMode();
    }
Example #3
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"];

        //-- getLastUpdated
        Master.getLastUpdated(clientDemographics);

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

        pat.IncPatIntakeAssessments(Master, Master.SelectedPatientID);

        //load all of the user's available fields
        if (clientDemographics != null)
        {
            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;
                        }
                    }
                }
            }
        }
    }
Example #4
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();
    }