# Defining Cohort Phenotypes

Authors computable phenotype and cohort definitions in the OHDSI ATLAS / CIRCE style...

- Repository: https://github.com/maziyarpanahi/openmed (5755 stars)
- Category: Writing
- License: Apache-2.0
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add maziyarpanahi/openmed --skill defining-cohort-phenotypes -g -a claude-code -y`
Codex: `npx skills add maziyarpanahi/openmed --skill defining-cohort-phenotypes -g -a codex -y`
Cursor: `npx skills add maziyarpanahi/openmed --skill defining-cohort-phenotypes -g -a cursor -y`
Gemini CLI: `npx skills add maziyarpanahi/openmed --skill defining-cohort-phenotypes -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add maziyarpanahi/openmed`

## Description

Authors computable phenotype and cohort definitions in the OHDSI ATLAS / CIRCE style over the OMOP CDM, combining standard concept sets with NLP-derived features that OpenMed extracts. Use when the user wants to define a patient cohort, write a computable phenotype, reuse PheKB or OHDSI Phenotype Library logic, build concept sets, or augment code-based criteria with text features. Trigger keywords: phenotype, cohort definition, OHDSI, ATLAS, CIRCE, OMOP CDM, concept set, PheKB, Phenotype Library, eMERGE, computable phenotype. Pairs adjacent to OpenMed: NLP features from openmed.analyze_text augment code-based phenotypes for entities that are poorly captured by structured codes. OMOP CDM and OHDSI tools are open source; restricted vocabularies (SNOMED, CPT) are user-supplied.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Defining cohort phenotypes (OHDSI / OMOP CDM)

A **computable phenotype** is a portable, executable definition of "which patients
have condition X", concept sets plus inclusion logic that runs against any
**OMOP CDM**-compliant database. In the OHDSI stack, ATLAS authors these visually,
**CIRCE** serializes them to a standardized **JSON** representation, and that JSON
compiles to database-specific SQL. This skill helps you author such definitions
and **augment them with NLP features** that OpenMed extracts from clinical text, exactly the signals that structured codes miss.

OMOP CDM, ATLAS, CIRCE, and the OHDSI Phenotype Library are open source. The
*vocabulary content* you reference (SNOMED CT, CPT4, ICD) is **user-supplied**, do not bundle restricted terminologies; load them into your own OMOP vocabulary
tables with your own licenses.

## When to use

- You need a reproducible cohort definition for analytics or research.
- You want to reuse an existing **PheKB** or **OHDSI Phenotype Library** definition
  and adapt it.
- A phenotype depends on facts that live only in **free text** (e.g. smoking
  status, symptom severity, social context) and code-based logic alone is weak.

For terminology grounding of individual entities, see `coding-icd10`,
`normalizing-rxnorm`, `mapping-loinc`; this skill is about composing them into a
cohort.

## Anatomy of a CIRCE cohort definition

A CIRCE cohort definition JSON has two parts: **ConceptSets** (the code lists) and
an **expression** (entry event + inclusion rules). Shape (abridged):

The rest: https://github.com/maziyarpanahi/openmed/blob/HEAD/skills/defining-cohort-phenotypes/SKILL.md
