Commit Graph

107 Commits

Author SHA1 Message Date
Angel Capetillo Zavala 7580319fc8 fix(cama): single vertical scroll in Análisis epidemiológico
The visually-hidden labels are absolutely positioned and had no positioned ancestor in the view, so they were laid out against the document and, with the table far down the page, gave the document its own vertical scroll next to the one of the page container. The view is now their containing block.
2026-11-14 07:56:33 -06:00
Angel Capetillo Zavala 7a2f0f42a9 feat(cama): Análisis epidemiológico frame with category cards, cut-off bar and the BI-RADS count 2026-11-14 00:14:53 -06:00
Angel Capetillo Zavala 01d6e71f07 Accept 64-bit patient identifiers 2026-11-13 18:23:45 -06:00
Angel Capetillo Zavala 3b246b4f1f Identify follow-up patients by pac_id
Rows name their patient with pac_id (a decimal string) or the legacy
id_seudonimo. pac_id wins; an invalid pac_id is never replaced by the
legacy field, and a page that repeats a patient or mixes both fields is
not drawn or exported. The table, patient record, PDF and spreadsheet
follow the announced identifier column and label. CaCu requests risk
only with a pac_id.
2026-11-13 18:19:27 -06:00
Angel Capetillo Zavala caf5f954b7 Proxy patient routes without the cohort access token 2026-11-13 18:19:26 -06:00
edgar edb868f372 Patient record reads its risk from GET /cacu/pacientes/<pac_id>/riesgo, by the id the follow-up list shows 2026-11-13 17:29:54 -06:00
Angel Capetillo Zavala 2e0938628c Merge commit '0acee49de2098b2f9d06607f7d374091a5f4b764' into dashboard-test
# Conflicts:
#	src/app/features/indicadores/etiquetas-cohorte.ts
#	src/app/features/indicadores/indicadores-seguimiento-cohorte.spec.ts
2026-11-13 15:45:55 -06:00
Angel Capetillo Zavala 3783505dbd Use the regular window for breast follow-up 2026-11-13 15:44:01 -06:00
Angel Capetillo Zavala 0acee49de2 fix(cama): regular follow-up opens on the 3-month window and adopts the cohort the server returns
The follow-up list asks for the regular window without quoting a revision; when the answer
names a cohort the next pages and the files quote it. A new cut-off or a revision that changed
under the list is asked for again without the old revision (once, then reported). Leaving the
analysis' selection returns to the regular window. A server that does not answer from the cohort
keeps the plain list.

Histopathology codes are written with the catalog labels (Benigno, Carcinoma in situ, Carcinoma
invasor, Desconocido); other values stay as they arrive.
2026-11-13 15:43:02 -06:00
Angel Capetillo Zavala 18e9260705 Keep breast follow-up on the selected cohort 2026-11-13 15:32:39 -06:00
Angel Capetillo Zavala 3f4cf2217f Merge commit '7971a49dcda5f9759f6cf4693c1c725153172edb' into dashboard-test 2026-11-13 15:23:06 -06:00
Angel Capetillo Zavala 7971a49dcd 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.
2026-11-13 15:18:11 -06:00
Angel Capetillo Zavala c06cce20df Pass synthetic cohort access through the server proxy 2026-11-13 15:17:14 -06:00
Angel Capetillo Zavala 2b0f6dfbed feat(cama): readable BI-RADS and age labels, the biopsy report date, and no export of a list that does not match its group
Contract review against WebApi 1d5f1e0 (webapi/cama_analysis.py, cama_cohort.py, docs/cama-cohort-api.md).

- The cohort's list is rewritten once on arrival so the table, the record and the PDF/XLSX show
  "BI-RADS 5" and "50 a 59 años" (also "Menores de 40 años", "70 años o más", "Sin dato"); the codes
  stay in `<clave>_codigo` and in the filter options, which are what the requests send. Only codes
  whose meaning the API's own code confirms are labelled; biopsy grades are left as they arrive.
- The record calls the biopsy date what the list calls it ("Fecha de reporte"): in the cohort it is
  the date of the biopsy report, which can be known while its result is not.
- With the same cohort revision, cut-off and filter the aggregate and the list are counted from the
  same rows, so a different total breaks the contract: the list shows an alert and its PDF/XLSX
  buttons are disabled.
- When no category is published the analysis says so and keeps "No publicado": the answer cannot
  tell an empty cohort from categories under the threshold.
- Tests: the chosen cut-off reaches the aggregate, the list, the record and every page of the file.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 14:29:45 -06:00
Angel Capetillo Zavala 1d43ebff3b feat(indicadores): Análisis epidemiológico tab for breast cancer, and the way back from Seguimiento
A CaMa-only tab between Histórico and Seguimiento shows how many patients of the cohort fall in
each BI-RADS category at a cut-off (GET /cama/analisis/indicadores?corte=), as the cohort API
publishes it. It is a descriptive count, not an incidence or a survival estimate.

- Loading, pending (404), unavailable (503), error and out-of-contract states; the answer is
  validated as an aggregate (no patient rows, nothing published under the threshold).
- A suppressed category is drawn grey and says why; only a published category opens its patients
  in Seguimiento ("Ver pacientes" or a click on its bar).
- The page keeps the selection while the user moves between tabs, clears it on a domain change, and
  "Volver al análisis" returns to the analysis as it was, with the scroll and the focus on the
  control that opened the list, and no new request.
- Tables and figure scroll inside their own region at phone width. CaCu and TEA keep their three
  sections. Curves, the heatmap and the cohort diagnostics of the prototype wait for an API.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 14:07:34 -06:00
Angel Capetillo Zavala eb92b99a1d feat(seguimiento): list opened on a group of the cohort, with its window, cut-off, cohort and revision
The follow-up list of breast cancer can now be opened on a selection that the analysis names: the
whole cohort (window 0, offered only while the selection is active), the cut-off the analysis was
computed at, the group's filter, and the cohort with its revision, which the server requires and
repeats.

- A cohort's list quotes `cohorte`, `escenario` and `revision` (not filters) on every page and in the
  export; an answer that loses a filter, changes the window or the cut-off, or is another cohort or
  revision is not drawn and cannot be exported.
- A new selection cancels the previous request; while it loads, and when it fails (403, 409, 503),
  no list of the previous query stays on screen.
- Inside the cohort the form refines the same cohort and says so; "Quitar selección" leaves it.
- "Volver al análisis" and a note when the list holds a different number of patients than the
  analysis counted.
- PDF and XLSX state the selection, the cut-off and "Toda la cohorte"; the file name tells a
  selection apart; an export in progress is cancelled, and a finished one discarded, when the query
  on screen changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 14:07:31 -06:00
Angel Capetillo Zavala ee75e7a2a0 Chore: Visual fix. 2026-11-13 00:01:18 -06:00
Angel Capetillo Zavala b84d428814 Add breast cancer follow-up reports and patient record 2026-11-12 22:40:21 -06:00
Angel Capetillo Zavala 17a91d3924 style(indicadores): CaMa header, simplified general filters and collapsible suppressed-data notes
CaMa header reads "Sistema TNM de clasificación tumoral" without the top subtitle.
The general filters block is titled "Filtros generales" and drops the scope
description and the applied-filter summary. In the Histórico the suppressed-data
text becomes a collapsed footnote (details/summary) with the same full text.
CaCu and TEA headers and filters are unchanged.
2026-11-12 13:20:04 -06:00
Angel Capetillo Zavala cda3563184 Verify follow-up against final API responses 2026-11-12 11:57:48 -06:00
Angel Capetillo Zavala 7a6f87d141 Remove demonstration notices from CaMa views 2026-11-12 11:57:47 -06:00
Angel Capetillo Zavala 78313adb4a style(indicadores): CaMa histopathology rates stay readable at phone width
The rates figure lets the category labels size their own margin, shortens the
axis title, keeps few ticks and wraps «BI-RADS 4 sin subtipo» when the window is
600 px wide or less, and is redrawn when the window crosses that width. Values
and states are unchanged. The reading text keeps the capitals of a category
code inside a sentence («lesión de riesgo (B3)»).
2026-11-12 11:35:27 -06:00
Angel Capetillo Zavala 7dc420773f feat(indicadores): CaMa detection and result-to-diagnosis indicators wired with real payloads
CAM-01 and CAM-02 already had their KPI cards and history panels waiting for the
catalog; they are now covered with the answers WebApi gives for the synthetic
base, both visible (lowered suppression threshold) and suppressed (normal
threshold). Once published they draw only their KPI card in the summary, as the
mockup does, instead of an extra generic figure card; their evolution stays in
the history.

The stacked history figure now keeps a category the catalog announces even when
no row carries it, so a missing category is named under the figure instead of
silently disappearing. The integration specs also cover the summary and the
history with CAM-01, CAM-02 and CAM-03 published.
2026-11-12 11:35:27 -06:00
Angel Capetillo Zavala 552e2c194f feat(indicadores): CaMa histopathology by BI-RADS drawn from the published matrix
The card for cama_histopatologia_birads now shows rates with their Wilson
interval per BI-RADS category and a two-ring donut of the biopsy result, with
group and category selection, period navigation and the published values table.
A pure adapter turns the stratified C2 response into rows and figures; the view
only asks for the data and draws what the adapter returns.

BI-RADS 4 is a row of its own. The denominator is benign, B3, in situ and
invasive; no biopsy and no data are reported apart. A published zero is a zero,
a suppressed cell is suppressed, and a cell or stratum the response does not
carry is unavailable, never zero: no rate or donut total is drawn over an
incomplete matrix. The card keeps its place first in the summary and stays
pending while the catalog does not publish the indicator.

The `birads` stratum is added to the accepted dimensions of the data request.
The CaCu cytology confirmation view is not touched.
2026-11-12 11:35:27 -06:00
Angel Capetillo Zavala 8f01f8693d feat(indicadores): CaMa follow-up tab drawn from the announced filters and columns
The tab asks GET /cama/seguimiento when it is first opened and draws the form,
the table, the details and the pagination from what the answer announces, so a
later change of source behind the endpoint needs no change here. It shows the
demonstration notice when the answer is simulated, a clear pending state while
the endpoint is not published (404 on the first page), and error, empty and
retry states. Stale requests are cancelled.

The sections, CaCu and initial-integration specs now expect the CaMa request
when the tab opens.
2026-11-12 11:35:27 -06:00
Angel Capetillo Zavala ad8444a788 feat(indicadores): generic follow-up client with a strict response contract
GET /<dominio>/seguimiento with the window, page, size, cut-off date and the filters the list announces. Filters and columns come with the answer; only demonstration answers (simulado: true) are accepted and anything outside the contract is rejected before it reaches a view. The fixture is the synthetic answer of the reference prototype and is used by tests only.
2026-11-12 11:35:27 -06:00
Angel Capetillo Zavala f78db1ae37 feat(indicadores): CaMa KPI cards show only their own line, as in the reference
The kit's notes are no longer appended to CaMa's opportunity cards (they stay in the figure footers, Histórico and Datos y definiciones). The four cards measure 308 x 220 px at 1366 px, like the reference. TEA keeps its notes and CaCu already hid them.
2026-11-12 11:35:27 -06:00
Angel Capetillo Zavala 0914b8db23 feat(indicadores): CaMa summary keeps the paired card and a pending histopathology card
Confirmation, screening-to-diagnosis and exam-to-result cards leave the summary (they stay in Histórico and Datos y definiciones). The histopathological result by BI-RADS keeps its place and structure as a pending card, with no figure or number, until the catalog publishes its indicator. The patients KPI uses the reference's wording.
2026-11-12 11:35:26 -06:00
Angel Capetillo Zavala 8aa66c6277 style(indicadores): CaMa's filter block as one compact row, as in the reference
Fields and Aplicar at 40 px, tighter padding and a small description. Only the CaMa block changes; CaCu and TEA keep their filters.
2026-11-12 11:35:26 -06:00
Angel Capetillo Zavala 1e1999f264 style(indicadores): Roboto headings, 4 px corners and the reference's title and card sizes, scoped to the indicators pages
Tokens are set on body when the indicators header is present, so menus, selects and dialogs share them; the other routes keep Rajdhani and their shapes.

(cherry picked from commit f5103b483d9d7188b4feffe91beda38d997004d4)
2026-11-12 01:43:27 -06:00
Angel Capetillo Zavala e95c175f9b fix(shell): load the domain menu deferred and let the header wrap on narrow screens
The menu and its overlay were in the initial bundle of every route (+183 kB); they now load in their own chunk, with a same-size placeholder. On phones the title moves to a second row instead of being squeezed beside the selector.

(cherry picked from commit 2ccddf80dbbe41a328281fcdc1c95ebe421f4191)
2026-11-12 01:43:27 -06:00
Angel Capetillo Zavala ff03a88ea0 feat(indicadores): domain navigation moves to the header; searchVisible reads the catalog before the domain
The in-page domain buttons are removed, since the header selector replaces them. Also fixes a computed that, after a visit to CaMa, never became true again, so CaCu and TEA lost their search box when switched to from CaMa.

(cherry picked from commit 3678c3653b33fcb98ba2334ca8f03f838dc86440)
2026-11-12 01:43:27 -06:00
Angel Capetillo Zavala d761a6fb1a feat(shell): indicators header with the platform title and a domain selector
On /indicadores/<dominio> the header shows «Plataforma de Indicadores» and a menu button with the current domain (TEA, CaCu, Cáncer de mama) that links to the other two through the router. Institutional routes keep their breadcrumb header.

(cherry picked from commit 79a18fd7a8ed1a3a58201e7cc24c9692b53dbc47)
2026-11-12 01:43:27 -06:00
Angel Capetillo Zavala 2982d482bf feat(indicadores): CaMa history tab with the charts the published contracts support
A Histórico tab between Resumen and Seguimiento, for CaMa only: monthly or semestral interval, how many periods to show, and a custom period dialog. Counts are stacked, rates draw their confidence band and medians their quartile band; suppressed periods are shaded and listed, and a rate over no denominator or a median over no observations is no value. Five charts use published indicators; the three whose indicator the catalog does not publish are drawn as pending panels.

