예제 #1
0
        private void FillGridScreenPat()
        {
            ListScreenPats = ScreenPats.GetForScreenGroup(ScreenGroupCur.ScreenGroupNum);
            ListPats       = Patients.GetPatsForScreenGroup(ScreenGroupCur.ScreenGroupNum);
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col;

            col = new ODGridColumn(Lan.g(this, "PatNum"), 80);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Name"), 300);
            gridMain.Columns.Add(col);
//todo: birthdate
            col = new ODGridColumn(Lan.g(this, "Age"), 80);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Race"), 80);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Gender"), 80);
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < ListPats.Count; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(ListPats[i].PatNum.ToString());
                row.Cells.Add(ListPats[i].GetNameLF());
                row.Cells.Add(ListPats[i].Age.ToString());
                row.Cells.Add(ListPats[i].Race.ToString());
                row.Cells.Add(ListPats[i].Gender.ToString());
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }
예제 #2
0
        private void FillGrid()
        {
            ZipCodes.RefreshCache();
            _listZipCodes = ZipCodes.GetDeepCopy();
            gridZipCode.BeginUpdate();
            gridZipCode.ListGridColumns.Clear();
            GridColumn col;

            col = new GridColumn(Lan.g(this, "ZipCode"), 75);
            gridZipCode.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g(this, "City"), 270);
            gridZipCode.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g(this, "State"), 50);
            gridZipCode.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g(this, "Frequent"), 80);
            gridZipCode.ListGridColumns.Add(col);
            gridZipCode.ListGridRows.Clear();
            GridRow row;

            foreach (ZipCode zip in _listZipCodes)
            {
                row = new GridRow();
                row.Cells.Add(zip.ZipCodeDigits);
                row.Cells.Add(zip.City);
                row.Cells.Add(zip.State);
                row.Cells.Add((zip.IsFrequent ? "X" : ""));
                row.Tag = zip;
                gridZipCode.ListGridRows.Add(row);
            }
            gridZipCode.EndUpdate();
        }
예제 #3
0
        private void FillGrid()
        {
            //get PhoneGraphs for this employee num and fill the grid
            List <PhoneGraph> phoneGraphs = PhoneGraphs.GetAllForEmployeeNum(PedCur.EmployeeNum);

            gridGraph.BeginUpdate();
            gridGraph.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g("TablePhoneGraph", "Date"), 70);

            col.TextAlign = HorizontalAlignment.Center;
            gridGraph.Columns.Add(col);
            col           = new ODGridColumn(Lan.g("TablePhoneGraph", "IsGraphed"), 60);
            col.TextAlign = HorizontalAlignment.Center;
            gridGraph.Columns.Add(col);
            gridGraph.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < phoneGraphs.Count; i++)
            {
                if (phoneGraphs[i].DateEntry < DateTime.Today)               //do not show past date entries
                {
                    continue;
                }
                row = new ODGridRow();
                row.Cells.Add(phoneGraphs[i].DateEntry.ToShortDateString());
                row.Cells.Add(phoneGraphs[i].IsGraphed?"X":"");
                row.Tag = phoneGraphs[i];
                gridGraph.Rows.Add(row);
            }
            gridGraph.EndUpdate();
        }
예제 #4
0
        private void FillGrid()
        {
            ContactList = Contacts.Refresh(_listContactCategoryDefs[listCategory.SelectedIndex].DefNum);
            gridMain.BeginUpdate();
            gridMain.ListGridColumns.Clear();
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableContacts", "Last Name"), 100));
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableContacts", "First Name"), 100));
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableContacts", "Wk Phone"), 90));
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableContacts", "Fax"), 90));
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableContacts", "Note"), 250));
            gridMain.ListGridRows.Clear();
            GridRow row;

            foreach (Contact contactCur in ContactList)
            {
                row = new GridRow();
                row.Cells.Add(contactCur.LName);
                row.Cells.Add(contactCur.FName);
                row.Cells.Add(contactCur.WkPhone);
                row.Cells.Add(contactCur.Fax);
                row.Cells.Add(contactCur.Notes);
                gridMain.ListGridRows.Add(row);
            }
            gridMain.EndUpdate();
        }
예제 #5
0
        private void FillElectIDs(long electIDSelect)
        {
            ElectIDs.RefreshCache();
            _listElectIDs = ElectIDs.GetDeepCopy();
            gridElectIDs.BeginUpdate();
            gridElectIDs.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g("TableApptProcs", "Carrier"), 320);

            gridElectIDs.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableApptProcs", "Payer ID"), 80);
            gridElectIDs.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableApptProcs", "Is Medicaid"), 70, HorizontalAlignment.Center);
            gridElectIDs.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableApptProcs", "Comments"), 390);
            gridElectIDs.Columns.Add(col);
            gridElectIDs.Rows.Clear();
            ODGridRow row;
            int       selectedIndex = -1;

            for (int i = 0; i < _listElectIDs.Count; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(_listElectIDs[i].CarrierName);
                row.Cells.Add(_listElectIDs[i].PayorID);
                row.Cells.Add(_listElectIDs[i].IsMedicaid?"X":"");
                row.Cells.Add(_listElectIDs[i].Comments);
                gridElectIDs.Rows.Add(row);
                if (_listElectIDs[i].ElectIDNum == electIDSelect)
                {
                    selectedIndex = i;
                }
            }
            gridElectIDs.EndUpdate();
            gridElectIDs.SetSelected(selectedIndex, true);
        }
예제 #6
0
        private void FillGrid()
        {
            long previousSelected = -1;

            if (gridMain.GetSelectedIndex() != -1)
            {
                previousSelected = _listSchoolCourses[gridMain.GetSelectedIndex()].SchoolCourseNum;
            }
            SchoolCourses.RefreshCache();
            gridMain.BeginUpdate();
            gridMain.ListGridColumns.Clear();
            GridColumn col = new GridColumn(Lan.g("FormSchoolCourses", "Course ID"), 100);

            gridMain.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g("FormEvaluationDefEdit", "Description"), 80);
            gridMain.ListGridColumns.Add(col);
            gridMain.ListGridRows.Clear();
            GridRow row;

            for (int i = 0; i < _listSchoolCourses.Count; i++)
            {
                row = new GridRow();
                row.Cells.Add(_listSchoolCourses[i].CourseID);
                row.Cells.Add(_listSchoolCourses[i].Descript);
                gridMain.ListGridRows.Add(row);
            }
            gridMain.EndUpdate();
        }
