Claim reserves and payments retrieval¶
This operation retrieves a claim's financial position — reserve amounts by cost category and payment/line-item history — from the claim financial data API (CCClaimDataApi/Financial). It is the current, API-backed financial data path and is distinct from the older stored-procedure-backed financial transaction retrieval operation, which reads individual payment transaction rows rather than aggregated reserve/payment totals.
| Field | Value |
|---|---|
| Operation ID | OP-VC-02 |
| Trigger | Caller reads clsClaimData.Reserves, clsClaimData.AllReserves, or clsClaimData.PaymentsData, or calls clsClaimReservesCollection.GetClaimReserves/GetAllClaimReserves/GetClaimCosts |
| Inputs | Claim ID; optional valuation date; optional CombineDeathAndBurialReserve flag |
| Outputs | clsClaimReservesCollection of clsClaimReserves (one per cost category), with category totals (TotalIncurred, TotalPaid, TotalReserves) and category-specific accessors (MedicalReserves, PPDReserves, TDReserves, FatalReserves, etc.); PaymentsData (last payment date, total paid, payment list with line items) |
| Primary components | clsClaimReservesCollection.BeforeRetrieve/AfterRetrieve, clsClaimReserves.Load, clsClaimData.RetrievePaymentsData |
| Entry point | Business\SAIF.Business.View.Claim\clsClaimReservesCollection.vb, Business\SAIF.Business.View.Claim\clsClaimReserves.vb |
Steps¶
- Select the financial retrieval route.
clsClaimReservesCollection.BeforeRetrievesets the API route to the claim-ID-only financials endpoint or the claim-ID-plus-valuation-date endpoint, depending on whether a valuation date was supplied. - Similarly,
clsClaimData.RetrievePaymentsDatabuilds its own request against the route patternv1/{controller}/Claims/{0}/Financialsusing theCCClaimDataApi/GeneralClaimDataclient. - Call the financial data API. The request executes through
DataApiAccessLayer.ProcessRequest(Of FinancialDataResult), returning aFinancialDatapayload containingClaimReserves(aReserveData) andClaimPayments(aPaymentsData). - Map reserves.
AfterRetrievereadsResponseData(Of FinancialData), then constructs oneclsClaimReservesperReserverow inClaimReserves.Reserves, usingclsClaimReserves.Load(reserve, claimCostsDate, totalLossDays)to map category, incurred/paid/reserve amounts, and time-loss days. IsMedicalReserveis derived by comparing the mapped category code to the medical cost-category constant.- Exclude non-chargeable expense categories. Reserve rows whose category is a legal or other non-chargeable expense are removed from the collection before totals are computed (BR-005).
- Combine death and burial reserves, if requested. When the caller sets
CombineDeathAndBurialReserve, burial amounts are folded into the death-benefit category total instead of being reported separately (BR-006). - Aggregate loss-days by category. Payment loss-day figures are aggregated and attributed to the matching reserve category so each
clsClaimReservesrow also exposesTLDays. - Map payments.
clsClaimData.RetrievePaymentsDatareadsfinancialData?.ClaimPaymentsfrom the API result and exposes it asPaymentsData, includingLastPaymentDate,TotalPaid, and thePaymentslist (each withLineItems). - Expose category accessors and totals. The collection exposes convenience accessors per category (
TDReserves,MedicalReserves,ChargeExpReserves,PPDReserves,PTDReserves,FatalReserves,VocServReserves,VocTDReserves,NoneReserves,OtherReserves) plusTotalIncurred,TotalPaid, andTotalReservescomputed across the (filtered, possibly combined) reserve rows.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Caller reads Reserves,<br>AllReserves, or PaymentsData]) --> Route{Valuation date supplied?}
Route -->|Yes| RouteDate[Route: claim id + valuation date]
Route -->|No| RouteId[Route: claim id only]
RouteDate --> Call[Call Financials API]
RouteId --> Call
Call --> MapReserves[Map Reserve rows to clsClaimReserves]
MapReserves --> Exclude[Exclude non-chargeable expense categories]
Exclude --> Combine{Combine death and burial requested?}
Combine -->|Yes| Merge[Merge burial into death-benefit total]
Combine -->|No| Keep[Keep categories separate]
Merge --> Totals[Compute category totals]
Keep --> Totals
Call --> MapPayments[Map ClaimPayments to PaymentsData]
Totals --> Done([Return reserve collection and payments data])
MapPayments --> Done
Failure and edge-case behavior¶
- Reserve category totals silently exclude legal and other non-chargeable expense rows; callers expecting a full expense ledger must query those categories separately if a source becomes available.
- The combine-death-and-burial behavior depends entirely on the caller passing the flag; omitting it yields separate category totals even for claims where the two would otherwise be treated as one benefit.
PaymentsDataandClaimReservesare both read from a singleFinancialDataAPI response, so an API failure affects both reserves and payments together rather than independently.*
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.View.Claim\clsClaimReserves.vbBusiness\SAIF.Business.View.Claim\clsClaimReservesCollection.vbBusiness\SAIF.Business.View.Claim\clsClaimData.vbBusiness\SAIF.Business.View.Claim\CCClaimDataApi\Financial\FinancialData.vbBusiness\SAIF.Business.View.Claim\CCClaimDataApi\Financial\FinancialDataResult.vbBusiness\SAIF.Business.View.Claim\CCClaimDataApi\Financial\ReserveData.vbBusiness\SAIF.Business.View.Claim\CCClaimDataApi\Financial\Reserve.vbBusiness\SAIF.Business.View.Claim\CCClaimDataApi\Financial\PaymentsData.vbBusiness\SAIF.Business.View.Claim\CCClaimDataApi\Financial\Payment.vbBusiness\SAIF.Business.View.Claim\CCClaimDataApi\Financial\LineItem.vb