FHIR Chat · Reuse common library in different directory structure · cql

Stream: cql

Topic: Reuse common library in different directory structure


view this post on Zulip Yolanda (Jan 07 2020 at 13:53):

We are using CQL to enforce the CRD rules and using org.opencds.cqf cql engine to process the CQL files. The challenges we are facing is how to reuse some of the common cql library files without copying and pasting them all over the places.

The followings are the examples and would appreciate any suggestions to help reduce the duplication. Thanks in advance.

Currently the cql files are organized like this:
Folder1
MyCommonLibA.cql
MyCommonLibB.cql
MyCoolCQL.cql
Folder2
MyCommonLibA.cql
MyCommonLibB.cql
MyAwesomeCQL.cql

And we would like to organize them something like:
Folder1
MyCoolCQL.cql
Folder2
MyAwesomeCQL.cql
Folder3
MyCommonLibA.cql
MyCommonLibB.cql

view this post on Zulip Lloyd McKenzie (Jan 07 2020 at 14:14):

@Bryn Rhodes

view this post on Zulip Bryn Rhodes (Jan 07 2020 at 22:03):

The engine has a LibraryLoader interface, the Default implementation uses semantic versioning in the current directory, but there are reference implementations of loaders. The cqf-ruler loads from Library FHIR resources, for example.


Last updated: Apr 12 2022 at 19:14 UTC