FHIR Chat · Logging in CQL · cql

Stream: cql

Topic: Logging in CQL


view this post on Zulip Marisa Hoenig (Feb 03 2021 at 17:48):

Hi folks! Is there a way to log to the console in CQL? I'm trying to make sure my CQL functions are returning back the expected data at each point, since each function calls multiple functions and thought logging would be helpful. Thank you!

view this post on Zulip Bryn Rhodes (Feb 03 2021 at 20:21):

The underlying engine does support logging with a fairly configurable debug map, but we are still in the process of exposing that capability in the various places the CQL engine is running. I'm also talking about the Java-based engine here, the JavaScript engine will have a different answer. Which engine are you using? And in what environment? Just running from the command-line, or within Atom, or the ruler?

view this post on Zulip Marisa Hoenig (Feb 04 2021 at 16:11):

Thanks Bryn! We're using the JavaScript engine and running the CQL via the command line. For now, we solved the issue we were having and no longer need the logging, but it might be helpful in the future.

view this post on Zulip Chris Moesel (Feb 04 2021 at 16:28):

The JavaScript engine does not yet support the Message function of CQL. That said, it does track intermediate values of all expressions. TBH, I forget how it works, but I believe you can inspect all those intermediate values -- although you'd likely need to be running it in a debugger or write some additional wrapper code around the call to the CQL execution engine to print out the intermediate results.


Last updated: Apr 12 2022 at 19:14 UTC