@actuarial-ts/core 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -215
- package/dist/casualtyDiagnostics.d.ts +19 -49
- package/dist/casualtyDiagnostics.d.ts.map +1 -1
- package/dist/casualtyDiagnostics.js +84 -114
- package/dist/casualtyDiagnostics.js.map +1 -1
- package/dist/diagnosticAggregation.d.ts +29 -0
- package/dist/diagnosticAggregation.d.ts.map +1 -0
- package/dist/diagnosticAggregation.js +50 -0
- package/dist/diagnosticAggregation.js.map +1 -0
- package/dist/diagnosticDefinitions.d.ts +286 -0
- package/dist/diagnosticDefinitions.d.ts.map +1 -0
- package/dist/diagnosticDefinitions.js +1026 -0
- package/dist/diagnosticDefinitions.js.map +1 -0
- package/dist/diagnosticDerivations.d.ts +12 -0
- package/dist/diagnosticDerivations.d.ts.map +1 -0
- package/dist/diagnosticDerivations.js +80 -0
- package/dist/diagnosticDerivations.js.map +1 -0
- package/dist/diagnosticExposure.d.ts +51 -0
- package/dist/diagnosticExposure.d.ts.map +1 -0
- package/dist/diagnosticExposure.js +65 -0
- package/dist/diagnosticExposure.js.map +1 -0
- package/dist/diagnosticExpressions.d.ts +56 -0
- package/dist/diagnosticExpressions.d.ts.map +1 -0
- package/dist/diagnosticExpressions.js +104 -0
- package/dist/diagnosticExpressions.js.map +1 -0
- package/dist/diagnosticFormulas.d.ts +195 -0
- package/dist/diagnosticFormulas.d.ts.map +1 -0
- package/dist/diagnosticFormulas.js +85 -0
- package/dist/diagnosticFormulas.js.map +1 -0
- package/dist/diagnosticIdentity.d.ts +237 -0
- package/dist/diagnosticIdentity.d.ts.map +1 -0
- package/dist/diagnosticIdentity.js +454 -0
- package/dist/diagnosticIdentity.js.map +1 -0
- package/dist/diagnosticPeriods.d.ts +16 -0
- package/dist/diagnosticPeriods.d.ts.map +1 -0
- package/dist/diagnosticPeriods.js +98 -0
- package/dist/diagnosticPeriods.js.map +1 -0
- package/dist/diagnosticPreparation.d.ts +98 -0
- package/dist/diagnosticPreparation.d.ts.map +1 -0
- package/dist/diagnosticPreparation.js +169 -0
- package/dist/diagnosticPreparation.js.map +1 -0
- package/dist/diagnosticReview.d.ts +44 -0
- package/dist/diagnosticReview.d.ts.map +1 -0
- package/dist/diagnosticReview.js +84 -0
- package/dist/diagnosticReview.js.map +1 -0
- package/dist/diagnosticRules.d.ts +32 -0
- package/dist/diagnosticRules.d.ts.map +1 -0
- package/dist/diagnosticRules.js +32 -0
- package/dist/diagnosticRules.js.map +1 -0
- package/dist/diagnosticRunner.d.ts +85 -0
- package/dist/diagnosticRunner.d.ts.map +1 -0
- package/dist/diagnosticRunner.js +117 -0
- package/dist/diagnosticRunner.js.map +1 -0
- package/dist/index.d.ts +24 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +17 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +114 -0
- package/dist/types.js.map +1 -1
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/package.json +2 -2
- package/src/casualtyDiagnostics.ts +79 -187
- package/src/diagnosticAggregation.ts +79 -0
- package/src/diagnosticDefinitions.ts +1375 -0
- package/src/diagnosticDerivations.ts +89 -0
- package/src/diagnosticExposure.ts +91 -0
- package/src/diagnosticExpressions.ts +173 -0
- package/src/diagnosticFormulas.ts +150 -0
- package/src/diagnosticIdentity.ts +767 -0
- package/src/diagnosticPeriods.ts +117 -0
- package/src/diagnosticPreparation.ts +233 -0
- package/src/diagnosticReview.ts +91 -0
- package/src/diagnosticRules.ts +69 -0
- package/src/diagnosticRunner.ts +110 -0
- package/src/index.ts +156 -1
- package/src/types.ts +161 -0
- package/src/version.ts +2 -0
- package/dist/metricDiagnostics.d.ts +0 -212
- package/dist/metricDiagnostics.d.ts.map +0 -1
- package/dist/metricDiagnostics.js +0 -627
- package/dist/metricDiagnostics.js.map +0 -1
- package/src/metricDiagnostics.ts +0 -876
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import type { DiagnosticDeepReadonly, DiagnosticMeasureKind, DiagnosticMeasureStats, DiagnosticMetricPresentation } from "./diagnosticDefinitions.js";
|
|
2
|
+
import type { DiagnosticMeasureExpression, DiagnosticRoleExpression } from "./diagnosticExpressions.js";
|
|
3
|
+
import type { DiagnosticExpressionOverflow, DiagnosticRuleNotEvaluatedReason } from "./diagnosticRules.js";
|
|
4
|
+
export declare const CASUALTY_FORMULA_TEMPLATES: readonly [{
|
|
5
|
+
readonly id: "frequency";
|
|
6
|
+
readonly version: "1.0.0";
|
|
7
|
+
readonly roles: {
|
|
8
|
+
readonly claims: {
|
|
9
|
+
readonly kind: "count";
|
|
10
|
+
};
|
|
11
|
+
readonly exposure: {
|
|
12
|
+
readonly kind: "exposure";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
readonly numerator: {
|
|
16
|
+
readonly op: "role";
|
|
17
|
+
readonly role: "claims";
|
|
18
|
+
};
|
|
19
|
+
readonly denominator: {
|
|
20
|
+
readonly op: "role";
|
|
21
|
+
readonly role: "exposure";
|
|
22
|
+
};
|
|
23
|
+
readonly denominatorPolicy: "positive-or-null";
|
|
24
|
+
}, {
|
|
25
|
+
readonly id: "share";
|
|
26
|
+
readonly version: "1.0.0";
|
|
27
|
+
readonly roles: {
|
|
28
|
+
readonly part: {
|
|
29
|
+
readonly kind: "count";
|
|
30
|
+
readonly compatibilityGroup: "count-population";
|
|
31
|
+
};
|
|
32
|
+
readonly whole: {
|
|
33
|
+
readonly kind: "count";
|
|
34
|
+
readonly compatibilityGroup: "count-population";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
readonly numerator: {
|
|
38
|
+
readonly op: "role";
|
|
39
|
+
readonly role: "part";
|
|
40
|
+
};
|
|
41
|
+
readonly denominator: {
|
|
42
|
+
readonly op: "role";
|
|
43
|
+
readonly role: "whole";
|
|
44
|
+
};
|
|
45
|
+
readonly denominatorPolicy: "positive-or-null";
|
|
46
|
+
}, {
|
|
47
|
+
readonly id: "paid-to-incurred";
|
|
48
|
+
readonly version: "1.0.0";
|
|
49
|
+
readonly roles: {
|
|
50
|
+
readonly paid: {
|
|
51
|
+
readonly kind: "amount";
|
|
52
|
+
readonly compatibilityGroup: "amount-basis";
|
|
53
|
+
readonly developmentSemantics: "cumulative";
|
|
54
|
+
};
|
|
55
|
+
readonly incurred: {
|
|
56
|
+
readonly kind: "amount";
|
|
57
|
+
readonly compatibilityGroup: "amount-basis";
|
|
58
|
+
readonly developmentSemantics: "cumulative";
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
readonly numerator: {
|
|
62
|
+
readonly op: "role";
|
|
63
|
+
readonly role: "paid";
|
|
64
|
+
};
|
|
65
|
+
readonly denominator: {
|
|
66
|
+
readonly op: "role";
|
|
67
|
+
readonly role: "incurred";
|
|
68
|
+
};
|
|
69
|
+
readonly denominatorPolicy: "positive-or-null";
|
|
70
|
+
}, {
|
|
71
|
+
readonly id: "amount-per-exposure";
|
|
72
|
+
readonly version: "1.0.0";
|
|
73
|
+
readonly roles: {
|
|
74
|
+
readonly amount: {
|
|
75
|
+
readonly kind: "amount";
|
|
76
|
+
};
|
|
77
|
+
readonly exposure: {
|
|
78
|
+
readonly kind: "exposure";
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
readonly numerator: {
|
|
82
|
+
readonly op: "role";
|
|
83
|
+
readonly role: "amount";
|
|
84
|
+
};
|
|
85
|
+
readonly denominator: {
|
|
86
|
+
readonly op: "role";
|
|
87
|
+
readonly role: "exposure";
|
|
88
|
+
};
|
|
89
|
+
readonly denominatorPolicy: "positive-or-null";
|
|
90
|
+
}, {
|
|
91
|
+
readonly id: "amount-per-claim";
|
|
92
|
+
readonly version: "1.0.0";
|
|
93
|
+
readonly roles: {
|
|
94
|
+
readonly amount: {
|
|
95
|
+
readonly kind: "amount";
|
|
96
|
+
};
|
|
97
|
+
readonly claims: {
|
|
98
|
+
readonly kind: "count";
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
readonly numerator: {
|
|
102
|
+
readonly op: "role";
|
|
103
|
+
readonly role: "amount";
|
|
104
|
+
};
|
|
105
|
+
readonly denominator: {
|
|
106
|
+
readonly op: "role";
|
|
107
|
+
readonly role: "claims";
|
|
108
|
+
};
|
|
109
|
+
readonly denominatorPolicy: "positive-or-null";
|
|
110
|
+
}, {
|
|
111
|
+
readonly id: "case-per-open";
|
|
112
|
+
readonly version: "1.0.0";
|
|
113
|
+
readonly roles: {
|
|
114
|
+
readonly incurred: {
|
|
115
|
+
readonly kind: "amount";
|
|
116
|
+
readonly compatibilityGroup: "amount-basis";
|
|
117
|
+
readonly developmentSemantics: "cumulative";
|
|
118
|
+
};
|
|
119
|
+
readonly paid: {
|
|
120
|
+
readonly kind: "amount";
|
|
121
|
+
readonly compatibilityGroup: "amount-basis";
|
|
122
|
+
readonly developmentSemantics: "cumulative";
|
|
123
|
+
};
|
|
124
|
+
readonly open: {
|
|
125
|
+
readonly kind: "count";
|
|
126
|
+
readonly developmentSemantics: "point-in-time";
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
readonly numerator: {
|
|
130
|
+
readonly op: "subtract";
|
|
131
|
+
readonly left: {
|
|
132
|
+
readonly op: "role";
|
|
133
|
+
readonly role: "incurred";
|
|
134
|
+
};
|
|
135
|
+
readonly right: {
|
|
136
|
+
readonly op: "role";
|
|
137
|
+
readonly role: "paid";
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
readonly denominator: {
|
|
141
|
+
readonly op: "role";
|
|
142
|
+
readonly role: "open";
|
|
143
|
+
};
|
|
144
|
+
readonly denominatorPolicy: "positive-or-null";
|
|
145
|
+
}];
|
|
146
|
+
export interface DiagnosticQuantitySemantics {
|
|
147
|
+
readonly kind: DiagnosticMeasureKind;
|
|
148
|
+
readonly unit: string;
|
|
149
|
+
readonly basisId?: string;
|
|
150
|
+
readonly countPopulationId?: string;
|
|
151
|
+
readonly exposureBasisId?: string;
|
|
152
|
+
}
|
|
153
|
+
export interface DiagnosticQuantity extends DiagnosticQuantitySemantics {
|
|
154
|
+
readonly value: number | null;
|
|
155
|
+
}
|
|
156
|
+
export interface DiagnosticMetricFinding {
|
|
157
|
+
readonly code: string;
|
|
158
|
+
readonly message: string;
|
|
159
|
+
readonly severity: "info" | "warning" | "fail";
|
|
160
|
+
readonly category: "structural" | "aggregation" | "calculation" | "rule" | "presentation";
|
|
161
|
+
readonly ruleId?: string;
|
|
162
|
+
readonly measureId?: string;
|
|
163
|
+
readonly instanceId?: string;
|
|
164
|
+
readonly expressionPath?: string;
|
|
165
|
+
readonly sourceGroup?: string;
|
|
166
|
+
readonly group?: string;
|
|
167
|
+
readonly origin?: string;
|
|
168
|
+
readonly valuation?: string;
|
|
169
|
+
readonly developmentAge?: number;
|
|
170
|
+
readonly ageUnit?: string;
|
|
171
|
+
readonly recordId?: string;
|
|
172
|
+
readonly claimId?: string;
|
|
173
|
+
readonly exposureKey?: string;
|
|
174
|
+
readonly sources: readonly import("./diagnosticDefinitions.js").DiagnosticSourceLocation[];
|
|
175
|
+
}
|
|
176
|
+
export interface FinalizedDiagnosticMeasure {
|
|
177
|
+
readonly quantity: DiagnosticQuantity;
|
|
178
|
+
readonly stats: DiagnosticMeasureStats;
|
|
179
|
+
readonly readiness: readonly DiagnosticRuleNotEvaluatedReason[];
|
|
180
|
+
readonly expressionOverflows?: readonly DiagnosticExpressionOverflow[];
|
|
181
|
+
}
|
|
182
|
+
interface ExpressionResult {
|
|
183
|
+
readonly value: number | null;
|
|
184
|
+
readonly reasons: readonly DiagnosticRuleNotEvaluatedReason[];
|
|
185
|
+
readonly overflows: readonly DiagnosticExpressionOverflow[];
|
|
186
|
+
}
|
|
187
|
+
export declare function evaluateDiagnosticMeasureExpression(expression: DiagnosticDeepReadonly<DiagnosticMeasureExpression>, measures: Readonly<Record<string, FinalizedDiagnosticMeasure>>, path: string): ExpressionResult;
|
|
188
|
+
export declare function evaluateDiagnosticRoleExpression(expression: DiagnosticDeepReadonly<DiagnosticRoleExpression>, bindings: Readonly<Record<string, ExpressionResult>>, path: string): ExpressionResult;
|
|
189
|
+
export declare function diagnosticRawRatio(numerator: number | null, denominator: number | null): number | null;
|
|
190
|
+
export declare function applyDiagnosticPresentation(rawValue: number | null, presentation: DiagnosticDeepReadonly<DiagnosticMetricPresentation>): {
|
|
191
|
+
readonly value: number | null;
|
|
192
|
+
readonly finding: DiagnosticMetricFinding | null;
|
|
193
|
+
};
|
|
194
|
+
export {};
|
|
195
|
+
//# sourceMappingURL=diagnosticFormulas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnosticFormulas.d.ts","sourceRoot":"","sources":["../src/diagnosticFormulas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EAEtB,qBAAqB,EACrB,sBAAsB,EACtB,4BAA4B,EAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACxG,OAAO,KAAK,EAAE,4BAA4B,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAE3G,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOmB,CAAC;AAE3D,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QA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.freeze([
|
|
3
|
+
{ id: "frequency", version: "1.0.0", roles: { claims: { kind: "count" }, exposure: { kind: "exposure" } }, numerator: { op: "role", role: "claims" }, denominator: { op: "role", role: "exposure" }, denominatorPolicy: "positive-or-null" },
|
|
4
|
+
{ id: "share", version: "1.0.0", roles: { part: { kind: "count", compatibilityGroup: "count-population" }, whole: { kind: "count", compatibilityGroup: "count-population" } }, numerator: { op: "role", role: "part" }, denominator: { op: "role", role: "whole" }, denominatorPolicy: "positive-or-null" },
|
|
5
|
+
{ id: "paid-to-incurred", version: "1.0.0", roles: { paid: { kind: "amount", compatibilityGroup: "amount-basis", developmentSemantics: "cumulative" }, incurred: { kind: "amount", compatibilityGroup: "amount-basis", developmentSemantics: "cumulative" } }, numerator: { op: "role", role: "paid" }, denominator: { op: "role", role: "incurred" }, denominatorPolicy: "positive-or-null" },
|
|
6
|
+
{ id: "amount-per-exposure", version: "1.0.0", roles: { amount: { kind: "amount" }, exposure: { kind: "exposure" } }, numerator: { op: "role", role: "amount" }, denominator: { op: "role", role: "exposure" }, denominatorPolicy: "positive-or-null" },
|
|
7
|
+
{ id: "amount-per-claim", version: "1.0.0", roles: { amount: { kind: "amount" }, claims: { kind: "count" } }, numerator: { op: "role", role: "amount" }, denominator: { op: "role", role: "claims" }, denominatorPolicy: "positive-or-null" },
|
|
8
|
+
{ id: "case-per-open", version: "1.0.0", roles: { incurred: { kind: "amount", compatibilityGroup: "amount-basis", developmentSemantics: "cumulative" }, paid: { kind: "amount", compatibilityGroup: "amount-basis", developmentSemantics: "cumulative" }, open: { kind: "count", developmentSemantics: "point-in-time" } }, numerator: { op: "subtract", left: { op: "role", role: "incurred" }, right: { op: "role", role: "paid" } }, denominator: { op: "role", role: "open" }, denominatorPolicy: "positive-or-null" },
|
|
9
|
+
]);
|
|
10
|
+
function neumaier(values) {
|
|
11
|
+
let sum = 0;
|
|
12
|
+
let correction = 0;
|
|
13
|
+
for (const value of values) {
|
|
14
|
+
const next = sum + value;
|
|
15
|
+
correction += Math.abs(sum) >= Math.abs(value) ? (sum - next) + value : (value - next) + sum;
|
|
16
|
+
sum = next;
|
|
17
|
+
if (!Number.isFinite(sum) || !Number.isFinite(correction))
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
const result = sum + correction;
|
|
21
|
+
return Number.isFinite(result) ? (Object.is(result, -0) ? 0 : result) : null;
|
|
22
|
+
}
|
|
23
|
+
function uniqueReasons(values) {
|
|
24
|
+
const order = ["missing", "imputed", "non-finite", "structural-ambiguity", "aggregation-overflow", "expression-overflow", "tolerance-overflow"];
|
|
25
|
+
return order.filter((reason) => values.includes(reason));
|
|
26
|
+
}
|
|
27
|
+
export function evaluateDiagnosticMeasureExpression(expression, measures, path) {
|
|
28
|
+
if (expression.op === "measure") {
|
|
29
|
+
const value = measures[expression.measureId];
|
|
30
|
+
return value
|
|
31
|
+
? { value: value.quantity.value, reasons: value.readiness, overflows: value.expressionOverflows ?? [] }
|
|
32
|
+
: { value: null, reasons: ["missing"], overflows: [] };
|
|
33
|
+
}
|
|
34
|
+
const children = expression.op === "add"
|
|
35
|
+
? expression.terms.map((term, index) => evaluateDiagnosticMeasureExpression(term, measures, `${path}.terms[${index}]`))
|
|
36
|
+
: [
|
|
37
|
+
evaluateDiagnosticMeasureExpression(expression.left, measures, `${path}.left`),
|
|
38
|
+
evaluateDiagnosticMeasureExpression(expression.right, measures, `${path}.right`),
|
|
39
|
+
];
|
|
40
|
+
const reasons = uniqueReasons(children.flatMap((child) => child.reasons));
|
|
41
|
+
const overflows = children.flatMap((child) => child.overflows);
|
|
42
|
+
if (children.some((child) => child.value === null))
|
|
43
|
+
return { value: null, reasons, overflows };
|
|
44
|
+
const value = expression.op === "add"
|
|
45
|
+
? neumaier(children.map((child) => child.value))
|
|
46
|
+
: children[0].value - children[1].value;
|
|
47
|
+
if (value === null || !Number.isFinite(value)) {
|
|
48
|
+
return {
|
|
49
|
+
value: null,
|
|
50
|
+
reasons: uniqueReasons([...reasons, "expression-overflow"]),
|
|
51
|
+
overflows: [...overflows, { expressionPath: path, sources: [] }],
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
return { value: Object.is(value, -0) ? 0 : value, reasons, overflows };
|
|
55
|
+
}
|
|
56
|
+
export function evaluateDiagnosticRoleExpression(expression, bindings, path) {
|
|
57
|
+
if (expression.op === "role")
|
|
58
|
+
return bindings[expression.role] ?? { value: null, reasons: ["missing"], overflows: [] };
|
|
59
|
+
const children = expression.op === "add"
|
|
60
|
+
? expression.terms.map((term, index) => evaluateDiagnosticRoleExpression(term, bindings, `${path}.terms[${index}]`))
|
|
61
|
+
: [evaluateDiagnosticRoleExpression(expression.left, bindings, `${path}.left`), evaluateDiagnosticRoleExpression(expression.right, bindings, `${path}.right`)];
|
|
62
|
+
const reasons = uniqueReasons(children.flatMap((child) => child.reasons));
|
|
63
|
+
const overflows = children.flatMap((child) => child.overflows);
|
|
64
|
+
if (children.some((child) => child.value === null))
|
|
65
|
+
return { value: null, reasons, overflows };
|
|
66
|
+
const value = expression.op === "add" ? neumaier(children.map((child) => child.value)) : children[0].value - children[1].value;
|
|
67
|
+
if (value === null || !Number.isFinite(value))
|
|
68
|
+
return { value: null, reasons: uniqueReasons([...reasons, "expression-overflow"]), overflows: [...overflows, { expressionPath: path, sources: [] }] };
|
|
69
|
+
return { value: Object.is(value, -0) ? 0 : value, reasons, overflows };
|
|
70
|
+
}
|
|
71
|
+
export function diagnosticRawRatio(numerator, denominator) {
|
|
72
|
+
if (numerator === null || denominator === null || !Number.isFinite(numerator) || !Number.isFinite(denominator) || denominator <= 0)
|
|
73
|
+
return null;
|
|
74
|
+
const ratio = safeRatio(numerator, denominator);
|
|
75
|
+
return ratio !== null && Number.isFinite(ratio) ? ratio : null;
|
|
76
|
+
}
|
|
77
|
+
export function applyDiagnosticPresentation(rawValue, presentation) {
|
|
78
|
+
if (rawValue === null)
|
|
79
|
+
return { value: null, finding: null };
|
|
80
|
+
const value = rawValue * presentation.scale;
|
|
81
|
+
return Number.isFinite(value)
|
|
82
|
+
? { value: Object.is(value, -0) ? 0 : value, finding: null }
|
|
83
|
+
: { value: null, finding: { code: "diagnostic-presentation-overflow", message: "Diagnostic presentation scaling overflowed", severity: "fail", category: "presentation", sources: [] } };
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=diagnosticFormulas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnosticFormulas.js","sourceRoot":"","sources":["../src/diagnosticFormulas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAWtC,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC;IACtD,EAAE,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,iBAAiB,EAAE,kBAAkB,EAAE;IAC5O,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,iBAAiB,EAAE,kBAAkB,EAAE;IAC3S,EAAE,EAAE,EAAE,kBAAkB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KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,QAAuB,EACvB,YAAkE;IAElE,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC7D,MAAM,KAAK,GAAG,QAAQ,GAAG,YAAY,CAAC,KAAK,CAAC;IAC5C,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAC3B,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE;QAC5D,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,kCAAkC,EAAE,OAAO,EAAE,4CAA4C,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC;AAC7L,CAAC"}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import type { AmountPerspective, DiagnosticComparisonPredicate, DiagnosticControlTotalProjection, DiagnosticCountPopulationDefinition, DiagnosticDeepReadonly, DiagnosticDefinition, DiagnosticDerivedMeasureDefinition, DiagnosticDevelopmentSemantics, DiagnosticExposureBasisDefinition, DiagnosticExposureTiming, DiagnosticMeasureKind, DiagnosticMeasureSource, DiagnosticMetricPresentation, DiagnosticMissingPolicy, DiagnosticPeriodAxis, DiagnosticReviewOperand, DiagnosticReviewPredicate, DiagnosticReviewRule, DiagnosticRuleOperand, DiagnosticSourceLocation } from "./diagnosticDefinitions.js";
|
|
2
|
+
import type { DiagnosticMeasureExpression, DiagnosticRoleExpression } from "./diagnosticExpressions.js";
|
|
3
|
+
export type NormalizedAmountLimitationIdentity = {
|
|
4
|
+
readonly kind: "unlimited";
|
|
5
|
+
} | {
|
|
6
|
+
readonly kind: "layer" | "pre-limited";
|
|
7
|
+
readonly attachment: number;
|
|
8
|
+
readonly limit: number | null;
|
|
9
|
+
readonly application: "claim" | "occurrence" | "policy" | "source-defined";
|
|
10
|
+
readonly derivation: {
|
|
11
|
+
readonly kind: "sdk";
|
|
12
|
+
} | {
|
|
13
|
+
readonly kind: "external";
|
|
14
|
+
readonly actor: "caller" | "source";
|
|
15
|
+
readonly transformationRef: string;
|
|
16
|
+
};
|
|
17
|
+
} | {
|
|
18
|
+
readonly kind: "unknown";
|
|
19
|
+
readonly description: string | null;
|
|
20
|
+
};
|
|
21
|
+
export interface NormalizedDiagnosticToleranceIdentity {
|
|
22
|
+
readonly absolute: number;
|
|
23
|
+
readonly relative: number;
|
|
24
|
+
}
|
|
25
|
+
export interface NormalizedDiagnosticReviewFilterIdentity {
|
|
26
|
+
readonly sourceGroups: readonly string[] | null;
|
|
27
|
+
readonly origins: readonly string[] | null;
|
|
28
|
+
readonly originFrom: string | null;
|
|
29
|
+
readonly originThrough: string | null;
|
|
30
|
+
readonly valuations: readonly string[] | null;
|
|
31
|
+
readonly valuationFrom: string | null;
|
|
32
|
+
readonly valuationThrough: string | null;
|
|
33
|
+
readonly minDevelopmentAge: number | null;
|
|
34
|
+
readonly maxDevelopmentAge: number | null;
|
|
35
|
+
}
|
|
36
|
+
export type NormalizedDiagnosticPeriodAxisIdentity = DiagnosticDeepReadonly<Extract<DiagnosticPeriodAxis, {
|
|
37
|
+
kind: "calendar";
|
|
38
|
+
}>> | (Omit<DiagnosticDeepReadonly<Extract<DiagnosticPeriodAxis, {
|
|
39
|
+
kind: "ordered";
|
|
40
|
+
}>>, "origins" | "valuations"> & {
|
|
41
|
+
readonly origins: readonly {
|
|
42
|
+
readonly label: string;
|
|
43
|
+
readonly aliases: readonly string[];
|
|
44
|
+
readonly coordinate: number;
|
|
45
|
+
}[];
|
|
46
|
+
readonly valuations: readonly {
|
|
47
|
+
readonly label: string;
|
|
48
|
+
readonly aliases: readonly string[];
|
|
49
|
+
readonly coordinate: number;
|
|
50
|
+
}[];
|
|
51
|
+
});
|
|
52
|
+
export interface NormalizedDiagnosticFormulaIdentity {
|
|
53
|
+
readonly id: string;
|
|
54
|
+
readonly version: string;
|
|
55
|
+
readonly roles: Readonly<Record<string, {
|
|
56
|
+
readonly kind: DiagnosticMeasureKind;
|
|
57
|
+
readonly compatibilityGroup: string | null;
|
|
58
|
+
readonly developmentSemantics: DiagnosticDevelopmentSemantics | null;
|
|
59
|
+
}>>;
|
|
60
|
+
readonly numerator: DiagnosticDeepReadonly<DiagnosticRoleExpression>;
|
|
61
|
+
readonly denominator: DiagnosticDeepReadonly<DiagnosticRoleExpression>;
|
|
62
|
+
readonly denominatorPolicy: "positive-or-null";
|
|
63
|
+
}
|
|
64
|
+
interface NormalizedDiagnosticReviewRuleBase {
|
|
65
|
+
readonly id: string;
|
|
66
|
+
readonly code: string;
|
|
67
|
+
readonly description: string;
|
|
68
|
+
readonly severity: "warning" | "fail";
|
|
69
|
+
readonly missingInput: "not-evaluated" | "finding";
|
|
70
|
+
readonly tolerance: NormalizedDiagnosticToleranceIdentity;
|
|
71
|
+
}
|
|
72
|
+
export type NormalizedDiagnosticReviewRuleIdentity = (NormalizedDiagnosticReviewRuleBase & {
|
|
73
|
+
readonly kind: "compare";
|
|
74
|
+
readonly when: DiagnosticDeepReadonly<DiagnosticReviewPredicate>;
|
|
75
|
+
}) | (NormalizedDiagnosticReviewRuleBase & {
|
|
76
|
+
readonly kind: "reconcile";
|
|
77
|
+
readonly actual: DiagnosticDeepReadonly<DiagnosticMeasureExpression>;
|
|
78
|
+
readonly expected: DiagnosticDeepReadonly<DiagnosticReviewOperand>;
|
|
79
|
+
}) | (NormalizedDiagnosticReviewRuleBase & {
|
|
80
|
+
readonly kind: "monotonic";
|
|
81
|
+
readonly expression: DiagnosticDeepReadonly<DiagnosticMeasureExpression>;
|
|
82
|
+
readonly direction: "nondecreasing" | "nonincreasing";
|
|
83
|
+
}) | (NormalizedDiagnosticReviewRuleBase & {
|
|
84
|
+
readonly kind: "layer-order";
|
|
85
|
+
readonly narrower: DiagnosticDeepReadonly<DiagnosticMeasureExpression>;
|
|
86
|
+
readonly broader: DiagnosticDeepReadonly<DiagnosticMeasureExpression>;
|
|
87
|
+
readonly comparability: DiagnosticDeepReadonly<Extract<DiagnosticReviewRule, {
|
|
88
|
+
kind: "layer-order";
|
|
89
|
+
}>["comparability"]>;
|
|
90
|
+
}) | (NormalizedDiagnosticReviewRuleBase & {
|
|
91
|
+
readonly kind: "control-total";
|
|
92
|
+
readonly expression: DiagnosticDeepReadonly<DiagnosticMeasureExpression>;
|
|
93
|
+
readonly expected: number;
|
|
94
|
+
readonly filter: NormalizedDiagnosticReviewFilterIdentity | null;
|
|
95
|
+
readonly projection: DiagnosticDeepReadonly<DiagnosticControlTotalProjection>;
|
|
96
|
+
});
|
|
97
|
+
export interface NormalizedDiagnosticDefinitionIdentity {
|
|
98
|
+
readonly diagnosticDefinitionVersion: "1.0.0";
|
|
99
|
+
readonly id: string;
|
|
100
|
+
readonly version: string;
|
|
101
|
+
readonly lossRowGrain: "claim" | "aggregate";
|
|
102
|
+
readonly measures: readonly {
|
|
103
|
+
readonly id: string;
|
|
104
|
+
readonly displayName: string;
|
|
105
|
+
readonly description: string;
|
|
106
|
+
readonly source: DiagnosticMeasureSource;
|
|
107
|
+
readonly kind: DiagnosticMeasureKind;
|
|
108
|
+
readonly unit: string;
|
|
109
|
+
readonly developmentSemantics: DiagnosticDevelopmentSemantics;
|
|
110
|
+
readonly aggregation: "sum";
|
|
111
|
+
readonly missing: DiagnosticMissingPolicy;
|
|
112
|
+
readonly basisId: string | null;
|
|
113
|
+
readonly countPopulationId: string | null;
|
|
114
|
+
readonly exposureBasisId: string | null;
|
|
115
|
+
readonly exposureTiming: DiagnosticExposureTiming | null;
|
|
116
|
+
}[];
|
|
117
|
+
readonly countPopulations: readonly {
|
|
118
|
+
readonly id: string;
|
|
119
|
+
readonly displayName: string;
|
|
120
|
+
readonly subject: DiagnosticCountPopulationDefinition["subject"];
|
|
121
|
+
readonly unit: string;
|
|
122
|
+
readonly description: string;
|
|
123
|
+
readonly attributes: Readonly<Record<string, string | number | boolean | null>>;
|
|
124
|
+
}[];
|
|
125
|
+
readonly exposureBases: readonly {
|
|
126
|
+
readonly id: string;
|
|
127
|
+
readonly displayName: string;
|
|
128
|
+
readonly basis: DiagnosticExposureBasisDefinition["basis"];
|
|
129
|
+
readonly unit: string;
|
|
130
|
+
readonly description: string;
|
|
131
|
+
readonly sourceDescription: string | null;
|
|
132
|
+
readonly attributes: Readonly<Record<string, string | number | boolean | null>>;
|
|
133
|
+
}[];
|
|
134
|
+
readonly amountBases: readonly {
|
|
135
|
+
readonly id: string;
|
|
136
|
+
readonly displayName: string;
|
|
137
|
+
readonly currency: string;
|
|
138
|
+
readonly perspective: AmountPerspective;
|
|
139
|
+
readonly components: readonly {
|
|
140
|
+
readonly id: string;
|
|
141
|
+
readonly treatment: "included" | "excluded" | "unknown";
|
|
142
|
+
readonly limitation: NormalizedAmountLimitationIdentity;
|
|
143
|
+
}[];
|
|
144
|
+
readonly sourceDescription: string | null;
|
|
145
|
+
readonly attributes: Readonly<Record<string, string | number | boolean | null>>;
|
|
146
|
+
}[];
|
|
147
|
+
readonly derivedMeasures: readonly DiagnosticDeepReadonly<DiagnosticDerivedMeasureDefinition>[];
|
|
148
|
+
readonly formulas: readonly NormalizedDiagnosticFormulaIdentity[];
|
|
149
|
+
readonly instances: readonly {
|
|
150
|
+
readonly id: string;
|
|
151
|
+
readonly version: string;
|
|
152
|
+
readonly formulaId: string;
|
|
153
|
+
readonly bindings: Readonly<Record<string, DiagnosticDeepReadonly<DiagnosticMeasureExpression>>>;
|
|
154
|
+
readonly presentation: DiagnosticDeepReadonly<DiagnosticMetricPresentation>;
|
|
155
|
+
readonly rules: readonly {
|
|
156
|
+
readonly id: string;
|
|
157
|
+
readonly code: string;
|
|
158
|
+
readonly message: string;
|
|
159
|
+
readonly severity: "warning" | "fail";
|
|
160
|
+
readonly when: {
|
|
161
|
+
readonly left: DiagnosticDeepReadonly<DiagnosticRuleOperand>;
|
|
162
|
+
readonly operator: DiagnosticComparisonPredicate["operator"];
|
|
163
|
+
readonly right: DiagnosticDeepReadonly<DiagnosticRuleOperand>;
|
|
164
|
+
readonly tolerance: NormalizedDiagnosticToleranceIdentity;
|
|
165
|
+
};
|
|
166
|
+
}[];
|
|
167
|
+
}[];
|
|
168
|
+
readonly reviewRules: readonly NormalizedDiagnosticReviewRuleIdentity[];
|
|
169
|
+
readonly periodAxis: NormalizedDiagnosticPeriodAxisIdentity;
|
|
170
|
+
}
|
|
171
|
+
export interface NormalizedDiagnosticCalculationScope {
|
|
172
|
+
readonly formulaFingerprint: string;
|
|
173
|
+
readonly instance: {
|
|
174
|
+
readonly id: string;
|
|
175
|
+
readonly version: string;
|
|
176
|
+
readonly formulaId: string;
|
|
177
|
+
readonly bindings: Readonly<Record<string, DiagnosticDeepReadonly<DiagnosticMeasureExpression>>>;
|
|
178
|
+
};
|
|
179
|
+
readonly lossRowGrain: "claim" | "aggregate";
|
|
180
|
+
readonly measures: readonly {
|
|
181
|
+
readonly id: string;
|
|
182
|
+
readonly source: DiagnosticMeasureSource;
|
|
183
|
+
readonly kind: DiagnosticMeasureKind;
|
|
184
|
+
readonly unit: string;
|
|
185
|
+
readonly developmentSemantics: DiagnosticDevelopmentSemantics;
|
|
186
|
+
readonly aggregation: "sum";
|
|
187
|
+
readonly missing: DiagnosticMissingPolicy;
|
|
188
|
+
readonly basisId: string | null;
|
|
189
|
+
readonly countPopulationId: string | null;
|
|
190
|
+
readonly exposureBasisId: string | null;
|
|
191
|
+
readonly exposureTiming: DiagnosticExposureTiming | null;
|
|
192
|
+
}[];
|
|
193
|
+
readonly countPopulations: readonly {
|
|
194
|
+
readonly id: string;
|
|
195
|
+
readonly subject: DiagnosticCountPopulationDefinition["subject"];
|
|
196
|
+
readonly unit: string;
|
|
197
|
+
readonly attributes: Readonly<Record<string, string | number | boolean | null>>;
|
|
198
|
+
}[];
|
|
199
|
+
readonly exposureBases: readonly {
|
|
200
|
+
readonly id: string;
|
|
201
|
+
readonly basis: DiagnosticExposureBasisDefinition["basis"];
|
|
202
|
+
readonly unit: string;
|
|
203
|
+
readonly attributes: Readonly<Record<string, string | number | boolean | null>>;
|
|
204
|
+
}[];
|
|
205
|
+
readonly amountBases: readonly {
|
|
206
|
+
readonly id: string;
|
|
207
|
+
readonly currency: string;
|
|
208
|
+
readonly perspective: AmountPerspective;
|
|
209
|
+
readonly components: readonly {
|
|
210
|
+
readonly id: string;
|
|
211
|
+
readonly treatment: "included" | "excluded" | "unknown";
|
|
212
|
+
readonly limitation: NormalizedAmountLimitationIdentity;
|
|
213
|
+
}[];
|
|
214
|
+
readonly attributes: Readonly<Record<string, string | number | boolean | null>>;
|
|
215
|
+
}[];
|
|
216
|
+
readonly derivedMeasures: readonly DiagnosticDeepReadonly<DiagnosticDerivedMeasureDefinition>[];
|
|
217
|
+
}
|
|
218
|
+
export interface NormalizedDiagnosticSourceLocationIdentity {
|
|
219
|
+
readonly artifactId: string;
|
|
220
|
+
readonly sourceFile: string | null;
|
|
221
|
+
readonly sourceSheet: string | null;
|
|
222
|
+
readonly sourceRow: number | null;
|
|
223
|
+
readonly sourceCell: string | null;
|
|
224
|
+
}
|
|
225
|
+
export declare function normalizeDiagnosticDefinition(definition: DiagnosticDefinition): DiagnosticDeepReadonly<NormalizedDiagnosticDefinitionIdentity>;
|
|
226
|
+
export declare function normalizeDiagnosticSourceLocation(source: DiagnosticSourceLocation): NormalizedDiagnosticSourceLocationIdentity;
|
|
227
|
+
export interface BuiltDiagnosticIdentities {
|
|
228
|
+
readonly formulaFingerprints: Readonly<Record<string, string>>;
|
|
229
|
+
readonly calculationFingerprints: Readonly<Record<string, string>>;
|
|
230
|
+
readonly definitionIntegrity: string;
|
|
231
|
+
readonly calculationScopesByInstanceId: ReadonlyMap<string, NormalizedDiagnosticCalculationScope>;
|
|
232
|
+
readonly calculationDependenciesByInstanceId: ReadonlyMap<string, readonly string[]>;
|
|
233
|
+
readonly evaluationDependenciesByInstanceId: ReadonlyMap<string, readonly string[]>;
|
|
234
|
+
}
|
|
235
|
+
export declare function buildDiagnosticIdentities(definition: DiagnosticDeepReadonly<NormalizedDiagnosticDefinitionIdentity>): BuiltDiagnosticIdentities;
|
|
236
|
+
export {};
|
|
237
|
+
//# sourceMappingURL=diagnosticIdentity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnosticIdentity.d.ts","sourceRoot":"","sources":["../src/diagnosticIdentity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,iBAAiB,EACjB,6BAA6B,EAC7B,gCAAgC,EAChC,mCAAmC,EACnC,sBAAsB,EACtB,oBAAoB,EACpB,kCAAkC,EAClC,8BAA8B,EAC9B,iCAAiC,EACjC,wBAAwB,EAExB,qBAAqB,EACrB,uBAAuB,EACvB,4BAA4B,EAC5B,uBAAuB,EACvB,oBAAoB,EAEpB,uBAAuB,EACvB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAEV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AA6CpC,MAAM,MAAM,kCAAkC,GAC1C;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;CAAE,GAC9B;IACE,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,aAAa,CAAC;IACvC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,OAAO,GAAG,YAAY,GAAG,QAAQ,GAAG,gBAAgB,CAAC;IAC3E,QAAQ,CAAC,UAAU,EACf;QAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CA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