projecttacoma / fqm-execution

fqm-execution is a library that allows users to calculate FHIR-based electronic Clinical Quality Measures (eCQMs) and retrieve the results in a variety of formats
https://projecttacoma.github.io/fqm-execution/
Apache License 2.0
18 stars 6 forks source link

Library data requirements should bypass query filter parsing #206

Closed sarahmcdougall closed 1 year ago

sarahmcdougall commented 1 year ago

Summary

Ensures query filter parsing is only performed on measure data requirements and not library data requirements.

New Behavior

When running library data requirements, the detailed query filter parsing will no longer be performed. Library data requirements does not make use of a measurement period because there is no measure, and so it does not make sense to do detailed query filter parsing since a lot of the logic relies on constructing intervals for the (non-existent) measurement period.

Code Changes

Testing Guidance

github-actions[bot] commented 1 year ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟢 Statements 85.01% 1990/2341
🟡 Branches
73.65% (-0.03% 🔻)
1755/2383
🟢 Functions 87.1% 351/403
🟢 Lines 85.3% 1920/2251
Show files with reduced coverage 🔻
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :----------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------- | :--------- | :------------------------------------------------------------- | :-------- | :----- | | 🟢 |
`...` / DataRequirementHelpers.ts
| 82.5% |
81.51% (-0.56% 🔻)
| 75% | 83.33% |

Test suite run success

364 tests passing in 28 suites.

Report generated by 🧪jest coverage report action from e7bb2cfae2f260c0d32c5801cae63615056920d4

sarahmcdougall commented 1 year ago

I want to point out that this code change also turns off queryFilterParsing for regular calculateDataRequirements calls when no measurement period is provided by the user or found in the measure. Is this the expected behavior?

Yes this is expected. Based on this Slack thread there exists at least one measure type that does not require effectivePeriod, but it is unlikely that we will be working with those measures, and if we are, providing the measurement period via the Calculation Options should allow us to still do the query filter parsing. Otherwise, we will bypass the query filter parsing for the measure.