(cherry picked from commit 268d7443e0a89da8d6bc67ecb2b5db2715236f93)
2026-11-12 01:43:26 -06:00
Angel Capetillo Zavala 5e16f5454b fix(indicadores): reconcile CaMa period selection and contracts 2026-11-12 00:39:57 -06:00
Angel Capetillo Zavala ce3ed34fbf feat(indicadores): CaMa paired card of mammograms and patients by BI-RADS
One card draws the exams by category as a donut and, per BI-RADS family, the patients next to the exams. Patients come from cama_birads_456_paciente (each patient once per period, in the category of the most severe exam), so its exclusive categories are added within that indicator only, for the verified version 0.2.0; other versions, suppressed or missing cells leave the figure unknown. No exams-per-patient ratio is computed and patients are never derived from exams. The patients' indicator has no card of its own while the exams' one is published.

(cherry picked from commit b7bafd178896cb2715049d5c8293185f31391c92)
2026-11-12 00:29:14 -06:00
Angel Capetillo Zavala d159067efd feat(indicadores): CaMa clinical section heading and counter, without search, pins, navigation or representation selector
CaMa's graphic section reads «Indicadores clínicos» and counts the indicators it draws. The search box, pins, floating navigation, representation selector and figure count are not drawn for CaMa; CaCu and TEA keep them.

(cherry picked from commit e54ee5a55aa3722f6895300fa7e8cefb28f12ebb)
2026-11-12 00:29:14 -06:00
Angel Capetillo Zavala 7b8fd9e01d feat(indicadores): CaMa labels, single-period filters and the four-card strip
CaMa reads «cáncer de mama» everywhere on the indicators page and uses the compact filter: interval, one period and Aplicar on one row, without the mode selector, the multiple selection or the editing summaries. The opportunity strip is the four cards only, and the biopsy distribution card is no longer drawn in the summary (it stays in Datos y definiciones). Other domains keep their filter and strip.

(cherry picked from commit 7c9dcf634e5870fec35ab96347b0863b2e3bb86e)
2026-11-12 00:29:08 -06:00
Angel Capetillo Zavala 8a3f68df6b fix(indicadores): guard invalid C1 denominators and preserve status 2026-11-11 23:56:32 -06:00
Angel Capetillo Zavala bc75c058e1 feat(indicadores): CaMa's four opportunity cards, pending where the catalog lacks the indicator
Cards: patients with BI-RADS 4, 5 and 6, histopathological detection rate, screening to result and result to diagnosis times. The detection rate and the result-to-diagnosis time are not published by the catalog yet, so they are drawn as explicit pending cards and are queried once the catalog lists them. cama_eu38a is added to the CaMa KPIs.
2026-11-11 23:56:32 -06:00
Roberto Treviño Cervantes f4d2a3e85f add bitacora page, self-hosted fonts/icons, review fixes for the install package 2026-10-30 11:19:34 -06:00
Roberto Treviño Cervantes 8c63ed83ac preliminary release 2026-10-29 12:14:56 -06:00
Roberto Treviño Cervantes e6e6fb7210 preliminary release 2026-10-29 12:12:15 -06:00
angel 82efba35cb Merge pull request 'Feature/eu7 transiciones animadas' (#8) from feature/eu7-transiciones-animadas into dev
Reviewed-on: http://10.0.10.41:3000/ISSSTELEON/WebApp/pulls/8
2026-10-28 17:18:12 +00:00
Angel Capetillo Zavala 26fe1ccbb3 feat(cacu): preparar interfaz de riesgo individual de paciente 2026-10-28 10:36:58 -06:00
Angel Capetillo Zavala 94c63c460c feat(eu7): incorporar transiciones animadas en dona y barras 2026-10-28 09:45:00 -06:00
angel 05a9967906 Merge pull request 'feat(indicadores): integrar ajustes CaCu, ficha de paciente y mejoras de navegación' (#7) from feature/detalle-paciente-cacu into dev
Reviewed-on: http://10.0.10.41:3000/ISSSTELEON/WebApp/pulls/7
2026-10-27 21:26:28 +00:00
Angel Capetillo Zavala 1c0bdf6184 feat(indicadores): completar ficha CaCu y navegación clínica 2026-10-27 14:46:51 -06:00
Roberto Treviño Cervantes 51517ddf61 integrating latest dashboard changes 2026-10-26 01:42:32 -06:00
edgar 70aa739f97 Bitácora: IND1 ya no cita kpi_catalog.yaml en la ficha
CSO5.5
2026-10-25 21:25:26 +00:00