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 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 161-day diagnosis of the fixture is out of the 120-day window, and the sample-to-treatment horizon (180) leaves the
August and October samples pending. The comparison with the kit's oracle (180 days to the diagnosis) is marked as an
expected divergence until the oracle is regenerated with the project's horizon.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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>
CaCu's timeline now holds the patient's birth and death like CaMa's, so the comparison with the kit's rows leaves them
out along with the inferred procedures.
The CaCu catalog holds fourteen measures. A fixture adds H-007, who goes the whole route in order, and a test pins the
population, the cases and the median of each of the five new times.
The CaCu catalog holds nine measures. A fixture adds H-004's colposcopy and treatment on top of the shared data, and a
test pins the days of both intervals with a 60-day horizon.
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
models dev (feb934d) relaxed ML-01a: not every model has the five routine records (a prevalence-incidence mixture
such as CaCu's PIM has no class balance or classifier calibration), so requiring all of them blocked the promotion
of models whose training run is in order. ML-01a now passes when the version comes from its training run, and its
detail reports which routine records that run holds. A version registered over HTTP still has a run, so it passes
ML-01a too; what keeps it from production is that it carries no saved model (ML-01b). This test expected both checks
to fail and would break as soon as the WebApi runs on that models dev.
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
The `cohorts` and `estimate` steps take the project's cohorts from dbt's manifest (`cohort_urls`) and build each one
with models' `build_of` over dbt's queries, instead of the Python-frame TOMLs in models/cohorts, which are gone; without
a manifest a project has no cohort steps. The recruitment window and cut-off are dbt's vars. The live estimator reads
cin2_logistic through `Scenario` and `KitBuild`, and governance imports `models.reports.experiment`, where models now
keeps it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HmQxVJVNR5FYkPAregGEQ7
The API no longer authenticates: no /auth routes, no session cookie and no before_request lock. An external service that reads and writes data was hitting the 401, so the endpoint is open again.
The interface keeps its login and the per-account domains, now resolved in the browser. WEBAPI_USUARIO(S) and WEBAPI_SECRET_KEY are gone from the Dockerfile and .env.example.
Cookie session with /auth/login, /auth/logout and /auth/me. Four accounts come from WEBAPI_USUARIOS (admin plus one per domain) and a second before_request answers 403 when an account asks for another domain.
The data suites run with WEBAPI_AUTH_REQUIRED=0; test_auth.py turns the lock back on and covers both hooks. The Dockerfile normalises the entrypoint so a Windows checkout still starts the container.
Preserve dev risk batches and governance, individual patient selection, optional access and explicit cohort reader overrides. Register one CaMa implementation and retain legacy Python blueprint consumers. Validated with 681 WebApi tests on the integrated parent and submodules.