feat(cama): «Análisis epidemiológico»: epidemiological figures, chosen comparisons, and curves and cells that open their patients

How:
- The tab is now «Análisis epidemiológico». Its first section,
  «Indicadores epidemiológicos», shows the cohort's figures at 24 months
  (GET /<domain>/analisis/indicadores, guarded by analisisIndicadores):
  cumulative incidence of cancer and of recurrence, follow-up adherence and
  survival, each with its interval, counts and assumptions.
- Stages publish a list of variables (two or more) instead of a fixed pair.
  The curves have their own menus: one variable and two or more of its
  values (`grupos`; with all of them the request names none, with one the
  page asks for another and sends nothing). Cox sits beside them, on the
  same groups.
- The heatmap has its own menus for rows and columns, always two distinct
  variables (cruceDeEtapa keeps a pair the stage owns); its answer adds the
  log-rank of each variable, plain and stratified by the other.
- A curve click, its «Ver pacientes» button in the risk table, or a
  coloured cell emits verPacientes with the scenario's population
  (`filtro_seguimiento`) and the values (seleccionDeCurva,
  seleccionDeCelda). The page opens Seguimiento with that selection.
- IndicadoresSeguimientoTabla takes the selection as an input: it asks the
  whole cohort (`meses = 0`, «Toda la cohorte», now in MESES_VENTANA) with
  those filters and says where the list comes from; «Quitar selección»
  goes back to the 3-month window. A new id applies a repeated click.

Implications:
- Seguimiento's contract gains `meses = 0` (no time window); the backend
  must accept it, or answer 400 until it does.
- The list behind a curve is patient-level: the drill-down needs the same
  access rule as Seguimiento, and the figures it comes from stay suppressed.
- Two more endpoints for the backend (/analisis/indicadores, and the new
  parameters grupos, filas and columnas).
This commit is contained in:
rockdrigo
2026-11-12 18:38:12 -06:00
parent d16804d416
commit 710790b98e
12 changed files with 512 additions and 323 deletions
@@ -12,7 +12,7 @@ import { Dominio } from './indicadores.models';
import { IndicadoresService } from './indicadores.service';
import { ALTERACIONES_EEG, ESTADOS_CASO, GRUPOS_EDAD_TEA, RANGOS_CSS, RANGOS_MCHAT, TeaSeguimientoPaciente, TeaSeguimientoResponse, TeaSeguimientoService } from './tea-seguimiento.service';
import { TeaPacienteResumen } from './tea-paciente-resumen';
import { IndicadoresSeguimientoTabla } from './indicadores-seguimiento-tabla';
import { IndicadoresSeguimientoTabla, SeleccionSeguimiento } from './indicadores-seguimiento-tabla';
@Component({
selector: 'app-indicadores-tracking',
@@ -25,6 +25,8 @@ export class IndicadoresTracking implements OnChanges {
@Input({ required: true }) domainLabel = '';
@Input() dominio: Dominio = 'tea';
@Input() active = false;
// CaMa: the patients of a curve or a heatmap cell of the analysis, for its follow-up list.
@Input() seleccion?: SeleccionSeguimiento;
private readonly service = inject(CacuSeguimientoService);
private readonly indicators = inject(IndicadoresService);
private readonly teaService = inject(TeaSeguimientoService);