CaCu page: with the screening route there, no cards for the times, the unfigured proportions or the risk by band
Once the catalog publishes the route, the page keeps the cytology count, the cytology result and its confirmation, and the route chart; the times (also to treatment), IND1, EU13 and the risk by band are in the history. The route's explanatory note goes. Without the route the page is as before. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,11 +17,11 @@ import { applyGlobal, domainTypes, GlobalFilterState, IndicadoresMemory, pending
|
||||
import { IndicadorPeriodFilters } from './indicador-period-filters';
|
||||
import { IndicadorCatalogCard } from './indicador-catalog-card';
|
||||
import { esSocioConteos } from './indicadores-conteos-pareados';
|
||||
import { CACU_RESULTADO_KPI, CACU_TRATAMIENTO_KPIS, CAMA_FUERA_DEL_RESUMEN, ID_HISTOPATOLOGIA_CAMA, KPI_BY_DOMAIN, KPI_RESUMEN_TEA, KpiCardSlot, cacuPendingKpiCards, camaKpiCards } from './indicadores-kpi';
|
||||
import { CACU_RESULTADO_KPI, CAMA_FUERA_DEL_RESUMEN, ID_HISTOPATOLOGIA_CAMA, KPI_BY_DOMAIN, KPI_RESUMEN_TEA, KpiCardSlot, camaKpiCards } from './indicadores-kpi';
|
||||
import { TeaResumenPeriodo } from './tea-resumen-periodo';
|
||||
import { IndicadorKpiPanel } from './indicador-kpi-panel';
|
||||
import { IndicadorScreeningRoute } from './indicador-screening-route';
|
||||
import { ROUTE_IDS, ROUTE_ONLY_IDS } from './screening-route';
|
||||
import { CACU_SIN_TARJETA, ROUTE_IDS } from './screening-route';
|
||||
import { IndicadorKpiCard } from './indicador-kpi-card';
|
||||
import { figureApplied, independentFigurePeriods } from './indicadores-figure-selection';
|
||||
import { identityElementId, indicatorIdentity } from './indicadores-identities';
|
||||
@@ -342,18 +342,18 @@ export class IndicadoresPage {
|
||||
return this.dominio === 'cacu' && ROUTE_IDS.every(id => this.catalog().some(item => item.id === id));
|
||||
}
|
||||
// How many indicators the graphic section shows: all the catalog, except in CaMa, which draws only some of them.
|
||||
get availableKpis() {
|
||||
const definitions = this.dominio === 'cacu' ? [...this.kpisByDomain.cacu, ...CACU_TRATAMIENTO_KPIS] : this.kpisByDomain[this.dominio];
|
||||
return definitions.filter(definition => this.catalog().some(item => item.id === definition.id));
|
||||
}
|
||||
get availableKpis() { return this.kpisByDomain[this.dominio].filter(definition => this.catalog().some(item => item.id === definition.id)); }
|
||||
// TEA shows a summary paragraph instead of its cards for exactly one explicitly chosen period.
|
||||
get teaResumenPeriodo(): string | undefined {
|
||||
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' || (!definitions.length && !this.catalog().some(item => item.id === CACU_RESULTADO_KPI.id))) return definitions;
|
||||
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;
|
||||
// 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,
|
||||
@@ -362,8 +362,7 @@ export class IndicadoresPage {
|
||||
// What the KPI grid draws. CaMa adds explicit pending cards for opportunity indicators the catalog does not publish.
|
||||
get kpiCards(): KpiCardSlot[] {
|
||||
if (this.dominio === 'cama') return camaKpiCards(id => this.catalog().some(item => item.id === id));
|
||||
const cards = this.opportunityKpis.map(definition => ({ definition, pending: false }));
|
||||
return this.dominio === 'cacu' ? [...cards, ...cacuPendingKpiCards(cards.map(card => card.definition.id))] : cards;
|
||||
return this.opportunityKpis.map(definition => ({ definition, pending: false }));
|
||||
}
|
||||
private readonly catalogRequests = new Subject<void>();
|
||||
readonly catalog = signal<Indicador[]>([]);
|
||||
@@ -374,10 +373,11 @@ export class IndicadoresPage {
|
||||
// Stable presentation order. Pins no longer reorder the summary.
|
||||
readonly catalogOrder = computed(() => {
|
||||
const catalog = this.catalog();
|
||||
// The route chart draws its own measures: they get no card of their own once it is there.
|
||||
const route = this.screeningRouteAvailable ? ROUTE_ONLY_IDS : [];
|
||||
// CaCu's page draws the cytology result and the confirmation as cards, and the route chart. The times of the route
|
||||
// get no card of their own once the chart is there; the rest live in the history (they have no figure here).
|
||||
const hidden = this.screeningRouteAvailable ? [...ROUTE_IDS, ...CACU_SIN_TARJETA] : [];
|
||||
return this.dominio === 'cacu'
|
||||
? [...catalog.filter(item => item.id === 'cacu_eu7'), ...catalog.filter(item => item.id !== 'cacu_eu7' && !route.includes(item.id))]
|
||||
? [...catalog.filter(item => item.id === 'cacu_eu7'), ...catalog.filter(item => item.id !== 'cacu_eu7' && !hidden.includes(item.id))]
|
||||
: this.dominio === 'cama' ? this.cardsDeCama(catalog)
|
||||
: catalog.filter(item => !item.vistas || item.vistas.includes('resumen'));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user