예제 #7
0
        private void FillGrid()
        {
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col;

            gridMain.AllowSortingByColumn = true;
            col = new ODGridColumn(Lan.g(this, "Field Name"), 200);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Field Type"), 100);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Hidden"), 150, HorizontalAlignment.Center);
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < _listPatFieldDefs.Count; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(_listPatFieldDefs[i].FieldName);
                row.Cells.Add(_listPatFieldDefs[i].FieldType.ToString());
                row.Cells.Add(_listPatFieldDefs[i].IsHidden?"X":"");
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }
예제 #8
0
 private void FillList()
 {
     Programs.RefreshCache();
     _listPrograms = Programs.GetListDeep();
     if (!PrefC.IsODHQ)
     {
         _listPrograms.RemoveAll(x => x.ProgName == ProgramName.AvaTax.ToString());
     }
     gridProgram.BeginUpdate();
     gridProgram.ListGridColumns.Clear();
     gridProgram.ListGridColumns.Add(new GridColumn("Enabled", 55, HorizontalAlignment.Center));
     gridProgram.ListGridColumns.Add(new GridColumn("Program Name", -1));
     gridProgram.ListGridRows.Clear();
     foreach (Program prog in _listPrograms)
     {
         GridRow row = new GridRow()
         {
             Tag = prog
         };
         Color color = Color.FromArgb(230, 255, 238);
         row.ColorBackG = prog.Enabled ? color : row.ColorBackG;
         GridCell cell = new GridCell(prog.Enabled ? "X" : "");
         row.Cells.Add(cell);
         row.Cells.Add(prog.ProgDesc);
         gridProgram.ListGridRows.Add(row);
     }
     gridProgram.EndUpdate();
 }
예제 #9
0
        private void FillGrid(bool refreshList = true, bool isScrollToSelection = true)
        {
            if (refreshList)
            {
                _listQueries = UserQueries.GetDeepCopy();
            }
            string[] strSearchTerms = Regex.Split(textSearch.Text, @"\W");           //matches any non-word character
            //get all queries that contain ALL of the search terms entered, either in the query text or the query description.
            List <UserQuery> listDisplayQueries = _listQueries
                                                  .Where(x => strSearchTerms.All(y =>
                                                                                 x.QueryText.ToLowerInvariant().Contains(y.ToLowerInvariant()) || x.Description.ToLowerInvariant().Contains(y.ToLowerInvariant())
                                                                                 )).ToList();
            //attempt to preserve the currently selected query.
            long selectedQueryNum = 0;

            if (gridMain.GetSelectedIndex() != -1)
            {
                selectedQueryNum = gridMain.SelectedTag <UserQuery>().QueryNum;
            }
            gridMain.BeginUpdate();
            gridMain.ListGridColumns.Clear();
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g(gridMain.TranslationName, "Query"), 350));
            if (Security.IsAuthorized(Permissions.UserQueryAdmin, true))
            {
                gridMain.ListGridColumns.Add(new GridColumn(Lan.g(gridMain.TranslationName, "Released"), 55, HorizontalAlignment.Center));
            }
            gridMain.ListGridRows.Clear();
            foreach (UserQuery queryCur in listDisplayQueries)
            {
                if (!Security.IsAuthorized(Permissions.UserQueryAdmin, true) && !queryCur.IsReleased)
                {
                    continue;                     //non-released queries only appear for people with UserQueryAdmin permission.
                }
                GridRow row = new GridRow();
                row.Cells.Add(queryCur.Description);
                if (Security.IsAuthorized(Permissions.UserQueryAdmin, true))
                {
                    row.Cells.Add(queryCur.IsReleased ? "X" : "");
                }
                row.Tag = queryCur;
                gridMain.ListGridRows.Add(row);
            }
            gridMain.EndUpdate();
            int selectedIdx = gridMain.ListGridRows.Select(x => (UserQuery)x.Tag).ToList().FindIndex(y => y.QueryNum == selectedQueryNum);

            if (selectedIdx > -1)
            {
                gridMain.SetSelected(selectedIdx, true);
            }
            if (gridMain.GetSelectedIndex() == -1)
            {
                gridMain.SetSelected(0, true);                //can handle values outside of the row count (so if there are no rows, this will not fail)
            }
            if (isScrollToSelection)
            {
                gridMain.ScrollToIndex(gridMain.GetSelectedIndex());                 //can handle values outside of the row count
            }
            RefreshQueryCur();
        }
예제 #10
0
        private void FillGrid()
        {
            RefreshReport();
            gridMain.BeginUpdate();
            ODGridColumn col = null;

            if (gridMain.Columns.Count == 0)
            {
                col = new ODGridColumn(Lan.g(this, "Patient Name"), _colWidthPatName);
                gridMain.Columns.Add(col);
                col = new ODGridColumn(Lan.g(this, "Procedure Date"), _colWidthProcDate);
                gridMain.Columns.Add(col);
                col = new ODGridColumn(Lan.g(this, "Procedure Descipion"), 0);            //Dynaimc width
                gridMain.Columns.Add(col);
                if (PrefC.HasClinicsEnabled)
                {
                    col = new ODGridColumn(Lan.g(this, "Clinic"), _colWidthClinic);
                    gridMain.Columns.Add(col);
                }
                col = new ODGridColumn(Lan.g(this, "Amount"), _colWidthAmount, HorizontalAlignment.Right);
                gridMain.Columns.Add(col);
            }
            gridMain.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < _myReport.ReportObjects.Count; i++)
            {
                if (_myReport.ReportObjects[i].ObjectType != ReportObjectType.QueryObject)
                {
                    continue;
                }
                QueryObject queryObj = (QueryObject)_myReport.ReportObjects[i];
                for (int j = 0; j < queryObj.ReportTable.Rows.Count; j++)
                {
                    row = new ODGridRow();
                    row.Cells.Add(queryObj.ReportTable.Rows[j][0].ToString());                               //Procedure Name
                    row.Cells.Add(PIn.Date(queryObj.ReportTable.Rows[j][1].ToString()).ToShortDateString()); //Procedure Date
                    row.Cells.Add(queryObj.ReportTable.Rows[j][2].ToString());                               //Procedure Description
                    if (PrefC.HasClinicsEnabled)
                    {
                        long clinicNum = PIn.Long(queryObj.ReportTable.Rows[j][5].ToString());
                        if (clinicNum == 0)
                        {
                            row.Cells.Add("Unassigned");
                        }
                        else
                        {
                            row.Cells.Add(Clinics.GetAbbr(clinicNum));
                        }
                    }
                    row.Cells.Add(PIn.Double(queryObj.ReportTable.Rows[j][3].ToString()).ToString("c")); //Amount
                    _procTotalAmt += PIn.Decimal(queryObj.ReportTable.Rows[j][3].ToString());
                    row.Tag        = PIn.Long(queryObj.ReportTable.Rows[j][4].ToString());               //Tag set to ProcNum.  Used in butNewClaims_Click().
                    gridMain.Rows.Add(row);
                }
            }
            gridMain.EndUpdate();
        }
