Clinical Quality Language (CQL) is an HL7 specification for the expression of clinical knowledge that can be used within both the Clinical Decision Support (CDS) and Clinical Quality Measurement (CQM) domains. This repository contains complementary tooling in support of that specification.
The CqlEngine APIs were created in an ad hoc fashion, as we were uncertain what an optimal API would look like. This has resulted in a few cases where the APIs are inconsistent, don't follow Java best practices, or suffer from code smells such as "telescoping constructor", or having many function overloads.
The engine still isn't API complete/final. Specifically, we don't have all the debugging APIs in place, so any current work on updating the APIs will be a step along the way.
The CqlEngine APIs were created in an ad hoc fashion, as we were uncertain what an optimal API would look like. This has resulted in a few cases where the APIs are inconsistent, don't follow Java best practices, or suffer from code smells such as "telescoping constructor", or having many function overloads.
The engine still isn't API complete/final. Specifically, we don't have all the debugging APIs in place, so any current work on updating the APIs will be a step along the way.
Example of many overloads (potentially addressed by a params class): https://github.com/cqframework/clinical_quality_language/blob/master/Src/java/engine/src/main/java/org/opencds/cqf/cql/engine/execution/CqlEngine.java#L110-L176
Example of brittle API, which is not extensible as new retrieve options are added: https://github.com/cqframework/clinical_quality_language/blob/e3171ced48fd64257dc7bf1a8d5fe09639bd95db/Src/java/engine/src/main/java/org/opencds/cqf/cql/engine/retrieve/RetrieveProvider.java#L6
Example of improper hiding: https://github.com/cqframework/clinical_quality_language/blob/e3171ced48fd64257dc7bf1a8d5fe09639bd95db/Src/java/engine/src/main/java/org/opencds/cqf/cql/engine/execution/EvaluationResult.java#L9
This story is a place holder for a design task to revise these to be more useful/consistent.