Skip to content

Adjustment code lookup

Adjustment code lookup reads the CBP_AUDIT_ADJUSTMENT_TYPE reference table directly (not through a stored procedure). It supports two access patterns: a single-code lookup used whenever a service adjustment needs to resolve its descriptive text, and a full-table lookup used to build reference lists (for example, the aggregate AuditDescriptions collections on a bill or bill collection).

Field Value
Operation ID OP-MB-05
Trigger clsAdjustmentCode.GetAdjustmentCode(dataportal, code); clsAdjustmentCodeCollection.GetCodes(dataportal)
Inputs code (single lookup); none beyond the data-portal info (collection lookup)
Outputs Populated clsAdjustmentCode (single) or clsAdjustmentCodeCollection (full reference table)
Primary components clsAdjustmentCode.GetAdjustmentCode, clsAdjustmentCode.BeforeRetrieve, clsAdjustmentCodeCollection.GetCodes, clsAdjustmentCodeCollection.BeforeRetrieve
Entry point Business\SAIF.Business.Claim.MedicalBill\clsAdjustmentCode.vb, Business\SAIF.Business.Claim.MedicalBill\clsAdjustmentCodeCollection.vb

Steps

  1. Single-code lookup. clsAdjustmentCode.GetAdjustmentCode(dpi, code) issues a direct SQL retrieve against CBP_AUDIT_ADJUSTMENT_TYPE filtered to the requested code (SQL-004, CBP_AUDIT_ADJUSTMENT_TYPE) and fills a single clsAdjustmentCode from the resulting reader row.
  2. Callers most commonly reach this path through clsServiceAdjustment.AdjustmentCodeObject, documented as part of Audit service and adjustment retrieval.
  3. Full-table lookup. clsAdjustmentCodeCollection.GetCodes(dpi) issues a direct SQL retrieve against the same table without a code filter (SQL-005, CBP_AUDIT_ADJUSTMENT_TYPE) and loads one clsAdjustmentCode per row.
  4. Consumption by aggregate description views. clsMedicalBill.AuditDescriptions and clsMedicalBillCollection.AuditDescriptions each build a deduplicated, Code-sorted clsAdjustmentCodeCollection by calling AdjustmentCodeObject (step 1) once per unique adjustment code encountered across a bill's (or collection's) audit services and adjustments — they do not call GetCodes (step 2) themselves.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Caller needs adjustment code data]) --> Which{Single code or full table?}
    Which -->|Single code| SingleSql[Retrieve single row by code]
    Which -->|Full table| FullSql[Retrieve all reference rows]
    SingleSql --> SingleObj[Fill single clsAdjustmentCode]
    FullSql --> Collection[Load clsAdjustmentCodeCollection]
    SingleObj --> Done([Returned to caller])
    Collection --> Done

Failure and edge-case behavior

  • Both lookups are read-only direct-SQL retrievals; there is no persist/save path on either object.
  • A single-code lookup for a code with no matching reference row returns an unfilled clsAdjustmentCode, so callers reading Code/description properties afterward would see empty values rather than an explicit error.*
  • AuditDescriptions on the bill and bill-collection objects always uses the per-code lookup path, so it issues one retrieval per unique adjustment code rather than a single bulk retrieval, even though a bulk lookup (GetCodes) exists.*

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • Business\SAIF.Business.Claim.MedicalBill\clsAdjustmentCode.vb
  • Business\SAIF.Business.Claim.MedicalBill\clsAdjustmentCodeCollection.vb