CaMa: individual risk and population curves served, and the cycle estimates with any scenario in production

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.
This commit is contained in:
rockdrigo
2026-11-21 02:07:34 -06:00
parent 26f2b35338
commit e2ecaa027c
17 changed files with 446 additions and 85 deletions
+4 -3
View File
@@ -9,9 +9,10 @@ from flask import Blueprint, jsonify, request
from persistance.edges.gold import ERROR, FINAL
def risk_batches_blueprint(repositories) -> Blueprint:
"""The blueprint, to register with `url_prefix="/cacu"`. `repositories` is `persistance.cacu`."""
blueprint = Blueprint("risk_batches", __name__)
def risk_batches_blueprint(repositories, name: str = "risk_batches") -> Blueprint:
"""The blueprint, to register with `url_prefix="/<domain>"`. `repositories` is `persistance.<domain>`; `name` is
unique per domain registered."""
blueprint = Blueprint(name, __name__)
@blueprint.get("/riesgos/lotes")
def list_pending_batches():