CaCu page: the opportunity strip is as it was; only the clinical section drops the empty cards
With the route chart the strip had lost its time cards. Those were not the ones to remove: they are the cards of the clinical indicators section (the times, IND1, EU13, risk by band), which stay out. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
</div>
|
||||
@if (resumen) { <app-tea-resumen-periodo [periodo]="resumen" [paneles]="kpiPanels()" /> }
|
||||
<!-- With the summary the panels keep loading the data, but their cards are not shown. -->
|
||||
<div class="kpi-grid" [class.kpi-grid-oculto]="resumen" [style.--kpi-count]="kpis.length + (dominio === 'cacu' ? (screeningRouteAvailable ? 0 : 2) : dominio === 'cama' ? 1 : 0)">
|
||||
<div class="kpi-grid" [class.kpi-grid-oculto]="resumen" [style.--kpi-count]="kpis.length + (dominio === 'cacu' ? 2 : dominio === 'cama' ? 1 : 0)">
|
||||
@for (card of kpis; track dominio + ':' + card.definition.id) {
|
||||
@if (card.pending) {
|
||||
<app-indicador-kpi-card [title]="card.definition.title" state="Integración pendiente"
|
||||
@@ -62,7 +62,7 @@
|
||||
[applied]="filters?.applied" [availability]="availability()" [initialPresentation]="false" />
|
||||
}
|
||||
}
|
||||
@if (dominio === 'cacu' && !screeningRouteAvailable) {
|
||||
@if (dominio === 'cacu') {
|
||||
<app-indicador-kpi-card title="Tiempo de tamizaje a tratamiento" state="Indicador no disponible" />
|
||||
<app-indicador-kpi-card title="Tiempo de diagnóstico a tratamiento" state="Indicador no disponible" />
|
||||
} @else if (dominio === 'cama') {
|
||||
|
||||
@@ -348,12 +348,9 @@ export class IndicadoresPage {
|
||||
const selection = this.filters?.applied.selection;
|
||||
return this.dominio === 'tea' && selection?.mode === 'explicit' && selection.periodos.length === 1 ? selection.periodos[0] : undefined;
|
||||
}
|
||||
// With the route chart, CaCu's strip keeps the cytology count: its times are drawn by the chart, so they get no card.
|
||||
get opportunityKpis() {
|
||||
const definitions = this.availableKpis;
|
||||
if (this.dominio !== 'cacu') return definitions;
|
||||
if (this.screeningRouteAvailable) return definitions.filter(definition => definition.contrato !== 'C3r');
|
||||
if (!definitions.length && !this.catalog().some(item => item.id === CACU_RESULTADO_KPI.id)) return definitions;
|
||||
if (this.dominio !== 'cacu' || (!definitions.length && !this.catalog().some(item => item.id === CACU_RESULTADO_KPI.id))) return definitions;
|
||||
// Keep the established KPI definitions and initial-period anchor intact.
|
||||
const diagnosis = definitions.findIndex(item => item.id === 'cacu_dias_toma_diagnostico');
|
||||
return [...definitions.slice(0, diagnosis < 0 ? definitions.length : diagnosis), CACU_RESULTADO_KPI,
|
||||
|
||||
@@ -43,6 +43,12 @@ describe('Ruta del tamizaje: página de CaCu', () => {
|
||||
for (const id of [...ROUTE_IDS, ...CACU_SIN_TARJETA]) expect(ids).not.toContain(id);
|
||||
expect(ids).toEqual(['cacu_eu7', 'cacu_confirmacion_citologia']);
|
||||
});
|
||||
it('con la ruta, la franja de oportunidad conserva sus tarjetas: solo se retiran las de la sección clínica', () => {
|
||||
// Fails if the opportunity strip loses a card when the route chart appears.
|
||||
abrir('cacu', [item('cacu_eu7', 'C2'), ...ROUTE_IDS.map(id => item(id))]);
|
||||
const titulos = [...fixture.nativeElement.querySelectorAll('.kpi-grid app-indicador-kpi-card h3')].map((h: HTMLElement) => h.textContent);
|
||||
expect(titulos).toEqual(['Pacientes evaluadas', 'Días de toma a resultado', 'Tiempo de tamizaje a diagnóstico', 'Tiempo de tamizaje a tratamiento', 'Tiempo de diagnóstico a tratamiento']);
|
||||
});
|
||||
it('si el catálogo no publica alguna de las siete, no hay gráfica y las medidas conservan sus tarjetas', () => {
|
||||
// Fails if the chart appears with a measure missing, or the cards of the others disappear anyway.
|
||||
abrir('cacu', [item('cacu_eu7', 'C2'), ...ROUTE_IDS.filter(id => id !== 'cacu_dias_toma_biopsia').map(id => item(id))]);
|
||||
|
||||
Reference in New Issue
Block a user