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

CqlToR4Library error: fhirhelpers not found #443

Open
cmoesel opened this issue May 19, 2023 · 2 comments
Open

CqlToR4Library error: fhirhelpers not found #443

cmoesel opened this issue May 19, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@cmoesel
Copy link
Member

cmoesel commented May 19, 2023

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
@cmoesel cmoesel added the bug Something isn't working label May 19, 2023
@cmoesel
Copy link
Member Author

cmoesel commented Jun 23, 2023

Am I doing something wrong? Should this work? Or is it a known bug/limitation?

@bryantaustin13
Copy link
Contributor

In BaseLibraryGenerator.execute() after the translateCQLFiles() call, the FHIRHelpers library is contained in the libraryManager.libraries. It is NOT in the translatorMap, which is looped through with LibraryGenerator.processLibrary() called for each library in the translatorMap. libraryManager is not used in processLibrary

@Chris0296 Chris0296 removed their assignment Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants