feat(indicadores): CaMa's four opportunity cards, pending where the catalog lacks the indicator

Cards: patients with BI-RADS 4, 5 and 6, histopathological detection rate, screening to result and result to diagnosis times. The detection rate and the result-to-diagnosis time are not published by the catalog yet, so they are drawn as explicit pending cards and are queried once the catalog lists them. cama_eu38a is added to the CaMa KPIs.
This commit is contained in:
Angel Capetillo Zavala
2026-11-11 21:57:45 -06:00
parent f4d2a3e85f
commit bc75c058e1
11 changed files with 307 additions and 24 deletions
@@ -17,7 +17,7 @@ import { IndicadoresService } from './indicadores.service';
import { applyGlobal, domainTypes, GlobalFilterState, IndicadoresMemory, pending, validDraft } from './indicadores-memory';
import { IndicadorPeriodFilters } from './indicador-period-filters';
import { IndicadorCatalogCard } from './indicador-catalog-card';
import { CACU_RESULTADO_KPI, KPI_BY_DOMAIN } from './indicadores-kpi';
import { CACU_RESULTADO_KPI, KPI_BY_DOMAIN, KpiCardSlot, camaKpiCards } from './indicadores-kpi';
import { IndicadorKpiPanel } from './indicador-kpi-panel';
import { IndicadorKpiCard } from './indicador-kpi-card';
import { figureApplied, independentFigurePeriods } from './indicadores-figure-selection';
@@ -298,6 +298,11 @@ export class IndicadoresPage {
return [...definitions.slice(0, diagnosis < 0 ? definitions.length : diagnosis), CACU_RESULTADO_KPI,
...definitions.slice(diagnosis < 0 ? definitions.length : diagnosis)];
}
// What the KPI grid draws. CaMa adds explicit pending cards for opportunity indicators the catalog does not publish.
get kpiCards(): KpiCardSlot[] {
if (this.dominio === 'cama') return camaKpiCards(id => this.catalog().some(item => item.id === id));
return this.opportunityKpis.map(definition => ({ definition, pending: false }));
}
private readonly catalogRequests = new Subject<void>();
readonly catalog = signal<Indicador[]>([]);
readonly searchQuery = signal('');