Пример #1
0
        ///<summary>This is an incomplete stub and should not be used very much yet.  This will get used when switching databases.  Switching databases is allowed from ClientWeb in the sense that the user can connect to a different server from the ChooseDatabase window.</summary>
        public static void ClearAllCache()
        {
            //AccountingAutoPays
            AccountingAutoPays.ClearCache();
            //AutoCodes
            AutoCodes.ClearCache();
            AutoCodeItems.ClearCache();
            AutoCodeConds.ClearCache();
            //etc...



            Prefs.ClearCache();
            //etc...
        }
Пример #2
0
        ///<summary>Only called when closing the procedure edit window. Usually returns the supplied CodeNum, unless a better match is found.</summary>
        public static long VerifyCode(long codeNum, string toothNum, string surf, bool isAdditional, long patNum, int age,
                                      out AutoCode AutoCodeCur)
        {
            //No need to check RemotingRole; no call to db.
            bool allCondsMet;

            AutoCodeCur = null;
            if (!GetContainsKey(codeNum))
            {
                return(codeNum);
            }
            if (!AutoCodes.GetContainsKey(GetOne(codeNum).AutoCodeNum))
            {
                return(codeNum);               //just in case.
            }
            AutoCodeCur = AutoCodes.GetOne(GetOne(codeNum).AutoCodeNum);
            if (AutoCodeCur.LessIntrusive)
            {
                return(codeNum);
            }
            bool willBeMissing = Procedures.WillBeMissing(toothNum, patNum);
            List <AutoCodeItem> listForCode = AutoCodeItems.GetListForCode(GetOne(codeNum).AutoCodeNum);
            List <AutoCodeCond> condList;

            for (int i = 0; i < listForCode.Count; i++)
            {
                condList    = AutoCodeConds.GetListForItem(listForCode[i].AutoCodeItemNum);
                allCondsMet = true;
                for (int j = 0; j < condList.Count; j++)
                {
                    if (!AutoCodeConds.ConditionIsMet(condList[j].Cond, toothNum, surf, isAdditional, willBeMissing, age))
                    {
                        allCondsMet = false;
                    }
                }
                if (allCondsMet)
                {
                    return(listForCode[i].CodeNum);
                }
            }
            return(codeNum);           //if couldn't find a better match
        }
