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

Not able to differentiate between numerator and denominator observations #252

Closed adongare closed 1 month ago

adongare commented 1 year ago

cqm-execution doesn’t distinguish between numerator and denominator observations. The calculation results for observations is an array e.g. observation_values =[12, 23]. With this, users can't tell if observation 12 is for the denominator or numerator

dczulada commented 1 year ago

@adongare

That is partially true. The observation_values array does not provide the keys for the population keys. However, order of the observation_values does remain consistent. For the last couple of annual updates Cypress has used an approach that post processes the individual results from cqm-execution to associate the values with the appropriate populations. I believe a similar approach would also work for Bonnie.

https://github.com/projectcypress/cypress/blob/07f8430d810e430ea347fc0e1a19faadcf63ef1b/lib/ext/cqm/individual_result.rb#L109

Screenshot 2023-06-05 at 10 01 01 AM

dczulada commented 1 year ago

Just to note, this approach has also worked with displaying the observations for CMS986.

image

adongare commented 1 year ago

Thanks, @dczulada for sharing this. Sorry, was occupied with some other things. did not get a chance to go through the comments. I'm not sure if I understood it correctly. Please correct me if I got this wrong. The above examples show observations for each population by episode. Screenshot that you attached for CMS871 shows DENOM OBS = 9 and NUMER OBS = 1.

Let's take the following example. This is the response from cqm-execution for a test patient.

Screen Shot 2023-06-12 at 1 22 58 PM

This has two episodes with 3 observations. Episode 1 has one observation i.e. numerator observation because there is denom exclusion. so it can't be denom obs. So NUMER OBS = 0 Episode 2 has two observations [6, 1] and no exclusion. So, in this case, which one is DENOM Observation and which one is NUMER observation? Does the denominator observation come first and then the Numerator observation? Looked into cqm-execution and it appears that that is the order we add observation elm functions to library statements and later iterate over observations and push them to episodes

dczulada commented 1 year ago

are you using version 4.1.2? In 4.1.2 for ratio measures there will always be 2 observations values.

Here is what it would look like with a DENEX.

Screenshot 2023-06-21 at 4 18 06 PM

dczulada commented 1 year ago

@adongare Forgot to tag you

adongare commented 1 year ago

ah...I think I was on v4.0.2. I see different results(like you have shown) with v4.1.2. thanks @dczulada for pointing that.

adongare commented 1 month ago

No changes are required. it was addressed in Bonnie and Cypress repos.