feat(indicadores): panel de tasa de confirmación histopatológica, tiempos pareados y ficha técnica

Agrega el panel de tasa de confirmación histopatológica (cacu_confirmacion_citologia): tasas por resultado citológico de alto grado con su intervalo de Wilson a la izquierda, dona del grado de biopsia a la derecha y tabla de contingencia; la vista base es «LIEAG o más» y las pacientes sin biopsia aún no entran al denominador. Une en una sola figura los tiempos de toma a resultado (pedido por id, oculto en el catálogo) y de toma a diagnóstico. La pestaña Datos y definiciones muestra la ficha técnica y las reglas del kit en tablas; las notas de cada figura pasan a su Cómo leer, las tarjetas dejan solo valor, n y periodo, y el Cómo leer de EU7 muestra solo lo que publica el kit. Las transiciones animadas quedan fuera, como entrega aparte para el diseñador.

CSO5.5
This commit is contained in:
2026-10-24 21:04:57 +00:00
parent e6be341ad9
commit 03e51c07cc
35 changed files with 1465 additions and 106 deletions
@@ -22,7 +22,8 @@ describe.each(['tea', 'cacu', 'cama'] as const)('P0 autoridad temporal compartid
const definitions = KPI_BY_DOMAIN[domain];
const otherDomain = domain === 'cacu' ? 'cama' : 'cacu';
const items = [...definitions.map(d => ({ id: d.id, titulo: d.title, contrato: d.contrato, tipos_periodo: ['semestre'], figuras: ['f', 'g'] })),
{ id: 'other', titulo: 'Otra figura', contrato: 'C1', tipos_periodo: ['semestre'], figuras: ['f'] }];
// Two figures, so every domain keeps an ordinary card whose representation can change.
{ id: 'other', titulo: 'Otra figura', contrato: 'C1', tipos_periodo: ['semestre'], figuras: ['f', 'g'] }];
beforeEach(() => {
vi.stubGlobal('IntersectionObserver', class { observe() {} unobserve() {} disconnect() {} });
TestBed.configureTestingModule({ imports: [IndicadoresPage], providers: [provideRouter([]), provideHttpClient(), provideHttpClientTesting()] });
@@ -108,9 +109,14 @@ describe.each(['tea', 'cacu', 'cama'] as const)('P0 autoridad temporal compartid
it('todas las figuras reciben el periodo compartido y mantienen carga diferida', () => {
choose(); http.expectNone(r => r.url.includes('/figuras/'));
cards().forEach(card => { expect(card.applied).toBe(page.filters!.applied); card.setVisible(true); });
// EU7 now owns a coordinated C2 view. This temporal fixture publishes only
// placeholder f/g figures, so that card must stop as incompatible, without GET.
fixture.detectChanges(); flushFigures(periods[1], cards().filter(card => !card.isEu7).length); http.expectNone(() => true);
// EU7 and the CaCu paired times own coordinated views. This temporal fixture publishes
// only placeholder f/g figures, so EU7 stops as incompatible without GET; the paired times
// ask /datos for the same shared period, including the partner hidden from the catalog.
fixture.detectChanges(); flushFigures(periods[1], cards().filter(card => !card.isEu7 && !card.tiempos).length);
const tiempos = http.match(r => r.url.endsWith('/datos'));
expect(tiempos.some(r => r.request.url === '/cacu/indicadores/cacu_eu_tiempo_reporte/datos')).toBe(domain === 'cacu');
for (const r of tiempos) { expect(r.request.params.get('periodos')).toBe(periods[1]); r.flush('', { status: 404, statusText: 'Missing' }); }
http.expectNone(() => true);
});
it('KPI secundarios sin datos no retroceden a otro periodo', () => {
request(periods[0]).flush(data(0, periods[0])); fixture.detectChanges();
@@ -128,7 +134,7 @@ describe.each(['tea', 'cacu', 'cama'] as const)('P0 autoridad temporal compartid
it('tema, ancho y representación no reinician el periodo ni la búsqueda', () => {
choose(); const applied = page.filters!.applied;
page.changeTema('oscuro'); window.dispatchEvent(new Event('resize')); fixture.detectChanges(); http.expectNone(() => true);
const card = cards().find(card => !card.isEu7)!;
const card = cards().find(card => !card.isEu7 && !card.tiempos)!;
card.setVisible(true); fixture.detectChanges(); flushFigures(periods[1], 1);
card.selectFigure('g'); fixture.detectChanges(); flushFigures(periods[1], 1);
expect(card.selectedFigure).toBe('g'); http.expectNone(() => true);