CaCu follow-up: CASO status with CIS, per-status probabilities, and a cycle that estimates with every production scenario #19

Merged
edgar merged 6 commits from integration/cacu-197-conciliacion into dev 2026-11-22 23:25:35 -06:00
Member

What changes

  • Follow-up status: CASO is a patient with a cancer biopsy, carcinoma or in situ (cacu.seguimiento.caso.grados).
  • Follow-up list: each patient's latest biopsy and probabilities, ordered by one of them; a case's survival is 1 at 0 years.
  • Import: a patient's date of death.
  • Cycle: the estimate step scores each cohort with every scenario that has a version in production in the registry, one batch per model, instead of a fixed list. A cohort can carry several estimators; estimating the same build again does not duplicate.

Tests

uv run pytest -q tests/test_live_estimators.py tests/test_orquestacion_riesgos.py tests/test_orquestacion_pasos.py

## What changes - **Follow-up status:** CASO is a patient with a cancer biopsy, carcinoma or in situ (`cacu.seguimiento.caso.grados`). - **Follow-up list:** each patient's latest biopsy and probabilities, ordered by one of them; a case's survival is 1 at 0 years. - **Import:** a patient's date of death. - **Cycle:** the `estimate` step scores each cohort with every scenario that has a version in production in the registry, one batch per model, instead of a fixed list. A cohort can carry several estimators; estimating the same build again does not duplicate. ## Tests `uv run pytest -q tests/test_live_estimators.py tests/test_orquestacion_riesgos.py tests/test_orquestacion_pasos.py`
edgar added 6 commits 2026-11-22 23:24:16 -06:00
`pac_fecha_defuncion` was dropped on import, so `persona.fecha_defuncion` and the timeline's `defuncion` fact were
always empty in CaCu and the survival scenario trained with no deaths. CaMa's schema already carried it.
A biopsy reported with a grade of `cacu.seguimiento.caso.grados` (CARCINOMA, provisional) by the reference makes the
patient a case: the status wins over every other, and what is followed for her is survival. Only the follow-up list
reads this rule; the measures' stratum in dbt is unchanged.
Each row carries the patient's latest biopsy reported by the cut-off and her current probability of LIEAG+, of cancer
and, for a case, of surviving (the complement of the survival model's death, interval swapped) at every horizon, from
the confirmed batches her record shows. `orden` sorts the whole list, not a page, by the most recent study or by one
of those probabilities at `horizonte`; `horizontes_disponibles` names the horizons the models give.
The scenarios come from the registry instead of a fixed list, and a cohort can carry several estimators.
edgar merged commit bf93a5fff9 into dev 2026-11-22 23:25:35 -06:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ISSSTELEON/WebApi#19