Skip to content

SAIF.Business.UnitStat operations and processes

This page is the operation catalog and cross-operation hub for SAIF.Business.UnitStat. The library exposes eight operations covering the policy-unit and claim-unit reporting lifecycle, denial/fraud eligibility checks, audit-condition maintenance and history tracking, code-map loading, derived reporting calculations, and retention-date calculation. Each operation's detailed, step-by-step logic lives in its own page under operations/.

Operation catalog

Operation Intent Trigger Inputs Outputs Rules Tables SQL
Policy unit CRUD Create, retrieve, update, delete, and activate/inactivate a policy-level reporting unit clsPolicyUnit.NewPolicyUnit / GetPolicyUnit / clsPolicyUnitCollection.GetPolicyUnits, followed by property edits and Save(), or ActivatePolicyUnit()/InactivatePolicyUnit() Policy number, policy-period effective date, unit effective/expiration dates, valuation numbers, activity/correction/historical flags Persisted US_POLICY_UNIT row; populated clsPolicyUnit/clsPolicyUnitCollection; derived reportability flags BR-US-001, BR-US-006, BR-US-007, BR-US-008, BR-US-009, BR-US-010, BR-US-011, BR-US-012, BR-US-013, BR-US-014, BR-US-015, BR-US-016, BR-US-017, BR-US-020, BR-US-026 US_POLICY_UNIT SQL-004, SQL-020, SQL-021, SQL-022, SQL-023, SQL-024, SQL-025, SQL-029, SQL-035
Claim unit maintenance Create, retrieve, update, and delete a claim unit tying a claim to a policy unit clsClaimUnit.NewClaimUnit / GetClaimUnit, followed by property edits and Save(), or clsClaimUnitCollection.GetClaimUnits Policy unit sequence number, claim ID, loss/exposure amounts, value code, reporting flags Persisted US_CLAIM_UNIT row; populated clsClaimUnit/clsClaimUnitCollection BR-US-020, BR-US-028, BR-US-029, BR-US-030 US_CLAIM_UNIT SQL-003, SQL-012, SQL-013, SQL-016, SQL-028, SQL-034
Denial and fraud eligibility Evaluate denial-final and fully-fraudulent status for a claim unit Caller reads clsClaimUnit.IsDeniedFinal or IsFullyFraudulent(clmData) Claim ID; fraud-conviction flag from an externally supplied clsClaimData Cached boolean denial/fraud status BR-US-027 CL_INJURY_CLAIM, US_CLAIM_UNIT, US_POLICY_UNIT SQL-014, SQL-015
Audit condition maintenance Create, retrieve, evaluate errors on, and bulk-delete audit conditions raised against a policy unit clsAuditCondition.NewAuditCondition/GetAuditCondition, clsAuditConditionCollection.GetAuditConditions/GetPolicyPeriodAudits/GetPolicyUnitAudits/GetUpdateUserAudits, or any shared Delete* function Policy unit sequence number, exposure summary sequence number, claim ID, description, edit type code, error flag Persisted US_AUDIT_CONDITION row(s); populated collection; Has*Errors booleans; rows-deleted count BR-US-020, BR-US-024 US_AUDIT_CONDITION SQL-001, SQL-005, SQL-006, SQL-007, SQL-008, SQL-009, SQL-030, SQL-031, SQL-032, SQL-033
Audit condition history tracking Create, retrieve, and update historical audit-condition records keyed by policy unit, claim, and description clsAuditConditionHistory.NewAuditConditionHistory/GetAuditConditionHistory, followed by Save(), or clsAuditConditionHistoryCollection.GetAuditConditionHistoryByPolicyUnitClaimId Policy unit sequence number, claim ID, audit condition description, edit type code, error flag Persisted US_AUDIT_CONDITION_HISTORY row; populated object/collection BR-US-020 US_AUDIT_CONDITION_HISTORY SQL-002, SQL-010, SQL-011, SQL-026, SQL-027
Code map loading Lazily load and cache code-translation maps, including three database-backed maps Caller invokes any Get*Map function in mdlCodeMaps IDataPortalInfo and optional refresh flag (database-backed maps only) Cached code-map object translating codes to enumerated types None catalogued* CALCULATION_TYPE_CODE, US_COST_TYPE_CODE, US_OFFSET_TYPE_CODE SQL-017, SQL-018, SQL-019
Derived reporting calculations Compute reserve, catastrophe, reportability, and claim-status classifications shared by loss/exposure data Caller reads a derived property on clsLossBase/clsExposureBase, or invokes CopyData/HasCostsChanged Stored loss/exposure fields (incurred/paid amounts, NCCI codes, catastrophe number, report type) Calculated decimal/boolean values; copied field sets; cost-change comparison result BR-US-021, BR-US-022, BR-US-023 None None
Retention date calculation Compute quarter-aligned archive/delete cutoff dates and a default ER Mod factor Caller invokes UnitArchiveDate, UnitDeleteDate, QuarterStartDate, or ERModFactor extension methods A Date or a clsPolicyPeriodRatingPlan instance Calculated archive/delete cutoff date, quarter-start date, or ER Mod factor BR-US-025 None None

Process flow diagram

The following diagram shows how the eight operations relate across the Unit Stat reporting lifecycle: a policy unit is created or retrieved, its claim units and audit conditions are maintained, denial/fraud eligibility is evaluated per claim, code maps translate stored codes for reporting, and derived calculations and retention dates support downstream reporting and archival.

flowchart TD
    Start([Caller requests Unit Stat maintenance]) --> Policy[Policy unit CRUD]
    Policy --> ClaimUnits[Claim unit maintenance]
    ClaimUnits --> Denial[Denial and fraud eligibility]
    Policy --> Audit[Audit condition maintenance]
    Audit --> History[Audit condition history tracking]
    Policy --> Derived[Derived reporting calculations]
    ClaimUnits --> Derived
    Derived --> Maps[Code map loading]
    Policy --> Retention[Retention date calculation]
    Denial --> Save{Save requested?}
    Audit --> Save
    History --> Save
    Save --> Validate{Validation rules pass?}
    Validate -->|No| Errors([Broken rules returned;<br>changes retained in memory])
    Validate -->|Yes| Persist[Insert/update/delete cascade]
    Persist --> Concurrency{RowsAffected = 1?}
    Concurrency -->|Yes| Done([Changes persisted;<br>objects marked clean])
    Concurrency -->|No| Contention([DB contention error added;<br>save reported as failed])

Inherited operations and processes

Operations in this section originate from BOF framework base classes inherited by the library's business objects and collections.

From clsBusinessBase (SAIF.BOF.Framework)

Operation Intent Provided by Origin
Business object edit lifecycle Snapshot, restore, and commit in-memory object edits through BeginEdit(), CancelEdit(), and ApplyEdit(). clsBusinessBase SAIF.BOF.Framework
Business object save lifecycle Persist root or child business objects through the framework Save() and SaveChild() pipeline. clsBusinessBase SAIF.BOF.Framework

Business object edit lifecycle (inherited)

  1. BeginEdit() captures the current object state.
  2. CancelEdit() restores the prior snapshot and reapplies business rules.
  3. ApplyEdit() commits the edited state.

Origin: This flow is defined in SAIF.BOF.Framework / clsBusinessBase and inherited by the library's business objects.

From clsBusinessCollectionBase (SAIF.BOF.Framework)

Operation Intent Provided by Origin
Business collection edit lifecycle Snapshot, restore, and commit collection edits across child objects. clsBusinessCollectionBase SAIF.BOF.Framework
Managed collection save lifecycle Persist deleted children first, then active children, through managed collection save behavior. clsBusinessCollectionBase SAIF.BOF.Framework

Managed collection save lifecycle (inherited)

  1. Save deleted child objects in the collection's deleted list.
  2. Save remaining active child objects.
  3. Clear the deleted list and complete the managed save.

