Skip to content

Load and cache the benefit jurisdiction code map

Builds and caches (per-process, Static) the benefit-jurisdiction code map used to translate S/F codes to State/Federal.

Field Value
Operation ID op-12-benefit-jurisdiction-code-map
Trigger Caller invokes CodeMaps.GetBenefitJurisdictionCodeMap
Inputs IDataPortalInfo, optional refresh flag
Outputs Cached clsBenefitJurisdictionCodeMap
Primary components CodeMaps.GetBenefitJurisdictionCodeMap, clsBenefitJurisdictionCodeMap
Entry point SAIF.Business.Policy/CodeMaps/clsBenefitJurisdictionCodeMap.vb

Steps

  1. If refresh is true or the Static cached instance is Nothing, construct a new map (BR-POL-016).
  2. The constructor runs select code, code_descr from BENEFIT_JURISDICTION_CODE (SQL-001) through the framework Fill(inDPI, MySQL) helper.
  3. Iterates the clsResultSet rows and adds only "S" → State and "F" → Federal (BR-POL-012); all other codes are ignored.
  4. Return the cached instance.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start(["Caller invokes<br>GetBenefitJurisdictionCodeMap"]) --> A{"refresh is true or<br>cached instance is Nothing?"}
    A -->|No| End(["Return cached<br>clsBenefitJurisdictionCodeMap"])
    A -->|Yes| B["Construct new map"]
    B --> C["Run SELECT code, code_descr<br>FROM BENEFIT_JURISDICTION_CODE<br>via Fill helper"]
    C --> D["Iterate clsResultSet rows"]
    D --> E{"Code = S or F?"}
    E -->|S| F["Add State"]
    E -->|F| G["Add Federal"]
    E -->|Other| H["Ignore code"]
    F --> End
    G --> End
    H --> End

Failure and edge-case behavior

  • Codes other than "S" and "F" are ignored and are not added to the map (BR-POL-012).

Sources

  • SAIF.Business.Policy/CodeMaps/clsBenefitJurisdictionCodeMap.vb