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

Ration measures with 2 IP are not supported at the moment #253

Open adongare opened 1 year ago

adongare commented 1 year ago

Earlier there was an issue with measure observation calculation for ratio measures. We raised the ticket https://github.com/projecttacoma/cqm-execution/issues/246. Thanks to @dczulada, he fixed the issue(haven’t pulled it into Bonnie yet). There was also a discussion on that ticket about supporting ratio measures with multiple IPs. Since the original issue was addressed in that ticket, created this ticket to address the calculation of 2 IP ratio measure.

It looks like cqm-execution doesn't support ratio measures with more than 1 IP. This was raised by the measure developer community at multiple community meetings. This is a blocker to upcoming AU. Bonnie needs this for the contingency plan. cc @nicole-hunter

dczulada commented 1 year ago

@adongare @nicole-hunter. Have they drafted a Ratio measure with 2 IPPs? If so, is it supported in CQM-Parsers? If you can provide an example measure, I'm sure we can get this updated in cqm-execution. What timeframe are you looking at?

dczulada commented 1 year ago

@adongare @nicole-hunter

Just did a quick look here. I believe supporting a Ratio measure with distinct IPPs would also require updates to CQM-Models and CQM-Parsers as well. As currently written, they assume a singular IPP/initialPopulationCriteria.

https://github.com/projecttacoma/cqm-models/blob/a7d4f58ed50a8bda465f372440e7b449ba0473c6/app/models/cqm/population_set.rb#L64

https://github.com/projecttacoma/cqm-parsers/blob/847019101f1a122f44e3cda0b7313d40cb71e6bb/lib/measure-loader/hqmf_measure_loader.rb#L124

dczulada commented 1 year ago

@adongare Here are some thoughts. Note that any changes to the measure model in cqm-models could have significant ramifications in Bonnie (and/or Cypress). Here is one approach I've experimented with. You can look at the commits to see possible changes that would be needed across cqm-models, cqm-parsers, bonnie and cqm-execution.

1) First, cqm-models will need to be updated to support multiple IPPs for Ratio Measures. This approach creates a new arbitrarily named population IPP_1 which could be used in Ratio Measures 2) cqm-models will need to be updated to include a subject field for StatementReference. This is how the hqmf indicates which IPP the NUMER or DENOM reference CQM-Models https://github.com/projecttacoma/cqm-models/commit/d7e29568c4f28a587d19a405ac3b33c04e113e91

3) cqm-parsers will need to be updated to extract this new information from the HQMF files CQM-Parsers https://github.com/projecttacoma/cqm-parsers/commit/a4b6d4c31dd317cada3805653c413709394dad0e

4) Bonnie will need to be updated to pass this new information in cqm-execution Bonnie Updates https://github.com/projectcypress/bonnie/commit/a00d5fce735879834df4df1d991ae944093638c9

5) cqm-execution can use this new measure information to support calculation with multiple IPPs CQM-Execution https://github.com/projecttacoma/cqm-execution/commit/f0b6ca8eb0fff7eb99f132f003c350928da870a0

dczulada commented 1 year ago

@adongare @nicole-hunter

Any thoughts on the analysis above. I believe any updates in the underlying Bonnie and Cypress data models (in cqm-models) should to go through some regression testing in both tools prior to inclusion in the library. From what I remember, I believe Bonnie can be somewhat brittle when it comes to changing its database model.

adongare commented 1 year ago

Hi @dczulada, thank you for the thorough analysis of all the repos. the steps outlined look good to me. seems like a big change. I did not get a chance to go through this. was busy with some other assignments. I'll play with this lil bit. Also, I did not find 2 IP measures(clinically meaningful). I've asked our SMEs to look into it. I'll post it here as soon as I get one.

dczulada commented 1 year ago

@adongare The reason why I asked about a specific measure is due to the significant amount of changes needed to get the functionality in Bonnie. If measure developers do not have a measure with multiple IPPs in the development pipeline for this next Annual Update it would likely make sense to defer this functionality to MADiE.

However, if measure developers do have a measure with multiple IPPs in the development pipeline for this next Annual Update we should work together to get these changes into the shared libraries and Bonnie.

adongare commented 1 year ago

@dczulada I think you are right. We might be able to defer this to MADiE. We do not know if there is any 2 IP measure right now. We reached out to the community to solicit more info on this since it came from MDs. We will let you know if there is one.