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

NullPointerException when loading/compiling dependent CQL libraries (FHIR Helpers) #1566

Closed
vitorpamplona opened this issue Aug 23, 2022 · 0 comments · Fixed by #1567
Closed
Labels
type:bug Something isn't working

Comments

@vitorpamplona
Copy link
Collaborator

Describe the bug

CQL Compiler runs into an Internal Translator Error when processing dependent libraries.

Component
Workflow module

To Reproduce

  1. Create a CQL with a dependent library (e.g. FHIR Helpers)
  2. Create an FHIR Library with a text/cql attachment of 1.
  3. Try to evaluate the library in a given patient.

The stacktrace should be:

org.opencds.cqf.cql.engine.exception.CqlException: Translation of library ImmunityCheck failed with the following message: Internal translator error.
at org.opencds.cqf.cql.evaluator.engine.execution.TranslatingLibraryLoader.translate(TranslatingLibraryLoader.java:130)
at org.opencds.cqf.cql.evaluator.engine.execution.TranslatingLibraryLoader.load(TranslatingLibraryLoader.java:74)
at org.opencds.cqf.cql.evaluator.engine.execution.CacheAwareLibraryLoaderDecorator.load(CacheAwareLibraryLoaderDecorator.java:48)
at org.opencds.cqf.cql.engine.execution.CqlEngine.loadAndValidate(CqlEngine.java:256)
at org.opencds.cqf.cql.engine.execution.CqlEngine.evaluate(CqlEngine.java:159)
at org.opencds.cqf.cql.engine.execution.CqlEngine.evaluate(CqlEngine.java:148)
at org.opencds.cqf.cql.evaluator.CqlEvaluator.evaluate(CqlEvaluator.java:89)
at org.opencds.cqf.cql.evaluator.library.LibraryEvaluator.evaluate(LibraryEvaluator.java:47)
at org.opencds.cqf.cql.evaluator.library.LibraryProcessor.evaluate(LibraryProcessor.java:158)
at org.opencds.cqf.cql.evaluator.library.LibraryProcessor.evaluate(LibraryProcessor.java:92)
at com.google.android.fhir.workflow.FhirOperator.evaluateLibrary(FhirOperator.kt:207)
at org.pathcheck.cqleditorapp.WorkflowTest$compileEvaluateTest$1.invokeSuspend(WorkflowTest.kt:56)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:279)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
at org.pathcheck.cqleditorapp.WorkflowTest.compileEvaluateTest(WorkflowTest.kt:52)

Expected behavior
The compiler should find, compile and load dependent libraries.

Smartphone (please complete the following information):
All Versions are affected.

Additional context
Add any other context about the problem here.

Would you like to work on the issue?
Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
Status: Complete
2 participants