private void InitializeOverrideState()
        {
            // 2 provider boxes and insurance groups box

            claim searchObject = new claim();

            cmbOverrideStateProviderID.Items.Clear();
            cmbOverrideStateProviderID.Items.Add("All");
            cmbOverrideStateNewProviderID.Items.Clear();

            claim.OverrideProviderList().ForEach(p =>
            {
                cmbOverrideStateProviderID.Items.Add(p.doctor_provider_id);
                cmbOverrideStateNewProviderID.Items.Add(p.doctor_provider_id);
            });

            insurance_company_group icgs = new insurance_company_group();

            DataTable allGroups = icgs.Search(icgs.SearchSQL + " ORDER BY name");

            foreach (DataRow aRow in allGroups.Rows)
            {
                cmbOverrideStateInsurance.Items.Add(new insurance_company_group(aRow));
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Returns a list of all Insurance Company Groups and all Insurance Companies not in a group
        /// </summary>
        /// <returns></returns>
        internal List <Claims_Primary.InsuranceCompanyGroups> GetInsuranceCompaniesAsGroup()
        {
            List <Claims_Primary.InsuranceCompanyGroups> allGroups = new List <Claims_Primary.InsuranceCompanyGroups>();
            List <company>          companiesInAGroup = new List <company>();
            insurance_company_group icg = new insurance_company_group();

            foreach (DataRow aRow in icg.GetAllData("name").Rows)
            {
                Claims_Primary.InsuranceCompanyGroups newGroup = new Claims_Primary.InsuranceCompanyGroups();
                icg = new insurance_company_group(aRow);
                List <company> matchingComps = icg.GetMatchingCompanies();

                newGroup.Name      = icg.name;
                newGroup.Companies = matchingComps;
                newGroup.Group     = icg;
                allGroups.Add(newGroup);

                companiesInAGroup.AddRange(matchingComps);
            }

            DataTable companiesNotInGroup = icg.Search(string.Format("SELECT * FROM companies WHERE ID NOT IN ({0}) ORDER BY name", ClaimTrackerCommon.CompaniesToInString(companiesInAGroup)));

            foreach (DataRow aRow in companiesNotInGroup.Rows)
            {
                company c = new company(aRow);
                Claims_Primary.InsuranceCompanyGroups newGroup = new Claims_Primary.InsuranceCompanyGroups(c.name, c);

                allGroups.Add(newGroup);
            }

            allGroups.Sort(SortInsuranceGroupsByName);

            return(allGroups);
        }
        private void InitializeCarrierGroups()
        {
            insurance_company_group icg = new insurance_company_group();
            DataTable dt = icg.Search(icg.SearchSQL + " ORDER BY name");

            cmbBasicCarrierGroup.Items.Clear();

            cmbBasicCarrierGroup.Items.Add("");

            foreach (DataRow aGroup in dt.Rows)
            {
                icg = new insurance_company_group();
                icg.Load(aGroup);

                cmbBasicCarrierGroup.Items.Add(icg);
            }
        }