Network Study Paint By Numbers

Caution: work in progress

This tool is under construction and has not been peer reviewed. Treat everything in it as a draft: the stages, the worked example, the generated SQL, and the exported JSON. Check anything you plan to rely on against the source protocol, the OHDSI documentation, and your own data before using it in a study. Corrections are welcome.

Free research tool

Network Study Paint By Numbers

Plan an OHDSI network study end to end: the research question, every concept set behind it, the ATHENA lookups that fill them, the cohort logic, the exposure windows, and the feasibility work that decides whether the study can run across the network. One tab walks through a published study, decision by decision. The other collects the same decisions for your own study and exports them as a protocol-ready plan. Start with the worked example, then work backwards into your own design.

The path through this tool

The numbered stages run in order, and each one produces something the next needs. Vocabulary work sits off the path on purpose: it is how concept sets get built, and it feeds cohort logic too, so it is not a step you finish and leave behind. Click any stage to jump to it. The same stages appear on both tabs, so you can read the worked example and fill in your own study side by side.

The loop from feasibility back to the question is the one people skip. If the read comes back low, the fix is usually a different question, not a harder push on the same one.

The study behind this walkthrough

The worked example is Estimating the risk of non-arteritic ischemic optic neuropathy (NAION) and diabetic retinopathy progression associated with semaglutide exposure, an OHDSI network study led by Cindy X. Cai (Wilmer Eye Institute, Johns Hopkins) with the OHDSI Eye Care and Vision Research Workgroup. It began as a safety question in the news, semaglutide and a rare blinding condition, and became a network study run across administrative claims and electronic health record databases, with results published in JAMA Ophthalmology in 2025.

Every artifact is public:

Design details on this tab are reproduced from version 1 of that protocol as posted at ohdsi-studies.github.io/SemaglutideNaion, accessed August 2026. Concept IDs and thresholds may be revised over time, so verify anything you reuse against the live protocol and ATHENA.

Back to top

The research question

The clinical concern was a single question: does semaglutide cause NAION? The protocol split it into separate questions, each with a stated population, exposure, comparator, and outcome:

  1. Among patients with type 2 diabetes mellitus, is the risk for NAION higher among patients who use semaglutide as compared with a non-GLP-1 RA anti-diabetic medication?
  2. Among patients with type 2 diabetes mellitus, is the risk for diabetic retinopathy progression higher among patients who use semaglutide as compared with a non-GLP-1 RA anti-diabetic medication?
  3. Among patients with type 2 diabetes mellitus, is the risk for NAION higher among patients who use semaglutide as compared with other GLP-1 RA anti-diabetic medications?

Each is a population-level effect estimation question in the standard OHDSI form: a defined population, a defined exposure, a defined comparator, a defined outcome. The study also characterized NAION incidence in each exposure cohort before estimating anything, so a clinical characterization question sits underneath the estimation questions, and a self-controlled case series reuses the same cohorts as a second design.

The same study, run through the use case generator

If you had typed this study into the Analytic Use Case Generator before writing the protocol, it would have produced a use case per question. Here is what goes in each slot, taken from the protocol:

Use case typeSlotsAssembled question
Outcome incidence
Clinical characterization
drug: semaglutide
outcome: NAION
time horizon: while on treatment
Amongst people who are new users of semaglutide, how many experienced NAION within the on-treatment period of initiating treatment?
Comparative effectiveness
Population-level effect estimation
drug: semaglutide
outcome: NAION
time horizon: while on treatment
comparator: empagliflozin
Does exposure to semaglutide have a different risk of NAION within the on-treatment period, relative to empagliflozin?
Comparative effectiveness
Repeated per comparator and per outcome
drug: semaglutide
outcome: diabetic retinopathy progression
time horizon: while on treatment
comparator: dulaglutide
Does exposure to semaglutide have a different risk of diabetic retinopathy progression within the on-treatment period, relative to dulaglutide?

