Beispiel #1
0
        /// <summary>
        /// For the specified table and field, build a metadata tooltip with the current disease metadata
        /// </summary>
        /// <param name="table"></param>
        /// <param name="field"></param>
        public virtual void BuildTooltipMetadata(string table, string field)
        {
            // get current metadata
            string disease = new Caisis.Controller.DiseaseController().GetDiseaseView();

            // build UI
            BuildTooltipMetadata(table, field, disease);
        }
Beispiel #2
0
        /// <summary>
        /// Builds a list of available diseases
        /// </summary>
        private void BuildDiseaseViews()
        {
            // get a list of diseases by attiribute
            Caisis.Controller.DiseaseController dc = new Caisis.Controller.DiseaseController();
            var diseases = dc.GetDiseaseViews();

            DiseaseViewRptr.DataSource = diseases;
            DiseaseViewRptr.DataBind();
        }
Beispiel #3
0
        /// <summary>
        /// Builds a list of avaiable surveys (optionally filtered by disease)
        /// </summary>
        private void BuildSurveys()
        {
            DataView surveys;

            // filter by disease
            if (QueryDiseaseId.HasValue)
            {
                Caisis.Controller.DiseaseController dc = new Caisis.Controller.DiseaseController();
                surveys           = dc.GetTableRecordsByDisease(QueryDiseaseId.Value, new MetadataSurvey().TableName).DefaultView;
                surveys.RowFilter = Disease.DiseaseId + " IS NOT NULL";
            }
            // otherwise normal
            else
            {
                surveys = BOL.BusinessObject.GetAllAsDataView <BOL.MetadataSurvey>();
            }
            surveys.Sort           = BOL.MetadataSurvey.SurveyType + " ASC";
            SurveysRptr.DataSource = surveys;
            SurveysRptr.DataBind();

            NoTablesMessage.Visible = surveys.Count == 0;
        }
Beispiel #4
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;
                }
            }
        }
Beispiel #5
0
        //Get HPI data; formatted OnItemBound
        protected void BuildHPI()
        {
            try
            {
                DataSet hpiDs = new DataSet();

                Caisis.Controller.DiseaseController dc = new Caisis.Controller.DiseaseController();
                string currentDisease = dc.GetDiseaseView();


                PatientDa pDa = new PatientDa();


                //  show most relevant HPI
                if (currentDisease.ToUpper().Contains("BREAST"))
                {
                    hpiDs = pDa.GetPatientHPIBreast(this.patientID);
                    HpiTypeDisplay.Text = " (" + currentDisease + ")";
                }
                else if (currentDisease.ToUpper().Contains("BLADDER"))
                {
                    hpiDs = pDa.GetPatientHPIBladder(this.patientID);
                    HpiTypeDisplay.Text = " (" + currentDisease + ")";
                }
                else if (currentDisease.ToUpper().Contains("KIDNEY"))
                {
                    hpiDs = pDa.GetPatientHPIKidney(this.patientID);
                    HpiTypeDisplay.Text = " (" + currentDisease + ")";
                }
                else if (currentDisease.ToUpper().Contains("TESTIS"))
                {
                    hpiDs = pDa.GetPatientHPITestis(this.patientID);
                    HpiTypeDisplay.Text = " (" + currentDisease + ")";
                }
                else
                {
                    hpiDs = pDa.GetPatientHPI(this.patientID, 0, 0);
                }

                int HpiRecordCount = hpiDs.Tables[0].Rows.Count;
                if (HpiRecordCount > 6)
                {
                    double rowsPerColumn = HpiRecordCount / 2;
                    RowsAllowed = ((int)Math.Round(rowsPerColumn)) - 1;
                }
                else
                {
                    RowsAllowed = HpiRecordCount;
                }



                if (currentDisease.ToUpper().Contains("BREAST"))
                {
                    hpiBreast.DataSource = hpiDs.Tables[0].DefaultView;
                    hpiBreast.DataBind();
                }
                else
                {
                    hpi.DataSource = hpiDs.Tables[0].DefaultView;
                    hpi.DataBind();
                }
            }
            catch (Exception ex)
            {
                HPIerrorMsg.Visible = true;
                HPIerrorMsg.Text    = "Error creating the hpi. The administrator has been notified.";
                ExceptionHandler.Publish(ex);
            }
        }