예제 #11
0
        private void FillGrid(bool doReselctRows = true)
        {
            List <long> listSelectedClinicNums = new List <long>();

            if (doReselctRows)
            {
                listSelectedClinicNums = gridMain.SelectedTags <Clinic>().Select(x => x.ClinicNum).ToList();
            }
            gridMain.BeginUpdate();
            gridMain.ListGridColumns.Clear();
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableClinics", "Abbr"), 120));
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableClinics", "Description"), 200));
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableClinics", "Specialty"), 150));
            if (!IsSelectionMode)
            {
                gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableClinics", "Pat Count"), 80, HorizontalAlignment.Center));
                gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableClinics", "Hidden"), 0, HorizontalAlignment.Center));
            }
            gridMain.ListGridRows.Clear();
            GridRow row;
            Dictionary <long, string> dictClinicSpecialtyDescripts = Defs.GetDefsForCategory(DefCat.ClinicSpecialty).ToDictionary(x => x.DefNum, x => x.ItemName);
            List <int> listIndicesToReselect = new List <int>();

            foreach (Clinic clinCur in ListClinics)
            {
                if (!checkShowHidden.Checked && clinCur.IsHidden)
                {
                    continue;
                }
                row = new GridRow();
                row.Cells.Add((clinCur.ClinicNum == 0?"":clinCur.Abbr));
                row.Cells.Add(clinCur.Description);
                string specialty   = "";
                string specialties = string.Join(",", clinCur.ListClinicSpecialtyDefLinks
                                                 .Select(x => dictClinicSpecialtyDescripts.TryGetValue(x.DefNum, out specialty)?specialty:"")
                                                 .Where(x => !string.IsNullOrWhiteSpace(x)));
                row.Cells.Add(specialties);
                if (!IsSelectionMode)                 //selection mode means no IsHidden or Pat Count columns
                {
                    int patCount = 0;
                    _dictClinicalCounts.TryGetValue(clinCur.ClinicNum, out patCount);
                    row.Cells.Add(POut.Int(patCount));
                    row.Cells.Add(clinCur.IsHidden?"X":"");
                }
                row.Tag = clinCur;
                gridMain.ListGridRows.Add(row);
                if (listSelectedClinicNums.Contains(clinCur.ClinicNum))
                {
                    listIndicesToReselect.Add(gridMain.ListGridRows.Count - 1);
                }
            }
            gridMain.EndUpdate();
            if (doReselctRows && listIndicesToReselect.Count > 0)
            {
                gridMain.SetSelected(listIndicesToReselect.ToArray(), true);
            }
        }
예제 #12
0
        private void FillMain()
        {
            int selectedIdx = gridMain.GetSelectedIndex();

            gridMain.BeginUpdate();
            gridMain.ListGridColumns.Clear();
            gridMain.ListGridColumns.Add(new GridColumn("Abbr", 75));
            gridMain.ListGridColumns.Add(new GridColumn("Note", 600));
            gridMain.ListGridRows.Clear();
            if (listCat.SelectedIndex == -1)
            {
                gridMain.EndUpdate();
                return;
            }
            GridRow row;

            _listNotes = _listNotes.OrderBy(x => x.ItemOrder).ToList();
            foreach (QuickPasteNote note in _listNotes)
            {
                if (note.QuickPasteCatNum != _listCats[listCat.SelectedIndex].QuickPasteCatNum)
                {
                    continue;
                }
                row = new GridRow();
                row.Cells.Add(string.IsNullOrWhiteSpace(note.Abbreviation)?"":"?" + note.Abbreviation);
                row.Cells.Add(note.Note.Replace("\r", "").Replace("\n", "").Left(120, true));
                row.Tag = note;
                gridMain.ListGridRows.Add(row);
            }
            gridMain.EndUpdate();
            if (selectedIdx == -1)           //Select the last option.
            {
                gridMain.SetSelected(gridMain.ListGridRows.Count - 1, true);
                gridMain.ScrollToEnd();
            }
            else if (selectedIdx < gridMain.ListGridRows.Count)           //Select the previously selected position.
            {
                gridMain.SetSelected(selectedIdx, true);
            }
        }
예제 #13
0
        private void FillGrid()
        {
            long previousSelectedStateAbbrNum = -1;
            int  newSelectedIdx = -1;

            if (gridMain.GetSelectedIndex() != -1)
            {
                previousSelectedStateAbbrNum = ((StateAbbr)gridMain.ListGridRows[gridMain.GetSelectedIndex()].Tag).StateAbbrNum;
            }
            gridMain.BeginUpdate();
            gridMain.ListGridColumns.Clear();
            GridColumn col = new GridColumn(Lan.g("FormStateAbbrs", "Description"), 175);

            gridMain.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g("FormStateAbbrs", "Abbr"), 70);
            gridMain.ListGridColumns.Add(col);
            if (PrefC.GetBool(PrefName.EnforceMedicaidIDLength))
            {
                col = new GridColumn(Lan.g("FormStateAbbrs", "Medicaid ID Length"), 200);
                gridMain.ListGridColumns.Add(col);
            }
            gridMain.ListGridRows.Clear();
            GridRow          row;
            List <StateAbbr> stateAbbrs = StateAbbrs.GetDeepCopy();

            for (int i = 0; i < stateAbbrs.Count; i++)
            {
                row = new GridRow();
                row.Cells.Add(stateAbbrs[i].Description);
                row.Cells.Add(stateAbbrs[i].Abbr);
                if (PrefC.GetBool(PrefName.EnforceMedicaidIDLength))
                {
                    if (stateAbbrs[i].MedicaidIDLength == 0)
                    {
                        row.Cells.Add("");
                    }
                    else
                    {
                        row.Cells.Add(stateAbbrs[i].MedicaidIDLength.ToString());
                    }
                }
                row.Tag = stateAbbrs[i];
                gridMain.ListGridRows.Add(row);
                if (stateAbbrs[i].StateAbbrNum == previousSelectedStateAbbrNum)
                {
                    newSelectedIdx = i;
                }
            }
            gridMain.EndUpdate();
            gridMain.SetSelected(newSelectedIdx, true);
        }
예제 #14
0
 private void FillGridInternal()
 {
     gridInternal.BeginUpdate();
     gridInternal.Columns.Clear();
     gridInternal.Columns.Add(new ODGridColumn(Lan.g("TableClaimFormsInternal", "ClaimForm"), 150));
     gridInternal.Rows.Clear();
     foreach (ClaimForm internalForm in ClaimForms.GetInternalClaims())
     {
         ODGridRow row = new ODGridRow();
         row.Cells.Add(internalForm.Description);
         row.Tag = internalForm;
         gridInternal.Rows.Add(row);
     }
     gridInternal.EndUpdate();
 }
예제 #15
0
 private void FillAttachments()
 {
     gridAttachments.BeginUpdate();
     gridAttachments.Rows.Clear();
     gridAttachments.Columns.Clear();
     gridAttachments.Columns.Add(new OpenDental.UI.ODGridColumn("", 0));           //No name column, since there is only one column.
     foreach (EmailAttach attachment in _listEmailAttachDisplayed)
     {
         ODGridRow row = new ODGridRow();
         row.Cells.Add(attachment.DisplayedFileName);
         gridAttachments.Rows.Add(row);
     }
     gridAttachments.EndUpdate();
     if (gridAttachments.Rows.Count > 0)
     {
         gridAttachments.SetSelected(0, true);
     }
 }
