feat(cacu): add configurable historical indicators dashboard
CaCu gets the Histórico tab, built on CaMa's through a per-domain config (indicadores-historico-config.ts): panel list and order, expected contract, unit labels, initial period window and a notice. Six panels read the measures dev publishes: EU7, IND1, EU13, biopsy result after high-grade cytology, days from sample to result and to diagnosis. Three more (time to treatment, time from diagnosis to treatment, CIN2+ risk bands) are reserved: they show a title, a description and their state, and never request a report, whatever the catalog publishes. Adapter and figures: the primary group of a C1 is read as `total` in every domain, CaCu composition reports keep their units so the history can fail on categories that do not add up, periods without units are «sin dato» for CaCu only, and `examen` reads «citologías» there. Only the latest five periods are requested at first; wider windows request what is missing. The recorded FHIR mapping is regenerated for these two additions.
This commit is contained in:
@@ -39,9 +39,8 @@ describe('Secciones compartidas por dominio', () => {
|
||||
http.expectOne('/' + domain + '/indicadores').flush(catalog); harness.detectChanges();
|
||||
const root = harness.routeNativeElement!;
|
||||
const tabs = Array.from(root.querySelectorAll<HTMLButtonElement>('[role="tab"]'));
|
||||
// TEA and CaMa also have Histórico; the follow-up tab is named Análisis de riesgos in every domain; CaCu keeps its three tabs.
|
||||
const esperadas = domain === 'cama' ? ['Resumen', 'Histórico', 'Análisis de riesgos', 'Datos y definiciones']
|
||||
: domain === 'tea' ? ['Resumen', 'Histórico', 'Análisis de riesgos', 'Datos y definiciones'] : ['Resumen', 'Análisis de riesgos', 'Datos y definiciones'];
|
||||
// TEA, CaMa and CaCu have Histórico; the follow-up tab is named Análisis de riesgos in every domain.
|
||||
const esperadas = ['Resumen', 'Histórico', 'Análisis de riesgos', 'Datos y definiciones'];
|
||||
expect(tabs.map(t => t.textContent?.trim())).toEqual(esperadas);
|
||||
expect(tabs.map(t => t.getAttribute('aria-selected'))).toEqual(esperadas.map((_, i) => String(i === 0)));
|
||||
const tab = (id: string) => tabs.find(t => t.id === 'tab-' + id)!;
|
||||
|
||||
Reference in New Issue
Block a user