protected void Page_Load(object sender, EventArgs e) { string likeElementForSearchingDB = string.Empty; if (Request.QueryString.Count == 3) { likeElementForSearchingDB = Request.QueryString[2]; } PatientInfoDAL objPat_Info = new PatientInfoDAL(); objPat_Info = new PatientInfoDAL(); DataTable Doc_Names = objPat_Info.get_DoctorNames(likeElementForSearchingDB); var sb = new StringBuilder(); for (int i = 0; i < Doc_Names.Rows.Count; i++) { switch (i) { case 0: sb.AppendFormat(keyValueFormater, Doc_Names.Rows[i][2], string.Format("{1}, {0} - {2}", Doc_Names.Rows[i][1], Doc_Names.Rows[i][0], Doc_Names.Rows[i][3]), "{", "}"); break; default: sb.AppendFormat(keyValueFormaterIntermediatElement, Doc_Names.Rows[i][2], string.Format("{1}, {0} - {2}", Doc_Names.Rows[i][1], Doc_Names.Rows[i][0], Doc_Names.Rows[i][3]), "{", "}"); break; } } Response.Write(string.Format(jasonPacketFormater, sb.ToString())); }
public static string[] GetDoctorNames(string prefixText, int count, string contextKey) { PatientInfoDAL Pat_Info = new PatientInfoDAL(); List<string> Pat_List = new List<string>(); Pat_Info = new PatientInfoDAL(); Pat_List.Clear(); DataTable Pat_Names; if (contextKey == "N") Pat_Names = Pat_Info.get_NurseNames(prefixText); else Pat_Names = Pat_Info.get_DoctorNames(prefixText); if (Pat_Names.Rows.Count > 0) { foreach (DataRow dr in Pat_Names.Rows) { Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr[1].ToString() + "," + dr[0].ToString(), dr[2].ToString())); } } else { Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem("No Doctor Found..!", "0")); } return Pat_List.ToArray(); }
public static string[] GetClinicFaclityNames(string prefixText, int count, string contextKey) { PatientInfoDAL Pat_Info = new PatientInfoDAL(); List<string> Pat_List = new List<string>(); Pat_Info = new PatientInfoDAL(); Pat_List.Clear(); DataTable Pat_Names; // if(contextKey==null) Pat_Names = Pat_Info.get_ClinicFacilityNames(prefixText); //else // Pat_Names = Pat_Info.get_ClinicFacilityNames(prefixText, contextKey); if (Pat_Names.Rows.Count > 0) { foreach (DataRow dr in Pat_Names.Rows) { Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr[0].ToString(), dr[2].ToString())); } } else { Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem("No Facility Found Under This Clinic..!","0")); } return Pat_List.ToArray(); }
public static string[] GetDoctorNames(string prefixText, int count, string contextKey) { PatientInfoDAL Pat_Info = new PatientInfoDAL(); List<string> Pat_List = new List<string>(); Pat_Info = new PatientInfoDAL(); Pat_List.Clear(); DataTable Pat_Names = Pat_Info.get_PatDoctorNames(prefixText, contextKey); foreach (DataRow dr in Pat_Names.Rows) { Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr[1].ToString() + "," + dr[0].ToString(), dr[2].ToString())); } return Pat_List.ToArray(); }
public static string[] GetClinicFaclityNames(string prefixText, int count) { PatientInfoDAL Pat_Info = new PatientInfoDAL(); List<string> Pat_List = new List<string>(); Pat_Info = new PatientInfoDAL(); Pat_List.Clear(); DataTable Pat_Names = Pat_Info.get_ClinicFacilityNames(prefixText); foreach (DataRow dr in Pat_Names.Rows) { Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr[0].ToString(), dr[1].ToString())); } return Pat_List.ToArray(); }
public static string[] GetSIGNames(string prefixText, int count, string contextKey) { List<string> sig_List = new List<string>(); PatientInfoDAL pat_Info = new PatientInfoDAL(); if (contextKey == "0") { sig_List.Clear(); DataTable dtsig = pat_Info.get_SIGCodes(prefixText, count, contextKey); foreach (DataRow dr in dtsig.Rows) { sig_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr["SIG_Code"].ToString(), dr[0].ToString())); } } return sig_List.ToArray(); }
public static string[] GetPatinetNames(string prefixText, int count, string contextKey) { PatientInfoDAL Pat_Info = new PatientInfoDAL(); List<string> Pat_List = new List<string>(); Pat_Info = new PatientInfoDAL(); Pat_List.Clear(); DataTable Pat_Names = Pat_Info.get_PatientNames(prefixText, (string)HttpContext.Current.Session["Role"], contextKey); if (Pat_Names.Rows.Count > 0) { foreach (DataRow dr in Pat_Names.Rows) { Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr[1].ToString().Trim() + "," + dr[0].ToString().Trim() + " - " + dr[5].ToString().Trim(), dr[2].ToString().Trim() + "," + dr[3].ToString().Trim() + "," + dr[4].ToString().Trim())); } } else { Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem("No Patient Found...", "0")); } return Pat_List.ToArray(); }
public static string[] GetMedicationNames(string prefixText, int count) { PatientInfoDAL Pat_Info = new PatientInfoDAL(); List<string> Med_List = new List<string>(); Pat_Info = new PatientInfoDAL(); Med_List.Clear(); DataTable Med_Names = Pat_Info.get_MedicationNames(prefixText.Trim()); if (Med_Names.Rows.Count > 0) { foreach (DataRow dr in Med_Names.Rows) { Med_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr[0].ToString(), dr[1].ToString())); } } else { Med_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem("No Medication Found..","0")); } return Med_List.ToArray(); }
public static string[] GetDoctorNames(string prefixText, int count, string contextKey) { PatientInfoDAL objPat_Info = new PatientInfoDAL(); List<string> Doc_List = new List<string>(); objPat_Info = new PatientInfoDAL(); Doc_List.Clear(); DataTable Doc_Names = objPat_Info.get_AllDoctors(prefixText); if (Doc_Names.Rows.Count > 0) { foreach (DataRow dr in Doc_Names.Rows) { Doc_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr[1].ToString().Trim() + "," + dr[0].ToString().Trim(), dr[2].ToString())); } } else { Doc_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem("No Doctor Found...", "0")); } return Doc_List.ToArray(); }
public static string[] GetInsuranceNames(string prefixText, int count) { PatientInfoDAL objPat_Info = new PatientInfoDAL(); List<string> Pat_List = new List<string>(); objPat_Info = new PatientInfoDAL(); Pat_List.Clear(); DataTable Pat_Names = objPat_Info.get_InsNames(prefixText); if (Pat_Names.Rows.Count > 0) { foreach (DataRow dr in Pat_Names.Rows) { Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr[0].ToString(), dr[1].ToString())); } } else { Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem("No Insurance Found...", "0")); } return Pat_List.ToArray(); }
protected void gridApointments_RowCommand(object sender, GridViewCommandEventArgs e) { objNLog.Info("Event Started.."); try { PatientInfoDAL Pat_Info = new PatientInfoDAL(); if (e.CommandName == "Delete") { string userID = (string)Session["User"]; Pat_Info.delete_PatAppointments(userID,e.CommandArgument.ToString()); fill_AppointmentsGrid(hidDocID.Value, txtDate.Text); } } catch (Exception ex) { objNLog.Error("Error : " + ex.Message); } objNLog.Info("Event Completed.."); }
protected void Filldata() { objNLog.Info("Function Started.."); try { PatientInfoDAL Pat_Info = new PatientInfoDAL(); DataTable dtPatientDetails = new DataTable(); AutoCompleteExtender1.ContextKey = Request.QueryString["patID"].ToString(); dtPatientDetails = Pat_Info.get_Patient_Details(Request.QueryString["patID"].ToString()); if (dtPatientDetails.Rows.Count > 0) { lblPatAccount1.Text = dtPatientDetails.Rows[0]["Pat_LName"].ToString() + ", " + dtPatientDetails.Rows[0]["Pat_FName"].ToString(); int Pat_FacId = int.Parse(dtPatientDetails.Rows[0]["Facility_ID"].ToString()); txtDoc.Text = dtPatientDetails.Rows[0]["Pat_PDoc"].ToString(); hidDocID.Value = dtPatientDetails.Rows[0]["Doc_ID"].ToString(); txtFacility.Text = Pat_Info.Get_Facility(Pat_FacId)[0].ToString(); txtDate.Text = DateTime.Now.ToString("MM/dd/yyyy"); fill_AppointmentsGrid(hidDocID.Value, txtDate.Text); } } catch (Exception ex) { objNLog.Error("Error : " + ex.Message); } objNLog.Info("Function Completed.."); }
protected void btnSubmit_Click(object sender, ImageClickEventArgs e) { // Subit Click objNLog.Info("Event Started.."); try { PatientInfoDAL Pat_Info = new PatientInfoDAL(); Pat_Details.App_Note = txtNotes.Text; Pat_Details.App_Purp = txtAppPurpose.Text; Pat_Details.Fac_ID = Pat_Info.Get_FacID(txtFacility.Text); Pat_Details.Doc_ID = Pat_Info.Get_DocID(txtDoc.Text); char AppType; if (rbtnCSR.Checked == true) { AppType = 'C'; } else { AppType = 'D'; } Pat_Details.AppointmentType = AppType; Pat_Details.AppoitmentDate = txtDate.Text; Pat_Details.AppointmentTime = lbappointmentTime.SelectedItem.ToString(); Pat_Details.AppStatus = 'S'; Pat_Details.Pat_ID = (int)Session["Pat_ID"]; string userID = (string)Session["User"]; string Stat=Pat_Info.set_PatientAppointments(userID,Pat_Details); string str = "alert('" + Stat + "');"; ScriptManager.RegisterStartupScript(btnSubmit, typeof(Page), "alert", str, true); fill_AppointmentsGrid(hidDocID.Value, txtDate.Text); Response.Redirect("AllPatientProfile.aspx?patID=" + Request.QueryString["patID"].ToString()); } catch (Exception ex) { string str = "alert('Problem In Adding ...');"; ScriptManager.RegisterStartupScript(btnSubmit, typeof(Page), "alert", str, true); objNLog.Error("Error : " + ex.Message); } clearTextboxes(); objNLog.Info("Event Completed.."); }
protected void btnSaveAdjBill_Click(object sender, ImageClickEventArgs e) { objNLog.Info("Function Started..."); try { string userID = (string)Session["User"]; PatientBilling objPatBill = new PatientBilling(); PatientInfoDAL objPatInfo = new PatientInfoDAL(); objPatBill.PatID = int.Parse(hidPatID.Value); objPatBill.TransactionDate = lblTransAdjDate.Text; if (rbtnCredit.Checked == true) objPatBill.TransactionType = 'C'; else objPatBill.TransactionType = 'D'; objPatBill.TransactionFlag='A'; objPatBill.TransactionAmount = txtAdjBillAmt.Text; objPatBill.TransactionDetails = txtAdjBillDetails.Text; objPatBill.User = userID; if (chkRx30Patient.Checked) objPatBill.TransSysFlag = "P"; else objPatBill.TransSysFlag = "R"; objPatInfo.SetPatientAdjustBillingInfo(objPatBill); FillPatientBillingGrid(); ClearBillingAdjustmentPanel(); } catch (Exception ex) { objNLog.Error("Error : " + ex.Message); } objNLog.Info("Function completed..."); }
protected void imgBtnSaveBilling_Click(object sender, ImageClickEventArgs e) { objNLog.Info("Function Started..."); try { string userID = (string)Session["User"]; PatientBilling objPatBill = new PatientBilling(); PatientInfoDAL objPatInfo = new PatientInfoDAL(); objPatBill.PatID = int.Parse(hidPatID.Value); objPatBill.TransactionDate = DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss"); if(rbtnPAPFilling.Checked==true) objPatBill.TransactionType= 'P'; else objPatBill.TransactionType='S'; if(chkTimeBilling.Checked==true) objPatBill.TransactionMode='Y'; else objPatBill.TransactionMode = 'N'; objPatBill.TransactionAmount=txtTransAmt.Text; objPatBill.TransactionDetails=txtTransDetails.Text; objPatBill.User = userID; if (chkRx30Patient.Checked) objPatBill.TransSysFlag = "P"; else objPatBill.TransSysFlag = "R"; objPatInfo.SetPatientBillingInfo(objPatBill); FillPatientBillingGrid(); ClearBillingPanel(); } catch (Exception ex) { objNLog.Error("Error : " + ex.Message); } objNLog.Info("Function completed..."); }
public void FillPatientBillingGrid() { objNLog.Info("Function Started..."); try { PatientInfoDAL objPatInfo = new PatientInfoDAL(); grdBilling.DataSource = objPatInfo.GetPatientBillingInfo(int.Parse(hidPatID.Value.ToString())); grdBilling.DataBind(); } catch (Exception ex) { objNLog.Error("Error : " + ex.Message); } objNLog.Info("Function completed..."); }
public static string[] GetPatientNames(string prefixText, int count, string contextKey) { PatientInfoDAL objPat_Info = new PatientInfoDAL(); List<string> Pat_List = new List<string>(); objPat_Info = new PatientInfoDAL(); Pat_List.Clear(); DataTable Pat_Names = objPat_Info.get_PatientNames(prefixText, (string)HttpContext.Current.Session["Role"], contextKey); foreach (DataRow dr in Pat_Names.Rows) { String mname = ""; if (dr[6].ToString().Trim() != mname) mname = " "+ dr[6].ToString().Trim()+"."; if((string)HttpContext.Current.Session["Role"]=="A" || (string)Session["Role"] == "T") Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr[1].ToString() + "," + dr[0].ToString() + mname + " -" + dr[5].ToString() + " - [ " + dr[7].ToString() + " ]", dr[2].ToString())); else Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr[1].ToString() + "," + dr[0].ToString() + mname + " -" + dr[5].ToString(), dr[2].ToString())); } return Pat_List.ToArray(); }
protected void Filldata(int pat_ID) { objNLog.Info("Function started with patID as argument..."); try { tabContainer.ActiveTabIndex = 0; PatientInfoDAL objPat_Info = new PatientInfoDAL(); DataTable dtPatientDetails = new DataTable(); string patFulName = txtPatientName1.Text; if (patFulName.IndexOf(",") < 0 && pat_ID == 0) { SetlblVisibility(0); string script = @"if(confirm('Patient does not exist. Do you want to add a new Patient?')) { window.location.href='PatientProfile.aspx?patname=" + txtPatientName1.Text + "';}"; ScriptManager.RegisterStartupScript(this, this.GetType(), "jsCall", script, true); } else { tabContainer.Enabled = true; if (pat_ID == 0) { lblMsg.Text = string.Empty; string[] arInfo = new string[2]; char[] splitter = { ',' }; arInfo = patFulName.Split(splitter); dtPatientDetails = objPat_Info.get_Patient_Details(arInfo[1], arInfo[0]); } else dtPatientDetails = objPat_Info.get_Patient_Details(pat_ID.ToString()); if (dtPatientDetails.Rows.Count > 0) { if (dtPatientDetails.Rows[0][1].ToString() != null) { lblPhone1.Text = FormatUSPhone(dtPatientDetails.Rows[0]["Pat_Phone"].ToString()); } else { } if (dtPatientDetails.Rows[0]["Pat_Gender"].ToString() == "M") { lblGender1.Text = "Male"; } else { lblGender1.Text = "Female"; } lblWPhone1.Text = FormatUSPhone(dtPatientDetails.Rows[0]["Pat_WorkPhone"].ToString()); lblCell1.Text = FormatUSPhone(dtPatientDetails.Rows[0]["Pat_CellPhone"].ToString()); lblDOB1.Text = ((DateTime)dtPatientDetails.Rows[0]["Pat_DOB"]).ToShortDateString(); String contRel = ""; switch (dtPatientDetails.Rows[0]["econtact_relation"].ToString().Trim()) { case "M": contRel = "Mother"; break; case "F": contRel = "Father"; break; case "B": contRel = "Brother"; break; case "S": contRel = "Sister"; break; case "P": contRel = "Spouse"; break; case "A": contRel = "GrandFather"; break; case "G": contRel = "GrandMother"; break; case "O": contRel = "Other"; break; } lbleContactName.Text = dtPatientDetails.Rows[0]["econtact_fname"].ToString().Trim() + " " + dtPatientDetails.Rows[0]["econtact_lname"].ToString().Trim(); if (contRel != "") lbleContactName.Text = lbleContactName.Text.Trim() + "(" + contRel + ")"; if (dtPatientDetails.Rows[0]["econtact_phone"].ToString().Trim() != "") lbleContactName.Text = lbleContactName.Text.Trim() + " <B>Phone: </B>" + FormatUSPhone(dtPatientDetails.Rows[0]["econtact_phone"].ToString().Trim()); if (dtPatientDetails.Rows[0]["Pat_Primary_Ins_ID"].ToString() != "") lblPrimIns1.Text = dtPatientDetails.Rows[0]["Ins_Name"].ToString(); else lblPrimIns1.Text = "N/A"; lblSSN1.Text = FormatUSSSN(dtPatientDetails.Rows[0]["Pat_SSN"].ToString()); if (dtPatientDetails.Rows[0]["Balance"] != DBNull.Value) { lblBalance1.Text = dtPatientDetails.Rows[0]["Balance"].ToString(); } string address = ""; if (dtPatientDetails.Rows[0]["Pat_Address1"].ToString().Trim() != "") { address = address + dtPatientDetails.Rows[0]["Pat_Address1"].ToString().Trim() + ", "; } if (dtPatientDetails.Rows[0]["Pat_Address2"].ToString().Trim() != "") { address = address + dtPatientDetails.Rows[0]["Pat_Address2"].ToString().Trim() + ", "; } if (dtPatientDetails.Rows[0]["Pat_City"].ToString().Trim() != "") { address = address + dtPatientDetails.Rows[0]["Pat_City"].ToString().Trim() + ","; } string Saddress = ""; if (dtPatientDetails.Rows[0]["Pat_Ship_Address1"].ToString().Trim() != "") { Saddress = Saddress + dtPatientDetails.Rows[0]["Pat_Ship_Address1"].ToString().Trim() + ", "; } if (dtPatientDetails.Rows[0]["Pat_Ship_Address2"].ToString().Trim() != "") { Saddress = Saddress + dtPatientDetails.Rows[0]["Pat_Ship_Address2"].ToString().Trim() + ", "; } if (dtPatientDetails.Rows[0]["Pat_Ship_City"].ToString().Trim() != "") { Saddress = Saddress + dtPatientDetails.Rows[0]["Pat_Ship_City"].ToString().Trim() + ","; } lblAddress12.Text = address + dtPatientDetails.Rows[0]["Pat_State"].ToString() + " " + dtPatientDetails.Rows[0]["Pat_Zip"].ToString(); lblSAddress12.Text = Saddress + dtPatientDetails.Rows[0]["Pat_Ship_State"].ToString() + " " + dtPatientDetails.Rows[0]["Pat_Ship_Zip"].ToString(); lblPatientContact1.Text = dtPatientDetails.Rows[0]["Pat_Address1"].ToString() + "," + dtPatientDetails.Rows[0]["Pat_Address2"].ToString() + ", " + dtPatientDetails.Rows[0]["Pat_City"].ToString() + ", " + dtPatientDetails.Rows[0]["Pat_State"].ToString() + " " + dtPatientDetails.Rows[0]["Pat_Zip"].ToString() + ", " + FormatUSPhone(dtPatientDetails.Rows[0]["Pat_Phone"].ToString()); lblPatAccountName.Text = txtPatientName1.Text; patID = (int)(dtPatientDetails.Rows[0]["Pat_ID"]); Session["Pat_ID"] = patID; patFacID = int.Parse(dtPatientDetails.Rows[0]["Facility_ID"].ToString()); txtCallLogDoctor.Text = dtPatientDetails.Rows[0]["Pat_PDoc"].ToString(); lblDoctor1.Text = dtPatientDetails.Rows[0]["Pat_PDoc"].ToString(); lblCliniFacility1.Text = objPat_Info.Get_Facility(patFacID)[0].ToString(); string[] Diagn = new string[3]; char[] split = { ',' }; string Data = dtPatientDetails.Rows[0][18].ToString(); lbldcode1.Text = Data; Diagn = Data.Split(','); if (dtPatientDetails.Rows[0][19].ToString() == "Y") lblAutofill1.Text = "Yes"; else lblAutofill1.Text = "No"; hidPatID.Value = dtPatientDetails.Rows[0]["Pat_ID"].ToString(); AutoCompleteExtender3.ContextKey = dtPatientDetails.Rows[0]["Pat_ID"].ToString(); ACE_CLOG_Doctor.ContextKey = dtPatientDetails.Rows[0]["Pat_ID"].ToString(); if (Session["Role"].ToString() == "D") btnEdit.Visible = false; else { btnEdit.Visible = true; btnAppointments.Visible = true; } if (dtPatientDetails.Rows[0]["HIPPA"].ToString() == "Y") { lblHippa1.Text = "Yes ( " + dtPatientDetails.Rows[0]["HIPPADate"].ToString() + " )"; } else lblHippa1.Text = "No"; //Hipaa End PatientLastprescription(dtPatientDetails.Rows[0]["Pat_ID"].ToString()); PatientLastVisit(dtPatientDetails.Rows[0]["Pat_ID"].ToString()); String mname = ""; if (dtPatientDetails.Rows[0]["Pat_MName"].ToString().Trim() != mname) mname = " " + dtPatientDetails.Rows[0]["Pat_MName"].ToString().Trim() + "."; txtPatientName1.Text = dtPatientDetails.Rows[0]["Pat_LName"].ToString() + "," + dtPatientDetails.Rows[0]["Pat_FName"].ToString(); //Added Patient Appointments - START. DataSet dsAppts = objPat_Info.Get_Appt(patID.ToString()); if (dsAppts != null && dsAppts.Tables.Count > 0) { if (dsAppts.Tables[0].Rows.Count > 0) { ContentPlaceHolder mpContentPlaceHolder; mpContentPlaceHolder = (ContentPlaceHolder)Master.FindControl("ContentPlaceHolder1"); if (mpContentPlaceHolder != null) { HtmlContainerControl divAppt = (HtmlContainerControl)mpContentPlaceHolder.FindControl("divAppt"); if (divAppt != null) { DataGrid grdAppts = new DataGrid(); grdAppts.AutoGenerateColumns = false; grdAppts.HeaderStyle.CssClass = "medication_info_th1"; grdAppts.ItemStyle.CssClass = "medication_info_tr-odd"; grdAppts.ItemStyle.Font.Bold = false; grdAppts.AlternatingItemStyle.Font.Bold = false; grdAppts.AlternatingItemStyle.CssClass = "medication_info_tr-even"; BoundColumn nameColumn = new BoundColumn(); nameColumn = new BoundColumn(); nameColumn.HeaderText = "Time"; nameColumn.DataField = "APPT_Time"; nameColumn.ItemStyle.Width = 100; grdAppts.Columns.Add(nameColumn); nameColumn = new BoundColumn(); nameColumn.HeaderText = "Doctor"; nameColumn.DataField = "Doctor_Name"; nameColumn.ItemStyle.Width = 100; grdAppts.Columns.Add(nameColumn); grdAppts.DataSource = dsAppts; grdAppts.DataBind(); System.IO.StringWriter sw = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); grdAppts.RenderControl(htw); StringBuilder sb = new StringBuilder(); sb.Append("<a onmouseout=popUp(event,'divPatAppt') onmouseover=popUp(event,'divPatAppt') style='cursor:hand' title='Appointments'><img src='../Images/pat_appt.gif' width='32px' height='32px' alt=''/></a>"); sb.Append("<div id='divPatAppt' class='tip' style='width:auto;'>"); sb.Append(sw.ToString()); sb.Append("</div>"); divAppt.InnerHtml = sb.ToString(); } } } } ShowPatientAllergies(pat_ID); ClearAllPatientTabs(); FillgridPriscrition(); } // //Added Patient Appointments - END. else { SetlblVisibility(0); hidPatID.Value = ""; string script = @"if(confirm('Patient does not exist, Do you want to add a new Patient!')) { window.location.href='PatientProfile.aspx?patname=" + txtPatientName1.Text + "';}"; ScriptManager.RegisterStartupScript(this, this.GetType(), "jsCall", script, true); } } } catch (Exception ex) { objNLog.Error("Error : " + ex.Message); } objNLog.Info("Function completed..."); }
protected void Filldata() { objNLog.Info("Function Started.."); try { PatientInfoDAL Pat_Info = new PatientInfoDAL(); DataTable dtPatientDetails = new DataTable(); dtPatientDetails = Pat_Info.get_Patient_Details(Request.QueryString["patID"].ToString()); if (dtPatientDetails.Rows.Count > 0) { txtDoctor.Enabled = true; if (dtPatientDetails.Rows[0][1].ToString() != null) { txtPhone.Text = dtPatientDetails.Rows[0][1].ToString(); } else { txtPhone.Text = null; } if (dtPatientDetails.Rows[0][2].ToString() == "M") { rbtnMale.Checked = true; } else { rbtnFeMale.Checked = true; } txtPatientFName.Text = dtPatientDetails.Rows[0]["Pat_FName"].ToString().Trim(); txtPatientLName.Text = dtPatientDetails.Rows[0]["Pat_LName"].ToString().Trim(); txtPatientMName.Text = dtPatientDetails.Rows[0]["Pat_MName"].ToString().Trim(); txtDOB.Text = ((DateTime)dtPatientDetails.Rows[0]["Pat_DOB"]).ToShortDateString(); if (ddlPrimInsurance.Enabled == true && dtPatientDetails.Rows[0]["Pat_Primary_Ins_ID"].ToString() != "") ddlPrimInsurance.SelectedValue = dtPatientDetails.Rows[0]["Pat_Primary_Ins_ID"].ToString(); txtSSN.Text = dtPatientDetails.Rows[0]["Pat_SSN"].ToString(); //txtBalance.Text = dtPatientDetails.Rows[0][6].ToString(); txtecontactFNAME.Text = dtPatientDetails.Rows[0]["econtact_fname"].ToString(); txtecontactLNAME.Text = dtPatientDetails.Rows[0]["econtact_lname"].ToString(); txtecontactPHONE.Text = dtPatientDetails.Rows[0]["econtact_phone"].ToString(); ddlecontactREL.SelectedValue = dtPatientDetails.Rows[0]["econtact_relation"].ToString(); txtAddress1.Text = dtPatientDetails.Rows[0]["Pat_Address1"].ToString(); txtAddress2.Text = dtPatientDetails.Rows[0]["Pat_Address2"].ToString(); txtCity.Text = dtPatientDetails.Rows[0]["Pat_City"].ToString(); txtState.Text = dtPatientDetails.Rows[0]["Pat_State"].ToString(); txtZip.Text = dtPatientDetails.Rows[0]["Pat_Zip"].ToString(); txtWorkPhone.Text = dtPatientDetails.Rows[0]["Pat_WorkPhone"].ToString(); txtCellPhone.Text = dtPatientDetails.Rows[0]["Pat_CellPhone"].ToString(); hidPat_ID.Value = (dtPatientDetails.Rows[0]["Pat_ID"].ToString()); int Pat_FacId = int.Parse(dtPatientDetails.Rows[0]["Facility_ID"].ToString()); txtDoctor.Text = dtPatientDetails.Rows[0]["Pat_PDoc"].ToString().Trim(); txtClinicFacility.Text = Pat_Info.Get_Facility(Pat_FacId)[0].ToString(); txtSAddr1.Text = dtPatientDetails.Rows[0]["Pat_Ship_Address1"].ToString(); txtSAddr2.Text = dtPatientDetails.Rows[0]["Pat_Ship_Address2"].ToString(); txtSCity1.Text = dtPatientDetails.Rows[0]["Pat_Ship_City"].ToString(); txtSState.Text = dtPatientDetails.Rows[0]["Pat_Ship_State"].ToString(); txtSZIP.Text = dtPatientDetails.Rows[0]["Pat_Ship_Zip"].ToString(); string[] Diagn = new string[3]; char[] split = { ',' }; string Data = dtPatientDetails.Rows[0][18].ToString(); Diagn = Data.Split(','); txtDiagn1.Text = Diagn[0]; if (Diagn.Length > 1) txtDiagn2.Text = Diagn[1]; if (Diagn.Length > 2) txtDiagn3.Text = Diagn[2]; if (Diagn.Length > 3) txtDiagn4.Text = Diagn[3]; if (Diagn.Length > 4) txtDiagn5.Text = Diagn[4]; if (dtPatientDetails.Rows[0]["Pat_Rx_Auto_Refill_Y_N"].ToString() == "Y") chkAutoreFillOption.Checked = true; else chkAutoreFillOption.Checked = false; if (dtPatientDetails.Rows[0]["HIPPA"].ToString() == "Y") { chkHippa.Checked = true; txtHippaDate.Text = DateTime.Parse( dtPatientDetails.Rows[0]["HIPPADate"].ToString()).ToString("MM/dd/yyyy"); } else chkAutoreFillOption.Checked = false; txtMRN.Text = dtPatientDetails.Rows[0]["Pat_MRN"].ToString(); if (dtPatientDetails.Rows[0]["Pat_IsActive"] != System.DBNull.Value) { if (ddlPatStatus.Enabled == true) { if (dtPatientDetails.Rows[0]["Pat_IsActive"].ToString() == "Y") ddlPatStatus.SelectedIndex = 0; else ddlPatStatus.SelectedIndex = 1; } } } } catch (Exception ex) { objNLog.Error("Error : " + ex.Message); } objNLog.Info("Function Completed.."); }
protected void Page_Load(object sender, EventArgs e) { try { chkHippa.Attributes.Add("onclick", "document.getElementById('" + txtHippaDate.ClientID + "').disabled=!this.checked;"); if (Session["User"] == null || Session["Role"] == null) Response.Redirect("../Login.aspx"); if ((string)Session["Role"] == "A") { ddlPatStatus.Enabled = true; } else { ddlPatStatus.Enabled = false; } RenderJSArrayWithCliendIds(txtMRN, txtSSN, txtDOB, txtDoctor, txtClinicFacility, txtPatientFName, txtPatientLName, txtAllergyTo, txtAllergyDesc, txtInsName,txtInsPhone, txtPID, txtGNO, txtBNO, txtIName, txtIDOB, txtISSN, txtIRel, rbtnIActive); if (!Page.IsPostBack) { setcontextkey(); ddlPrimInsurance.Items.Insert(0, new ListItem("--Select--", "0")); ddlPrimInsurance.SelectedIndex = 0; if (Request.QueryString["patID"] != null) { PatientInfoDAL Pat_Info = new PatientInfoDAL(); ddlPrimInsurance.DataSource = Pat_Info.get_PatInsNames(Request.QueryString["patID"].ToString()); ddlPrimInsurance.DataTextField = "Ins_Name"; ddlPrimInsurance.DataValueField = "Patient_Ins_ID"; ddlPrimInsurance.DataBind(); Filldata(); btnSave.Visible = false; btnUpdate.Visible = true; btnCancel.Visible = true; } if (Request.QueryString["patname"] != null) { string[] patname = Request.QueryString["patname"].Split(','); if (patname.Length == 2) { txtPatientLName.Text = patname[0]; txtPatientFName.Text = patname[1]; } else { txtPatientLName.Text = patname[0]; } btnSave.Visible = true; btnUpdate.Visible = false; btnCancel.Visible = true; } txtPatientFName.Focus(); if (chkHippa.Checked == false) txtHippaDate.Enabled = false; } } catch (Exception ex) { objNLog.Error("Error :" + ex.Message); } }
protected void btnSave_Click(object sender, ImageClickEventArgs e) { objNLog.Info("Event Started..."); PatientInfoDAL Pat_Info = new PatientInfoDAL(); try { if (rbtnDecision.SelectedValue == "R") { UpdateRxMedRequest(hidRxReqID.Value); } else { string drugName = txtDrug.Text.Trim(); if (rbtnDecision.SelectedValue == "A") { if (chkSubDrugName.Checked == true) { if (txtSubDrugName.Text != "") { drugName = txtSubDrugName.Text; } else { lblMsg.Text = "Substitute Drug Name Can Not Be Empty..!"; lblMsg.Visible = true; mpeRxApproval.Show(); Filldata(); } } } int DrugID = Pat_Info.Get_MedID(drugName); if (DrugID > 0) // If entered drug name doesn't exist { if (txtQuantity.Text == "" || txtQuantity.Text == "0") { lblMsg.Text = "Drug Quantity can not be empty or zero."; lblMsg.Visible = true; mpeRxApproval.Show(); Filldata(); } else { UpdateRxMedRequest(hidRxReqID.Value); } } else { lblMsg.Text = "Invalid Drug Name - " + drugName; lblMsg.Visible = true; mpeRxApproval.Show(); Filldata(); } } } catch (Exception ex) { objNLog.Error("Error : " + ex.Message); } objNLog.Info("Event Completed..."); }
protected bool checkPatientData(string patName) { bool flag = false; try { PatientInfoDAL objPat_Info = new PatientInfoDAL(); DataTable Pat_Names = objPat_Info.get_PatientNames(patName, (string)HttpContext.Current.Session["Role"], (string)HttpContext.Current.Session["User"]); DataRow[] foundRows; foundRows = Pat_Names.Select("Pat_LName + ',' + Pat_FName ='" + patName + "'"); if (foundRows.Length == 0) { flag= true; } else { if (foundRows.Length == 1) { flag= true; } else { listPatient(foundRows); flag= false; } } } catch (Exception ex) { objNLog.Error("Error : " + ex.Message); } return flag; }
protected void btnUpdate_Click(object sender, ImageClickEventArgs e) { objNLog.Info("Event Started.."); //if (lblStatus.Visible == true) // lblStatus.Visible = false; PatientPersonalDetails Pat_Det = new PatientPersonalDetails(); PatientInfoDAL Pat_Info = new PatientInfoDAL(); try { PatientName Pat_Name = new PatientName(); int facID=Pat_Info.Get_FacID(txtClinicFacility.Text); if (facID == 0) { Pat_Det.FacID = 0; } else { Pat_Det.FacID = facID; } Pat_Det.MRN = txtMRN.Text; Pat_Name.FirstName = txtPatientFName.Text; Pat_Name.LastName = txtPatientLName.Text; Pat_Name.MiddleName = txtPatientMName.Text; if (rbtnMale.Checked == true) { Pat_Det.Gender = "M"; } else { Pat_Det.Gender = "F"; } Pat_Det.DOB = txtDOB.Text; Pat_Det.SSN = txtSSN.Text; Pat_Det.eContactFName = txtecontactFNAME.Text.Trim(); Pat_Det.eContactLName = txtecontactLNAME.Text.Trim(); Pat_Det.eContactPhone = txtecontactPHONE.Text.Trim(); if (ddlecontactREL.SelectedValue != "0") Pat_Det.eContactRelation = ddlecontactREL.SelectedValue; Pat_Det.PatientAddress1 = txtAddress1.Text; Pat_Det.PatientAddress2 = txtAddress2.Text; Pat_Det.Pat_City = txtCity.Text; Pat_Det.Pat_state = txtState.Text; Pat_Det.Pat_ZIP = txtZip.Text; Pat_Det.PatientShipAddress1 = txtSAddr1.Text; Pat_Det.PatientShipAddress2 = txtSAddr2.Text; Pat_Det.Pat_SCity = txtSCity1.Text; Pat_Det.Pat_Sstate = txtSState.Text; Pat_Det.Pat_SZIP = txtSZIP.Text; Pat_Det.Pat_Phone = txtPhone.Text; Pat_Det.Pat_WPhone = txtWorkPhone.Text; Pat_Det.Pat_CellPhone = txtCellPhone.Text; string diag_Code = ""; if (txtDiagn1.Text.Trim() != "") diag_Code = txtDiagn1.Text.Trim(); if (txtDiagn2.Text.Trim() != "") { if (diag_Code.Trim() != "") diag_Code = diag_Code + "," + txtDiagn2.Text.Trim(); else diag_Code = diag_Code + txtDiagn2.Text.Trim(); } if (txtDiagn3.Text.Trim() != "") { if (diag_Code.Trim() != "") diag_Code = diag_Code + "," + txtDiagn3.Text.Trim(); else diag_Code = diag_Code + txtDiagn3.Text.Trim(); } if (txtDiagn4.Text.Trim() != "") { if (diag_Code.Trim() != "") diag_Code = diag_Code + "," + txtDiagn4.Text.Trim(); else diag_Code = diag_Code + txtDiagn4.Text.Trim(); } if (txtDiagn5.Text.Trim() != "") { if (diag_Code.Trim() != "") diag_Code = diag_Code + "," + txtDiagn5.Text.Trim(); else diag_Code = diag_Code + txtDiagn5.Text.Trim(); } Pat_Det.Pat_Diagnosis = diag_Code; Pat_Det.Pat_Pre_Doc = txtDoctor.Text; Pat_Det.DocID = Int32.Parse(Pat_Info.Get_DocID(txtDoctor.Text).ToString()); if (chkAutoreFillOption.Checked) Pat_Det.Pat_AutoFill = "Y"; else Pat_Det.Pat_AutoFill = "N"; if (chkHippa.Checked) { Pat_Det.HIPPANotice = "Y"; Pat_Det.HIPPADate = txtHippaDate.Text; } else Pat_Det.HIPPANotice = "N"; Pat_Det.Pat_ID = int.Parse(hidPat_ID.Value.ToString()); if (ddlPrimInsurance.Enabled == true ) Pat_Det.PrimaryInsID = int.Parse(ddlPrimInsurance.SelectedValue.ToString()); if (ddlPatStatus.Enabled == true) Pat_Det.PatientStatus = char.Parse(ddlPatStatus.SelectedValue); string userID = (string)Session["User"]; if (Pat_Det.FacID == 0) { //lblStatus.Visible=true; //lblStatus.Text = "No Facilities Found / Invalid Facility..!"; divPatWarning.Visible = true; divPatError.Visible = false; divPatSuccess.Visible = false; lblAddPatientStatus.Text = "No Facilities Found / Invalid Facility..!"; mpeAddPatientStatus.Show(); } else if (Pat_Det.DocID == 0) { //lblStatus.Visible = true; //lblStatus.Text = "No Doctors Found / Invalid Doctor..!"; divPatWarning.Visible = true; divPatError.Visible = false; divPatSuccess.Visible = false; lblAddPatientStatus.Text = "No Doctors Found / Invalid Doctor..!"; mpeAddPatientStatus.Show(); } else { Pat_Info.update_patInfo(userID, Pat_Det, Pat_Name); Response.Redirect("AllPatientProfile.aspx?patID=" + Request.QueryString["patID"].ToString()); } } catch (Exception ex) { objNLog.Error("Error : " + ex.Message); } objNLog.Info("Event Completed.."); }