#cql #expression #parser #language #clinical #elm #model-output

bin+lib octofhir-cql

Clinical Quality Language (CQL) implementation for Rust

1 unstable release

Uses new Rust 2024

0.1.0 Feb 2, 2026

#5 in #clinical

MIT/Apache

1.5MB
29K SLoC

Clinical Quality Language (CQL) implementation for Rust

This crate provides a complete CQL 1.5 implementation including:

  • Parsing CQL expressions and libraries
  • Type checking and semantic analysis
  • ELM (Expression Logical Model) output
  • Expression evaluation
  • Version-agnostic FHIR support

Example

use octofhir_cql::parse;

let cql = r#"
library Example version '1.0.0'

define InPopulation:
    AgeInYears() >= 18
"#;

let library = parse(cql)?;

octofhir-cql

Clinical Quality Language (CQL) implementation for Rust.

Overview

This is the main crate of the cql-rs workspace. It provides the high-level API for parsing, type-checking, translating (to ELM), and evaluating CQL expressions against FHIR data.

License

MIT OR Apache-2.0

Dependencies

~22–60MB
~1M SLoC