---
title: Lookup and reference-data hydration
summary: Loads MCO, globalization, code-map, and BDS value-date reference data used throughout the library.
status: draft
owner: SAIF
last_reviewed: 2026-07-30
library: SAIF.Business
reference_type: package
operation_id: OP-SB-13
trigger: Caller requests reference or lookup data.
---

# Lookup and reference-data hydration

This operation groups the library's reusable lookup helpers. It covers MCO metadata, globalization-aware code-table SQL generation, code-map collection loading, and the BDS report-date lookup exposed through `ObjectServices`.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-SB-13 |
| **Trigger** | Caller invokes MCO, globalization, code-map, or value-date helpers. |
| **Inputs** | MCO key, primary table name, culture code, code filters, data portal info |
| **Outputs** | MCO structures, SQL text, lookup collections, or BDS value date |
| **Primary components** | `MCOInfo.New`, `GlobalizationServices.GlobalizedCodeTableSql`, `GlobalizationServices.GetGlobalizedCodeItemCollection`, `mdlCodeMaps` map factories, `ObjectServices.GetBDSValueDate` |
| **Entry point** | `Business\SAIF.Business\MCOInfo.vb` |

## Steps

1. MCO retrieval constructors load the plan row and any related GSA location rows needed to populate `MCOInfo`, `MCOPlanInfo`, and `MCOLocationInfo` objects ([SQL-039](../sql/SQL-039-mco-lookup-family.md), [MCO_PLAN](../database-tables.md#mco-plan-mco-gsa-location), [MCO_GSA_LOCATION](../database-tables.md#mco-plan-mco-gsa-location)).
2. `GlobalizationServices.GlobalizedCodeTableSql` generates the SQL text needed to read a code table with the correct globalization join and optional all-codes behavior ([SQL-040](../sql/SQL-040-code-map-lookup-family.md), [Code/lookup tables](../database-tables.md#code-lookup-tables-email-code-address-code-phone-code-company-code-relationship-code-ethnic-group-code-cl-language-preference-code-cl-benefit-type-code-cl-jurisdiction-code-country-code-cl-relationship-to-worker-code-claim-person-code-cl-payment-category-code-cl-reimb-program-code-claim-decision-code-cl-request-type-code-own-motion-reason-code-eaip-expense-type-code-rtw-load-code-cl-wage-period-pay-unit-code-cl-settlement-full-part-code-cl-financial-trans-type-code-cl-claim-cost-category-code-cl-claim-type-code-cl-claim-type-gcode-claim-status-code-cl-claim-status-gcode)).
3. `GetGlobalizedCodeItemCollection` executes the generated SQL through `clsCodeTableEntity` and returns key/value pairs for the requested culture and table ([SQL-040](../sql/SQL-040-code-map-lookup-family.md), [Code/lookup tables](../database-tables.md#code-lookup-tables-email-code-address-code-phone-code-company-code-relationship-code-ethnic-group-code-cl-language-preference-code-cl-benefit-type-code-cl-jurisdiction-code-country-code-cl-relationship-to-worker-code-claim-person-code-cl-payment-category-code-cl-reimb-program-code-claim-decision-code-cl-request-type-code-own-motion-reason-code-eaip-expense-type-code-rtw-load-code-cl-wage-period-pay-unit-code-cl-settlement-full-part-code-cl-financial-trans-type-code-cl-claim-cost-category-code-cl-claim-type-code-cl-claim-type-gcode-claim-status-code-cl-claim-status-gcode)).
4. `mdlCodeMaps` wraps those lookup calls in strongly named map factories so callers can request address, phone, company, claim, reimbursement, or other reference lists without hand-writing SQL ([SQL-040](../sql/SQL-040-code-map-lookup-family.md), [Code/lookup tables](../database-tables.md#code-lookup-tables-email-code-address-code-phone-code-company-code-relationship-code-ethnic-group-code-cl-language-preference-code-cl-benefit-type-code-cl-jurisdiction-code-country-code-cl-relationship-to-worker-code-claim-person-code-cl-payment-category-code-cl-reimb-program-code-claim-decision-code-cl-request-type-code-own-motion-reason-code-eaip-expense-type-code-rtw-load-code-cl-wage-period-pay-unit-code-cl-settlement-full-part-code-cl-financial-trans-type-code-cl-claim-cost-category-code-cl-claim-type-code-cl-claim-type-gcode-claim-status-code-cl-claim-status-gcode)).
5. `ObjectServices.GetTranslation` uses the translation business object to turn a lookup value into localized display text for callers that only need one translated value.
6. `ObjectServices.GetBDSValueDate` calls `cp_report_date` and returns the BDS report date as a scalar helper value ([SQL-041](../sql/SQL-041-cp-report-date.md)).

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
    Start([Lookup request]) --> Kind{MCO, code map, translation, or value date?}
    Kind -->|MCO| MCO[Load plan and location rows]
    Kind -->|Code map| Code[Build and execute globalization SQL]
    Kind -->|Translation| Translation[Delegate to translation business object]
    Kind -->|Value date| Date[Call cp_report_date]
    MCO --> Return1([Return MCO info])
    Code --> Return2([Return lookup collection])
    Translation --> Return3([Return translated value])
    Date --> Return4([Return BDS value date])
```

## Failure and edge-case behavior

- Lookup helpers return empty collections or empty strings when the requested reference rows do not exist.
- `GetBDSValueDate` depends on the database scalar procedure and therefore returns no useful value when that scalar cannot be resolved.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

## Sources
- `Business\SAIF.Business\MCOInfo.vb`
- `Business\SAIF.Business\GlobalizationServices.vb`
- `Business\SAIF.Business\mdlCodeMaps.vb`
- `Business\SAIF.Business\ObjectServices.vb`
- `Business\SAIF.Business\clsCodeTableEntity.vb`
