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:
- Patient — one record per patient. This is the most common choice.
- Hospitalization — one record per hospitalization. The same patient may appear multiple times if they had several hospitalizations.
- Unit stay — one record per unit stay.
- Event — one record per clinical event (diagnosis, prescription, test…). This is the finest level of granularity. When you select this level, a text field appears to specify the type of event (for example: “each microbiological sample”, “each potassium level above 5.0 mM”, “each episode of mechanical ventilation”).
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:
- AND (blue) — both criteria must be satisfied simultaneously
- OR (orange) — it is enough for one of the two to be satisfied
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:
- Named — click the label to edit it (for example: “Biological criteria”, “Comorbidities”)
- Inverted — via the NOT button, to exclude the entire group
- Enabled or disabled — just like an individual criterion
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:
- A value filter — for example, hemoglobin > 10 g/dL (with operators: greater than, less than, equal, between…)
- A minimum number of occurrences — for example, at least 2 diagnoses of diabetes
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:
- Patients aged 18 or older
- With a diagnosis of sepsis
- With a stay in the ICU of at least 24 hours
And exclude:
- Minors (already covered by the age ≥ 18 criterion)
- Patients with an ongoing pregnancy
Here is how to structure the tree:
- Age criterion: minimum 18, reference at admission
- AND — Concept criterion: concept set “Sepsis”, diagnoses table
- AND — Duration criterion: minimum 1 day, level “unit stay”
- AND — Concept 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.