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.
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.
`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.
Two decisions of one batch at the same moment (a double click reaching both workers) wrote the same evaluation
version and the second surfaced as a server error.
The cytology sampled on the risk's index date gives its squamous, glandular and HPV results in the extension
`resultados-indice`, which the record words its sentence with. CaCu's outcome codes `cin2` and `cancer` get labels.
The patient's Bundle holds the current batch of each outcome (`CohortRepository.current_risks`), so a CIN2+ and a
cancer model are both shown. For a patient with some risk, each current model of another outcome that didn't score
her (`current_batches`) gives a RiskAssessment with no prediction and the extension `sin-estimacion` (its outcome and
why it may be so), so the record can tell "no model" from "not estimated for her".
The patient takes the menopausal state, molecular and clinical subtype, integrative cluster, cellularity, mutation load,
Ki-67 category and source of the record; a new import entity carries the recurrence and the last contact; hormone and
anti-HER2 therapy are treatments. The route serves each cohort's scenarios, a scenario's figure and a patient's scenarios
over the live cohort build, computing the models and the bootstrap in the background and caching them per build. Includes
the survival import work this builds on.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The registered model's scenario (`[estimand]` of its `model.toml`) goes in the extension `estimando`, one
`valueString` per key, and its quantity as `method.text`. A model whose scenario can't be read has neither.
The cycle read the run's horizons and called the model itself; `models.dags.estimation.scored_frame` does both, and
also reads whether the run gives each risk's interval.
The code systems, value sets and the extensions (cut-offs, report id, interval, quartiles) each wrote the domain by
hand. They now derive from webapi.fhir_base, a leaf module so metrics and durations can use it without a cycle. The
default is unchanged; the WebApp still reads the same URLs by exact match, so changing the domain goes to both.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A proportion's measureScore now carries its 95 % Wilson interval in the ic-bajo and ic-alto extensions,
as proportions, the way durations carry their quartiles. Nothing is published without a denominator.
GET /governance/notebook-templates?domain= lists the notebooks under models/<domain>/<scenario>/notebooks/ with the
scenarios each can run for (models.reports.templates: its folder's and any whose model.toml lists a module of it, so
CaCu's PIM subgroup report serves cin2_pim and its post-colposcopy and post-treatment scenarios). POST
/governance/experiments takes `template` (that id) instead of `file`: the notebook is read from the code, never from
the request, and runs like an upload (its page sandboxed, its hash on the run). A template for a scenario it doesn't
serve, an id outside the templates, or a file and a template together are refused.
uv.lock adds plotly 7.1.0: models' `survival-curves` extra now draws the CaCu subgroup reports (models:
cacu-survival/integration).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HmQxVJVNR5FYkPAregGEQ7
webapi/fhir/risk.py builds a patient's RiskAssessment for CaCu and CaMa; GET /cama/modelo/curvas serves the production
version's survival curves; the cycle's estimator is generic by scenario; silver persona carries the date of death for CaMa;
the import schema accepts it; the CaMa risk batches can be confirmed and voided.
The WebApp patient record now reads GET /cacu/fhir/RiskAssessment?subject=Patient/<pac_id> (WebApp
feature/cohorts-dbt-canonical), so the custom route, its blueprint and its tests go; the risk batches and the
follow-up list point to the FHIR search.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HmQxVJVNR5FYkPAregGEQ7
GET /cacu/fhir/RiskAssessment?subject=Patient/<pac_id> (DEV only, tagged simulado, a searchset validated with R4B, as
TEA's patient resources): the patient's current batch, one prediction per horizon with its outcome, probability and
whenPeriod from the risk's index date, the confidence interval in an extension; declared in the CapabilityStatement.
GET /cacu/pacientes/<id>/riesgo adds riesgo.fecha_indice. Tests and the risk-band fixture carry the index date.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HmQxVJVNR5FYkPAregGEQ7