Skip to content

Optimize CQL library evaluation and consequently measure evaluation#688

Merged
JPercival merged 71 commits into
masterfrom
ld-20250627-evaluate-measure-population-flip-measure-and-subject-iteration
Aug 12, 2025
Merged

Optimize CQL library evaluation and consequently measure evaluation#688
JPercival merged 71 commits into
masterfrom
ld-20250627-evaluate-measure-population-flip-measure-and-subject-iteration

Conversation

@lukedegruchy
Copy link
Copy Markdown
Contributor

@lukedegruchy lukedegruchy commented Jun 27, 2025

  • This leverages the changes in CQL recently merged to master.
  • Shift CQL library evaluation to outside the MeasureReport building loop
  • Introduce CompositionEvaluationResultsPerMeasure, which serves as a combined cache of CQL evaluation results and errors, designed to maintain current permissive error handling
  • Shift CqlEngine initialization to these earlier points, and pass it down to the rest of measure evaluation
  • Leave DSTU3 logic largely unchanged in terms of timing and efficiency, but make use of the new functionality (partially for code coverage concerns)
  • Ensure R4CollectDataService works the same as before, with CQL library evaluation done per subject if the subject list is not empty
  • Take the opportunity to include some non-functional refactoring and sonar fixes, including making refraining from mutating R4MeasureProcessor and R4MeasureServiceUtils fields if we encounter a proxy scenario: Use local variables and conditional logic instead.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 27, 2025

Formatting check succeeded!

…service layers for single and multi measures and collect data. Leave old evaluate measure code within processor for the time being as there are still unit test failures otherwise, hopefully limited to single measure evaluation.
…ll as successful results, and enhancing it to mutate a given MeasureDef with errors should they exist. Start cleaning up. Spotless.
… call it correctly, and get rid of duplicate methods.
… the CQL library evaluation, and then to the measure evaluation.
…e-measure-population-flip-measure-and-subject-iteration
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 3, 2025

Codecov Report

❌ Patch coverage is 81.22867% with 55 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.70%. Comparing base (61cd1a8) to head (dd4c01b).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...cds/cqf/fhir/cr/measure/r4/R4MeasureProcessor.java 75.00% 20 Missing and 1 partial ⚠️
...hir/cr/measure/r4/utils/R4MeasureServiceUtils.java 21.05% 15 Missing ⚠️
...e/common/CompositeEvaluationResultsPerMeasure.java 86.84% 2 Missing and 3 partials ⚠️
.../cqf/fhir/cr/measure/r4/R4MultiMeasureService.java 73.68% 5 Missing ⚠️
...f/fhir/cr/measure/dstu3/Dstu3MeasureProcessor.java 76.47% 3 Missing and 1 partial ⚠️
.../fhir/cr/measure/common/MeasureProcessorUtils.java 90.90% 3 Missing ⚠️
...opencds/cqf/fhir/cr/hapi/config/r4/CrR4Config.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #688      +/-   ##
============================================
+ Coverage     72.59%   72.70%   +0.10%     
  Complexity      167      167              
============================================
  Files           480      482       +2     
  Lines         22510    22717     +207     
  Branches       2885     2895      +10     
============================================
+ Hits          16342    16517     +175     
- Misses         4735     4767      +32     
  Partials       1433     1433              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lukedegruchy lukedegruchy changed the title First attempt to flip measure and subject looping for population base… Optimize CQL library evaluation and consequently measure evaluation Jul 4, 2025
@lukedegruchy lukedegruchy marked this pull request as ready for review July 4, 2025 15:22
…eta profiles to all encounters and change IDs accordingly. Adjust CQLs. Start trying to assert stratifiers from tests.
…linical-reasoning. Make R4PopulationBasisValidator more error tolerant, especially if CQL returns Iterators instead of Lists. Enhance MultiMeasure test util.
… captures the scenario we're trying to optimize for. Start getting rid of logs.
…e-measure-population-flip-measure-and-subject-iteration
@lukedegruchy lukedegruchy marked this pull request as draft August 11, 2025 18:57
@JPercival JPercival marked this pull request as ready for review August 11, 2025 23:33
@sonarqubecloud
Copy link
Copy Markdown

@JPercival JPercival merged commit 3b379c8 into master Aug 12, 2025
8 checks passed
@JPercival JPercival deleted the ld-20250627-evaluate-measure-population-flip-measure-and-subject-iteration branch August 12, 2025 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants