Resources
2/4
12 min Boris Delange · 2026/03/12

Define the study population

Build inclusion and exclusion criteria with the logic tree and the eight criterion types.

Summary

The Selection criteria section of the Study Designer lets you define who will be included in the study and who will be excluded. You build a logic tree using eight criterion types: age, sex, death, period, duration, care site, medical concept, and free text. Criteria can be grouped, reordered, and enabled or disabled to test different combinations.

Statistical unit

Before defining your criteria, start by choosing the statistical unit of your study. This determines the granularity of your cohort:

Which level to choose?

For most clinical studies, the patient unit is sufficient. Choose hospitalization if your research question focuses on hospitalizations (for example, length of stay in the ICU). Choose unit stay if you need to distinguish between the different units a patient went through during the same hospitalization. Choose event if you are analyzing each individual act or observation (for example, each antibiotic prescription).

The criteria tree

Selection criteria are organized as a logic tree. This tree is made up of criteria (the conditions to check) connected by logical operators (AND, OR).

Adding a criterion

Click the Add criterion button to open the menu. You will find the eight available criterion types (detailed below) as well as the Add group option, which creates a sub-tree with its own logical operators.

AND / OR operators

Between two criteria, a separator indicates the logical operator connecting them:

Click the operator button to toggle between AND and OR.

The NOT button

Each criterion and each group has a NOT button that inverts its logic. For example, an age criterion “18–65 years” with NOT enabled means “exclude patients aged 18 to 65.”

Inclusion and exclusion

The Study Designer uses a single tree for all selection criteria. To express the classic exclusion criteria of a protocol, use the NOT button on the relevant criteria or groups.

Enabling / disabling a criterion

Each criterion has an enable / disable button that lets you make it inactive without deleting it. This is handy for testing different combinations of criteria.

Groups

Groups let you create subsets of criteria with their own logic. A group can contain criteria and other groups, with no depth limit.

Each group can be:

Reordering criteria

Criteria and groups can be reordered by drag and drop using the handle on the left side of each element.

The eight criterion types

Age

Filters patients by age range. Two fields: minimum age and maximum age (both optional). You can choose whether the age is calculated at admission or at the current date.

Sex

Selects patients by sex: male, female, or unknown. Multiple values can be selected at once.

Death

Filters by vital status: deceased or alive. You also specify the reference period: during hospitalization or during unit stay.

Period

Restricts the selection to a date range (start date and/or end date). Useful for limiting the study to a given time period.

Duration

Filters by length of stay, in number of days (minimum and/or maximum). You can choose the granularity level: hospitalization or unit stay.

Care site

Selects patients treated in one or more specific care sites (for example: ICU, emergency department, cardiology). Care sites are added one by one, each with a label that will be used in the generated SQL code.

Concept

Selects patients based on medical codes: diagnoses, medications, lab tests, procedures, etc.

This criterion uses the concept sets defined in the dedicated section of the Study Designer (see the next article). You choose the source table (diagnoses, prescriptions, lab results…), then the concept set to use.

You can also specify:

Medical terminologies

Medical codes (ICD-10, SNOMED CT, LOINC, ATC…) are at the heart of population selection in a clinical data warehouse. To learn more about these terminologies and the code mapping process, see the article on terminologies.

Free text

For criteria that don’t match any of the above types, the free text criterion lets you describe the condition in plain language. This is useful for qualitative or organizational criteria that cannot be directly translated into an automated query.

Example

Let’s take a concrete example. You want to include in your study:

And exclude:

Here is how to structure the tree:

  1. Age criterion: minimum 18, reference at admission
  2. ANDConcept criterion: concept set “Sepsis”, diagnoses table
  3. ANDDuration criterion: minimum 1 day, level “unit stay”
  4. ANDConcept criterion with NOT enabled: concept set “Pregnancy”, diagnoses table

All four criteria are connected with AND: all conditions must be met simultaneously. The NOT button on the last criterion turns “has a pregnancy diagnosis” into “does not have a pregnancy diagnosis.”

Key takeaways

  • The statistical unit (patient, hospitalization, or unit stay) determines the cohort granularity.
  • Criteria are organized as a logic tree with AND, OR, and NOT operators.
  • Groups let you create subsets of criteria with their own logic, and can be named.
  • The eight criterion types cover essential needs: age, sex, death, period, duration, care site, medical concept, and free text.
  • The concept criterion leverages medical terminologies to select patients by their diagnoses, treatments, or tests.