clinical_quality_language icon indicating copy to clipboard operation
clinical_quality_language copied to clipboard

cql-to-elm translator validation issue

Open adongare opened this issue 2 years ago • 3 comments

This was noticed while testing CMS190V11 in bonnie. CQL:

 define "No Mechanical VTE Prophylaxis Due to Medical Reason on Day of or Day After Procedure":
  from
    "Encounter with ICU Location" QualifyingEncounterICU,
    ["Procedure, Performed": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
    "No Mechanical VTE Prophylaxis Performed or Ordered" NoMechanicalProphylaxis
    where NoMechanicalProphylaxis.negationRationale in "Medical Reason" NoMechanicalProphylaxis
      and Global."NormalizeInterval" ( AnesthesiaProcedure.relevantDatetime, AnesthesiaProcedure.relevantPeriod ) ends 1 day after day of VTE."StartOfFirstICU" ( QualifyingEncounterICU )
      and NoMechanicalProphylaxis.authorDatetime during day of TJC."CalendarDayOfOrDayAfter" ( 
      end of Global."NormalizeInterval" ( AnesthesiaProcedure.relevantDatetime, AnesthesiaProcedure.relevantPeriod ) )
    return QualifyingEncounterICU

especially the line where NoMechanicalProphylaxis.negationRationale in "Medical Reason" NoMechanicalProphylaxis. The alias NoMechanicalProphylaxis in the above line seems to be unnecessary, however, the translator did not catch it. After talking to @JSRankins, we think that this could be a potential bug in the translator. Although we used translator v1.5.3 for this, this issue could be in the latest version of the translator as well.

adongare avatar Oct 18 '22 20:10 adongare

@adongare , can you post the full library (or even better, a pared down version that includes all the dependencies so this is a standalone repro?)

brynrhodes avatar Oct 18 '22 20:10 brynrhodes

I've downloaded the ECM at https://ecqi.healthit.gov/ecqm/eh/2023/cms0190v11#quicktabs-tab-tabs_measure-2 and opened it using the plugin in visual code. I believe the definition has changed since then

define "No Mechanical VTE Prophylaxis Due to Medical Reason on Day of or Day After Procedure":
  from
    "Encounter with ICU Location" QualifyingEncounterICU,
    ["Procedure, Performed": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
    "No Mechanical VTE Prophylaxis Performed or Ordered" NoVTEDevice
    where NoVTEDevice.negationRationale in "Medical Reason"
      and Global."NormalizeInterval" ( AnesthesiaProcedure.relevantDatetime, AnesthesiaProcedure.relevantPeriod ) ends 1 day after day of VTE."StartOfFirstICU" ( QualifyingEncounterICU )
      and NoVTEDevice.authorDatetime during day of TJC."CalendarDayOfOrDayAfter" ( 
      end of Global."NormalizeInterval" ( AnesthesiaProcedure.relevantDatetime, AnesthesiaProcedure.relevantPeriod ) )
    return QualifyingEncounterICU

ddieppois avatar Oct 27 '23 15:10 ddieppois

@brynrhodes, @ddieppois- we advised measure dev to remove the alias. Here is the cql file: CMS190v11.txt and measure CMS190-v11-1-001-QDM-5-6 (1).zip. thank you!

adongare avatar Nov 30 '23 19:11 adongare