Current loss and NCCI record retrieval¶
Current-loss retrieval builds the read-only "current status of a claim, as reported for unit statistical purposes" view used by valuation and reporting callers. clsNCCILossRecord (inheriting the shared clsLossBase retrieval/derivation logic from SAIF.Business.UnitStat) retrieves the base US_NCCI_LOSS_RECORD row and derives reporting fields; clsCurrentLoss (a subclass of clsNCCILossRecord) enriches that row with policy-unit, claim-unit, injury-coding, unit-report/reported-loss, and catastrophe data joined from a wide multi-table query; clsCurrentLossCollection retrieves multiple current-loss rows for a claim or policy unit.
| Field | Value |
|---|---|
| Operation ID | OP-USC-02 |
| Trigger | clsNCCILossRecord.GetNCCILossRecord(dpi, claimID) for the base record; clsCurrentLoss.GetCurrentLoss(dpi, claimID) for the enriched single record; clsCurrentLossCollection.GetCurrentLossCollection(dpi, ...) for multi-row retrieval |
| Inputs | ClaimID (primary retrieval key), optional policy/unit-report filters on the collection |
| Outputs | Read-only clsCurrentLoss / clsNCCILossRecord object(s) populated with loss, injury-coding, reporting, and catastrophe attributes |
| Primary components | clsNCCILossRecord, clsCurrentLoss, clsCurrentLossCollection |
| Entry point | Business\SAIF.Business.UnitStat.Claim\Current Loss\clsNCCILossRecord.vb, Business\SAIF.Business.UnitStat.Claim\Current Loss\clsCurrentLoss.vb, Business\SAIF.Business.UnitStat.Claim\Current Loss\clsCurrentLossCollection.vb |
Steps¶
- Base NCCI record retrieval.
clsNCCILossRecord.Loadsets the retrievalCriteria(constantSQLRetrieve, selecting fromus_ncci_loss_record) before theClaimIDproperty is populated on the criteria object — a sequencing bug that means the first retrieval on a freshly-constructed criteria can run with an empty/default claim filter until the criteria'sClaimIDis subsequently assigned.* No catalog entry exists for this base statement because it is not indexed as a numbered SQL statement in this library's SQL catalog; it selects directly againstUS_NCCI_LOSS_RECORD, which is likewise not yet cataloged in Database tables.** - Derived reporting values.
clsNCCILossRecordinherits fromclsLossBaseinSAIF.Business.UnitStat, which computes derived reporting-year and related classification fields from the raw loss record.
Origin: The derived-value calculation itself is implemented in
clsLossBaseinSAIF.Business.UnitStat, which is documented in its previous (pre-migration) format. See Calculate derived reporting values. 3. Enriched current-loss retrieval.clsCurrentLoss.BeforeRetrieve(or the equivalent override) issues a wide join across policy unit, claim unit, injury coding, unit report, reported loss, coverage combination, and catastrophe tables (SQL-007):This enrichment query also derives the NCCI claim-type code (BR-001), branches on non-compensable reporting treatment (BR-002), and derives the NCCI loss-type code (BR-003) via injury-coding lookups (Select ... From us_policy_unit, us_claim_unit, cl_injury_claim, cl_injury_source_code, cl_injury_nature_code, cl_body_part_code, us_unit_report, us_report_batch, us_reported_loss, us_coverage_combination, us_catastrophic_claim, us_catastrophe Where ...cl_injury_source_code,cl_injury_nature_code,cl_body_part_code), reporting context (us_unit_report,us_report_batch,us_reported_loss), coverage-combination membership (us_coverage_combination), and catastrophe classification (us_catastrophic_claim,us_catastrophe). 4. Policy unit / claim unit delegation. WhereclsCurrentLossneeds full policy-unit or claim-unit business objects (not just the joined columns), it delegates toclsPolicyUnitandclsClaimUnit.Origin:
clsPolicyUnitandclsClaimUnitare implemented inSAIF.Business.UnitStat, documented in its previous format. See Retrieve active policy unit and Create, update, or delete claim unit. 5. Collection retrieval.clsCurrentLossCollection.GetCurrentLossCollectionretrieves multiple rows using criteria built from the caller's filter and loads aclsCurrentLossper row. Its natural-key constructor path is exercised only when a caller supplies a natural key rather than a surrogate claim ID — this path was not observed being called from any other class in the library during tracing and its correctness under partial-key input is unconfirmed.**
Process flow¶
flowchart TD
Start([Caller requests current loss]) --> Base[Retrieve base US_NCCI_LOSS_RECORD row]
Base --> Derive[clsLossBase derives reporting-year and classification fields]
Derive --> Enrich[Join policy unit, claim unit,<br>injury coding, reporting, catastrophe data]
Enrich --> Deleg{Full policy/claim unit object needed?}
Deleg -->|Yes| PU[Delegate to clsPolicyUnit / clsClaimUnit]
Deleg -->|No| Result
PU --> Result([clsCurrentLoss populated])
Start2([Caller requests collection]) --> CollCriteria[Build criteria from filter]
CollCriteria --> CollRetrieve[Retrieve matching rows]
CollRetrieve --> CollLoad[Load one clsCurrentLoss per row]
CollLoad --> CollResult([Collection populated])
Failure and edge-case behavior¶
clsNCCILossRecord.LoadsetsCriteriabefore the claim ID filter is populated, which is an ordering bug rather than intentional behavior; downstream callers rely on a subsequent property assignment to correct the filter before the actual data-portal fetch executes.*US_NCCI_LOSS_RECORDandUS_OFFSET_TYPE_CODEare referenced directly in source but are not yet cataloged in Database tables; they are named here without a link pending a future catalog update.**clsCurrentLossCollection's natural-key constructor overload was not exercised by any other in-library caller found during tracing, so its behavior under partial or malformed natural-key input is unconfirmed.**
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. Statements marked with**could not be confirmed; treat as unknown until verified.
Sources¶
Business\SAIF.Business.UnitStat.Claim\Current Loss\clsNCCILossRecord.vbBusiness\SAIF.Business.UnitStat.Claim\Current Loss\clsCurrentLoss.vbBusiness\SAIF.Business.UnitStat.Claim\Current Loss\clsCurrentLossCollection.vb