Esempio n. 1
0
    protected void loadEmergencyContactInput()
    {
        //demographic Emergency Contact State
        CDropDownList emergStateList        = new CDropDownList();
        CDropDownList emergRelationshipList = new CDropDownList();

        CPatient pat             = new CPatient();
        DataSet  patEmergContact = pat.GetPatientEmergencyContactDS(Master);

        //load all available fields
        if (patEmergContact != null)
        {
            foreach (DataTable patTable in patEmergContact.Tables)
            {
                foreach (DataRow patRow in patTable.Rows)
                {
                    if (!patRow.IsNull("NAME"))
                    {
                        txtEmergencyName.Text = patRow["NAME"].ToString();
                    }
                    if (!patRow.IsNull("RELATIONSHIP_ID"))
                    {
                        emergRelationshipList.SelectValue(cboEmergencyRelationship, Convert.ToString(patRow["RELATIONSHIP_ID"]));
                    }
                    if (!patRow.IsNull("ADDRESS1"))
                    {
                        txtEmergencyAddress1.Text = patRow["ADDRESS1"].ToString();
                    }
                    if (!patRow.IsNull("CITY"))
                    {
                        txtEmergencyCity.Text = patRow["CITY"].ToString();
                    }
                    if (!patRow.IsNull("POSTAL_CODE"))
                    {
                        txtEmergencyPostCode.Text = patRow["POSTAL_CODE"].ToString();
                    }
                    if (!patRow.IsNull("WORKPHONE"))
                    {
                        txtEmergencyWPhone.Text = patRow["WORKPHONE"].ToString();
                    }
                    if (!patRow.IsNull("HOMEPHONE"))
                    {
                        txtEmergencyHPhone.Text = patRow["HOMEPHONE"].ToString();
                    }
                    if (!patRow.IsNull("STATE_ID"))
                    {
                        emergStateList.SelectValue(cboEmergencyState, Convert.ToString(patRow["STATE_ID"]));
                    }
                }
            }
        }
    }
Esempio n. 2
0
    public void LoadEncounterTypeDropDownList()
    {
        DataSet ds = new DataSet();

        //Uses Modality Table
        CTreatment trmt = new CTreatment();

        ds = trmt.GetAllStatModalityTypesDS(BaseMstr);

        ddllist.RenderDataSet(BaseMstr, ds, ddlModality, "MODALITY", "STAT_MODALITY_ID", "");

        ddllist.SelectValue(ddlModality, 0); //Default Initial Phone Call
        lEncounterType = Convert.ToInt64(ddlModality.SelectedValue);
    }
Esempio n. 3
0
    public bool LoadTemplateEdit(BaseMaster BaseMstr,
                                 long lTemplateID,
                                 TextBox txtName,
                                 DropDownList cboGroup,
                                 TextBox txtTemplate)
    {
        txtName.Text           = "";
        cboGroup.SelectedIndex = -1;
        txtTemplate.Text       = "";
        if (lTemplateID < 1)
        {
            txtName.Focus();
            return(true);
        }

        CCheckBoxList lst = new CCheckBoxList();
        CDropDownList cbo = new CDropDownList();

        DataSet ds = GetTemplateDS(BaseMstr);

        foreach (DataTable table in ds.Tables)
        {
            foreach (DataRow row in table.Rows)
            {
                if (!row.IsNull("TEMPLATE_ID"))
                {
                    long lID = Convert.ToInt32(row["TEMPLATE_ID"]);
                    if (lID == lTemplateID)
                    {
                        if (!row.IsNull("TEMPLATE"))
                        {
                            txtTemplate.Text = Convert.ToString(row["TEMPLATE"]).Replace("<", "[").Replace(">", "]");
                            txtName.Text     = Convert.ToString(row["DESCRIPTION"]);
                            cbo.SelectValue(cboGroup, Convert.ToInt32(row["TYPE_ID"]));
                            return(true);
                        }
                    }
                }
            }
        }

        return(true);
    }
Esempio n. 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();
    }