Merge origin/rebuild into parity/T1-merge (WebApp)

rebuild's shell, auth and non-TEA pages; tea/parity's TEA pages on tea/parity's API.
- Routes: rebuild's signed-in tree; the TEA risk page joins it (domainAllowed reads the
  route's data domain when the path has no :domain).
- Indicadores: rebuild's header and its generic Resumen/Trazabilidad/Definiciones tabs
  (TEA as the reference page, fed by tea/parity's measures); TEA Seguimiento and Análisis
  de riesgo render tea/parity's tea-list inside rebuild's tab-seguimiento/tab-riesgos,
  which keep rebuild's CaCu/CaMa lists and patient search. rebuild's tab-riesgos-tea read
  rebuild's TEA Patient extensions, which are gone with its backend; tea-list already
  shows that list from tea/parity's FHIR search, so it is deleted rather than ported
  (its look is the base for T8/T9).
- Paciente: rebuild's record for CaCu/CaMa; TEA delegates to tea/parity's TeaRecord.
  rebuild's inline TEA sections read its EEG detail endpoint and are removed.
- Gobernanza: tea/parity's page (execution, models with checks/lineage, bundles, training,
  studies, preview) until T13; model headings use rebuild's model titles. figures.ts:
  rebuild's scenarios (drawn in the record) plus tea/parity's association forest.
- plot.ts: rebuild's layout helpers on tea/parity's partial Plotly bundle.
- Conectar: rebuild's KINDS/HELP with an entry for tea/parity's edf node.
- Dead code removed: measures boxes/sankey (tea/parity's old TEA tab), eeg-labels
  headMap/byDeviation/LEVEL_NAMES/METRIC_NAMES (rebuild's TEA record), e2e/layout.ts.
- e2e: tea/parity's TEA cases, signed in; rebuild's CaCu/CaMa/site cases need their
  hospitals loaded and come back with the page suite (T16).
- openapi.json and src/app/api: regenerated in the next commit.
This commit is contained in:
2026-11-30 23:56:25 -06:00
110 changed files with 7844 additions and 3042 deletions
+31 -2
View File
@@ -8,8 +8,10 @@ import { MatSelectModule } from '@angular/material/select';
import { RouterLink } from '@angular/router';
import type { Bundle } from 'fhir/r4';
import { Fhir } from '../fhir';
import { rows, windowStart } from './follow-up';
import { Row, rows, windowStart } from './follow-up';
import { PatientSearch, patientSearch } from './patient-search';
import { TeaList } from './tea-list';
import { Loading } from '../loading';
import { name } from './measures';
const STATUSES = ['case', 'pre_colposcopy', 'post_colposcopy', 'post_treatment'];
@@ -19,8 +21,10 @@ const STATUSES = ['case', 'pre_colposcopy', 'post_colposcopy', 'post_treatment']
@Component({
selector: 'app-tab-riesgos',
imports: [
PatientSearch,
DecimalPipe,
FormsModule,
Loading,
MatButtonModule,
MatFormFieldModule,
MatInputModule,
@@ -41,6 +45,8 @@ export class TabRiesgos {
protected readonly horizon = signal(5);
protected readonly sort = signal('-recent');
protected readonly size = signal(20);
/** "Buscar paciente": her name, CURP or record number, as applied. */
protected readonly search = signal('');
/** A page the user moved to (`next`/`previous`), else the first. */
private readonly moved = signal<Bundle | undefined>(undefined);
@@ -54,6 +60,7 @@ export class TabRiesgos {
: {
domain: this.domain(),
'follow-up-window': this.window(),
...patientSearch(this.search()),
'follow-up-cutoff': this.cutoff() || undefined,
'follow-up-status': this.status() || undefined,
'risk-horizon': this.horizon(),
@@ -70,7 +77,9 @@ export class TabRiesgos {
},
});
protected readonly loading = signal(false);
protected readonly page = computed(() => this.moved() ?? this.first.value());
protected readonly page = computed(
() => this.moved() ?? (this.first.hasValue() ? this.first.value() : undefined),
);
/** The cut-off as applied (the server's default when none is given). */
protected readonly applied = computed(() => {
const self = this.page()?.link?.find((l) => l.relation === 'self')?.url;
@@ -89,6 +98,26 @@ export class TabRiesgos {
});
protected readonly error = computed(() => this.first.error());
/** "Ventana consultada": the window's first day for the applied cut-off. */
protected readonly start = computed(() =>
this.applied() ? windowStart(this.applied(), this.window()) : '',
);
protected readonly pageNumber = computed(() => Math.floor(this.offset() / this.size()) + 1);
protected readonly pageCount = computed(() =>
Math.max(1, Math.ceil((this.page()?.total ?? 0) / this.size())),
);
/** "Estudio más reciente": her latest cytology or HPV sample. */
protected latest(row: Row): string | undefined {
return [row.cytology?.date, row.hpv?.date]
.filter((d) => !!d)
.sort()
.at(-1)
?.slice(0, 10);
}
protected retry(): void {
this.first.reload();
}
protected has(relation: 'next' | 'previous'): boolean {
return !!this.page()?.link?.some((l) => l.relation === relation);
}