FHIR Chat · CQL equivalent of ELM SubsumedBy Subsumes · cql

Stream: cql

Topic: CQL equivalent of ELM SubsumedBy Subsumes


view this post on Zulip Alexander Kiel (Jan 29 2020 at 15:02):

Is there a CQL equivalent of the ELM expressions SubsumedBy and Subsumes?

view this post on Zulip Bryn Rhodes (Jan 29 2020 at 15:36):

Hi @Alexander Kiel, yes, the current translator will recognize (Code, Code) and (Concept, Concept) overloads of both Subsumes and SubsumedBy, though the signatures are documented in the reference; we are still working out how they actually map underneath, so we haven't surfaced them all the way to CQL yet.

view this post on Zulip Alexander Kiel (Jan 29 2020 at 15:40):

@Bryn Rhodes Would you recommend to search for example for Conditions with ICD10 codings assuming there is a hierarchical ICD10 code system with super codes like C25 or would you rather use ValueSets containing alls C25 codes like C25.1 ... C25.9?

view this post on Zulip Bryn Rhodes (Jan 29 2020 at 16:11):

We typically do that with value sets today, but that's based on the fact that terminology servers with the capability to perform that expansion are not widespread. To make sure that decision is possible as an implementation decision, we would suggest using a ValueSet either way, and defining the value set with an expression using the hierarchy in the code system, but supporting a "cached" version that enumerates the codes for use in environments without terminology servers capable of computing that expansion. See some documentation here on this very question.

view this post on Zulip Alexander Kiel (Mar 13 2020 at 15:39):

@Bryn Rhodes To reiterate on this topic, in FHIR Search it is possible to add the modifier :below to a search parameter say clinical-code. With that one could search like this:

[base]/Condition?code:below=http://fhir.de/CodeSystem/dimdi/icd-10-gm|C25

and should return all Conditions with a code of C25 or below like C25.1.

For the Retrieve expression, I only see the possibility to specify one ore more codes possibly through a valueset reference. Given that a server has an index for :below codes, it would be faster to search resources containing a code, which is below the search code, as it would be to iterate over all codes in a valueset and perform an or-search over all of them.

I don't know whether any FHIR servers support :below. I tested Vonk, HAPI and Grahames servers and they don't support it. But it is in the FHIR search spec and perhaps it would be a good idea to enable to use it from CQL. So a direct mapping to FHIR search is possible. What do you think about it? Maybe too much of a performance optimization?

view this post on Zulip Chris Moesel (Mar 13 2020 at 15:50):

@Alexander Kiel, I'm not sure exactly what you're proposing (whether a way to directly associate specific FHIR search queries or a more general capability of specifying subsumption), but in case it is relevant: CQL has considered subsumption in the past. Here is a snippet from the current spec regarding that:

A common terminological operation involves determining whether a given concept is implied, or subsumed by another. This operation is generally referred to as subsumption and although useful, is deliberately omitted from this specification. The reason for this omission different terminology systems generally provide different mechanisms for defining and interpreting subsumption relationships. As a result, specifying how that occurs is beyond the scope of CQL at this time. This is not to say that a specific library of subsumption operators could not be provided and broadly adopted and used, only that the CQL specification does not prescribe the semantics of that operation.

view this post on Zulip Alexander Kiel (Mar 13 2020 at 16:12):

@Chris Moesel Yes I propose a capability to specify subsumption on Retrieve expressions. I also know the disclaimer on terminology operations like subsumption. In our project we need to be able to search for categories of ICD-10 concepts. We also have a need for a performant implementation because we implement ad-hoc queries which should be answered in seconds. So I simply search for the best way to implement such subsumptions. CQL only supports the use of having a valueset for each category of ICD-10 concepts. I hoped that I can somehow use a mode in Retrieve which operates like :below in FHR search, because I have an idea to implement :below in a more performant way than searching for all codes in a valueset in succession.

view this post on Zulip Bryn Rhodes (Mar 16 2020 at 23:19):

@Alexander Kiel , this may be a bit roundabout, but the ValueSet resource does support description of a ValueSet using the below operation, and so you could define a ValueSet to support the search and then reference that ValueSet in the retrieve. The implementation could detect that. It's not very dynamic, but it would be possible. We are adding as part of the ballot the ability to specify include and reverseInclude aspects of a retrieve. Would also welcome ideas about what a :below or :above modifier might look like in a Retrieve. Do you have any specific examples to work with?


Last updated: Apr 12 2022 at 19:14 UTC