2.2.0
CQL Execution 2.2.0 contains a significant number of fixes and enhancements to improve alignment with the CQL 1.4 and CQL 1.5 specifications. These changes include:
- Replace
moment
dependency library withluxon
and better leverage its capabilities (#215) - Replace
ucum
dependency library with@lhncbc/ucum-lhc
(#217) - Add support for list operators:
Skip
,Tail
,Take
(#169, #170, #171) - Add support for
ReplaceMatches
(#162) - Add support for
Min
andMax
for lists of strings (#181) - Add support for basic arithmetic with uncertainties (#177)
- Add support for "strict" cast (
cast as
) (#174) - Add
patientEvaluatedRecords
toResult
class to return evaluated records per patient (#232) - Fix conversions between
String
andTime
values (#199, #200) - Fix
Matches
to require match on entire string (#197) - Fix behavior of date arithmetic when arithmetic results in invalid date (#191)
- Fix duration calculations with uncertain dates (#192, #202)
- Fix
Equivalent
to properly normalize units when operating on quantities (#190) - Fix
Expand
whenper
unit uses plural CQL duration unit (#193) - Fix
Truncate
andTruncatedDivide
behavior for negative numbers (#188, #189) - Fix
Divide
when dividing aQuantity
by aDecimal
(#183) - Fix (swapped) implementation of
StdDev
andPopulationStdDev
(#182) - Fix (swapped) implementation of
Variance
andPopulationVariance
(#49) - Fix
Minimum
andMaximum
values of theDecimal
type (#185) - Fix various minor bugs related to casting (#224)
- Fix
Result.evaluatedRecords
to contain all records when used w/ multiple patients (#232) - Fix
SameOrBefore
,SameOrAfter
, andMultiply
when null arguments are used (#205) - Fix
Contains
andIn
operator to returnfalse
when the list argument is null (#164) - Fix
Contains
andIn
operator to returnfalse
when the interval argument is null (#194, #195) - Fix
Split
andSplitOnMatches
to treatnull
separator as no split (#198) - Fix
AllTrue
to ignore null elements (#172) - Fix
Log
,Ln
, andModulo
to returnnull
instead ofNaN
(#184) - Fix
Distinct
andIntersect
to treat all null elements as equal (#165, #167) - Fix
Except
to treat second argument as an empty list when it is null (#166) - Fix
Power
to returnnull
when both arguments are null (#187) - Fix
Length
andCount
operators to return0
when the list argument is null (#168, #173) - Fix various issues related to intervals boundaries, expecially when null (#196, #218)
- Do not represent the offset in
Time
values (#203) - Use smallest quantity unit when performing arithmetic on quantities with different (but compatible) units (#186)
Specification-Provided Tests
As part of the most recent development effort, the cql-execution
project source code was updated to support running the CQL tests provided by the CQL specification. For technical details, see Clinical Quality Language Tests in the CQL specification and spec-tests in the cql-execution
GitHub repository.
CQL Execution 2.x Releases
CQL Execution 2.0.0 introduced a new JavaScript code base and several new features. If you have not read the CQL Execution 2.0.0 Release Notes, we recommend you do so.