Chuyển đến nội dung chính

レッスン 10: ATLAS — 概念セットとコホートの定義

コンセプト セット (子孫を含む/除外する、マップされる) を作成し、コホート定義 (初期イベント、包含基準、打ち切り、時代ロジック) を設計し、コホート設計のベスト プラクティスを作成し、SQL を生成して CDM データベースで実行します。

🏗️ アーキテクチャ — レッスン 10 レッスン 10: ATLAS — コンセプト セットとコホート 定義

OHDSI および OMOP CDM — 包括的な医療データ分析

パート 4: ATLAS を使用したデータ分析

xdev.asia

レッスン 10: ATLAS — 概念セットとコホートの定義

はじめに

コホート定義 は、ATLAS のすべての分析の中心です。 「コホート」は、定義された期間にわたって特定の臨床基準を満たす患者の集合です。

コホートを作成する前に、コンセプト セット (再利用可能なコンセプトのセット) を構築する必要があります。


1. コンセプト セット — 詳細

1.1 コンセプト セットの作成

ATLAS → Concept Sets → New Concept Set

Ví dụ: "Type 2 Diabetes Conditions"

Bước 1: Search "type 2 diabetes" trong ATLAS
Bước 2: Thêm concepts vào concept set:

┌──────────┬───────────────────────────────┬──────────┬─────────┐
│ Concept  │ Name                          │ Excluded │ Desc.   │
├──────────┼───────────────────────────────┼──────────┼─────────┤
│ 201826   │ Type 2 diabetes mellitus      │ ☐        │ ☑       │
│ 443238   │ Diabetic neuropathy           │ ☐        │ ☐       │
│ 4193704  │ Type 2 DM w/renal compl      │ ☐        │ ☐       │
│ 201254   │ Type 1 diabetes mellitus      │ ☑        │ ☐       │
└──────────┴───────────────────────────────┴──────────┴─────────┘

Columns giải thích:
- Excluded: ☑ = LOẠI BỎ concept này (exclude Type 1 DM)
- Descendants (Desc.): ☑ = bao gồm tất cả descendants trong hierarchy
- Mapped: ☑ = bao gồm cả non-standard mapped concepts

1.2 子孫を含める — 重要

Concept 201826: Type 2 diabetes mellitus (SNOMED)
├── Descendants (khi ☑ Include Descendants):
│   ├── 443238  Diabetic neuropathy
│   ├── 4193704 Type 2 DM with renal complications
│   ├── 4063043 Type 2 DM with ophthalmic complications
│   ├── 443729  Diabetic retinopathy
│   ├── 4128709 Diabetic foot
│   └── ... (hàng trăm descendants)

Best Practice:
- ☑ Include Descendants cho ancestor concepts (Type 2 DM)
  → Tự động bao gồm DM with complications
- ☐ Exclude Descendants cho concepts cần loại bỏ cụ thể

1.3 解決された概念セット

ATLAS tab "Included Concepts" → xem danh sách đầy đủ concepts

"Type 2 Diabetes Conditions":
  201826 + descendants = 287 concepts included
  MINUS 201254 (Type 1 DM) = excluded
  = Final: ~285 concepts

→ Đây là tập concepts sẽ dùng trong Cohort Definitions

2. コホートの定義

2.1 コホート定義の構造

Cohort Definition gồm 4 phần:

1. INITIAL EVENTS (Sự kiện khởi đầu)
   → Sự kiện đưa bệnh nhân vào cohort
   → VD: Lần đầu được chẩn đoán Type 2 DM

2. INCLUSION CRITERIA (Tiêu chí bao gồm)
   → Điều kiện thêm phải thỏa mãn
   → VD: Có ≥ 365 ngày observation trước

3. COHORT EXIT (Rời khỏi cohort)
   → Khi nào bệnh nhân ra khỏi cohort
   → VD: Hết observation period, hoặc fixed duration

4. CENSORING EVENTS (Sự kiện kiểm duyệt)
   → Sự kiện kết thúc follow-up
   → VD: Tử vong, chuyển viện

2.2 例: 新規発症型 2 型 DM コホート

Mục tiêu: Tìm bệnh nhân Type 2 DM mới khởi phát

INITIAL EVENTS:
  Event: Condition Occurrence
  Concept Set: "Type 2 Diabetes Conditions"
  First occurrence only: ☑ (chỉ lần chẩn đoán đầu tiên)

  Timeline:
  ←── 365 days before ───┤ Index Date ├──── After ────→
                          │ (first DM  │
                          │ diagnosis) │

INCLUSION CRITERIA:
  Criterion 1: "Có observation trước"
    Having: Observation Period
    At least 365 days BEFORE index date
    → Đảm bảo bệnh nhân có đủ lịch sử

  Criterion 2: "Không có DM trước đó"
    NOT Having: Condition Occurrence
    Concept Set: "Type 2 Diabetes Conditions"
    In the 365 days BEFORE index date
    → Loại bỏ bệnh nhân đã có DM trước (new-onset only)

  Criterion 3: "Tuổi ≥ 18"
    Having: Demographics
    Age ≥ 18 at index date

COHORT EXIT:
  End of continuous observation period

CENSORING:
  Death event

2.3 ATLAS で作成する

ATLAS → Cohort Definitions → New Cohort

Tab "Definition":

┌─────────────────────────────────────────────────────────┐
│  Cohort Definition: New-Onset Type 2 DM                 │
│                                                         │
│  ┌── Cohort Entry Events ──────────────────────────┐   │
│  │                                                  │   │
│  │  Add Initial Event:                              │   │
│  │  [+ Add Condition Occurrence]                    │   │
│  │                                                  │   │
│  │  Any condition occurrence of:                    │   │
│  │  [Type 2 Diabetes Conditions ▼]  (Concept Set)  │   │
│  │                                                  │   │
│  │  ☑ First occurrence only                         │   │
│  │  □ Restrict initial events to...                 │   │
│  └──────────────────────────────────────────────────┘   │
│                                                         │
│  ┌── Inclusion Criteria ───────────────────────────┐   │
│  │                                                  │   │
│  │  ↓ Criterion 1: Has ≥ 365 days prior obs        │   │
│  │  ↓ Criterion 2: No prior DM in 365 days         │   │
│  │  ↓ Criterion 3: Age ≥ 18                        │   │
│  │                                                  │   │
│  │  [+ Add Criterion]                              │   │
│  └──────────────────────────────────────────────────┘   │
│                                                         │
│  ┌── Cohort Exit ─────────────────────────────────┐   │
│  │  ○ End of observation period                     │   │
│  │  ○ Fixed duration: ___ days after index          │   │
│  │  ○ Custom exit criteria                          │   │
│  └──────────────────────────────────────────────────┘   │
│                                                         │
│  [💾 Save]  [▶ Generate]  [📋 Export]  [SQL]          │
└─────────────────────────────────────────────────────────┘

3. 包含基準 - 詳細

3.1 基準の種類

Criteria có thể dựa trên:

Clinical Events:
  - Condition Occurrence (chẩn đoán)
  - Drug Exposure (thuốc)
  - Procedure Occurrence (thủ thuật)
  - Measurement (xét nghiệm) — kèm value filter
  - Observation (quan sát)
  - Visit Occurrence (lượt khám)
  - Device Exposure (thiết bị)

Demographics:
  - Age (at index date)
  - Gender
  - Race
  - Ethnicity

Temporal:
  - Observation Period (trước/sau index date)

3.2 時相論理

Relative to Index Date:

  ←── Before ───┤ Index ├──── After ────→

  Any time before index:    (-inf, 0]
  Within 365 days before:   [-365, 0]
  Within 30 days after:     [0, 30]
  Any time after index:     [0, +inf)
  Between 30 and 365 after: [30, 365]

Ví dụ: "Dùng Metformin trong 30 ngày sau chẩn đoán DM"
  Drug Exposure: Metformin
  Time window: [0, 30] days after index
  Count: At least 1 occurrence

3.3 人員削減レポート

Sau khi Generate cohort, ATLAS hiển thị Attrition:

Total patients:                     50,000  (100%)
  ↓ Has Type 2 DM diagnosis
  Has initial event:                 8,500   (17%)
  ↓ First occurrence only
  First occurrence:                  6,200   (12.4%)
  ↓ Criterion 1: ≥ 365 days prior obs
  After criterion 1:                 5,800   (11.6%)
  ↓ Criterion 2: No prior DM
  After criterion 2:                 4,500   (9.0%)
  ↓ Criterion 3: Age ≥ 18
  Final cohort:                      4,200   (8.4%)

→ Giúp hiểu mỗi criterion loại bao nhiêu bệnh nhân
→ Nếu criterion nào loại quá nhiều → xem lại logic

4. コホートの生成と実行

4.1 生成

ATLAS → Cohort Definition → [▶ Generate]
  → Chọn CDM Source: Hospital XYZ Vietnam
  → WebAPI tạo SQL → Execute trên CDM database
  → Kết quả ghi vào Results schema: COHORT table

COHORT table:
┌──────────────────┬───────────┬────────────────┬──────────────┐
│ cohort_definition│ subject_id│ cohort_start   │ cohort_end   │
│ _id              │           │ _date          │ _date        │
├──────────────────┼───────────┼────────────────┼──────────────┤
│ 1                │ 12345     │ 2020-03-15     │ 2024-06-30   │
│ 1                │ 23456     │ 2019-11-20     │ 2024-12-31   │
│ 1                │ 34567     │ 2021-07-08     │ 2023-04-15   │
└──────────────────┴───────────┴────────────────┴──────────────┘

4.2 生成された SQL を表示する

ATLAS → Cohort Definition → Tab "SQL"
→ Xem SQL được generate, có thể copy và chạy trực tiếp

Hữu ích cho:
- Debug logic cohort
- Chạy cohort trên database không có WebAPI
- Optimize SQL performance

5. コホート設計のベストプラクティス

1. Bắt đầu đơn giản, thêm complexity dần
   → Initial event + 1 criterion → verify → thêm criteria

2. Kiểm tra Attrition Report
   → Mỗi criterion nên loại < 50% (nếu loại quá nhiều → xem lại)

3. Dùng Concept Sets (không hardcode concept IDs)
   → Dễ maintain, tái sử dụng, chia sẻ

4. Include Descendants cho ancestor concepts
   → Tránh miss descendants mới khi vocabulary update

5. Washout period cho "new-onset" cohorts
   → Ít nhất 365 ngày trước index date không có event
   → Đảm bảo thực sự là "new onset"

6. Peer review cohort definitions
   → Clinician review clinical logic
   → Data engineer review technical logic

7. Test trên demo data trước
   → atlas-demo.ohdsi.org có synthetic data
   → Verify cohort logic hoạt động đúng

概要

コンセプト説明
コンセプトセット再利用可能な概念のコレクション (子孫を含む/除外する)
コホートの定義患者グループの定義 (最初のイベント + 基準 + 終了)
最初のイベント患者をコホートに加えるイベント (最初の発生)
包含基準追加のフィルタリング条件 (以前の経歴、年齢、以前のイベントなし...)
コホートの出口患者がコホートから脱落するのはいつですか
人員削減レポート各基準の後に除外された患者の数を報告します。
ウォッシュアウト期間インデックス日以前の「クリーンな」期間

次の記事: ATLAS — 特徴付け、発生率、経路