Files
WebApi/webapi/fhir/cacu.py
T
rockdrigo e2ecaa027c 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.
2026-11-21 02:07:34 -06:00

13 lines
639 B
Python

"""CaCu's patients in FHIR R4: a patient's individual risk as a `RiskAssessment` (DEV only, simulated data), built by
`webapi.fhir.risk` with CaCu's outcomes."""
from webapi.fhir import risk
from webapi.fhir.risk import DAYS_PER_YEAR, INTERVAL, MODEL, OUTCOME # noqa: F401 (kept for readers of this module)
OUTCOMES = {"cin2_mas": "CIN2+ por biopsia", "cin2_12m": "CIN2+ por biopsia en 12 meses"}
def risk_assessment(pac_id: int, patient_risk, simulated: bool) -> dict:
"""The patient's current risk (`PatientRisk`) as a `RiskAssessment`."""
return risk.risk_assessment(pac_id, patient_risk, simulated, OUTCOMES, "cin2_mas")