FHIR Chat · Execute with HAPI · cql

Stream: cql

Topic: Execute with HAPI


view this post on Zulip Aditya Kurkure (Mar 30 2021 at 04:23):

I'm a newbie , trying to find documentation on how to execute CQL using hapi-fhir-jpa-server-starter (R4). I have enabled cql by setting hapi.fhir.cql_enabled=true. I don't know how to send my cql file to the server for execution. Can someone point me to the relevant documentation?

view this post on Zulip Vasyl Herman (Mar 30 2021 at 15:06):

Hi, I am not sure how it happens on hapi side, you may need to translate CQL to EML first.

For our experiments we are using cql2elm to translate CQL to ELM, then we are running cql-execution to execute a ELM files.

I'd be happy to learn how to execute CQL using hapi-fhir-jpa-server-starter as well.

view this post on Zulip JP (Mar 30 2021 at 15:20):

The hapi fhir server does not (yet) support executing arbitrary cql. It only supports cql evaluation in the context of $evaluate-measure at this time. It does support operating from cql directly when evaluating a Measure, there's no need to translate to ELM ahead of time.

view this post on Zulip JP (Mar 30 2021 at 15:23):

The cqf-ruler does support executing arbitrary cql with an operation defined here:

https://github.com/DBCG/cqf-ruler/blob/b4156f0431dd672d5df6ed1324babbefd42d0645/r4/src/main/java/org/opencds/cqf/r4/providers/CqlExecutionProvider.java#L233

I expect that to migrate to the hapi server in the near future.

view this post on Zulip Johannes Oehm (Mar 31 2021 at 11:16):

Hey, you can orient yourself at the following file: https://github.com/juliangruendner/fhir-benchmarking/blob/master/cql/evaluate-measure.sh

Please be aware, that there must be some changes made to the script to work with HAPI (the system must be added to Library.type, and canonical urls are not yet supported in Measure.library, see the Pull Request)

view this post on Zulip Aditya Kurkure (Apr 02 2021 at 16:31):

Hi thankyou for the help everyone. I'll try them out and let you know :big_smile:.


Last updated: Apr 12 2022 at 19:14 UTC