Exemplo n.º 1
0
/*        protected void LoadSurveyForm()
 *      {
 *          if (null != SurveyFormHolder)
 *          {
 *              SurveyFormControl = (Caisis.UI.Core.Classes.BasePaperFormControl)this.LoadControl("UroSurveyUrinSexFunc.ascx");
 *
 *
 *              SurveyFormControl.BatchPatientId = this._batchPatientId;
 *              SurveyFormControl.FormInPatientId = this._formInPatientId;
 *              SurveyFormControl.FormAppointmentId = this._formAppointmentId;
 *
 *
 *
 *              SurveyFormHolder.Controls.Add(SurveyFormControl);
 *          }
 *      }
 */
        protected void BuildHPI()
        {
            if (patientID != 0)
            {
                try
                {
                    PatientDa hpiDa = new PatientDa();
                    DataSet   hpiDs = hpiDa.GetPatientHPIProstateGU(this.patientID, 0);


                    if (hpiDs.Tables[0].Rows.Count > 0)
                    {
                        hpi.DataSource = hpiDs.Tables[0].DefaultView;
                        hpi.DataBind();
                    }
                }
                catch (Exception ex)
                {
                    hpi.Visible = false;
                    ExceptionHandler.Publish(ex);
                }



                NomogramDa nda = new NomogramDa();

                try
                {
                    preRP5Nomo.Text = "PreRP 5: " + ((int)Math.Round(nda.GetPreRPResult(patientID, 5), 0)).ToString();
                }
                catch { }

                try
                {
                    preRP10Nomo.Text = "PreRP 10: " + ((int)Math.Round(nda.GetPreRPResult(patientID, 10), 0)).ToString();
                }
                catch { }

                try
                {
                    preXRTNomo.Text = "PreXRT: " + ((int)Math.Round(nda.GetPreXRTResult(patientID), 0)).ToString();
                }
                catch { }

                try
                {
                    preBrachyNomo.Text = "PreBrachy: " + ((int)Math.Round(nda.GetPreBrachyResult(patientID), 0)).ToString();
                }
                catch { }

                /*
                 * try
                 * {
                 *  psaDT.Text = "PSA Doubling Time calculated based on all PSA values from the last 6 months: " + ((int)Math.Round(nda.GetPreBrachyResult(patientID), 0)).ToString();
                 * }
                 * catch { }
                 */
            }
        }
Exemplo n.º 2
0
        protected void BuildHPI()
        {
            if (patientID != 0)
            {
                try
                {
                    PatientDa hpiDa = new PatientDa();


                    DataSet hpiDs = hpiDa.GetPatientHPI(this.patientID, 0, 0);
                    hpi.DataSource = hpiDs.Tables[0].DefaultView;
                    hpi.DataBind();


                    int rowCount = hpiDs.Tables[0].Rows.Count;

                    //nomograms are in a second result set
                    //preRPNomo.Text = hpiDs.Tables[1].Rows[0]["preRPNomo"].ToString();
                    //preXRTNomo.Text = hpiDs.Tables[1].Rows[0]["preXRTNomo"].ToString();
                    //preBrachyNomo.Text = hpiDs.Tables[1].Rows[0]["preBrachyNomo"].ToString();

                    NomogramDa nda = new NomogramDa();

                    try
                    {
                        preRP5Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 5), 0)).ToString();
                    }
                    catch { }

                    try
                    {
                        preRP10Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 10), 0)).ToString();
                    }
                    catch { }

                    try
                    {
                        preXRTNomo.Text = ((int)Math.Round(nda.GetPreXRTResult(patientID), 0)).ToString();
                    }
                    catch { }

                    try
                    {
                        preBrachyNomo.Text = ((int)Math.Round(nda.GetPreBrachyResult(patientID), 0)).ToString();
                    }
                    catch { }
                }
                catch (Exception ex)
                {
                    //Caisis.UI.Other.EmailError.SendErrorEmail( "Clinic Form: " + this._formTitle, "error creating hpi output");
                    ExceptionHandler.Publish(ex);
                }
            }
//			else
//			{
//				HpiSpacer.Height = NumHpiRowsAllowed*12;
//			}
        }
Exemplo n.º 3
0
        protected void BuildPSA_DT()
        {
            NomogramDa nda = new NomogramDa();

            try
            {
                float psaDoublingTime = nda.GetPSADoublingTime(this._patientId);

                if (psaDoublingTime != float.PositiveInfinity)
                {
                    psaDT.Text = string.Format("{0:F2} months (calculated based on the last 3 valid PSA values).", psaDoublingTime);
                }
            }
            catch { psaDT.Text = "n/a"; }
        }
