Usar un solo selector de curvas para riesgo y supervivencia

This commit is contained in:
2026-12-03 07:31:12 -06:00
parent 5a82dc780e
commit 4ec071332d
7 changed files with 138 additions and 143 deletions
+3 -3
View File
@@ -50,7 +50,7 @@ import type { Relation } from '../api/models/relation';
import { Figure, PALETTE, Plot } from '../plot';
import { Loading } from '../loading';
import { Factores, ScenarioFactors } from './factores';
import { SurvivalCurves } from './survival-curves';
import { CurveChooser, figureChoices } from './curve-chooser';
/** An Observation's value as the screens say it, whatever its type. */
function shown(o: Observation): string {
@@ -104,7 +104,7 @@ function modelInputs(value: string | undefined): Record<string, unknown> | undef
selector: 'app-paciente',
imports: [
Factores,
SurvivalCurves,
CurveChooser,
Loading,
DecimalPipe,
MatButtonModule,
@@ -237,7 +237,7 @@ export class Paciente {
});
const found = combinationOf(report as Record<string, unknown>, inputs);
return found?.km
? { n: found.n, fallecidos: found.fallecidos, figure: survivalFigure(found) }
? { n: found.n, fallecidos: found.fallecidos, curves: figureChoices(survivalFigure(found)) }
: { missing: noCurveText(report as Record<string, unknown>, found) };
},
});