Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="yearValue"></param>
        private void RunReport(string yearValue)
        {
            SelectYearLabel.Text = "<br/><br/><strong>Surgeries for the year:</strong> ";

            ReportDa da = new ReportDa();
            DataSet  ds = da.GetSurgeriesByDate(yearValue);

            if (ds.Tables.Count != 0)
            {
                reportResults.DataSource = ds.Tables[0].DefaultView;
                reportResults.DataBind();

                // log report view
                base.LogReportView();

                if (ds.Tables[0].Rows.Count == 0)
                {
                    resultMessage = "There are no records for " + yearValue + ".";
                }
            }

            if (yearValue.Equals("All") || yearValue.Equals(""))
            {
                displayDate = true;
            }
        }
        protected void SortAndBindRecords(string sortCriteria)
        {
            string datasetSql = CacheManager.GetDatasetSQL(Session[SessionKey.DatasetId]);

            ReportDa  da     = new ReportDa();
            DataTable sortdt = da.GetNeuroSpecimenMissingCyto(datasetSql);

            string SortField;

            switch (sortCriteria)
            {
            case "PtName":
                SortField = "PtLastName";
                SortData(sortdt, SortField);
                break;

            case "PtMRN":
                SortField = "PtMRN";
                SortData(sortdt, SortField);
                break;

            case "PathDate":
                SortField = "PathDate";
                SortData(sortdt, SortField);
                break;

            case "PathHistology":
                SortField = "PathHistology";
                SortData(sortdt, SortField);
                break;
            }

            reportResults.DataSource = sortdt.DefaultView;
            reportResults.DataBind();
        }
Exemplo n.º 3
0
        protected void ExportToExcelClick(object sender, EventArgs e)
        {
            ReportDa da = new ReportDa();
            DataView surgeryReportView = GetReportsDataView();

            base.ExportToExcel(surgeryReportView);
        }
Exemplo n.º 4
0
        protected void SortAndBindRecords(string sortCriteria)
        {
            string datasetSql = CacheManager.GetDatasetSQL(Session[SessionKey.DatasetId]);

            ReportDa  da     = new ReportDa();
            DataTable sortdt = da.GetNeuroPendingItems(datasetSql);

            string SortField;

            switch (sortCriteria)
            {
            case "PtName":
                SortField = "PtFirstName";
                SortData(sortdt, SortField);
                break;

            case "PtMRN":
                SortField = "PtMRN";
                SortData(sortdt, SortField);
                break;

            case "VitalStatus":
                SortField = "VitalStatus";
                SortData(sortdt, SortField);
                break;

            case "LastAccessed":
                SortField = "LastAccessed";
                SortData(sortdt, SortField);
                break;
            }

            reportResults.DataSource = sortdt.DefaultView;
            reportResults.DataBind();
        }
Exemplo n.º 5
0
        /// <summary>
        /// Gets a report of surveys OR letters sent by date range
        /// </summary>
        /// <param name="physicianName"></param>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <returns></returns>
        private DataView GetReportsDataView()
        {
            string   docName    = PhysiciansSelect.SelectedValue;
            DateTime clinicDate = !string.IsNullOrEmpty(ClinicDateField.Value) ? DateTime.Parse(ClinicDateField.Value) : DateTime.Today;

            DataView dw = ReportDa.GetClinicScreeningList(docName, clinicDate.ToShortDateString());

            return(dw);
        }
Exemplo n.º 6
0
        protected void ExportToExcelClick(object sender, EventArgs e)
        {
            string physicianName = PhysiciansSelect.SelectedValue;

            ReportDa da = new ReportDa();
            DataView surgeryReportView = GetReportsDataView(physicianName);

            base.ExportToExcel(surgeryReportView);
        }
        /// <summary>
        /// Gets a report for a physician by month range
        /// </summary>
        /// <param name="physicianName"></param>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <returns></returns>
        private DataView GetReportsDataView(string physicianName, string procedureType)
        {
            DateTime startDate = !string.IsNullOrEmpty(StartDateField.Value) ? DateTime.Parse(StartDateField.Value) : DateTime.Today;
            DateTime endDate   = !string.IsNullOrEmpty(EndDateField.Value) ? DateTime.Parse(EndDateField.Value) : DateTime.Today;

            ReportDa da = new ReportDa();
            DataView surgeryReportView = da.GetUrologySurgerySummary(physicianName, startDate, endDate, procedureType);

            return(surgeryReportView);
        }
