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

Use of Resource.id in CQL fails due to type mismatch with modelinfo #3353

Closed
csandersdev opened this issue Feb 16, 2022 · 1 comment
Closed
Assignees
Labels
bug Something isn't working cql

Comments

@csandersdev
Copy link
Contributor

Describe the bug
CQL that uses the Resource.id will fail due to a type mismatch in our model from the expected type in the modelinfo file used by the CQL translator. Our model defines Resource.id as a java.lang.String and the FHIR modelinfo defines it as a FHIR.string. At runtime, this manifests itself as the error Could not resolve call to operator 'ToString(java.lang.String)' in library 'FHIRHelpers'.

Environment
4.10.2

To Reproduce
Steps to reproduce the behavior:

  1. Make sure you have a patient defined that has at least one associated Condition resource.
  2. Execute https://localhost:9443/fhir-server/api/v4/$cql?subject=Patient%2Fnumer-EXM104&expression=%5BCondition%5D%20c%20return%20Last(Split(c.id,%20'%2F')) substituting the correct patient ID in the subject field.
  3. Note the error Could not resolve call to operator 'ToString(java.lang.String)' in library 'FHIRHelpers'.

Expected behavior
CQL code that utilizes the Resource.id field should function without error.

Additional context
This issue was identified while testing the EXM104 measure from the connectathon/fhir401 repository.

@csandersdev csandersdev added bug Something isn't working cql labels Feb 16, 2022
@csandersdev csandersdev self-assigned this Feb 16, 2022
@kmbarton423
Copy link
Contributor

Reproduced the error using:
/Library/library-EXM104-8.2.000/$evaluate?subject=Patient/numer-EXM104

Confirmed fix good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cql
Projects
None yet
Development

No branches or pull requests

2 participants