---
title: Loss valuation orchestration
summary: Orchestrates the full valuation of a claim's loss summary by computing cost basis, ND reimbursement, and stacking fraud/refund/third-party/voided-claim offsets.
status: draft
owner: SAIF
last_reviewed: 2026-07-30
library: SAIF.Business.UnitStat.Claim
reference_type: package
operation_id: OP-USC-05
trigger: Caller invokes clsLossValuation.ValueLossSummary(dpi, claimID)
---

# Loss valuation orchestration

`clsLossValuation.ValueLossSummary` is the central orchestration point of this library: given a claim ID, it determines the claim's cost basis, computes non-duplication (ND) reimbursement, and creates the offset rows (fraud recovery, refund, third-party prediction, and either voided-claim or ND-reimbursement offsets) that ultimately drive the [Loss summary maintenance](loss-summary-maintenance.md) totals. Several helper classes (`clsFraudRecovery`, `clsRefund`, `clsThirdPartyPrediction`, `clsNDReimbursement`, `clsVoidedClaimOffsets`) each implement one stage of this pipeline via a shared `CreateOffsets` convention.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-USC-05 |
| **Trigger** | `clsLossValuation.ValueLossSummary(dpi, claimID)` |
| **Inputs** | `ClaimID` |
| **Outputs** | A set of `US_LOSS_CATEGORY_OFFSET` rows attached to the claim's loss categories, ready to be summed by [Loss summary maintenance](loss-summary-maintenance.md) |
| **Primary components** | `clsLossValuation`, `clsFraudRecovery`, `clsRefund`, `clsThirdPartyPrediction`, `clsNDReimbursement`, `clsVoidedClaimOffsets` |
| **Entry point** | `Business\SAIF.Business.UnitStat.Claim\Loss Summary\clsLossValuation.vb` |

## Steps

1. **Load claim data and reserves.** `ValueLossSummary` retrieves the claim's core data and reserve history to establish context for the rest of the pipeline.

   > **Origin:** `clsClaimData` and `clsClaimReservesCollection` are implemented in `SAIF.Business.View.Claim`, documented in its previous (pre-migration) format with no matching per-operation anchor for these specific retrievals. See [SAIF.Business.View.Claim operations and processes](../../saif-business-view-claim/operations-processes.md).
2. **Determine claim cost basis.** `GetClaimCostsBasis` computes the basis amounts used later for offset math. This method contains a comparison bug: the branch intended to distinguish "chargeable expense greater than reserve" from the opposite case repeats the same `>` operator in both branches of the conditional, so the "less than or equal" branch is unreachable/never taken as written — the intended `<=` case is masked by the duplicated `>` comparison.*
3. **Determine valuation dates.** `GetValuationDates` and `GetLastReserveChange` establish the as-of dates used to bound the offset calculations that follow, delegating in part to `UnitStatServices`.

   > **Origin:** `UnitStatServices` is implemented in `SAIF.Business` (migrated to the new format), but no operation on that page specifically matches this valuation-date helper. See [SAIF.Business operations and processes](../../saif-business/operations-processes.md).
4. **Reset prior offsets.** Before recomputing, the valuation pipeline resets/clears any previously-created offsets for the categories it is about to recompute, so repeated valuation runs do not stack duplicate offsets from prior passes.*
5. **Compute ND reimbursement basis.** The non-duplication reimbursement amount is computed from the cost basis and reserve data established in steps 1–3, feeding into the later `clsNDReimbursement.CreateOffsets` call (step 8, non-void branch only).
6. **Create fraud-recovery offsets (always).** `clsFraudRecovery.CreateOffsets` is called unconditionally, delegating to `GetFraudRecoveryDate` ([SQL-010](../sql/sql-010-pk73304_loss_summary-get_fraud_recovery_date.md), `PK73304_LOSS_SUMMARY.get_fraud_recovery_date`). However, `CreateFullyFraudulentOffsets` and `CreatePartialFraudulentOffsets` both begin with an always-true early-return guard — `If Not clmData.PolicyNumber = 2 Or Not clmData.PolicyNumber = 3 Then Return True` is true for every possible single-valued `PolicyNumber` (a policy number cannot simultaneously equal both 2 and 3, so at least one `Not` term is always true), so these two methods return immediately and never create an offset row in current code — they are effectively dead/no-op logic despite being called on every valuation.*
7. **Create refund offsets (always).** `clsRefund.CreateOffsets` is called unconditionally, delegating to `GetRefundDates` ([SQL-013](../sql/sql-013-pk73304_loss_summary-get_refund_dates.md), `PK73304_LOSS_SUMMARY.get_refund_dates`) to determine the applicable refund date window before creating offset rows.
8. **Create third-party-prediction offsets (always).** `clsThirdPartyPrediction.CreateOffsets` is called unconditionally. It retrieves prediction data via `PK73304_LOSS_SUMMARY.get_thirdparty_prediction` ([SQL-014](../sql/sql-014-pk73304_loss_summary-get_thirdparty_prediction.md) / [SQL-015](../sql/sql-015-pk73304_loss_summary-get_thirdparty_prediction.md), duplicate-named overloads for different parameter sets) and an inline lookup against `dual` ([SQL-016](../sql/sql-016-select.md)). It also consults case and lien/settlement data from a sibling library:

   > **Origin:** `clsThrdpartyPredictionDetailCollection` and `clsThrdpartyLienCategoryCollection` are implemented in `SAIF.Business.Claim.ThirdParty` (migrated to the new format). See [Run case search and predictions](../../saif-business-claim-thirdparty/operations/run-case-search-and-predictions.md) and [Manage liens and settlements](../../saif-business-claim-thirdparty/operations/manage-liens-and-settlements.md).

   `CreateNonLienOffsets` contains an unreachable branch: a condition guarding one of its offset-creation paths is structured so that the alternate path can never be reached given the values it is compared against, meaning only one of the two intended offset-creation code paths is ever exercised.*
