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¶
- MCO retrieval constructors load the plan row and any related GSA location rows needed to populate
MCOInfo,MCOPlanInfo, andMCOLocationInfoobjects (SQL-039, MCO_PLAN, MCO_GSA_LOCATION). GlobalizationServices.GlobalizedCodeTableSqlgenerates the SQL text needed to read a code table with the correct globalization join and optional all-codes behavior (SQL-040, Code/lookup tables).GetGlobalizedCodeItemCollectionexecutes the generated SQL throughclsCodeTableEntityand returns key/value pairs for the requested culture and table (SQL-040, Code/lookup tables).mdlCodeMapswraps 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).ObjectServices.GetTranslationuses the translation business object to turn a lookup value into localized display text for callers that only need one translated value.ObjectServices.GetBDSValueDatecallscp_report_dateand 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.
GetBDSValueDatedepends on the database scalar procedure and therefore returns no useful value when that scalar cannot be resolved.
Related documentation¶
Sources¶
Business\SAIF.Business\MCOInfo.vbBusiness\SAIF.Business\GlobalizationServices.vbBusiness\SAIF.Business\mdlCodeMaps.vbBusiness\SAIF.Business\ObjectServices.vbBusiness\SAIF.Business\clsCodeTableEntity.vb