Hi! I have created a concept set in the concept set browser and I would like to import the concept set as a dataset into my code workbook so that I can join and filter based on my identified concepts. How should I go about doing this? Thank you!
Created by Sarah Pungitore uastudent Hi @uastudent,
Here are the steps for using the concept sets.
1. Go to your concept set in the concept set browser. Find the `codeset_id` and copy it.
2. Go to your code workbook and `Import dataset`. Go to the `Data Catalog` tab, go to the `OMOP Code Sets` folder, and import the [concept_set_members](https://unite.nih.gov/workspace/data-integration/dataset/preview/ri.foundry.main.dataset.e670c5ad-42ca-46a2-ae55-e917e3e161b6/master) table.
3. You can find your concept set in the concept_set_members table by using the query `SELECT * FROM concept_set_members WHERE codeset_id=[your codeset id]`
4. You'll then do an inner merge with your domain table on the results.
**Example**:
```
SELECT DISTINCT tab.*
FROM
condition_occurrence tab
INNER JOIN
(
SELECT concept_id
FROM concept_set_members
WHERE codeset_id=[your codeset id]
) AS c
ON c.concept_id=tab.condition_concept_id
```
Hope this helps!
@trberg