feat(indicadores): Análisis epidemiológico tab for breast cancer, and the way back from Seguimiento
A CaMa-only tab between Histórico and Seguimiento shows how many patients of the cohort fall in
each BI-RADS category at a cut-off (GET /cama/analisis/indicadores?corte=), as the cohort API
publishes it. It is a descriptive count, not an incidence or a survival estimate.
- Loading, pending (404), unavailable (503), error and out-of-contract states; the answer is
validated as an aggregate (no patient rows, nothing published under the threshold).
- A suppressed category is drawn grey and says why; only a published category opens its patients
in Seguimiento ("Ver pacientes" or a click on its bar).
- The page keeps the selection while the user moves between tabs, clears it on a domain change, and
"Volver al análisis" returns to the analysis as it was, with the scroll and the focus on the
control that opened the list, and no new request.
- Tables and figure scroll inside their own region at phone width. CaCu and TEA keep their three
sections. Curves, the heatmap and the cohort diagnostics of the prototype wait for an API.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,11 +28,13 @@ import { httpMessage } from './indicadores-http';
|
||||
import { IndicadoresInitialPeriod } from './indicadores-initial-period';
|
||||
import { IndicadoresDefinitions } from './indicadores-definitions';
|
||||
import { IndicadoresTracking } from './indicadores-tracking';
|
||||
import { SeleccionSeguimiento } from './indicadores-seguimiento-tabla';
|
||||
import { IndicadoresAnalisis, SeleccionPacientes } from './indicadores-analisis';
|
||||
import { IndicadoresHistorico } from './indicadores-historico';
|
||||
import { IndicadorHistopatologiaPendiente } from './indicador-histopatologia-pendiente';
|
||||
import { IndicadorNavegacionItem, IndicadoresNavegacionPanel } from './indicadores-navegacion-panel';
|
||||
|
||||
type DashboardSection = 'resumen' | 'historico' | 'seguimiento' | 'datos';
|
||||
type DashboardSection = 'resumen' | 'historico' | 'analisis' | 'seguimiento' | 'datos';
|
||||
|
||||
const SECCIONES: readonly { id: DashboardSection; label: string }[] = [
|
||||
{ id: 'resumen', label: 'Resumen' },
|
||||
@@ -40,19 +42,36 @@ const SECCIONES: readonly { id: DashboardSection; label: string }[] = [
|
||||
{ id: 'datos', label: 'Datos y definiciones' },
|
||||
];
|
||||
const SECCIONES_CON_HISTORICO: readonly { id: DashboardSection; label: string }[] = [SECCIONES[0], { id: 'historico', label: 'Histórico' }, SECCIONES[1], SECCIONES[2]];
|
||||
// The epidemiological analysis is CaMa's: between its history and its follow-up list.
|
||||
const SECCIONES_CON_ANALISIS: readonly { id: DashboardSection; label: string }[] = [
|
||||
SECCIONES_CON_HISTORICO[0], SECCIONES_CON_HISTORICO[1], { id: 'analisis', label: 'Análisis epidemiológico' }, SECCIONES_CON_HISTORICO[2], SECCIONES_CON_HISTORICO[3]];
|
||||
|
||||
@Component({
|
||||
selector: 'app-indicadores-page',
|
||||
imports: [FormsModule, MatButtonModule, MatCardModule, MatFormFieldModule, MatInputModule, MatIconModule, MatSelectModule, MatProgressBarModule, OverlayModule, IndicadorCatalogCard, IndicadorKpiPanel, IndicadorKpiCard, IndicadorHistopatologiaPendiente, IndicadorPeriodFilters, IndicadoresDefinitions, IndicadoresTracking, IndicadoresNavegacionPanel, IndicadoresHistorico],
|
||||
imports: [FormsModule, MatButtonModule, MatCardModule, MatFormFieldModule, MatInputModule, MatIconModule, MatSelectModule, MatProgressBarModule, OverlayModule, IndicadorCatalogCard, IndicadorKpiPanel, IndicadorKpiCard, IndicadorHistopatologiaPendiente, IndicadorPeriodFilters, IndicadoresDefinitions, IndicadoresTracking, IndicadoresNavegacionPanel, IndicadoresHistorico, IndicadoresAnalisis],
|
||||
templateUrl: './indicadores-page.html',
|
||||
styleUrl: './indicadores-page.scss',
|
||||
})
|
||||
export class IndicadoresPage {
|
||||
// The history tab is CaMa's; the other domains keep their three sections.
|
||||
get sections(): readonly { id: DashboardSection; label: string }[] { return this.conHistorico ? SECCIONES_CON_HISTORICO : SECCIONES; }
|
||||
// The history and the analysis tabs are CaMa's; the other domains keep their three sections.
|
||||
get sections(): readonly { id: DashboardSection; label: string }[] { return this.conAnalisis ? SECCIONES_CON_ANALISIS : this.conHistorico ? SECCIONES_CON_HISTORICO : SECCIONES; }
|
||||
get conHistorico() { return this.dominio === 'cama'; }
|
||||
get conAnalisis() { return this.dominio === 'cama'; }
|
||||
readonly activeSection = signal<DashboardSection>('resumen');
|
||||
readonly fichaPacienteAbierta = signal(false);
|
||||
private readonly analisis = viewChild(IndicadoresAnalisis);
|
||||
// The patients of a curve or a heatmap cell, opened in Seguimiento; the id makes a repeated click apply again.
|
||||
// It belongs to the domain it was made in and stays while the user moves between the tabs.
|
||||
readonly seleccionSeguimiento = signal<SeleccionSeguimiento | undefined>(undefined);
|
||||
verPacientes(seleccion: SeleccionPacientes) {
|
||||
this.seleccionSeguimiento.set({ ...seleccion, id: (this.seleccionSeguimiento()?.id ?? 0) + 1 });
|
||||
this.changeSection('seguimiento');
|
||||
}
|
||||
// Back to the analysis: the part, the scroll and the focus where the user left them.
|
||||
volverAlAnalisis() {
|
||||
this.changeSection('analisis');
|
||||
afterNextRender(() => this.analisis()?.restaurar(), { injector: this.injector });
|
||||
}
|
||||
setFichaPacienteAbierta(open: boolean) {
|
||||
this.fichaPacienteAbierta.set(open);
|
||||
if (open) this.closeGraphicNavigation(false, false);
|
||||
@@ -538,6 +557,7 @@ export class IndicadoresPage {
|
||||
if (!isDominio(dominio) || dominio === this.dominio) return;
|
||||
this.closeGraphicNavigation(false, false);
|
||||
this.activeSection.set('resumen');
|
||||
this.seleccionSeguimiento.set(undefined);
|
||||
this.searchQuery.set('');
|
||||
this.filtersEdited();
|
||||
this.filters = undefined;
|
||||
|
||||
Reference in New Issue
Block a user