[CQM-4613] Need to understand - Global.NormalizeInterval(pointInTime DateTime, period Interval<DateTime>) functionality Created: 05/19/21  Updated: 05/27/21  Resolved: 05/27/21

Status: Closed
Project: eCQM Issue Tracker
Component/s: None

Type: None Priority: Blocker
Reporter: Aditi Waje (Inactive) Assignee: Joelencia Leflore
Resolution: Answered Votes: 0
Labels: None

Solution: Thank you for the question. With the introduction of "relevantDatetime" elements to several data types in the QDM 5.5 release, measure authors and measure implementers have a choice of representation for the "relevant" timing of these data types. The 'Normalize Interval' function is now used in all measures containing data types that have both a relevantDatetime and relevantPeriod. The Normalize Interval function is meant to account for differences in EHR vendors' capture of timings of measure criteria, and to decrease implementation burden due to variable use of timing attributes for the same QDM datatypes used across measures. Knowing the rationale of using the ‘Normalize Interval’ function should make it easier to understand how the function is structured.



Question #1: As suggested in the rationale above, the ‘Normalize Interval’ function can use either Relevant dateTime or Relevant Period depending on data submission. You are correct that if relevant Datetime is available in the patient data, this point of time will be populated in the Interval[RelevantdateTime, RelevantdateTime] for the time comparison during measure process, even though it is a single point in time. The measure then assessed whether this point in time meets the measure criteria, e.g. “ends on day after start of qualifying encounter.”

Question #2.1: A General or Neuraxial Anesthesia procedure should be performed for a period of time. For example, the procedure’s End datetime can be used for procedures performed late at night and ending early the next morning. Because of the flexibility of the NormalizeInterval() function, if only one point of time is submitted, the function will use that point in time as the end date of the procedure.

 

Question #2.2: Again, a General or Neuraxial Anesthesia procedure should be performed for a period of time. If patient data has both relevantDatetime and relevantPeriod, the function will process relevantDatetime first, as described in the function. The measure will only look for relevantPeriod if relevantDatetime is null.

 

Global.NormalizeInterval(pointInTime DateTime, period Interval<DateTime>)

if pointInTime is not null then Interval[pointInTime, pointInTime]

 else if period is not null then period

  else null as Interval<DateTime>​
Solution Posted On:
Measure Type: EH
Measure Title: Venous Thromboembolism Prophylaxis

 Description   

Hi Team,

Consider statements below from CMS108v10:

One of the Denominator Exclusions criteria states:

