@for (card of kpis; track dominio + ':' + card.definition.id) {
@if (card.pending) {
}
}
- @if (dominio === 'cacu' && !screeningRouteAvailable) {
+ @if (dominio === 'cacu') {
} @else if (dominio === 'cama') {
diff --git a/src/app/features/indicadores/indicadores-page.ts b/src/app/features/indicadores/indicadores-page.ts
index 233cd44..93a8b6b 100644
--- a/src/app/features/indicadores/indicadores-page.ts
+++ b/src/app/features/indicadores/indicadores-page.ts
@@ -348,12 +348,9 @@ export class IndicadoresPage {
const selection = this.filters?.applied.selection;
return this.dominio === 'tea' && selection?.mode === 'explicit' && selection.periodos.length === 1 ? selection.periodos[0] : undefined;
}
- // With the route chart, CaCu's strip keeps the cytology count: its times are drawn by the chart, so they get no card.
get opportunityKpis() {
const definitions = this.availableKpis;
- if (this.dominio !== 'cacu') return definitions;
- if (this.screeningRouteAvailable) return definitions.filter(definition => definition.contrato !== 'C3r');
- if (!definitions.length && !this.catalog().some(item => item.id === CACU_RESULTADO_KPI.id)) return definitions;
+ if (this.dominio !== 'cacu' || (!definitions.length && !this.catalog().some(item => item.id === CACU_RESULTADO_KPI.id))) return definitions;
// Keep the established KPI definitions and initial-period anchor intact.
const diagnosis = definitions.findIndex(item => item.id === 'cacu_dias_toma_diagnostico');
return [...definitions.slice(0, diagnosis < 0 ? definitions.length : diagnosis), CACU_RESULTADO_KPI,
diff --git a/src/app/features/indicadores/indicadores-screening-route-page.spec.ts b/src/app/features/indicadores/indicadores-screening-route-page.spec.ts
index 2eff58c..959845a 100644
--- a/src/app/features/indicadores/indicadores-screening-route-page.spec.ts
+++ b/src/app/features/indicadores/indicadores-screening-route-page.spec.ts
@@ -43,6 +43,12 @@ describe('Ruta del tamizaje: página de CaCu', () => {
for (const id of [...ROUTE_IDS, ...CACU_SIN_TARJETA]) expect(ids).not.toContain(id);
expect(ids).toEqual(['cacu_eu7', 'cacu_confirmacion_citologia']);
});
+ it('con la ruta, la franja de oportunidad conserva sus tarjetas: solo se retiran las de la sección clínica', () => {
+ // Fails if the opportunity strip loses a card when the route chart appears.
+ abrir('cacu', [item('cacu_eu7', 'C2'), ...ROUTE_IDS.map(id => item(id))]);
+ const titulos = [...fixture.nativeElement.querySelectorAll('.kpi-grid app-indicador-kpi-card h3')].map((h: HTMLElement) => h.textContent);
+ expect(titulos).toEqual(['Pacientes evaluadas', 'Días de toma a resultado', 'Tiempo de tamizaje a diagnóstico', 'Tiempo de tamizaje a tratamiento', 'Tiempo de diagnóstico a tratamiento']);
+ });
it('si el catálogo no publica alguna de las siete, no hay gráfica y las medidas conservan sus tarjetas', () => {
// Fails if the chart appears with a measure missing, or the cards of the others disappear anyway.
abrir('cacu', [item('cacu_eu7', 'C2'), ...ROUTE_IDS.filter(id => id !== 'cacu_dias_toma_biopsia').map(id => item(id))]);