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¶
- Single-code lookup.
clsAdjustmentCode.GetAdjustmentCode(dpi, code)issues a direct SQL retrieve againstCBP_AUDIT_ADJUSTMENT_TYPEfiltered to the requested code (SQL-004, CBP_AUDIT_ADJUSTMENT_TYPE) and fills a singleclsAdjustmentCodefrom the resulting reader row. - Callers most commonly reach this path through
clsServiceAdjustment.AdjustmentCodeObject, documented as part of Audit service and adjustment retrieval. - 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 oneclsAdjustmentCodeper row. - Consumption by aggregate description views.
clsMedicalBill.AuditDescriptionsandclsMedicalBillCollection.AuditDescriptionseach build a deduplicated,Code-sortedclsAdjustmentCodeCollectionby callingAdjustmentCodeObject(step 1) once per unique adjustment code encountered across a bill's (or collection's) audit services and adjustments — they do not callGetCodes(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 readingCode/description properties afterward would see empty values rather than an explicit error.* AuditDescriptionson 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.*
Related documentation¶
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.vbBusiness\SAIF.Business.Claim.MedicalBill\clsAdjustmentCodeCollection.vb