Filling the slots this way shows something the protocol text alone does not. The comparative effectiveness template gets instantiated once per comparator and outcome pair, which is how a short list of protocol questions becomes the much larger set of comparisons the study ran. The self-controlled case series has no template in the generator, because it contrasts exposed and unexposed time within the same people rather than comparing two cohorts.

What the generator's feasibility read would have shown for this study
DimensionAnswer for this studyWhy
Computable phenotypesNeeds a custom, uncertain definitionNAION had no validated phenotype, so the team wrote two definitions and measured them with PheValuator.
Population prevalenceCommon (>1%)Adults with type 2 diabetes on second-line treatment.
Recorded in coded fieldsMostly coded, with some misclassificationDiagnosis codes for ischemic optic neuropathy exist, but they are imprecise, which is what drove the two-definition approach.
Data domainsAlso procedures / devicesConditions, drugs, and visits, plus procedures for the retinopathy treatment outcomes.
Continuous follow-upUp to 1 yearOn-treatment time-at-risk, with 365 days of prior observation required.
Governance and linkageStandard population, no linkageAdults, no record linkage needed.
ComparatorEstablished active comparator (equipoise)Second-line diabetes drugs that clinicians genuinely choose between, reused from LEGEND-T2DM.
ConfoundingRich covariates; large-scale PS feasibleThe study used large-scale propensity scores with a curated negative control set.

That mix lands in the upper feasibility bands: strong on population, comparator, and confounding control, with the outcome phenotype as the one real risk. The study addressed exactly that risk by defining NAION twice and measuring both definitions, which is what the feasibility read would have told you to do.

What to reuse in your own study: one clinical concern usually decomposes into several analytic questions of different types. Write each one in the standard form before touching data; the question type determines which design, which cohorts, and which feasibility checks follow.
Back to top

Design and study population

The primary design is an active comparator, new-user cohort design. The population is adults 18 or older with type 2 diabetes mellitus; an indication cohort defines that population and excludes type 1 and secondary diabetes. The target is new users of semaglutide as second-line treatment after metformin. Comparators come in two flavors: within class (dulaglutide, exenatide) and across class (empagliflozin, sitagliptin, glipizide), and the protocol states these were chosen as the most commonly occurring medication within each class in the LEGEND-T2DM study. A self-controlled case series compares NAION incidence during exposed and unexposed time in the same people, which trades confounding-by-indication concerns for within-person assumptions.

The study period runs from December 1, 2017 to December 31, 2023. Analysis uses large-scale propensity scores with 1:1 matching and Cox models for the cohort comparisons, and Poisson regression for the self-controlled case series, executed through the Strategus pipeline calling HADES packages.

What to reuse in your own study: the team did not invent its exposure cohorts, comparator choices, or negative controls; it reused them from LEGEND-T2DM. Before designing from scratch, look for a prior network study in your therapeutic area whose validated pieces you can reuse.
Back to top

Concept sets

A concept set is the bridge between a clinical idea ("type 2 diabetes", "semaglutide") and the rows in an OMOP database. Each entry names a standard concept and two decisions: whether to include its descendants in the vocabulary hierarchy, and whether the entry is an exclusion that subtracts concepts from the set. The protocol appendix publishes every concept set as a table with exactly those columns, which is what an ATLAS export looks like.

The semaglutide exposure concept set
Concept IDConcept nameCodeVocabularyExcludedDescendants
793143semaglutide1991302RxNormNOYES

One row covers the exposure. The RxNorm ingredient with descendants includes every clinical drug, branded product, and dose form of semaglutide, which is why drug concept sets anchor at the ingredient level.

