Merge dashboard-test: the CaMa dashboard's presentation over the FHIR measures, with TEA's history and summary kept

This commit is contained in:
Roberto Treviño Cervantes
2026-11-15 05:37:15 -06:00
133 changed files with 9936 additions and 290 deletions
@@ -19,7 +19,7 @@ export interface Indicador {
// Tabs that show it; without this field, all of them.
vistas?: string[];
}
export type DimensionEstrato = 'grupo_edad' | 'estatus_seguimiento' | 'citologia_alto_grado';
export type DimensionEstrato = 'grupo_edad' | 'estatus_seguimiento' | 'citologia_alto_grado' | 'birads';
export interface IndicadorFiltro { estrato: string; etiqueta: string; valores: { valor: string; etiqueta: string }[]; }
export interface DatosScope { estrato?: DimensionEstrato; filtros?: readonly string[]; }
export interface EstratoTotal { periodo: string; grupo: string; estrato: string; n: number | null; suprimido: 0 | 1; }
@@ -67,8 +67,9 @@ export interface FigureSelection { dominio?: Dominio; tipoPeriodo?: TipoPeriodo;
// of the other published groups; a row of a group nobody published stays, for the caller to refuse.
export function filasDelGrupo(data: IndicadorDatos, group: string): Record<string, unknown>[] {
const published = data['grupos'];
const others = new Set(Object.keys(published && typeof published === 'object' ? published : {}).filter(id => id !== group));
return others.size ? data.filas.filter(row => !others.has(row['grupo'] as string)) : data.filas;
const others = new Set(Object.keys(published && typeof published === 'object' ? published : {})
.map(id => id.toUpperCase()).filter(id => id !== group.toUpperCase()));
return others.size ? data.filas.filter(row => !others.has(String(row['grupo']).toUpperCase())) : data.filas;
}
export function parsePeriodos(value: string, tipo: TipoPeriodo = 'semestre'): string[] | null {