README.md

March 27, 2026 · View on GitHub

ECL Language Tools

ECL Language Tools

CI Security: Trivy + Semgrep ECL 2.2 Node.js License

IDE support for SNOMED CT Expression Constraint Language (ECL) 2.2 — parsing, validation, completion, formatting, refactoring, and terminology integration across 7 editors, the browser, and Slack.

Screenshots

Syntax HighlightingError Diagnostics
Syntax HighlightingError Diagnostics
AutocompletionHover Information
AutocompletionHover Information
Dark Theme
Dark Theme

What is ECL?

Expression Constraint Language (ECL) is the standard query language for SNOMED CT, the world's most comprehensive clinical terminology. ECL expressions define sets of clinical concepts — for use in value sets, clinical decision support, analytics, and data validation. See the ECL Specification.

Packages

PackageDescriptionInstall
@aehrc/ecl-coreZero-dependency core library (parser, formatter, validation, completion, refactoring, terminology, knowledge)npm install @aehrc/ecl-core
@aehrc/ecl-lsp-serverLSP server for IDE integrationnpm install -g @aehrc/ecl-lsp-server
@aehrc/ecl-editor-coreHeadless Monaco Editor integrationnpm install @aehrc/ecl-editor-core
@aehrc/ecl-editor-reactReact componentnpm install @aehrc/ecl-editor-react
@aehrc/ecl-editorWeb Component (<ecl-editor>)npm install @aehrc/ecl-editor
@aehrc/ecl-slack-botSlack bot for validating, formatting, and evaluating ECL expressionsDocker

IDE Clients

EditorTypeLink
VSCodeExtension (VSIX)clients/vscode
IntelliJ IDEAPlugin (Kotlin/Gradle)clients/intellij
EclipsePlugin (LSP4E/TM4E)clients/eclipse
NeovimLSP configclients/neovim
Sublime TextLSP configclients/sublime
Emacseglot/lsp-mode configclients/emacs
Claude CodePluginclients/claude-code

Features

FeatureDescription
DiagnosticsSyntax errors, inactive/unknown concept warnings, semantic validation
CompletionContext-aware operators, keywords, filter values, SNOMED CT concept search, 18 snippets
HoverOperator documentation, concept information (FSN, PT, active status)
FormattingDocument and range formatting with 9 configurable options
Code Actions8 refactoring actions (strip/add display terms, simplify, parentheses, history supplement, description filter)
Code Lens"Evaluate" lens with inline concept count
Semantic TokensToken-level highlighting
SNOMED CT EditionStatus bar selector for edition/version switching
FHIR IntegrationConcept lookup, ECL evaluation, concept search via FHIR terminology server

Full ECL 2.2 coverage: constraint operators, logical operators, refinements, dotted expressions, member of, concrete values, filters, history supplements, nested expressions, and comments.

Quick Start

git clone https://github.com/aehrc/ecl-lsp.git && cd ecl-lsp
npm install          # Installs all workspace dependencies
npm run compile      # Compiles all packages
npm test             # Runs 1653+ tests

Then open the project in VSCode and press F5 to launch with the ECL extension, or install @aehrc/ecl-lsp-server globally and configure your preferred editor (see IDE Clients).

Project Structure

ecl-lsp/
├── grammar/                  ANTLR4 ECL grammar (official IHTSDO)
├── shared/syntaxes/          TextMate grammar (shared across clients)
├── packages/
│   ├── ecl-core/             Core library (parser, formatter, completion, refactoring, semantic, terminology, knowledge)
│   ├── ecl-lsp-server/       LSP server
│   ├── ecl-editor-core/      Monaco Editor integration
│   ├── ecl-editor-react/     React component
│   ├── ecl-editor/           Web Component
│   └── ecl-slack-bot/        Slack bot
├── clients/
│   ├── vscode/               VSCode extension
│   ├── intellij/             IntelliJ IDEA plugin
│   ├── eclipse/              Eclipse IDE plugin
│   ├── claude-code/          Claude Code plugin
│   ├── neovim/               Neovim config guide
│   ├── sublime/              Sublime Text config guide
│   └── emacs/                Emacs config guide
└── examples/                 Example ECL files

Configuration

All LSP settings are under the ecl.* namespace. See the @aehrc/ecl-lsp-server README for the full configuration reference.

Contributing

See CONTRIBUTING.md for setup, testing, and development workflow.

Security

See SECURITY.md for reporting vulnerabilities.

Resources

License

Copyright 2026 Commonwealth Scientific and Industrial Research Organisation (CSIRO) ABN 41 687 119 230

Licensed under the Apache License, Version 2.0 — see LICENSE.