Exemplo n.º 8
0
        /// <summary>
        /// Gets a report for a physician by month range
        /// </summary>
        /// <param name="physicianName"></param>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <returns></returns>
        private DataView GetReportsDataView()
        {
            DateTime startDate = !string.IsNullOrEmpty(StartDateField.Value) ? DateTime.Parse(StartDateField.Value) : DateTime.Today;
            DateTime endDate   = !string.IsNullOrEmpty(EndDateField.Value) ? DateTime.Parse(EndDateField.Value) : DateTime.Today;

            ReportDa  da          = new ReportDa();
            DataTable reportTable = da.GetNephrectomyCREATReport(startDate, endDate);
            DataView  reportView  = GFRView(reportTable);

            return(reportView);
        }
Exemplo n.º 9
0
        /// <summary>
        /// Gets appointments report for a physician by date range
        /// </summary>
        private DataView GetReportsDataView(string physicianName)
        {
            DateTime startDate = !string.IsNullOrEmpty(StartDateField.Value) ? DateTime.Parse(StartDateField.Value) : DateTime.Today;
            DateTime endDate   = !string.IsNullOrEmpty(EndDateField.Value) ? DateTime.Parse(EndDateField.Value) : DateTime.Today;

            ReportDa  da = new ReportDa();
            DataTable dt = da.GetNursingReport(physicianName, startDate, endDate);

            DataView NursingReportView = dt.DefaultView;

            return(NursingReportView);
        }
Exemplo n.º 10
0
        protected override void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);

            // patient header
            PatientMRN         = patientMRN;
            PatientDisplayName = (patientFirstName ?? "") + " " + (patientLastName ?? "");
            AppointmentDate    = DateTime.Now;

            DataView prostateQOLResults = ReportDa.GetProstateQOLResults(patientID);

            if (prostateQOLResults.Count > 0)
            {
                patientHadRP = true;

                DateTime  rpDate  = AnalyzePatientHistory(prostateQOLResults);
                DataTable surveys = AnalyzeSurveys(patientID, rpDate);

                // TODO: handle expected outcomes
                // if (weHaveDataForOutcomes) { showAdditionalSeries(...); }
                PatientOutcomesServiceAdapter outcomesAdapter = new PatientOutcomesServiceAdapter(Request.PhysicalApplicationPath);
                PatientOutcomesResults        results         = outcomesAdapter.GetPatientOutcomes(patientID);

                outcomesAdapter.AddErectileOutcomesToChart(EFChart, results);
                outcomesAdapter.AddUrinaryOutcomesToChart(UFChart, results);

                // ef/uf "survival" predictions
                PopulateFunctionPredictions(results, rpDate);

                HandleAlerts();

                if (LastSurveyDate.HasValue && surveys.Rows.Count > 0)
                {
                    showSurveyResponses  = true;
                    LastSurveyIsBaseline = LastSurveyDate.Value <= rpDate;

                    GetRecentSurveyReponses(surveys);
                }

                PopulateNomogramScores(patientID, rpDate, results);

                RPDate = rpDate;
            }

            SetControlValues();
            BuildQOLReportLabTests();
            GetLastProblemPlans();
        }