Exemplo n.º 4
0
        protected void BuildHPI()
        {
            try
            {
                PatientDa hpiDa = new PatientDa();
                DataSet   hpiDs = hpiDa.GetPatientHPIForEForm(this._patientId, 0, 0, 1);

                if (hpiDs.Tables[0].Rows.Count > 0)
                {
                    hpi.DataSource = hpiDs.Tables[0].DefaultView;
                    hpi.DataBind();
                }
                else
                {
                    NoHPIMsg.Visible = true;
                }



                //nomograms are in a second result set

                //preRPNomo.Text = hpiDs.Tables[1].Rows[0]["preRPNomo"].ToString();
                //preXRTNomo.Text = hpiDs.Tables[1].Rows[0]["preXRTNomo"].ToString();
                //preBrachyNomo.Text = hpiDs.Tables[1].Rows[0]["preBrachyNomo"].ToString();
                //postRP7yrNomo.Text = hpiDs.Tables[1].Rows[0]["postRP7yrNomo"].ToString();

                NomogramDa nda = new NomogramDa();

                string PreRP5Error    = null;
                string PreRP10Error   = null;
                string PreXRTError    = null;
                string PreBrachyError = null;
                string PostRP7Error   = null;
                string PostRP10Error  = null;

                try
                {
                    preRP5Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(this._patientId, 5), 0)).ToString();
                }
                catch (NomogramDataException e1)
                {
                    PreRP5Error = e1.Message;
                }

                try
                {
                    preRP10Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(this._patientId, 10), 0)).ToString();
                }
                catch (NomogramDataException e2)
                {
                    PreRP10Error = e2.Message;
                }

                try
                {
                    preXRTNomo.Text = ((int)Math.Round(nda.GetPreXRTResult(this._patientId), 0)).ToString();
                }
                catch (NomogramDataException e3)
                {
                    PreXRTError = e3.Message;
                }

                try
                {
                    preBrachyNomo.Text = ((int)Math.Round(nda.GetPreBrachyResult(this._patientId), 0)).ToString();
                }
                catch (NomogramDataException e4)
                {
                    PreBrachyError = e4.Message;
                }

                try
                {
                    postRP7yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(this._patientId, 7), 0)).ToString();
                }
                catch (NomogramDataException e5)
                {
                    PostRP7Error = e5.Message;
                }

                try
                {
                    postRP10yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(this._patientId, 10), 0)).ToString();
                }
                catch (NomogramDataException e6)
                {
                    PostRP10Error = e6.Message;
                }

                if (hpiDs.Tables[1].Rows[0]["DxBiopsyId"] != null && hpiDs.Tables[1].Rows[0]["DxBiopsyId"].ToString().Length > 0)
                {
                    hpiBiopsyId = (int)hpiDs.Tables[1].Rows[0]["DxBiopsyId"];
                }



                //PreRPError = hpiDs.Tables[1].Rows[0]["PreRPError"].ToString();
                //PreXRTError = hpiDs.Tables[1].Rows[0]["PreXRTError"].ToString();
                //PreBrachyError = hpiDs.Tables[1].Rows[0]["PreBrachyError"].ToString();
                //PostRPError = hpiDs.Tables[1].Rows[0]["PostRPError"].ToString();


                if (PreRP5Error != null && PreRP5Error.Length > 0)
                {
//						preRPNomo.ToolTip = PreRPError;
//						preRPNomo.Attributes.Add("style", "cursor:hand;");
                    preRP5Nomo.Text += "<img src=\"../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">&nbsp;" + PreRP5Error;
                    // old:with error displayed all the time
                    //NomogramError.Text += "<strong>* Cannot calculate PreRP:</strong>&nbsp;&nbsp;" + PreRPError + "<br/>";
                    //preRPNomo.Text += "*";
                }

                if (PostRP10Error != null && PostRP10Error.Length > 0)
                {
                    preRP10Nomo.Text += "<img src=\"../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">&nbsp;" + PreRP10Error;
                }

                if (PreXRTError != null && PreXRTError.Length > 0)
                {
                    if (PreXRTError == "No XRT noted.")
                    {
                        preXRTNomo.Text = "No XRT";
                    }
                    else
                    {
//							preXRTNomo.ToolTip = PreXRTError;
//							preXRTNomo.Attributes.Add("style", "cursor:hand;");
                        preXRTNomo.Text += "<img src=\"../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">&nbsp;" + PreXRTError;
                        // old:with error displayed all the time
                        //NomogramError.Text += "<strong>** Cannot calculate PreXRT:</strong>&nbsp;&nbsp;" + PreXRTError + "<br/>";
                        //preXRTNomo.Text += "**";
                    }
                }
                if (PreBrachyError != null && PreBrachyError.Length > 0)
                {
//						preBrachyNomo.ToolTip = PreBrachyError;
//						preBrachyNomo.Attributes.Add("style", "cursor:hand;");
                    preBrachyNomo.Text += "<img src=\"../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">&nbsp;" + PreBrachyError;
                    // old:with error displayed all the time
                    //NomogramError.Text += "<strong>*** Cannot calculate PreBrachy:</strong>&nbsp;&nbsp;" + PreBrachyError + "<br/>";
                    //preBrachyNomo.Text += "***";
                }
                if (PostRP7Error != null && PostRP7Error.Length > 0)
                {
                    if (PostRP7Error == "No radical prostatectomy noted.")
                    {
                        postRP7yrNomo.Text = "No RP";
                    }
                    else
                    {
//							postRP7yrNomo.ToolTip = PostRPError;
//							postRP7yrNomo.Attributes.Add("style", "cursor:hand;");
                        postRP7yrNomo.Text += "<img src=\"../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">&nbsp;" + PostRP7Error;

                        // old:with error displayed all the time
                        //NomogramError.Text += "<strong>**** Cannot calculate PostRP:</strong>&nbsp;&nbsp;" + PostRPError;
                        //postRP2yrNomo.Text += "****";
                        //postRP5yrNomo.Text += "****";
                        //postRP7yrNomo.Text += "****";
                    }
                }

                if (PostRP10Error != null && PostRP10Error.Length > 0)
                {
                    if (PostRP10Error == "No radical prostatectomy noted.")
                    {
                        postRP10yrNomo.Text = "No RP";
                    }
                    else
                    {
                        postRP10yrNomo.Text += "<img src=\"../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">&nbsp;" + PostRP10Error;
                    }
                }
            }
            catch (Exception ex)
            {
                hpi.Visible = false;
                //Caisis.UI.Other.EmailError.SendErrorEmail( "Clinic Form: " + this._formTitle, "error creating hpi output");
                ExceptionHandler.Publish(ex);
            }



            PopulateHPIPreTxPotency();



