Why the World Needs Open and Scalable CQL to SQL for FHIR Analytics
Tomorrow at the Analytics on FHIR conference, I will walk through a proof of concept that has been long overdue. It shows how clinical logic defined in CQL can be converted, executed, and scaled through SQL in any modern data warehouse. This is not a theoretical exercise. It is a practical path forward
Before getting into the demo, we need to confront the core issue.
The Problem With CQL Today
CQL (Clinical Quality Language) was meant to give us a standard, computable way to express clinical logic. A shared language for quality measures. A clear alternative to narrative specifications.
The intent was right. The reality is different.
Writing CQL takes too long. Maintaining it takes even longer. Executing it requires specialized engines, vendor tooling, and complex infrastructure. Most organizations have never run a CQL engine in production. Many do not intend to.
The end result is predictable. Logic is defined in CQL, but execution continues to happen in SQL. We have two parallel worlds that rarely meet.
SQL Is Already the Backbone of Healthcare Analytics
Look inside any health plan, major provider, or analytics vendor. The logic runs on SQL. The pipelines run on SQL. The infrastructure is mature, heavily optimized, and supported by a massive talent ecosystem.
SQL engineers understand scale. They understand long running queries, indexing strategies, parallelization, and the realities of operational workloads. This ecosystem already works. Forcing organizations to adopt a new execution environment for CQL is not realistic.
CQL is a specification layer. SQL is the execution layer. Treating them this way removes friction rather than adding it.
What Happens When We Translate CQL to SQL
A consistent, open transformation from CQL to SQL provides several advantages.
Semantic integrity
Clinical logic stays in its original, governed form. Nothing is lost in translation.
Scalable execution
The SQL output runs on infrastructure organizations already have. Nothing new is required. No CQL engine. No specialized runtime.
Portability
Logic becomes shareable in a format that every warehouse can execute. This enables collaboration, transparency, and a community driven approach to measure development.
Lower adoption cost
FHIR and SQL are already familiar. The only new component is a reliable conversion step.
This is how we align clinical meaning with operational scale without creating a new analytics stack.
Why This Matters for Quality Measurement
Quality measurement has been locked inside proprietary systems for decades. Specifications were long PDF documents. Vendors built private logic. Health plans funded expensive transformations. Everyone reinvented the same calculations.
FHIR and CQL were supposed to unlock this. But without a scalable execution path, the industry stalled.
Translating CQL to SQL finally closes the loop. Logic is expressed once. It is executed anywhere. Health plans, providers, researchers, and vendors do not need custom engines. They simply run SQL.
This makes measurement transparent instead of opaque. It makes validation possible instead of guesswork. It turns quality from a cost center into a shared asset.
This is the foundation for an open quality marketplace where authors can publish measures, contributors can refine them, and organizations can run the same logic without barriers.
What You Will See Tomorrow
Here is the flow I will demonstrate:
Instant CQL generation using agents and Model Context Protocol
Deriving clear requirements from the generated logic
Converting that CQL to SQL through an open transformation pipeline
Executing the SQL in a SQL on FHIR environment, including Databricks and FHIR Metrics
Showing how the same logic runs across any organization without rewriting
This is not a new engine. It is a new workflow that respects how healthcare analytics already operates.
The Opportunity and Call to Action
FHIR provides structure. CQL provides meaning. SQL provides scale. Agent based automation provides speed.
The pieces exist. What is missing is a coordinated effort to bring them together in an open, shared ecosystem.
If you want to help build a future where quality measures are transparent, scalable, and easily shared, join the early adopter group at fhiriq.com. We are forming an open quality coalition for anyone who believes measurement should be accessible rather than proprietary.
For readers who want to explore the tools, concepts, and projects mentioned in this article, the following resources provide additional depth and context.
Analytics on FHIR Online Conference
Details about the conference, sessions, and community work in FHIR analytics:
FHIR IQ and Early Adopter Program
Information about the initiatives, tools, and upcoming open quality coalition:
CQL Builder and Generator (Vercel Preview)
Prototype showing how agents and Model Context Protocol can generate and refine CQL instantly:
CQL to SQL FHIR Query Converter (Vercel)
Ongoing work converting CQL logic into SQL for scalable analytics execution:
https://fhir-query-converter.vercel.app
FHIR Metrics by Firemetrics
A growing platform and future partner focused on scalable FHIR analytics and operational performance:



Discussion about this post