Exemplo n.º 1
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.º 2
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;
        }