feat(seguimiento): list opened on a group of the cohort, with its window, cut-off, cohort and revision
The follow-up list of breast cancer can now be opened on a selection that the analysis names: the whole cohort (window 0, offered only while the selection is active), the cut-off the analysis was computed at, the group's filter, and the cohort with its revision, which the server requires and repeats. - A cohort's list quotes `cohorte`, `escenario` and `revision` (not filters) on every page and in the export; an answer that loses a filter, changes the window or the cut-off, or is another cohort or revision is not drawn and cannot be exported. - A new selection cancels the previous request; while it loads, and when it fails (403, 409, 503), no list of the previous query stays on screen. - Inside the cohort the form refines the same cohort and says so; "Quitar selección" leaves it. - "Volver al análisis" and a note when the list holds a different number of patients than the analysis counted. - PDF and XLSX state the selection, the cut-off and "Toda la cohorte"; the file name tells a selection apart; an export in progress is cancelled, and a finished one discarded, when the query on screen changes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// Fixtures of the analysis tab and of its journey to Seguimiento, shaped like the answers of the cohort API
|
||||
// (`GET /cama/analisis/indicadores?corte=` and the list `GET /cama/seguimiento` of a cohort).
|
||||
import { AnalisisAgregado } from './indicadores-analisis.service';
|
||||
|
||||
export const REVISION = 'dae23030398f86a24e8ad910471d27ce02502ac6b174063c98e5163dea0ce7a7';
|
||||
export const CORTE = '2026-10-20';
|
||||
export const CONTEXTO = { cohorte: 'cama_birads_v1', escenario: 'diagnostico', revision: REVISION };
|
||||
|
||||
/** One published category (BI-RADS 5, six patients) and five suppressed ones. */
|
||||
export const agregado = (extra: Partial<AnalisisAgregado> = {}): AnalisisAgregado => ({
|
||||
simulado: true, ...CONTEXTO, corte: CORTE, umbral_supresion: 5, unidad: 'paciente',
|
||||
denominador: 'pacientes elegibles con última mastografía reportada BI-RADS 4 a 6',
|
||||
grupos: [
|
||||
{ codigo: 'BIRADS_4', n: null, suprimido: true }, { codigo: 'BIRADS_4A', n: null, suprimido: true }, { codigo: 'BIRADS_4B', n: null, suprimido: true },
|
||||
{ codigo: 'BIRADS_4C', n: null, suprimido: true }, { codigo: 'BIRADS_5', n: 6, suprimido: false }, { codigo: 'BIRADS_6', n: null, suprimido: true },
|
||||
],
|
||||
...extra,
|
||||
});
|
||||
/** What the API sends on the wire: the aggregate plus the fields of the prototype it leaves empty. */
|
||||
export const agregadoJson = (extra: Record<string, unknown> = {}) => ({ ...agregado(), horizonte_dias: 0, indicadores: [], ...extra });
|
||||
Reference in New Issue
Block a user