CQL v5#1713
Conversation
Related IssuesThe following open issues may be related to this PR:
|
|
Formatting check succeeded! |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1713 +/- ##
============================================
+ Coverage 62.18% 62.82% +0.64%
+ Complexity 3900 3833 -67
============================================
Files 210 210
Lines 20302 19861 -441
Branches 3860 3767 -93
============================================
- Hits 12624 12477 -147
+ Misses 6074 5806 -268
+ Partials 1604 1578 -26 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
We are currently using a custom modelinfo and a custom modelresolver to implement cql over internal data types that are not fhir related. This is well supported currently. These changes to modelresolver seem to make that impossible now. Is this engine only going to support FHIR, specifically hapi fhir, or is there some other avenue to get existing behavior that i am missing. Fully extracting every record into a CqlClassInstance would be prohibitively poorly performing for us. Right now, the fact that we can retrieve objects at request time with If CqlClassInstance were an interface that allowed similar behavior we could make this work, maybe. You could even then implement the interface by something identical to the current implementation if for some reason that is performant for you, where |
|
Hi @Zylox,
The engine still supports any CQL model (models are made of types described in the spec). I've documented all supported types in
The |
…teger`, `Long`, `Decimal`, `String`, and `List` classes) (#1751) * Sealed class hierarchy for CQL types * Sealed Value interface for CQL values * Cleanup
|
|
The source branch |


Valueinterface.Boolean,Integer,Long,Decimal,String, andListfrom theorg.opencds.cqf.cql.engine.runtimepackage are used intead ofkotlin.Boolean,kotlin.Int,kotlin.Long,BigDecimal,kotlin.String, andkotlin.collections.Iterable<T>.FhirTypeConverter, and related tests are updated accordingly to useValueinstead ofAny.Valueobject is renamed toConstants. TheCqlListclass is replaced with theSortHelper.compare()method.FHIR.Patient,FHIR.string, etc.) are now represented in the engine asClassInstances. AClassInstanceis a structured value (like a Tuple) with a QName type tag like{http://hl7.org/fhir}Patient. As a result:resolvePath(),as(),setValue(),objectEqual(),objectEquivalent(),resolveType()are no longer needed in theModelResolverinterface.Class<T>references are replaced with type specifiers and type QNames (both multiplatform) in the engine. As a result:packageName(s)is no longer needed inModelResolverandis(value: Any?, type: Class<*>?): Boolean?changed tois(valueType: String, type: QName): Boolean?,Interval[1,2] is Interval<Integer>returns true andInterval[1,2] is Interval<Time>returns false,FhirModelResolver : ModelResolver, theis(valueType: String, type: QName): Boolean?method now returnstrueonly if{http://hl7.org/fhir}_valueType_extendstypeor is the same astype. As a result, expressions likeFHIR.integer { ... } is FHIR.positiveIntandFHIR.Quantity { ... } is FHIR.Agereturn false becauseFHIR.integeris a supertype ofFHIR.positiveIntandFHIR.Quantityis a supertype ofFHIR.Age.DescendentsEvaluator.