FHIR Chat · cql · cql

Stream: cql

Topic: cql


view this post on Zulip Sukanta Barai (Mar 04 2022 at 07:50):

Hi Team,
Could you please let me know ,
how can we create data model or customize schema like FHIR or QDM.
So we can using customize schema instead of FHIR or QDM for CQL.
Please provide me any example which will help me to create customise schema. Need your help. I am new in CQL.
Also let me know the data format of FHIR and QDM.
How does any customize data model like PHIR can read from CQL-ENGINE or CQL-Language-Server?

view this post on Zulip Corey Sanders (Mar 04 2022 at 14:27):

Data models are described for the CQL translator in a file called a ModelInfo. You can see examples of the FHIR model info files here and the QDM model info files here. The documentation in this area is pretty light, but it is possible to write your own ModelInfo for a custom data model. You will need to register your model info file with the CQL translator prior to calling translation. To the best of my knowledge that is only available currently via the Java API or while using the command line interface to the CQL translator. You wouldn't be able to use the IDE plugins or the cql-translation-service REST API without modifications. It does work though. My team successfully completed an internal project that uses the Java CQL engine to query a custom data model.

view this post on Zulip Lloyd McKenzie (Mar 04 2022 at 14:59):

@Sukanta Barai I've deleted your duplicate posts. Please only raise questions once in a given stream (under an appropriate topic, creating a new one if necessary). Anyone monitoring a stream will see all topics, so posting more than once doesn't get you an answer faster.

view this post on Zulip Sukanta Barai (Mar 07 2022 at 09:51):

@Corey Sanders, Thank you for your update.
Could you please provide me any example(code) which will help me to create custom data model?

view this post on Zulip Chris Moesel (Mar 07 2022 at 14:10):

@Sukanta Barai - do you have an XSD for your custom data model? If so, I think @Bryn Rhodes might be able to point you to some tools that can help convert an XSD to a ModelInfo.

view this post on Zulip Corey Sanders (Mar 07 2022 at 14:27):

Sukanta Barai said:

Could you please provide me any example(code) which will help me to create custom data model?

The code that my team wrote to generate a custom model is part of an internal project and not available to share. The xsd-to-modelinfo tool that @Chris Moesel mentioned is available here. It should be enough to get you going in the right direction. Also, if you haven't already done so, I would highly recommend you read the Author's Guide for CQL because that will help you understand the reasons why different parts of the model info exist.

view this post on Zulip Sukanta Barai (Mar 07 2022 at 15:50):

Thank you for your updated @Chris Moesel and @Corey Sanders . I will check the links and details.


Last updated: Apr 12 2022 at 19:14 UTC