Expand description
Evaluate SNOMED CT Expression Constraint Language against an index built from an RF2 Snapshot, inside your own process.
store::NumericStore opens an index, ecl::parse parses an expression
and eval::evaluate returns the matching concepts as ordinals, which
resolve to SCTIDs through store.ids. Open the store once and reuse it.
use snomed_ecl_engine::{ecl, eval, store::NumericStore};
use std::path::Path;
let store = NumericStore::open(Path::new("uk.ecl"))?;
let expression = ecl::parse("<< 64572001 |Disease|")?;
let ordinals = eval::evaluate(&store, &expression)?;
let codes: Vec<u64> = ordinals.iter().map(|&o| store.ids[o as usize]).collect();Features: import (default) builds indexes from RF2 archives; unicode
links ICU for term matching in description filters. Without import, the
crate can still open, query, pack and verify existing indexes.
Modulesยง
- config
- Bind edition-specific names without changing the ECL parser.
- decimal
- Exact decimal comparison without conversion to binary floating point.
- detail
- Everything a browser shows for one concept, resolved in a single pass.
- ecl
- ECL 2.3 parsing. Unsupported constructs fail before evaluation.
- eval
- Sorted ordinal sets with bounded evaluation work and temporary storage.
- import
- store
- text
- Unicode collation support for ECL text predicates.