Esempio n. 1
0
        protected virtual void BuildImagesWithKidneyFindings(int MinNumImageRowsToShow, int minNumBlankImageRows)
        {
            string[] kidneyDx = new string[] { "CT Scan", "MRI", "Ultrasound" };

            DiagnosticDa imagesDa = new DiagnosticDa();
            DataTable    imagesDt = imagesDa.GetDiagnosticsByType(this._patientId, kidneyDx);

            if (imagesDt.Rows.Count > 0)
            {
                // filter to last 18mo
                DataView imagesDv     = new DataView(imagesDt);
                string   imagesFilter = BOL.Diagnostic.DxDate + " >= #" + DateTime.Now.AddMonths(-18).Date.ToShortDateString() + "#";
                imagesFilter      += " AND (";
                imagesFilter      += BOL.Diagnostic.DxTarget + "  LIKE '%CHEST%'";
                imagesFilter      += " OR " + BOL.Diagnostic.DxTarget + "  LIKE '%ABDOMEN%'";
                imagesFilter      += " OR " + BOL.Diagnostic.DxTarget + "  LIKE '%PELVIS%'";
                imagesFilter      += " OR " + BOL.Diagnostic.DxTarget + "  LIKE '%KIDNEY%'";
                imagesFilter      += " OR " + BOL.Diagnostic.DxTarget + "  LIKE '%RENAL%'";
                imagesFilter      += ")";
                imagesDv.RowFilter = imagesFilter;


                imagesDv.Sort = BOL.Diagnostic.DxDate + " ASC";

                DataTable filteredImagesDt = imagesDv.ToTable();



                // check for older intitial CT/US
                DataView olderImagesDv     = new DataView(imagesDt);
                string   olderImagesFilter = BOL.Diagnostic.DxDate + " < #" + DateTime.Now.AddMonths(-18).Date.ToShortDateString() + "#";
                olderImagesFilter      += " AND " + BOL.Diagnostic.DxType + " <> 'MRI'";
                olderImagesFilter      += " AND (";
                olderImagesFilter      += BOL.Diagnostic.DxTarget + "  LIKE '%CHEST%'";
                olderImagesFilter      += " OR " + BOL.Diagnostic.DxTarget + "  LIKE '%ABDOMEN%'";
                olderImagesFilter      += " OR " + BOL.Diagnostic.DxTarget + "  LIKE '%PELVIS%'";
                olderImagesFilter      += " OR " + BOL.Diagnostic.DxTarget + "  LIKE '%KIDNEY%'";
                olderImagesFilter      += " OR " + BOL.Diagnostic.DxTarget + "  LIKE '%RENAL%'";
                olderImagesFilter      += ")";
                olderImagesDv.RowFilter = olderImagesFilter;
                olderImagesDv.Sort      = BOL.Diagnostic.DxDate + " ASC";

                if (olderImagesDv.Count > 0)
                {
                    filteredImagesDt.ImportRow(olderImagesDv[0].Row);
                    DataView repeaterDV = new DataView(filteredImagesDt);
                    repeaterDV.Sort  = BOL.Diagnostic.DxDate + " ASC";
                    filteredImagesDt = repeaterDV.ToTable();
                }


                images.DataSource = filteredImagesDt;
                images.DataBind();
            }
        }
Esempio n. 2
0
        protected void BuildImagesMamograms(int PatientID)
        {
            DiagnosticDa imagesDa = new DiagnosticDa();
            DataTable    imagesDt = imagesDa.GetDiagnosticsByType(PatientID, "Mammogram");

            if (imagesDt.Rows.Count > 0)
            {
                images.DataSource = imagesDt.DefaultView;
                images.DataBind();
            }
        }
