protected void SelectedPatientChanged(object sender, EventArgs e) { if (Convert.ToInt32(Session["TechnicalAreaId"]) == 0) { return; //do nothing if we are in records } int technicalAreaID = (Convert.ToInt32(Session["TechnicalAreaId"])); string theUrl = string.Empty; int patientID = int.Parse(grdWaitingList.SelectedDataKey.Values["Ptn_PK"].ToString()); int moduleID = int.Parse(grdWaitingList.SelectedDataKey.Values["ModuleID"].ToString()); HttpContext.Current.Session["PatientId"] = patientID; HttpContext.Current.Session["PatientVisitId"] = 0; HttpContext.Current.Session["ServiceLocationId"] = 0; HttpContext.Current.Session["LabId"] = 0; Session["TechnicalAreaId"] = moduleID < 1 ? (Convert.ToInt32(Session["TechnicalAreaId"])) : moduleID; int WaitingListID = int.Parse(grdWaitingList.SelectedDataKey.Values["WaitingListID"].ToString()); //remove patient from the waiting list IPatientRegistration PManager = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical"); PManager.ChangeWaitingListStatus(WaitingListID, 1, Convert.ToInt32(base.Session["AppUserId"])); Response.Redirect(string.Format("~/ClinicalForms/frmPatient_Home.aspx?srvNm={0}&mod={1}", Session["TechnicalAreaName"].ToString(), Session["TechnicalAreaId"].ToString())); //String theOrdScript; //theOrdScript = "<script language='javascript' id='openPatient'>\n"; //theOrdScript += "window.opener.location.href = './ClinicalForms/frmPatient_Home.aspx';\n"; //theOrdScript += "window.close();\n"; //theOrdScript += "</script>\n"; //Page.ClientScript.RegisterStartupScript(this.GetType(), "closePage", theOrdScript); }
protected void grdWaitingList_SelectedIndexChanged(object sender, EventArgs e) { if (Convert.ToInt32(Session["TechnicalAreaId"]) == 0) { return; //do nothing if we are in records } string theUrl = string.Empty; int patientID = int.Parse(grdWaitingList.SelectedDataKey.Values["Ptn_PK"].ToString()); HttpContext.Current.Session["PatientId"] = patientID; HttpContext.Current.Session["PatientVisitId"] = 0; HttpContext.Current.Session["ServiceLocationId"] = 0; HttpContext.Current.Session["LabId"] = 0; int WaitingListID = int.Parse(grdWaitingList.SelectedDataKey.Values["WaitingListID"].ToString()); //remove patient from the waiting list IPatientRegistration PManager = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical"); PManager.ChangeWaitingListStatus(WaitingListID, 1, Convert.ToInt32(base.Session["AppUserId"])); // Added for bug ID 1062 if (ddwaitingList.SelectedItem.Text == "Laboratory") { String theOrdScript; theOrdScript = "<script language='javascript' id='openPatient'>\n"; theOrdScript += "window.opener.location.href = './Laboratory/frm_LabTestResults.aspx';\n"; theOrdScript += "window.close();\n"; theOrdScript += "</script>\n"; Page.ClientScript.RegisterStartupScript(this.GetType(), "closePage", theOrdScript); } else// (ddwaitingList.SelectedItem.Text == "Pharmacy") { String theOrdScript; theOrdScript = "<script language='javascript' id='openPatient'>\n"; //theOrdScript += "window.opener.location.href = './ClinicalForms/frmPatient_Home.aspx';\n"; Bug ID 1062 theOrdScript += "window.opener.location.href = './ClinicalForms/frmPatient_History.aspx';\n"; theOrdScript += "window.close();\n"; theOrdScript += "</script>\n"; Page.ClientScript.RegisterStartupScript(this.GetType(), "closePage", theOrdScript); } // End addition. // theUrl = "./ClinicalForms/frmPatient_Home.aspx"; // Response.Redirect(theUrl, false); }
protected void grdWaitingList_RowDeleting(object sender, GridViewDeleteEventArgs e) { DataTable theDT = (DataTable)Session["dtWaitingList"]; DataRow rowDelete = theDT.Rows[e.RowIndex]; if (Convert.ToInt32(rowDelete["Persisted"]) == 1) { rowDelete["RowStatus"] = QueueStatus.Deleted; rowDelete.AcceptChanges(); int waitingListId = Convert.ToInt32(rowDelete["WaitingListID"]); IPatientRegistration PManager = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical"); PManager.ChangeWaitingListStatus(waitingListId, (int)QueueStatus.Deleted, this.UserId); } else { theDT.Rows.RemoveAt(e.RowIndex); } }