Conversation
…teger`, `Long`, `Decimal`, `String`, and `List` classes) (#1751) * Sealed class hierarchy for CQL types * Sealed Value interface for CQL values * Cleanup
|
Formatting check succeeded! |
Closed
Initial implementation of FHIR model resolver in JS. JS-export CQL value classes, CQL type classes. Type hints for expression results.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1755 +/- ##
============================================
+ Coverage 68.60% 68.77% +0.16%
+ Complexity 1761 1694 -67
============================================
Files 529 532 +3
Lines 30787 30495 -292
Branches 6905 6987 +82
============================================
- Hits 21121 20972 -149
+ Misses 7193 6984 -209
- Partials 2473 2539 +66 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
# Conflicts: # Src/java/elm-fhir/src/main/kotlin/org/cqframework/cql/elm/requirements/fhir/utilities/constants/CqfConstants.kt # Src/java/elm-fhir/src/test/kotlin/org/cqframework/cql/elm/requirements/fhir/DataRequirementsProcessorTest.kt # Src/java/engine/src/commonMain/kotlin/org/opencds/cqf/cql/engine/elm/executing/FlattenEvaluator.kt # Src/java/engine/src/commonMain/kotlin/org/opencds/cqf/cql/engine/elm/executing/QueryEvaluator.kt # Src/java/engine/src/jvmTest/kotlin/org/opencds/cqf/cql/engine/execution/ListOperatorsTest.kt
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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.createInstance()andis()methods.