Esempio n. 3
0
        protected virtual void BuildImagesWithKidneyFindings(int MinNumImageRowsToShow, int minNumBlankImageRows)
        {
            if (patientID != 0)
            {
                string[] kidneyDx = new string[] { "CT Scan", "MRI", "Ultrasound" };

                DiagnosticDa imagesDa = new DiagnosticDa();
//                DataTable imagesDt = imagesDa.GetImagingAll(this.patientID);
                DataTable imagesDt = imagesDa.GetDiagnosticsByType(this.patientID, kidneyDx);

                if (imagesDt.Rows.Count > 0)
                {
                    // filter to last 18mo
                    DataView imagesDv     = new DataView(imagesDt);
                    string   imagesFilter = BOL.Diagnostic.DxDate + " >= #" + DateTime.Now.AddMonths(-18).Date.ToShortDateString() + "#";
                    imagesFilter      += " AND (";
                    imagesFilter      += BOL.Diagnostic.DxTarget + "  LIKE '%CHEST%'";
                    imagesFilter      += " OR " + BOL.Diagnostic.DxTarget + "  LIKE '%ABDOMEN%'";
                    imagesFilter      += " OR " + BOL.Diagnostic.DxTarget + "  LIKE '%PELVIS%'";
                    imagesFilter      += " OR " + BOL.Diagnostic.DxTarget + "  LIKE '%KIDNEY%'";
                    imagesFilter      += " OR " + BOL.Diagnostic.DxTarget + "  LIKE '%RENAL%'";
                    imagesFilter      += ")";
                    imagesDv.RowFilter = imagesFilter;


                    imagesDv.Sort = BOL.Diagnostic.DxDate + " ASC";

                    DataTable filteredImagesDt = imagesDv.ToTable();



                    // check for older intitial CT/US
                    DataView olderImagesDv     = new DataView(imagesDt);
                    string   olderImagesFilter = BOL.Diagnostic.DxDate + " < #" + DateTime.Now.AddMonths(-18).Date.ToShortDateString() + "#";
                    olderImagesFilter      += " AND " + BOL.Diagnostic.DxType + " <> 'MRI'";
                    olderImagesFilter      += " AND (";
                    olderImagesFilter      += BOL.Diagnostic.DxTarget + "  LIKE '%CHEST%'";
                    olderImagesFilter      += " OR " + BOL.Diagnostic.DxTarget + "  LIKE '%ABDOMEN%'";
                    olderImagesFilter      += " OR " + BOL.Diagnostic.DxTarget + "  LIKE '%PELVIS%'";
                    olderImagesFilter      += " OR " + BOL.Diagnostic.DxTarget + "  LIKE '%KIDNEY%'";
                    olderImagesFilter      += " OR " + BOL.Diagnostic.DxTarget + "  LIKE '%RENAL%'";
                    olderImagesFilter      += ")";
                    olderImagesDv.RowFilter = olderImagesFilter;
                    olderImagesDv.Sort      = BOL.Diagnostic.DxDate + " ASC";

                    if (olderImagesDv.Count > 0)
                    {
                        filteredImagesDt.ImportRow(olderImagesDv[0].Row);
                        DataView repeaterDV = new DataView(filteredImagesDt);
                        repeaterDV.Sort  = BOL.Diagnostic.DxDate + " ASC";
                        filteredImagesDt = repeaterDV.ToTable();
                    }



                    int numBlankImageRows = MinNumImageRowsToShow - filteredImagesDt.Rows.Count;

                    // be sure you have at least the number of blank rows specified earlier
                    if (numBlankImageRows < minNumBlankImageRows)
                    {
                        numBlankImageRows = minNumBlankImageRows;
                    }

                    // add the blank rows
                    for (int i = 0; i < numBlankImageRows; i++)
                    {
                        DataRow blankImageRow;
                        blankImageRow = filteredImagesDt.NewRow();
                        blankImageRow[BOL.Diagnostic.DxDateText] = "/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/";
                        blankImageRow[BOL.Diagnostic.DxType]     = "";
                        blankImageRow[BOL.Diagnostic.DxResult]   = "";
                        blankImageRow[BOL.Diagnostic.DxNotes]    = "";
                        blankImageRow[BOL.Diagnostic.DxTarget]   = "";
                        filteredImagesDt.Rows.Add(blankImageRow);
                    }

                    images.DataSource = filteredImagesDt;
                }
                else
                {
                    images.DataSource = BlankImages(MinNumImageRowsToShow).DefaultView;
                }
            }
            else
            {
                images.DataSource = BlankImages(MinNumImageRowsToShow).DefaultView;
            }

            images.DataBind();
        }