import { type ClaimSnapshot, type Triangle } from "@actuarial-ts/core"; /** * ASOP No. 23 (Data Quality)-oriented data review. * * The report lists every check PERFORMED, not just the ones that found * something — the actuary's disclosure needs "what was reviewed" as much as * "what was found". A check that could not be evaluated (no as-of date; a * triangle shape mismatch blocking cell comparisons) stays in the report * with an explicit "not evaluated" detail so the disclosure never overstates * the review. * * Severity philosophy: * - "fail" = the data is wrong or internally inconsistent (negative paid, * dates out of order, duplicate snapshots, paid > incurred). * - "warning" = legitimate but rare/reportable (negative case reserves, * salvage-driven negative incremental paid, closed claims * still carrying case). * * These utilities are designed to support the actuary's compliance with * ASOP No. 23; responsibility for compliance remains with the credentialed * actuary. */ export type DataCheckStatus = "pass" | "warning" | "fail" | "not-evaluated"; export interface DataFindingContext { ruleId?: string; measureId?: string; expressionPath?: string; offendingKey?: string; groupingKey?: string; cachedEvidenceId?: string; sourceGroup?: string; origin?: string; valuation?: string; developmentAge?: number; ageUnit?: string; recordId?: string; claimId?: string; exposureKey?: string; group?: string; sourceFile?: string; sourceRow?: number; sources?: readonly import("@actuarial-ts/core").DiagnosticSourceLocation[]; reviewScope?: import("@actuarial-ts/core").DiagnosticReviewEvaluationScope; } export interface DataFinding { /** Stable machine-readable finding code, usually the containing check id. */ code: string; message: string; context?: DataFindingContext; } export interface DataCheck { id: string; description: string; status: DataCheckStatus; details: string[]; /** Additive structured detail for consumers that should not parse prose. */ findings: DataFinding[]; } export interface DataReviewReport { checks: DataCheck[]; summary: { pass: number; warning: number; fail: number; notEvaluated: number; }; } export interface ReviewClaimDataOptions { /** ISO date; when given, any claim date after it fails "future-dated". */ asOfDate?: string; } /** Builds a structured check while retaining the established status/details contract. */ export declare function createStructuredDataCheck(id: string, description: string, statusWhenFound: "warning" | "fail", findings: readonly DataFinding[]): DataCheck; /** Public report summarizer for additive review suites. */ export declare function summarizeDataChecks(checks: DataCheck[]): DataReviewReport; /** Public not-evaluated constructor so additive suites preserve report semantics. */ export declare function createNotEvaluatedDataCheck(id: string, description: string, reason: string): DataCheck; /** Reviews claim-level snapshots against the ASOP 23-oriented check suite. */ export declare function reviewClaimData(claims: ClaimSnapshot[], opts?: ReviewClaimDataOptions): DataReviewReport; /** Reviews supplied observations; explicit null incurred leaves paired checks not evaluated. */ export declare function reviewTriangles(paid: Triangle, incurred: Triangle | null): DataReviewReport; //# sourceMappingURL=review.d.ts.map