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

Fix observation function reuse issue with results recording #180

Closed hossenlopp closed 1 year ago

hossenlopp commented 1 year ago

Summary

Fixes #176

Fixes results recording issues with a re-used observation function a ratio measure as exhibited in #176. Now ensures the criteriaReferenceId matches for populations when adding observation results to populations seen before in tallying.

New behavior

Bug is fixed and re-uses of a function for observation will have their results routed to the correct episode and population result objects.

Code changes

Added ratio-Encounter-reuseObservationFunction integration test based on data from #176. DetailedResultsBuilder.ts - Fixes in collection of population results to make sure criteriaReferenceId is used to match up results. ClauseResultsBuilder.ts - Fixes to helper functions for setting results so they match on criteriaReferenceId.

Testing guidance

Run integration tests.

github-actions[bot] commented 1 year ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟒 Statements 85.73% 1940/2263
🟑 Branches
73.83% (+0.07% πŸ”Ό)
1718/2327
🟒 Functions 88.72% 346/390
🟒 Lines 85.98% 1870/2175

Test suite run success

350 tests passing in 28 suites.

Report generated by πŸ§ͺjest coverage report action from 435be921decd169b979dcf5cf4ab8595c283451e

p9g commented 1 year ago

Note my QMIG ballot comment to clarify ratio measure requirements https://jira.hl7.org/browse/FHIR-39376