Recurrence scenarios leave Gobernanza: the record draws them

This commit is contained in:
Roberto Treviño
2026-11-28 21:30:01 -06:00
parent 133092f8c8
commit e275782198
2 changed files with 5 additions and 14 deletions
+3 -3
View File
@@ -36,8 +36,8 @@ describe('governance figures', () => {
expect((drawn.figure.data[4] as any).x).toEqual([6, 12, 18]);
});
it('draws a recurrence scenario: KM band, both Weibulls and the model points', () => {
const [found] = interpretabilityFigures({
it('leaves recurrence scenarios to the patient record', () => {
const found = interpretabilityFigures({
kind: 'scenarios',
recurrencia: {
horizons_months: [12, 36],
@@ -55,7 +55,7 @@ describe('governance figures', () => {
],
},
});
expect(found.figure.data.length).toBe(5); // band, KM, Weibull, fractional, points
expect(found).toEqual([]);
});
it('draws an age curve with its centile band', () => {
+2 -11
View File
@@ -140,17 +140,8 @@ export function interpretabilityFigures(
},
];
}
case 'scenarios':
return (report['recurrencia']['escenarios'] as any[])
.slice(0, 6)
.map((e) =>
scenarioFigure(
`${e.cohorte_nombre} · ${e.escenario} (n = ${e.n}, ${e.recaidas} recaídas)`,
e,
report['recurrencia']['horizons_months'],
'Supervivencia libre de recaída',
),
);
case 'scenarios': // recurrence: its scenarios are drawn in the patient record
return [];
case 'age_curves': {
// The metric's own curve; a topography has only electrodes: its first one.
const value = report['curves']['value'] ?? Object.values(report['curves'])[0];