// this condition doesn't work, since this.EFormName doesn't always have a value
// so at the moment, on a GU form we are showing many things that don't need to be there.  - jf
//			if (this._eformName != null && this._eformName.IndexOf("GU") < 0)
//			{
            BuildHpiProstatectomies(this._patientId, this._eformName, "Dynamic");
            BuildHpiProtocols(this._patientId, this._eformName, "Dynamic");
            BuildHpiBiopsies(this._patientId, this._eformName, "Dynamic", hpiBiopsyId);
            BuildHPINerveStatus();

//			}
        }
Exemplo n.º 5
0
        // populate nomo score labels
        void PopulateNomogramScores(int patientId, DateTime rpDate, PatientOutcomesResults r)
        {
            NomogramDa da = new NomogramDa();

            Action <Label, Func <int, int, double>, int> nomocall =
                (lbl, f, yr) =>
            {
                try
                {
                    lbl.Text = ((int)Math.Round(f(patientId, yr), 0)).ToString() + "&nbsp;&nbsp;&nbsp;";
                }
                catch
                {
                    lbl.Text = "N/A";
                }
            };

            nomocall(Pre5Result, da.GetPreRPResult, 5);
            // nomocall(Post5Result, da.GetPostRPResult, 5);

            DateTime today = DateTime.Today;

            Post5Result.Text = r.NomogramPredictionBaseline.HasValue ? ((int)Math.Round(r.NomogramPredictionBaseline.Value, 0)) + "&nbsp;&nbsp;&nbsp;" : "N/A";

            // output only relevant results
            if (rpDate.AddYears(2) > today)
            {
                //nomocall(Current2Result, da.GetPostRPResult, 2);
                Current2Result.Text = r.NomogramPrediction2Year.HasValue ? ((int)Math.Round(r.NomogramPrediction2Year.Value, 0)) + "&nbsp;&nbsp;&nbsp;" : "N/A";
            }
            else
            {
                Show2Yr.Visible = false;
            }

            if (rpDate.AddYears(5) > today)
            {
                Current5Result.Text = r.NomogramPrediction5Year.HasValue ? ((int)Math.Round(r.NomogramPrediction5Year.Value, 0)) + "&nbsp;&nbsp;&nbsp;" : "N/A";
            }
            else
            {
                Show5Yr.Visible = false;
            }

            if (rpDate.AddYears(7) > today)
            {
                //nomocall(Current7Result, da.GetPostRPResult, 7);
                Current7Result.Text = r.NomogramPrediction7Year.HasValue ? ((int)Math.Round(r.NomogramPrediction7Year.Value, 0)) + "&nbsp;&nbsp;&nbsp;" : "N/A";
            }
            else
            {
                Show7Yr.Visible = false;
            }

            if (rpDate.AddYears(10) > today)
            {
                Current10Result.Text = r.NomogramPrediction10Year.HasValue ? ((int)Math.Round(r.NomogramPrediction10Year.Value, 0)) + "&nbsp;&nbsp;&nbsp;" : "N/A";
            }
            else
            {
                Show10Yr.Visible = false;
            }
        }