Пример #3
0
        ///<summary>If ClientWeb, then this method is instead run on the server, and the result passed back to the client.  And since it's ClientWeb, FillCache will be run on the client.</summary>
        public static DataSet GetCacheDs(bool doRefreshServerCache, params InvalidType[] arrayITypes)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                return(Meth.GetDS(MethodBase.GetCurrentMethod(), doRefreshServerCache, arrayITypes));
            }
            Logger.LogToPath("", LogPath.Signals, LogPhase.Start, "InvalidType(s): " + string.Join(" - ", arrayITypes.OrderBy(x => x.ToString())));
            List <InvalidType> listITypes = arrayITypes.ToList();
            //so this part below only happens if direct or server------------------------------------------------
            bool isAll = false;

            if (listITypes.Contains(InvalidType.AllLocal))
            {
                isAll = true;
            }
            DataSet ds = new DataSet();

            //All Internal OD Tables that are cached go here
            if (PrefC.IsODHQ)
            {
                if (listITypes.Contains(InvalidType.JobPermission) || isAll)
                {
                    ds.Tables.Add(JobPermissions.RefreshCache());
                }
                if (listITypes.Contains(InvalidType.PhoneComps) || isAll)
                {
                    ds.Tables.Add(PhoneComps.GetTableFromCache(doRefreshServerCache));
                }
            }
            //All cached public tables go here
            if (listITypes.Contains(InvalidType.AccountingAutoPays) || isAll)
            {
                ds.Tables.Add(AccountingAutoPays.GetTableFromCache(doRefreshServerCache));
            }
            //if(listITypes.Contains(InvalidType.AlertItems) || isAll) {//THIS IS NOT CACHED. But is used to make server run the alert logic in OpenDentalService.
            //	ds.Tables.Add(AlertItems.RefreshCache());
            //}
            if (listITypes.Contains(InvalidType.AlertCategories) || isAll)
            {
                ds.Tables.Add(AlertCategories.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.AlertCategoryLinks) || isAll)
            {
                ds.Tables.Add(AlertCategoryLinks.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.AppointmentTypes) || isAll)
            {
                ds.Tables.Add(AppointmentTypes.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.AutoCodes) || isAll)
            {
                ds.Tables.Add(AutoCodes.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(AutoCodeItems.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(AutoCodeConds.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Automation) || isAll)
            {
                ds.Tables.Add(Automations.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.AutoNotes) || isAll)
            {
                ds.Tables.Add(AutoNotes.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(AutoNoteControls.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Carriers) || isAll)
            {
                ds.Tables.Add(Carriers.GetTableFromCache(doRefreshServerCache));                //run on startup, after telephone reformat, after list edit.
            }
            if (listITypes.Contains(InvalidType.ClaimForms) || isAll)
            {
                ds.Tables.Add(ClaimFormItems.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(ClaimForms.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.ClearHouses) || isAll)
            {
                ds.Tables.Add(Clearinghouses.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.ClinicErxs) || isAll)
            {
                ds.Tables.Add(ClinicErxs.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.ClinicPrefs) || isAll)
            {
                ds.Tables.Add(ClinicPrefs.GetTableFromCache(doRefreshServerCache));
            }
            //InvalidType.Clinics see InvalidType.Providers
            if (listITypes.Contains(InvalidType.Computers) || isAll)
            {
                ds.Tables.Add(Computers.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(Printers.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Defs) || isAll)
            {
                ds.Tables.Add(Defs.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.DentalSchools) || isAll)
            {
                ds.Tables.Add(SchoolClasses.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(SchoolCourses.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.DictCustoms) || isAll)
            {
                ds.Tables.Add(DictCustoms.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Diseases) || isAll)
            {
                ds.Tables.Add(DiseaseDefs.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(ICD9s.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.DisplayFields) || isAll)
            {
                ds.Tables.Add(DisplayFields.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.DisplayReports) || isAll)
            {
                ds.Tables.Add(DisplayReports.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Ebills) || isAll)
            {
                ds.Tables.Add(Ebills.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.EhrCodes))
            {
                EhrCodes.UpdateList();                //Unusual pattern for an unusual "table".  Not really a table, but a mishmash of hard coded partial code systems that are needed for CQMs.
            }
            if (listITypes.Contains(InvalidType.ElectIDs) || isAll)
            {
                ds.Tables.Add(ElectIDs.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Email) || isAll)
            {
                ds.Tables.Add(EmailAddresses.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(EmailTemplates.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(EmailAutographs.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Employees) || isAll)
            {
                ds.Tables.Add(Employees.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(PayPeriods.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Employers) || isAll)
            {
                ds.Tables.Add(Employers.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Fees) || isAll)
            {
                //Fee Cache follows an unusual pattern. This fills the cache with the HQ fees, and whatever clinics happen to be currently cached.
                ds.Tables.Add(Fees.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.FeeScheds) || isAll)
            {
                ds.Tables.Add(FeeScheds.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.HL7Defs) || isAll)
            {
                ds.Tables.Add(HL7Defs.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(HL7DefMessages.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(HL7DefSegments.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(HL7DefFields.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.InsCats) || isAll)
            {
                ds.Tables.Add(CovCats.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(CovSpans.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.InsFilingCodes) || isAll)
            {
                ds.Tables.Add(InsFilingCodes.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(InsFilingCodeSubtypes.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Languages) || isAll)
            {
                if (CultureInfo.CurrentCulture.Name != "en-US")
                {
                    ds.Tables.Add(Lans.GetTableFromCache(doRefreshServerCache));
                }
            }
            if (listITypes.Contains(InvalidType.Letters) || isAll)
            {
                ds.Tables.Add(Letters.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.LetterMerge) || isAll)
            {
                ds.Tables.Add(LetterMergeFields.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(LetterMerges.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Medications) || isAll)
            {
                ds.Tables.Add(Medications.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Operatories) || isAll)
            {
                ds.Tables.Add(Operatories.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.OrthoChartTabs) || isAll)
            {
                ds.Tables.Add(OrthoChartTabs.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(OrthoChartTabLinks.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.PatFields) || isAll)
            {
                ds.Tables.Add(PatFieldDefs.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(ApptFieldDefs.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Pharmacies) || isAll)
            {
                ds.Tables.Add(Pharmacies.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Prefs) || isAll)
            {
                ds.Tables.Add(Prefs.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.ProcButtons) || isAll)
            {
                ds.Tables.Add(ProcButtons.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(ProcButtonItems.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.ProcCodes) || isAll)
            {
                ds.Tables.Add(ProcedureCodes.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(ProcCodeNotes.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Programs) || isAll)
            {
                ds.Tables.Add(Programs.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(ProgramProperties.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.ProviderErxs) || isAll)
            {
                ds.Tables.Add(ProviderErxs.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.ProviderIdents) || isAll)
            {
                ds.Tables.Add(ProviderIdents.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Providers) || isAll)
            {
                ds.Tables.Add(Providers.GetTableFromCache(doRefreshServerCache));
                //Refresh the clinics as well because InvalidType.Providers has a comment that says "also includes clinics".  Also, there currently isn't an itype for Clinics.
                ds.Tables.Add(Clinics.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.QuickPaste) || isAll)
            {
                ds.Tables.Add(QuickPasteNotes.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(QuickPasteCats.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.RecallTypes) || isAll)
            {
                ds.Tables.Add(RecallTypes.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(RecallTriggers.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.ReplicationServers) || isAll)
            {
                ds.Tables.Add(ReplicationServers.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.RequiredFields) || isAll)
            {
                ds.Tables.Add(RequiredFields.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(RequiredFieldConditions.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Security) || isAll)
            {
                ds.Tables.Add(Userods.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(UserGroups.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(GroupPermissions.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(UserGroupAttaches.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Sheets) || isAll)
            {
                ds.Tables.Add(SheetDefs.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(SheetFieldDefs.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.SigMessages) || isAll)
            {
                ds.Tables.Add(SigElementDefs.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(SigButDefs.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Sites) || isAll)
            {
                ds.Tables.Add(Sites.GetTableFromCache(doRefreshServerCache));
                if (PrefC.IsODHQ)
                {
                    ds.Tables.Add(SiteLinks.GetTableFromCache(doRefreshServerCache));
                }
            }
            if (listITypes.Contains(InvalidType.SmsBlockPhones) || isAll)
            {
                ds.Tables.Add(SmsBlockPhones.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.SmsPhones) || isAll)
            {
                ds.Tables.Add(SmsPhones.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Sops) || isAll)               //InvalidType.Sops is currently never used 11/14/2014
            {
                ds.Tables.Add(Sops.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.StateAbbrs) || isAll)
            {
                ds.Tables.Add(StateAbbrs.GetTableFromCache(doRefreshServerCache));
            }
            //InvalidTypes.Tasks not handled here.
            if (listITypes.Contains(InvalidType.TimeCardRules) || isAll)
            {
                ds.Tables.Add(TimeCardRules.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.ToolBut) || isAll)
            {
                ds.Tables.Add(ToolButItems.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.UserClinics) || isAll)
            {
                ds.Tables.Add(UserClinics.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.UserQueries) || isAll)
            {
                ds.Tables.Add(UserQueries.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Vaccines) || isAll)
            {
                ds.Tables.Add(VaccineDefs.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(DrugManufacturers.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(DrugUnits.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Views) || isAll)
            {
                ds.Tables.Add(ApptViews.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(ApptViewItems.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(AppointmentRules.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(ProcApptColors.GetTableFromCache(doRefreshServerCache));
            }
            if (listITypes.Contains(InvalidType.Wiki) || isAll)
            {
                ds.Tables.Add(WikiListHeaderWidths.GetTableFromCache(doRefreshServerCache));
                ds.Tables.Add(WikiPages.RefreshCache());
            }
            if (listITypes.Contains(InvalidType.ZipCodes) || isAll)
            {
                ds.Tables.Add(ZipCodes.GetTableFromCache(doRefreshServerCache));
            }
            Logger.LogToPath("", LogPath.Signals, LogPhase.End);
            return(ds);
        }
Пример #4
0
        ///<summary>only if ClientWeb</summary>
        public static void FillCache(DataSet ds, params InvalidType[] arrayITypes)
        {
            List <InvalidType> listITypes = arrayITypes.ToList();
            bool isAll = false;

            if (listITypes.Contains(InvalidType.AllLocal))
            {
                isAll = true;
            }
            //All Internal OD Tables that are cached go here
            if (PrefC.IsODHQ)
            {
                if (listITypes.Contains(InvalidType.JobPermission) || isAll)
                {
                    ds.Tables.Add(JobPermissions.RefreshCache());
                }
                if (listITypes.Contains(InvalidType.PhoneComps) || isAll)
                {
                    PhoneComps.FillCacheFromTable(ds.Tables["PhoneComp"]);
                }
            }
            if (listITypes.Contains(InvalidType.AccountingAutoPays) || isAll)
            {
                AccountingAutoPays.FillCacheFromTable(ds.Tables["AccountingAutoPay"]);
            }
            //if(listITypes.Contains(InvalidType.AlertItems) || isAll) {//THIS IS NOT CACHED. But is used to make server run the alert logic in OpenDentalService.
            //	AlertSubs.FillCache(ds.Tables["AlertItem"]);
            //}
            if (listITypes.Contains(InvalidType.AlertCategories) || isAll)
            {
                AlertCategories.FillCacheFromTable(ds.Tables["AlertCategory"]);
            }
            if (listITypes.Contains(InvalidType.AlertCategoryLinks) || isAll)
            {
                AlertCategoryLinks.FillCacheFromTable(ds.Tables["AlertCategoryLink"]);
            }
            if (listITypes.Contains(InvalidType.AppointmentTypes) || isAll)
            {
                AppointmentTypes.FillCacheFromTable(ds.Tables["AppointmentType"]);
            }
            if (listITypes.Contains(InvalidType.AutoCodes) || isAll)
            {
                AutoCodes.FillCacheFromTable(ds.Tables["AutoCode"]);
                AutoCodeItems.FillCacheFromTable(ds.Tables["AutoCodeItem"]);
                AutoCodeConds.FillCacheFromTable(ds.Tables["AutoCodeCond"]);
            }
            if (listITypes.Contains(InvalidType.Automation) || isAll)
            {
                Automations.FillCacheFromTable(ds.Tables["Automation"]);
            }
            if (listITypes.Contains(InvalidType.AutoNotes) || isAll)
            {
                AutoNotes.FillCacheFromTable(ds.Tables["AutoNote"]);
                AutoNoteControls.FillCacheFromTable(ds.Tables["AutoNoteControl"]);
            }
            if (listITypes.Contains(InvalidType.Carriers) || isAll)
            {
                Carriers.FillCacheFromTable(ds.Tables["Carrier"]);                //run on startup, after telephone reformat, after list edit.
            }
            if (listITypes.Contains(InvalidType.ClaimForms) || isAll)
            {
                ClaimFormItems.FillCacheFromTable(ds.Tables["ClaimFormItem"]);
                ClaimForms.FillCacheFromTable(ds.Tables["ClaimForm"]);
            }
            if (listITypes.Contains(InvalidType.ClearHouses) || isAll)
            {
                Clearinghouses.FillCacheFromTable(ds.Tables["Clearinghouse"]);
            }
            if (listITypes.Contains(InvalidType.ClinicErxs) || isAll)
            {
                ClinicErxs.FillCacheFromTable(ds.Tables["ClinicErx"]);
            }
            if (listITypes.Contains(InvalidType.ClinicPrefs) || isAll)
            {
                ClinicPrefs.FillCacheFromTable(ds.Tables["ClinicPref"]);
            }
            if (listITypes.Contains(InvalidType.Computers) || isAll)
            {
                Computers.FillCacheFromTable(ds.Tables["Computer"]);
                Printers.FillCacheFromTable(ds.Tables["Printer"]);
            }
            if (listITypes.Contains(InvalidType.Defs) || isAll)
            {
                Defs.FillCacheFromTable(ds.Tables["Def"]);
            }
            if (listITypes.Contains(InvalidType.DentalSchools) || isAll)
            {
                SchoolClasses.FillCacheFromTable(ds.Tables["SchoolClass"]);
                SchoolCourses.FillCacheFromTable(ds.Tables["SchoolCourse"]);
            }
            if (listITypes.Contains(InvalidType.DictCustoms) || isAll)
            {
                DictCustoms.FillCacheFromTable(ds.Tables["DictCustom"]);
            }
            if (listITypes.Contains(InvalidType.Diseases) || isAll)
            {
                DiseaseDefs.FillCacheFromTable(ds.Tables["DiseaseDef"]);
                ICD9s.FillCacheFromTable(ds.Tables["ICD9"]);
            }
            if (listITypes.Contains(InvalidType.DisplayFields) || isAll)
            {
                DisplayFields.FillCacheFromTable(ds.Tables["DisplayField"]);
            }
            if (listITypes.Contains(InvalidType.DisplayReports) || isAll)
            {
                DisplayReports.FillCacheFromTable(ds.Tables["DisplayReport"]);
            }
            if (listITypes.Contains(InvalidType.Ebills) || isAll)
            {
                Ebills.FillCacheFromTable(ds.Tables["Ebill"]);
            }
            if (listITypes.Contains(InvalidType.ElectIDs) || isAll)
            {
                ElectIDs.FillCacheFromTable(ds.Tables["ElectID"]);
            }
            if (listITypes.Contains(InvalidType.Email) || isAll)
            {
                EmailAddresses.FillCacheFromTable(ds.Tables["EmailAddress"]);
                EmailTemplates.FillCacheFromTable(ds.Tables["EmailTemplate"]);
            }
            if (listITypes.Contains(InvalidType.Employees) || isAll)
            {
                Employees.FillCacheFromTable(ds.Tables["Employee"]);
                PayPeriods.FillCacheFromTable(ds.Tables["PayPeriod"]);
            }
            if (listITypes.Contains(InvalidType.Employers) || isAll)
            {
                Employers.FillCacheFromTable(ds.Tables["Employer"]);
            }
            if (listITypes.Contains(InvalidType.Fees) || isAll)
            {
                Fees.FillCacheFromTable(ds.Tables["Fee"]);
            }
            if (listITypes.Contains(InvalidType.FeeScheds) || isAll)
            {
                FeeScheds.FillCacheFromTable(ds.Tables["FeeSched"]);
            }
            if (listITypes.Contains(InvalidType.HL7Defs) || isAll)
            {
                HL7Defs.FillCacheFromTable(ds.Tables["HL7Def"]);
                HL7DefMessages.FillCacheFromTable(ds.Tables["HL7DefMessage"]);
                HL7DefSegments.FillCacheFromTable(ds.Tables["HL7DefSegment"]);
                HL7DefFields.FillCacheFromTable(ds.Tables["HL7DefField"]);
            }
            if (listITypes.Contains(InvalidType.InsCats) || isAll)
            {
                CovCats.FillCacheFromTable(ds.Tables["CovCat"]);
                CovSpans.FillCacheFromTable(ds.Tables["CovSpan"]);
            }
            if (listITypes.Contains(InvalidType.InsFilingCodes) || isAll)
            {
                InsFilingCodes.FillCacheFromTable(ds.Tables["InsFilingCode"]);
                InsFilingCodeSubtypes.FillCacheFromTable(ds.Tables["InsFilingCodeSubtype"]);
            }
            if (listITypes.Contains(InvalidType.Languages) || isAll)
            {
                Lans.FillCacheFromTable(ds.Tables["Language"]);
            }
            if (listITypes.Contains(InvalidType.Letters) || isAll)
            {
                Letters.FillCacheFromTable(ds.Tables["Letter"]);
            }
            if (listITypes.Contains(InvalidType.LetterMerge) || isAll)
            {
                LetterMergeFields.FillCacheFromTable(ds.Tables["LetterMergeField"]);
                LetterMerges.FillCacheFromTable(ds.Tables["LetterMerge"]);
            }
            if (listITypes.Contains(InvalidType.Medications) || isAll)
            {
                Medications.FillCacheFromTable(ds.Tables["Medication"]);
            }
            if (listITypes.Contains(InvalidType.Operatories) || isAll)
            {
                Operatories.FillCacheFromTable(ds.Tables["Operatory"]);
            }
            if (listITypes.Contains(InvalidType.OrthoChartTabs) || isAll)
            {
                OrthoChartTabs.FillCacheFromTable(ds.Tables["OrthoChartTab"]);
                OrthoChartTabLinks.FillCacheFromTable(ds.Tables["OrthoChartTabLink"]);
            }
            if (listITypes.Contains(InvalidType.PatFields) || isAll)
            {
                PatFieldDefs.FillCacheFromTable(ds.Tables["PatFieldDef"]);
                ApptFieldDefs.FillCacheFromTable(ds.Tables["ApptFieldDef"]);
            }
            if (listITypes.Contains(InvalidType.Pharmacies) || isAll)
            {
                Pharmacies.FillCacheFromTable(ds.Tables["Pharmacy"]);
            }
            if (listITypes.Contains(InvalidType.Prefs) || isAll)
            {
                Prefs.FillCacheFromTable(ds.Tables["Pref"]);
            }
            if (listITypes.Contains(InvalidType.ProcButtons) || isAll)
            {
                ProcButtons.FillCacheFromTable(ds.Tables["ProcButton"]);
                ProcButtonItems.FillCacheFromTable(ds.Tables["ProcButtonItem"]);
            }
            if (listITypes.Contains(InvalidType.ProcCodes) || isAll)
            {
                ProcedureCodes.FillCacheFromTable(ds.Tables["ProcedureCode"]);
                ProcCodeNotes.FillCacheFromTable(ds.Tables["ProcCodeNote"]);
            }
            if (listITypes.Contains(InvalidType.Programs) || isAll)
            {
                Programs.FillCacheFromTable(ds.Tables["Program"]);
                ProgramProperties.FillCacheFromTable(ds.Tables["ProgramProperty"]);
            }
            if (listITypes.Contains(InvalidType.ProviderErxs) || isAll)
            {
                ProviderErxs.FillCacheFromTable(ds.Tables["ProviderErx"]);
            }
            if (listITypes.Contains(InvalidType.ProviderIdents) || isAll)
            {
                ProviderIdents.FillCacheFromTable(ds.Tables["ProviderIdent"]);
            }
            if (listITypes.Contains(InvalidType.Providers) || isAll)
            {
                Providers.FillCacheFromTable(ds.Tables["Provider"]);
                //Refresh the clinics as well because InvalidType.Providers has a comment that says "also includes clinics".  Also, there currently isn't an itype for Clinics.
                Clinics.FillCacheFromTable(ds.Tables["clinic"]);                //Case must match the table name in Clinics.RefrechCache().
            }
            if (listITypes.Contains(InvalidType.QuickPaste) || isAll)
            {
                QuickPasteNotes.FillCacheFromTable(ds.Tables["QuickPasteNote"]);
                QuickPasteCats.FillCacheFromTable(ds.Tables["QuickPasteCat"]);
            }
            if (listITypes.Contains(InvalidType.RecallTypes) || isAll)
            {
                RecallTypes.FillCacheFromTable(ds.Tables["RecallType"]);
                RecallTriggers.FillCacheFromTable(ds.Tables["RecallTrigger"]);
            }
            if (listITypes.Contains(InvalidType.ReplicationServers) || isAll)
            {
                ReplicationServers.FillCacheFromTable(ds.Tables["ReplicationServer"]);
            }
            //if(itypes.Contains(InvalidType.RequiredFields) || isAll) {
            //	RequiredFields.FillCache(ds.Tables["RequiredField"]);
            //}
            if (listITypes.Contains(InvalidType.Security) || isAll)
            {
                Userods.FillCacheFromTable(ds.Tables["Userod"]);
                UserGroups.FillCacheFromTable(ds.Tables["UserGroup"]);
                UserGroupAttaches.FillCacheFromTable(ds.Tables["UserGroupAttach"]);
            }
            if (listITypes.Contains(InvalidType.Sheets) || isAll)
            {
                SheetDefs.FillCacheFromTable(ds.Tables["SheetDef"]);
                SheetFieldDefs.FillCacheFromTable(ds.Tables["SheetFieldDef"]);
            }
            if (listITypes.Contains(InvalidType.SigMessages) || isAll)
            {
                SigElementDefs.FillCacheFromTable(ds.Tables["SigElementDef"]);
                SigButDefs.FillCacheFromTable(ds.Tables["SigButDef"]);
            }
            if (listITypes.Contains(InvalidType.Sites) || isAll)
            {
                Sites.FillCacheFromTable(ds.Tables["Site"]);
                if (PrefC.IsODHQ)
                {
                    SiteLinks.FillCacheFromTable(ds.Tables["SiteLink"]);
                }
            }
            if (listITypes.Contains(InvalidType.SmsBlockPhones) || isAll)
            {
                SmsBlockPhones.FillCacheFromTable(ds.Tables["SmsBlockPhone"]);
            }
            if (listITypes.Contains(InvalidType.SmsPhones) || isAll)
            {
                SmsPhones.FillCacheFromTable(ds.Tables["SmsPhone"]);
            }
            if (listITypes.Contains(InvalidType.Sops) || isAll)
            {
                Sops.FillCacheFromTable(ds.Tables["Sop"]);
            }
            if (listITypes.Contains(InvalidType.StateAbbrs) || isAll)
            {
                StateAbbrs.FillCacheFromTable(ds.Tables["StateAbbr"]);
            }
            if (listITypes.Contains(InvalidType.TimeCardRules) || isAll)
            {
                TimeCardRules.FillCacheFromTable(ds.Tables["TimeCardRule"]);
            }
            //InvalidTypes.Tasks not handled here.
            if (listITypes.Contains(InvalidType.ToolBut) || isAll)
            {
                ToolButItems.FillCacheFromTable(ds.Tables["ToolButItem"]);
            }
            if (listITypes.Contains(InvalidType.UserClinics) || isAll)
            {
                UserClinics.FillCacheFromTable(ds.Tables["UserClinic"]);
            }
            if (listITypes.Contains(InvalidType.UserQueries) || isAll)
            {
                UserQueries.FillCacheFromTable(ds.Tables["UserQuery"]);
            }
            if (listITypes.Contains(InvalidType.Vaccines) || isAll)
            {
                VaccineDefs.FillCacheFromTable(ds.Tables["VaccineDef"]);
                DrugManufacturers.FillCacheFromTable(ds.Tables["DrugManufacturer"]);
                DrugUnits.FillCacheFromTable(ds.Tables["DrugUnit"]);
            }
            if (listITypes.Contains(InvalidType.Views) || isAll)
            {
                ApptViews.FillCacheFromTable(ds.Tables["ApptView"]);
                ApptViewItems.FillCacheFromTable(ds.Tables["ApptViewItem"]);
                AppointmentRules.FillCacheFromTable(ds.Tables["AppointmentRule"]);
                ProcApptColors.FillCacheFromTable(ds.Tables["ProcApptColor"]);
            }
            if (listITypes.Contains(InvalidType.Wiki) || isAll)
            {
                WikiListHeaderWidths.FillCacheFromTable(ds.Tables["WikiListHeaderWidth"]);
                WikiPages.FillCache(ds.Tables["WikiPage"]);
            }
            if (listITypes.Contains(InvalidType.ZipCodes) || isAll)
            {
                ZipCodes.FillCacheFromTable(ds.Tables["ZipCode"]);
            }
        }
Пример #5
0
        /*//<summary>Used when a button is moved out of a category.  This leaves a 'hole' in the order, so we need to clean up the orders.  Remember to run Refresh before this.</summary>
         * public static void ResetOrder(int cat){
         *
         * }*/

        ///<summary>Deletes all current ProcButtons from the Chart module, and then adds the default ProcButtons.  Procedure codes must have already been entered or they cannot be added as a ProcButton.</summary>
        public static void SetToDefault()
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                Meth.GetVoid(MethodBase.GetCurrentMethod());
                return;
            }
            string command = "DELETE FROM procbutton";

            Db.NonQ(command);
            command = "DELETE FROM procbuttonitem";
            Db.NonQ(command);
            command = "DELETE FROM definition WHERE Category=26";
            Db.NonQ(command);
            long category;            //defNum
            long procButtonNum;
            long autoCodeNum;
            long autoCodeNum2;

            //Db---------------------------------------------------------------------------------------------------------
            command = "INSERT INTO definition (Category,ItemOrder,ItemName,ItemValue,ItemColor,IsHidden) "
                      + "VALUES (26,0,'General','',0,0)";
            category = Db.NonQ(command, true);
            //Amalgam
            autoCodeNum = AutoCodes.GetNumFromDescript("Amalgam");
            if (autoCodeNum != 0)
            {
                command = "INSERT INTO procbutton (Description,ItemOrder,Category,ButtonImage) VALUES('Amalgam',0,"
                          + POut.Long(category) + @",'Qk12BgAAAAAAADYAAAAoAAAAFAAAABQAAAABACAAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAA/////////////////////9bW1v+ctbX/vebv/8XW1v+tvbX/hKWt/36crf9+nKX/nLW1/97v7//m9/f/pdbe/5y9vf/3////////////////////////////////////ztbO/5y1rf+cxcX/hKWt/5S1vf+cvcX/nMXO/5S9zv+Mrb3/jK2t/629vf+cxc7/nL29//f///////////////////////////////////+9zs7/fpSM/5S1vf+cxc7/tdbe/87m5v/O5u//1u/v/8Xe5v+lxdb/jK21/4Slrf+cvbX/9////////////////////////////////////7XW1v+ErbX/rc7W/8Xm5v/F3ub/3u/v/9739//W7+//zubv/87m7/+11t7/jK21/5y9vf/////////////////////////////////39/f/nLW9/5zFzv/O5ub/3vf3/8Xe5v/m////7////+/////O5u//zu/v/9739/+11tb/lLW1/+/39////////////////////////////9bW5v9NXb3/VWbv/8XW9//v////vdbm/+b3///v////9////73e3v+UtbX/5vf3/7XF9/9ufr3/zt7m////////////////////////////xcXv/xws3v8THO//bn73/87e5v+MrbX/xd7m/+/////v////rc7W/4ylpf/e7///PU33/xwk5v+1ve////////////////////////////+1ve//HCze/xwk7/80Pe//doy9/5y9vf/O5ub/9/////f///+1ztb/nLW1/4yc9/8cJOb/EyTv/4SU7////////////////////////////5yl7/8kLOb/HCzv/xwk7/80Rc7/foze/5Sl7/+crff/nK33/36U5v9dbsX/PUXv/xwk5v8cJOb/XW7m///////////////////////m9/f/foTv/yQs5v8cLO//HCzm/xws7/8kLOb/JCzm/yQs5v8kLOb/JCzm/xws5v8cJOb/HCzm/xwk7/9FVdb/9////////////////////+/39/9dbt7/HCTm/xws5v8cLOb/HCzm/xws5v8cLOb/HCzm/xws5v8cLOb/HCzm/xws5v8cLOb/HCTv/0VVzv/3/////////////////////////1Vm1v8cJO//HCzm/xws5v8cJOb/HCTv/xwk5v8cJOb/HCTm/xwk5v8cJO//HCTm/xws5v8cJO//RVXO//f39//////////////////3////RVXO/xwk7/8cLOb/HCTm/yw05v8sNOb/ND3v/zQ97/80Pe//ND3v/yw05v8kLO//HCTm/xwk7/9FVc7/9/f3//////////////////f///9FVc7/HCTv/xwk5v8sNOb/jJzm/3aErf+1xff/xdb3/8XW//+ElL3/nLXe/4yc9/8kLOb/HCTv/0VVzv/39/f/////////////////9////0VVzv8THO//ND3v/7XF9//O5ub/lK2l/87e1v/3////9////5y1rf/W7+//9////4yU9/8cJO//RVXW//f/////////////////////////boTF/1Vm7//Fzv//9////97v9/+1ztb/xdbW//f////m9/f/rcXO/+b39//3////7////5Sl7/9NXbX/9/f3//////////////////////+91tb/nL3F//f////v////5vf3/87m5v/e7/f/7////+b39//W7+//7////+/////v////tc7O/629vf////////////////////////////////+lxcX/pcXF/+/////3////1u/v/9739//3////3u/3/97v9//3////7////7XO1v+lvcX/9/////////////////////////////////////f39/+lvcX/nL3F/+b39//3////7////+/////m////7////97v7/+txcX/pb3F//f39/////////////////////////////////////////////f39/+txcX/lLW1/629vf/O3t7/3vf3/8Xe3v+lxcX/jKWc/7XFxf/39/f//////////////////////w==')";
                procButtonNum = Db.NonQ(command, true);
                command       = "INSERT INTO procbuttonitem (ProcButtonNum,CodeNum,AutoCodeNum) VALUES (" + POut.Long(procButtonNum) + ",0,"
                                + POut.Long(autoCodeNum) + ")";
                Db.NonQ(command);
            }
            //Composite
            autoCodeNum = AutoCodes.GetNumFromDescript("Composite");
            if (autoCodeNum != 0)
            {
                command = "INSERT INTO procbutton (Description,ItemOrder,Category,ButtonImage) VALUES('Composite',1,"
                          + POut.Long(category) + @",'Qk12BgAAAAAAADYAAAAoAAAAFAAAABQAAAABACAAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAA///////////e5v//RU3m/yQ05v8kNOb/JDTm/xwk7/8cJO//JCzm/36UnP9+lJT/fpSc/3aUlP9+lIz/xc7O/////////////////////////////////3Z+9/8kLOb/Znbv/3aE7/+ElO//fpTv/zQ97/8kLOb/rcXm/73e3v+11t7/tdbe/5zFzv+EpaX/1t7e////////////////////////////LDTv/11u5v/e7/f/5vf//+/////3////pbX//yQs7//e7///7////+b39//e7/f/zubv/5S1vf+tvbX///////////////////////////80Pff/XW7m/+b////3////7/////f///+1xf//JCzv/+b3///3////7////+b39//W7+//nL3F/629vf///////////////////////////z1F9/9dbu//7/f//+/////v////9////4yc//89Rff/5vf//+/////v////7////9bv7/+cvcX/rb29////////////////////////////ND3v/3aE7//3////7////+/////v////XWb3/36M9//3////7////+/////v////1u/3/5S1vf+9zs7///////////////////////////8sNO//doTv//f////v////7////+////80Pe//pbX///f////v////7////+/////e7/f/jK2t/9be3v///////////////////////////yw07/9ufu//7////+/////v////3u///zQ97/+9zv//9////+/////v////7////87m7/9+lIz/3u/v////////////////////////////JCzv/2Z27//m////7/////f///+MlP//VWb3//f////v////7////+/////v////zubm/36UlP/m7+////////////////////////////89Rff/VWbm/97v9//3////7////11m9/9mbvf/9////+/////v////7////+////+91t7/lK2t//f3/////////////////////////////5yl//80Rd7/zubv//f////O3v//LDTv/7XF///3////7////+/////v////5vf//6W9xf+ctbX/////////////////////////////////1t7//yQ05v+MnO///////4yU//89Rff/5vf//+/////v////7////+/////m9///nL3F/7XFzv/////////////////////////////////39///Zm73/0VV5v+9zvf/LDTv/5yl///3////7////+/////v////7////+b39/+UrbX/1t7e//////////////////////////////////////+UnPf/JCzm/yw07/9dbvf/5vf//+/////v////7////+/////v////1ubv/4ylpf/m7+///////////////////////////////////////97m//8sNO//XW7v/97v///3////7////+/////v////7////+/////F3t7/nK2t/////////////////////////////////////////////////25+vf+Mpc7/7////+/////v////7////+/////v////7////6W9vf/Fzs7/////////////////////////////////////////////////pb21/5Strf/O5ub/7////+/////v////7/////f////e7+//jK2t/+bv7//////////////////////////////////////////////////O5ub/fpyc/7XOzv/e9/f/9////+/////v////9////7XOzv+EpaX/5vf3/////////////////////////////////////////////////+bv7/+MvcX/lK2t/5y1tf/O5ub/5vf3/+bv7/+9zs7/lL29/4ytrf/3////////////////////////////////////////////////////3ubm/5TFxf+95u//rb29/4ylnP+cra3/lK2t/6W9vf+t1t7/nLW1/////////////////////////////////w==')";
                procButtonNum = Db.NonQ(command, true);
                command       = "INSERT INTO procbuttonitem (ProcButtonNum,CodeNum,AutoCodeNum) VALUES (" + POut.Long(procButtonNum) + ",0,"
                                + POut.Long(autoCodeNum) + ")";
                Db.NonQ(command);
            }
            //Crown
            if (ProcedureCodes.IsValidCode("D2750") || ProcedureCodes.IsValidCode("N4118"))
            {
                command = "INSERT INTO procbutton (Description,ItemOrder,Category,ButtonImage) VALUES('Crown',2,"
                          + POut.Long(category) + @",'Qk12BgAAAAAAADYAAAAoAAAAFAAAABQAAAABACAAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAA//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+1ve//PVXW/1Vu7/9mdu//Znbv/2Z27/9mdu//XW7v/2Z27/9mbu//Zm7v/2Zu7/9dbu//XW7v/01m7/9FXeb/pa33/////////////////11m7/89Re//XWbv/11m7/9dZu//XWbv/11m7/9dZu//XWbv/11m7/9dZu//XWbv/11m7/9dZu//XWbv/z1F7/9NVe/////////////e3v//LDTv/6Wt9//39///9/f///f3///39///9/f///f3///39///9/f///f3///39///9/f///f3///39///vb3//zQ97//W1v///////5Sc9/80Re//5ub////////////////////////////////////////////////////////////////////////W1v//PUXv/73F9//39///XWbv/2Zu7////////////////////////////////////////////////////////////////////////////9bW//89Re//vcX3/87O//8sNO//tb3/////////////////////////////////////////////////////////////////////////////3t7//zRF7/+cpff/hIz3/z1F7//v7///////////////////////////////////////////////////////////////////////////////////XWbv/2529/9udvf/VV3v//f3//////////////////////////////////////////////////////////////////////////////////+MlPf/TVXv/2529/9VXe//9/f/////////////////////////////7+///6Wl9/+1vf///////////////////////////////////////6Wl9/80Re//bnb3/1Vd7//39//////////////////////////////W1v//RU3v/6Wl9///////////////////////////////////////3t7//yw07/9mdu//XWbv//f3/////////////////////////////87W//9FTe//zs7////////////////////////////////////////39///VV3v/3Z+9/9NVe//9/f/////////////////////////////1tb//1Vd7//Ozv////////////////////////////////////////f3//9VXe//vb3//yQs7//Ozv////////////////////////////+9xff/ND3v/4yU9//v7///////////////////////////////////tb3//yw07//v7///VV3v/z1F7/+cnPf/5ub///f3///m5v//jJT3/zQ97/89Re//LDTv/0VN7/+MlPf/pa33/87O///v9///5ub//5Sc9/8sNO//foT3///////e5v//foT3/z1N7/8sNO//VV3v/zQ97/9FTe//lJz3/+/v///e5v//foT3/01V7/9FTe//LDTv/0VN7/8sNO//ND3v/4yU9////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////w==')";
                procButtonNum = Db.NonQ(command, true);
                if (ProcedureCodes.IsValidCode("D2750"))
                {
                    command = "INSERT INTO procbuttonitem (ProcButtonNum,CodeNum,AutoCodeNum) VALUES (" + POut.Long(procButtonNum)
                              + "," + ProcedureCodes.GetCodeNum("D2750") + ",0)";
                    Db.NonQ(command);
                }
                if (ProcedureCodes.IsValidCode("N4118"))
                {
                    command = "INSERT INTO procbuttonitem (ProcButtonNum,CodeNum,AutoCodeNum) VALUES (" + POut.Long(procButtonNum)
                              + "," + ProcedureCodes.GetCodeNum("N4118") + ",0)";
                    Db.NonQ(command);
                }
            }
            //RCT
            autoCodeNum = AutoCodes.GetNumFromDescript("Root Canal");
            if (autoCodeNum != 0)
            {
                command = "INSERT INTO procbutton (Description,ItemOrder,Category,ButtonImage) VALUES('RCT',3,"
                          + POut.Long(category) + @",'Qk12BgAAAAAAADYAAAAoAAAAFAAAABQAAAABACAAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAA///////////////////////////////////////////F1tb/boyt/xwkpf/m5ub//////////////////////////////////////////////////////////////////////////////////////36MjP9VbpT/EySc/7XFxf//////////////////////////////////////////////////////////////////////////////////////XWZm/36lzv8kNMX/ZnZu//////////////////////////////////////////////////////////////////////////////////f39/9NXV3/fpz//wMD//9ddm7/zs7O////////////////////////////////////////////////////////////////////////////3t7e/2Z+dv9mfv//AwP//2aEfv+lpaX////////////////////////////////////////////////////////////////////////////FxcX/XXZ2/26E//8DA///jK2t/5ycnP///////////////////////////////////////////////////////////////////////////8XFxf9mfnb/fpT//wMD//+Era3/lJSU//f39///////////////////////////////////////////////////////////////////////nKWl/2aMjP9uhP//AwP//4y1tf+UnJz/9/f3//////////////////////////////////////////////////////////////////////9mbm7/ZoSE/2Z+//8DA///nMXF/4SMjP/39/f//////////////////////////////////////////////////////////////////////2Zubv9ujIT/Znb//wMD//+lzs7/foyM//f39///////////////////////////////////////////////////////////////////////PUVF/36lpf9ufv//AwP//63W1v9ufn7/9/f3/////////////////////////////////////////////////////////////////+/v7/9VVVX/jLW1/2Z2//8DA///td7m/2Z2dv/v7+//////////////////////////////////////////////////////////////////3t7e/1VVVf+Uxb3/bn7//wMD//+13ub/ZnZ2/+bm5v/////////////////////////////////////////////////////////////////e3t7/XWZu/5TFvf9mdv//AwP//7Xe5v9mdnb/3t7e/////////////////////////////////////////////////////////////////8XFxf9mbm7/nMXF/11m//8DA///zu/3/1VmXf/e3t7/////////////////////////////////////////////////////////////////zs7O/11mZv+cxcX/XW7//wMD///O7/f/VWZm/87Ozv/////////////////////////////////////////////////////////////////FxcX/ZnZ2/6XOzv9dbv//AwP//9bv9/9Vbm7/pa2t/////////////////////////////////////////////////////////////////62trf9VZmb/rdbW/01d//8DA///1u/3/01mZv+UlJT/////////////////////////////////////////////////////////////////nJyc/0VNTf+t3tb/XW7//wMD//+Urf//RV1d/4yUlP////////////////////////////////////////////////////////////////+1tbX/RV1d/7Xe3v9dZv//AwP//4yl//89VVX/foSE/////////////////////////////////w==')";
                procButtonNum = Db.NonQ(command, true);
                command       = "INSERT INTO procbuttonitem (ProcButtonNum,CodeNum,AutoCodeNum) VALUES (" + POut.Long(procButtonNum) + ",0,"
                                + POut.Long(autoCodeNum) + ")";
                Db.NonQ(command);
            }
            //RCT BU PFM
            autoCodeNum  = AutoCodes.GetNumFromDescript("Root Canal");
            autoCodeNum2 = AutoCodes.GetNumFromDescript("BU/P&C");
            if (autoCodeNum != 0 || ProcedureCodes.IsValidCode("D2750"))           //we add this button if either RCT or crown is available.
            {
                command = "INSERT INTO procbutton (Description,ItemOrder,Category,ButtonImage) VALUES('RCT BU PFM',4,"
                          + POut.Long(category) + @",'Qk12BgAAAAAAADYAAAAoAAAAFAAAABQAAAABACAAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAA////////////////pcXF/63W7/89Te//Exzv/01V7/+95u//tebm/7Xm5v9+lO//HCTv/xwk7/9Vbu//pdbe/73m5v////////////////////////////////+cvb3/rdbv/z1N7/8cJO//PUXv/63W7/+15ub/tebm/11u7/8cJO//HCTv/01d7/+cztb/td7e////////////////////////////9/f//5y9tf+t1u//PU3v/xwk7/8kLO//pb33/73m5v/W7/f/PU3v/xwk7/8cJO//PU3v/4zF3v+13t7/////////////////////////////////lL21/6XW7/89Te//HCTv/xwk7/+ElPf/zvfv/5yt9/8kLO//HCTv/xwk7/89Te//lMXe/73e3v////////////////////////////////+UvbX/vd73/0VN7/8cJO//HCzv/yw97/9mbu//LDTv/xwk7/8cLO//HCTv/0VN7/+Uvc7/rc7O/////////////////////////////////6XO1v+13u//RU3v/xwk7/8cLO//HCTv/xwk7/8cJO//HCzv/xws7/8cJO//RU3v/4S13v+lztb////////////////////////////m5v//PU3v/zRF5v8kLO//EyTv/xwk7/8cJO//HCTv/xwk7/8cJO//HCTv/xMk7/8cJO//JCzv/zRF5v/W1v///////////////////////5yl9/8sNO//fn73/4SM9/+EjPf/hIz3/4SM9/+EjPf/hIz3/4SM9/+EjPf/hIz3/4SM9/+EhPf/ND3v/4yU9//////////////////39///TVXv/36E9/////////////////////////////////////////////////////////////////9mbvf/VV3v//f3/////////////8XF//8cLO//zs7//////////////////////////////////////////////////////////////////4SM9/8sPe//7+//////////////hIz3/0VN7//39///////////////////////////////////////////////////////////////////paX3/yQs7//m5v///////+bm//9FTe//hIT3///////////////////////////////////////////////////////////////////////Fxf//JCzv/7299///////xcX//yw07/+9vff//////////////////////////////////////////////////////////////////////+/v//89Re//VV3v///////Ozv//ND3v/7299////////////////////////////+/v///e3v//9/f/////////////////////////////9/f//1Vd7/9FTe///////8XO//80Pe//vb33////////////////////////////ra33/11m7//e3v//////////////////////////////////dn73/yQs7///////xcX//yw07//Fxf////////////////////////////+UlPf/Zm7v//////////////////////////////////////+1tf//JCzv///////W1v//NEXv/7299////////////////////////////5yl9/92fvf//////////////////////////////////////7299/8kLO////////f3//9dZu//fn73////////////////////////////foT3/z1F7//Ozv//////////////////////////////////dn73/zQ97////////////5yl9/8kLO//jJT3/+bm///39///5u///4SM9/8sNO//LDTv/yQs7/9+hPf/vb33/97e///39///5u///3Z+9/8kLO//vb33////////////9/f//5Sc9/9NVe//ND3v/z1F7/80Pe//TVXv/62t9//v7///nKX3/0VN7/8sNO//LDTv/01V7/80Pe//PUXv/7299////////////w==')";
                procButtonNum = Db.NonQ(command, true);
                if (ProcedureCodes.IsValidCode("D2750"))
                {
                    command = "INSERT INTO procbuttonitem (ProcButtonNum,CodeNum,AutoCodeNum) VALUES (" + POut.Long(procButtonNum)
                              + "," + ProcedureCodes.GetCodeNum("D2750") + ",0)";
                    Db.NonQ(command);
                }
                if (ProcedureCodes.IsValidCode("N4118"))
                {
                    command = "INSERT INTO procbuttonitem (ProcButtonNum,CodeNum,AutoCodeNum) VALUES (" + POut.Long(procButtonNum)
                              + "," + ProcedureCodes.GetCodeNum("N4118") + ",0)";
                    Db.NonQ(command);
                }
                if (autoCodeNum != 0)
                {
                    command = "INSERT INTO procbuttonitem (ProcButtonNum,CodeNum,AutoCodeNum) VALUES (" + POut.Long(procButtonNum) + ",0,"
                              + POut.Long(autoCodeNum) + ")";
                    Db.NonQ(command);
                }
                if (autoCodeNum2 != 0)
                {
                    command = "INSERT INTO procbuttonitem (ProcButtonNum,CodeNum,AutoCodeNum) VALUES (" + POut.Long(procButtonNum) + ",0,"
                              + POut.Long(autoCodeNum2) + ")";
                    Db.NonQ(command);
                }
            }
            //Bridge
            autoCodeNum = AutoCodes.GetNumFromDescript("Bridge");
            if (autoCodeNum != 0 || ProcedureCodes.IsValidCode("N4127"))
            {
                command = "INSERT INTO procbutton (Description,ItemOrder,Category,ButtonImage) VALUES('Bridge',5,"
                          + POut.Long(category) + @",'')";
                procButtonNum = Db.NonQ(command, true);
                if (ProcedureCodes.IsValidCode("N4127"))
                {
                    command = "INSERT INTO procbuttonitem (ProcButtonNum,CodeNum,AutoCodeNum) VALUES (" + POut.Long(procButtonNum)
                              + "," + ProcedureCodes.GetCodeNum("N4127") + ",0)";
                    Db.NonQ(command);
                }
                if (autoCodeNum != 0)
                {
                    command = "INSERT INTO procbuttonitem (ProcButtonNum,CodeNum,AutoCodeNum) VALUES (" + POut.Long(procButtonNum) + ",0,"
                              + POut.Long(autoCodeNum) + ")";
                    Db.NonQ(command);
                }
            }
            //Build Up
            autoCodeNum = AutoCodes.GetNumFromDescript("BU/P&C");
            if (autoCodeNum != 0)
            {
                command = "INSERT INTO procbutton (Description,ItemOrder,Category,ButtonImage) VALUES('BU/P&C',6,"
                          + POut.Long(category) + @",'')";
                procButtonNum = Db.NonQ(command, true);
                command       = "INSERT INTO procbuttonitem (ProcButtonNum,CodeNum,AutoCodeNum) VALUES (" + POut.Long(procButtonNum) + ",0,"
                                + POut.Long(autoCodeNum) + ")";
                Db.NonQ(command);
            }
            //Exams/Cleanings Category--------------------------------------------------------------------------------------------
            command = "INSERT INTO definition (Category,ItemOrder,ItemName,ItemValue,ItemColor,IsHidden) "
                      + "VALUES (26,1,'Exams/Cleanings','',0,0)";
            category = Db.NonQ(command, true);
            //PA
            if (ProcedureCodes.IsValidCode("D0220"))
            {
                command = "INSERT INTO procbutton (Description,ItemOrder,Category,ButtonImage) VALUES('PA',0,"
                          + POut.Long(category) + @",'Qk12BgAAAAAAADYAAAAoAAAAFAAAABQAAAABACAAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/f3/0VFRf8DAwP/AwMD/wMDA/9dXV3/jIyM/yQkJP8DAwP/AwMD/4SEhP8LCwv/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/RUVF/97e3v+MjIz/AwMD/wMDA/8DAwP/AwMD/35+fv/FxcX/JCQk/wMDA/8DAwP/5ubm/5SUlP8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/VVVV/wMDA/8DAwP/AwMD/wMDA/8LCwv/nJyc/+bm5v9dXV3/AwMD/wsLC/+MjIz/ZmZm/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wsLC/+lpaX/xcXF/zQ0NP8DAwP/NDQ0/62trf9dXV3/JCQk/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/TU1N/2ZmZv/Ozs7/dnZ2/wMDA/9dXV3/xcXF/+bm5v80NDT/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/9FRUX/lJSU/8XFxf+tra3/hISE/7W1tf/FxcX/tbW1/2ZmZv8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/01NTf/Ozs7/1tbW/+bm5v/Ozs7/7+/v/+bm5v/v7+//jIyM/yQkJP8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/ZmZm/+bm5v//////5ubm/+/v7//v7+//5ubm//f39//W1tb/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/9mZmb////////////39/f/5ubm//f39///////9/f3/+bm5v80NDT/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/1VVVf/39/f//////+/v7//m5ub/////////////////7+/v/yQkJP8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/3t7e/+/v7//39/f/9/f3/9bW1v/m5ub////////////v7+//AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/+EhIT/paWl/8XFxf//////3t7e/97e3v/v7+//5ubm/5ycnP8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/TU1N/wsLC/8DAwP/AwMD/wMDA/89PT3/1tbW/87Ozv/FxcX/lJSU/35+fv+MjIz/dnZ2/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/2ZmZv//////XV1d/wMDA/8DAwP/AwMD/wMDA/8LCwv/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/9mZmb//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////w==')";
                procButtonNum = Db.NonQ(command, true);
                command       = "INSERT INTO procbuttonitem (ProcButtonNum,CodeNum,AutoCodeNum) VALUES (" + POut.Long(procButtonNum)
                                + "," + ProcedureCodes.GetCodeNum("D0220") + ",0)";
                Db.NonQ(command);
            }
            //NewChildExam
        }
Пример #6
0
        ///<summary>If ClientWeb, then this method is instead run on the server, and the result passed back to the client.  And since it's ClientWeb, FillCache will be run on the client.</summary>
        public static DataSet GetCacheDs(string itypesStr)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                return(Meth.GetDS(MethodBase.GetCurrentMethod(), itypesStr));
            }
            //so this part below only happens if direct or server------------------------------------------------
            List <int> itypes = new List <int>();

            string[] strArray = itypesStr.Split(',');
            for (int i = 0; i < strArray.Length; i++)
            {
                itypes.Add(PIn.Int(strArray[i]));
            }
            bool isAll = false;

            if (itypes.Contains((int)InvalidType.AllLocal))
            {
                isAll = true;
            }
            DataSet ds = new DataSet();

            if (itypes.Contains((int)InvalidType.AccountingAutoPays) || isAll)
            {
                ds.Tables.Add(AccountingAutoPays.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.AutoCodes) || isAll)
            {
                ds.Tables.Add(AutoCodes.RefreshCache());
                ds.Tables.Add(AutoCodeItems.RefreshCache());
                ds.Tables.Add(AutoCodeConds.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Automation) || isAll)
            {
                ds.Tables.Add(Automations.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.AutoNotes) || isAll)
            {
                ds.Tables.Add(AutoNotes.RefreshCache());
                ds.Tables.Add(AutoNoteControls.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Carriers) || isAll)
            {
                ds.Tables.Add(Carriers.RefreshCache());                //run on startup, after telephone reformat, after list edit.
            }
            if (itypes.Contains((int)InvalidType.ClaimForms) || isAll)
            {
                ds.Tables.Add(ClaimFormItems.RefreshCache());
                ds.Tables.Add(ClaimForms.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.ClearHouses) || isAll)
            {
                ds.Tables.Add(Clearinghouses.RefreshCache());                //kh wants to add an EasyHideClearHouses to disable this
            }
            if (itypes.Contains((int)InvalidType.Computers) || isAll)
            {
                ds.Tables.Add(Computers.RefreshCache());
                ds.Tables.Add(Printers.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Defs) || isAll)
            {
                ds.Tables.Add(Defs.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.DentalSchools) || isAll)
            {
                ds.Tables.Add(SchoolClasses.RefreshCache());
                ds.Tables.Add(SchoolCourses.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.DictCustoms) || isAll)
            {
                ds.Tables.Add(DictCustoms.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Diseases) || isAll)
            {
                ds.Tables.Add(DiseaseDefs.RefreshCache());
                ds.Tables.Add(ICD9s.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.DisplayFields) || isAll)
            {
                ds.Tables.Add(DisplayFields.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.ElectIDs) || isAll)
            {
                ds.Tables.Add(ElectIDs.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Email) || isAll)
            {
                ds.Tables.Add(EmailAddresses.RefreshCache());
                ds.Tables.Add(EmailTemplates.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Employees) || isAll)
            {
                ds.Tables.Add(Employees.RefreshCache());
                ds.Tables.Add(PayPeriods.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Employers) || isAll)
            {
                ds.Tables.Add(Employers.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Fees) || isAll)
            {
                ds.Tables.Add(Fees.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.FeeScheds) || isAll)
            {
                ds.Tables.Add(FeeScheds.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.HL7Defs) || isAll)
            {
                ds.Tables.Add(HL7Defs.RefreshCache());
                ds.Tables.Add(HL7DefMessages.RefreshCache());
                ds.Tables.Add(HL7DefSegments.RefreshCache());
                ds.Tables.Add(HL7DefFields.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.InsCats) || isAll)
            {
                ds.Tables.Add(CovCats.RefreshCache());
                ds.Tables.Add(CovSpans.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.InsFilingCodes) || isAll)
            {
                ds.Tables.Add(InsFilingCodes.RefreshCache());
                ds.Tables.Add(InsFilingCodeSubtypes.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Languages) || isAll)
            {
                if (CultureInfo.CurrentCulture.Name != "en-US")
                {
                    ds.Tables.Add(Lans.RefreshCache());
                }
            }
            if (itypes.Contains((int)InvalidType.Letters) || isAll)
            {
                ds.Tables.Add(Letters.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.LetterMerge) || isAll)
            {
                ds.Tables.Add(LetterMergeFields.RefreshCache());
                ds.Tables.Add(LetterMerges.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Operatories) || isAll)
            {
                ds.Tables.Add(Operatories.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.PatFields) || isAll)
            {
                ds.Tables.Add(PatFieldDefs.RefreshCache());
                ds.Tables.Add(ApptFieldDefs.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Pharmacies) || isAll)
            {
                ds.Tables.Add(Pharmacies.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Prefs) || isAll)
            {
                ds.Tables.Add(Prefs.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.ProcButtons) || isAll)
            {
                ds.Tables.Add(ProcButtons.RefreshCache());
                ds.Tables.Add(ProcButtonItems.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.ProcCodes) || isAll)
            {
                ds.Tables.Add(ProcedureCodes.RefreshCache());
                ds.Tables.Add(ProcCodeNotes.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Programs) || isAll)
            {
                ds.Tables.Add(Programs.RefreshCache());
                ds.Tables.Add(ProgramProperties.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.ProviderIdents) || isAll)
            {
                ds.Tables.Add(ProviderIdents.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Providers) || isAll)
            {
                ds.Tables.Add(Providers.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.QuickPaste) || isAll)
            {
                ds.Tables.Add(QuickPasteNotes.RefreshCache());
                ds.Tables.Add(QuickPasteCats.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.RecallTypes) || isAll)
            {
                ds.Tables.Add(RecallTypes.RefreshCache());
                ds.Tables.Add(RecallTriggers.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.ReplicationServers) || isAll)
            {
                ds.Tables.Add(ReplicationServers.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Security) || isAll)
            {
                ds.Tables.Add(Userods.RefreshCache());
                ds.Tables.Add(UserGroups.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Sheets) || isAll)
            {
                ds.Tables.Add(SheetDefs.RefreshCache());
                ds.Tables.Add(SheetFieldDefs.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Signals) || isAll)
            {
                ds.Tables.Add(SigElementDefs.RefreshCache());
                ds.Tables.Add(SigButDefs.RefreshCache());                //includes SigButDefElements.Refresh()
            }
            if (itypes.Contains((int)InvalidType.Sites) || isAll)
            {
                ds.Tables.Add(Sites.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Sops) || isAll)
            {
                ds.Tables.Add(Sops.RefreshCache());
            }
            //InvalidTypes.Tasks not handled here.
            if (itypes.Contains((int)InvalidType.TimeCardRules) || isAll)
            {
                ds.Tables.Add(TimeCardRules.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.ToolBut) || isAll)
            {
                ds.Tables.Add(ToolButItems.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Vaccines) || isAll)
            {
                ds.Tables.Add(VaccineDefs.RefreshCache());
                ds.Tables.Add(DrugManufacturers.RefreshCache());
                ds.Tables.Add(DrugUnits.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Views) || isAll)
            {
                ds.Tables.Add(ApptViews.RefreshCache());
                ds.Tables.Add(ApptViewItems.RefreshCache());
                ds.Tables.Add(AppointmentRules.RefreshCache());
                ds.Tables.Add(ProcApptColors.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.Wiki) || isAll)
            {
                ds.Tables.Add(WikiListHeaderWidths.RefreshCache());
                ds.Tables.Add(WikiPages.RefreshCache());
            }
            if (itypes.Contains((int)InvalidType.ZipCodes) || isAll)
            {
                ds.Tables.Add(ZipCodes.RefreshCache());
            }
            return(ds);
        }
Пример #7
0
        ///<summary>only if ClientWeb</summary>
        public static void FillCache(DataSet ds, string itypesStr)
        {
            List <int> itypes = new List <int>();

            string[] strArray = itypesStr.Split(',');
            for (int i = 0; i < strArray.Length; i++)
            {
                itypes.Add(PIn.Int(strArray[i]));
            }
            bool isAll = false;

            if (itypes.Contains((int)InvalidType.AllLocal))
            {
                isAll = true;
            }
            if (itypes.Contains((int)InvalidType.AccountingAutoPays) || isAll)
            {
                AccountingAutoPays.FillCache(ds.Tables["AccountingAutoPay"]);
            }
            if (itypes.Contains((int)InvalidType.AutoCodes) || isAll)
            {
                AutoCodes.FillCache(ds.Tables["AutoCode"]);
                AutoCodeItems.FillCache(ds.Tables["AutoCodeItem"]);
                AutoCodeConds.FillCache(ds.Tables["AutoCodeCond"]);
            }
            if (itypes.Contains((int)InvalidType.Automation) || isAll)
            {
                Automations.FillCache(ds.Tables["Automation"]);
            }
            if (itypes.Contains((int)InvalidType.AutoNotes) || isAll)
            {
                AutoNotes.FillCache(ds.Tables["AutoNote"]);
                AutoNoteControls.FillCache(ds.Tables["AutoNoteControl"]);
            }
            if (itypes.Contains((int)InvalidType.Carriers) || isAll)
            {
                Carriers.FillCache(ds.Tables["Carrier"]);                //run on startup, after telephone reformat, after list edit.
            }
            if (itypes.Contains((int)InvalidType.ClaimForms) || isAll)
            {
                ClaimFormItems.FillCache(ds.Tables["ClaimFormItem"]);
                ClaimForms.FillCache(ds.Tables["ClaimForm"]);
            }
            if (itypes.Contains((int)InvalidType.ClearHouses) || isAll)
            {
                Clearinghouses.FillCache(ds.Tables["Clearinghouse"]);                //kh wants to add an EasyHideClearHouses to disable this
            }
            if (itypes.Contains((int)InvalidType.Computers) || isAll)
            {
                Computers.FillCache(ds.Tables["Computer"]);
                Printers.FillCache(ds.Tables["Printer"]);
            }
            if (itypes.Contains((int)InvalidType.Defs) || isAll)
            {
                Defs.FillCache(ds.Tables["Def"]);
            }
            if (itypes.Contains((int)InvalidType.DentalSchools) || isAll)
            {
                SchoolClasses.FillCache(ds.Tables["SchoolClass"]);
                SchoolCourses.FillCache(ds.Tables["SchoolCourse"]);
            }
            if (itypes.Contains((int)InvalidType.DictCustoms) || isAll)
            {
                DictCustoms.FillCache(ds.Tables["DictCustom"]);
            }
            if (itypes.Contains((int)InvalidType.Diseases) || isAll)
            {
                DiseaseDefs.FillCache(ds.Tables["DiseaseDef"]);
                ICD9s.FillCache(ds.Tables["ICD9"]);
            }
            if (itypes.Contains((int)InvalidType.DisplayFields) || isAll)
            {
                DisplayFields.FillCache(ds.Tables["DisplayField"]);
            }
            if (itypes.Contains((int)InvalidType.ElectIDs) || isAll)
            {
                ElectIDs.FillCache(ds.Tables["ElectID"]);
            }
            if (itypes.Contains((int)InvalidType.Email) || isAll)
            {
                EmailAddresses.FillCache(ds.Tables["EmailAddress"]);
                EmailTemplates.FillCache(ds.Tables["EmailTemplate"]);
            }
            if (itypes.Contains((int)InvalidType.Employees) || isAll)
            {
                Employees.FillCache(ds.Tables["Employee"]);
                PayPeriods.FillCache(ds.Tables["PayPeriod"]);
            }
            if (itypes.Contains((int)InvalidType.Employers) || isAll)
            {
                Employers.FillCache(ds.Tables["Employer"]);
            }
            if (itypes.Contains((int)InvalidType.Fees) || isAll)
            {
                Fees.FillCache(ds.Tables["Fee"]);
            }
            if (itypes.Contains((int)InvalidType.FeeScheds) || isAll)
            {
                FeeScheds.FillCache(ds.Tables["FeeSched"]);
            }
            if (itypes.Contains((int)InvalidType.HL7Defs) || isAll)
            {
                HL7Defs.FillCache(ds.Tables["HL7Def"]);
                HL7DefMessages.FillCache(ds.Tables["HL7DefMessage"]);
                HL7DefSegments.FillCache(ds.Tables["HL7DefSegment"]);
                HL7DefFields.FillCache(ds.Tables["HL7DefField"]);
            }
            if (itypes.Contains((int)InvalidType.InsCats) || isAll)
            {
                CovCats.FillCache(ds.Tables["CovCat"]);
                CovSpans.FillCache(ds.Tables["CovSpan"]);
            }
            if (itypes.Contains((int)InvalidType.InsFilingCodes) || isAll)
            {
                InsFilingCodes.FillCache(ds.Tables["InsFilingCode"]);
                InsFilingCodeSubtypes.FillCache(ds.Tables["InsFilingCodeSubtype"]);
            }
            if (itypes.Contains((int)InvalidType.Languages) || isAll)
            {
                Lans.FillCache(ds.Tables["Language"]);
            }
            if (itypes.Contains((int)InvalidType.Letters) || isAll)
            {
                Letters.FillCache(ds.Tables["Letter"]);
            }
            if (itypes.Contains((int)InvalidType.LetterMerge) || isAll)
            {
                LetterMergeFields.FillCache(ds.Tables["LetterMergeField"]);
                LetterMerges.FillCache(ds.Tables["LetterMerge"]);
            }
            if (itypes.Contains((int)InvalidType.Operatories) || isAll)
            {
                Operatories.FillCache(ds.Tables["Operatory"]);
            }
            if (itypes.Contains((int)InvalidType.PatFields) || isAll)
            {
                PatFieldDefs.FillCache(ds.Tables["PatFieldDef"]);
                ApptFieldDefs.FillCache(ds.Tables["ApptFieldDef"]);
            }
            if (itypes.Contains((int)InvalidType.Pharmacies) || isAll)
            {
                Pharmacies.FillCache(ds.Tables["Pharmacy"]);
            }
            if (itypes.Contains((int)InvalidType.Prefs) || isAll)
            {
                Prefs.FillCache(ds.Tables["Pref"]);
            }
            if (itypes.Contains((int)InvalidType.ProcButtons) || isAll)
            {
                ProcButtons.FillCache(ds.Tables["ProcButton"]);
                ProcButtonItems.FillCache(ds.Tables["ProcButtonItem"]);
            }
            if (itypes.Contains((int)InvalidType.ProcCodes) || isAll)
            {
                ProcedureCodes.FillCache(ds.Tables["ProcedureCode"]);
                ProcCodeNotes.FillCache(ds.Tables["ProcCodeNote"]);
            }
            if (itypes.Contains((int)InvalidType.Programs) || isAll)
            {
                Programs.FillCache(ds.Tables["Program"]);
                ProgramProperties.FillCache(ds.Tables["ProgramProperty"]);
            }
            if (itypes.Contains((int)InvalidType.ProviderIdents) || isAll)
            {
                ProviderIdents.FillCache(ds.Tables["ProviderIdent"]);
            }
            if (itypes.Contains((int)InvalidType.Providers) || isAll)
            {
                Providers.FillCache(ds.Tables["Provider"]);
            }
            if (itypes.Contains((int)InvalidType.QuickPaste) || isAll)
            {
                QuickPasteNotes.FillCache(ds.Tables["QuickPasteNote"]);
                QuickPasteCats.FillCache(ds.Tables["QuickPasteCat"]);
            }
            if (itypes.Contains((int)InvalidType.RecallTypes) || isAll)
            {
                RecallTypes.FillCache(ds.Tables["RecallType"]);
                RecallTriggers.FillCache(ds.Tables["RecallTrigger"]);
            }
            if (itypes.Contains((int)InvalidType.ReplicationServers) || isAll)
            {
                ReplicationServers.FillCache(ds.Tables["ReplicationServer"]);
            }
            if (itypes.Contains((int)InvalidType.Security) || isAll)
            {
                Userods.FillCache(ds.Tables["Userod"]);
                UserGroups.FillCache(ds.Tables["UserGroup"]);
            }
            if (itypes.Contains((int)InvalidType.Sheets) || isAll)
            {
                SheetDefs.FillCache(ds.Tables["SheetDef"]);
                SheetFieldDefs.FillCache(ds.Tables["SheetFieldDef"]);
            }
            if (itypes.Contains((int)InvalidType.Signals) || isAll)
            {
                SigElementDefs.FillCache(ds.Tables["SigElementDef"]);
                SigButDefs.FillCache(ds.Tables["SigButDef"]);                //includes SigButDefElements.Refresh()
            }
            if (itypes.Contains((int)InvalidType.Sites) || isAll)
            {
                Sites.FillCache(ds.Tables["Site"]);
            }
            if (itypes.Contains((int)InvalidType.Sops) || isAll)
            {
                Sops.FillCache(ds.Tables["Sop"]);
            }
            if (itypes.Contains((int)InvalidType.TimeCardRules) || isAll)
            {
                TimeCardRules.FillCache(ds.Tables["TimeCardRule"]);
            }
            //InvalidTypes.Tasks not handled here.
            if (itypes.Contains((int)InvalidType.ToolBut) || isAll)
            {
                ToolButItems.FillCache(ds.Tables["ToolButItem"]);
            }
            if (itypes.Contains((int)InvalidType.Vaccines) || isAll)
            {
                VaccineDefs.FillCache(ds.Tables["VaccineDef"]);
                DrugManufacturers.FillCache(ds.Tables["DrugManufacturer"]);
                DrugUnits.FillCache(ds.Tables["DrugUnit"]);
            }
            if (itypes.Contains((int)InvalidType.Views) || isAll)
            {
                ApptViews.FillCache(ds.Tables["ApptView"]);
                ApptViewItems.FillCache(ds.Tables["ApptViewItem"]);
                AppointmentRules.FillCache(ds.Tables["AppointmentRule"]);
                ProcApptColors.FillCache(ds.Tables["ProcApptColor"]);
            }
            if (itypes.Contains((int)InvalidType.Wiki) || isAll)
            {
                WikiListHeaderWidths.FillCache(ds.Tables["WikiListHeaderWidth"]);
                WikiPages.FillCache(ds.Tables["WikiPage"]);
            }
            if (itypes.Contains((int)InvalidType.ZipCodes) || isAll)
            {
                ZipCodes.FillCache(ds.Tables["ZipCode"]);
            }
        }