Skip to content

Add unit tests to cover QICore scenarios#958

Open
Capt-Mac wants to merge 10 commits intomasterfrom
dqm-qi-core-testing
Open

Add unit tests to cover QICore scenarios#958
Capt-Mac wants to merge 10 commits intomasterfrom
dqm-qi-core-testing

Conversation

@Capt-Mac
Copy link
Contributor

@Capt-Mac Capt-Mac commented Mar 6, 2026

  • Add test resources for CMS QICore
  • Add a new test class covering various scenarios
  • Refactor/enhance test framework assertion

Note there are test failures that are due to issues that need to be discussed within this code review:

From Justin:

Data Issues:

  • several of the tests were missing subject reference on resource, which blocked generation of expected MeasureReport results
  • Measure Reports were setup to score as Increase improvement Notation, but Measure was defined as Decrease

Bug or Data issues

  • The current 7 test failures are due to an expected criteria of 'exclusion' to be met due to advanced illness and frailty.
  • In all 7 cases the patient has wheelchair and dementia medication, but the below CQL expression is failin on the DementiaMedication.medicationRequestPeriod() function,
  • either through poorly defined data that doesn't list expected period or due to a bug in QICore for that particular expression.

CQL:

      define "Has Dementia Medications in Year Before or During Measurement Period":
    exists (( ([MedicationRequest: "Dementia Medications"]).isMedicationActive()) DementiaMedication
        where DementiaMedication.medicationRequestPeriod() overlaps day of Interval[start of "Measurement Period" - 1 year,
          end of "Measurement Period"]

@Capt-Mac Capt-Mac self-assigned this Mar 6, 2026
@Capt-Mac Capt-Mac marked this pull request as draft March 6, 2026 15:50
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

Formatting check succeeded!

@lukedegruchy lukedegruchy assigned lukedegruchy and unassigned Capt-Mac Mar 6, 2026
@lukedegruchy lukedegruchy changed the title QICoreTests Add unit tests to cover QICore scenarios Mar 9, 2026
@lukedegruchy lukedegruchy marked this pull request as ready for review March 9, 2026 20:40
… definition of fluent function medicationRequestPeriod.
…s. Adjust measure score assertions on some tests to assert null. Adjust denominatorexclusion counts that were affected. Add notes where such adjustments were made.
@sonarqubecloud
Copy link

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.

2 participants