Origin: This flow is defined in SAIF.BOF.Framework / clsBusinessCollectionBase and inherited by the library's collections.

Database interactions

The following table summarizes which operations read from or write to the database. Per-step SQL and table citations live in each operation's detail page under operations/.

Operation SQL Tables Type
Policy unit CRUD SQL-004, SQL-020, SQL-021, SQL-022, SQL-023, SQL-024, SQL-025, SQL-029, SQL-035 US_POLICY_UNIT Read / Write
Claim unit maintenance SQL-003, SQL-012, SQL-013, SQL-016, SQL-028, SQL-034 US_CLAIM_UNIT Read / Write
Denial and fraud eligibility SQL-014, SQL-015 CL_INJURY_CLAIM, US_CLAIM_UNIT, US_POLICY_UNIT Read
Audit condition maintenance SQL-001, SQL-005, SQL-006, SQL-007, SQL-008, SQL-009, SQL-030, SQL-031, SQL-032, SQL-033 US_AUDIT_CONDITION Read / Write
Audit condition history tracking SQL-002, SQL-010, SQL-011, SQL-026, SQL-027 US_AUDIT_CONDITION_HISTORY Read / Write
Code map loading SQL-017, SQL-018, SQL-019 CALCULATION_TYPE_CODE, US_COST_TYPE_CODE, US_OFFSET_TYPE_CODE Read
Derived reporting calculations None None None (in-memory calculation)
Retention date calculation None None None (in-memory calculation)

Failure and edge-case behavior

  • Optimistic concurrency is the dominant failure mode: every persisting operation checks RowsAffected <> 1 and adds a DB contention error instead of throwing (BR-US-020). Detailed per-operation behavior is documented on each operation page.
  • Retrieve paths generally return an empty or unfilled object (still marked Old) when no row matches, rather than raising a not-found error; callers must check the populated state themselves.
  • Several code paths traced during this review appear to be dead or defective as written: clsClaimUnit.Create() allocates a new policy-unit sequence number instead of using the one supplied by the caller; clsAuditConditionCollection.GetAuditConditions ignores its policy number/period arguments and returns all rows; clsAuditConditionCollection.GetUpdateUserAudits raises an exception due to a criteria dispatch bug; clsPolicyUnitCollection's internal LossEditFlag retrieve type has no public factory method; and clsAuditConditionHistory's object-level and collection-level update statements diverge in how they set LAST_UPDATE_DATE. Each is documented in detail, with confidence markers, on its owning operation page.
  • Denial-final and fully-fraudulent checks apply only to policy units effective on or after 2013-01-01 (BR-US-027).
  • Database-backed code maps are cached per process and silently drop unrecognized database code values rather than erroring.

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\clsPolicyUnit.vb
  • Business\SAIF.Business.UnitStat\clsPolicyUnitCollection.vb
  • Business\SAIF.Business.UnitStat\clsClaimUnit.vb
  • Business\SAIF.Business.UnitStat\clsClaimUnitCollection.vb
  • Business\SAIF.Business.UnitStat\clsAuditCondition.vb
  • Business\SAIF.Business.UnitStat\clsAuditConditionCollection.vb
  • Business\SAIF.Business.UnitStat\clsAuditConditionHistory.vb
  • Business\SAIF.Business.UnitStat\clsAuditConditionHistoryCollection.vb
  • Business\SAIF.Business.UnitStat\clsLossBase.vb
  • Business\SAIF.Business.UnitStat\clsExposureBase.vb
  • Business\SAIF.Business.UnitStat\mdlCodeMaps.vb
  • Business\SAIF.Business.UnitStat\Extensions.vb
  • Business\SAIF.Business.UnitStat\Constants.vb
  • Legacy\BusinessObjectFramework\clsBusinessBase.vb
  • Legacy\BusinessObjectFramework\clsBusinessCollectionBase.vb