Skip to content

bugfix: update view code params to take constant not constants#2575

Open
matthewoneill7-nhs wants to merge 3 commits intoaehrc:mainfrom
matthewoneill7-nhs:bugfix/mo_fix_view_methods
Open

bugfix: update view code params to take constant not constants#2575
matthewoneill7-nhs wants to merge 3 commits intoaehrc:mainfrom
matthewoneill7-nhs:bugfix/mo_fix_view_methods

Conversation

@matthewoneill7-nhs
Copy link

constants gets passed to the JVM which is then ignored. This then causes any query that uses constants to fail with an 'Unknown variable' error

constants gets passed to the JVM which is then ignored. This then causes any query that uses constants to fail
with an 'Unknown variable' error
@matthewoneill7-nhs matthewoneill7-nhs changed the title update view code params to take constant not constants bugfix: update view code params to take constant not constants Mar 18, 2026
@matthewoneill7-nhs
Copy link
Author

linked to #2574

@johngrimes johngrimes added the bug Something isn't working label Mar 19, 2026
@github-project-automation github-project-automation bot moved this to Backlog in Pathling Mar 19, 2026
@johngrimes johngrimes moved this from Backlog to Planned in Pathling Mar 19, 2026
@johngrimes johngrimes moved this from Planned to In progress in Pathling Mar 19, 2026
Fix three bugs in test_view_with_constants: use "path" instead of
"value" for the column key, use FHIRPath %constant syntax instead
of $constant, and use the named ResultRow factory for consistency.
Also fix PEP 8 style issues and add a matching R test.
@johngrimes johngrimes added this to the v9.6.0 milestone Mar 19, 2026
Comment on lines +63 to +70
{"path": "name.first().family", "name": "family_name"},
]
}
],
where=[{"path": "id = $filter_id"}],
where=[{"path": "id = %filter_id"}],
)
assert result.collect() == [
Row("8ee183e2-b3c0-4151-be94-b945d6aa8c6d", "Krajcik437"),
ResultRow("8ee183e2-b3c0-4151-be94-b945d6aa8c6d", "Krajcik437"),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh no, how embarrassing.

Apologies, I installed uv but couldn't get the tests to run

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem at all!

If you let us know what you had trouble with, we will try to improve the documentation in CONTRIBUTING.md.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made sure to have java 21 installed, and python with UV

then i ran mvn clean install -pl lib/python -am but it kept ending in a killed process. when i cdd into the python library folder and ran pytest through uv it failed with missing libraries.

i'm not familiar with the java tooling so i don't know which knobs and dials to turn to make it less likely to crash on me. It could also be my machine, i've had wsl crash on me a fair bit while using pyspark and pathling.

Secrets are not available for PRs from external contributors,
causing the sonar step to fail. Split the install and SonarCloud
steps so the analysis is skipped when SONAR_TOKEN is absent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants