cqframework / cqframework/cqf-tooling
CqlToR4Library error: fhirhelpers not found
Nobody has claimed this yet.
- 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:
- Download and unzip this simple folder of CQL: SimpleLibrary.zip
- Run the following command from this project's
tooling-clidirectory: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) - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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