clinical-reasoning
clinical-reasoning copied to clipboard
isVersionCompatible should use version compability, not equality
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.
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.
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.