예제 #16
0
        private void FillGrid()
        {
            gridMain.BeginUpdate();
            GridColumn col = new GridColumn("Date", 70);

            gridMain.ListGridColumns.Add(col);
            col = new GridColumn("Patient", 100);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn("Category", 80);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn("Total Cost", 80);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn("Balance", 80);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn("Due Now", 80);
            gridMain.ListGridColumns.Add(col);
            List <long>     listPayPlanNums = _listValidPayPlans.Select(x => x.PayPlanNum).ToList();
            List <PaySplit> listPaySplits   = PaySplits.GetForPayPlans(listPayPlanNums);
            List <Patient>  listPats        = Patients.GetLimForPats(_listValidPayPlans.Select(x => x.PatNum).ToList());

            for (int i = 0; i < _listValidPayPlans.Count; i++)
            {
                //no db calls are made in this loop because we have all the necessary information already.
                PayPlan planCur = _listValidPayPlans[i];
                Patient patCur  = listPats.Where(x => x.PatNum == planCur.PatNum).FirstOrDefault();
                GridRow row     = new GridRow();
                row.Cells.Add(planCur.PayPlanDate.ToShortDateString());       //date
                row.Cells.Add(patCur.LName + ", " + patCur.FName);            //patient
                if (planCur.PlanCategory == 0)
                {
                    row.Cells.Add(Lan.g(this, "None"));
                }
                else
                {
                    row.Cells.Add(Defs.GetDef(DefCat.PayPlanCategories, planCur.PlanCategory).ItemName);
                }
                row.Cells.Add(PayPlans.GetTotalCost(planCur.PayPlanNum, _listPayPlanCharges).ToString("F"));               //total cost
                row.Cells.Add(PayPlans.GetBalance(planCur.PayPlanNum, _listPayPlanCharges, listPaySplits).ToString("F"));  //balance
                row.Cells.Add(PayPlans.GetDueNow(planCur.PayPlanNum, _listPayPlanCharges, listPaySplits).ToString("F"));   //due now
                row.Tag = planCur.PayPlanNum;
                gridMain.ListGridRows.Add(row);
            }
            gridMain.EndUpdate();
        }
예제 #17
0
        private void FillGrid()
        {
            gridMain.BeginUpdate();
            gridMain.ListGridColumns.Clear();
            GridColumn col = new GridColumn(Lan.g("TableRxManage", "Date"), 70);

            gridMain.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g("TableRxManage", "Drug"), 140);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g("TableRxManage", "Sig"), 0);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g("TableRxManage", "Disp"), 70);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g("TableRxManage", "Refills"), 70);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g("TableRxManage", "Provider"), 70);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g("TableRxManage", "Notes"), 0);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g("TableRxManage", "Missing Info"), 0);
            gridMain.ListGridColumns.Add(col);
            gridMain.ListGridRows.Clear();
            _listRx = RxPats.GetAllForPat(_patCur.PatNum);
            _listRx.Sort(SortByRxDate);
            GridRow row;

            for (int i = 0; i < _listRx.Count; i++)
            {
                row = new GridRow();
                row.Cells.Add(_listRx[i].RxDate.ToShortDateString());
                row.Cells.Add(_listRx[i].Drug);
                row.Cells.Add(_listRx[i].Sig);
                row.Cells.Add(_listRx[i].Disp);
                row.Cells.Add(_listRx[i].Refills);
                row.Cells.Add(Providers.GetAbbr(_listRx[i].ProvNum));
                row.Cells.Add(_listRx[i].Notes);
                row.Cells.Add(SheetPrinting.ValidateRxForSheet(_listRx[i]));
                row.Tag = _listRx[i].Copy();
                gridMain.ListGridRows.Add(row);
            }
            gridMain.EndUpdate();
        }
예제 #18
0
        ///<summary></summary>
        private void FillGridCustom()
        {
            ClaimFormItems.RefreshCache();
            ClaimForms.RefreshCache();
            comboReassign.Items.Clear();
            gridCustom.BeginUpdate();
            gridCustom.Columns.Clear();
            gridCustom.Columns.Add(new ODGridColumn(Lan.g("TableClaimFormsCustom", "ClaimForm"), 145));
            gridCustom.Columns.Add(new ODGridColumn(Lan.g("TableClaimFormsCustom", "Default"), 50, HorizontalAlignment.Center));
            gridCustom.Columns.Add(new ODGridColumn(Lan.g("TableClaimFormsCustom", "Hidden"), 0, HorizontalAlignment.Center));
            gridCustom.Rows.Clear();
            string description;

            foreach (ClaimForm claimFormCur in ClaimForms.GetDeepCopy())
            {
                description = claimFormCur.Description;
                ODGridRow row = new ODGridRow();
                row.Cells.Add(claimFormCur.Description);
                if (claimFormCur.ClaimFormNum == PrefC.GetLong(PrefName.DefaultClaimForm))
                {
                    description += " " + Lan.g(this, "(default)");
                    row.Cells.Add("X");
                }
                else
                {
                    row.Cells.Add("");
                }
                if (claimFormCur.IsHidden)
                {
                    description += " " + Lan.g(this, "(hidden)");
                    row.Cells.Add("X");
                }
                else
                {
                    row.Cells.Add("");
                }
                row.Tag = claimFormCur;
                gridCustom.Rows.Add(row);
                comboReassign.Items.Add(new ODBoxItem <ClaimForm>(description, claimFormCur));
            }
            gridCustom.EndUpdate();
        }