Exemplo n.º 11
0
        protected void ExcelBtn_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            ReportDa  da = new ReportDa();
            DataSet   ds = da.GetPostOpFollowUp(_opType, _institution, _surgeon, _monthsSinceSurgery, _monthsSincePSA, datasetSql);
            DataTable dt = ds.Tables[0];

            if (dt.Rows.Count > 0)
            {
                // should remove date text and irrelevant columns
                dt.Columns.Remove("PatientId");
                dt.Columns.Remove("PtBirthDate");
                dt.Columns.Remove("SurgDate");
                dt.Columns.Remove("LabDate");
                dt.Columns.Remove("ActionDate");
                dt.Columns.Remove("LastFollowUpDate");

                // these columns only apply to ln
                if (_opType.ToLower().Equals("rp") || _opType.ToLower().Equals("lp"))
                {
                    dt.Columns.Remove("PathHistology");
                    dt.Columns.Remove("LastFollowUpDateText");
                    dt.Columns.Remove("MonthsToLastFollowUp");
                    dt.Columns.Remove("MonthsSinceFollowUp");
                }

                // these columsn only apply to rp and lp
                if (_opType.ToLower().Equals("ln"))
                {
                    dt.Columns.Remove("LabTest");
                    dt.Columns.Remove("LabDateText");
                    dt.Columns.Remove("LabResult");
                    dt.Columns.Remove("PostOpPSAs");
                    dt.Columns.Remove("MonthsSincePSA");
                    dt.Columns.Remove("ActionDateText");
                    dt.Columns.Remove("ActionItem");
                    dt.Columns.Remove("ActionNotes");
                }

                DataView view = ds.Tables[0].DefaultView;
                // write to excel
                base.ExportToExcel(view);
            }
            else
            {
                resultMessage.Text = "<br><br>There are no " + _institution + " " + _opType + " patients for " + _surgeon + " outside of " + _monthsSinceSurgery + " months for follow-up.";
            }
        }
Exemplo n.º 12
0
        // get the source data for the charts
        private void Init()
        {
            if (initialized)
            {
                return;
            }

            DataView prostateQOLResults = ReportDa.GetProstateQOLResults(patientId);

            if (prostateQOLResults.Count > 0)
            {
                // the query excludes null rp dates
                DateTime rpDate = (DateTime)prostateQOLResults[0]["RPDate"];

                AnalyzeSurveys(patientId, rpDate);
            }

            initialized = true;
        }
Exemplo n.º 13
0
        override protected void Page_Load(object sender, System.EventArgs e)
        {
            datasetSql = CacheManager.GetDatasetSQL(Session[SessionKey.DatasetId]);

            ReportDa  da = new ReportDa();
            DataTable dt = da.GetNeuroSpecimenMissingCyto(datasetSql);

            if (dt.Rows.Count > 0)
            {
                reportResults.DataSource = dt.DefaultView;
                reportResults.DataBind();

                // log report view
                base.LogReportView();

                resultMessage = "There are " + dt.Rows.Count + " missing Cytogenetic reports for specimen patients";
            }
            else
            {
                resultMessage = "There are no missing Cytogenetic reports for specimen patients";
            }
        }
Exemplo n.º 14
0
        protected override void Page_Load(object sender, System.EventArgs e)
        {
            datasetSql = CacheManager.GetDatasetSQL(Session[SessionKey.DatasetId]);

            ReportDa da = new ReportDa();
            DataSet  ds = da.GetMissingCatheterRemovalPatients(datasetSql);

            if (ds.Tables.Count > 0)
            {
                DataView view = ds.Tables[0].DefaultView;
                // BaseReportPage.LogReport();
                reportResults.DataSource = view;
                reportResults.DataBind();

                // log report view
                base.LogReportView();
            }
            else
            {
                resultMessage = "There are no patients missing catheter removal.";
            }
        }
Exemplo n.º 15
0
        override protected void Page_Load(object sender, System.EventArgs e)
        {
            datasetSql = CacheManager.GetDatasetSQL(Session[SessionKey.DatasetId]);

            ReportDa  da = new ReportDa();
            DataTable dt = da.GetNeuroPendingItems(datasetSql);

            if (dt.Rows.Count > 0)
            {
                reportResults.DataSource = dt.DefaultView;
                reportResults.DataBind();

                // log report view
                base.LogReportView();

                resultMessage = +dt.Rows.Count + " patient(s) returned";
            }
            else
            {
                resultMessage = "There are no neuro patients with pending items";
            }
        }
