feat(cama): regular follow-up read from the cohort, with the revision refreshed on a new cut-off

The follow-up tab of breast cancer now reads the cohort the analysis publishes: it asks for the
cohort's revision at today's cut-off and lists the whole cohort quoting it. Where the server does
not publish the cohort (404 or 503 on its aggregate) the plain follow-up list is read.

- Another cut-off in the form asks for that cut-off's revision before the list; a revision that
  changes under the list (409) is asked for again once and the same query repeated, and a conflict
  that persists is reported.
- "Quitar selección" returns to the whole cohort instead of another source.
- An empty whole cohort says "Sin pacientes para el corte seleccionado"; filters and windows keep
  the text of the filters.
- Filters, cut-off, page and rows are kept while a record is opened and closed.
- Page specs that open CaMa follow-up answer the aggregate first.
This commit is contained in:
Angel Capetillo Zavala
2026-11-13 15:18:11 -06:00
parent 2b0f6dfbed
commit 7971a49dcd
10 changed files with 285 additions and 41 deletions
@@ -84,6 +84,8 @@ describe.each(['tea', 'cacu', 'cama'] as const)('P0 autoridad temporal compartid
const ongoing = request(periods[0]);
for (const section of ['seguimiento', 'datos', 'resumen', 'datos'] as const) {
page.changeSection(section); fixture.detectChanges();
// Seguimiento of breast cancer asks for the cohort's revision first; without the cohort published it reads the plain list.
for (const req of http.match(r => r.url.endsWith('/analisis/indicadores'))) req.flush({}, { status: 404, statusText: 'Pending' });
for (const req of http.match(r => r.url.endsWith('/seguimiento'))) req.flush({}, { status: 404, statusText: 'Pending' });
expect(page.initialPeriodState()).toBe('loading');
expect(ongoing.cancelled).toBe(false);
@@ -104,6 +106,8 @@ describe.each(['tea', 'cacu', 'cama'] as const)('P0 autoridad temporal compartid
editor().select([periods[2]]); fixture.detectChanges();
for (let i = 0; i < 3; i++) for (const section of ['seguimiento', 'datos', 'resumen'] as const) {
page.changeSection(section); fixture.detectChanges();
// Seguimiento of breast cancer asks for the cohort's revision first; without the cohort published it reads the plain list.
for (const req of http.match(r => r.url.endsWith('/analisis/indicadores'))) req.flush({}, { status: 404, statusText: 'Pending' });
for (const req of http.match(r => r.url.endsWith('/seguimiento'))) req.flush({}, { status: 404, statusText: 'Pending' });
expect(page.filters).toBe(state); expect(page.filters!.applied).toBe(applied);
expect(editor().selectedPeriods).toEqual([periods[2]]);