コード例 #1
0
ファイル: PatientOverview.ascx.cs プロジェクト: aomiit/caisis
        protected void BuildChart()
        {
            Chart1.Series.Clear();

            SessionHandler sh        = new SessionHandler(Session);
            int            patientId = sh.GetPatientId();

            ChronoDa da = new ChronoDa();
            DataSet  ds = da.GetChronoList(patientId, "LabTests", Page.User.Identity.Name);

            DataView view = new DataView();

            string varName = "PSA";

            view           = ds.Tables[0].DefaultView;
            view.RowFilter = "VarName = '" + varName + "'";

            string seriesName = varName;

            Chart1.Series.Add(seriesName);
            Chart1.Series[seriesName]["ShowMarkerLines"] = "True";
            Chart1.Series[seriesName].BorderWidth        = 2;
            Chart1.Series[seriesName].ShadowOffset       = 1;
            Chart1.Series[seriesName].ShadowColor        = System.Drawing.Color.DarkGray;
            Chart1.Series[seriesName].Color       = Color.Red;
            Chart1.Series[seriesName].ChartType   = SeriesChartType.Line;
            Chart1.Series[seriesName].MarkerStyle = MarkerStyle.Circle;
            Chart1.Series[seriesName].MarkerSize  = 7;
            Chart1.Series[seriesName].Points.DataBind(view, "varDate", "varValue", "Tooltip=varDate, Label=varValue");


            Chart1.DataBind();
        }
コード例 #2
0
    private DataTable GetLabs()
    {
        int patientId = sh.GetPatientId();

        ChronoDa  da        = new ChronoDa();
        DataTable labValues = da.GetChronoList(patientId, LAB_TEST_VARNAME, User.Identity.Name).Tables[0];

        labValues.Columns.Add("LabDate", System.Type.GetType("System.DateTime"));
        labValues.Columns.Add("LabResult", System.Type.GetType("System.Double"));

        if (labValues.Rows.Count > 0)
        {
            for (int i = 0; i < labValues.Rows.Count; i++)
            {
                DataRow row = labValues.Rows[i];

                DateTime d = new DateTime();
                if (DateTime.TryParse(row["varDate"].ToString(), out d))
                {
                    row["LabDate"] = d;

                    Double v = new Double();
                    if (Double.TryParse(row["varValue"].ToString(), out v))
                    {
                        row["LabResult"] = v;
                    }
                    else if (row["varValue"].ToString().StartsWith("<") && Double.TryParse(row["varValue"].ToString().Substring(1), out v))
                    {
                        row["LabResult"] = v;
                    }
                    else
                    {
                        if (!LabHasBadPoints.Contains(row["varName"].ToString()))
                        {
                            LabHasBadPoints.Add(row["varName"].ToString());
                        }
                    }
                }
                else // remove rows without dates, can't be graphed
                {
                    if (!LabHasBadPoints.Contains(row["varName"].ToString()))
                    {
                        LabHasBadPoints.Add(row["varName"].ToString());
                    }
                    labValues.Rows.Remove(labValues.Rows[i]);
                    i -= 1;
                }
            }


            labValues.Columns["varDate"].ColumnName = "varDateString";
            labValues.Columns["LabDate"].ColumnName = "varDate";

            labValues.Columns["varValue"].ColumnName  = "varValueString";
            labValues.Columns["LabResult"].ColumnName = "varValue";
        }

        return(labValues);
    }
コード例 #3
0
    private void PublishChronList(bool excludeLabValues)
    {
        SessionHandler sh        = new SessionHandler(Session);
        int            patientId = sh.GetPatientId();
        bool           isLabTest = selectedOption == "LabTests";

        if (isLabTest)
        {
            excludeLabValues = false;
        }
        // moved to ViewTypeSelectorItemCreate
        // ListTypeDisplay.Text = selectedOption;

        //if no listType is passed in Query String, and listType is not ItemsMissed or ItemsPending chronList Name is emptry string and will default to Most Relevant list
        ChronoDa da = new ChronoDa();
        DataSet  ds = da.GetChronoList(patientId, selectedOption, User.Identity.Name, excludeLabValues);
        DataView chronDataSource = ds.Tables[0].DefaultView;

        if (isLabTest)
        {
            // during first load, build list and select value based on current session
            if (!Page.IsPostBack)
            {
                FillLabTestCheckBox(ds);
                SetLabCheckboxes(ds);
            }

            if (Session[SessionKey.LabsFilter] != null && !Session[SessionKey.LabsFilter].ToString().Equals(""))
            {
                string filter = "VarName IN (" + Session[SessionKey.LabsFilter] + ")";
                chronDataSource.RowFilter = filter;
            }

            LabTestFilter.Visible = true;
        }
        else if (selectedOption == "ListAll" || selectedOption == "ListCommon")
        {
            HideShowLabsBtnTd.Visible = true;
            if (excludeLabValues)
            {
                HideShowLabsBtn.ImageUrl = "../../Images/Button_IncludeLabsOff.png";
            }
            else
            {
                HideShowLabsBtn.ImageUrl = "../../Images/Button_IncludeLabsOn.png";
            }
        }
        else
        {
            LabTestFilter.Visible = false;
        }

        rptChrono.DataSource = chronDataSource;
        rptChrono.DataBind();

        recordCount = chronDataSource.Count;
    }
