Creating queries


The Terminology Queries module allows the user to consult the terminology, starting from one or more previously determined premises and options. Queries can later be saved (with our without it's current results). 

When opening the Terminology Queries module, four main sections will be displayed:

  1. Favorites: Contains a group of concept previously marked as "Favorite" by browsing the Concept Details module. Favorites can also be copied from the Briefcase, which allow the user to carry concepts from one module to another, as well as creating worklists based on them. Click here for more info on the Briefcase.

  2. Search: Allow the user to search for specific concepts in the terminology, and to drag & drop them into the query builder and the ECL text box editor.

  3. Taxonomy: Treeview of SNOMED CT Terminology, to manually look up for concepts and drag & drop them into the query builder and the ECL text box editor.

  4. Development Queries: Includes the query builder and the ECL text box editor. 

Creating a query

Queries in termSpace are defined by an ECL premise. ECL (Expression Constraint Language) is a formal syntax for representing SNOMED CT expression constraints. termSpace provides a Query Builder that simplifies the process of creating an ECL sentence, but advanced users can also create them by hand, following ECL specification.

Step-by-step guide


  1. Before creating a query, a Terminology Classification must be run on the desired path to ensure all concepts and descriptions will be queried. An outdated classification may return unexpected results. Check the article about Classifying the Terminology for more details.


  2. Building the ECL: 
    Query Editor: termSpace includes a Query Editor to help users to easily create ECL expressions in a simple and intuitive way. Concepts from favorites, search or taxonomy panel can be dragged from the orange badge next to them and dropped into any of the gray inputs in the builder.


  3. The Switch to ECL button will convert current Query into an ECL expression. The ECL expression can be also customized manually, but keep in mind that modifying the expression will disable the return to the Query Builder option.


  4. Queries can be saved to execute them again later, and to link them to assets (More details on the Creating authored refsets section). Keep in mind that this will only save the Query Definition, but not the results of the execution. Please check section 6 to learn how to save the results.


  5. Queries can be run with some extra filters like Term, Module and Inferred/Asserted view.


  6. Saving results: Once the query was executed, it’s results can be exported to the briefcase or to an XLS file, as well as be saved to prevent modifications and compare results with future executions of the same query. Saved queries can be found in the “Saved results” tab.