The type 2 diabetes concept set, including its exclusions
Concept IDConcept nameCodeVocabularyExcludedDescendants
201820Diabetes mellitus73211009SNOMEDNOYES
443238Diabetic - poor control268519009SNOMEDNOYES
442793Complication due to diabetes mellitus74627003SNOMEDNOYES
4016045Diabetic - good control170763003SNOMEDNOYES
201254Type 1 diabetes mellitus46635009SNOMEDYESYES
435216Disorder due to type 1 diabetes mellitus420868002SNOMEDYESYES
40484648Type 1 diabetes mellitus uncontrolled444073006SNOMEDYESYES
40484649Type 1 diabetes mellitus well controlled444074000SNOMEDYESYES
195771Secondary diabetes mellitus8801005SNOMEDYESYES
761051Complication due to secondary diabetes mellitus138811000119100SNOMEDYESYES
43531009Pregnancy and type 1 diabetes mellitus609566000SNOMEDYESYES
4024659Gestational diabetes mellitus11687002SNOMEDYESYES

The set anchors on the broad SNOMED parent, Diabetes mellitus, and then carves type 1, secondary, and gestational diabetes out of it with exclusions (shown in red). Starting broad and subtracting is often safer than starting narrow, because source data frequently code the generic parent.

The GLP-1 receptor agonist class set that enforces the new-user rule
Concept IDConcept nameCodeVocabularyExcludedDescendants
45774435dulaglutide1551291RxNormNOYES
1583722exenatide60548RxNormNOYES
40170911liraglutide475968RxNormNOYES
44506754lixisenatide1440051RxNormNOYES
44816332albiglutide1534763RxNormNOYES
793143semaglutide1991302RxNormYESYES

This set exists to express "no prior GLP-1 RA exposure other than the target drug". The target itself is listed and excluded, so the same class definition can be reused for every exposure cohort by swapping which ingredient is excluded.

The protocol appendix holds the same style of table for every other set the cohorts need: metformin, insulin, each comparator ingredient, and each competing drug class. Every clinical phrase in a cohort definition ("prior metformin", "no prior sulfonylurea", "no type 1 diabetes") is backed by its own named concept set.

Building the T2DM set in ATLAS

  1. Open Search, type diabetes mellitus, and filter to Standard Concept: Standard, Vocabulary: SNOMED.
  2. Tick Diabetes mellitus (201820) and the other three included concepts, then Add to Concept Set and give the set a name.
  3. Search again for the type 1, secondary, and gestational diabetes concepts and add those to the same set.
  4. On the Concept Set Expression tab, tick Descendants on every row, then tick Exclude on the eight carve-out rows.
  5. Open Included Concepts and read the resolved list. If a concept you expected is missing, or one you did not expect appears, fix the expression now.

Rather than doing that by hand, you can paste the finished set straight in. ATLAS offers two import routes, both on the Import tab of a concept set.

RouteWhere to pasteWhat comes across
Concept Set Expression JSONImport tab → Concept Set sub-tabConcepts plus the Descendants and Exclude flags already set.
Concept identifiersImport tab → Concept Identifiers sub-tabJust the concepts. ATLAS looks up each one itself, so nothing can be stale, but you set the flags by hand afterward.

If a pasted JSON ever throws a DataTables warning about an unknown parameter, the JSON is missing a field that ATLAS's table expects. The concept identifier route avoids that class of problem, because ATLAS builds the concept records from the vocabulary rather than trusting the file.

What to reuse in your own study: inventory every clinical idea your question mentions, including the ones hiding inside exclusion rules, and give each its own concept set before writing any cohort logic. Search the OHDSI Phenotype Library first; an evaluated definition beats a new one.
Back to top

ATHENA and the vocabulary, online and offline

ATHENA is the OHDSI vocabulary browser, and it is where the concept IDs above come from. The working pattern for filling a concept set:

  1. Search the clinical term and filter to Standard Concepts = Standard; only standard concepts populate the *_concept_id fields your cohorts query.
  2. Pick the right level: for drugs, the RxNorm Ingredient (semaglutide, 793143); for conditions, the SNOMED clinical finding (Diabetes mellitus, 201820). Descendants then do the fan-out to dose forms or subtypes.
  3. Open the concept page and review its hierarchy and related concepts to decide what descendants will pull in and what needs excluding.
  4. Record the concept ID, the source code, and the vocabulary in your concept set table, with the Excluded and Descendants flags decided deliberately.

