-
Notifications
You must be signed in to change notification settings - Fork 0
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
A couple miscellaneous fixes #200
Conversation
cumulus_library/studies/core/core_templates/documentreference.sql.jinja
Outdated
Show resolved
Hide resolved
cumulus_library/studies/core/core_templates/documentreference.sql.jinja
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we modify/add some data to the duckdb json that will exercise these changes?
cumulus_library/studies/core/core_templates/documentreference.sql.jinja
Outdated
Show resolved
Hide resolved
cumulus_library/studies/core/core_templates/documentreference.sql.jinja
Outdated
Show resolved
Hide resolved
Yes, let me add my dumb little test that triggered these. Though it is a bit of a testing departure from the rest of the code - but I think it will be useful. Let me push up and you can comment. |
ff5d584
to
998b3c0
Compare
OK updated to resolve your comments, and added a little test helper class I was working on, for more dynamic ndjson rather than ndjson that lives on disk in a folder. Felt easier to create little edge cases for. But it's a bit of a departure from the norm in this repo - I can adjust it to your taste. |
998b3c0
to
7f023c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do like that approach for edge cases, it feels less risky than mucking with the source data in terms of spiraling dependencies.
# TODO: fix the core SQL to check for extensions in the schema | ||
# before querying them. In the meantime, we can just ensure | ||
# those fields exist, ready to be queried. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is on my list but is waiting for the next extension we support.
|
||
|
||
class LocalTestbed: | ||
def __init__(self, path: Path, with_patient: bool = True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this path arg default to the tmp_path
fixture?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure how, tbh
We now only use one address per patient, to avoid duplicate patient entries (and also now allow patients with null addresses). And we now build DocRefs even if context.encounter isn't in schema, and allow DocRefs with null encounters.
7f023c0
to
4094e1c
Compare
I found these while working on tests for a different upcoming PR.
Checklist
docs/
) needs to be updated