Exemplo n.º 6
0
        protected void BuildHPI()
        {
            if (patientID != 0)
            {
                try
                {
                    PatientDa hpiDa = new PatientDa();
                    DataSet   hpiDs = hpiDa.GetPatientHPI(this.patientID, 0, 0);
                    //DataSet hpiDs = hpiDa.GetPatientHPIBladder(this.patientID);
                    hpi.DataSource = hpiDs.Tables[0].DefaultView;
                    hpi.DataBind();

                    int rowCount = hpiDs.Tables[0].Rows.Count;


                    //nomograms are in a second result set
                    //preRPNomo.Text = hpiDs.Tables[1].Rows[0]["preRPNomo"].ToString();
                    //preXRTNomo.Text = hpiDs.Tables[1].Rows[0]["preXRTNomo"].ToString();
                    //preBrachyNomo.Text = hpiDs.Tables[1].Rows[0]["preBrachyNomo"].ToString();
                    //postRP7yrNomo.Text = hpiDs.Tables[1].Rows[0]["postRP7yrNomo"].ToString();

                    NomogramDa nda = new NomogramDa();

                    try
                    {
                        preRP5Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 5), 0)).ToString();
                    }
                    catch { }

                    try
                    {
                        preRP10Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 10), 0)).ToString();
                    }
                    catch { }

                    try
                    {
                        preXRTNomo.Text = ((int)Math.Round(nda.GetPreXRTResult(patientID), 0)).ToString();
                    }
                    catch { }

                    try
                    {
                        preBrachyNomo.Text = ((int)Math.Round(nda.GetPreBrachyResult(patientID), 0)).ToString();
                    }
                    catch { }

                    try
                    {
                        postRP7yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 7), 0)).ToString();
                    }
                    catch { }

                    try
                    {
                        postRP10yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 10), 0)).ToString();
                    }
                    catch { }

                    // set the value of the biopsy Id that is to be REMOVED from the results of the
                    // stored proc spFormListBiopsies so that the biopsy is only listed once in the
                    // hpi section of the form

                    if (hpiDs.Tables[1].Rows[0]["DxBiopsyId"] != null && hpiDs.Tables[1].Rows[0]["DxBiopsyId"].ToString().Length > 0)
                    {
                        hpiBiopsyId = (int)hpiDs.Tables[1].Rows[0]["DxBiopsyId"];
                    }
                }
                catch (Exception ex)
                {
                    hpi.Visible = false;
                    //Caisis.UI.Other.EmailError.SendErrorEmail( "Clinic Form: " + this._formTitle, "error creating hpi output");
                    ExceptionHandler.Publish(ex);
                }
            }
        }
Exemplo n.º 7
0
        override protected void Page_Load(object sender, System.EventArgs e)
        {
            if (Session[SessionKey.PatientId] != null && Session[SessionKey.PatientId].ToString().Length > 0)
            {
                int patientID = (int)Session[SessionKey.PatientId];

                SecurityController sc       = new SecurityController();
                string             userName = sc.GetUserName();

                reportTitle = "Patient Summary Report";
                patientName = Session[SessionKey.PtFirstName].ToString() + " " + Session[SessionKey.PtLastName].ToString() + "&nbsp;&nbsp;&nbsp;MRN:&nbsp;" + Session[SessionKey.PtMRN].ToString() + "&nbsp;&nbsp;&nbsp;&nbsp;" + System.DateTime.Now;



                //Narrator
                //Narrative narrative = new Narrative();
                //narrative.GetByParent(patientID);
                DataView narrative = BusinessObject.GetByParentAsDataView <Narrative>(patientID);
                //narrative.DataSourceView.Sort = "EnteredTime DESC";
                narrative.Sort = "EnteredTime DESC";
                //rptNarrator.DataSource = narrative.DataSourceView;
                rptNarrator.DataSource = narrative;
                rptNarrator.DataBind();


                //Allergies
                //Allergy allergy = new Allergy();
                //allergy.GetByParent(patientID);
                //rptAllergies.DataSource = allergy.DataSourceView;
                rptAllergies.DataSource = BusinessObject.GetByParentAsDataView <Allergy>(patientID);
                rptAllergies.DataBind();

                //Medications
                //Medication med = new Medication();
                //med.GetByParent(patientID);
                //rptMedications.DataSource = med.DataSourceView;
                rptMedications.DataSource = BusinessObject.GetByParentAsDataView <Medication>(patientID);
                rptMedications.DataBind();

                //Comorbidities
                //Comorbidity com = new Comorbidity();
                //com.GetByParent(patientID);
                //rptComorbidities.DataSource = com.DataSourceView;
                rptComorbidities.DataSource = BusinessObject.GetByParentAsDataView <Comorbidity>(patientID);
                rptComorbidities.DataBind();

                //HPI SUmmary
                try
                {
                    PatientDa hpiDa = new PatientDa();
                    DataSet   hpiDs = hpiDa.GetPatientHPI(patientID, 0, 0);
                    //DataSet hpiDs = DataAccessHelper.GetList(phiCom);
                    rptHPI.DataSource = hpiDs.Tables[0].DefaultView;
                    rptHPI.DataBind();
                }
                catch (Exception ex)
                {
                    ExceptionHandler.Publish(ex);
                }

                //nomograms are in a second result set
                //base.preRPNomo.Text = hpiDs.Tables[1].Rows[0]["preRPNomo"].ToString();
                //base.preXRTNomo.Text = hpiDs.Tables[1].Rows[0]["preXRTNomo"].ToString();
                //base.preBrachyNomo.Text = hpiDs.Tables[1].Rows[0]["preBrachyNomo"].ToString();
                //postRP2yrNomo.Text = hpiDs.Tables[1].Rows[0]["postRP2yrNomo"].ToString();
                //postRP5yrNomo.Text = hpiDs.Tables[1].Rows[0]["postRP5yrNomo"].ToString();
                //base.postRP7yrNomo.Text = hpiDs.Tables[1].Rows[0]["postRP7yrNomo"].ToString();

                NomogramDa nda = new NomogramDa();

                try
                {
                    preRP5Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 5), 0)).ToString();
                }
                catch { }

                try
                {
                    preRP10Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 10), 0)).ToString();
                }
                catch { }

                try
                {
                    preXRTNomo.Text = ((int)Math.Round(nda.GetPreXRTResult(patientID), 0)).ToString();
                }
                catch { }

                try
                {
                    preBrachyNomo.Text = ((int)Math.Round(nda.GetPreBrachyResult(patientID), 0)).ToString();
                }
                catch { }

                try
                {
                    postRP2yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 2), 0)).ToString();
                }
                catch { }

                try
                {
                    postRP5yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 5), 0)).ToString();
                }
                catch { }

                try
                {
                    postRP7yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 7), 0)).ToString();
                }
                catch { }

                try
                {
                    postRP10yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 10), 0)).ToString();
                }
                catch { }


                //Chron List: displays most relevant/common list
                ChronoDa da = new ChronoDa();
                DataSet  ds = da.GetChronoList(patientID, chronListName, HttpContext.Current.User.Identity.Name);

                rptChrono.DataSource = ds.Tables[0].DefaultView;
                rptChrono.DataBind();
                recordCount = ds.Tables[0].Rows.Count;

                BuildChart();
            }
        }
Exemplo n.º 8
0
        override protected void Page_Load(object sender, System.EventArgs e)
        {
            if (Session[SessionKey.PatientId] != null && !Session[SessionKey.PatientId].ToString().Equals(""))
            {
                int patientID = (int)Session[SessionKey.PatientId];

                SecurityController sc       = new SecurityController();
                string             userName = sc.GetUserName();

                reportTitle = "Patient Summary Report";
                PatientController pc = new PatientController();
                Patient           p  = new Patient();
                p.Get(patientID);
                patientName = pc.GetPatientName(p, true) + " " + pc.GetPatientMRN(p) + " " + System.DateTime.Now;
                //patientName = Session[SessionKey.PtFirstName].ToString() + " " + Session[SessionKey.PtLastName].ToString() + "&nbsp;&nbsp;&nbsp;MRN:&nbsp;" + Session[SessionKey.PtMRN].ToString() + "&nbsp;&nbsp;&nbsp;&nbsp;" + System.DateTime.Now;

                //Narrator
                //Narrative narrative  = new Narrative();
                //narrative.GetByParent(patientID);
                //narrative.DataSourceView.Sort = "EnteredTime DESC";
                //rptNarrator.DataSource = narrative.DataSourceView;
                DataView narrative = BusinessObject.GetByParentAsDataView <Narrative>(patientID);
                narrative.Sort         = "EnteredTime DESC";
                rptNarrator.DataSource = narrative;
                rptNarrator.DataBind();


                //Allergies
                //Allergy allergy		= new Allergy();
                //allergy.GetByParent(patientID);
                //rptAllergies.DataSource = allergy.DataSourceView;
                rptAllergies.DataSource = BusinessObject.GetByParentAsDataView <Allergy>(patientID);
                rptAllergies.DataBind();

                //Medications
                //Medication med		= new Medication();
                //med.GetByParent(patientID);
                //rptMedications.DataSource = med.DataSourceView;
                rptMedications.DataSource = BusinessObject.GetByParentAsDataView <Medication>(patientID);
                rptMedications.DataBind();

                //Comorbidities
                //Comorbidity com		= new Comorbidity();
                //com.GetByParent(patientID);
                //rptComorbidities.DataSource = com.DataSourceView;
                rptComorbidities.DataSource = BusinessObject.GetByParentAsDataView <Comorbidity>(patientID);
                rptComorbidities.DataBind();

                //HPI SUmmary
                PatientDa hpiDa = new PatientDa();
                DataSet   hpiDs = hpiDa.GetPatientHPI(patientID, 0, 0);
                //DataSet hpiDs = DataAccessHelper.GetList(phiCom);
                rptHPI.DataSource = hpiDs.Tables[0].DefaultView;
                rptHPI.DataBind();
                //nomograms are in a second result set
                //preRPNomo.Text = hpiDs.Tables[1].Rows[0]["preRPNomo"].ToString();
                //preXRTNomo.Text = hpiDs.Tables[1].Rows[0]["preXRTNomo"].ToString();
                //preBrachyNomo.Text = hpiDs.Tables[1].Rows[0]["preBrachyNomo"].ToString();
                //postRP2yrNomo.Text = hpiDs.Tables[1].Rows[0]["postRP2yrNomo"].ToString();
                //postRP5yrNomo.Text = hpiDs.Tables[1].Rows[0]["postRP5yrNomo"].ToString();
                //postRP7yrNomo.Text = hpiDs.Tables[1].Rows[0]["postRP7yrNomo"].ToString();

                NomogramDa nda = new NomogramDa();

                try
                {
                    preRP5Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 5), 0)).ToString();
                }
                catch { }

                try
                {
                    preRP10Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 10), 0)).ToString();
                }
                catch { }

                try
                {
                    preXRTNomo.Text = ((int)Math.Round(nda.GetPreXRTResult(patientID), 0)).ToString();
                }
                catch { }

                try
                {
                    preBrachyNomo.Text = ((int)Math.Round(nda.GetPreBrachyResult(patientID), 0)).ToString();
                }
                catch { }

                try
                {
                    postRP2yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 2), 0)).ToString();
                }
                catch { }

                try
                {
                    postRP5yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 5), 0)).ToString();
                }
                catch { }

                try
                {
                    postRP7yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 7), 0)).ToString();
                }
                catch { }

                try
                {
                    postRP10yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 10), 0)).ToString();
                }
                catch { }


                //Chron List: displays most relevant/common list
                BuildChronList(sender, e);

                // build charts
                BuildChart();

                // log view
                base.LogReportView();
            }
            else // no patient in session
            {
                patientName = "Please select a patient before generating this report.";
            }

            SetControlsVisibility();
        }
Exemplo n.º 9
0
        protected void ShowNomograms()
        {
            Caisis.Controller.DiseaseController dc = new Caisis.Controller.DiseaseController();
            string currentDisease = dc.GetDiseaseView();

            // only show nomograms when in prostate mode
            if (currentDisease.ToUpper().Equals("PROSTATE"))
            {
                nomogramPanel.Visible = true;

                NomogramDa nda = new NomogramDa();

                string PreRPError     = null;
                string PreXRTError    = null;
                string PreBrachyError = null;
                string PostRPError    = null;

                try
                {
                    preRP5Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 5), 0)).ToString();
                }
                catch (Exception e1)
                {
                    PreRPError = e1.Message;
                }

                try
                {
                    preRP10Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 10), 0)).ToString();
                }
                catch (Exception e1)
                {
                    PreRPError = e1.Message;
                }

                try
                {
                    preXRTNomo.Text = ((int)Math.Round(nda.GetPreXRTResult(patientID), 0)).ToString();
                }
                catch (Exception e2)
                {
                    PreXRTError = e2.Message;
                }

                try
                {
                    preBrachyNomo.Text = ((int)Math.Round(nda.GetPreBrachyResult(patientID), 0)).ToString();
                }
                catch (Exception e3)
                {
                    PreBrachyError = e3.Message;
                }

                try
                {
                    postRP2yrNomo.Text  = ((int)Math.Round(nda.GetPostRPResult(patientID, 2), 0)).ToString();
                    postRP5yrNomo.Text  = ((int)Math.Round(nda.GetPostRPResult(patientID, 5), 0)).ToString();
                    postRP7yrNomo.Text  = ((int)Math.Round(nda.GetPostRPResult(patientID, 7), 0)).ToString();
                    postRP10yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 10), 0)).ToString();
                }
                catch (Exception e4)
                {
                    PostRPError = e4.Message;
                }

                if (PreRPError != null && PreRPError.Length > 0)
                {
                    if (PreRPError == "No biopsy noted.")
                    {
                        preRP5Nomo.Text  = "No Biopsy";
                        preRP10Nomo.Text = "No Biopsy";
                    }
                    else
                    {
                        preRP5Nomo.ToolTip  = PreRPError;
                        preRP10Nomo.ToolTip = PreRPError;
                        preRP5Nomo.Attributes.Add("style", "cursor:hand;");
                        preRP10Nomo.Attributes.Add("style", "cursor:hand;");
                        preRP5Nomo.Text  += "&nbsp;<img src=\"../../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">";
                        preRP10Nomo.Text += "&nbsp;<img src=\"../../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">";
                        // old:with error displayed all the time
                        //NomogramError.Text += "<strong>* Cannot calculate PreRP:</strong>&nbsp;&nbsp;" + PreRPError + "<br/>";
                        //preRPNomo.Text += "*";
                    }
                }
                if (PreXRTError != null && PreXRTError.Length > 0)
                {
                    if (PreXRTError == "No biopsy noted.")
                    {
                        preXRTNomo.Text = "No Biopsy";
                    }
                    else if (PreXRTError == "No XRT noted.")
                    {
                        preXRTNomo.Text = "No XRT";
                    }
                    else
                    {
                        preXRTNomo.ToolTip = PreXRTError;
                        preXRTNomo.Attributes.Add("style", "cursor:hand;");
                        preXRTNomo.Text += "&nbsp;<img src=\"../../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">";
                        // old:with error displayed all the time
                        //NomogramError.Text += "<strong>** Cannot calculate PreXRT:</strong>&nbsp;&nbsp;" + PreXRTError + "<br/>";
                        //preXRTNomo.Text += "**";
                    }
                }
                if (PreBrachyError != null && PreBrachyError.Length > 0)
                {
                    if (PreBrachyError == "No biopsy noted.")
                    {
                        preBrachyNomo.Text = "No Biopsy";
                    }
                    else
                    {
                        preBrachyNomo.ToolTip = PreBrachyError;
                        preBrachyNomo.Attributes.Add("style", "cursor:hand;");
                        preBrachyNomo.Text += "&nbsp;<img src=\"../../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">";
                        // old:with error displayed all the time
                        //NomogramError.Text += "<strong>*** Cannot calculate PreBrachy:</strong>&nbsp;&nbsp;" + PreBrachyError + "<br/>";
                        //preBrachyNomo.Text += "***";
                    }
                }
                if (PostRPError != null && PostRPError.Length > 0)
                {
                    if (PostRPError == "No radical prostatectomy noted.")
                    {
                        postRP2yrNomo.Text  = "No RP";
                        postRP5yrNomo.Text  = "No RP";
                        postRP7yrNomo.Text  = "No RP";
                        postRP10yrNomo.Text = "No RP";
                    }
                    else
                    {
                        postRP2yrNomo.ToolTip = PostRPError;
                        postRP2yrNomo.Attributes.Add("style", "cursor:hand;");
                        postRP2yrNomo.Text += "&nbsp;<img src=\"../../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">";

                        postRP5yrNomo.ToolTip = PostRPError;
                        postRP5yrNomo.Attributes.Add("style", "cursor:hand;");
                        postRP5yrNomo.Text += "&nbsp;<img src=\"../../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">";

                        postRP7yrNomo.ToolTip = PostRPError;
                        postRP7yrNomo.Attributes.Add("style", "cursor:hand;");
                        postRP7yrNomo.Text += "&nbsp;<img src=\"../../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">";

                        postRP10yrNomo.ToolTip = PostRPError;
                        postRP10yrNomo.Attributes.Add("style", "cursor:hand;");
                        postRP10yrNomo.Text += "&nbsp;<img src=\"../../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">";

                        // old:with error displayed all the time
                        //NomogramError.Text += "<strong>**** Cannot calculate PostRP:</strong>&nbsp;&nbsp;" + PostRPError;
                        //postRP2yrNomo.Text += "****";
                        //postRP5yrNomo.Text += "****";
                        //postRP7yrNomo.Text += "****";
                    }
                }

                if (NomogramError.Text.Length < 1)
                {
                    NomogramErrorTableRow.Visible = false;
                }
            }
        }
