A web application for viewing and analyzing CQL (Clinical Quality Language) test results created from CQL Tests Runner.
The easiest way to run this application is using Docker:
# Build the Docker image
docker build -t hlseven/quality-cql-studio:latest .
# Alternatively, build images for multiple architectures if supported by your build environment
docker buildx build --platform linux/arm64,linux/amd64 -t hlseven/quality-cql-studio:latest .
# Run the container
docker run -p 4200:80 hlseven/quality-cql-studioOnce the container is running, open your browser and navigate to http://localhost:4200/.
- Current stable version of Node.js
- npm (comes with Node.js)
To start a local development server, run:
# Install dependencies
npm install
# Start the development server
npm run startThis application uses a multi-stage Docker build:
- Builder Stage: Uses Node.js 24 Alpine to install dependencies and build the Angular application
- Runtime Stage: Uses Nginx Alpine to serve the built application
The Docker setup includes:
Dockerfile: Multi-stage build configurationnginx.conf: Nginx configuration for serving the Angular appentrypoint.sh: Runtime configuration script
The application supports runtime configuration through environment variables. The entrypoint.sh script processes configuration.template.js to generate the final configuration at runtime.
-
CQL_STUDIO_RUNNER_BASE_URL: Specifies the base URL for the CQL Tests Runner service. This URL is used to communicate with the runner backend for executing CQL tests and retrieving results. Defaults to
http://localhost:3000. -
CQL_STUDIO_FHIR_BASE_URL: Specifies the base URL for the FHIR server. This URL is used for FHIR resource operations and data retrieval. Defaults to
http://localhost:8080/fhir. -
CQL_STUDIO_TRANSLATION_BASE_URL: Specifies the base URL for the translation service. This URL is used for CQL translation and conversion operations. Defaults to
http://localhost:3001.
To add support for a new CQL version:
-
Add version type in
src/app/services/cql-grammar-manager.service.ts:export type CqlVersion = '1.5.3' | '2.0.0-ballot' | 'new-version';
-
Add grammar definition to
GRAMMAR_REGISTRY:'new-version': { version: 'new-version', keywords: ['new', 'keyword'], functions: ['NewFunction'], dataTypes: ['NewType'], operators: ['+', '-', '*', '/', '=', '<>', '!=', '<', '>', '<=', '>=', 'and', 'or', 'not', 'xor', 'implies'], patterns: { /* copy from existing version */ } }
-
Update UI in
src/app/components/cql-with-fhir/cql-with-fhir.component.html:<option value="new-version">CQL new-version</option>
-
Set as default (optional): Update default values in grammar manager, CQL editor, and CQL with FHIR components. Default is currently CQL 1.5.3.
The system automatically handles version-specific syntax highlighting, autocomplete, and validation.
Copyright © 2025 Preston Lee. All rights reserved. Provided under the Apache 2.0 license.