Welcome to the first installment of the Teach Me CQL series.
This series is presented by the Centers for Medicare and Medicaid Services (CMS).
It is intended to support healthcare quality leaders, health IT vendors, and measure developers
explore the use of Clinical Quality Language or CQL.
In this segment, we’ll discuss the Normalize Interval function found in the Global Common Library
used across the CMS program eCQMs.
This function was introduced into the CMS program eCQMs when they were posted in May 2021 for performance period 2022.
The purpose of this function is to help simplify logic looking at clinical data elements like labs
that may have either a date time or an interval associated with it.
Before we jump in, let’s talk about the global common library or GCL as it is commonly referred as.
You may be familiar with this shared library as it is used in nearly all CMS program eCQMs.
This shared library contains agreed upon definitions and functions
that are maintained by eCQM developers and used in eCQM program measures from year to year.
This shared library allows measure developers to more easily reference frequently used chunks of CQL logic across eCQMs.
This benefits measure developers and implementers since in promotes the use of the
same chunks of logic across eCQMs and decreases variation in eCQM specifications.
Now that you are familiar with the global common library, let’s jump into the NormalizeInterval function.
We will be using two versions of CMS 146 Appropriate Testing for Pharyngitis (v9 and v11).
But first, let’s take a look at the NormalizeInterval function.
If we go the functions section of the eCQM we see the function states:
if pointInTime is not null then Interval[pointInTime, pointInTime]
else if period is not null then period else null as Interval
So before we go any farther, let’s define a couple of things.
First the term ‘pointInTime’ is an alias or nickname to the input attribute representing the date and time for the data element.
Second, the term ‘period’ is also an alias representing the Interval(start dateTime, stop dateTime) of a data element.
Let’s walk through this function line by line to understand how it works.
We will start with the first lines.
They state that if your data type, for example a lab test, has a point in time reference, like a relevant dateTime,
an interval will be created using the relevant date as the start and stop point for the interval.
The third line states that if your data type has a period associated with it, that period will be returned.
And the fourth line states that if the period is not populated (or is null)
the function would return a null of datatype Interval but would not be an Interval with a start and end of null.
Let’s look at an example of logic before and after adding in the NormalizeInterval function to see what this function is doing.
We will review CMS 146 Appropriate Testing for Pharyngitis version 9 for performance period 2021.
The numerator logic for this measure is looking for: ‘A group A streptococcus test in the seven-day period from three days prior
to the episode date through three days after the episode date’ as stated in the measure header.
The logic for the numerator looks like this.
You can see here that the logic is looking for the strep test with a point in time – relevantDatetime
– that is less 3 days before or after the end of the encounter.
Now let’s turn and look at v11 from performance period 2023 of this measure.
As we see in the header section, the numerator statement has not changed from
‘group A streptococcus test in the seven-day period from three days prior to the episode date through three days after the episode date’
The logic has now been updated to include the ‘NormalizeInterval’ function from the Global Common Library:
The inclusion of the NormalizeInterval function, along with the use of ‘within’, has simplified the logic.
It also allows more flexibility on the reporting of the measure – the measure can accommodate institutions that use an
interval or a datetime to represent the time that the lab test is taken – in this case the strep test.
The ‘NormalizeInterval’ function will take the data and “normalize” or convert it
so that it can be used in the measure for calculation.
You now have a better understanding of the NormalizeInterval function.
Come back for our next installment where we will discuss time zone considerations for eCQMs.