Hl7.Cql.Packager 2.1.0-alpha.18

This is a prerelease version of Hl7.Cql.Packager.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet tool install --global Hl7.Cql.Packager --version 2.1.0-alpha.18
                    
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.1.0-alpha.18
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Hl7.Cql.Packager&version=2.1.0-alpha.18&prerelease
                    
nuke :add-package Hl7.Cql.Packager --version 2.1.0-alpha.18
                    

HL7 CQL Packager

A .NET tool that packages CQL, ELM, and build outputs into a FHIR Library resource.

Overview

The HL7 CQL Packager performs the following steps:

  1. CQL to ELM Conversion: Converts CQL files into ELM JSON files.
  2. ELM to C#: Converts ELM JSON files into Linq.Expressions, then translates these expressions into C# code. Each ELM file is converted into a class, with each function within that file becoming a public method in the class.
  3. C# to .NET DLL Compilation: Compiles the generated C# code into a single assembly per ELM file.
  4. Packaging to FHIR Libraries/Measures: Packages the assembly (and optionally the original CQL, ELM, and C# source code) into a FHIR Library resource, creating one resource per original ELM file. Where applicable, FHIR Measure resources are also generated.

Limitations

The tool does not convert CQL into ELM yet. You need to use the existing Java-based tooling for this conversion.

Getting Started

Installation

Install the packager tool globally using the following command:

dotnet tool install Hl7.Cql.Packager --global --prerelease

Note: The --prerelease option is required because only prerelease versions are currently available.

Usage

Get help for the command line tool by running any of the following commands:

cql-package --help
cql-package cql --help
cql-package elm --help

Example

cql-package elm --elm Elm\json --cql Cql\input --fhir c:\packager-output-fhir --cs c:\packager-output-cs

This command packages the ELM and CQL files from the specified directories and writes the generated FHIR Resources and C# code to the respective directories.

Further Reading

The CQL Packager tool is part of the Firely CQL SDK. More information can be found at Firely’s documentation site.

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.1.0-beta.1 116 7/9/2025
2.1.0-alpha.18 157 5/20/2025
2.0.17-alpha 206 5/12/2025
2.0.16-alpha 131 5/1/2025
2.0.14-alpha 191 4/8/2025
2.0.13-alpha 138 3/20/2025
2.0.12-alpha 312 2/11/2025
2.0.11-alpha 110 2/11/2025
2.0.10-alpha 118 1/16/2025
2.0.8-alpha 219 12/4/2024
2.0.7-alpha 78 11/19/2024
2.0.4-alpha 108 9/20/2024
2.0.3-alpha 117 9/4/2024
2.0.2-alpha 87 9/4/2024
2.0.1-alpha 129 8/21/2024
2.0.0-alpha 95 6/17/2024
1.0.0-rc3 89 7/10/2024
1.0.0-rc2 414 10/23/2023
1.0.0-rc1 123 9/7/2023