ATHENA also distributes the vocabulary tables for download (an account is required, and some vocabularies such as CPT4 need a UMLS API key during the download step). Once loaded into a database, three tables answer almost everything: CONCEPT, CONCEPT_ANCESTOR, and CONCEPT_RELATIONSHIP. The queries below use the study's real concept IDs, so you can run them against any OMOP vocabulary and compare. Each task below is shown twice: the point-and-click path in ATLAS, and the SQL for a downloaded vocabulary. Use whichever fits how you work; they answer the same question.

Look up a concept from its source code

In ATLAS

  1. Open Search in the left menu.
  2. Type the drug or condition name, or paste the source code, and press Search.
  3. In the results, set the Standard Concept filter to Standard and filter Vocabulary to RxNorm for drugs or SNOMED for conditions.
  4. Click the concept name to open it. The concept ID, code, domain, and class are listed at the top.

Same lookup in SQL

SELECT concept_id, concept_name, domain_id, vocabulary_id,
       concept_class_id, standard_concept, concept_code
FROM concept
WHERE vocabulary_id = 'RxNorm'
  AND concept_code = '1991302';   -- semaglutide; expect concept_id 793143

Resolve a concept set: descendants in, exclusions out

In ATLAS

  1. Open Concept Sets and click New Concept Set, or open an existing one.
  2. From a vocabulary search, tick the concepts you want and click Add to Concept Set.
  3. On the Concept Set Expression tab, tick Descendants for the concepts that should fan out, and Exclude for the branches you are carving away.
  4. Click the Included Concepts tab. This is the resolved list, the same output the SQL returns. Read it before trusting the set.
  5. The Included Source Codes tab shows which source codes map in.

Same resolution in SQL

-- Type 2 diabetes as defined in the protocol:
-- Diabetes mellitus and descendants, minus T1DM, secondary, and gestational branches
SELECT DISTINCT c.concept_id, c.concept_name, c.vocabulary_id
FROM concept_ancestor ca
JOIN concept c ON c.concept_id = ca.descendant_concept_id
WHERE ca.ancestor_concept_id IN (201820, 443238, 442793, 4016045)
  AND c.invalid_reason IS NULL
  AND c.concept_id NOT IN (
        SELECT descendant_concept_id
        FROM concept_ancestor
        WHERE ancestor_concept_id IN
          (201254, 435216, 40484648, 40484649,
           195771, 761051, 43531009, 4024659)
      )
ORDER BY c.concept_name;

Find which source codes map to your standard concepts

In ATLAS

  1. Open the concept set and click the Included Source Codes tab.
  2. Filter by vocabulary to see only the coding systems your sites use, such as ICD-10-CM or ICD-9-CM.
  3. Click Export on that tab to download the list as a file you can share with a data holder.

Same mapping in SQL

-- Which ICD-10-CM (or other source) codes land on these standard concepts?
SELECT src.vocabulary_id, src.concept_code, src.concept_name,
       std.concept_id AS standard_concept_id, std.concept_name AS standard_name
FROM concept_relationship cr
JOIN concept src ON src.concept_id = cr.concept_id_1
JOIN concept std ON std.concept_id = cr.concept_id_2
WHERE cr.relationship_id = 'Maps to'
  AND cr.invalid_reason IS NULL
  AND std.concept_id IN (793143)   -- swap in any resolved standard IDs
ORDER BY src.vocabulary_id, src.concept_code;
What to reuse in your own study: resolve every concept set with the descendant query and read the resulting list before trusting it. Unexpected concepts come in through the hierarchy, and it costs less to find them in the vocabulary than in your results.
Back to top

Cohort logic

Here is the semaglutide exposure cohort from the protocol, laid out as the anatomy every ATLAS cohort definition shares. Read it top to bottom as a machine would.

