Service reference lookups¶
Service reference lookups resolve a service code and type to its full reference profile: descriptions, fee schedules, CPT bundling relationships, and MCO fee exemptions, plus the process-wide code-table lists (service type, location, modifier, category, sub-category) used elsewhere in the library. Every class here is read-only against Oracle reference tables — none of them write. clsServiceManager caches resolved clsServiceInfo objects by code#type key so repeated lookups for the same service avoid re-querying the database.
| Field | Value |
|---|---|
| Operation ID | OP-CB-06 |
| Trigger | Any read of clsServiceInfo.ServiceDescriptions, .FeeSchedule, .CPTServices, .MCOFeeExeptions, or .BundledItems; or a direct call to clsServiceManager.GetService(code, type) |
| Inputs | Service code, service type code, effective date (for date-scoped lookups) |
| Outputs | Cached clsServiceInfo with lazily-loaded description, fee, CPT, and bundle collections; process-wide code-table lists (clsServiceTypeCodeMap, service location/modifier/category/sub-category lists) |
| Primary components | clsServiceManager.GetService, clsServiceManager.RetrieveService, clsServiceManager.GetDescriptions, clsServiceManager.GetFees, clsServiceManager.GetCPTServices, clsServiceManager.GetCPTBundledItems, clsServiceManager.GetMCOFeeExemptions, clsServiceManager.IsInBundle, mdlServices.GetServiceManager |
| Entry point | Business\SAIF.Business.Claim.Bill\AuditSupport\Services\ServiceManager.vb |
Steps¶
- Obtain the cached service manager.
mdlServices.GetServiceManager(inDPI, refresh)returns a module-level cached singleton; passingrefresh = Truediscards the cache and creates a new manager. - Resolve a service by code and type (
GetService). The manager builds a cache key ofcode#type; if not already cached, it callsRetrieveServiceto load it, then returns the cachedclsServiceInfo(orNothingif no matching service exists). RetrieveServicequeriescbp_service_codeby code and type, maps thebill_service_type_codethroughGetServiceTypeCodeMap(...), constructs aclsServiceInfo(...), stores it in the in-memory cache, and returns whether any row was found. This table is not currently listed in the SQL catalog or database-tables document for this library.**- Get a service type code for a date (
GetServiceTypeCode). A scalar query againstcbp_service_codefilters by code and an effective/expiration date window and returns the type code, or an empty string if the result is null/DBNull. This table is not currently listed in the SQL catalog for this library.** - Load service descriptions (lazy,
clsServiceInfo.ServiceDescriptions). On first access,Manager.GetDescriptions(Me)queriescbp_service_descriptionby service code and type and builds aclsServiceDescriptionListofclsServiceDescriptionInfoentries (each carrying description text and effective/expiration dates). This table is not currently listed in the SQL catalog for this library.** clsServiceDescriptionList.GetDescription(inDate)returns the first description in effect on the requested date.- Load the fee schedule (lazy,
clsServiceInfo.FeeSchedule). On first access,Manager.GetFees(Me)queriescbp_service_fee, computes aFeeKeyfrom the effective date, expiration date (or a sentinel), and service-modifier code, resolves the modifier through the process-wide modifier list, and builds aclsServiceFeeListofclsServiceFeeentries carrying maximum amount, relative quantities, and percent-off/package-eligibility flags. This table is not currently listed in the SQL catalog for this library.** - Load CPT service flags (lazy,
clsServiceInfo.CPTServices). On first access,Manager.GetCPTServices(Me)queriescbp_cpt_serviceby code and type and builds aclsCPTServiceListofclsCPTServiceInfoentries carrying global-day quantity and surgical/E&M/DME/IME/multiple-surgery flags. This table is not currently listed in the SQL catalog for this library.** clsCPTServiceList.GetCPTService(inEffectiveDate)returns the entry in effect on the requested date.- Load CPT bundling relationships (lazy,
clsServiceInfo.BundledItems). On first access,Manager.GetCPTBundledItems(Me)queriescbp_cpt_service_bundlefor rows where the service is either the bundle or a component, resolves both the bundle and component services throughGetService(values retrieved but not further used in the bundled-item construction), and buildsclsCPTBundledItementries with an exemption flag. This table is not currently listed in the SQL catalog for this library.** - Derived properties on
clsServiceInfoclassify the service using this list:IsCPTBundle(service owns a bundle),BundledServices(its component services),IsInBundle(service is a component of some bundle),BundleOwners(the bundle(s) it belongs to). - Check bundle membership without loading the full list (
IsInBundle).clsServiceManager.IsInBundle(inService)runs a scalarcount(*)againstcbp_cpt_service_bundleand returns whether the count is greater than zero, without materializing bundle rows. This table is not currently listed in the SQL catalog for this library.** - Load MCO fee exemptions (lazy,
clsServiceInfo.MCOFeeExeptions). On first access,Manager.GetMCOFeeExemptions(Me)queriesMCO_FEE_EXEMPTIONby service code and (trimmed) service type and builds aclsMCOFeeExemptionListofclsMCOFeeExemptionentries carrying an MCO plan ID and effective/expiration dates. This table is not currently listed in the SQL catalog for this library.** clsMCOFeeExemptionList.FeeExists(...)is overloaded to check by date, by date and plan ID, or by plan ID alone.- Resolve process-wide code-table lists.
mdlServices.GetServiceTypeCodeMap,GetServiceLocations(SQL-018, CBP_SERVICE_LOCATION_CODE),GetServiceModifiers(SQL-019, CBP_SERVICE_MODIFIER_CODE),GetServiceCategories(SQL-017, CBP_SERVICE_CATEGORY_CODE), andGetServiceSubCategories(SQL-020, CBP_SERVICE_SUBCAT_CODE) are each cached module-level lookups, reloaded only when the cache is missing or a refresh is requested.
Process flow¶
The following diagram visualizes the cached lookup pattern used across all service reference data.
flowchart TD
Start([Caller requests service<br>reference data]) --> Cached{Service cached<br>by code#type?}
Cached -->|Yes| Return[Return cached clsServiceInfo]
Cached -->|No| Retrieve[Query cbp_service_code;<br>build clsServiceInfo]
Retrieve --> Store[Store in manager cache]
Store --> Return
Return --> Access{Which sub-collection<br>is accessed?}
Access -->|Descriptions| Desc[Lazy-load cbp_service_description]
Access -->|Fees| Fees[Lazy-load cbp_service_fee]
Access -->|CPT| CPT[Lazy-load cbp_cpt_service]
Access -->|Bundles| Bundle[Lazy-load cbp_cpt_service_bundle]
Access -->|MCO exemptions| MCO[Lazy-load MCO_FEE_EXEMPTION]
Desc --> Done([Sub-collection returned<br>and cached on the object])
Fees --> Done
CPT --> Done
Bundle --> Done
MCO --> Done
Failure and edge-case behavior¶
clsServiceInfo.MCOFeeExeptionsis misspelled in source (missing the second "m" in "Exemptions"); the name is preserved here to describe the code accurately rather than corrected.*GetCPTBundledItemsresolves both the bundle-side and component-side services viaGetServicebut does not use the returned objects beyond triggering the cache population, so a missing bundle or component service silently returnsNothingfromGetServicewithout surfacing an error.*- None of the classes in this operation write to the database; all failures are read-miss conditions (empty list,
Nothingreturn, or empty string) rather than validation errors or broken rules. - Several reference tables queried here (
cbp_service_code,cbp_cpt_service,cbp_cpt_service_bundle,cbp_service_fee,cbp_service_description,MCO_FEE_EXEMPTION) are not currently represented in this library's SQL catalog or database-tables document; table names above are cited directly from source rather than from a documented SQL ID.**
Related documentation¶
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with**could not be confirmed against existing documentation artifacts; treat as unknown until verified.
Sources¶
Business\SAIF.Business.Claim.Bill\AuditSupport\Services\AbastractServiceClasses.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\ServiceManager.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\clsCPTBundle.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\clsCPTService.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\clsMCOFeeExemption.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\clsServiceDescription.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\clsServiceFee.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\clsServiceInfo.vbBusiness\SAIF.Business.Claim.Bill\AuditSupport\Services\mdlServices.vb