
簡介
群組定義是 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 — 特徵、發病率和途徑