Merge origin/dashboard-test: CaMa wired to the published catalog, with the mock's views kept

dashboard-test is the base for every CaMa feature both branches built; this
branch's TEA and CaCu work (from the TEA mock) and its later CaMa views are
kept on top of it.

How:
- From dashboard-test: the opportunity strip with pending cards
  (camaKpiCards, CAMA_OPORTUNIDAD_KPIS), the histopathology view drawn from
  the published BI-RADS matrix, the pending histopathology card, the
  follow-up table component (app-seguimiento-tabla), the paired BI-RADS
  counts, the deferred domain selector in the header, the compact filter row
  for CaMa, the quiet «Disponible» state and the stricter KPI rules (no rate
  without a denominator, no median without observations).
- Kept from this branch: the single-period filters and the indicator
  selector of every domain (instead of the side navigation and «Modalidad»),
  TEA's Histórico grouping and summary paragraph, CaCu's views, the
  catalog-driven scenario and confirmation pickers, the Análisis tab, no
  pins or figure count below five indicators, and no representation
  selector on the cards.
- Histórico: this branch's component, which serves TEA and CaMa, with
  dashboard-test's fixed CaMa panel list (HISTORICO_CAMA) and pending
  panels; figures merged (dashboard-test's stricter series rules plus the
  shared scales, EEG colours and in-process chart of TEA).
- Specs: this branch's for shared components; dashboard-test's for its CaMa
  components. Expectations that contradicted the kept design (TEA without
  Histórico, «Modalidad», side navigation, four entries in
  KPI_BY_DOMAIN.cama) now state the merged behaviour.

Implications:
- CaMa search and pins never show; its cards are what the summary draws.
- The four CaMa opportunity cards are pending until the catalog publishes
  their indicator; the mock publishes all four.
- The histopathology view still has its label buttons and inner labels;
  this branch's expandable donut for CaMa is no longer used.
This commit is contained in:
rockdrigo
2026-11-12 13:35:39 -06:00
98 changed files with 5383 additions and 1106 deletions
@@ -5,6 +5,9 @@
}
<div [hidden]="pacienteDetalle.estado().tipo !== 'cerrado'">
<h2>Seguimiento de {{ domainLabel }}</h2>
@if (dominio === 'cama') {
<app-seguimiento-tabla [dominio]="dominio" [active]="active" />
} @else {
<form (ngSubmit)="apply()">
<label>Fecha de corte <input name="corte" type="date" [(ngModel)]="draft.corte" /></label>
<label>Ventana de meses <select name="meses" [(ngModel)]="draft.meses">
@@ -16,12 +19,6 @@
@for (s of statuses; track s.codigo) { <option [value]="s.codigo">{{ s.etiqueta }}</option> }
</select></label>
}
@for (f of filtrosTabla; track f.clave) {
<label>{{ f.etiqueta }} <select [name]="'filtro-' + f.clave" [attr.name]="'filtro-' + f.clave" [(ngModel)]="filtrosDraft[f.clave]">
<option [ngValue]="undefined">Todos</option>
@for (o of f.opciones; track o.codigo) { <option [value]="o.codigo">{{ o.etiqueta }}</option> }
</select></label>
}
@if (dominio === 'tea') {
<label>Grupo de edad <select name="grupo_edad" [(ngModel)]="draft.grupo_edad">
<option [ngValue]="undefined">Todos</option>
@@ -91,22 +88,6 @@
</tbody>
</table>
</div>
} @else if (tablaData; as response) {
<div class="tracking-table" role="region" aria-label="Lista de seguimiento de demostración" tabindex="0">
<table>
<caption>Resultados disponibles por paciente</caption>
<thead><tr>@for (c of response.columnas; track c.clave) { <th scope="col">{{ c.etiqueta }}</th> }</tr></thead>
<tbody>
@for (item of response.items; track item['id_seudonimo']) {
<tr [attr.data-paciente]="item['id_seudonimo']">
@for (c of response.columnas; track c.clave) {
<td>{{ valorTabla(item[c.clave]) }}@for (d of detallesTabla(c); track d.clave) { @if (item[d.clave] !== null && item[d.clave] !== undefined) { <small>{{ d.etiqueta }}: {{ valorTabla(item[d.clave]) }}</small> } }</td>
}
</tr>
} @empty { <tr><td [attr.colspan]="response.columnas.length">No hay registros para los filtros aplicados.</td></tr> }
</tbody>
</table>
</div>
} @else if (data; as response) {
<div class="tracking-table" role="region" aria-label="Lista de seguimiento de demostración" tabindex="0">
<table>
@@ -132,4 +113,5 @@
<button type="button" [disabled]="response.paginacion.page >= response.paginacion.total_pages" (click)="navigate(response.paginacion.page + 1)">Siguiente</button>
</nav>
}
}
</div>