-
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
Generic populated field detection #196
Changes from 5 commits
f694f72
dae38e3
f965d00
81ad97a
b521457
4e2ceaa
dcd9de1
9b71dad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,15 +26,14 @@ def prepare_queries( | |
parser: databases.DatabaseParser = None, | ||
**kwargs, | ||
): | ||
self.queries += sql_utils.denormalize_codes( | ||
self.queries = sql_utils.denormalize_complex_objects( | ||
schema, | ||
cursor, | ||
[ | ||
sql_utils.CodeableConceptConfig( | ||
source_table="documentreference", | ||
source_id="id", | ||
column_name="type", | ||
is_array=False, | ||
column_hierarchy=[("type", dict)], | ||
target_table="core__documentreference_dn_type", | ||
), | ||
# TODO: The US core profile allows an extensible code for category, but | ||
|
@@ -47,19 +46,17 @@ def prepare_queries( | |
sql_utils.CodeableConceptConfig( | ||
source_table="documentreference", | ||
source_id="id", | ||
column_name="category", | ||
is_array=True, | ||
column_hierarchy=[("category", list)], | ||
filter_priority=True, | ||
target_table="core__documentreference_dn_category", | ||
code_systems=[ | ||
"http://hl7.org/fhir/us/core/ValueSet/us-core-documentreference-category" | ||
], | ||
), | ||
sql_utils.CodeableConceptConfig( | ||
sql_utils.CodingConfig( | ||
source_table="documentreference", | ||
source_id="id", | ||
column_name="content.format", | ||
is_array=False, | ||
column_hierarchy=[("format", dict), ("content", dict)], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is flipped, right? If so, you should probably add a unit test that would catch that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. well a test would have caught it if the test data had been correct, so that should be addressed now. |
||
target_table="core__documentreference_dn_format", | ||
), | ||
], | ||
|
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.
Ah this consolidation of arguments makes sense, yeah.
nit: maybe now that there's less overload on the word, you could just use
columns
instead ofcolumn_hierarchy
which is easy to say or type wrong. 😄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 don't like
columns
because ordering is important and not implicit in that name. open to other ideas.