Uploaded image for project: 'CQL Issue Tracker'
  1. CQL Issue Tracker
  2. CQLIT-97

Age calculation ought to return a Quantity data type, not an Integer (RY 2019)

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Moderate Moderate
    • None
    • This issue frustrates the calculation of patient age in the Initial Population unnecessarily, and it detracts from one of the nice benefits of moving to CQL.
    • All eCQMs

      With CQL, we now have the "Quantity" data type, which is defined as holding a value and a unit to describe some sort of physical phenomenon. However instead of using this data type, all the eCQMs that have an age restriction use the "CalculateAgeInYears" function, which returns an Integer, and the fact that the assumed unit is "years" is located in the name of the function.

      Currently you see this often:
      CalendarAge*InYears*At(<input parameters>)>= 18

      Instead, age calculations ought to be defined like this:
      CalendarAgeAt(<input parameters>)>= 18 "years"

            bryn_rhodes Bryn Rhodes
            cquinlan Carsten (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: