
ohdsi/capr
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
Cohort definition Application Programming in R
概要
The goal of Capr, pronounced 'kay-pr' like the edible flower, is to provide a language for expressing OHDSI cohort definitions in R code. OHDSI defines a cohort as "a set of persons who satisfy one or more inclusion criteria for a duration of time" and provides a standardized approach for defining them (Circe). Capr exposes that standardized approach through a programmatic interface in R, making it easier to build, version, and reuse cohort definitions — particularly when creating a large number of similar cohorts. Capr code is designed to be human-readable while remaining directly executable against an OMOP Common Data Model. Learn more about the OHDSI approach to cohort building in the cohorts chapter of the Book of OHDSI. Users can install the current development version of Capr from GitHub with: Documentation can be found on the package website. PDF versions of the documentation are also available on the package website.
README
以下は原文 README の抜粋です。原文を見る。
Capr
Capr is part of HADES
Introduction
The goal of Capr, pronounced ‘kay-pr’ like the edible flower, is to provide a language for expressing OHDSI cohort definitions in R code. OHDSI defines a cohort as “a set of persons who satisfy one or more inclusion criteria for a duration of time” and provides a standardized approach for defining them (Circe). Capr exposes that standardized approach through a programmatic interface in R, making it easier to build, version, and reuse cohort definitions — particularly when creating a large number of similar cohorts. Capr code is designed to be human-readable while remaining directly executable against an OMOP Common Data Model.
Learn more about the OHDSI approach to cohort building in the cohorts chapter of the Book of OHDSI.
Installation
Users can install the current development version of Capr from GitHub with:
# install.packages("devtools")
devtools::install_github("ohdsi/Capr")
User Documentation
Documentation can be found on the package website.
Start here based on your goal:
| Goal | Vignette |
|---|---|
| Build your first cohort | Using Capr |
| Understand queries, criteria, and groups | Capr components |
| Work with concept sets | Working with Concept Sets |
| Convert Atlas JSON to Capr code | Decompiling Atlas JSON |
| Build many cohorts from a template | Capr for Templating |
| See clinical cohort examples | Cohort Definition Examples |
PDF versions of the documentation are also available on the package website.
Using Capr with LLM Coding Agents
Capr ships with a self-contained skill bundle for LLM coding agents (Claude Code, GitHub Copilot, Cursor, etc.) that generates validated cohort definitions from natural-language descriptions — no MCP servers, no network infrastructure, no database connection. The bundle
推奨ツール
別のキーワードを試すか、フィルタを外してください。
インストール
npx skillfish add ohdsi/capr