-
Notifications
You must be signed in to change notification settings - Fork 6
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
Applies to stratifiers #307
Conversation
Coverage report
Show files with reduced coverage 🔻
Test suite run success454 tests passing in 31 suites. Report generated by 🧪jest coverage report action from ccd7cd3 |
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.
Small change for report output.
I feel like this could use a test that adds results for two patients to make sure it properly makes use of the appliesTo (as we understand it now) and keeps with only having results for the single population on the stratifier output.
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.
Just a small comment!
Summary
This PR does two things: fixes an error that was occurring when running calculateMeasureReports on measure bundles whose group.stratifiers did not have
code.text
and adds functionality in measure report calculation for stratifiers that have the cqfm-appliesTo extension.New behavior
Measure report calculation no longer errors out with the measure bundle provided in the most recent fqm-execution issue- stratifiers are now either identified with
s.code
ORs.id
. Additionally, if a stratifier has acqfm-appliesTo
extension, then only that associated population is included on thestratifier.population
array in the MeasureReport. If the extension is not present, then the stratifier applies to all populations in the group. This specification is described in the CQFM Computable Measure Profile.Code changes
src/calculation/DetailedResultsBuilder.ts
- usestrata.id
ifstrata.code.text
does not existsrc/calculation/MeasureReportBuilder.ts
- useid
when setting up the population groups in the Measure Report, addcqfm-appliesTo
extension functionalitytest/unit/MeasureReportBuilder.test.ts
- unit tests for stratifiers withcqfm-appliesTo
test/unit/fixtures/measure/proportion-measure-with-stratifiers.json
- test measure with stratifiers that have thecqfm-appliesTo extension
Testing guidance
npm run check
npm run test:integration
& regression testingnpm run cli -- reports -m <measureBundle> -p <patientBundle> --debug -o -s 2025-01-01 -e 2025-12-31 --trust-meta-profile true