Ajustar indicadores, fecha de corte y ficha de CaMa y CaCu
This commit is contained in:
@@ -37,7 +37,7 @@ describe('the risk scales', () => {
|
||||
]);
|
||||
expect(groups.map((g) => g.title)).toEqual(['Supervivencia', 'Recurrencia', 'Otro']);
|
||||
expect(groups.map((g) => g.index)).toEqual(['2026-02-01', '2026-03-01', '2026-03-02']);
|
||||
const labels = ['Riesgo inmediato (al índice)', 'Riesgo a 5 años'];
|
||||
const labels = ['Probabilidad inmediata (al índice)', 'Probabilidad a 5 años'];
|
||||
for (const g of groups) expect(g.scales.map((s) => s.label)).toEqual(labels);
|
||||
expect(groups[0].scales.map((s) => s.risk?.p)).toEqual([0, 0.5]);
|
||||
expect(groups[1].scales.map((s) => s.risk?.p)).toEqual([undefined, 0.98]);
|
||||
@@ -48,15 +48,15 @@ describe('the risk scales', () => {
|
||||
expect(rest).toEqual([]);
|
||||
expect(none.title).toBeUndefined();
|
||||
expect(none.scales.map((s) => [s.label, s.risk])).toEqual([
|
||||
['Riesgo inmediato (al índice)', undefined],
|
||||
['Riesgo a 5 años', undefined],
|
||||
['Probabilidad inmediata (al índice)', undefined],
|
||||
['Probabilidad a 5 años', undefined],
|
||||
]);
|
||||
});
|
||||
it('the PDF keeps its flat list, with no scale for a page with no model', () => {
|
||||
expect(riskScales([])).toEqual([]);
|
||||
expect(riskScales([{ text: 'M', predictions: [at(5, 0.1)] }]).map((s) => s.label)).toEqual([
|
||||
'M, riesgo inmediato',
|
||||
'M, riesgo a 5 años',
|
||||
'M, probabilidad inmediata',
|
||||
'M, probabilidad a 5 años',
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user