@cqframework/cql
v4.0.0-beta.1
Published
JavaScript tools for the Clinical Quality Language (CQL).
Readme
CQL.js
JavaScript tools for the Clinical Quality Language (CQL).
Installation
npm install @cqframework/cqlUsage
@cqframework/cql is an ESM package. You can
use it in Node.js and the browser (both on the main thread and in web workers).
Compiling CQL to ELM
The library includes a fully featured CQL translator, allowing you to compile CQL to ELM in JavaScript environments:
import { ModelManager, LibraryManager, CqlTranslator } from "@cqframework/cql/cql-to-elm";
const modelManager = new ModelManager();
// Register the necessary model info providers with the model manager here
const libraryManager = new LibraryManager(modelManager);
// Register the necessary library source providers with the library manager here
const cqlTranslator = CqlTranslator.fromText("library Test version '1.0.0'", libraryManager);
const elmJson = cqlTranslator.toJson();TypeScript support
The TypeScript definitions included in this package are automatically generated from the Kotlin code. The generator is currently experimental, so the types may not be perfect.
Project status
This package is built from the Kotlin Multiplatform source which itself evolved from the reference Java implementation. The KMP project targets the JVM and JavaScript environments with the goal of maintaining a single, shared codebase for both platforms.
This new JavaScript target is currently in beta and its API may change in future releases. If you encounter any issues, please report them on GitHub or Zulip.
