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
+6
View File
@@ -25,6 +25,12 @@ def de_derechohabiente(paciente) -> dict:
}
def con_defuncion(paciente) -> dict:
"""Lo de `de_derechohabiente` y la fecha de defunción, el desenlace de la supervivencia: nula mientras vive o si se
desconoce."""
return {**de_derechohabiente(paciente), "fecha_defuncion": paciente.pac_fecha_defuncion}
def con_sexo(paciente) -> dict:
"""Lo que la persona de TEA agrega: el sexo, como código."""
return {"sexo": codigo(paciente.pac_sexo)}