-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Array representations within FHIRPath queries #1759
Comments
I have found an issue with the implementation on observations = data.view(
"Observation",
select=[
{
"column": [
{
"description": "Observation ID",
"path": "getResourceKey()",
"name": "id",
},
{
"description": "Patient ID",
"path": "subject.getReferenceKey()",
"name": "patient_id",
},
{
"description": "Observation date",
"path": "effectiveDateTime",
"name": "date",
},
],
"select": [
{
"forEach": "code.coding",
"column": [
{
"description": "Observation code",
"path": "code",
"name": "code",
},
],
},
{
"forEach": "value.ofType(Quantity)",
"column": [
{
"description": "Total cholesterol unit",
"path": "unit",
"name": "unit",
},
{
"description": "Total cholesterol value",
"path": "value",
"name": "value",
},
],
},
],
}
],
where=[
{
"description": "Total cholesterol > 240 mg/dL",
"path": "where(code.coding.where(system = 'http://loinc.org').exists(code = '2093-3')).value.ofType(Quantity) > 240 'mg/dL'",
}
],
)
observations.explain() I get the following plan:
It would be better if we did not have to retrieve all of the columns for this query, only the ones that are required. |
I have merged |
@piotrszul Would you mind creating a pull request for this change, so that it is easier to follow activity on the branch? |
This issue represents the work to refactor the FHIRPath query engine to use arrays and array operations to represent FHIRPath expressions. This will have a number of benefits, including the elimination of joins and the simplification of query plans.
This work was initiated within #1438, but we would like to integrate this work back into main without the SQL on FHIR views implementation itself. This will allow us to evaluate this change separately, and control the magnitude of the change.
Outstanding tasks:
fhir-views
) and a PR for this changeThe text was updated successfully, but these errors were encountered: