private void openPatientDetails(int patientID) { HttpContext.Current.Session["PatientId"] = patientID; HttpContext.Current.Session["PatientVisitId"] = 0; HttpContext.Current.Session["ServiceLocationId"] = 0; HttpContext.Current.Session["LabId"] = 0; /* Session["TechnicalAreaName"] = null; * Session["TechnicalAreaId"] = 0;*/ #region "Refresh Patient Records" IPatientHome PManager = (IPatientHome)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientHome, BusinessProcess.Clinical"); System.Data.DataSet thePDS = PManager.GetPatientDetails(Convert.ToInt32(HttpContext.Current.Session["PatientId"]), Convert.ToInt32(HttpContext.Current.Session["SystemId"]), Convert.ToInt32(HttpContext.Current.Session["TechnicalAreaId"])); HttpContext.Current.Session["PatientInformation"] = thePDS.Tables[0]; #endregion string theUrl = ""; if (Request.QueryString["srvNm"] == "Records") { Session["TechnicalAreaName"] = "Records"; theUrl = string.Format("{0}", "./frmAddTechnicalArea.aspx"); Response.Redirect(theUrl); } else { //Check if the patient is enrolled and go directly to patient home page if patient is enrolled IPatientRegistration PatRegMgr = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical"); DataSet theDS = PatRegMgr.GetFieldNames(int.Parse(Request.QueryString["mod"]), Convert.ToInt32(Session["PatientId"])); if (theDS.Tables[3].Rows.Count > 0)//check if patient is care ended for reenrollment { //theUrl = string.Format("{0}?PatientId={1}&mod={2}", "./frmAddTechnicalArea.aspx", patientID, Request.QueryString["mod"]); /* * Code is commented for Care end patient, when patient is under Care End It should redirected to patient home page. * Dated: 14 jan 2015 */ //theUrl = string.Format("{0}?mod={1}", "./frmAddTechnicalArea.aspx", Request.QueryString["mod"]); theUrl = "./ClinicalForms/frmPatient_Home.aspx"; } else if (theDS.Tables[2].Rows.Count > 0 && theDS.Tables[2].Rows[0]["StartDate"].ToString() != "") { theUrl = "./ClinicalForms/frmPatient_Home.aspx"; } else { //theUrl = string.Format("{0}?PatientId={1}&mod={2}", "./frmAddTechnicalArea.aspx", patientID, Request.QueryString["mod"]); theUrl = string.Format("{0}?mod={1}", "./frmAddTechnicalArea.aspx", Request.QueryString["mod"]); } Response.Redirect(theUrl, false); } }
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } Session["dtWaitingList"] = null; Session["WLTechnicalArea"] = null; Session["WLTechnicalAreaName"] = null; Session["WLPatientID"] = 0; String pID = Session["PatientId"].ToString(); if (pID == "0") { pID = Request.QueryString["PID"]; } if (Session["PatientInformation"] == null) { IPatientHome PatientManager = (IPatientHome)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientHome, BusinessProcess.Clinical"); //System.Data.DataSet theDS = PatientManager.GetPatientDetails(Convert.ToInt32(Session["PatientId"]), Convert.ToInt32(Session["SystemId"])); System.Data.DataSet theDS = PatientManager.GetPatientDetails(Convert.ToInt32(pID), Convert.ToInt32(Session["SystemId"]), Convert.ToInt32(Session["TechnicalAreaId"])); PatientManager = null; Session["PatientInformation"] = theDS.Tables[0]; } BindQueues(); DataTable dtPatientInfo = (DataTable)Session["PatientInformation"]; if (dtPatientInfo != null) { lblname.Text = String.Format("{0}, {1}", dtPatientInfo.Rows[0]["LastName"], dtPatientInfo.Rows[0]["FirstName"]); lblIQnumber.Text = dtPatientInfo.Rows[0]["IQNumber"].ToString(); if (Request.QueryString["srvNm"] != null) { lblTechnicalArea.Text = Request.QueryString["srvNm"]; Session["WLTechnicalArea"] = Request.QueryString["mod"]; Session["WLTechnicalAreaName"] = Request.QueryString["srvNm"]; Session["WLPatientID"] = Request.QueryString["PID"]; } else { lblTechnicalArea.Text = Session["TechnicalAreaName"].ToString(); Session["WLTechnicalArea"] = Session["TechnicalAreaId"]; Session["WLTechnicalAreaName"] = Session["TechnicalAreaName"]; Session["WLPatientID"] = HttpContext.Current.Session["PatientId"]; } LoadPatientsWaitList(Convert.ToInt32(HttpContext.Current.Session["WLPatientID"])); } }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } Session["dtWaitingList"] = null; Session["WLTechnicalArea"] = null; Session["WLTechnicalAreaName"] = null; Session["WLPatientID"] = 0; string pID = Session["PatientId"].ToString(); if (pID == "0") { pID = Request.QueryString["PID"]; } if (Request.QueryString["hashtag"] == null) { HttpContext.Current.ApplicationInstance.CompleteRequest(); Response.Redirect("~/frmFacilityHome.aspx", true); } else { string returnUrl = Request.QueryString["hashtag"].Replace(" ", "+"); Utility objUtil = new Utility(); returnUrl = objUtil.Decrypt((returnUrl)); btnBack.OnClientClick = String.Format("javascript:window.location = '../{0}';return false;", returnUrl); } if (Request.QueryString["mod"] != null) { Master.ExecutePatientLevel = false; } else { Master.ExecutePatientLevel = true; } if (Session["PatientInformation"] == null) { IPatientHome PatientManager = (IPatientHome)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientHome, BusinessProcess.Clinical"); //System.Data.DataSet theDS = PatientManager.GetPatientDetails(Convert.ToInt32(Session["PatientId"]), Convert.ToInt32(Session["SystemId"])); DataSet theDS = PatientManager.GetPatientDetails(Convert.ToInt32(pID), Convert.ToInt32(Session["SystemId"]), Convert.ToInt32(Session["TechnicalAreaId"])); PatientManager = null; Session["PatientInformation"] = theDS.Tables[0]; } BindQueues(); DataTable dtPatientInfo = (DataTable)Session["PatientInformation"]; if (Request.QueryString["srvNm"] != null) { lblTechnicalArea.Text = Request.QueryString["srvNm"]; Session["WLTechnicalArea"] = Request.QueryString["mod"]; Session["WLTechnicalAreaName"] = Request.QueryString["srvNm"]; Session["WLPatientID"] = Request.QueryString["PID"]; } else { lblTechnicalArea.Text = Session["TechnicalAreaName"].ToString(); Session["WLTechnicalArea"] = Session["TechnicalAreaId"]; Session["WLTechnicalAreaName"] = Session["TechnicalAreaName"]; Session["WLPatientID"] = HttpContext.Current.Session["PatientId"]; } LoadPatientsWaitList(Convert.ToInt32(HttpContext.Current.Session["WLPatientID"])); }
private void openPatientDetails(int patientID) { HttpContext.Current.Session["PatientId"] = patientID; HttpContext.Current.Session["PatientVisitId"] = 0; HttpContext.Current.Session["ServiceLocationId"] = 0; HttpContext.Current.Session["LabId"] = 0; HttpContext.Current.Session["CareEndFlag"] = "0"; /* Session["TechnicalAreaName"] = null; * Session["TechnicalAreaId"] = 0;*/ #region "Refresh Patient Records" IPatientHome PManager = (IPatientHome)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientHome, BusinessProcess.Clinical"); System.Data.DataSet thePDS = PManager.GetPatientDetails(Convert.ToInt32(HttpContext.Current.Session["PatientId"]), Convert.ToInt32(HttpContext.Current.Session["SystemId"]), Convert.ToInt32(HttpContext.Current.Session["TechnicalAreaId"])); HttpContext.Current.Session["PatientInformation"] = thePDS.Tables[0]; if (thePDS.Tables[40].Rows.Count > 0) { HttpContext.Current.Session["CareEndFlag"] = thePDS.Tables[40].Rows[0]["CareEnded"].ToString(); } #endregion string theUrl = ""; if (Request.QueryString["srvNm"] == "Records") { Session["TechnicalAreaName"] = "Records"; theUrl = string.Format("{0}", "./frmAddTechnicalArea.aspx"); Response.Redirect(theUrl); } else { //Check if the patient is enrolled and go directly to patient home page if patient is enrolled IPatientRegistration PatRegMgr = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical"); DataSet theDS = PatRegMgr.GetFieldNames(int.Parse(Request.QueryString["mod"]), Convert.ToInt32(Session["PatientId"])); if (Session["TechnicalAreaId"].ToString() == "206") { Session["PatientVisitID"] = 0; theUrl = "./PharmacyDispense/frmPharmacyDispense_PatientOrder.aspx"; } else if (Session["TechnicalAreaId"].ToString() == "300") { theUrl = "./Laboratory/frm_LabTestResults.aspx"; } else if (theDS.Tables[3].Rows.Count > 0)//check if patient is care ended, redirect to homepage { theUrl = "./ClinicalForms/frmPatient_Home.aspx"; } else if (theDS.Tables[2].Rows.Count > 0 && theDS.Tables[2].Rows[0]["StartDate"].ToString() != "") { theUrl = "./ClinicalForms/frmPatient_Home.aspx"; } else { theUrl = string.Format("{0}?mod={1}", "./frmAddTechnicalArea.aspx", Request.QueryString["mod"]); } Response.Redirect(theUrl, false); } }