Encounter With Intervention Comfort Measures on Day of or Day After Procedure
from
VTE."Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
["Procedure, Performed": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
"Intervention Comfort Measures" ComfortMeasures
where Global."NormalizeInterval" ( AnesthesiaProcedure.relevantDatetime, AnesthesiaProcedure.relevantPeriod ) ends 1 day after day of start of QualifyingEncounter.relevantPeriod
and Coalesce(start of Global."NormalizeInterval"(ComfortMeasures.relevantDatetime, ComfortMeasures.relevantPeriod), ComfortMeasures.authorDatetime)during TJC."CalendarDayOfOrDayAfter" (
end of Global."NormalizeInterval" ( AnesthesiaProcedure.relevantDatetime, AnesthesiaProcedure.relevantPeriod ) )
return QualifyingEncounter

Functions:

Global.NormalizeInterval(pointInTime DateTime, period Interval<DateTime>)
if pointInTime is not null then Interval[pointInTime, pointInTime]
else if period is not null then period
else null as Interval<DateTime>

Queries:

1. As per QDMv5,
a. Relevant dateTime references timing for an assessment that occurs at a single point in time.
b. Relevant period is the default, or general, method to describe a start to stop time that occurs over a time interval

Question #1:
As per definition Relevant dateTime represents single point in time.
So we need to understand then, how are we supposed to define "Interval[pointInTime, pointInTime]" because for an Interval, we need two points in time?

Question #2:
Consider the statement, Global."NormalizeInterval" ( AnesthesiaProcedure.relevantDatetime, AnesthesiaProcedure.relevantPeriod ) ends 1 day after day of start of QualifyingEncounter.relevantPeriod.

Question #2.1:
AnesthesiaProcedure.relevantDatetime as per our understanding from the QDM, references to "the time the procedure is performed when the procedure occurs at a single point in time".
How are we supposed to determine 'end date' to satisfy "ends 1 day after day of start of QualifyingEncounter.relevantPeriod" part?

Question #2.2:
We need to understand whether AnesthesiaProcedure.relevantDatetime and AnesthesiaProcedure.relevantPeriod share a 'union or OR' relationship, because how are we otherwise supposed to determine interval between the two?

Request you to assist on above queries urgently as client deliverables are dependent upon it.



 Comments   
Comment by Joelencia Leflore [ 05/21/21 ]

Thank you for submitting your question. We will review your ticket and provide a response as soon as possible.

Comment by eCQI Standards Team (Inactive) [ 05/20/21 ]

Because this issue involves measure intent, we request the eCQM team review the response and confirm accuracy. Thank you, PMuir MD ESAC Standards Team

Comment by eCQI Standards Team (Inactive) [ 05/20/21 ]

Because this issue involves measure intent, we request the eCQM team review the response and confirm accuracy.

Question: Need to understand -
Global.NormalizeInterval(pointInTime DateTime, period Interval<DateTime>) functionality.

Consider statements below from CMS108v10:
One of the Denominator Exclusions criteria states:
define "Encounter With Intervention Comfort Measures on Day of or Day After Procedure":
from
VTE."Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
["Procedure, Performed": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
"Intervention Comfort Measures" ComfortMeasures
where Global."NormalizeInterval" ( AnesthesiaProcedure.relevantDatetime, AnesthesiaProcedure.relevantPeriod ) ends 1 day after day of start of QualifyingEncounter.relevantPeriod
and Coalesce(start of Global."NormalizeInterval"(ComfortMeasures.relevantDatetime, ComfortMeasures.relevantPeriod), ComfortMeasures.authorDatetime)during TJC."CalendarDayOfOrDayAfter" (
end of Global."NormalizeInterval" ( AnesthesiaProcedure.relevantDatetime, AnesthesiaProcedure.relevantPeriod ) )
return QualifyingEncounter

Global Functions from MATGlobalCommonFunctions-6.2.000.cql:
/Given a datetime and a period, returns the period (if a period is provided) or the interval beginning and ending on the datetime (if a datetime is provided)/
define function "NormalizeInterval"(pointInTime DateTime, period Interval<DateTime> ):
if pointInTime is not null then Interval[pointInTime, pointInTime]
else if period is not null then period
else null as Interval<DateTime>

Queries:
1. As per QDMv5,
a. Relevant dateTime references timing for an assessment that occurs at a single point in time.
b. Relevant period is the default, or general, method to describe a start to stop time that occurs over a time interval.

Question #1:
As per definition Relevant dateTime represents single point in time.
So we need to understand then, how are we supposed to define "Interval[pointInTime, pointInTime]" because for an Interval, we need two points in time?

Question #2:
Consider the statement, Global."NormalizeInterval" ( AnesthesiaProcedure.relevantDatetime, AnesthesiaProcedure.relevantPeriod ) ends 1 day after day of start of QualifyingEncounter.relevantPeriod.

Question #2.1:
AnesthesiaProcedure.relevantDatetime as per our understanding from the QDM, references to "the time the procedure is performed when the procedure occurs at a single point in time".
How are we supposed to determine 'end date' to satisfy "ends 1 day after day of start of QualifyingEncounter.relevantPeriod" part?

Question #2.2:
We need to understand whether AnesthesiaProcedure.relevantDatetime and AnesthesiaProcedure.relevantPeriod share a 'union or OR' relationship, because how are we otherwise supposed to determine interval between the two?

Response:
This response is based upon the measure CQL as per the cql file contained within the CMS108v10.zip available on the eCQI Resource Center. Please contact the eCQM Team for questions regarding measure intent.
The referenced measure CMS108v10 for Measurement Period 2022 is a proportional process measure for Eligible Hospitals as noted in the html description and guidance.
Implementers should always have the Clinical Quality Language Specification available from https://cql.hl7.org/ with particular attention to the Author’s Guide, Developer’s Guide, Appendix B and H.

Question #1:
So we need to understand then, how are we supposed to define "Interval[pointInTime, pointInTime]" because for an Interval, we need two points in time?
Data in the EHR may be represented as relevantDatetime or as relevantPeriod for the same concept. In the hospital setting, a procedure such as a colonoscopy may contain the start and end times as a period; however, the procedure would usually be recorded as a dateTime in the medical history. It certainly would be recorded as a dateTime in an ambulatory office EHR.

define function "NormalizeInterval"(pointInTime DateTime, period Interval<DateTime> ):
if pointInTime is not null then Interval[pointInTime, pointInTime]
else if period is not null then period
else null as Interval<DateTime>

To enable the capture of data from either datatype, the NormalizeInterval first evaluates the input relevantDatetime which, if not null, will be assigned to both the Interval start (lo) and end (hi) values to represent a single point in time as an Interval datatype. If the input relevantDatetime is null, then the relevantPeriod start and end times are assigned to the Interval. If both the relevantDatetime and relevantPeriod are null, then null is returned as an Interval<DateTime> datatype.

Therefore, while an Interval<DateTime> datatype has a start (lo) and end (hi), the start and end times could be identical which would represent a single point in time.

Question #2.1:
AnesthesiaProcedure.relevantDatetime as per our understanding from the QDM, references to "the time the procedure is performed when the procedure occurs at a single point in time".
How are we supposed to determine 'end date' to satisfy "ends 1 day after day of start of QualifyingEncounter.relevantPeriod" part?

Global."NormalizeInterval" ( AnesthesiaProcedure.relevantDatetime, AnesthesiaProcedure.relevantPeriod ) will assign an incoming relevantDatetime to both the start (lo) and end (hi) of the Interval [start, end]; thus, the return of the NormalizeInterval function provides the 'end' of the relevantDatetime for the rest of the expression.

Question #2.2:
We need to understand whether AnesthesiaProcedure.relevantDatetime and AnesthesiaProcedure.relevantPeriod share a 'union or OR' relationship, because how are we otherwise supposed to determine interval between the two?

"NormalizeInterval" ( AnesthesiaProcedure.relevantDatetime, AnesthesiaProcedure.relevantPeriod )

AnesthesiaProcedure.relevantDatetime and AnesthesiaProcedure.relevantPeriod are the attributes provided to the NormalizeInterval function. As noted in the above responses, these two datatypes do not utilize ‘UNION / OR’ relationships, but are converted by the NormalizeInterval into a single Interval(DateTime).

I hope that this explanation is beneficial
PMuir MD ESAC Standards Team

Because this issue involves measure intent, we request the eCQM team review the response and confirm accuracy. (anticipate CQLIT-274 >>> CQM-4613

Comment by eCQI Standards Team (Inactive) [ 05/20/21 ]

Thank you for your question. Review in progress.

Generated at Mon Apr 13 12:18:42 UTC 2026 using Jira 10.3.18#10030018-sha1:5642e4ad348b6c2a83ebdba689d04763a2393cab.