Análisis de supervivencia
- @if (domain() === 'cacu') {
-
- Las curvas son estimaciones del grupo de pacientes del escenario clínico
- correspondiente (S(t), probabilidad de supervivencia); no son predicciones
- individuales.
-
- }
@if (survival.isLoading()) {
+ } @else if (domain() === 'cacu') {
+ No disponible: el informe no contiene la curva para esta combinación.
} @else if (survival.value(); as s) {
Escenario clínico de la paciente
@if (s.methods.length) {
- Métodos
-
- @for (name of s.methods; track name) {
- - {{ name }}
- }
-
+
+ Métodos
+
+ @for (name of s.methods; track name) {
+ - {{ name }}
+ }
+
+
}
@for (f of s.figures; track f.title) {
{{ f.title }}
diff --git a/src/app/paciente/risk-series.ts b/src/app/paciente/risk-series.ts
index 2de9bba..f7fc446 100644
--- a/src/app/paciente/risk-series.ts
+++ b/src/app/paciente/risk-series.ts
@@ -1,8 +1,5 @@
-import { DecimalPipe } from '@angular/common';
import { Component, computed, input, signal } from '@angular/core';
import { MatCheckboxModule } from '@angular/material/checkbox';
-import { MatFormFieldModule } from '@angular/material/form-field';
-import { MatSelectModule } from '@angular/material/select';
import type { Parameters, ParametersParameter } from 'fhir/r4';
import { Plot } from '../plot';
import { curveFigure } from './risk-curve';
@@ -56,11 +53,10 @@ export function parseSeries(answer: Parameters): Series[] {
}));
}
-/** The chosen series as bars at one horizon and as curves. Series are shown side by side; no
- * difference between them is computed. */
+/** The chosen series as curves. Series are shown side by side; no difference is computed. */
@Component({
selector: 'app-risk-series',
- imports: [DecimalPipe, MatCheckboxModule, MatFormFieldModule, MatSelectModule, Plot],
+ imports: [MatCheckboxModule, Plot],
template: `
Cada serie tiene su propio desenlace y población: no se restan entre sí.
@@ -71,40 +67,11 @@ export function parseSeries(answer: Parameters): Series[] {
}
@if (selected().length) {
-
- Horizonte
-
- @for (h of horizons(); track h) {
- {{ h === 0 ? 'Al índice' : h + ' años' }}
- }
-
-
-
+ }
}
@if (!available().length) {
@@ -121,24 +88,6 @@ export function parseSeries(answer: Parameters): Series[] {
gap: 0 16px;
margin-bottom: 8px;
}
- .bars {
- list-style: none;
- padding: 0;
- }
- .bars li {
- display: flex;
- flex-direction: column;
- margin-bottom: 10px;
- }
- .track {
- background: var(--color-action-hover, #f1f6f6);
- height: 10px;
- }
- .fill {
- background: #4269a0;
- display: block;
- height: 100%;
- }
`,
})
export class RiskSeries {
@@ -158,21 +107,6 @@ export class RiskSeries {
protected readonly selected = computed(() =>
this.available().filter((s) => this.chosen().has(s.id)),
);
- protected readonly horizons = computed(() =>
- [...new Set(this.selected().flatMap((s) => s.points.map((p) => p.years)))].sort(
- (a, b) => a - b,
- ),
- );
- protected readonly picked = signal(5);
- protected readonly horizon = computed(() =>
- this.horizons().includes(this.picked()) ? this.picked() : this.horizons().at(-1)!,
- );
- protected readonly bars = computed(() =>
- this.selected().map((series) => ({
- series,
- point: series.points.find((p) => p.years === this.horizon()),
- })),
- );
protected readonly figure = computed(() => {
const shown = this.selected().map((s) => ({
model: s.id,