clinical-reasoning icon indicating copy to clipboard operation
clinical-reasoning copied to clipboard

isVersionCompatible should use version compability, not equality

Open brynrhodes opened this issue 1 year ago • 2 comments

In the following test for version compatibility:

https://github.com/cqframework/clinical-reasoning/blob/938ed778c19ccf34c5a7726d9949c2798f46521e/evaluator/src/main/java/org/opencds/cqf/cql/evaluator/engine/execution/TranslatingLibraryLoader.java#L266

This will in general always fail because the compability level is expressed as major.minor, where the implementation version will be specified to the patch level, and potentially include a snapshot label.

brynrhodes avatar May 22 '23 19:05 brynrhodes

That's intentional. We don't currently consider how ELM generation is impacted in the major.minor.bugfix versions in the cql compiler so have to assume that a mismatched version is not compatible. For example, this change here:

https://github.com/cqframework/clinical_quality_language/pull/1163

required runtime changes to support correctly and (intentionally, due to performance considerations) pushed overload resolution from runtime to compile time.

JPercival avatar Jun 09 '23 15:06 JPercival

Ah. Actually, I interpreted your comment backwards. The code looks at the compatibility level and not the implementation version. You are right. That's incorrect.

JPercival avatar Jun 09 '23 15:06 JPercival