feat(cama): TEA tabs, follow-up list from announced columns and histopathology donut by BI-RADS category
This commit is contained in:
@@ -12,6 +12,7 @@ import { MatSelect, MatSelectModule } from '@angular/material/select';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { catchError, first, map, of, startWith, Subject, switchMap, takeUntil } from 'rxjs';
|
||||
import { Dominio, DOMINIOS, isDominio, Indicador, Tema } from './indicadores.models';
|
||||
import { vistaEscenario } from './indicadores-eu7-escenario';
|
||||
import { IndicadoresService } from './indicadores.service';
|
||||
import { applyGlobal, domainTypes, GlobalFilterState, IndicadoresMemory, pending, validDraft } from './indicadores-memory';
|
||||
import { IndicadorPeriodFilters } from './indicador-period-filters';
|
||||
@@ -35,8 +36,9 @@ const SECTIONS: readonly { id: DashboardSection; label: string }[] = [
|
||||
{ id: 'seguimiento', label: 'Seguimiento' },
|
||||
{ id: 'datos', label: 'Datos y definiciones' },
|
||||
];
|
||||
// Only TEA has enough periods for its history to say anything.
|
||||
const TEA_SECTIONS: readonly { id: DashboardSection; label: string }[] = [SECTIONS[0], { id: 'historico', label: 'Histórico' }, SECTIONS[1], SECTIONS[2]];
|
||||
// Domains with enough periods for their history to say anything.
|
||||
const CON_HISTORICO: readonly Dominio[] = ['tea', 'cama'];
|
||||
const HISTORICO_SECTIONS: readonly { id: DashboardSection; label: string }[] = [SECTIONS[0], { id: 'historico', label: 'Histórico' }, SECTIONS[1], SECTIONS[2]];
|
||||
|
||||
@Component({
|
||||
selector: 'app-indicadores-page',
|
||||
@@ -45,7 +47,8 @@ const TEA_SECTIONS: readonly { id: DashboardSection; label: string }[] = [SECTIO
|
||||
styleUrl: './indicadores-page.scss',
|
||||
})
|
||||
export class IndicadoresPage {
|
||||
get sections() { return this.dominio === 'tea' ? TEA_SECTIONS : SECTIONS; }
|
||||
get sections() { return this.conHistorico ? HISTORICO_SECTIONS : SECTIONS; }
|
||||
get conHistorico() { return CON_HISTORICO.includes(this.dominio); }
|
||||
readonly activeSection = signal<DashboardSection>('resumen');
|
||||
readonly fichaPacienteAbierta = signal(false);
|
||||
setFichaPacienteAbierta(open: boolean) {
|
||||
@@ -310,9 +313,10 @@ export class IndicadoresPage {
|
||||
// Stable presentation priority; pins still take precedence in the grid.
|
||||
readonly catalogOrder = computed(() => {
|
||||
const catalog = this.catalog();
|
||||
return this.dominio === 'cacu'
|
||||
? [...catalog.filter(item => item.id === 'cacu_eu7'), ...catalog.filter(item => item.id !== 'cacu_eu7')]
|
||||
: catalog.filter(item => !item.vistas || item.vistas.includes('resumen'));
|
||||
// The interactive views go first.
|
||||
const resumen = catalog.filter(item => !item.vistas || item.vistas.includes('resumen'));
|
||||
const primero = (item: Indicador) => !!vistaEscenario(this.dominio, item);
|
||||
return [...resumen.filter(primero), ...resumen.filter(item => !primero(item))];
|
||||
});
|
||||
readonly selectedIndicators = computed(() => this.indicatorSelection() ?? this.catalog().map(item => item.id));
|
||||
readonly selectionSummary = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user