Usar un solo selector de curvas para riesgo y supervivencia
This commit is contained in:
@@ -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) };
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user