Exemplo n.º 10
0
        protected void BuildHPI()
        {
            if (patientID != 0)
            {
                try
                {
                    PatientDa pDa   = new PatientDa();
                    DataSet   hpiDs = pDa.GetPatientHPIBladder(this.patientID);
                    hpi.DataSource = hpiDs.Tables[0].DefaultView;
                    hpi.DataBind();

                    int rowCount = hpiDs.Tables[0].Rows.Count;

                    /*					if (rowCount < NumHpiRowsAllowed)
                     *                  {
                     *                      int newHeight = (NumHpiRowsAllowed-rowCount)*10;
                     *                      HpiSpacer.Height = newHeight;
                     *                  }
                     */



                    NomogramDa nda = new NomogramDa();

                    try
                    {
                        preRP5Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 5), 0)).ToString();
                    }
                    catch { }

                    try
                    {
                        preRP10Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 10), 0)).ToString();
                    }
                    catch { }

                    try
                    {
                        preXRTNomo.Text = ((int)Math.Round(nda.GetPreXRTResult(patientID), 0)).ToString();
                    }
                    catch { }

                    try
                    {
                        preBrachyNomo.Text = ((int)Math.Round(nda.GetPreBrachyResult(patientID), 0)).ToString();
                    }
                    catch { }

                    try
                    {
                        postRP7yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 7), 0)).ToString();
                    }
                    catch { }

                    try
                    {
                        postRP10yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 10), 0)).ToString();
                    }
                    catch { }
                }
                catch (Exception ex)
                {
                    //					HpiSpacer.Height = NumHpiRowsAllowed*10;
                    //Caisis.UI.Other.EmailError.SendErrorEmail( "Clinic Form: " + this._formTitle, "error creating hpi output");
                    ExceptionHandler.Publish(ex);
                }
            }
        }
Exemplo n.º 11
0
        protected void BuildNomograms()
        {
            NomogramDa nda = new NomogramDa();

            string PreRP5Error    = null;
            string PreRP10Error   = null;
            string PreXRTError    = null;
            string PreBrachyError = null;
            string PostRP7Error   = null;
            string PostRP10Error  = null;


            try
            {
                preRP10Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(this._patientId, 10), 0)).ToString();
            }
            catch (NomogramDataException e2)
            {
                PreRP10Error = e2.Message;
            }

            try
            {
                preXRTNomo.Text = ((int)Math.Round(nda.GetPreXRTResult(this._patientId), 0)).ToString();
            }
            catch (NomogramDataException e3)
            {
                PreXRTError = e3.Message;
            }

            try
            {
                preBrachyNomo.Text = ((int)Math.Round(nda.GetPreBrachyResult(this._patientId), 0)).ToString();
            }
            catch (NomogramDataException e4)
            {
                PreBrachyError = e4.Message;
            }


            try
            {
                postRP10yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(this._patientId, 10), 0)).ToString();
            }
            catch (NomogramDataException e6)
            {
                PostRP10Error = e6.Message;
            }



            if (PostRP10Error != null && PostRP10Error.Length > 0)
            {
                preRP10Nomo.Text += "<img src=\"../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">&nbsp;" + PreRP10Error;
            }

            if (PreXRTError != null && PreXRTError.Length > 0)
            {
                if (PreXRTError == "No XRT noted.")
                {
                    preXRTNomo.Text = "No XRT";
                }
                else
                {
                    preXRTNomo.Text += "<img src=\"../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">&nbsp;" + PreXRTError;
                }
            }

            if (PreBrachyError != null && PreBrachyError.Length > 0)
            {
                preBrachyNomo.Text += "<img src=\"../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">&nbsp;" + PreBrachyError;
            }


            if (PostRP10Error != null && PostRP10Error.Length > 0)
            {
                if (PostRP10Error == "No radical prostatectomy noted.")
                {
                    postRP10yrNomo.Text = "No RP";
                }
                else
                {
                    postRP10yrNomo.Text += "<img src=\"../../Images/NomogramAlert.gif\" width=\"9\" height=\"9\">&nbsp;" + PostRP10Error;
                }
            }
        }