Exemplo n.º 16
0
        override protected void Page_Load(object sender, System.EventArgs e)
        {
            //defaults
            RP_LP_Panel.Visible = false;
            LN_Panel.Visible    = false;


            if (Page.IsPostBack)
            {
                resultMessage.Text = "";

                _opType             = OpType.SelectedValue;
                _surgeon            = OpSurgeon.SelectedValue;
                _institution        = OpInstitution.SelectedValue;
                _monthsSinceSurgery = int.Parse(DateRange.SelectedValue);
                _monthsSincePSA     = int.Parse(MonthsSincePSA.SelectedValue);
                datasetSql          = CacheManager.GetDatasetSQL(Session[SessionKey.DatasetId]);

                // calculate date from today

                ReportDa da = new ReportDa();
                DataSet  ds = da.GetPostOpFollowUp(_opType, _institution, _surgeon, _monthsSinceSurgery, _monthsSincePSA, datasetSql);

                recordCount = ds.Tables[0].Rows.Count;

                if (recordCount > 0)
                {
                    string sortBy = "PtMrn ASC";

                    if (Request.Form["__EVENTTARGET"] != null && !Request.Form["__EVENTTARGET"].Equals(""))
                    {
                        if (Request.Form["__EVENTTARGET"].Equals("SortByName"))
                        {
                            sortBy = "PtLastName";
                        }
                        else if (Request.Form["__EVENTTARGET"].Equals("SortByMonthsSinceSurgery"))
                        {
                            sortBy = "MonthsSinceSurgery";
                        }
                        else if (Request.Form["__EVENTTARGET"].Equals("SortByMonthsSincePSA"))
                        {
                            sortBy = "MonthsSincePSA";
                        }
                    }


                    if (_opType.Equals("RP") || _opType.Equals("LP"))
                    {
                        RP_LP_Panel.Visible = true;

                        DataView dv1 = ds.Tables[0].DefaultView;

                        dv1.Sort = sortBy;

                        RP_LP_Repeater.DataSource = dv1;

                        RP_LP_Repeater.DataBind();
                    }
                    else if (_opType.Equals("LN"))
                    {
                        LN_Panel.Visible = true;

                        DataView dv2 = ds.Tables[0].DefaultView;

                        dv2.Sort = sortBy;

                        LN_Repeater.DataSource = dv2;

                        LN_Repeater.DataBind();
                    }

                    // log report view
                    base.LogReportView();
                }
                else
                {
                    resultMessage.Text = "<br><br>There are no " + _institution + " " + _opType + " patients for " + _surgeon + " outside of " + _monthsSinceSurgery + " months of surgery and " + _monthsSincePSA + " months of PSA for follow-up.";
                }
            }
            else             // not a post back; set defaults
            {
                InstitutionDa iDa = new InstitutionDa();

                // populate dropdown with distinct institutions from surgeries table
                DataTable instDt = iDa.GetDistinctSurgeryInstitution().Tables[0];
                OpInstitution.DataSource     = instDt.DefaultView;
                OpInstitution.DataTextField  = instDt.Columns[0].ColumnName;
                OpInstitution.DataValueField = instDt.Columns[0].ColumnName;
                OpInstitution.DataBind();

                // populate drop down with distint surgeons from surgeries table
                ReportDa  rptDa  = new ReportDa();
                DataTable surgDt = rptDa.GetDistinctSurgeons().Tables[0];
                OpSurgeon.DataSource     = surgDt.DefaultView;
                OpSurgeon.DataTextField  = surgDt.Columns[0].ColumnName;
                OpSurgeon.DataValueField = surgDt.Columns[0].ColumnName;
                OpSurgeon.DataBind();
                OpSurgeon.Items.Add("All");

                OpType.Items.Add("RP");
                OpType.Items.Add("LP");
                OpType.Items.Add("LN");

                DateRange.Items.Add("0");
                DateRange.Items.Add("3");
                DateRange.Items.Add("6");
                DateRange.Items.Add("12");
                DateRange.Items.Add("24");

                MonthsSincePSA.Items.Add("0");
                MonthsSincePSA.Items.Add("3");
                MonthsSincePSA.Items.Add("6");
                MonthsSincePSA.Items.Add("12");
                MonthsSincePSA.Items.Add("24");

                reportTitle = "Post Operation Follow Up Patients";
            }
        }