Closed elsaperelli closed 2 months ago
St.:grey_question: |
Category | Percentage | Covered / Total |
---|---|---|---|
π’ | Statements | 85.35% (+0.09% πΌ) |
2423/2839 |
π‘ | Branches | 72.89% (+0.09% πΌ) |
2269/3113 |
π’ | Functions | 87.47% (+0.1% πΌ) |
433/495 |
π’ | Lines | 85.65% (+0.09% πΌ) |
2340/2732 |
456 tests passing in 31 suites.
Report generated by π§ͺjest coverage report action from 8fd71a30be2553d5968747cad7d62b340f098a6f
Summary
This PR adds an optional attribute to the
StratifierResult
interface so that we can report the result of a stratifier that includes anappliesTo
extension for Patient-based Measures only.New behavior
The
appliesTo
extension indicates which population a stratifier should apply to. If it is included on a Measure.group.stratifier, we now report the result of the stratifier AND the result of the population it applies to on theappliesResult
attribute on the StratifierResult. The previousresult
attribute remains as it was: simply the result of the stratifier. The DetailedResults now contain the raw stratifier result in result (like before) as well as the result of the stratifier with the population result it applies to taken into consideration inappliesResult
.Code changes
src/calculation/DetailedResultsBuilder.ts
- add AND logic of population result and stratifier result to appliesResult attribute of StratifierResults for patient based measuressrc/types/Calculator.ts
- add optional appliesResult attribute toStratifierResult
interfacetest/unit/DetailedResultsBuilder.test.ts
- unit tests for described changesTesting guidance
npm run cli -- detailed -m <path to mb> --p <path to patient bundle (I think the file they provide is in an array so just make sure to get rid of that)> -s 2025-01-01 -e 2025-12-31 --trust-meta-profile true -o --debug