Skip to content

Releases: cqframework/cql-execution

2.4.3

26 Oct 18:45
1c6fd23
Compare
Choose a tag to compare

What's Changed

  • Fix Context.childContext(null) to default to empty context_values object by @cmoesel in #282

Fixes #277

Full Changelog: v2.4.2...v2.4.3

3.0.0 Beta 1

04 Oct 21:14
Compare
Choose a tag to compare
3.0.0 Beta 1 Pre-release
Pre-release

Overview

CQL Execution 3.0.0 Beta 1 is the first release of CQL Execution to support an asynchronous execution flow. Patients are still processed in a serial fashion, but calls to the DataProvider (a.k.a. PatientSource) and TerminologyProvider (a.k.a. CodeService) can now happen asynchronously. This allows for these providers to more easily leverage web services and databases for their data.

Breaking Changes

This is a breaking change. Implementers are required to make minor updates to their code to use this release. The code snippets below demonstrate the old way of invoking the v2.x.x engine and two ways to invoke the 3.x.x engine.

// v2.x.x usage
const result = executor.exec(patientSource);
// Do something with result

// v3.x.x usage
executor.exec(patientSource).then((result) => {
  // Do something with result
})

// or

const result = await executor.exec(patientSource);
// Do something with result

Existing implementations of DataProvider (PatientSource) and TerminologyProvider (CodeService) will continue to work as-is. Implementers who maintain their own implementations of these services may want to consider updating them to return results asynchronously.

For more information, see the V2 to V3 Migration Guide.

Installation

To install this beta release in your project, run the following command:

npm install --save [email protected]

This is a beta release and is subject to change. We welcome your feedback.

2.4.2

09 Sep 12:56
Compare
Choose a tag to compare

CQL Execution 2.4.2 fixes a bug that was exposed by changes in 2.4.1

  • AgeInYears and AgeInMonths now calculates age using Date resolution (not DateTime resolution) (#273)

In addition, CQL Execution 2.4.2 updates its TypeScript configuration to target ES2017. This is not expected to impact users, as it does not change existing browser or Node.js requirements. See #270.

2.4.1

20 May 16:15
Compare
Choose a tag to compare

CQL Execution 2.4.1 addresses two issues related to incorrect implementation of CQL behavior:

  • Time values should be unspecified when converting Date to DateTime (#263)
  • Timezone offset should not be considered when comparing with year, month, or day precision (#264)

In addition, CQL Execution 2.4.1 expands the API for findRecords to include the entire ELM Retrieve expression instance as an optional second argument. This has no effect on existing PatientSource implementations, but developers can choose to use the new argument if desired. See #265.

2.4.0 (TypeScript Release)

21 Feb 19:22
Compare
Choose a tag to compare

CQL Execution 2.4.0 is the first release built from TypeScript sources. JavaScript consumers of the cql-execution library should notice no differences, as the runtime behavior of the library has not changed (nor has its API). That said, the targeted ES5 distribution is now compiled using tsc rather than babel, so please let us know if you notice an (unintended) differences in behavior.

TypeScript developers who use cql-execution as a dependency will find that they no longer need to define their own .d.ts files, as cql-execution is now published with its own type definitions. Please note, however, that this initial release was aimed at achieving basic TypeScript capabilities and leaves many arguments and properties typed as any. In the future, these types will be gradually updated as the code evolves. For this initial release, however, we have tried to define detailed types for the most common API integration points.

Many thanks to Matt Gramigna (@mgramigna) for contributing this initial port from JavaScript to TypeScript!

2.3.3

20 Oct 15:37
Compare
Choose a tag to compare

CQL Execution 2.3.3 addresses several recently reported issues and limitations:

  • Fixes sorting by expression when the expression returns null (#248)
  • Adds support for ascending/descending keywords (in addition to asc/desc) (#254)
  • Fixes collapse on Date intervals and Time intervals when no per unit is provided (#255)
  • Adds support for the new boolean overload of ToInteger (#257)

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.

2.3.2

13 Sep 15:14
Compare
Choose a tag to compare

CQL Execution 2.3.2 fixes a bug in loading libraries that were compiled to ELM as part of the FHIR IG Publisher process. In this case, these libraries have system namespaces in their identifiers and use these namespaces in includes paths. Previous versions of CQL Execution did not correctly resolve included libraries when namespaces were present in the path. The 2.3.2 release fixes this problem while continuing to maintain support for libraries that do not use namespaces.

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.

2.3.1

13 Jul 13:13
Compare
Choose a tag to compare

CQL Execution 2.3.1 fixes a bug in the Repository class that prevented libraries from being properly included without specifying a version. For example, the following would work (assuming the library is loaded):

include MyDependencyLibrary version '0.0.1' called MDL

but if the version was omitted, it would fail:

include MyDependencyLibrary called MDL

This is now fixed so both cases (with version and without version) work as expected.

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.

2.3.0

30 Jun 16:17
Compare
Choose a tag to compare

CQL Execution 2.3.0 contains several fixes and enhancements to improve alignment with the CQL 1.4 and CQL 1.5 specifications. These changes include:

  • Support for new CQL 1.5 aggregate queries (#208)
  • Support for Message operator (#176) (details below)
  • Support for Precision operator for Date/DateTime/Time (#245 / #160)
  • Support for Ratio argument on the ToQuantity operator (#235)
  • Fixes support for using code systems from included libraries (#243)
  • Fixes ToQuantity to properly use unit 1 where applicable (#235)
  • Fixes union when one of the lists in null (#242)
  • Updates to dependency libraries

Message Operator

The Message operator is used to send messages to the CQL framework. Implementers can register for these messages by creating a message listener and passing it in as an argument to the Executor. For more details, see MessageListener and Executing CQL Libraries in the Overview documentation.

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.

2.2.0

04 Mar 18:05
7cfd977
Compare
Choose a tag to compare

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 with luxon 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 and Max for lists of strings (#181)
  • Add support for basic arithmetic with uncertainties (#177)
  • Add support for "strict" cast (cast as) (#174)
  • Add patientEvaluatedRecords to Result class to return evaluated records per patient (#232)
  • Fix conversions between String and Time 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 when per unit uses plural CQL duration unit (#193)
  • Fix Truncate and TruncatedDivide behavior for negative numbers (#188, #189)
  • Fix Divide when dividing a Quantity by a Decimal (#183)
  • Fix (swapped) implementation of StdDev and PopulationStdDev (#182)
  • Fix (swapped) implementation of Variance and PopulationVariance (#49)
  • Fix Minimum and Maximum values of the Decimal 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, and Multiply when null arguments are used (#205)
  • Fix Contains and In operator to return false when the list argument is null (#164)
  • Fix Contains and In operator to return false when the interval argument is null (#194, #195)
  • Fix Split and SplitOnMatches to treat null separator as no split (#198)
  • Fix AllTrue to ignore null elements (#172)
  • Fix Log, Ln, and Modulo to return null instead of NaN (#184)
  • Fix Distinct and Intersect 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 return null when both arguments are null (#187)
  • Fix Length and Count operators to return 0 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.