Summary
HAIstack SDC currently models cqf-library metadata and defines a CQLProvider / CQLExpressions adapter in pkg/sdc, but there is no CQL runtime. Questionnaires that depend on CQL expressions cannot be evaluated today.
Problem
- SDC supports CQL in expressions (
language: application/x-cql) per the SDC IG
pkg/sdc only evaluates FHIRPath by default (FHIRPathExpressions, NewSDCFHIRPathEngine)
CQLExpressions fails with an unavailable-expression diagnostic when no provider is installed
cqf-library extensions are round-tripped as metadata only
Proposed scope
Create a dedicated library (suggested: pkg/cql or separate module) that:
- Loads CQL libraries (from canonical references / contained resources / terminology store)
- Evaluates CQL expressions against a context (subject, launch context, questionnaire variables)
- Integrates with SDC via the existing
CQLProvider interface
- Documents boundaries vs FHIRPath (when to use each)
Integration points
pkg/sdc: CQLProvider, CQLExpressions, population/validation/render expression providers
pkg/runtime / pkg/http: wire default provider when libraries are available
modules/sdc: example questionnaires using CQL
Out of scope (initial)
- Full CQF Measure evaluation
- Clinical quality reporting pipelines
Acceptance criteria
Related
Summary
HAIstack SDC currently models
cqf-librarymetadata and defines aCQLProvider/CQLExpressionsadapter inpkg/sdc, but there is no CQL runtime. Questionnaires that depend on CQL expressions cannot be evaluated today.Problem
language: application/x-cql) per the SDC IGpkg/sdconly evaluates FHIRPath by default (FHIRPathExpressions,NewSDCFHIRPathEngine)CQLExpressionsfails with an unavailable-expression diagnostic when no provider is installedcqf-libraryextensions are round-tripped as metadata onlyProposed scope
Create a dedicated library (suggested:
pkg/cqlor separate module) that:CQLProviderinterfaceIntegration points
pkg/sdc:CQLProvider,CQLExpressions, population/validation/render expression providerspkg/runtime/pkg/http: wire default provider when libraries are availablemodules/sdc: example questionnaires using CQLOut of scope (initial)
Acceptance criteria
$populate/$validate/Rendercan use CQL whenCQLProvideris wiredRelated
pkg/sdc/types.go(CQLProvider,CQLExpressions)pkg/sdc/README.md(adapter boundaries)