Skip to content

ClaimReserveGenerator

ClaimReserveGenerator builds a claim's Reserves contract — the incurred, paid, and outstanding amount per cost category — from IReserveQueryProvider reads, for either the claim's current incurred-cost snapshot or a historical snapshot as of a given date (OP-DOM-20). It is the legacy-data counterpart to Claim.GetGwReserves, which builds the same Reserves shape from Guidewire instead.

Purpose

  • Builds a claim's current reserve breakdown by cost category from the legacy IncurredCostHistory/IncurredCategoryCosts tables, computing the outstanding balance as incurred minus paid.
  • Builds the same breakdown as of an arbitrary historical effectiveDate, supporting point-in-time reserve reporting.

Context

  • Namespace: SAIF.Domain.Model.Claims
  • Assembly/package: SAIF.Domain (packaged in SAIF.SAIFCode.Core)

Public members

Member Signature Purpose
GetCurrentReserves public static Reserves GetCurrentReserves(IReserveQueryProvider queryProvider, long claimId) Retrieves the claim's latest incurred-cost snapshot and builds its Reserves breakdown by cost category.
GetDatedReserves public static Reserves GetDatedReserves(IReserveQueryProvider queryProvider, long claimId, DateTime effectiveDate) Retrieves the claim's incurred-cost snapshot as of effectiveDate and builds its Reserves breakdown the same way as GetCurrentReserves.

Behavioral notes

  • BuildReserves still issues a per-category GetTotalPaidToDateForCategory call even though a source-code comment notes the paid amount should eventually come back with the IncurredCostHistory lookup itself, so each reserve category currently costs an extra query round trip*.
  • The private GetPaymentCode method is unused dead code; it maps a cost-category code to a single-digit legacy payment code but nothing in this class or its callers invokes it**.

Constraints and usage notes

  • Both public methods return an empty Reserves (no category details) when the underlying IncurredCostHistory lookup returns null, rather than throwing.

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

  • Domain/SAIF.Domain/Model/Claims/ClaimReserveGenerator.cs