Skip to content

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, 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, Code/lookup tables).
  3. GetGlobalizedCodeItemCollection executes the generated SQL through clsCodeTableEntity and returns key/value pairs for the requested culture and table (SQL-040, Code/lookup tables).
  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, Code/lookup tables).
  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).

Process flow

The following diagram visualizes this operation's control flow.

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.

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