예제 #19
0
        private void FillGrid()
        {
            _listScreenGroups = ScreenGroups.Refresh(PIn.Date(textDateFrom.Text), PIn.Date(textDateTo.Text));
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col;

            col = new ODGridColumn(Lan.g(this, "Date"), 70);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Description"), 140);
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            ODGridRow row;

            foreach (ScreenGroup screenGroup in _listScreenGroups)
            {
                row = new ODGridRow();
                row.Cells.Add(screenGroup.SGDate.ToShortDateString());
                row.Cells.Add(screenGroup.Description);
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }
예제 #20
0
        private void FillGrid()
        {
            ScreenGroupList = ScreenGroups.Refresh(PIn.Date(textDateFrom.Text), PIn.Date(textDateTo.Text));
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col;

            col = new ODGridColumn(Lan.g(this, "Date"), 70);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Description"), 140);
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            ODGridRow row;

            ListViewItem[] items = new ListViewItem[ScreenGroupList.Count];
            for (int i = 0; i < items.Length; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(ScreenGroupList[i].SGDate.ToShortDateString());
                row.Cells.Add(ScreenGroupList[i].Description);
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }
예제 #21
0
 private void FillList()
 {
     Programs.RefreshCache();
     _listPrograms = Programs.GetListDeep();
     gridProgram.BeginUpdate();
     gridProgram.Columns.Clear();
     gridProgram.Columns.Add(new ODGridColumn("Enabled", 55, HorizontalAlignment.Center));
     gridProgram.Columns.Add(new ODGridColumn("Program Name", -1));
     gridProgram.Rows.Clear();
     foreach (Program prog in _listPrograms)
     {
         ODGridRow row = new ODGridRow()
         {
             Tag = prog
         };
         Color color = Color.FromArgb(230, 255, 238);
         row.ColorBackG = prog.Enabled ? color : row.ColorBackG;
         ODGridCell cell = new ODGridCell(prog.Enabled ? "X" : "");
         row.Cells.Add(cell);
         row.Cells.Add(prog.ProgDesc);
         gridProgram.Rows.Add(row);
     }
     gridProgram.EndUpdate();
 }
예제 #22
0
        private void FillTable()
        {
            Referrals.RefreshCache();
            listRef = new List <Referral>();
            for (int i = 0; i < Referrals.List.Length; i++)
            {
                if (!checkHidden.Checked)                 //don't include hidden
                {
                    if (Referrals.List[i].IsHidden)       //if hidden
                    {
                        continue;
                    }
                }
                if (textSearch.Text != "")
                {
                    if (!Referrals.List[i].LName.ToLower().StartsWith(textSearch.Text.ToLower()))                     //no match
                    {
                        continue;
                    }
                }
                listRef.Add(Referrals.List[i]);
            }
            int  scrollValue    = gridMain.ScrollValue;
            long selectedRefNum = -1;

            if (gridMain.GetSelectedIndex() != -1)
            {
                selectedRefNum = ((Referral)gridMain.Rows[gridMain.GetSelectedIndex()].Tag).ReferralNum;
            }
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lans.g("TableSelectRefferal", "LastName"), 150);

            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lans.g("TableSelectRefferal", "FirstName"), 80);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lans.g("TableSelectRefferal", "MI"), 30);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lans.g("TableSelectRefferal", "Title"), 70);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lans.g("TableSelectRefferal", "Specialty"), 60);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lans.g("TableSelectRefferal", "Patient"), 45);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lans.g("TableSelectRefferal", "Note"), 250);
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < listRef.Count; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(listRef[i].LName);
                row.Cells.Add(listRef[i].FName);
                if (listRef[i].MName != "")
                {
                    row.Cells.Add(listRef[i].MName.Substring(0, 1).ToUpper());
                }
                else
                {
                    row.Cells.Add("");
                }
                row.Cells.Add(listRef[i].Title);
                if (listRef[i].IsDoctor)
                {
                    row.Cells.Add(Lan.g("enumDentalSpecialty", ((DentalSpecialty)(listRef[i].Specialty)).ToString()));
                }
                else
                {
                    row.Cells.Add("");
                }
                if (listRef[i].PatNum > 0)
                {
                    row.Cells.Add("X");
                }
                else
                {
                    row.Cells.Add("");
                }
                row.Cells.Add(listRef[i].Note);
                if (listRef[i].IsHidden)
                {
                    row.ColorText = Color.Gray;
                }
                row.Tag = listRef[i];
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
            labelResultCount.Text = gridMain.Rows.Count.ToString() + " results found.";
            gridMain.ScrollValue  = scrollValue;
            for (int i = 0; i < gridMain.Rows.Count; i++)
            {
                if (((Referral)gridMain.Rows[i].Tag).ReferralNum == selectedRefNum)
                {
                    gridMain.SetSelected(i, true);
                    break;
                }
            }
        }
예제 #23
0
        private void FillGrid()
        {
            _listClearinghousesClinicCur.Clear();
            for (int i = 0; i < _listClearinghousesClinicAll.Count; i++)
            {
                if (_listClearinghousesClinicAll[i].ClinicNum == _selectedClinicNum)
                {
                    _listClearinghousesClinicCur.Add(_listClearinghousesClinicAll[i]);
                }
            }
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g(this, "Description"), 150);

            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Export Path"), 230);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Format"), 110);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Is Default"), 60);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Payors"), 0);        //310
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < _listClearinghousesHq.Count; i++)
            {
                Clearinghouse[] listClearinghouseTag = new Clearinghouse[3];            //[0]=clearinghouseHq, [1]=clearinghouseClinic, [2]=clearinghouseCur per ODGridRow
                listClearinghouseTag[0] = _listClearinghousesHq[i].Copy();              //clearinghousehq.
                listClearinghouseTag[2] = _listClearinghousesHq[i].Copy();              //clearinghouseCur. will be clearinghouseHq if clearinghouseClinic doesn't exist.
                for (int j = 0; j < _listClearinghousesClinicCur.Count; j++)
                {
                    if (_listClearinghousesClinicCur[j].HqClearinghouseNum == _listClearinghousesHq[i].ClearinghouseNum)
                    {
                        listClearinghouseTag[1] = _listClearinghousesClinicCur[j];                      //clearinghouseClin
                        listClearinghouseTag[2] = Clearinghouses.OverrideFields(_listClearinghousesHq[i], _listClearinghousesClinicCur[j]);
                        break;
                    }
                }
                Clearinghouse clearinghouseCur = listClearinghouseTag[2];
                row     = new ODGridRow();
                row.Tag = listClearinghouseTag;
                row.Cells.Add(clearinghouseCur.Description);
                row.Cells.Add(clearinghouseCur.ExportPath);
                row.Cells.Add(clearinghouseCur.Eformat.ToString());
                string s = "";
                if (PrefC.GetLong(PrefName.ClearinghouseDefaultDent) == _listClearinghousesHq[i].ClearinghouseNum)
                {
                    s += "Dent";
                }
                if (PrefC.GetLong(PrefName.ClearinghouseDefaultMed) == _listClearinghousesHq[i].ClearinghouseNum)
                {
                    if (s != "")
                    {
                        s += ",";
                    }
                    s += "Med";
                }
                if (PrefC.GetLong(PrefName.ClearinghouseDefaultEligibility) == _listClearinghousesHq[i].ClearinghouseNum &&
                    !CultureInfo.CurrentCulture.Name.EndsWith("CA"))                        //Canadian. en-CA or fr-CA
                {
                    if (s != "")
                    {
                        s += ",";
                    }
                    s += "Elig";
                }
                row.Cells.Add(s);
                row.Cells.Add(clearinghouseCur.Payors);
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }
예제 #24
0
        private void FillGrid()
        {
            DataTable table                = GetIncompleteProcNotes();
            bool      includeNoNotes       = checkNoNotes.Checked;
            bool      includeUnsignedNotes = checkUnsignedNote.Checked;

            gridMain.BeginUpdate();
            //Columns
            gridMain.Columns.Clear();
            ODGridColumn col;

            col = new ODGridColumn(Lan.g(this, "Date"), 80);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Patient Name"), 120);
            gridMain.Columns.Add(col);
            if (Clinics.IsMedicalPracticeOrClinic(Clinics.ClinicNum))
            {
                col = new ODGridColumn(Lan.g(this, "Code"), 150);
                gridMain.Columns.Add(col);
                col = new ODGridColumn(Lan.g(this, "Description"), 220);
                gridMain.Columns.Add(col);
            }
            else
            {
                col = new ODGridColumn(Lan.g(this, "Code"), 150);
                gridMain.Columns.Add(col);
                col = new ODGridColumn(Lan.g(this, "Description"), 220);
                gridMain.Columns.Add(col);
                col = new ODGridColumn(Lan.g(this, "Tth"), 30);
                gridMain.Columns.Add(col);
                col = new ODGridColumn(Lan.g(this, "Surf"), 40);
                gridMain.Columns.Add(col);
            }
            if (includeUnsignedNotes || includeNoNotes)
            {
                col = new ODGridColumn(Lan.g(this, "Incomplete"), 80);
                gridMain.Columns.Add(col);
            }
            if (includeNoNotes)
            {
                col = new ODGridColumn(Lan.g(this, "No Note"), 60);
                gridMain.Columns.Add(col);
            }
            if (includeUnsignedNotes)
            {
                col = new ODGridColumn(Lan.g(this, "Unsigned"), 70);
                gridMain.Columns.Add(col);
            }
            //Rows
            gridMain.Rows.Clear();
            foreach (DataRow row in table.Rows)
            {
                ODGridRow newRow = new ODGridRow();
                newRow.Cells.Add(PIn.Date(row["ProcDate"].ToString()).ToString("d"));
                newRow.Cells.Add(row["PatName"].ToString());
                if (Clinics.IsMedicalPracticeOrClinic(Clinics.ClinicNum))
                {
                    newRow.Cells.Add(row["ProcCode"].ToString());
                    newRow.Cells.Add(row["Descript"].ToString());
                }
                else
                {
                    newRow.Cells.Add(row["ProcCode"].ToString());
                    newRow.Cells.Add(row["Descript"].ToString());
                    newRow.Cells.Add(row["ToothNum"].ToString());
                    newRow.Cells.Add(row["Surf"].ToString());
                }
                if (includeUnsignedNotes || includeNoNotes)
                {
                    newRow.Cells.Add(row["Incomplete"].ToString());
                }
                if (includeNoNotes)
                {
                    newRow.Cells.Add(row["HasNoNote"].ToString());
                }
                if (includeUnsignedNotes)
                {
                    newRow.Cells.Add(row["HasUnsignedNote"].ToString());
                }
                newRow.Tag = row["PatNum"].ToString();
                gridMain.Rows.Add(newRow);
            }
            gridMain.EndUpdate();
        }
