In short
A cohort delimits a population: patients over 65 hospitalized for sepsis in 2023. You build it from criteria combined with AND and OR, without writing SQL — though the SQL stays visible and editable. The attrition chart shows how many patients each criterion removes, and Materialize freezes the membership list.
Defining who enters the study
This is the first concrete step in most projects, and the most consequential: inclusion criteria determine the worth of everything that follows.
In Linkr a cohort is not a list of identifiers pasted from a spreadsheet. It is a definition — a set of criteria — that can be read back, discussed, corrected and re-run. Which changes everything when you publish: you pass on the reasoning, not merely its result.
One row per what?
Before the criteria, a question to settle: One row per what?
| Level | What a row represents |
|---|---|
| Patient | One person, however many times they came in. |
| Hospitalization | One hospital stay. The same patient may appear several times. |
| Unit stay | One stay in a unit — an ICU stay within a hospitalization. |
| Event | A single occurrence: each administration, each measurement. |
The choice follows from the question. “How many patients received norepinephrine?” is counted at patient level; “what is the median ICU length of stay?” at unit-stay level.

This choice can be changed at any time
The level is switched in the toolbar without losing your criteria. It is worth comparing: a cohort of 800 patients may correspond to 1,200 hospitalizations, and the gap is often instructive.
The criteria
Add criterion offers eight types.
Age
A minimum, a maximum, in years, months or days — current age or age at admission.
Sex
Male, female, unknown.
Death
Deceased or alive, during hospitalization, during the unit stay, or at any time.
Time period
A date window.
Length of stay
In hours, days or months, at hospitalization or unit-stay level.
Care location
One or several units.
Concept
A diagnosis, a drug, a test. The most used — see below.
Free text
A search through clinical notes.
The Concept criterion
You pick the event table — diagnoses, prescriptions, lab results — then the concepts involved. Two refinements are available:
- a value filter: creatinine, but only above 200 µmol/L;
- an occurrence count: at least three measurements, not just one.
Occurrences are counted at the cohort’s level. On a patient-level cohort, “at least 3” means three times for that patient, across all stays.
The Free text criterion
For what structured data does not carry: a mention in a report. You search the document’s title or body, in one of three modes — contains, whole word, or regular expression.
Several terms combine as “any term” or “all terms”, and a search can be inverted with NOT.
Whole word avoids false positives
Searching contains “sepsis” also returns “asepsis”. Whole word mode removes that noise, which is the leading cause of an over-broad cohort.
This criterion requires mapped clinical notes
If no note table is declared in the database’s schema, the search cannot run: the criterion stays on screen, descriptively, but filters nothing. See Schemas.
Combining: AND, OR, NOT
Criteria assemble into groups, and groups nest. That is what lets you express a real definition:
(sepsis OR septic shock) AND age ≥ 18 AND NOT (transferred from another centre)
Each criterion carries three useful controls:
- AND / OR, deciding how it joins the previous one;
- NOT, which inverts it — this is how an exclusion criterion is written;
- Enable / Disable, which neutralizes it without deleting it.
Disable rather than delete
This is the gesture to remember when testing a definition: disable a criterion, re-run, compare the count. You measure its real weight without losing its settings — and you can turn it back on afterwards.
Running, and reading attrition
Run query executes and fills the right-hand panel, which has two tabs.
Results shows the rows and their count. Attrition gives the chart every publication asks for: how many patients remain after each criterion, applied in order.
It is the most instructive reading on the page. A criterion that drops the count from 4,000 to 40 is almost always a badly written criterion — a concept absent from this database, an unexpected unit of measure — rather than a genuinely rare population.
Displayed results are capped at 10,000 rows
The total count stays exact: only the display is limited. To work with a larger cohort, export to CSV or freeze it.
The SQL stays available
The Criteria / SQL toggle shows the query your criteria produce. Its first use is to understand, and to check.
It can also be edited. Hand-edited SQL is flagged with a dot, and a warning makes the rule clear: going back to the criteria regenerates the query and discards your edits.
Custom SQL disables attrition
Linkr computes attrition by unrolling your criteria one at a time. With a hand-written query there are no criteria to unroll: only the total count is computed. That is the price of SQL’s freedom, to weigh against the chart you will need in order to publish.
Freezing a cohort
Materialize records the membership list at a point in time. The toolbar then shows Frozen with its date.
The distinction from running is important:
Run query
A preview, recomputed each time.
Used to work out the definition. If the database changes, the count changes.
Materialize
A frozen list, kept.
This is the list other pages read. It does not move until you regenerate it.
The point is reproducibility. A hospital warehouse updates continuously: without a snapshot, two analyses run a month apart do not cover the same patients, and your figures become impossible to recover. Freezing the cohort fixes the denominator.
Re-materializing asks for confirmation, noting that the counts may differ.
Event-level cohorts cannot be frozen
An event cohort has no single base table to hold its membership list against. The button is disabled and says so.
What a cohort feeds
Worth knowing, so you do not look for it where it has no effect.
A cohort filters the patient list on the Patient data page: you select the cohort, and browse only its members.
A cohort does not yet filter datasets or dashboards
This is the limitation to know. To work on your cohort’s data outside the Patient data page, export the results to CSV, or take its SQL into an SQL collection.
A cohort also appears as a node in the pipeline, but that is a diagram with no execution: the node documents the chain, it filters nothing.
Exchanging with OHDSI ATLAS
A definition imports and exports in OHDSI ATLAS’s JSON format. A definition published by a research network can therefore be re-run against your database, and yours can go to a partner who does not use Linkr.
Cohorts travel with the project
A cohort is part of the export: its criteria leave with the project, in a readable, versionable file. Run results stay local — they depend on the database, not on the definition.
Going further
- Concepts — finding the concepts to put in a criterion.
- Patient data — checking that the cohort really holds the right patients.
- Schemas — what the mapping must declare for criteria to work.
- Designing a study — writing defensible inclusion criteria.