> For the complete documentation index, see [llms.txt](https://docs.b2ihealthcare.com/snow-owl-authoring-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.b2ihealthcare.com/snow-owl-authoring-platform/reference-sets/reference-set-types/content-type-reference-sets/query-type-reference-sets.md).

# Query type Reference Sets

Query type Reference Sets are referring to a Simple type Reference Set and associating it with an ECL query. The referenced Simple type Reference Set contains the results of the query expression producing a subset of concepts, descriptions, or relationships. It is generated automatically and can be updated easily to reflect the changes of a new release.

When saving a Query type Reference Set, the queries are executed and the new Simple type Reference Sets are automatically generated. The queries can be run against future releases to generate an updated set of subset members.

To create a new Query type Reference Set, right-click on the Query specification type navigational node and select the ![](/files/tss0ODmcnVMPvIfE6N7G) *New query type reference set...* Context Menu option.

### Adding Query Reference Set members <a href="#contenttypereferencesets-addingqueryreferencesetmembers" id="contenttypereferencesets-addingqueryreferencesetmembers"></a>

To add a query member:

* Click the ![](/files/-MWOT51xHMke8GNIndLx) *Add new reference set member* button in the editor's toolbar.

<figure><img src="/files/41Qfft9h4H5ovIkgmWxv" alt=""><figcaption><p>Query Type Refernce Set Members Wizard</p></figcaption></figure>

You can enter ECL expression in the Query section of the wizard. At any point during entering a query, the content assist can be invoked by hitting `Ctrl` + `Space`*.* When the content assist is invoked, users can pick from the different valid selections.

You can also choose an existing query. Clicking the **`Browse...`** button will open the Workplace folder in a file browser, where you can select an existing `ecl` file to define the content of the new Simple type Reference Set.

<figure><img src="/files/xnrk1DpOT42FuZH4u2Dd" alt=""><figcaption><p>Browse Query</p></figcaption></figure>

To learn more about queries in Snow Owl, please refer to the Semantic Queries section:

{% content-ref url="/pages/-MUsxWRYclPeXadDypVF" %}
[Semantic Queries](/snow-owl-authoring-platform/browsing-and-searching/semantic-queries.md)
{% endcontent-ref %}

The module of the Query type Reference Set member can also be set on the first page of the wizard. To be able to see the module of the memberships, enable the Module ID column in the Reference Set Editor table of the Preference Page.

{% hint style="info" %}
The generated Simple type Reference Set will belong to the primary module set in *SNOMED CT Settings*, but its members will belong to the module set here.
{% endhint %}

The next page of the wizard regards the Simple type Reference Set:

* Specify the properties of a new Simple type Reference Set, or
* Choose an existing one – the content of which will be overwritten with the results of the query.

<figure><img src="/files/yE3KawdGOHPln27vpLNj" alt=""><figcaption><p>Specify Simple type reference set</p></figcaption></figure>

Once all required properties are specified, hit **`Finish`** to add the member. The query is displayed for each member in the Reference Set table.

![Query Type Reference Set Editor](/files/Yxr6cgOyI3xJ8jVQmx7S)

After saving the Query type Reference Set, the queries are executed and the new Simple type Reference Sets are automatically generated. The queries can be run against future releases to generate an updated set of subset members.

### **Updating Query type Reference Sets:**

* Right-click on the Query type Reference Set and choose the  ![](/files/-M286fOsyqglS49iMN3m) *Update Query Reference Set* Context Menu optio&#x6E;***.***

The results of the process are displayed in the Update Query Reference Set Wizard. Click on a member to review details and choose which Simple type Reference Set member to update.

<figure><img src="/files/QQxCZu4RilWYbCSRcvDf" alt=""><figcaption><p>Update query type reference set</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.b2ihealthcare.com/snow-owl-authoring-platform/reference-sets/reference-set-types/content-type-reference-sets/query-type-reference-sets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
