Giter Club home page Giter Club logo

cqf-exercises's Introduction

CQF Exercises

This repository contains CQL exercises for learning CQL authoring

Setup

The exercises in this repository can be worked locally, or remotely.

Remote Setup

The exercises in this repository can be worked using the codespaces feature of Github to allow participants a completely browser-based experience:

  1. Make sure you are logged in to Github.com (if you don't have an account, you can signup free here)
  2. Open the repository in a Codespace using the green Code button dropdown (a 4-core machine should be plenty for this)

Note that the first time you open the Codespace will take quite a while, so give it time to initialize.

While the Codespace is initializing, there is an option to open the container in VS Code Desktop. DO NOT SELECT THIS OPTION unless you have VS Code installed locally. Continue to wait for the Codespace to initialize.

Once the Codespace is open, you will be in a VS Code with the contents of this repository open in the File Explorer and can view the exercises in the input/cql folder.

Local Setup

These exercises can be worked locally with the VS Code Plugin. If you do not have VSCode and the CQFramework CQL Plugin installed, follow the Quick Start instructions.

Once you have VSCode installed, the exercises can be downloaded locally (i.e. cloning this repository to your local drive). To do this from within VSCode, follow the instructions for Cloning a repository. When you get to the dialog asking for the repository to clone, provide this link:

https://github.com/cqframework/cqf-exercises.git

This link is also available from the Code button at the top of the repository home page in GitHub.

Once you have cloned the repository locally, open the repository in VSCode at the root of the repository. In the file explorer in the IDE, navigate to the input/cql folder and open any of the exercises. Once you're in a CQL editor, you should see syntax highlighting and error reporting, and you can also execute the CQL by right-clicking and selectin CQL | Execute from the popup menu, or simply by pressing F5.

There are files, ig.ini and cqf-exercises.xml, that are included in this repository to satisfy a requirement in the vscode-cql plugin that have nothing to do with the exercises in this repository. They can safely be ignored. They are part of the IG process.

For more information on the VSCode CQL plugin, refer to the CQFramework VSCode CQL Plugin User Guide.

Exercises

The exercises are available in the [input/cql] directory, and linked directly here:

cqf-exercises's People

Contributors

bryantaustin13 avatar brynrhodes avatar guptava avatar tanvishah9696 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cqf-exercises's Issues

Data Path not found

Executing CQL...
CQL path: c:\Project\sqf-exercises\cqf-exercises\input\cql
Data path: c:\Project\sqf-exercises\cqf-exercises\input\tests\Exercises05
Terminology path: c:\Project\sqf-exercises\cqf-exercises\input\vocabulary\valueset
Patient=null
Patient Gender=null
Patient Gender is Male=null
Patient Marital Status=null
Patient is Married (~)=Patient.maritalStatus - Married
Married in Marital Status=true

Missing ig.ini file

Great work on this plugin!

Only issue is that I'm getting the following exception (it doesn't seem to stop me from getting the CQL output though):

11:29:49.936 [pool-2-thread-1] INFO  ca.uhn.fhir.context.FhirContext - Creating new FHIR context for FHIR version [R4]
11:29:49.937 [pool-2-thread-1] INFO  o.o.cqf.cql.ls.server.manager.IgContextManager - Searching for ini file in file:///Users/wvw/git/fhir/cqf-exercises/input
11:29:49.937 [pool-2-thread-1] INFO  o.o.cqf.cql.ls.server.manager.IgContextManager - Attempting to read ini from path file:///Users/wvw/git/fhir/cqf-exercises/ig.ini
11:29:49.937 [pool-2-thread-1] WARN  org.opencds.cqf.cql.ls.core.ContentService - error opening stream for: file:///Users/wvw/git/fhir/cqf-exercises/ig.ini
java.io.FileNotFoundException: /Users/wvw/git/fhir/cqf-exercises/ig.ini (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:111)
	at java.base/sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:86)
	at java.base/sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:189)
	at java.base/java.net.URL.openStream(URL.java:1161)
	at org.opencds.cqf.cql.ls.core.ContentService.read(ContentService.java:43)
	at org.opencds.cqf.cql.ls.server.service.FederatedContentService.read(FederatedContentService.java:41)
	at org.opencds.cqf.cql.ls.server.manager.IgContextManager.findIgContext(IgContextManager.java:85)
	at org.opencds.cqf.cql.ls.server.manager.IgContextManager.readContext(IgContextManager.java:48)
	at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1220)
	at org.opencds.cqf.cql.ls.server.manager.IgContextManager.getContext(IgContextManager.java:39)
	at org.opencds.cqf.cql.ls.server.command.CqlCommand.call(CqlCommand.java:123)
	at org.opencds.cqf.cql.ls.server.command.CqlCommand.call(CqlCommand.java:38)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
	at picocli.CommandLine.access$1300(CommandLine.java:145)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
	at picocli.CommandLine.execute(CommandLine.java:2078)
	at org.opencds.cqf.cql.ls.server.command.DebugCqlCommandContribution.executeCql(DebugCqlCommandContribution.java:45)
	at org.opencds.cqf.cql.ls.server.command.DebugCqlCommandContribution.executeCommand(DebugCqlCommandContribution.java:76)
	at org.opencds.cqf.cql.ls.server.service.CqlWorkspaceService.executeCommandFromContributions(CqlWorkspaceService.java:165)
	at org.opencds.cqf.cql.ls.server.service.CqlWorkspaceService.executeCommand(CqlWorkspaceService.java:110)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.