cqframework / cqframework/cqf-tooling

CqlToR4Library error: fhirhelpers not found

Open
#443 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
22
Forks
26
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
When running CqlToR4Library on a CQL file that depends on FHIRHelpers, the tooling reports the following error:

java.lang.IllegalArgumentException: Referenced library: fhirhelpers not found
    at org.opencds.cqf.tooling.library.r4.LibraryGenerator.processLibrary (LibraryGenerator.java:41)
    at org.opencds.cqf.tooling.library.BaseLibraryGenerator.execute (BaseLibraryGenerator.java:66)
    at org.opencds.cqf.tooling.cli.Main.main (Main.java:235)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:279)
    at java.lang.Thread.run (Thread.java:829)

I am including FHIRHelpers.cql in the same directory, and I have also tried various other file names (FHIRHelpers-4.0.1.cql, fhirhelpers.cql, fhirhelpers-4.0.1.cql). No matter what, I cannot get past this error.

To Reproduce
Steps to reproduce the behavior:

  1. Download and unzip this simple folder of CQL: SimpleLibrary.zip
  2. Run the following command from this project's tooling-cli directory: mvn exec:java -Dexec.mainClass="org.opencds.cqf.tooling.cli.Main" -Dexec.args="-CqlToR4Library -ptcql=/Path/To/SimpleLibrary/SimpleLibrary.cql" (replacing the path with the correct one for your system)
  3. Observer the error

Expected behavior
It should generate the library for SimpleCQL.cql.

Desktop (please complete the following information):

  • OS: Mac OS Ventura
  • Java Version: openjdk 11.0.17

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with org.opencds.cqf.tooling.library.r4.LibraryGenerator at LibraryGenerator.java:41 and trace the referenced-library lookup through BaseLibraryGenerator.java:66. Reproduce with the provided SimpleLibrary.zip and the CqlToR4Library Maven command, comparing how FHIRHelpers.cql is named and resolved. Done means the command generates the library for SimpleCQL.cql without the fhirhelpers-not-found error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.