예제 #25
0
        private void FillGrid()
        {
            if (textDateStart.errorProvider1.GetError(textDateStart) != "")
            {
                return;
            }
            DateTime dateSince;

            if (textDateStart.Text.Trim() == "")
            {
                dateSince = DateTime.MinValue;
            }
            else
            {
                dateSince = PIn.Date(textDateStart.Text);
            }
            int    monthStart = comboMonthStart.SelectedIndex;
            double aboveAmount;

            if (textOverAmount.errorProvider1.GetError(textOverAmount) != "")
            {
                return;
            }
            if (textOverAmount.Text.Trim() != "")
            {
                aboveAmount = PIn.Double(textOverAmount.Text);
            }
            else
            {
                aboveAmount = 0;
            }
            ArrayList provFilter = new ArrayList();
            ArrayList billFilter = new ArrayList();

            if (comboBoxMultiProv.SelectedIndices[0].ToString() != "0")
            {
                provFilter = comboBoxMultiProv.SelectedIndices;
            }
            if (comboBoxMultiBilling.SelectedIndices[0].ToString() != "0")
            {
                billFilter = comboBoxMultiBilling.SelectedIndices;
            }
            string code1 = "";
            string code2 = "";

            if (textCodeRange.Text.Trim() != "")
            {
                if (textCodeRange.Text.Contains("-"))
                {
                    string[] codeSplit = textCodeRange.Text.Split('-');
                    code1 = codeSplit[0].Trim();
                    code2 = codeSplit[1].Trim();
                }
                else
                {
                    code1 = textCodeRange.Text.Trim();
                    code2 = textCodeRange.Text.Trim();
                }
            }
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            //0=PatNum
            ODGridColumn col = new ODGridColumn(Lan.g("TableTreatmentFinder", "LName"), 100);

            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableTreatmentFinder", "FName"), 100);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableTreatmentFinder", "Contact"), 120);
            gridMain.Columns.Add(col);
            //4=address
            //5=cityStateZip
            col           = new ODGridColumn(Lan.g("TableTreatmentFinder", "Annual Max"), 70);
            col.TextAlign = HorizontalAlignment.Right;
            gridMain.Columns.Add(col);
            col           = new ODGridColumn(Lan.g("TableTreatmentFinder", "Amt Used"), 70);
            col.TextAlign = HorizontalAlignment.Right;
            gridMain.Columns.Add(col);
            col           = new ODGridColumn(Lan.g("TableTreatmentFinder", "Amt Pend"), 70);
            col.TextAlign = HorizontalAlignment.Right;
            gridMain.Columns.Add(col);
            col           = new ODGridColumn(Lan.g("TableTreatmentFinder", "Amt Rem"), 70);
            col.TextAlign = HorizontalAlignment.Right;
            gridMain.Columns.Add(col);
            col           = new ODGridColumn(Lan.g("TableTreatmentFinder", "Treat Plan"), 70);
            col.TextAlign = HorizontalAlignment.Right;
            gridMain.Columns.Add(col);
            col           = new ODGridColumn(Lan.g("TableTreatmentFinder", "Insurance Carrier"), 225);
            col.TextAlign = HorizontalAlignment.Left;
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            Cursor = Cursors.WaitCursor;
            table  = Patients.GetTreatmentFinderList(checkIncludeNoIns.Checked, checkIncludePatsWithApts.Checked, monthStart, dateSince, aboveAmount, provFilter, billFilter, code1, code2);
            ODGridRow row;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                row = new ODGridRow();
                //Temporary filter just showing columns wanted. Probable it will become user defined.
                for (int j = 0; j < table.Columns.Count; j++)
                {
                    if (j == 0 || j == 4 || j == 5 || j == 6 || j == 7)           //PatNum,address,city,State,Zip are just for the export report.
                    {
                        continue;
                    }
                    if (j == 8 && PIn.Double(table.Rows[i][j].ToString()) == 0)
                    {
                        row.Cells.Add("");                        //don't show annual max for patients without ins or patients without annual max
                        continue;
                    }
                    if (j == 9 && PIn.Double(table.Rows[i][8].ToString()) == 0) //if annualmax is 0
                    {
                        row.Cells.Add("");                                      //don't show amount remaining if no annual max
                        continue;
                    }
                    row.Cells.Add(table.Rows[i][j].ToString());
                }
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
            Cursor = Cursors.Default;
        }
