示例#1
0
        private void FillGrid()
        {
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col;

            if (_showingInfoButton)                       //Security.IsAuthorized(Permissions.EhrInfoButton,true)) {
            {
                col           = new ODGridColumn("", 18); //infoButton
                col.ImageList = imageListInfoButton;
                gridMain.Columns.Add(col);
            }
            col = new ODGridColumn("SNOMED CT", 100);
            gridMain.Columns.Add(col);
            //col=new ODGridColumn("Deprecated",75,HorizontalAlignment.Center);
            //gridMain.Columns.Add(col);
            col = new ODGridColumn("Description", 500);
            gridMain.Columns.Add(col);
            col = new ODGridColumn("Used By CQM's", 75);
            gridMain.Columns.Add(col);
            //col=new ODGridColumn("Date Of Standard",100);
            //gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            ODGridRow row;

            if (textCode.Text.Contains(","))
            {
                SnomedList = Snomeds.GetByCodes(textCode.Text);
            }
            else
            {
                SnomedList = Snomeds.GetByCodeOrDescription(textCode.Text);
            }
            if (SnomedList.Count >= 10000)           //Max number of results returned.
            {
                MsgBox.Show(this, "Too many results. Only the first 10,000 results will be shown.");
            }
            List <ODGridRow> listAll = new List <ODGridRow>();

            for (int i = 0; i < SnomedList.Count; i++)
            {
                row = new ODGridRow();
                if (_showingInfoButton)                 //Security.IsAuthorized(Permissions.EhrInfoButton,true)) {
                {
                    row.Cells.Add("0");                 //index of infobutton
                }
                row.Cells.Add(SnomedList[i].SnomedCode);
                //row.Cells.Add("");//IsActive==NotDeprecated
                row.Cells.Add(SnomedList[i].Description);
                row.Cells.Add(EhrCodes.GetMeasureIdsForCode(SnomedList[i].SnomedCode, "SNOMEDCT"));
                row.Tag = SnomedList[i];
                //row.Cells.Add("");
                listAll.Add(row);
            }
            listAll.Sort(SortMeasuresMet);
            for (int i = 0; i < listAll.Count; i++)
            {
                gridMain.Rows.Add(listAll[i]);
            }
            gridMain.EndUpdate();
        }