[MADIE-398] Calculation of Strata in Bonnie 1.6.9 and 2.0. Created: 11/10/17  Updated: 05/11/18  Resolved: 01/08/18

Status: Closed
Project: MADiE Issue Tracker
Component/s: Measure Calculation
Affects Version/s: None
Fix Version/s: None

Type: Bug/Issue Priority: Moderate
Reporter: Angela Flanagan Assignee: Lizzie Charbonneau
Resolution: Answered Votes: 0
Labels: CQL
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Microsoft Word Bonnie 1.6.9 vs 2.0. Discrepency _Test498.docx     Zip Archive Test498_v5_4_Artifacts.zip    
Measure/Library Title: Test498
CBE Number: 0
Test Case Name(s): IPPFail X 3 cases

 Description   

IPPFail measures pass in Bonnie 1.6.9 but fail in Bonnie v2.0 d/t passing the strata in Bonnie. Of course it makes sense that each test case should pass one or the other strata because these are opposites and oddly enough the criteria section highlights as passing in Bonnie 1.6.9 but does not reflect this in the Expected Value. I suspect Bonnie 2.0 is calculating correctly, please confirm. thank you, Angela



 Comments   
Comment by Lizzie Charbonneau [ 01/08/18 ]

Great! I'll close this ticket again.
Best,
Lizzie

Comment by Lynn Perrine [ 01/08/18 ]

Ok, it makes sense. These test cases have been corrected. Thank you!

Comment by Lizzie Charbonneau [ 01/08/18 ]

Hi Lynn,

Bonnie appears to be calculating correctly.

The logic for Strat 2 looks like it was modified to rely on "Inpatient Encounter". This appears to have additional criteria in it. For example, that the occurrence is less than or equal to 120 days. This is not the case for test case "IPPFail Enc>120Days". Similarly for "IPPFail EncAfterMP", this does not satisfy the "Inpatient Encounter" logic.

If you don't want this characteristics included in the strat 2 definition, you will need to modify that definition to not rely on "Inpatient Encounter".

Let me know if this answers your question.

Best,
Lizzie

Comment by Lynn Perrine [ 01/08/18 ]

Reopening this ticket as the functionality is not performing in CQL Bonnie as expected based on previous issue discussions. Two test cases IPPFail, Enc>120Days and IPPFail, EncAfterMP are expected to meet strat 2 criteria for no ICU encounter even though they do not meet the IP criteria. But the CQL calculation is not showing them as meeting strat 2. A similar test case, IPPFail, 2Young does calculate as meeting strat 2 even though it does not meet the IP criteria. The only difference being that the 2Young case was able to calculate the IP criteria, whereas in the others it was not. Can you please verify if this is related to a calculation issue based on the IP and if so, how can we resolve this?

Comment by Angela Flanagan [ 11/20/17 ]

Yes, this makes sense. Thank you for the thorough explanation this will aid in explaining to the measure developer. thank you.

Comment by Lizzie Charbonneau [ 11/14/17 ]

Hi Angela,

This is due to the stratification logic within the QDM-Logic version of the measure, as well as how Bonnie handles stratifications. You'll notice that if you add an ICU encounter during that encounter, the Strat 1 is satisfied with a count of 1 even though the IPP has a count of 0. You'll also notice that if you make this test case pass the IPP, Strat 2 would show a count of 1.

There are several things happening here to cause this behavior.

1. The definition of stratification 1 does not return any encounters when it is satisfied.

 AND : 
     AND NOT: Encounter, Performed: Icu Admission Or Transfer during  $EncounterInpatient

When this is satisfied, there is no "Encounter, Performed: Icu Admission Or Transfer", so the count is 0

2. Bonnie tries to account for this, but fails when the IPP is also not satisfied
A similar situation must have occurred previously when the IPP was satisfied but STRAT was returning 0. This appears to have been handled by saying, "the STRAT should be at least the count of the IPP", so the following logic was added to Bonnie:

if stratification is true and stratification count is less than IPP count, then set stratification count to be equal to IPP count.

However, when the IPP is not satisfied, we don't have a way of knowing what this count should be.

3. The stratification definition here looks like it may be incorrect
It appears the intent of this stratification definition is to find cases where an inpatient encounter occurred, but there was no ICU visit during that encounter. As it's written now, this will return true even without an inpatient encounter occurring. If we are reading this correctly, this should be rewritten along the lines of:

 AND : 
     AND: $EncounterInpatient
     AND NOT: Encounter, Performed: Icu Admission Or Transfer during  $EncounterInpatient

I believe if the logic were rewritten in this way, this stratification would return a count of 1, so would show "1" even with the IPP showing "0".

4. The CQL logic reflects the definition described in (3) rather than in (1).
The CQL has:

define "Stratum 2":
    ["Encounter, Performed": "Encounter Inpatient" ] Encounter without ["Encounter, Performed": "ICU Admission or Transfer" ] ICU
        such that ICU.relevantPeriod during Encounter.relevantPeriod

This is saying, "return an encounter inpatient that does not have an ICU admission/transfer that occurs during that encounter". This parallels the suggestion in item (3).

Let us know if you are satisfied with this response, or if you would still like us to take an action.

Thank you,
Lizzie

Comment by Lizzie Charbonneau [ 11/12/17 ]

Hi Angela,

Thank you for reporting this issue. We will look into it.

Best,
Lizzie

Generated at Sun Aug 31 08:16:30 UTC 2025 using Jira 10.3.8#10030008-sha1:cdaed80cecc964184c5b19b002388d56f96e274e.