Entry event
First-ever drug exposure of semaglutide, limited to the earliest event per person, with 365 days of continuous observation before the event.
Entry restrictions
Age 18 or older at entry; at least one type 2 diabetes condition occurrence on or before entry; no type 1 diabetes; no secondary diabetes (events outside the observation period are allowed for these lookbacks).
Inclusion rules
  • Prior metformin: a metformin drug era of 90 days or more starting anytime up to 90 days before entry, or at least 3 metformin exposures on or before entry.
  • New to the class and its rivals: no prior exposure to GLP-1 RAs other than semaglutide, DPP4 inhibitors, SGLT2 inhibitors, sulfonylureas, or other anti-diabetics.
  • Essentially insulin-naive: no insulin era longer than 30 days before entry, and no insulin era starting in the 30 days around entry. The protocol labels this rule a proxy for under 30 days of insulin use with no combination initiation, which records that the rule approximates the clinical idea rather than capturing it exactly.
Cohort exit
End of continuous exposure to semaglutide, allowing a 30-day gap between exposures, adding 0 days after the final exposure, using days supply and exposure end dates for duration.
Eras
Remaining events combine into cohort eras if they are within 0 days of each other.

The same structure repeats for each comparator with the drug names swapped. The logic is identical; only the concept sets change.

Building this cohort in ATLAS

  1. Open Cohort Definitions and click New Cohort Definition.
  2. Under Cohort Entry Events, click Add Initial Event and choose Drug Exposure. Set the concept set to your semaglutide set, and tick First exposure.
  3. Set with continuous observation of 365 days before the event, and limit initial events to earliest event per person.
  4. Under Inclusion Criteria, click New inclusion criteria once per rule and name it, for instance "Prior metformin". Build the logic with the criteria and attribute pickers on the right, which is where the day windows are entered.
  5. Under Cohort Exit, choose End of continuous exposure, set the persistence window gap to 30 days, and leave the surveillance offset at 0.
  6. Save, then run Generate against a data source to see counts.
The import path is not where you would expect. To load a cohort definition JSON into ATLAS, open a cohort definition, go to the Export tab, choose the JSON sub-tab, paste the JSON over what is there, and click Reload. There is no Import button for cohorts, unlike concept sets, which do have one. This trips up nearly everyone the first time.

These cohorts are already on the public ATLAS demo

The study's own definitions were built on atlas-demo.ohdsi.org, so you can open the real thing rather than rebuilding it. Search the cohort definition list for semaNAION and you will find the set, including:

  • Persons with type 2 diabetes mellitus and no prior T1DM or secondary diabetes, the indication cohort
  • New user of semaglutide as 2nd-line treatment with prior T2DM and prior metformin, and the same for each comparator
  • Nonarteritic anterior ischemic optic neuropathy with index date correction, in its specific and sensitive forms
  • Treatment-requiring diabetic retinopathy or macular edema, with and without vitrectomy

Open one, go to Export → JSON, and copy what you see. On the other tab you can load that JSON straight into your own plan and edit from there.

Anyone can save to the public demo and it is periodically reset, so treat what you find there as a teaching copy rather than the authoritative version. The protocol and the study repository are the record.

The outcome side gets the same rigor. NAION has two definitions, a specific one (two ischemic optic neuropathy diagnoses on separate days within 90 days, with the outcome date pulled earlier if preceded within 60 days by a visual field defect, optic disc disorder, optic neuritis, or optic disc edema) and a sensitive one (a single diagnosis with the same adjustments); both exclude giant cell arteritis and traumatic optic neuropathy. Rather than assuming these definitions work, the study measured their performance with PheValuator.

What to reuse in your own study: write your entry event, restrictions, inclusion rules, and exit as separate, named pieces, and when a rule is a proxy for something the data cannot observe directly, document it as a proxy in the rule name itself, the way this protocol does with insulin.
Back to top

Windows of exposure and time-at-risk

Separate windows do separate jobs in this study, and keeping them distinct is the point:

  • The washout window is the 365 days of continuous observation required before entry. It gives every subject enough visible history to establish "new user" and to build covariates.
  • The lookback windows inside the inclusion rules (metformin up to 90 days before entry; class exclusions anytime before entry; the insulin rule's 30-day spans) each encode a specific clinical requirement.
  • The time-at-risk is when outcomes count. The primary analysis is on-treatment: from cohort entry until a gap in exposure of more than 30 days, the end of continuous observation, or the end of the study period, whichever comes first. An intent-to-treat analysis is run as well, and a sensitivity analysis splits the study period into calendar windows (December 2017 to January 2020, February 2020 to June 2021, July 2021 to December 2023) because semaglutide uptake changed so much across those years.
What to reuse in your own study: for every analysis, write down the washout, each lookback, and the time-at-risk start and end anchors as explicit numbers before anyone touches ATLAS. Ambiguity in windows is the single most common reason two sites implement "the same" cohort differently.
Back to top

Diagnostics and network feasibility

The feasibility work is a set of named diagnostics with numeric thresholds, set in advance and evaluated while blinded to results. A database contributes to the meta-analysis only if it passes.

Feasibility and diagnostic activities in the protocol

  • CohortDiagnostics runs on every target, comparator, indication, and outcome cohort to check for measurement error before any estimation.
  • PheValuator estimates sensitivity, specificity, and predictive values for both NAION phenotype definitions, replacing "we assume the codes are right" with measured performance.
  • Negative controls: exposure-outcome pairs with no expected causal effect, adapted from LEGEND-T2DM through a data-driven algorithm plus expert review, used to estimate and calibrate residual bias.

Pass or fail thresholds for the cohort comparisons

DiagnosticThreshold
Covariate balance (standardized mean difference)< 0.1
Empirical equipoise (preference scores between 0.3 and 0.7)> 10% of both arms
Residual bias (expected absolute systematic error, EASE)< 0.25
Meta-analysis heterogeneity< 0.4
Minimum detectable relative risk (meta-analytic)< 10

The self-controlled case series has its own gates: a pre-exposure check and a time-trend check, each requiring p above 0.05, plus the same EASE bound. Because every site runs the identical Strategus study package, the network feasibility question becomes concrete: which databases have the cohorts, the follow-up, and the diagnostics results to clear these bars?

What to reuse in your own study: choose your diagnostics and their thresholds while you are still blind to any result, and write them into the protocol. Set the thresholds so that a database can fail them.
Back to top

The protocol document

Everything above becomes a written protocol, and in OHDSI that protocol is public before the results exist. The SemaglutideNaion protocol is posted as a versioned HTML document, and its structure is the community's working template, so copy it:

  • Front matter: abbreviations, responsible parties with institutional affiliations, and a disclosure that the study runs within OHDSI.
  • Abstract: background, purpose, design, subjects, methods, and expected conclusions, written in the same shape a journal will later ask for.
  • Amendments and milestones: empty sections held open, so later changes are recorded as amendments rather than quiet edits.
  • Rationale and background: the trial and observational evidence that motivated the question, with citations.
  • Study objectives: the questions restated as numbered objectives.
  • Research methods: design, population, exposures, outcomes, covariates, and negative controls, each pointing at the cohort definitions.
  • Data analysis plan: which HADES packages run, in what order, with the time-at-risk definition written out.
  • Study diagnostics: the pass or fail thresholds, stated before any result is seen.
  • Strengths and limitations, human subjects protection, dissemination plan: including that each site seeks its own IRB determination.
  • Appendix: every cohort definition in full, printed as entry events, inclusion rules, exits, and concept set tables.

That appendix is what makes the protocol reproducible. A reader can rebuild every cohort from the document alone, without access to the authors' ATLAS instance.

What to reuse in your own study: write the protocol before running anything, publish it where collaborators can cite it, and print the full cohort definitions into an appendix. Leave the amendments section in place from version 1 onward.
Back to top

Building and testing the study package

The protocol describes the study; the study package executes it. For this study that package is an R project in a public repository, generated from the OHDSI EmptyStudyRepository template, so its shape matches other network studies:

Analysis specification
createStrategusAnalysisSpecification.R builds the specification; the result is saved as inst/fullStudyAnalysisSpecification.json. The JSON, not the R script, is what each site executes.
A diagnostics-only specification
inst/cohortDiagnosticsAnalysisSpecification.json is a separate, lighter specification. Sites can run diagnostics alone before committing to the full study.
Execution script
StrategusCodeToRun.R holds a clearly marked block of inputs: CDM schema, work schema, output location, database name, cohort table prefix, minimum cell count, and connection details.
Locked dependencies
renv.lock pins every R package version. Sites run renv::restore() once, so all sites execute the same code against different data.
Results sharing
ShareResults.R uploads results using a key file and user name issued by the study coordinator.
Status badge
The README carries a study status badge, currently Results Available, so a visitor knows the stage without reading further.

How a site tests before running

  1. Set up R, RTools, RStudio, and Java following the HADES R Setup instructions.
  2. Confirm that R can reach the OMOP CDM through DatabaseConnector, before touching the study code.
  3. Download the package, open the project, and restore the environment with renv::restore(). The README warns this step is slow and asks you to reopen the project afterward.
  4. Run the diagnostics specification first, by swapping which JSON the script loads. This generates the cohorts and their diagnostics without running the estimation.
  5. Set minCellCount to your site's own censoring requirement before any results leave.
  6. Run the full specification only once diagnostics look right.
What to reuse in your own study: ship a diagnostics-only specification alongside the full one, pin your dependencies, and put every site-specific value in a single labeled input block. A site that has to edit code in several places will edit it differently from the next site.
Back to top

Running it across the network

Execution is deliberately uneventful, which is the goal. Each site runs the same specification against its own CDM, writes results into a per-database folder as CSV files, inspects them, and uploads them to the coordinator. Nothing patient-level moves; the minimum cell count censors small counts at the source.

Once results arrive, the coordinator runs the evidence synthesis (evidenceSynthesis.R in this package) and applies the diagnostics gates set in the protocol. Databases that fail the thresholds are excluded from the meta-analysis, and that decision is made while blinded to the estimates. Results are published through the OHDSI results explorer, discussed on the community calls, presented at conferences, and written up as a manuscript.

This study reached the last of those stages: the findings appeared in JAMA Ophthalmology, and the repository badge moved to Results Available. A companion study on diabetic retinopathy followed from the same package.

What to reuse in your own study: plan the results path before recruiting sites. Decide who coordinates, how results are transferred, what the minimum cell count is, and who applies the diagnostics gates, and write those answers into the protocol rather than settling them over email later.
Back to top

Your research question

Choose the analytic use case that matches what you want to learn, then fill in the blanks. The question assembles below in the standard OHDSI form.

The worked example pairs an estimation question with a characterization question and a self-controlled design on the same cohorts. If your concern decomposes the same way, note the companion questions here.

Back to top

Design and study population

Name where each comparator comes from. The worked example reused its comparators from LEGEND-T2DM rather than inventing them.

Back to top

Your concept sets

List every clinical idea your question and cohort rules mention, including the ones inside exclusions, and build a concept set for each. For every row, record the standard concept ID from ATHENA and decide the Descendants and Excluded flags deliberately.

Start from an existing ATLAS definition

If the concept set or cohort you want already exists, load it instead of retyping it. This reads the JSON that ATLAS shows on a concept set's Export tab, or a cohort definition's Export → JSON tab, and fills in the stages below from it.

A cohort definition brings its concept sets, entry event, observation window, age restriction, inclusion rule names, and exit strategy. A concept set brings itself. Importing adds to what you have; it does not erase your existing entries.

Building these in ATLAS

  1. Open Search, find each concept, and filter to Standard Concept: Standard.
  2. Tick the concepts and click Add to Concept Set.
  3. On Concept Set Expression, set the Descendants and Exclude flags to match what you entered above.
  4. Read the Included Concepts tab before using the set anywhere.

Or skip the clicking: export what you entered above in ATLAS's own JSON format and paste it in.

Both routes live on the Import tab of a concept set. The JSON sub-tab carries your Descendants and Exclude flags across; the Concept Identifiers sub-tab takes a plain comma-separated list and has ATLAS look up each concept itself, which is the more forgiving route if a paste ever errors.

Back to top

Vocabulary verification

Work through this for each concept set above, in ATHENA or against a downloaded vocabulary:

The generator below writes the resolve query for each of your concept sets, using the included and excluded IDs you entered above. Run it against CONCEPT and CONCEPT_ANCESTOR from the ATHENA download (an account is required, and CPT4 needs a UMLS API key during download).

Back to top

Your cohort logic

Define the target cohort's anatomy the way the worked example does: entry, restrictions, inclusion rules, exit. Repeat mentally for each comparator; if only the concept sets rotate, you have designed it well.

Inclusion rules

Name each rule and state its logic with its window, e.g., "Prior metformin: era of 90+ days starting up to 90 days before entry, or 3+ exposures ever". If a rule is a proxy, name it as a proxy.

Cohort exit

Building this cohort in ATLAS

  1. Cohort DefinitionsNew Cohort Definition.
  2. Add Initial Event, choose the domain you picked above, and point it at your entry concept set.
  3. Set the prior continuous observation days and the earliest-event limit to match your entries.
  4. Add one inclusion criteria per rule you named, then build each rule's logic with the criteria and attribute pickers.
  5. Set Cohort Exit to match your choice above, then save and Generate.

The export below writes your entries as an ATLAS cohort definition you can load directly.

Before you load it. The import path for cohorts is the Export tab's JSON sub-tab: paste there and click Reload, since cohorts have no Import button. Note also that this export is a scaffold, not a finished definition. Your entry event, observation window, age restriction, and exit strategy are translated in full, but inclusion rules come across as named, empty rules, because this form holds them as prose rather than as structured criteria. Open each one in ATLAS and build its logic there.
If you imported a definition, do not send this export back over the original. Importing keeps each inclusion rule's name but not its underlying criteria, so exporting again would give you a cohort whose rules look right and do nothing. Treat an imported cohort as a starting point for a new definition, and keep editing the original in ATLAS.
Back to top

Your windows and time-at-risk

Back to top

Diagnostics and network feasibility

First, the diagnostics you commit to running and the gates a database must clear, decided before results exist:

Then set your best estimate on each network feasibility question. The read updates as you go.

    Back to top

    Your protocol document

    Draft the sections that the stages above do not already fill. Everything you entered comes across into the export; these fields cover the rest.

    Protocol checklist

    Export your plan as the starting draft. It carries the question, design, concept sets, cohort logic, windows, feasibility read, and the sections above.

    Back to top

    Your study package

    The package is what other sites run. Start from the OHDSI EmptyStudyRepository template so your repository matches what people expect.

    Sites may raise this to meet their own censoring rules.

    Package checklist

    Test it before anyone else runs it

    Back to top

    Running it across the network

    Execution checklist

    Keep the repository status current as you move through these stages, so anyone who finds the study knows where it stands.

    Back to top

    The worked example reproduces design elements from Estimating the risk of NAION and diabetic retinopathy progression associated with semaglutide exposure (version 1), the OHDSI network study protocol by Cindy X. Cai, Michelle Hribar, and the OHDSI Eye Care and Vision Research Workgroup, posted at ohdsi-studies.github.io/SemaglutideNaion with results published in JAMA Ophthalmology (2025). Concept IDs, windows, and thresholds are quoted as recorded in that protocol, accessed August 2026; verify anything you reuse against the live protocol and ATHENA. The analytic use case structure is adapted from the OHDSI Save Our Sisyphus Challenge and the Book of OHDSI. This planner is an educational scaffold, not a substitute for protocol review, phenotype validation, or IRB approval.