Mostrar factores usados en cada estimación

This commit is contained in:
2026-12-02 23:13:59 -06:00
parent 5f92c49ed4
commit a92515eb4d
4 changed files with 59 additions and 3 deletions
+7
View File
@@ -94,4 +94,11 @@ describe('survival scales', () => {
expect(g.scales[0].risk?.low).toBeCloseTo(0.7);
expect(g.scales[0].risk?.high).toBeCloseTo(0.9);
});
it('keeps the inputs attached to the estimate and leaves old estimates without them', () => {
const inputs = { age_group: '45-54', cytology: 'HSIL+', hpv: 'positive' };
expect(survivalGroups([{ index: '2026-01-01', predictions: [at(1, 0.2)], inputs }])[0].inputs)
.toEqual(inputs);
expect(riskGroups([{ text: 'Riesgo', index: '2026-01-01', predictions: [at(5, 0.2)] }])[0].inputs)
.toBeUndefined();
});
});