-
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
c_us_core_v4_count: expand mandatory fields to their own table(s) #44
Conversation
All mandatory checks used to be summarized in a single 'valid_mandatory' field. But it's useful to see where the faults lie. So now each resource has a _mandatory and a _must_support table (for CUBE performance reasons) and each table has a column for every relevant field.
b71e331
to
2838263
Compare
This is all maybe an argument that even for Cumulus dashboard, we should be pushing up the aggregate mode output for this metric. But that will have to wait until the dashboard can actually show aggregate mode tables. |
In cube mode, split the large Observation mandatory tables up into two or three tables. In aggregate mode, we leave them all as one table. This is just a clunky performance workaround, but we can at least isolate it to cube mode.
2838263
to
2fa8d08
Compare
# TODO: add the ability for cumulus-library to take study args like | ||
# --study-option=output-mode:cube (or whatever) |
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 know this is on our short list but for posterity: smart-on-fhir/cumulus-library#247
@mikix, it looks like verification_status is showing up as both mandatory and must support for allergyintolerance and condition, but seems like it should just be in must support? |
Ah that's an odd thing I guess. Here's a note I have in the must-support SQL:
So it's a required binding on a must-support field. If the value of that field is bogus, do we flag that as breaking a mandatory constraint or just report it on the must-support side of things? (The mandatory check allows NULL - the must-support check does not - so they are slightly different. Mandatory doesn't care if the field is present, only that it's well-formed. But must-support is checking that it's present & well-formed.) And keep in mind the |
Yup, I certainly agree that validating the code should be considered mandatory from a q_valid_us_core_v4 perspective. On the c_us_core_v4 side of things, I think it would be less confusing to just report it in must-support (populated and valid), but I don't feel strongly if your preferences is to keep it in both places. |
Maybe just a field rename would resolve this easily - call it |
Eh, it's easy enough to skip it in the c_us_core_v4_count case - I can do that real quick |
We currently combine all the mandatory checks into one boolean field: valid_mandatory.
The qualifier metric definition encourages stratifying by all mandatory and must support fields.
This commit makes the following changes:
_must_support
suffix to the variousc_us_core_v4_{profile}
tablesvalid_mandatory
(now expanded & split into new table)c_us_core_v4_{profile}_mandatory
table that cubes all the individual mandatory checks (as well as an AND'dvalid
field)data_metrics__c_us_core_v4_count_observation_laboratory_mandatory1
anddata_metrics__c_us_core_v4_count_observation_laboratory_mandatory2
Fixes #40.