Open citizenrich opened 4 months ago
@citizenrich thank you for raising this! At first glance, this appears to be happening because our library importing logic (topological sort during library import) does not properly support including libraries without a version.
This include DAKConcepts called Cx
is causing our library issues. You can bypass this issue temporarily by passing an explicit version in each include. Either way, this is an issue we should fix on our end (likely next week), and I'll update this issue title to reflect this issue.
Thanks again for raising!
Note, that after updating all the includes with a version, there's still an error running your CQL with our engine:
2024/07/05 23:31:47 CQL CLI failed with an error: failed to parse CQL: 129-3 could not resolve Equivalent(Named<FHIR.CodeableConcept>, System.Code): no matching overloads
130-5 could not resolve Equivalent(Named<FHIR.CodeableConcept>, System.Code): no matching overloads
131-5 could not resolve Equivalent(Named<FHIR.CodeableConcept>, System.Code): no matching overloads
As noted in the README, this toolkit is pretty early and fully experimental with missing system operators and overloads.
For this one, I this this may be because there's no implicit converstion between FHIR.CodeableConcept and System.Code in CQL. Without looking too deeply, I think there's a conversion between FHIR.Coding and System.Code, but not one between CodeableConcept and System.Code. So this might need to be something you update in the code where this comparison is happening? If this runs in other engines, then it could very well be something we're not doing right. Our equivalent overload is a (T, T)
overload meaning that we expect to be able to implicitly convert both operands to the same type.
Thanks for the great troubleshooting! It makes sense about the includes and authors can make that fix easily. The code does run on the CQF tooling engine and the HAPI FHIR JPA with clinical reasoning module enabled. But, I don't know enough about the codeable concept issue to offer anything useful, so I'll ping @brynrhodes
No problem! Sounds good, and thank you for trying our tools out! :)
I took a closer look at the Equivalent
issue, and looks like that's just something we need to do on our end. Equivalent has both (T, T)
overloads and some additional explicit clinical overloads (where (System.Concept, System.Code)
is a valid overload. So we'll also prioritize that next week! https://github.com/google/cql/issues/40 to track that.
@citizenrich thanks again for your report!
I merged in @suyashkumar's change to add libraries to the error output, hopefully that will make debugging smoother in the future.
I started work today on https://github.com/google/cql/issues/40 I'd like to get that merged in early next week depending on team availability.
I sent https://github.com/google/cql/commit/33faab5b82e4877ba3181de8edd90603eb505932 for the (Concept, Code) overload earlier (and fixed the (Code, Code)) one. Across Evan and I, we'll try to wrap up the other overloads.
That said, I think I'll just change the title of this issue to "Run MERIndicators" since there are a few other minor associated things we can fix to support all the CQL in there. It's as good of a target as any to get ship ship, particularly if @citizenrich is interested in running it with our engine! :)
Here are some items we'll need to support for this CQL (can break the larger ones out into separate tasks if we want):
now()
)Feel free to edit this comment and add some more if needed.
Hi,
Thanks for the great app. I'm just trying it out and see an error:
The repository I'm using is https://github.com/PATH-Global-Health/MERIndicators and the invocation I'm using is:
I'm not clear about the error, if there's any guidance that can be provided to help me troubleshoot it. Thanks.