TEA gate: the extension helper reads complex extensions (curve-centiles) too
This commit is contained in:
+4
-1
@@ -345,7 +345,10 @@ def _fhir_code(concept):
|
|||||||
|
|
||||||
def _fhir_extensions(resource):
|
def _fhir_extensions(resource):
|
||||||
return {
|
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", [])
|
for e in resource.get("extension", [])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user