projecttacoma / cqm-execution

NPM module for calculating eCQMs (electronic clinical quality measures) written in CQL (clinical quality language).
Apache License 2.0
10 stars 2 forks source link

Ratio measure calculation issues #246

Closed adongare closed 1 month ago

adongare commented 1 year ago

I think ratio measure calculation is not supported fully. The way population dependencies are calculated seems to be incorrect. Ratio measures are treated like Proportion measures. It seems that the issue lies with the way the cqm-execution processes the results from the cql-execution engine mainly calculating episodeResults and population relevance.

Calculation of episode of results: https://github.com/projecttacoma/cqm-execution/blob/0b232f715fa3c0516b07af0082a21ec8e67737b2/lib/helpers/calculator_helpers.js#L73

Calculation of populationRelevance: https://github.com/projecttacoma/cqm-execution/blob/0b232f715fa3c0516b07af0082a21ec8e67737b2/lib/helpers/results_helpers.js#L601

Bonnie ratio measure, patient and value sets aatched for reference measure_patients_valuesets.zip

After debugging a little bit, I noticed that denominator and denominator exclusion is driving the calculations of the numerator even though the numerator doesn’t depend on the denominator and denominator exclusion for ratio measures.

dczulada commented 1 year ago

@adongare I believe you are correct in your assertions.

srankins commented 1 year ago

We spoke about this ticket in detail today at CQI. Based on discussions, CQI is in agreement that Numerator should only be based on IP inclusion (for single or dual IP Ratio). Certain portions of QMIG are in discrepancy with regard to how FHIR measures should work. FHIR measures should be working similar to HQMF. @mgramigna was part of discussions and will be logging a ticket for fqm-execution.

dczulada commented 1 year ago

@adongare There probably still needs to be some work done here, but I think this PR should address the bulk of the RATIO measure issues. Note: I don't believe it addresses the scenario if a RATIO measures has two IPPs (thou it sounds like we might not see a QDM measure like that).

https://github.com/projecttacoma/cqm-execution/pull/251

adongare commented 1 year ago

Thanks, @dczulada for fixing it. I'll let our PO know about the fix and prioritize it to pull in bonnie. PR is in the draft. Are you still making some changes?

dczulada commented 1 year ago

@adongare I'll plan to pull this in next week. I've assigned you as a reviewer if you're interested. Otherwise, I'll pull it in as is.

adongare commented 1 year ago

Thanks, @dczulada!