/// <summary> /// TIU SUPPORT /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ddlRegion_SelectedIndexChanged(object sender, EventArgs e) { if (ddlRegion.SelectedIndex != -1) { long lRegionID = REVAMP.TIU.CDataUtils.ToLong(ddlRegion.SelectedValue); CMDWSUtils mdws = new CMDWSUtils(); mdws.LoadSitesDDL(lRegionID, -1, Master, ddlSite); } }
/// <summary> /// load note titles ddl /// </summary> /// <param name="strNoteTitleLabel"></param> /// <param name="master"></param> /// <param name="ddlNoteTitle"></param> /// <returns></returns> public bool LoadNoteTitlesDDL(string strNoteTitleLabel, BaseMaster master, DropDownList ddlNoteTitle) { ddlNoteTitle.Items.Clear(); REVAMP.TIU.CStatus status = new REVAMP.TIU.CStatus(); //get data object and connection info string strConnectionString = String.Empty; REVAMP.TIU.CData data = null; bool bAudit = false; CMDWSUtils mdwsUtils = new CMDWSUtils(); mdwsUtils.GetDataInfo(master, master.Session, out data, out strConnectionString, out bAudit); //check connection login if we are not connected long lMDWSUserID = 0; status = mdwsUtils.MDWSLogin(data, master, strConnectionString, bAudit, out lMDWSUserID); if (!status.Status) { return(false); } REVAMP.TIU.CNoteTitleData ntd = new REVAMP.TIU.CNoteTitleData(data); DataSet dsNoteTitles = null; status = ntd.GetNoteTitleDS(strConnectionString, bAudit, master.FXUserID, master.Session, out dsNoteTitles); status = REVAMP.TIU.CDropDownList.RenderDataSet(dsNoteTitles, ddlNoteTitle, "NOTE_TITLE_LABEL", "NOTE_TITLE_LABEL"); ddlNoteTitle.SelectedIndex = -1; REVAMP.TIU.CDropDownList.SelectItemByValue(ddlNoteTitle, strNoteTitleLabel); return(true); }
/// <summary> /// load clinics DDL /// </summary> /// <returns></returns> public bool LoadClinicsDDL(long lNoteClinicID, BaseMaster master, DropDownList ddlClinic) { ddlClinic.Items.Clear(); REVAMP.TIU.CStatus status = new REVAMP.TIU.CStatus(); //get data object and connection info string strConnectionString = String.Empty; REVAMP.TIU.CData data = null; bool bAudit = false; CMDWSUtils mdwsUtils = new CMDWSUtils(); mdwsUtils.GetDataInfo(master, master.Session, out data, out strConnectionString, out bAudit); //check connection login if we are not connected long lMDWSUserID = 0; status = MDWSLogin(data, master, strConnectionString, bAudit, out lMDWSUserID); if (!status.Status) { return(false); } REVAMP.TIU.CClinicData ntd = new REVAMP.TIU.CClinicData(data); DataSet dsClinics = null; status = ntd.GetClinicDS(strConnectionString, bAudit, master.FXUserID, master.Session, out dsClinics); status = REVAMP.TIU.CDropDownList.RenderDataSet(dsClinics, ddlClinic, "CLINIC_LABEL", "CLINIC_ID"); ddlClinic.SelectedIndex = -1; REVAMP.TIU.CDropDownList.SelectItemByValue(ddlClinic, lNoteClinicID); return(true); }
/// <summary> /// TIU SUPPORT - transfer MDWS patients /// </summary> /// <param name="strSearch"></param> /// <returns></returns> protected bool MDWSPatientTransfer(long lMatchType, string strSearch) { REVAMP.TIU.CStatus status = new REVAMP.TIU.CStatus(); //get data object and connection info string strConnectionString = String.Empty; REVAMP.TIU.CData data = null; bool bAudit = false; CMDWSUtils mdwsUtils = new CMDWSUtils(); mdwsUtils.GetDataInfo(BaseMstr, Session, out data, out strConnectionString, out bAudit); //check connection login if we are not connected long lMDWSUserID = 0; status = mdwsUtils.MDWSLogin(data, BaseMstr, strConnectionString, bAudit, out lMDWSUserID); if (!status.Status) { return(false); } //transfer the patient(s) long lPatCount = 0; REVAMP.TIU.CMDWSOps mdws = new REVAMP.TIU.CMDWSOps(data); status = mdws.GetMDWSMatchPatients(strConnectionString, bAudit, BaseMstr.FXUserID, BaseMstr.Key, BaseMstr.Session, lMatchType, strSearch, out lPatCount); if (!status.Status) { return(false); } return(true); }
/// <summary> /// load sites ddl /// </summary> /// <param name="lRegionID"></param> /// <param name="lSiteID"></param> /// <param name="master"></param> /// <param name="ddlSite"></param> /// <returns></returns> public bool LoadSitesDDL(long lRegionID, long lSiteID, BaseMaster master, DropDownList ddlSite) { ddlSite.Items.Clear(); DataSet dsSite = null; //status REVAMP.TIU.CStatus status = new REVAMP.TIU.CStatus(); //get data object and connection info string strConnectionString = String.Empty; REVAMP.TIU.CData data = null; bool bAudit = false; CMDWSUtils mdwsUtils = new CMDWSUtils(); mdwsUtils.GetDataInfo(master, master.Session, out data, out strConnectionString, out bAudit); REVAMP.TIU.CSiteData siteData = new REVAMP.TIU.CSiteData(data); //get all sites for this region siteData.GetSiteDS(strConnectionString, bAudit, master.FXUserID, lRegionID, out dsSite); REVAMP.TIU.CDropDownList.RenderDataSet(dsSite, ddlSite, "SITE_NAME", "SITE_ID"); ddlSite.SelectedIndex = -1; REVAMP.TIU.CDropDownList.SelectItemByValue(ddlSite, lSiteID); return(true); }
/// <summary> /// update mdws defaults /// </summary> /// <param name="lClinicID"></param> /// <param name="strNoteTitleLabel"></param> /// <param name="master"></param> /// <returns></returns> public bool UpdateMDWSDefaults(long lClinicID, string strNoteTitleLabel, BaseMaster master) { //status REVAMP.TIU.CStatus status = new REVAMP.TIU.CStatus(); //get data object and connection info string strConnectionString = String.Empty; REVAMP.TIU.CData data = null; bool bAudit = false; CMDWSUtils mdwsUtils = new CMDWSUtils(); mdwsUtils.GetDataInfo(master, master.Session, out data, out strConnectionString, out bAudit); //user data REVAMP.TIU.CUserData userData = new REVAMP.TIU.CUserData(data); //update the account status = userData.UpdateMDWSAccount(strConnectionString, bAudit, master.FXUserID, strNoteTitleLabel, lClinicID); if (!status.Status) { //error so update status master.StatusCode = 1; master.StatusComment = "An error occured while saving MDWS TIU Note defaults, Please contact your System Administrator!"; return(false); } master.StatusCode = 0; master.StatusComment = ""; return(status.Status); }
/// <summary> /// get mdws account info /// </summary> /// <param name="lFXUserID"></param> /// <param name="strMDWSUserName"></param> /// <param name="strMDWSPWD"></param> /// <param name="lRegionID"></param> /// <param name="lSiteID"></param> /// <param name="strNoteTitleLabel"></param> /// <param name="lNoteClinicID"></param> /// <param name="master"></param> /// <returns></returns> public bool GetMDWSAccountInfo(long lFXUserID, out string strMDWSUserName, out string strMDWSPWD, out long lRegionID, out long lSiteID, out string strNoteTitleLabel, out long lNoteClinicID, BaseMaster master) { strMDWSUserName = String.Empty; strMDWSPWD = String.Empty; lRegionID = 0; lSiteID = 0; strNoteTitleLabel = String.Empty; lNoteClinicID = 0; //status REVAMP.TIU.CStatus status = new REVAMP.TIU.CStatus(); //get data object and connection info string strConnectionString = String.Empty; REVAMP.TIU.CData data = null; bool bAudit = false; CMDWSUtils mdwsUtils = new CMDWSUtils(); mdwsUtils.GetDataInfo(master, master.Session, out data, out strConnectionString, out bAudit); //user data REVAMP.TIU.CUserData userData = new REVAMP.TIU.CUserData(data); //update the account DataSet ds = null; status = userData.GetMDWSAccountDS(strConnectionString, bAudit, master.FXUserID, lFXUserID, master.Key, out ds); if (!status.Status) { //error so update status master.StatusCode = 1; master.StatusComment = status.StatusComment; } else { strMDWSUserName = REVAMP.TIU.CDataUtils.GetDSStringValue(ds, "MDWS_USER_NAME"); strMDWSPWD = REVAMP.TIU.CDataUtils.GetDSStringValue(ds, "MDWS_PWD"); lRegionID = REVAMP.TIU.CDataUtils.GetDSLongValue(ds, "MDWS_REGION_ID"); lSiteID = REVAMP.TIU.CDataUtils.GetDSLongValue(ds, "MDWS_SITE_ID"); strNoteTitleLabel = REVAMP.TIU.CDataUtils.GetDSStringValue(ds, "MDWS_NOTE_TITLE_LABEL"); lNoteClinicID = REVAMP.TIU.CDataUtils.GetDSLongValue(ds, "MDWS_NOTE_CLINIC_ID"); } return(status.Status); }
/// <summary> /// update the mdws account /// </summary> /// <param name="lRegionID"></param> /// <param name="lSiteID"></param> /// <param name="strUserName"></param> /// <param name="strPWD"></param> /// <param name="master"></param> /// <returns></returns> public bool UpdateMDWSAccount(long lRegionID, long lSiteID, string strUserName, string strPWD, BaseMaster master) { //status REVAMP.TIU.CStatus status = new REVAMP.TIU.CStatus(); //get data object and connection info string strConnectionString = String.Empty; REVAMP.TIU.CData data = null; bool bAudit = false; CMDWSUtils mdwsUtils = new CMDWSUtils(); mdwsUtils.GetDataInfo(master, master.Session, out data, out strConnectionString, out bAudit); //user data REVAMP.TIU.CUserData userData = new REVAMP.TIU.CUserData(data); //try a test login to get the MDWS user id long lMDWSUserID = 0; REVAMP.TIU.CAppUser appuser = new REVAMP.TIU.CAppUser(data); status = appuser.MDWSLogin(strConnectionString, bAudit, master.FXUserID, master.Key, strUserName, strPWD, lRegionID, lSiteID, out lMDWSUserID); if (!status.Status) { master.StatusCode = 1; master.StatusComment = status.StatusComment; if (status.StatusComment.ToUpper() == "FAILED TO LOGIN!") { master.StatusComment = "Invalid MDWS Credentials, Please check your data entry!"; } return(false); } //update the account status = userData.UpdateMDWSAccount(strConnectionString, bAudit, master.FXUserID, master.FXUserID, master.Key, strUserName, strPWD, lRegionID, lSiteID, lMDWSUserID); if (!status.Status) { //error so update status master.StatusCode = 1; master.StatusComment = "An error occured while saving MDWS credentials, Please contact your System Administrator!"; return(false); } master.StatusCode = 0; master.StatusComment = ""; return(status.Status); }
/// <summary> /// TIU SUPPORT - get the tiu note /// </summary> protected void GetTIUNote() { //status REVAMP.TIU.CStatus status = new REVAMP.TIU.CStatus(); //get data object and connection info string strConnectionString = String.Empty; REVAMP.TIU.CData data = null; bool bAudit = false; CMDWSUtils mdwsUtils = new CMDWSUtils(); mdwsUtils.GetDataInfo(BaseMstr, Session, out data, out strConnectionString, out bAudit); //check connection to mdws login if we are not connected long lMDWSUserID = 0; status = mdwsUtils.MDWSLogin(data, BaseMstr, strConnectionString, bAudit, out lMDWSUserID); if (!status.Status) { return; } //get the MDWS patient id string strMDWSPatID = ""; string strProviderID = ""; status = mdwsUtils.GetPatientIDs(strConnectionString, bAudit, m_BaseMstr, data, m_BaseMstr.SelectedPatientID, out strMDWSPatID, out strProviderID); if (!status.Status || strMDWSPatID == String.Empty) { return; } //write the note to tiu string strNoteText = String.Empty; REVAMP.TIU.CMDWSOps ops = new REVAMP.TIU.CMDWSOps(data); status = ops.GetMDWSTIUNote(strConnectionString, bAudit, m_BaseMstr.FXUserID, m_BaseMstr.SelectedPatientID, m_BaseMstr.SelectedTreatmentID, m_BaseMstr.SelectedEncounterID, out strNoteText); if (status.Status) { if (strNoteText != String.Empty) { txtViewTIU.Text = strNoteText; pnlWriteNote.Visible = false; pnlViewNote.Visible = true; } else { pnlWriteNote.Visible = true; pnlViewNote.Visible = false; //preload the the tiu note from SOAP string strSubjective = txtSubjective.Text.Trim(); string strObjective = txtObjective.Text.Trim(); string strAssessment = txtAssessment.Text.Trim(); string strNote = String.Empty; strNote += strSubjective; strNote += "\r\n\r\n"; strNote += strObjective; strNote += "\r\n\r\nASSESSMENT/PLAN:\r\n\r\n"; // //get the diagnosis CDataParameterList pListDiag = new CDataParameterList(m_BaseMstr); pListDiag.AddInputParameter("pi_vPatientID", m_BaseMstr.SelectedPatientID); pListDiag.AddInputParameter("pi_nTreatmentID", m_BaseMstr.SelectedTreatmentID); pListDiag.AddInputParameter("pi_vEncounterID", m_BaseMstr.SelectedEncounterID); long lStatusCode = 0; string strStatusComment = String.Empty; DataSet dsDiag = null; CDataSet cds = new CDataSet(); dsDiag = cds.GetOracleDataSet(m_BaseMstr.DBConn, "PCK_REVAMP_TIU.GetEncTIUNoteDiagRS", pListDiag, out lStatusCode, out strStatusComment); string strDiagnosis = ""; if (!REVAMP.TIU.CDataUtils.IsEmpty(dsDiag)) { foreach (DataTable table in dsDiag.Tables) { foreach (DataRow row in table.Rows) { string strDiagCode = ""; string strDiagnosticText = ""; strDiagCode = REVAMP.TIU.CDataUtils.GetDSStringValue(row, "DIAG_CODE"); strDiagnosticText = REVAMP.TIU.CDataUtils.GetDSStringValue(row, "DIAGNOSTIC_TEXT"); strDiagnosis += strDiagCode + " " + strDiagnosticText; strDiagnosis += "\r\n"; } } } //add the diagnosis to the text strNote += "DIAGNOSIS:\r\n\r\n"; strNote += strDiagnosis; strNote += "\r\n"; //add the assessment plan to the text strNote += strAssessment; //set the contents of the text txtTIUNote.Text = strNote; } } else { pnlWriteNote.Visible = true; pnlViewNote.Visible = false; } }
/// <summary> /// TIU SUPPORT - write a tiu note /// </summary> public void WriteTIU() { if (ddlClinic.SelectedIndex <= 0 || ddlNoteTitle.SelectedIndex <= 0) { BaseMstr.StatusCode = 1; BaseMstr.StatusComment = "Please select a valid note title and clinic!"; ShowSysFeedback(); return; } //status REVAMP.TIU.CStatus status = new REVAMP.TIU.CStatus(); //get data object and connection info string strConnectionString = String.Empty; REVAMP.TIU.CData data = null; bool bAudit = false; CMDWSUtils mdwsUtils = new CMDWSUtils(); mdwsUtils.GetDataInfo(BaseMstr, Session, out data, out strConnectionString, out bAudit); //check connection to mdws login if we are not connected long lMDWSUserID = 0; status = mdwsUtils.MDWSLogin(data, BaseMstr, strConnectionString, bAudit, out lMDWSUserID); if (!status.Status) { BaseMstr.StatusCode = 1; BaseMstr.StatusComment = "Could not login to MDWS, please check your credentials!"; ShowSysFeedback(); return; } //get the MDWS patient id string strMDWSPatID = ""; string strProviderID = ""; status = mdwsUtils.GetPatientIDs(strConnectionString, bAudit, m_BaseMstr, data, m_BaseMstr.SelectedPatientID, out strMDWSPatID, out strProviderID); if (!status.Status || strMDWSPatID == String.Empty) { BaseMstr.StatusCode = 1; BaseMstr.StatusComment = "This patient does not have a MDWS patient id! Please contact your System Administrator!"; ShowSysFeedback(); return; } //get the note title IEN long lNoteTitleIEN = 0; REVAMP.TIU.CNoteTitleData nd = new REVAMP.TIU.CNoteTitleData(data); status = nd.GetNoteTitleIEN(strConnectionString, bAudit, m_BaseMstr.FXUserID, m_BaseMstr.Session, ddlNoteTitle.SelectedValue, out lNoteTitleIEN); if (!status.Status) { BaseMstr.StatusCode = 1; BaseMstr.StatusComment = "Could not retrieve Note ID from MDWS! Please contact your System Administrator!"; ShowSysFeedback(); return; } //write the note to tiu REVAMP.TIU.CMDWSOps ops = new REVAMP.TIU.CMDWSOps(data); status = ops.WriteNote(strConnectionString, bAudit, m_BaseMstr.FXUserID, m_BaseMstr.SelectedPatientID, strMDWSPatID, m_BaseMstr.SelectedTreatmentID, m_BaseMstr.SelectedEncounterID, Convert.ToString(lMDWSUserID), txtSign.Text, ddlClinic.SelectedValue, Convert.ToString(lNoteTitleIEN), txtTIUNote.Text); if (status.Status) { //this will get the newly saved note from MDWS //and swap the panels to view mode GetTIUNote(); } else { BaseMstr.StatusCode = 1; BaseMstr.StatusComment = status.StatusComment; ShowSysFeedback(); return; } }
//page load protected void Page_Load(object sender, EventArgs e) { //TIU SUPPORT if (m_BaseMstr.APPMaster.TIU) { tpTIUNote.Visible = true; string strConfirm = ""; strConfirm += "if( confirm('"; strConfirm += "You are about to send a TIU note to CPRS. REVAMP TIU Notes on CPRS cannot be modified. If you do not want to send the TIU note at this time click Cancel."; strConfirm += "\\n\\n"; strConfirm += "Do you want to continue?"; strConfirm += "') )"; strConfirm += "{"; strConfirm += " __doPostBack('"; strConfirm += btnWriteTIU.ClientID; strConfirm += "', ''); "; //if you dont return true you lose the please wait! strConfirm += " return true;"; strConfirm += "}"; strConfirm += "else"; strConfirm += "{"; strConfirm += " return false;"; strConfirm += "}"; //add the JS to the button click btnWriteTIU.OnClientClick = strConfirm; if (!IsPostBack) { string strUserName = String.Empty; string strPWD = String.Empty; long lRegionID = 0; long lSiteID = 0; string strNoteTitleLabel = String.Empty; long lNoteClinicID = 0; bool bStatus = GetMDWSAccountInfo(m_BaseMstr.FXUserID, out strUserName, out strPWD, out lRegionID, out lSiteID, out strNoteTitleLabel, out lNoteClinicID); CMDWSUtils mdws = new CMDWSUtils(); mdws.LoadNoteTitlesDDL(strNoteTitleLabel, m_BaseMstr, ddlNoteTitle); mdws.LoadClinicsDDL(lNoteClinicID, m_BaseMstr, ddlClinic); GetTIUNote(); } } else { pnlViewNote.Visible = false; pnlWriteNote.Visible = false; tpTIUNote.Visible = false; } if (!IsPostBack && !bSecondPass) { //VERIFY STATUS OF THE PATIENT RECORD CPatientLock plock = new CPatientLock(m_BaseMstr); string strLockProviderName = String.Empty; string strLockProviderEmail = String.Empty; m_BaseMstr.IsPatientLocked = plock.IsPatientLocked(m_BaseMstr.SelectedPatientID, out strLockProviderName, out strLockProviderEmail); Session["PAT_LOCK_PROVIDER"] = strLockProviderName; Session["PAT_LOCK_EMAIL"] = strLockProviderEmail; } bool bRecLock = BaseMstr.IsPatientLocked; //check soap sections rights mode lROSubjective = usrsec.GetRightMode(BaseMstr, (long)SUATUserRight.NoteSubjectiveUR); lROObjective = usrsec.GetRightMode(BaseMstr, (long)SUATUserRight.NoteObjectiveUR); lROAssessment = usrsec.GetRightMode(BaseMstr, (long)SUATUserRight.NoteAssessmentUR); if (bRecLock) { lROSubjective = (long)RightMode.ReadOnly; lROObjective = (long)RightMode.ReadOnly; lROAssessment = (long)RightMode.ReadOnly; } //just return if no patient is loaded if (BaseMstr.SelectedPatientID.Length < 1) { return; } //wire up the main save button if (BaseMstr.OnMasterSAVE()) { MasterSave(); } DisableSOAPNote(); switch (rblAssessmentView.SelectedIndex) { case 0: vwDiagnosis.Style.Add("display", "block"); vwAssessmentNote.Style.Add("display", "none"); txtAssessment.Visible = false; break; case 1: vwDiagnosis.Style.Add("display", "none"); vwAssessmentNote.Style.Add("display", "block"); txtAssessment.Visible = true; break; } //----------------------------------------------------------------- // NOT POSTBACK #region NotPostback if (!IsPostBack) { mvwObjectiveOptions.ActiveViewIndex = 0; rblObjectiveView.SelectedIndex = 1; //Default Note rblAssessmentView.SelectedIndex = 0; vwDiagnosis.Style.Add("display", "block"); //Diagnosis View ucAxes.Load_Assessment(); ucAxes.AutoSelectProblemInit(); ucProblemList.Initialize(); } #endregion //----------------------------------------------------------------- // IS POSTBACK #region IsPostBack if (IsPostBack) { string EvtSender = String.Empty; if (Request.Params.Get("__EVENTTARGET") != null) { EvtSender = Request.Params.Get("__EVENTTARGET").ToString(); //if a selection was made on the diagnosis popups if (Regex.IsMatch(EvtSender, "axis(1)", RegexOptions.IgnoreCase)) { ucProblemList.Initialize(); } } } #endregion //TIU SUPPORT if (m_BaseMstr.APPMaster.TIU) { //get the postback control string strPostBackControl = Request.Params["__EVENTTARGET"]; if (strPostBackControl != null) { //did we do a click write tiu? if (strPostBackControl.IndexOf("btnWriteTIU") > -1) { WriteTIU(); } } } }
protected void Page_Load(object sender, EventArgs e) { Master.ClosePatient(); ucLogin.BaseMstr = Master; //TIU SUPPORT if (!IsPostBack) { if (Master.APPMaster.TIU) { CMDWSUtils mdws = new CMDWSUtils(); pnlMDWS.Visible = true; txtMDWSUserName.Text = String.Empty; txtMDWSPWD.Text = String.Empty; ddlRegion.SelectedIndex = -1; ddlSite.SelectedIndex = -1; string strUserName = String.Empty; string strPWD = String.Empty; long lRegionID = 0; long lSiteID = 0; string strNoteTitleLabel = String.Empty; long lNoteClinicID = 0; bool bStatus = mdws.GetMDWSAccountInfo(Master.FXUserID, out strUserName, out strPWD, out lRegionID, out lSiteID, out strNoteTitleLabel, out lNoteClinicID, Master); if (bStatus) { //update account info on the screen txtMDWSUserName.Text = strUserName; txtMDWSPWD.Text = strPWD; } mdws.LoadRegionsDDL(lRegionID, Master, ddlRegion); mdws.LoadSitesDDL(lRegionID, lSiteID, Master, ddlSite); //hide defaults if no account if (strUserName == null || strUserName.Trim() == String.Empty) { lblNoteTitle.Visible = false; ddlNoteTitle.Visible = false; lblClinic.Visible = false; ddlClinic.Visible = false; btnSaveTIU.Visible = false; } else { //show and load defaults lblNoteTitle.Visible = true; ddlNoteTitle.Visible = true; lblClinic.Visible = true; ddlClinic.Visible = true; btnSaveTIU.Visible = true; mdws.LoadNoteTitlesDDL(strNoteTitleLabel, Master, ddlNoteTitle); mdws.LoadClinicsDDL(lNoteClinicID, Master, ddlClinic); } } else { pnlMDWS.Visible = false; } } //TIU SUPPORT //get the postback control if (Master.APPMaster.TIU) { CMDWSUtils mdwsUtils = new CMDWSUtils(); string strPostBackControl = Request.Params["__EVENTTARGET"]; if (strPostBackControl != null) { //did we do a patient lookup? if (strPostBackControl.IndexOf("btnSaveMDWS") > -1) { long lRegionID = REVAMP.TIU.CDropDownList.GetSelectedLongID(ddlRegion); long lSiteID = REVAMP.TIU.CDropDownList.GetSelectedLongID(ddlSite); string strUserName = txtMDWSUserName.Text; string strPWD = txtMDWSPWD.Text; if (!mdwsUtils.UpdateMDWSAccount(lRegionID, lSiteID, strUserName, strPWD, Master)) { ShowSysFeedback(); } else { //load titles and clinics if they are not loaded if (ddlNoteTitle.Items.Count < 1) { lblNoteTitle.Visible = true; ddlNoteTitle.Visible = true; lblClinic.Visible = true; ddlClinic.Visible = true; btnSaveTIU.Visible = true; mdwsUtils.LoadNoteTitlesDDL("", Master, ddlNoteTitle); mdwsUtils.LoadClinicsDDL(-1, Master, ddlClinic); } } } if (strPostBackControl.IndexOf("btnSaveTIU") > -1) { long lClinicID = Convert.ToInt32(ddlClinic.SelectedValue); string strNoteTitle = ddlNoteTitle.SelectedValue; if (!mdwsUtils.UpdateMDWSDefaults(lClinicID, strNoteTitle, Master)) { ShowSysFeedback(); } } } } }