Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisit CQL Engine and Result APIs #1287

Open
JPercival opened this issue Nov 18, 2023 · 0 comments
Open

Revisit CQL Engine and Result APIs #1287

JPercival opened this issue Nov 18, 2023 · 0 comments

Comments

@JPercival
Copy link
Contributor

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:

Example of improper hiding:

This story is a place holder for a design task to revise these to be more useful/consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant