You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
All examples and guidance in spec using FHIR path as the column name,
SELECTsubject.reference,
AVG(value.quantity.value) avg_hdl
FROM observation o,
UNNEST(o.code.coding) c
WHEREc.system='http://loinc.org'ANDc.code='2085-9'ANDo.effective.datetime >'2017'GROUP BYsubject.reference
which is actually cannot be used in SQL database because the common pattern for a column name is "{TableName}.{ColumnName}". If we use FHIR path as the column name, we need to use brackets [] to warp it when creating table or querying data.
SELECT [subject.reference],
AVG([value.quantity.value]) avg_hdl
FROM observation o,
UNNEST(o.[code.coding]) c
WHEREc.system='http://loinc.org'ANDc.code='2085-9'AND
o.[effective.datetime] >'2017'GROUP BY [subject.reference]
Maybe recommend to use '_' as the separator rather than '.' ? E.g. From "subject.reference" to "subject_reference".
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
All examples and guidance in spec using FHIR path as the column name,
which is actually cannot be used in SQL database because the common pattern for a column name is "{TableName}.{ColumnName}". If we use FHIR path as the column name, we need to use brackets [] to warp it when creating table or querying data.
Maybe recommend to use '_' as the separator rather than '.' ? E.g. From "subject.reference" to "subject_reference".
The text was updated successfully, but these errors were encountered: