cqframework / atom_cql_support Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Hello all,
Upgraded language-CQL to 2.8.1 within ATOM. Could not execute the CQL code from ATOM. Tried to uninstall from within ATOM and could not. Removed contents from users/me/.atom/packages/ to remove the CQL plugin. Able to reinstall. Still cannot see CQL execute. However, I now see the following error:
"CQL language server stopped unexpectedly.
Error: Could not find or load main class org.opencds.cqf.cql.ls.Main Caused by: java.lang.ClassNotFoundException: org.opencds.cqf.cql.ls.Main"
I have uninstalled and reinstalled Java. Both times I had version 8 build 271. Removed and reinstalled Atom, both times build 1.52, I could really use help.
Thanks,
Doug
This message appeared when I opened Atom.
Atom: 1.55.0 x64
Electron: 6.1.12
OS: Microsoft Windows 10 Enterprise
Thrown From: language-cql package 2.9.0
Uncaught ReferenceError: minJavaRuntime is not defined
At C:\Users\linda.duffy\.atom\packages\language-cql\language-cql\pkg\language-cql-common\lib\java-helpers.js:65
ReferenceError: minJavaRuntime is not defined
at showJavaRequirements (/packages/language-cql/language-cql/pkg/language-cql-common/lib/java-helpers.js:65:136)
at /packages/language-cql/language-cql/pkg/language-cql-common/lib/java-helpers.js:11:13)
at ChildProcess.emit (events.js:200:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:84:9)
atom-ide-ui 0.13.0
language-cql 2.9.0
FHIR IGs like the Connectathon repository include a cql-options.json file which describes which options the cql should be run with. Currently the cql is executed / translated with default options.
I have downloaded atom and installed the language-cql extension. I also installed Java Runtime 1.8 and added the directory (C:\Program Files\Java\jre1.8.0_301\bin) to the path system environment variable.
I am trying to run some of the example exercises available (https://github.com/cqframework/cqf-exercises). I copied these files onto my computer.
When I try to run the exercises, I get a warning that it is unable to determine the version of FHIR used and defaulting to R4 and another tab opens with the following:
Running tests.
No tests found at input\tests. Evaluation may fail if data is required.
No terminology found at input\vocabulary\valueset. Evaluation may fail if terminology is required.
Nothing else happens. Even if I purposefully add some syntax errors or try to run a function that has been defined, I don't get any output. What am I missing?
Thanks in advance for your help.
The plugin needs a "beforeShutdown" or "beforeUpgrade" hook to shut down all the processes running in the background. Specifically, the language server and any executing tests.
Evaluating CQL with Verbose returns the same thing as evaluating without Verbose.
When attempting to Execute CQL in the Atom plugin, we're getting the following error:
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [:735]
The current support re-translates on every keystroke, this is usually fine, but with large files it's quite impactful. Consider delaying start of translation so that multiple keystrokes do not result in multiple translations, only the last one does.
Wouldn't it be great if we could highlight a section of code in Atom to run that segment with right click or F5.
This would have to include measure.cql file start up from libraries to context Patient etc for context of libraries, valuesets, etc.
Even better would be to have that post 'context Patient' break point relocatable to further in the cql so as to include required populations of definitions and then skip to the highlighted segment then stop.
Recognized that any content of highlighted selection of code would require presence before context Patient statement or contained within highlighted segment.
Rationale: This would be helpful in cql measure development by permitting testing of an operation, definition or function.
Bryn is aware.
Thank you. PMuir
The FHIR IG publisher now supports the use of namespaces with CQL. Add support for the Atom plugin to be able to use the same mechanism to resolve namespaces for included libraries.
Relevant code for loading namespaces based on package dependencies is here:
https://github.com/HL7/fhir-ig-publisher/blob/master/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/CqlSubSystem.java#L279
define "Trace Message":
Message(1, true, '123', 'Trace', 'This is a trace message')
define "Warning Message":
Message(1, true, '123', 'Warning', 'This is a warning message')
define "Information Message":
1 + Message(2, true, '123', 'Information', 'The value is 2')
These all work, but only the Warning message is displayed in the output.
Additionally, there's no logging or error messages in many cases.
The latest translator (1.4.9-SNAPSHOT) includes support for reading and writing a translator options file for use in setting translator options. Include support for this capability in the Atom plugin. The CqlTranslatorOptions class in the Cql2Elm translator provides the capability, and the sample-content-ig includes an example options file:
https://github.com/cqframework/sample-content-ig/blob/master/input/cql/cql-options.json
The relevant code in the IG Publisher is here:
https://github.com/HL7/fhir-ig-publisher/blob/master/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/CqlSubSystem.java#L240
Originally submitted as cqframework/clinical_quality_language#565
Atom CQL function runs directly in MacOS super cool but same packages in Atom running on Ubuntu 18.4 with same directory structure do not work (but CQF-Ruler runs ok in docker or maven). PMuir
I'm curious how to use the tool with any publicly available CQL repositories.
In a fresh repository with the recommended structure, the tool appends an additional input folder name and cannot resolve.
In using with the connectathon repo, the tool doesn't resolve paths.
I have removed the .Atom files in my home directory, loaded a new version of atom and have installed version 2.11.0 of language-cql. I get this error whenever I load a cql file. I've attached a zipped copy of a file that's throwing this error:
Atom: 1.58.0 x64
Electron: 9.4.4
OS: Microsoft Windows 10 Pro
Thrown From: language-cql package 2.11.0
Uncaught Error: Message header must separate key and value using :
At C:\Users\fadrian\.atom\packages\language-cql\node_modules\vscode-jsonrpc\lib\messageReader.js:57
Error: Message header must separate key and value using :
at /packages/language-cql/node_modules/vscode-jsonrpc/lib/messageReader.js:57:23
at Array.forEach (<anonymous>)
at MessageBuffer.tryReadHeaders (/packages/language-cql/node_modules/vscode-jsonrpc/lib/messageReader.js:54:17)
at StreamMessageReader.onData (/packages/language-cql/node_modules/vscode-jsonrpc/lib/messageReader.js:157:43)
at /packages/language-cql/node_modules/vscode-jsonrpc/lib/messageReader.js:148:18)
at Socket.emit (events.js:223:5)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:290:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at Pipe.onStreamRead (internal/stream_base_commons.js:181:23)
-2:34.4.0 application:open-folder (div.tool-panel.tree-view)
-1:24.4.0 core:backspace (input.hidden-input)
-1:18.7.0 core:page-up (input.hidden-input)
atom-ide-ui 0.13.0
ide-json 0.2.1
json-colorer 1.0.0
language-cql 2.11.0
Hello,
I use cql-language 2.11.1
I found that during translation(and during the writing the code in IDE) it uses FHIR types for DSTU 2. These classes are included in Java library along with classes for r4 (org.hl7.fhir.r4.model)
return OperationOutcome { id:id{value:'xxx'}, issue: List<FHIR.OperationOutcome.OperationOutcomeIssueComponent >{ FHIR.OperationOutcome.OperationOutcomeIssueComponent { severity: FHIR.IssueSeverity {value:'error'}, code: FHIR.IssueType {value: 'sdfs'} } } }
such a code (that contain r4 model) highlights errors in IDE and produces
org.opencds.cqf.cql.engine.exception.CqlException: Translation of library CHF failed with the following message: A named type is required in this context. at org.opencds.cqf.cql.evaluator.engine.execution.TranslatingLibraryLoader.translate(TranslatingLibraryLoader.java:134) at org.opencds.cqf.cql.evaluator.engine.execution.TranslatingLibraryLoader.load(TranslatingLibraryLoader.java:78) at org.opencds.cqf.cql.evaluator.engine.execution.CacheAwareLibraryLoaderDecorator.load(CacheAwareLibraryLoaderDecorator.java:49) at org.opencds.cqf.cql.engine.execution.CqlEngine.loadAndValidate(CqlEngine.java:254) at org.opencds.cqf.cql.engine.execution.CqlEngine.evaluate(CqlEngine.java:154) at org.opencds.cqf.cql.evaluator.CqlEvaluator.evaluate(CqlEvaluator.java:89) at org.opencds.cqf.cql.evaluator.CqlEvaluator.evaluate(CqlEvaluator.java:76) at org.opencds.cqf.cql.evaluator.cli.command.CqlCommand.call(CqlCommand.java:163)
But if I use DSTU2 model
return OperationOutcome { id:id{value:'xxx'}, issue: List<FHIR.OperationOutcome.Issue >{ FHIR.OperationOutcome.Issue { severity: FHIR.IssueSeverity {value:'error'}, code: FHIR.IssueType {value: 'sdfs'} } } }
It does not highlights it in IDE (seems like it believes that this type is correct one), but during the running following exception occurs
org.opencds.cqf.cql.engine.fhir.exception.UnknownType: Could not resolve type OperationOutcome.Issue. Primary package(s) for this resolver are org.hl7.fhir.r4.model at org.opencds.cqf.cql.engine.fhir.model.FhirModelResolver.resolveType(FhirModelResolver.java:269) at org.opencds.cqf.cql.engine.fhir.model.R4FhirModelResolver.resolveType(R4FhirModelResolver.java:190) at org.opencds.cqf.cql.engine.fhir.model.FhirModelResolver.createInstance(FhirModelResolver.java:182) at org.opencds.cqf.cql.evaluator.engine.model.CachingModelResolverDecorator.createInstance(CachingModelResolverDecorator.java:88) at org.opencds.cqf.cql.engine.data.CompositeDataProvider.createInstance(CompositeDataProvider.java:74) at org.opencds.cqf.cql.engine.execution.Context.createInstance(Context.java:434) at org.opencds.cqf.cql.engine.elm.execution.InstanceEvaluator.internalEvaluate(InstanceEvaluator.java:9) at org.opencds.cqf.cql.engine.elm.execution.Executable.evaluate(Executable.java:18) at org.opencds.cqf.cql.engine.elm.execution.ListEvaluator.internalEvaluate(ListEvaluator.java:13) at org.opencds.cqf.cql.engine.elm.execution.Executable.evaluate(Executable.java:18) at org.opencds.cqf.cql.engine.elm.execution.InstanceEvaluator.internalEvaluate(InstanceEvaluator.java:11) at org.opencds.cqf.cql.engine.elm.execution.Executable.evaluate(Executable.java:18) at org.opencds.cqf.cql.engine.elm.execution.QueryEvaluator.evaluateReturn(QueryEvaluator.java:85) at org.opencds.cqf.cql.engine.elm.execution.QueryEvaluator.internalEvaluate(QueryEvaluator.java:202) at org.opencds.cqf.cql.engine.elm.execution.Executable.evaluate(Executable.java:18) at org.opencds.cqf.cql.engine.elm.execution.ExpressionDefEvaluator.internalEvaluate(ExpressionDefEvaluator.java:19) at org.opencds.cqf.cql.engine.elm.execution.Executable.evaluate(Executable.java:18) at org.opencds.cqf.cql.engine.execution.CqlEngine.evaluateExpressions(CqlEngine.java:186) at org.opencds.cqf.cql.engine.execution.CqlEngine.evaluate(CqlEngine.java:164) at org.opencds.cqf.cql.evaluator.CqlEvaluator.evaluate(CqlEvaluator.java:89) at org.opencds.cqf.cql.evaluator.CqlEvaluator.evaluate(CqlEvaluator.java:76) at org.opencds.cqf.cql.evaluator.cli.command.CqlCommand.call(CqlCommand.java:163) at org.opencds.cqf.cql.evaluator.cli.command.CqlCommand.call(CqlCommand.java:34)
Atom language-CQL Java Version parsing error
Ubuntu 20.04 includes OpenJDK11 but includes multiple versions:
$ java -version
openjdk version "11.0.9.1" 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
$ which java
/usr/bin/java
$ echo $JAVA_HOME
/usr/lib/jvm/java-11-openjdk-amd64
I uninstalled packages and Atom and have successfully reinstalled both via Ubuntu software and via Atom.io
Latest versions of packages installed successfully for atom-ide-iu, ide-java and language-cql
Pop up error as follows:
language-cql requires Java 11 but could not determine your Java version.
Could not parse the Java '--showVersion' output
openjdk version "11.0.9.1" 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
I suspect that the multiple line response is the issue for the language-cql parser.
(since Ubuntu 20.04 includes multiple versions of Java)
I suspect this may impact others running Linux/Ubuntu 20.04 (MacOs runs ok)
Appreciate your input, Thanks
The plugin was highlighting a "could not load source for library" error for all my include statements. I ensured that versions were correct. Any statements that referenced the library would then also give an error. However, the code still ran normally.
Reinstalled several times and problem still persisted. However, I was eventually able to get a "fix" that I could replicate by performing the installation in the following order.
1 Uninstall atom-ide-ui then language-cql.
2 Restart Atom.
3 Install language-cql.
4 Open a folder, you'll be prompted to install the atom-ide-ui dependency. Click Yes.
5 After that has been installed, open a .cql file.
6 The cql language server will automatically install.
I installed the 2.4.0 upgrade and the CQL language server will not start. Left Atom open over night, closed and reopened several times. Now unable to uninstall language-cql plugin.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.