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, ""); //-------------------------------------------------------------------- }
protected void Page_Load(object sender, EventArgs e) { //bind 'onkeyup' event to the 'txtClinic' text box //text in this field is required to enable the save button txtClinic.Attributes.Add("onkeyup", "management.clinic.checkLength(this);"); if (!IsPostBack) { //Load State combo CDemographics rfcState = new CDemographics(); rfcState.LoadDemStateDropDownList(BaseMstr, cboState, "-1"); } CheckUsrRightsMode(); }
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; } } } } } }
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(); }
protected void loadEmergencyContactInput() { //demographic Emergency Contact State CDemographics emergState = new CDemographics(); CDemographics emergRelationship = new CDemographics(); //emergRelationship.LoadDemRelationshipDropDownList(Master, // cboEmergencyRelationship, // ""); //emergState.LoadDemStateDropDownList(Master, // cboEmergencyState, // ""); CDropDownList emergStateList = new CDropDownList(); CDropDownList emergRelationshipList = new CDropDownList(); CPatient pat = new CPatient(); DataSet patEmergContact = new 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"])); } } } } }