projecttacoma / fqm-execution

fqm-execution is a library that allows users to calculate FHIR-based electronic Clinical Quality Measures (eCQMs) and retrieve the results in a variety of formats
https://projecttacoma.github.io/fqm-execution/
Apache License 2.0
18 stars 6 forks source link

Single IPP Ratio Measure numerator/denominator populations are not treated independently #182

Closed mgramigna closed 1 year ago

mgramigna commented 1 year ago

Discussed in meeting with @srankins, @p9g, and others.

Per HQMF, ratio measure calculation should always treat numerator and denominator as independent populations. See below pseudo-cql from HQMF:

image

Some diagrams in the cqfm IG seem to be consistent with this, however as @p9g noted, the pseudo-cql does not align with HQMF.

Neither does fqm-execution, per the following example:

// snip
define "ipp":
  true

define "denom":
  false

define "numer":
  true

In the context of a ratio measure, "numer" should still be true despite "denom" being false. This is the current behavior in fqm-execution only when the measure has multiple IPPs, but fqm-execution should also behave this way even with a single IPP. Currently, it does not:

[
  {
    "populationType": "initial-population",
    "criteriaExpression": "ipp",
    "result": true,
    "populationId": "ec813784-2eb4-46a9-b86a-bb03bf1c5b25"
  },
  {
    "populationType": "numerator",
    "criteriaExpression": "numer",
    "result": false,
    "populationId": "304711ea-6ded-4145-b429-20551850fc83"
  },
  {
    "populationType": "denominator",
    "criteriaExpression": "denom",
    "result": false,
    "populationId": "4c919f82-a385-4cda-9324-ae6c1722dec6"
  }
]

Measure Bundle and Patient Bundle for really simple demonstration of the issue: issue.zip (the above example)

CMS871 is also an example of this issue in fqm-execution.

p9g commented 1 year ago

Old venn diagrams: https://github.com/HL7/cqf-measures/blob/master/archived/old_images/RatioVenn.jpg https://github.com/HL7/cqf-measures/blob/master/archived/old_images/Ratio2Venn.png https://github.com/HL7/cqf-measures/blob/master/archived/old_images/Ratio3Venn.png

New diagrams: https://hl7.org/fhir/us/cqfmeasures/2023Jan/measure-conformance.html#ratio-measures

p9g commented 1 year ago

HQMF spec downloadable from http://www.hl7.org/implement/standards/product_brief.cfm?product_id=97

srankins commented 1 year ago

Related comment for QMIG Ballot STU 4 has been submitted - here.

mgramigna commented 1 year ago

Fixed in v1.0.5