예제 #26
0
        private void FillGrid()
        {
            if (!string.IsNullOrEmpty(textDateStart.errorProvider1.GetError(textDateStart)) ||
                !string.IsNullOrEmpty(textOverAmount.errorProvider1.GetError(textOverAmount)))
            {
                return;
            }
            DateTime dateSince   = PIn.Date(textDateStart.Text);
            int      monthStart  = comboMonthStart.SelectedIndex;
            double   aboveAmount = PIn.Double(textOverAmount.Text);

#if DEBUG
            Stopwatch sw = Stopwatch.StartNew();
#endif
            gridMain.BeginUpdate();
            gridMain.ListGridColumns.Clear();
            //0=PatNum
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableTreatmentFinder", "LName"), 100));
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableTreatmentFinder", "FName"), 100));
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableTreatmentFinder", "Contact"), 120));
            //4=address
            //5=cityStateZip
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableTreatmentFinder", "Annual Max"), 80, HorizontalAlignment.Right, GridSortingStrategy.AmountParse));
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableTreatmentFinder", "Amt Used"), 70, HorizontalAlignment.Right, GridSortingStrategy.AmountParse));
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableTreatmentFinder", "Amt Pend"), 70, HorizontalAlignment.Right, GridSortingStrategy.AmountParse));
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableTreatmentFinder", "Amt Rem"), 70, HorizontalAlignment.Right, GridSortingStrategy.AmountParse));
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableTreatmentFinder", "Treat Plan"), 70, HorizontalAlignment.Right, GridSortingStrategy.AmountParse));
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableTreatmentFinder", "Insurance Carrier"), 225));
            if (PrefC.HasClinicsEnabled)
            {
                gridMain.ListGridColumns.Add(new GridColumn(Lan.g("TableTreatmentFinder", "Clinic"), 120));
            }
            gridMain.ListGridRows.Clear();
            Cursor = Cursors.WaitCursor;
            using (DataTable table = RpTreatmentFinder.GetTreatmentFinderList(checkIncludeNoIns.Checked, checkIncludePatsWithApts.Checked, monthStart, dateSince,
                                                                              aboveAmount, comboBoxMultiProv.SelectedTags <Provider>().Select(x => x.ProvNum).ToList(),
                                                                              comboBoxMultiBilling.SelectedTags <Def>().Select(x => x.DefNum).ToList(), codeRangeFilter.StartRange, codeRangeFilter.EndRange,
                                                                              comboClinics.ListSelectedClinicNums, checkBenefitAssumeGeneral.Checked))
            {
                GridRow row;
                foreach (DataRow rowCur in table.Rows)
                {
                    row = new GridRow()
                    {
                        Tag = rowCur
                    };
                    double indMax = PIn.Double(rowCur[8].ToString());
                    double famMax = PIn.Double(rowCur[9].ToString());
                    //Temporary filter just showing columns wanted. Probably it will become user defined.
                    for (int j = 0; j < table.Columns.Count; j++)
                    {
                        //0- PatNum,4-address,5-city,6-State,7-Zip are just for the export, 9-AnnualMaxFam,11-AmtUsedFam,13-AmtPendingFam,15-AmtRemainingFam on new line
                        if (j.In(0, 4, 5, 6, 7, 9, 11, 13, 15) || (j == 18 && !PrefC.HasClinicsEnabled))
                        {
                            continue;
                        }
                        string cellData = rowCur[j].ToString();
                        if (j.In(8, 10, 12, 14))                      //AnnualMax,AmtUsed,AmtPending,AmtRemaining
                        {
                            cellData = (indMax <= 0?"":("I: " + rowCur[j].ToString() + (famMax > 0?"\r\n":""))) + (famMax <= 0?"":("F: " + rowCur[j + 1].ToString()));
                        }
                        row.Cells.Add(cellData);
                    }
                    gridMain.ListGridRows.Add(row);
                }
            }
            gridMain.EndUpdate();
#if DEBUG
            sw.Stop();
            Console.WriteLine("Finished fetching data and filling grid: {0}, Rows: {1}", (sw.Elapsed.Seconds == 0?"":(sw.Elapsed.Seconds + " sec ")) + (sw.Elapsed.TotalMilliseconds - (sw.Elapsed.Seconds * 1000)) + " ms", gridMain.ListGridRows.Count);
#endif
            Cursor = Cursors.Default;
        }
예제 #27
0
 private void FillGridRecipients()
 {
     gridRecipients.BeginUpdate();
     gridRecipients.ListGridColumns.Clear();
     gridRecipients.ListGridColumns.Add(new GridColumn("Pat\r\nNum", 50));
     gridRecipients.ListGridColumns.Add(new GridColumn("Pat\r\nName", 200));
     gridRecipients.ListGridColumns.Add(new GridColumn("Email", 170));
     gridRecipients.ListGridColumns.Add(new GridColumn("Phone", 120));
     gridRecipients.ListGridColumns.Add(new GridColumn("Quote", 50)
     {
         TextAlign = HorizontalAlignment.Center
     });
     gridRecipients.ListGridColumns.Add(new GridColumn("Task", 50)
     {
         TextAlign = HorizontalAlignment.Center
     });
     gridRecipients.ListGridColumns.Add(new GridColumn("Feature", 50)
     {
         TextAlign = HorizontalAlignment.Center
     });
     gridRecipients.ListGridColumns.Add(new GridColumn("Pledge\r\nAmount", 75)
     {
         TextAlign = HorizontalAlignment.Right
     });
     gridRecipients.ListGridColumns.Add(new GridColumn("Votes", 50)
     {
         TextAlign = HorizontalAlignment.Right
     });
     gridRecipients.ListGridColumns.Add(new GridColumn("Send", 50)
     {
         TextAlign = HorizontalAlignment.Center
     });
     gridRecipients.ListGridColumns.Add(new GridColumn("Status", 50)
     {
         TextAlign = HorizontalAlignment.Center
     });
     gridRecipients.ListGridRows.Clear();
     foreach (Jobs.JobEmail jobEmail in _listJobEmails)
     {
         GridRow row = new GridRow();
         row.Cells.Add(jobEmail.Pat.PatNum.ToString());
         row.Cells.Add(jobEmail.Pat.GetNameFL());
         row.Cells.Add(jobEmail.EmailAddress);
         row.Cells.Add(jobEmail.PhoneNums);
         row.Cells.Add(jobEmail.IsQuote ? "X" : "");
         row.Cells.Add(jobEmail.IsTask ? "X" : "");
         row.Cells.Add(jobEmail.IsFeatureReq ? "X" : "");
         row.Cells.Add(jobEmail.PledgeAmount > 0 ? jobEmail.PledgeAmount.ToString("c") : "");
         row.Cells.Add(jobEmail.Votes.ToString());
         if (jobEmail.IsSend)
         {
             row.Cells.Add(new GridCell("X")
             {
                 ColorBackG = Color.FromArgb(236, 255, 236)
             });                                                                                             //light green;
         }
         else
         {
             row.Cells.Add(new GridCell("")
             {
                 ColorBackG = Color.FromArgb(222, 222, 222)
             });                                                                                            //light gray;
         }
         if (string.IsNullOrEmpty(jobEmail.StatusMsg))
         {
             //do nothing
         }
         else if (jobEmail.StatusMsg == "Sent")
         {
             row.ColorBackG = Color.FromArgb(236, 255, 236);                //light green
         }
         else
         {
             row.ColorBackG = Color.FromArgb(254, 235, 233);                //light red;
         }
         row.Cells.Add(jobEmail.StatusMsg);
         gridRecipients.ListGridRows.Add(row);
     }
     gridRecipients.EndUpdate();
 }
