Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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["PatientInformation"] = null;

            SessionManager.PatientId = patientID;
            SessionManager.VisitId   = 0;


            string theUrl = "";

            if (Request.QueryString["srvNm"] == "Records" || Request.QueryString["srvNm"] == "Consultation")
            {
                Session["TechnicalAreaName"] = "Records";
                theUrl = string.Format("{0}?PatientId={1}", "./AddTechnicalArea.aspx", patientID);
                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"]), patientID);
                if (theDS.Tables[3].Rows.Count > 0)//check if the patient was care ended for reenrolment
                {
                    theUrl = string.Format("{0}?PatientId={1}&mod={2}", "./AddTechnicalArea.aspx", patientID, Request.QueryString["mod"]);
                }
                else if (theDS.Tables[2].Rows.Count > 0 && theDS.Tables[2].Rows[0]["StartDate"].ToString() != "")
                {
                    Session["TechnicalAreaId"] = Request.QueryString["mod"];
                    theUrl = "~/ClinicalForms/frmPatient_Home.aspx";
                }
                else
                {
                    theUrl = string.Format("{0}?PatientId={1}&mod={2}", "./AddTechnicalArea.aspx", patientID, Request.QueryString["mod"]);
                }
                HttpContext.Current.ApplicationInstance.CompleteRequest();
                Response.Redirect(theUrl, true);
            }
        }
Exemplo n.º 3
0
    protected void grdSearchResult_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        //if (e.Row.RowType == DataControlRowType.DataRow)
        //{
        //    e.Row.BackColor = System.Drawing.Color.White;
        //    e.Row.Attributes.Add("onmouseover", "this.style.cursor='hand';");
        //    e.Row.Attributes.Add("onclick",GetPostBackClientHyperlink(this.grdSearchResult, "Select$" + e.Row.DataItemIndex));
        //}

        string theUrl = string.Empty;

        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.BackColor = System.Drawing.Color.White;
            e.Row.Attributes.Add("onmouseover", "this.style.cursor='hand';");

            if (Request.QueryString["FormName"] != null && Request.QueryString["FormName"].ToString() == "FamilyInfo")
            {
                theUrl = string.Format("{0}?RefId={1}&&PatientId={2}", "./ClinicalForms/frmFamilyInformation.aspx", e.Row.Cells[0].Text, Session["PtnRedirect"].ToString());
                //e.Row.Attributes.Add("onclick", "window.location.href=('" + theUrl + "')");
                e.Row.Attributes.Add("onclick", "fnSetSessionfamily('" + theUrl + "')");
            }

            else if (Convert.ToInt32(e.Row.Cells[11].Text) == Convert.ToInt32(Session["AppLocationId"]))
            {
                if (Request.QueryString["FormName"] != null && Request.QueryString["FormName"].ToString() == "AppointmentMain")
                {
                    //theUrl = string.Format("{0}&PatientId={1}&PatientEnrollmentID={2}&Locationid={3}", "./Scheduler/frmScheduler_AppointmentNew.aspx?name=Add", e.Row.Cells[0].Text, e.Row.Cells[5].Text, e.Row.Cells[12].Text);
                    theUrl = string.Format("{0}&PatientId={1}", "./Scheduler/frmScheduler_AppointmentNew.aspx?name=Add", e.Row.Cells[0].Text);
                }
                else if (Request.QueryString["mnuClicked"] != null && Request.QueryString["mnuClicked"] == "DeletePatient")
                {
                    theUrl = string.Format("{0}?PatientID={1}", "./AdminForms/frmAdmin_DeletePatient.aspx", e.Row.Cells[0].Text);
                }
                else if (theReportName != "")
                {
                    if (theReportName == "ARVAdherence")
                    {
                        theUrl = string.Format("{0}ReportName={1}&PatientId={2}", "./Reports/frmReportViewer.aspx?", theReportName, e.Row.Cells[0].Text);
                    }
                    else
                    {
                        theUrl = string.Format("{0}?PatientId={1}", "./frmAddTechnicalArea.aspx", e.Row.Cells[0].Text);
                    }
                }
                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(ddlServices.SelectedValue), Convert.ToInt32(e.Row.Cells[0].Text));

                    if (theDS.Tables[2].Rows.Count > 0 && theDS.Tables[2].Rows[0]["StartDate"].ToString() != "")
                    {
                        //theUrl = "./ClinicalForms/frmPatient_Home.aspx";
                        theUrl = string.Format("{0}?Values={1}", "./ClinicalForms/frmPatient_Home.aspx", e.Row.Cells[0].Text);
                    }
                    else
                    {
                        theUrl = string.Format("{0}?PatientId={1}", "./frmAddTechnicalArea.aspx", e.Row.Cells[0].Text);
                        //theUrl = string.Format("{0}?Values={1}", "./ClinicalForms/frmPatient_Home.aspx", e.Row.Cells[0].Text);
                    }
                }

                //e.Row.Attributes.Add("onclick", "window.location.href=('" + theUrl + "')");
                e.Row.Attributes.Add("onclick", "fnSetSession('" + theUrl + "')");
            }
            else
            {
                //string theScript = "alert('This Patient belongs to different Location. Please Log-in from " + e.Row.Cells[8].Text + ".');";
                string theScript = "alert('This Patient belongs to a different Location. Please log-in with the patient\\'s location.');";
                e.Row.Attributes.Add("onclick", theScript);
            }
        }
    }
Exemplo n.º 4
0
        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);
            }
        }