Hl7.Cql.Packager 2.3.1

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global Hl7.Cql.Packager --version 2.3.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Hl7.Cql.Packager --version 2.3.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Hl7.Cql.Packager&version=2.3.1
                    
nuke :add-package Hl7.Cql.Packager --version 2.3.1
                    

Build Status

Introduction

This is NCQA's and Firely's official support SDK for working with CQL on the Microsoft .NET (dotnet) platform. It contains an engine for executing ELM, and/or turning the contents of an ELM file into a .NET assembly so it can be called statically.

The engine has been tested by running it against the current NCQA HEDIS measures and CMS measures. There is quite some variation in how CQL is written and interpreted, so it is likely at this early stage that there will be deviations from other engines currently available.

Release Notes

This is release version 2.3.1 of the engine.

The releases notes at firely-cql-sdk/releases for each major version will document these changes and (major) issues we have encountered.

1.* Releases will be maintained with hotfixes, but will not receive new features.

Getting Started

The presentation is a good place to start, but note that we have made some minor changes to the public surface, so the names of the classes in the presentation will differ from the examples in the Demo project itself.

SDK Packages

This SDK consists of the following packages:

Core Packages

  • Hl7.Cql: The main package providing complete CQL engine functionality
  • Hl7.Cql.Abstractions: Core interfaces and abstractions used throughout the SDK
  • Hl7.Cql.Runtime: Runtime execution engine for CQL expressions
  • Hl7.Cql.Compiler: ELM to .NET compilation
  • Hl7.Cql.Invocation: High-level APIs for invoking CQL libraries and expressions

Integration & Data Packages

  • Hl7.Cql.Firely: FHIR integration layer
  • Hl7.Cql.Model: Model definitions and metadata
  • Hl7.Cql.Packaging: CQL packaging functionality

Conversion & Code Generation

  • Hl7.Cql.CqlToElm: CQL to ELM conversion (early development, not production-ready)
  • CodeGeneration.NET: .NET code generation utilities
  • Elm: ELM abstractions and utilities

Support Packages

  • Hl7.Cql.Grammar: CQL grammar definitions using ANTLR4
  • Iso8601: ISO 8601 date/time handling

Tools

  • PackagerCLI (cql-package): Command-line tool for packaging CQL/ELM into FHIR resources and .NET assemblies

External Dependencies

The SDK depends on the following key external packages:

FHIR Support

  • Hl7.Fhir.Base: Version 5.12.0 - Base classes and utilities for FHIR support
  • Hl7.Fhir.R4: Firely SDK version - FHIR R4 POCOs and serialization support
  • Fhir.Metrics: Version 1.3.0 - FHIR units and metrics support

Parsing & Compilation

  • Antlr4.Runtime.Standard: Version 4.13.1 - ANTLR4 runtime for CQL grammar parsing
  • Microsoft.CodeAnalysis.CSharp: Version 4.12.0 - Roslyn C# compiler APIs

Configuration & Logging

  • Microsoft.Extensions.Configuration: Version 9.0.3 - Configuration framework
  • Microsoft.Extensions.DependencyInjection: Version 8.0.0 - Dependency injection container
  • Microsoft.Extensions.Logging: Version 8.0.0 - Logging abstractions
  • Microsoft.Extensions.Hosting: Version 8.0.0 - Generic host for .NET applications

Command-line Tool Dependencies

  • Serilog.Extensions.Logging: Version 9.0.1 - Serilog integration with Microsoft.Extensions.Logging
  • Serilog.Sinks.File: Version 7.0.0 - Serilog file logging sink
  • System.CommandLine: Version 2.0.0-beta4.22272.1 - Command-line argument parsing

Serialization

  • System.Text.Json: Version 8.0.5 - High-performance JSON serialization

Dev Start

During development, pre-releases will appear on Firely's GitHub Package feed. To use these packages you must add https://nuget.pkg.github.com/FirelyTeam/index.json to your NuGet sources:

  • Get a Personal Access token (PAT) from github.com with scope read:packages

  • Next open a console on your machine and run dotnet nuget add source --name github --username <USERNAME> --password <PAT> https://nuget.pkg.github.com/FirelyTeam/index.json

USERNAME: your username on GitHub PAT: your Personal access token with at least the scope read:packages

Further information can be found in docs/getting-started.md.

Support

We actively monitor the issues coming in through the GitHub repository at https://github.com/FirelyTeam/firely-cql-sdk/issues. You are welcome to register your bugs and feature suggestions there. For questions and broader discussions, we use the .NET FHIR Implementers chat and CQL chat on Zulip.

Contributing

We are welcoming contributions!

If you want to participate in this project, we're using Git Flow for our branch management. Please submit PRs with changes against the develop branch.

Current 2.x development is done against the develop branch, while hotfixes are done under the support/1.x branch. Please refer to our Git Branching and Workflow Guidelines on the wiki for detailed guidelines on git branching and naming conventions.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
2.14.0 116 8/20/2026
2.13.0 105 8/13/2026
2.12.0 119 8/5/2026
2.11.0 114 7/30/2026
2.10.0 110 7/21/2026
2.9.2 121 7/8/2026
2.9.1 117 7/7/2026
2.9.0 138 6/12/2026
2.8.2 128 6/10/2026
2.8.1 121 6/4/2026
2.8.0 116 6/3/2026
2.7.0 130 5/21/2026
2.6.0 179 3/17/2026
2.5.0 148 2/20/2026
2.4.0 406 1/15/2026
2.3.1 157 1/8/2026
2.2.0 361 10/16/2025
2.1.0 355 8/19/2025
2.1.0-rc.1 191 8/13/2025
2.1.0-beta.1 207 7/9/2025
Loading failed