Loss category and offset maintenance¶
Each loss summary breaks its totals down into categories (clsLossCategory, e.g. medical vs. indemnity, or a SETL settlement category), and each category can carry one or more offset rows (clsLossCategoryOffset) that adjust the category's reported amount — for example, a third-party-prediction (TPN) offset used by the settlement floor described in Loss summary maintenance. clsOffsetTypeCode is a small lookup class used to validate/describe offset type codes such as TPN.
| Field | Value |
|---|---|
| Operation ID | OP-USC-04 |
| Trigger | NewLossCategory / GetLossCategory and NewLossCategoryOffset / GetLossCategoryOffset, followed by Save() or Delete(); offset-type lookups via clsOffsetTypeCode.GetOffsetTypeCode |
| Inputs | ClaimID, LossCategoryCode (parent key), OffsetTypeCode (child key) |
| Outputs | Persisted or retrieved US_LOSS_CATEGORY and US_LOSS_CATEGORY_OFFSET rows |
| Primary components | clsLossCategory, clsLossCategoryOffset, clsOffsetTypeCode |
| Entry point | Business\SAIF.Business.UnitStat.Claim\Loss Summary\clsLossCategory.vb, Business\SAIF.Business.UnitStat.Claim\Loss Summary\clsLossCategoryOffset.vb |
Steps¶
- Create category.
NewLossCategorybuilds aCriteriawith the parent claim ID and category code;BeforeInsertbinds these plus standard audit columns and executes (SQL-004, US_LOSS_CATEGORY): - Retrieve / update / delete category. Standard CRUD pattern against US_LOSS_CATEGORY: update executes SQL-019, delete executes SQL-024.
AfterRetrievealso loads the category's childLossCategoryOffsetscollection. - Create offset.
NewLossCategoryOffsetbuilds aCriteriawith the parent claim ID, category code, and offset type code;BeforeInsertexecutes (SQL-005, US_LOSS_CATEGORY_OFFSET): - Retrieve / update / delete offset. Standard CRUD pattern against US_LOSS_CATEGORY_OFFSET: update executes SQL-020, delete executes SQL-025.
- Offset-type code lookup.
clsOffsetTypeCode.GetOffsetTypeCode(dpi, code)retrieves a single lookup row describing an offset type (such asTPN) from theUS_OFFSET_TYPE_CODEtable. This table is not yet cataloged in Database tables, and no numbered SQL statement is indexed for this lookup in the SQL catalog, so it is referenced here by name only, without a link.** - Consumption by loss-summary totals. The Loss summary maintenance operation reads
LossCategoriesand their childLossCategoryOffsetsto compute derived totals and the settlement/third-party-prediction floor — this operation only owns the persistence of the category/offset rows themselves, not the aggregation logic.
Process flow¶
flowchart TD
Start([Caller requests category or offset operation]) --> Which{Category or offset?}
Which -->|Category| CatCRUD{Create, retrieve,<br>update, or delete?}
CatCRUD -->|Create| CatInsert[Insert US_LOSS_CATEGORY row]
CatCRUD -->|Retrieve| CatRetrieve[Select category, then load child offsets]
CatCRUD -->|Update| CatUpdate[Update US_LOSS_CATEGORY row]
CatCRUD -->|Delete| CatDelete[Delete US_LOSS_CATEGORY row]
Which -->|Offset| OffCRUD{Create, retrieve,<br>update, or delete?}
OffCRUD -->|Create| OffInsert[Insert US_LOSS_CATEGORY_OFFSET row]
OffCRUD -->|Retrieve| OffRetrieve[Select offset row]
OffCRUD -->|Update| OffUpdate[Update US_LOSS_CATEGORY_OFFSET row]
OffCRUD -->|Delete| OffDelete[Delete US_LOSS_CATEGORY_OFFSET row]
Which -->|Lookup| Lookup[Retrieve US_OFFSET_TYPE_CODE row by code]
Failure and edge-case behavior¶
- As with the other CRUD-style objects in this library, a rows-affected value other than
1on insert, update, or delete adds an error/broken-rule entry rather than throwing an exception.* US_OFFSET_TYPE_CODEis uncataloged in Database tables and its retrieval SQL is not indexed in the SQL catalog; this is a documentation gap in the prior catalog pass rather than evidence the lookup is unused —clsLossSummary's floor calculation depends onOffsetTypeCodevalues such asTPNbeing correctly categorized.**- No property-level
AddBusinessRules()validation beyond standard framework checks was found on eitherclsLossCategoryorclsLossCategoryOffsetduring tracing.*
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. Statements marked with**could not be confirmed; treat as unknown until verified.
Sources¶
Business\SAIF.Business.UnitStat.Claim\Loss Summary\clsLossCategory.vbBusiness\SAIF.Business.UnitStat.Claim\Loss Summary\clsLossCategoryOffset.vbBusiness\SAIF.Business.UnitStat.Claim\Loss Summary\clsOffsetTypeCode.vb