-
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
Updated discovery for new FHIR resources #300
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
tests/conftest.py
Outdated
@@ -178,6 +178,7 @@ def debug_table_head(cursor, table, rows=3, cols="*"): | |||
def debug_diff_tables(cols, found, ref, pos=0): | |||
cols = cols if len(cols) > 0 else [] | |||
found = found[pos] if len(found) > pos else [] | |||
print(str(ref)) |
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.
✂️ ?
tests/test_discovery.py
Outdated
for i in range(0, len(table_rows)): | ||
table_rows[i] = tuple([x if x else "" for x in table_rows[i]]) |
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.
nit: it's odd to my Python eyes to see an actual index loop 😄 maybe something like this? Could be cut over several lines for clarity.
table_rows = [tuple(x or "" for x in row) for row in table_rows]
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 personally find this more obtuse, but i agree it's more pythonic, so i'll make this change.
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 only generally like that construction with good formatting:
table_rows = [
tuple(x or "" for x in row)
for row in table_rows
]
Which I find readable enough - but if you vibe your approach for readability, I think that's a good enough reason to keep it as-is.
tests/test_discovery.py
Outdated
"/test_data/discovery/discovery__code_sources.csv", | ||
"w", | ||
) as f: | ||
writer = csv.writer(f, quoting=csv.QUOTE_MINIMAL) | ||
for row in table_rows: | ||
writer.writerow(row) |
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.
Should comment this block out yeah?
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 could've sworn i'd done this.
'', | ||
'', | ||
'' |
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 reference file has a lot of blanks - is there no coding data in the test data for allergies or these others? Procedure.reasonCode has something. But it's a rarity. Even encounter.hospitalization.dischargedisposition
lost data.
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 probably due to running against my test db - my internet access has been so bad from home over the last few days on VPN that i got bizaare timeouts trying to run this against cerner. I'll try it again tomorrow when i'm onsite.
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 think in CONTRIBUTING.md, we have a one-liner to run against the test data - does that generate good-enough results?
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.
updated w/ local db - still pretty blank-ful.
aa065fc
to
a01b69a
Compare
This adds allergyintolerance, diagnosticreport, and procedure to resources the discovery study checks for coding information.
It also lightly redoes test data generation/validation logic due to some issues with commas inside fields.
Checklist
docs/
needs to be updatedgenerate-md
core
study fields that not in US Core, update our list of those incore-study-details.md
manifest.toml