From 3a18af9516c4a452403a1eb3d8e73062701c7de4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Trevi=C3=B1o?= Date: Sun, 29 Nov 2026 06:43:09 -0600 Subject: [PATCH] CaMa serves treatments as Procedures and recurrences as Conditions --- webapi/fhir.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/webapi/fhir.py b/webapi/fhir.py index cc3cfed..9462473 100644 --- a/webapi/fhir.py +++ b/webapi/fhir.py @@ -303,7 +303,7 @@ def search_condition(request: Request, domain: Domain, subject: str | None = Query(None, description=SUBJECT), _count: int | None = Query(None), _offset: int = Query(0)) -> Response: # fmt: skip - """What clinical notes diagnosed.""" + """What clinical notes diagnosed (CaMa: and each recurrence).""" def build(rows): return [f.condition(r) for r in rows] @@ -316,10 +316,11 @@ def search_procedure(request: Request, domain: Domain, subject: str | None = Query(None, description=SUBJECT), _count: int | None = Query(None), _offset: int = Query(0)) -> Response: # fmt: skip - """The procedures the domain's timeline infers (CaCu: colposcopies and treatments).""" + """The procedures the domain's timeline infers (CaCu: colposcopies and treatments; + CaMa: each treatment, by its kind).""" def build(rows): - return [f.procedure(r) for r in rows] + return [f.procedure(r, domain.value) for r in rows] return _clinical_search("procedure", build, request, domain, subject, _count, _offset)