TEA gate: the extension helper reads complex extensions (curve-centiles) too

This commit is contained in:
2026-11-30 09:10:39 -06:00
parent 983680ead3
commit 52bcf34720
+4 -1
View File
@@ -345,7 +345,10 @@ def _fhir_code(concept):
def _fhir_extensions(resource):
return {
e["url"].rsplit("/", 1)[-1]: next(v for k, v in e.items() if k.startswith("value"))
# a complex extension (curve-centiles) has sub-extensions instead of a value[x]
e["url"].rsplit("/", 1)[-1]: next(
(v for k, v in e.items() if k.startswith("value")), e.get("extension")
)
for e in resource.get("extension", [])
}