9. **Branch on claim status: void vs. active.** After the three unconditional offset-creation calls above, `ValueLossSummary` branches on the claim's status code ([BR-008](../business-rules.md#br-008-voided-claims-bypass-fraud-refund-and-third-party-offset-stacking)):
   - If `claimData.StatusCode = "V"` (Void): calls `clsVoidedClaimOffsets.CreateOffsets` only, which creates a single reversal-style offset from the claim's most recent payment (offset type `VoidedClaims`) rather than layering further amounts.
   - Otherwise: calls `clsNDReimbursement.CreateOffsets`, which uses the ND reimbursement basis computed in step 5 ([SQL-012](../sql/sql-012-pk73304_loss_summary-get_final_denial_dates.md), `PK73304_LOSS_SUMMARY.get_final_denial_dates`) to create the final layer of offsets for an active claim.
10. **Downstream consumption.** The offsets created in steps 6–9 are attached as `US_LOSS_CATEGORY_OFFSET` children of the claim's `US_LOSS_CATEGORY` rows and are summed (with the `SETL`/`TPN` floor logic) by [Loss summary maintenance](loss-summary-maintenance.md) when the loss summary's derived totals are next computed or persisted.

## Process flow

```mermaid
flowchart TD
	Start([ValueLossSummary invoked]) --> Load[Load claim data and reserves]
	Load --> Basis[Compute claim cost basis]
	Basis --> Dates[Determine valuation dates]
	Dates --> Reset[Reset prior offsets for recomputed categories]
	Reset --> NDBasis[Compute ND reimbursement basis]
	NDBasis --> Fraud[Create fraud-recovery offsets - unconditional, effectively no-op]
	Fraud --> Refund[Create refund offsets - unconditional]
	Refund --> ThirdParty[Create third-party-prediction offsets - unconditional]
	ThirdParty --> StatusCheck{Claim status = Void?}
	StatusCheck -->|Yes| Voided[Create voided-claim offset only]
	StatusCheck -->|No| NDReimb[Create ND reimbursement offsets]
	Voided --> Done([Offsets attached to loss categories])
	NDReimb --> Done
```

## Failure and edge-case behavior
- `GetClaimCostsBasis`'s duplicated `>` comparison means the branch intended for the "less than or equal to reserve" case is unreachable as written; downstream cost-basis values may not reflect the originally-intended logic for that scenario.*
- `CreateFullyFraudulentOffsets` and `CreatePartialFraudulentOffsets` never execute their offset-creation logic due to an always-true early-return guard — fraud-recovery offsets from these two paths do not currently get created regardless of claim data, even though the surrounding orchestration calls them on every valuation.*
- `CreateNonLienOffsets`'s unreachable branch means only one of its two intended offset-creation paths is exercised in current code.*
- The void/active branch is mutually exclusive per [BR-008](../business-rules.md#br-008-voided-claims-bypass-fraud-refund-and-third-party-offset-stacking): a voided claim never receives ND-reimbursement offsets, and an active claim never receives the voided-claim reversal offset.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

> **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\clsLossValuation.vb`
- `Business\SAIF.Business.UnitStat.Claim\Loss Summary\clsFraudRecovery.vb`
- `Business\SAIF.Business.UnitStat.Claim\Loss Summary\clsRefund.vb`
- `Business\SAIF.Business.UnitStat.Claim\Loss Summary\clsThirdPartyPrediction.vb`
- `Business\SAIF.Business.UnitStat.Claim\Loss Summary\clsNDReimbursement.vb`
- `Business\SAIF.Business.UnitStat.Claim\Loss Summary\clsVoidedClaimOffsets.vb`
