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
17 stars 6 forks source link

Not Equal and Not Equivalent clause coverage calculation handling #291

Closed elsaperelli closed 7 months ago

elsaperelli commented 7 months ago

Summary

287 contains CMS69 which includes a !~ (not equivalent) operation in the CQL that has some undesirable coverage calculation behavior due to the way Not Equivalent and Not Equal operations are translated from CQL to ELM json. This PR provides a workaround so that Not Equivalent and Not Equal clauses behave like Equal and Equivalent clauses.

New behavior

Before, in order to reach 100% clause coverage with CMS69, test cases where BMIEncounter.class WAS equivalent to 'virtual' AND where BMIEncounter.class was NOT equivalent to 'virtual' needed to be provided. This behavior did not match the clause coverage highlighting where only the not equivalent test case was needed for the clause to be highlighted as covered. Now, the coverage calculation matches the coverage highlighting. For CMS69 to reach 100% clause coverage, ONLY a test case where BMIEncounter.class is NOT equivalent (!~) to 'virtual' is needed.

Code changes

Testing guidance

github-actions[bot] commented 7 months ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟢 Statements
86.39% (+0.02% 🔼)
2373/2747
🟡 Branches
73.77% (+0.1% 🔼)
2208/2993
🟢 Functions 88.89% 424/477
🟢 Lines
86.72% (+0.02% 🔼)
2293/2644

Test suite run success

451 tests passing in 31 suites.

Report generated by 🧪jest coverage report action from ceb446f9288a0dbe977b8bb8cb5200c4a6a8fcfd