Skip to content

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

  1. Create category. NewLossCategory builds a Criteria with the parent claim ID and category code; BeforeInsert binds these plus standard audit columns and executes (SQL-004, US_LOSS_CATEGORY):
    INSERT INTO us_loss_category (claim_id, loss_category_code, ..., update_num, update_date, update_user)
    VALUES (:ClaimID, :LossCategoryCode, ..., :UpdateNum, :UpdateDate, :UpdateUser)
    
  2. Retrieve / update / delete category. Standard CRUD pattern against US_LOSS_CATEGORY: update executes SQL-019, delete executes SQL-024. AfterRetrieve also loads the category's child LossCategoryOffsets collection.
  3. Create offset. NewLossCategoryOffset builds a Criteria with the parent claim ID, category code, and offset type code; BeforeInsert executes (SQL-005, US_LOSS_CATEGORY_OFFSET):
    INSERT INTO us_loss_category_offset (claim_id, loss_category_code, offset_type_code, offset_amount, ..., update_num, update_date, update_user)
    VALUES (:ClaimID, :LossCategoryCode, :OffsetTypeCode, :OffsetAmount, ..., :UpdateNum, :UpdateDate, :UpdateUser)
    
  4. Retrieve / update / delete offset. Standard CRUD pattern against US_LOSS_CATEGORY_OFFSET: update executes SQL-020, delete executes SQL-025.
  5. Offset-type code lookup. clsOffsetTypeCode.GetOffsetTypeCode(dpi, code) retrieves a single lookup row describing an offset type (such as TPN) from the US_OFFSET_TYPE_CODE table. 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.**
  6. Consumption by loss-summary totals. The Loss summary maintenance operation reads LossCategories and their child LossCategoryOffsets to 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 1 on insert, update, or delete adds an error/broken-rule entry rather than throwing an exception.*
  • US_OFFSET_TYPE_CODE is 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 on OffsetTypeCode values such as TPN being correctly categorized.**
  • No property-level AddBusinessRules() validation beyond standard framework checks was found on either clsLossCategory or clsLossCategoryOffset during tracing.*

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.vb
  • Business\SAIF.Business.UnitStat.Claim\Loss Summary\clsLossCategoryOffset.vb
  • Business\SAIF.Business.UnitStat.Claim\Loss Summary\clsOffsetTypeCode.vb