feat(indicadores): Resumen as a story of questions, for the domains that have one
How: indicadores-relato.ts holds, per domain, the questions Resumen answers in order, each with the opportunity cards and charts that answer it, a one-line reading and, optionally, a button to the tab that continues it. Cáncer de mama follows the patient's route: 1 ¿Cuántas pacientes tienen un hallazgo sospechoso? (patients and mammograms with BI-RADS 4-6), 2 ¿Qué tan pronto llega el diagnóstico? (the two time cards, then Histórico), 3 ¿Cuántos cánceres confirma la biopsia, y en qué categorías? (detection rate and the BI-RADS histopathology view), 4 ¿Quiénes siguen pendientes? (to Seguimiento). Each answer leads to the next question. Indicators no question claims go to «Otros indicadores». All opportunity cards have one size (17rem by at least 12.5rem): beside charts they stack in a column, alone they sit in a row; charts take equal halves and an interactive card the full width. Domains without a story keep the opportunity and clinical sections. Implications: the story is WebApp configuration, keyed by indicator ids; when the catalog or KPI ids change, RELATO_BY_DOMAIN must follow (or come from the API's metadata later, as a `pregunta` field per indicator). Cards render in question order, so specs that read cáncer de mama's cards in DOM order expect patients, times, then detection rate. The charts' search and the TEA print report stay with the default layout.
This commit is contained in:
@@ -13,6 +13,7 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { catchError, first, map, of, startWith, Subject, switchMap, takeUntil } from 'rxjs';
|
||||
import { Dominio, isDominio, Indicador, Tema } from './indicadores.models';
|
||||
import { vistaEscenario } from './indicadores-eu7-escenario';
|
||||
import { PreguntaRelato, RELATO_BY_DOMAIN, respuesta, sinPregunta } from './indicadores-relato';
|
||||
import { IndicadoresService } from './indicadores.service';
|
||||
import { applyGlobal, domainTypes, GlobalFilterState, IndicadoresMemory, pending, validDraft } from './indicadores-memory';
|
||||
import { IndicadorPeriodFilters } from './indicador-period-filters';
|
||||
@@ -357,6 +358,10 @@ export class IndicadoresPage {
|
||||
this.filtersEdited();
|
||||
this.changeDetector.markForCheck();
|
||||
}
|
||||
// Resumen as a story of questions, for the domains that have one.
|
||||
get relato(): readonly PreguntaRelato[] | undefined { return RELATO_BY_DOMAIN[this.dominio]; }
|
||||
respuesta(pregunta: PreguntaRelato) { return respuesta(pregunta, this.opportunityKpis, this.searchResults().items); }
|
||||
get sinPregunta() { return sinPregunta(this.relato ?? [], this.opportunityKpis, this.searchResults().items); }
|
||||
cardIdentity(item: Indicador) { return indicatorIdentity(this.dominio, item.id); }
|
||||
cardElementId(item: Indicador) { return identityElementId(this.cardIdentity(item)); }
|
||||
// «Ir» in the indicator selector: show the indicator if it was filtered out, then scroll to its card.
|
||||
|
||||
Reference in New Issue
Block a user