
簡介
OHDSI 的真正力量在於其多中心研究(網絡研究) — 來自多個國家的數十個資料庫同時回答同一研究問題,無需共享患者資料。
OHDSI Network Research Model:
┌─────────────┐
│ Study Lead │
│ (Protocol │
│ + R Pkg) │
└──────┬──────┘
│
Study Package (code only)
│
┌──────────────┼──────────────┐
▼ ▼ ▼
┌─────────────┐┌─────────────┐┌─────────────┐
│ Site A ││ Site B ││ Site C │
│ (US) ││ (Korea) ││ (Vietnam) │
│ ││ ││ │
│ CDM ──→ ││ CDM ──→ ││ CDM ──→ │
│ Run study ││ Run study ││ Run study │
│ ──→ Results││ ──→ Results││ ──→ Results│
└──────┬──────┘└──────┬──────┘└──────┬──────┘
│ │ │
└──── Aggregate results only ─┘
│
┌──────▼──────┐
│ Study Lead │
│ Meta- │
│ analysis │
└─────────────┘
→ Dữ liệu BN KHÔNG BAO GIỜ rời site
→ Chỉ chia sẻ code (study package) và aggregate results
1. 網路研究工作流程
1.1 實作步驟
Phase 1: Protocol Design
─────────────────────────
1. Đặt câu hỏi nghiên cứu (PICO)
P: Population (Target cohort)
I: Intervention/Exposure
C: Comparator
O: Outcome
2. Viết study protocol
- Background & rationale
- Study design (cohort, case-control, etc.)
- Cohort definitions (JSON)
- Analysis plan
- Statistical methods
3. Đăng ký protocol (EU PAS Register, preprint)
Phase 2: Study Package Development
────────────────────────────────────
4. Tạo study package trong ATLAS hoặc viết R code
5. Test trên Eunomia (synthetic data)
6. Peer review code & cohort definitions
7. Chạy CohortDiagnostics trên ≥1 site
Phase 3: Execution
──────────────────
8. Gửi study package đến participating sites
9. Mỗi site: install, configure, execute
10. Sites gửi aggregate results về study lead
Phase 4: Analysis & Publication
────────────────────────────────
11. Meta-analysis kết quả từ nhiều sites
12. Viết manuscript / technical report
13. Publish & share trên OHDSI forums
1.2 網路研究範例
LEGEND Study (Large-scale Evidence Generation
and Evaluation in a Network of Databases)
Câu hỏi: So sánh hiệu quả & an toàn của thuốc hạ áp
(ACEi vs ARB vs thiazide vs CCB)
Sites tham gia: 12 databases, 6 triệu BN
- CPRD (UK)
- Optum (US)
- MDCD (US Medicaid)
- CCAE (US Commercial)
- JMDC (Japan)
- AUSOM (South Korea)
- ...
Kết quả:
- 3,000+ hazard ratios cho các cặp thuốc-outcome
- Xác nhận CCB/thiazide first-line cho HTN chưa biến chứng
- ACEi/ARB preferred nếu có DM hoặc CKD
- Phát hiện signals an toàn mới
Published: The Lancet, 2019
2. 研究包結構
2.1 標準學習包
my-network-study/
├── DESCRIPTION # R package metadata
├── NAMESPACE # Exports
├── R/
│ ├── Main.R # Entry point
│ ├── CohortConstruction.R # Build cohorts
│ ├── RunDiagnostics.R # CohortDiagnostics
│ ├── RunEstimation.R # CohortMethod analysis
│ ├── RunPrediction.R # PLP analysis (if applicable)
│ └── Export.R # Package results for sharing
├── inst/
│ ├── settings/
│ │ ├── cohortDefinitionSet.csv
│ │ ├── negativeControlOutcomes.csv
│ │ └── analysisSpecifications.json
│ ├── cohorts/
│ │ ├── targetCohort.json
│ │ ├── comparatorCohort.json
│ │ └── outcomeCohort.json
│ └── sql/
│ └── CreateCohorts.sql
├── extras/
│ ├── CodeToRun.R # Site-specific execution script
│ └── PackageMaintenance.R # Developer utilities
├── tests/
│ └── testthat/
│ └── test-cohorts.R
└── README.md # Hướng dẫn cho sites
2.2 每個站點的 CodeToRun.R
# extras/CodeToRun.R
# ═══════════════════════════════════════════
# Mỗi site EDIT file này cho phù hợp local
# ═══════════════════════════════════════════
library(MyNetworkStudy)
# ── 1. Connection Details ──
connectionDetails <- DatabaseConnector::createConnectionDetails(
dbms = "postgresql", # Sửa theo site
server = "localhost/ohdsi", # Sửa theo site
user = "ohdsi_app", # Sửa theo site
password = keyring::key_get("ohdsi"),
port = 5432
)
# ── 2. Schema Config ──
cdmDatabaseSchema <- "cdm"
cohortDatabaseSchema <- "results"
cohortTable <- "network_study_cohort"
databaseId <- "Hospital_VN_2024" # Tên site (unique)
databaseName <- "Hospital Vietnam 2024"
databaseDescription <- "Hospital system EHR data 2015-2024"
# ── 3. Output ──
outputFolder <- file.path(getwd(), "output", databaseId)
dir.create(outputFolder, recursive = TRUE)
# ── 4. Execute ──
execute(
connectionDetails = connectionDetails,
cdmDatabaseSchema = cdmDatabaseSchema,
cohortDatabaseSchema = cohortDatabaseSchema,
cohortTable = cohortTable,
outputFolder = outputFolder,
databaseId = databaseId,
databaseName = databaseName,
databaseDescription = databaseDescription,
createCohorts = TRUE,
runDiagnostics = TRUE,
runAnalyses = TRUE,
minCellCount = 5, # Privacy: ẩn cells < 5
maxCores = 4
)
# ── 5. Export Results ──
# Gửi thư mục output/ đến study lead
# KHÔNG gửi patient-level data!
3. 資料治理與隱私
3.1 隱私原則
┌──────────────────────────────────────────────────────┐
│ OHDSI Data Governance Principles │
│ │
│ 1. DATA STAYS LOCAL │
│ Dữ liệu BN không rời site │
│ Chỉ share code + aggregate results │
│ │
│ 2. MINIMUM CELL COUNT │
│ Ẩn counts < 5 (configurable) │
│ Tránh re-identification │
│ │
│ 3. NO PATIENT-LEVEL EXPORT │
│ Results chỉ có aggregate statistics │
│ Hazard ratios, counts, proportions │
│ │
│ 4. IRB/ETHICS APPROVAL │
│ Mỗi site cần approval riêng │
│ Study protocol phải được review │
│ │
│ 5. DATA USE AGREEMENT │
│ Giữa study lead và mỗi site │
│ Quy định rõ mục đích sử dụng │
└──────────────────────────────────────────────────────┘
3.2 最小細胞數
# Trong study package:
minCellCount <- 5
# Khi export results:
exportResults <- function(outputFolder, minCellCount = 5) {
results <- readRDS(file.path(outputFolder, "results.rds"))
# Censor cells nhỏ
results$cohortCount[results$cohortCount > 0 &
results$cohortCount < minCellCount] <- paste0("<", minCellCount)
# Remove individual-level data
results$patientLevelData <- NULL
saveRDS(results, file.path(outputFolder, "results_censored.rds"))
}
3.3 審批流程
Site muốn tham gia network study:
1. Nhận study protocol từ study lead
2. Nộp IRB/Ethics review tại site
3. Ký Data Use Agreement (DUA)
4. Cài study package
5. Chạy CohortDiagnostics → review
6. Chạy full analysis
7. Review results trước khi gửi
8. Gửi aggregate results (censored)
4.薈萃分析
4.1 多站點結果總結
library(EvidenceSynthesis)
# Collect results từ các sites
siteResults <- list()
sites <- c("Site_US", "Site_KR", "Site_VN", "Site_JP")
for (site in sites) {
siteResults[[site]] <- readRDS(
file.path("results", site, "estimationResults.rds")
)
}
# Fixed-effects meta-analysis
metaResult <- computeFixedEffectMetaAnalysis(
logRr = sapply(siteResults, function(x) x$logRr),
logLb95Ci = sapply(siteResults, function(x) x$logLb95Ci),
logUb95Ci = sapply(siteResults, function(x) x$logUb95Ci),
seLogRr = sapply(siteResults, function(x) x$seLogRr)
)
# Kết quả
cat("Meta-analysis HR:", exp(metaResult$logRr), "\n")
cat("95% CI:", exp(metaResult$logLb95Ci), "-",
exp(metaResult$logUb95Ci), "\n")
cat("P-value:", metaResult$p, "\n")
4.2 森林圖
Forest Plot: Metformin vs SU → MI Risk
Study HR [95% CI] Weight
────────────────────────────────────────────────
Site US (N=12,000) 0.58 [0.35-0.96] ──●── 35%
Site KR (N=5,200) 0.71 [0.38-1.33] ──●── 20%
Site VN (N=3,800) 0.55 [0.28-1.08] ──●── 18%
Site JP (N=6,500) 0.65 [0.40-1.06] ──●── 27%
────────────────────────────────────────────────
Meta (Fixed) 0.62 [0.47-0.82] ◆ 100%
│
0.25 0.5 1.0 2.0
← Favors Met Favors SU →
I² = 0% → Không có heterogeneity đáng kể
Q-test p = 0.85 → Kết quả nhất quán giữa sites
5.OHDSI 社區
5.1 加入社區
Kênh tham gia:
1. OHDSI Forums (forums.ohdsi.org)
- Hỏi đáp kỹ thuật
- Thảo luận study design
- Announcements
2. OHDSI Workgroups
- Vocabulary WG
- CDM WG
- Patient-Level Prediction WG
- Population-Level Estimation WG
- Data Quality WG
3. OHDSI Symposium (hàng năm)
- Presentations, workshops, tutorials
- Networking
4. OHDSI Studies
- Tham gia network studies đang mở
- Đề xuất study mới
5. GitHub (github.com/OHDSI)
- Contribute code
- Report issues
- Feature requests
5.2 學習資源
1. The Book of OHDSI (ohdsi.github.io/TheBookOfOhdsi/)
→ Sách tham khảo chính thức (free, open-source)
2. EHDEN Academy (academy.ehden.eu)
→ Khóa học online CDM, ETL, Vocabularies
3. OHDSI Tutorials
→ Video workshops trên YouTube
4. Forums Q&A
→ Cộng đồng trả lời câu hỏi kỹ thuật
6. 在越南實施 OHDSI 的最佳實踐
6.1 挑戰
Thách thức đặc thù Việt Nam:
1. Dữ liệu EMR/HIS
- Nhiều hệ thống HIS khác nhau (VietIS, Sáng, FPT.eHospital...)
- Format dữ liệu không chuẩn hóa
- Mã ICD-10 hay bị sử dụng sai
2. Vocabulary mapping
- Tên thuốc tiếng Việt → RxNorm mapping
- Mã BHYT → OMOP concept mapping
- Local lab codes → LOINC mapping
3. Nhân lực
- Ít chuyên gia OHDSI/OMOP
- Cần đào tạo ETL engineers
- Cần clinical informaticists
4. Pháp lý
- Quy định về chia sẻ dữ liệu y tế
- HIPAA không áp dụng → dùng Luật ATTT VN
- IRB/Ethics board processing time
6.2 實作路線圖
Phase 1: Pilot (3-6 tháng)
──────────────────────────
☐ Chọn 1 bệnh viện pilot
☐ Cài OHDSI stack (Docker Compose)
☐ ETL 1-2 năm dữ liệu
☐ Chạy ACHILLES + DQD
☐ Đào tạo team (2-3 người)
Phase 2: Validate (3-6 tháng)
─────────────────────────────
☐ Cải thiện ETL dựa trên DQD
☐ Mapping vocabularies (Usagi)
☐ Tạo cohort definitions đầu tiên
☐ Chạy 1 replication study
☐ Kiểm tra kết quả với clinical experts
Phase 3: Expand (6-12 tháng)
────────────────────────────
☐ Thêm 2-3 bệnh viện
☐ Chuẩn hóa ETL pipeline
☐ Tham gia 1 OHDSI network study
☐ Kubernetes production deployment
☐ Monitoring & alerting
Phase 4: Network (ongoing)
──────────────────────────
☐ OHDSI Vietnam node chính thức
☐ Propose original studies
☐ Contribute Vietnamese vocabulary mappings
☐ Training & community building
☐ Publish research papers
6.3 越南資料的 ETL
Nguồn dữ liệu phổ biến:
HIS Database → Staging → OMOP CDM
│ │
├─ benh_nhan → person
├─ kham_benh → visit_occurrence
├─ chan_doan (ICD-10) → condition_occurrence
├─ don_thuoc → drug_exposure
├─ xet_nghiem → measurement
├─ thu_thuat → procedure_occurrence
└─ vien_phi (BHYT) → cost
Mapping challenges:
┌────────────────────────────┬────────────────────────────┐
│ Vietnamese Source │ OMOP Standard │
├────────────────────────────┼────────────────────────────┤
│ Giới tính: Nam/Nữ │ 8507 (Male) / 8532 (Female)│
│ ICD-10: E11.9 │ 201826 (Type 2 DM) │
│ Thuốc: "Metformin 500mg" │ RxNorm: 860975 │
│ XN: "HbA1c" │ LOINC: 4548-4 │
│ BHYT: mã DV "XN001" │ Custom mapping required │
└────────────────────────────┴────────────────────────────┘
課程總結
Bạn đã hoàn thành 17 bài học OHDSI & OMOP CDM:
Phần 1: Tổng quan (Bài 1-3)
✓ OHDSI ecosystem, OMOP CDM, Athena vocabularies
Phần 2: ETL (Bài 4-6)
✓ WhiteRabbit, Usagi, ETL pipeline
Phần 3: Platform (Bài 7-9)
✓ PostgreSQL CDM, WebAPI, ATLAS
Phần 4: Analysis (Bài 10-12)
✓ Concept Sets, Cohorts, Characterization,
Incidence Rates, Pathways, Estimation, Prediction
Phần 5: Data Quality (Bài 13-15)
✓ ACHILLES, DQD, HADES R packages
Phần 6: Production (Bài 16-17)
✓ Docker/K8s deployment, Network Studies
Bước tiếp theo:
1. Cài đặt OHDSI stack local (Docker Compose)
2. Tải Eunomia synthetic data → thực hành
3. ETL dữ liệu thực từ HIS
4. Tham gia OHDSI community
5. Propose & contribute studies