コード例 #4
0
 /// <summary>
 /// Builds the PSA chart for patient by lab types
 /// </summary>
 /// <param name="patientId"></param>
 /// <param name="varTypes"></param>
 public void BuildChart(int patientId, IEnumerable <string> varTypes)
 {
     if (!string.IsNullOrEmpty(ChronVarName))
     {
         ChronoDa  da = new ChronoDa();
         DataSet   ds = da.GetChronoList(patientId, ChronVarName, System.Web.HttpContext.Current.User.Identity.Name);
         DataTable dt = ds.Tables[0];
         BuildChart(dt, varTypes);
     }
 }
コード例 #5
0
        protected void BuildSurgicalHistory()
        {
            PopulateProstatectomyDetails();

            ChronoDa da        = new ChronoDa();
            int      patientId = (int)Session[SessionKey.PatientId];

            // build a list of prior surgeries
            DataTable proceduresTable = da.GetChronoList(patientId, "Procedures", Page.User.Identity.Name).Tables[0];
        }
コード例 #6
0
        protected void BuildSurgicalHistory()
        {
            ChronoDa da = new ChronoDa();
            DataSet  ds;

            ds = da.GetChronoList(this._patientId, "Procedures", Page.User.Identity.Name);

            if (ds.Tables[0].Rows.Count > 0)
            {
                rptSurgicalHistory.DataSource = ds.Tables[0].DefaultView;
                rptSurgicalHistory.DataBind();
                NoSurgicalHistoryMsgTr.Visible = false;
            }
        }
コード例 #7
0
        protected void BuildChronList(object sender, EventArgs e)
        {
            if (Session[SessionKey.PatientId] != null && !Session[SessionKey.PatientId].ToString().Equals(""))
            {
                string chronListType = ChronType.SelectedValue;
                int    patientID     = (int)Session[SessionKey.PatientId];

                ChronoDa da = new ChronoDa();
                DataSet  ds = da.GetChronoList(patientID, chronListType, User.Identity.Name);

                rptChrono.DataSource = ds.Tables[0].DefaultView;
                rptChrono.DataBind();
                recordCount = ds.Tables[0].Rows.Count;
            }
        }
コード例 #8
0
        protected void BuildSurgicalHistory()
        {
            ChronoDa da        = new ChronoDa();
            int      patientId = (int)Session[SessionKey.PatientId];

            // get a list of non-prostatectomy/biopsy procedures
            IEnumerable <Procedure> procedures = GetProcedures();
            DataView proceduresView            = procedures.AsDataView <Procedure>();
            int      prostateProceduresCount   = proceduresView.Count;
            bool     hasProstateProcedures     = prostateProceduresCount > 0;

            PriorSurgeriesGrid.VisibleBlankRows = hasProstateProcedures ? 0 : 2;
            PriorSurgeriesGrid.DataSource       = proceduresView;
            PriorSurgeriesGrid.DataBind();

            // set yes/no
            if (hasProstateProcedures)
            {
                AdditionalAbsentEvent.YesChecked = true;
            }
        }
コード例 #9
0
ファイル: UroBladNP.ascx.cs プロジェクト: aomiit/caisis
        protected void BuildSurgicalHistory()
        {
            if (patientID != 0)
            {
                ChronoDa da = new ChronoDa();
                DataSet  ds = da.GetChronoList(this.patientID, "Procedures", Context.User.Identity.Name);

                if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    SurgicalHistory.DataSource = ds.Tables[0].DefaultView;
                    SurgicalHistory.DataBind();

                    if (ds.Tables[0].Rows.Count > 3)
                    {
                        SurgicalHistoryCell1.RowSpan = 5;
//						SurgicalHistoryCell1.Attributes["class"] = "FormInnerRowRightBorder";
                        SurgicalHistoryCell2.Visible = false;
                        SurgicalHistoryCell3.Visible = false;
                        SurgicalHistoryCell4.Visible = false;
                        SurgicalHistoryCell5.Visible = false;
                    }
                }
            }
        }
コード例 #10
0
ファイル: PatientOverview.ascx.cs プロジェクト: aomiit/caisis
        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();
            }
        }