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

Issue not caught by compiler #1227

Closed
rob-reynolds opened this issue Sep 30, 2023 · 3 comments
Closed

Issue not caught by compiler #1227

rob-reynolds opened this issue Sep 30, 2023 · 3 comments
Labels

Comments

@rob-reynolds
Copy link

rob-reynolds commented Sep 30, 2023

The following is a bug that was working in a prior version of CQL, but does not work in the version of CQL used by https://releases.smilecdr.com/releases/2023/11/PRE/2023-11-PRE-35/:

define function ToString(value id):
  value.value

It throws the following error at runtime using the noted CQL version:

{
   "resourceType": "OperationOutcome",
   "issue": [
        {
           "severity": "error",
           "code": "processing",
           "diagnostics": "HAPI-0389: Failed to call access method: org.opencds.cqf.cql.engine.exception.CqlException: Could not resolve call to operator 'ToString(java.lang.Class)' in library 'DQMFHIRHelpers'."
        }
    ]
}

JP commented: Obviously we should catch that in the compiler.

Note this can't be reproduced using the current version of the VSCode Extension (v0.6.0) because the current VSCode Extension uses a prior version of CQL in which the above evaluates without error, i.e., doing the above works in the current VSCode Extension.

@JPercival JPercival added the bug label Oct 4, 2023
@JPercival
Copy link
Contributor

Potential duplicate of #1223

@ddieppois
Copy link

I tested this with the latest version of clinical_quality_language and it seems that I'm able to go through the translation using this CQL test file

"library Test

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1'

context Patient

define function ToString(value id):
value.value"

The translation complete, no syntax error and I get my XML properly created after. Suggestion is to use the latest version of the translator to fix this issue.

@JPercival
Copy link
Contributor

Duplicate, fixed by #1260

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants