Stream: cql
Topic: Filtering with Multiple Terminologies
Matt Rouhana (Feb 24 2022 at 15:53):
Is there standard CQL syntax for retrieving clinical entities while filtering on multiple terminologies? For example, given two valuesets "Office Visit" and "Outpatient Consultation", is something akin to the following possible?
define "Qualifying Encounter":
[Encounter: "Outpatient Consultation" or "Office Visit"]
Corey Sanders (Feb 24 2022 at 16:15):
The typical pattern that I've seen for filtering by multiple valuesets is to use a union. For example...
[Encounter: "Outpatient Consultation"]
union [Encounter: "Office Visit"]
You can see a more complicated example here which applies a where clause to all of the union'ed results.
In the Java reference implementation, each retrieve (square bracket) is a separate REST API call, which isn't necessarily ideal, but that is a requirement if the retrieve provider wants to take advantage of the :in modifier of the FHIR token search parameter for filtering.
Last updated: Apr 12 2022 at 19:14 UTC