Connect CaMa dashboard to follow-up, analysis and L3 FHIR measures

Preserve dev governance and risk-batch UI. Validate cohort navigation, API contracts and shared summary/history measures. Production build passes; 1785 tests pass with the six known Node 26 localStorage failures.
This commit is contained in:
Angel Capetillo Zavala
2026-11-17 10:44:08 -06:00
parent dc37c54938
commit 47a0ab5f1b
45 changed files with 16700 additions and 38 deletions
@@ -63,9 +63,9 @@ export const KPI_BY_DOMAIN: Record<Dominio, KpiDefinition[]> = {
],
};
// CaMa's four opportunity cards, in display order. Two of them have no indicator in the catalog yet
// (indicadores_kit defines neither `cama_tasa_deteccion_histopatologica` nor `cama_dias_resultado_diagnostico`),
// so they stay outside KPI_BY_DOMAIN: they are queried only once the catalog publishes them.
// CaMa's four opportunity cards, in display order. Two of them have no measure in the FHIR catalog yet
// (`cama_tasa_deteccion_histopatologica` and `cama_dias_resultado_diagnostico`), so they stay outside
// KPI_BY_DOMAIN: they are queried only once the catalog publishes them.
export const CAMA_OPORTUNIDAD_KPIS: KpiDefinition[] = [
KPI_BY_DOMAIN.cama[0],
CAMA_TASA_DETECCION_KPI,
@@ -83,8 +83,11 @@ export function camaKpiCards(published: (id: string) => boolean): KpiCardSlot[]
// The summary draws the paired card and the histopathology card; the rest of CaMa's indicators are in Histórico
// and in Datos y definiciones, which still list the whole catalog.
// The two published opportunity indicators draw their KPI card only; their evolution is in Histórico.
export const CAMA_FUERA_DEL_RESUMEN: readonly string[] = ['cama_biopsias', 'cama_confirmacion_birads45', 'cama_dias_toma_diagnostico', 'cama_eu38a',
'cama_tasa_deteccion_histopatologica', 'cama_dias_resultado_diagnostico'];
// `cama_birads` is replaced by the exams' and patients' counts, and `cama_birads_cancer_invasor` is the
// epidemiological analysis' measure: neither has a card of its own.
export const CAMA_FUERA_DEL_RESUMEN: readonly string[] = ['cama_biopsias', 'cama_birads', 'cama_birads_cancer_invasor',
'cama_confirmacion_birads45', 'cama_dias_toma_diagnostico', 'cama_eu38a', 'cama_tasa_deteccion_histopatologica',
'cama_dias_resultado_diagnostico'];
export const ID_HISTOPATOLOGIA_CAMA = 'cama_histopatologia_birads';
// C1 rows of CaCu/CaMa carry the linkId `total`; TEA's ficha names its single group `TOTAL`.
const C1_GROUP: Record<Dominio, string> = { tea: 'TOTAL', cacu: 'total', cama: 'total' };