예제 #28
0
        private void FillTable()
        {
            Referrals.RefreshCache();
            listRef = Referrals.GetDeepCopy();
            if (!checkHidden.Checked)
            {
                listRef.RemoveAll(x => x.IsHidden);
            }
            if (!checkShowPat.Checked)
            {
                listRef.RemoveAll(x => x.PatNum > 0);
            }
            if (!checkShowDoctor.Checked)
            {
                listRef.RemoveAll(x => x.IsDoctor);
            }
            if (!checkShowOther.Checked)
            {
                listRef.RemoveAll(x => x.PatNum == 0 && !x.IsDoctor);
            }
            if (checkPreferred.Checked)
            {
                listRef.RemoveAll(x => !x.IsPreferred);
            }
            if (!string.IsNullOrWhiteSpace(textSearch.Text))
            {
                string[] searchTokens = textSearch.Text.ToLower().Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
                listRef.RemoveAll(x => searchTokens.Any(y => !x.FName.ToLower().Contains(y) && !x.LName.ToLower().Contains(y)));
            }
            int  scrollValue    = gridMain.ScrollValue;
            long selectedRefNum = -1;

            if (gridMain.GetSelectedIndex() > -1)
            {
                selectedRefNum = ((Referral)gridMain.Rows[gridMain.GetSelectedIndex()].Tag).ReferralNum;
            }
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            gridMain.Columns.Add(new ODGridColumn(Lan.g("TableSelectRefferal", "LastName"), 150));
            gridMain.Columns.Add(new ODGridColumn(Lan.g("TableSelectRefferal", "FirstName"), 80));
            gridMain.Columns.Add(new ODGridColumn(Lan.g("TableSelectRefferal", "MI"), 30));
            gridMain.Columns.Add(new ODGridColumn(Lan.g("TableSelectRefferal", "Title"), 70));
            gridMain.Columns.Add(new ODGridColumn(Lan.g("TableSelectRefferal", "Specialty"), 60));
            gridMain.Columns.Add(new ODGridColumn(Lan.g("TableSelectRefferal", "Patient"), 45));
            gridMain.Columns.Add(new ODGridColumn(Lan.g("TableSelectRefferal", "Note"), 250));
            gridMain.Rows.Clear();
            ODGridRow row;
            int       indexSelectedRef = -1;

            foreach (Referral refCur in listRef)
            {
                row = new ODGridRow();
                row.Cells.Add(refCur.LName);
                row.Cells.Add(refCur.FName);
                row.Cells.Add(refCur.MName.Left(1).ToUpper());                //Left(1) will return empty string if MName is null or empty string, so ToUpper is null safe
                row.Cells.Add(refCur.Title);
                row.Cells.Add(refCur.IsDoctor?Lan.g("enumDentalSpecialty", Defs.GetName(DefCat.ProviderSpecialties, refCur.Specialty)):"");
                row.Cells.Add(refCur.PatNum > 0?"X":"");
                row.Cells.Add(refCur.Note);
                if (refCur.IsHidden)
                {
                    row.ColorText = Color.Gray;
                }
                row.Tag = refCur;
                gridMain.Rows.Add(row);
                if (refCur.ReferralNum == selectedRefNum)
                {
                    indexSelectedRef = gridMain.Rows.Count - 1;
                }
            }
            gridMain.EndUpdate();
            if (indexSelectedRef > -1)
            {
                gridMain.SetSelected(indexSelectedRef, true);
            }
            gridMain.ScrollValue  = scrollValue;
            labelResultCount.Text = gridMain.Rows.Count.ToString() + Lan.g(this, " results found");
        }
예제 #29
0
        private void FillGrid()
        {
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            gridMain.Columns.Add(new ODGridColumn(Lan.g("TableClinics", "Abbr"), 120));
            gridMain.Columns.Add(new ODGridColumn(Lan.g("TableClinics", "Description"), 200));
            gridMain.Columns.Add(new ODGridColumn(Lan.g("TableClinics", "Specialty"), 150));
            gridMain.Columns.Add(new ODGridColumn(Lan.g("TableClinics", "Pat Count"), 80, HorizontalAlignment.Center));
            if (!IsSelectionMode)
            {
                gridMain.Columns.Add(new ODGridColumn(Lan.g("TableClinics", "Hidden"), 0, HorizontalAlignment.Center));
            }
            gridMain.Rows.Clear();
            ODGridRow row;
            int       patCount = 0;

            if (IncludeHQInList)
            {
                row     = new ODGridRow();
                row.Tag = new Clinic {              //creating new clinic with Headquarters as description. The clinic will not get inserted into the db.
                    ClinicNum   = 0,
                    Description = "Headquarters",
                    Abbr        = "HQ"
                };                //With a ClinicNum of 0, this will act as Headquarters.
                row.Cells.Add("");
                row.Cells.Add(Lan.g("TableClinics", "Headquarters"));
                row.Cells.Add("");
                if (_dictClinicalCounts.ContainsKey(0))
                {
                    patCount = _dictClinicalCounts[0];
                }
                row.Cells.Add(POut.Int(patCount));
                if (!IsSelectionMode)
                {
                    row.Cells.Add("");
                }
                gridMain.Rows.Add(row);
            }
            for (int i = 0; i < ListClinics.Count; i++)
            {
                if (!checkShowHidden.Checked && ListClinics[i].IsHidden)
                {
                    continue;
                }
                string        specialty     = "";
                DefLinkClinic defLinkClinic = _listDefLinkClinicSpecialties.FirstOrDefault(x => x.Clinic.ClinicNum == ListClinics[i].ClinicNum);
                if (defLinkClinic != null)
                {
                    specialty = string.Join(",", defLinkClinic.ListDefLink.Select(x => Defs.GetName(DefCat.ClinicSpecialty, x.DefNum)));
                }
                row     = new ODGridRow();
                row.Tag = ListClinics[i];
                row.Cells.Add(ListClinics[i].Abbr);
                row.Cells.Add(ListClinics[i].Description);
                row.Cells.Add(specialty);
                patCount = 0;
                if (ListClinics[i].IsNew)                 //a new clinic was just added
                {
                    patCount = 0;
                }
                else if (_dictClinicalCounts.ContainsKey(ListClinics[i].ClinicNum))
                {
                    patCount = _dictClinicalCounts[ListClinics[i].ClinicNum];
                }
                row.Cells.Add(POut.Int(patCount));
                if (!IsSelectionMode)
                {
                    row.Cells.Add(ListClinics[i].IsHidden ? "X" : "");
                }
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }