etl-to-omop-cdm
Fungsinya
Skill ini memetakan temuan berkode dari catatan klinis, seperti kondisi, obat, dan hasil laboratorium, ke tabel OMOP CDM untuk analitik OHDSI. Skill ini untuk tim data yang membangun basis data penelitian dari teks klinis.
Kapan dipakai
- βSaat Anda ingin memuat kondisi, obat, atau pengukuran yang diturunkan dari catatan ke basis data OMOP.
- βSaat temuan dari catatan harus distandarkan ke konsep OMOP untuk analisis ATLAS.
- βSaat Anda membutuhkan catatan peristiwa klinis OMOP yang dibangun dari kode sumber yang sudah dipetakan.
Link skill
https://github.com/maziyarpanahi/openmed/blob/master/skills/etl-to-omop-cdm/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βMuat diagnosis dan obat yang sudah saya ekstrak dari catatan ini ke tabel kondisi dan paparan obat OMOP.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent mengambil entitas yang sudah dikodekan ke kosakata sumber, memetakannya ke konsep standar OMOP, lalu menulisnya sebagai catatan di tabel klinis yang sesuai.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
ETL to OMOP CDM
The OMOP Common Data Model (CDM) is the OHDSI standard for observational health
data. This skill maps OpenMed-derived clinical facts β entities from
analyze_text that you have already linked to a source terminology β into the
OMOP clinical event tables condition_occurrence, drug_exposure, and
measurement. The NLP runs on-device; OMOP loading is a downstream,
deterministic transform.
When to use this skill
After you have (a) extracted entities with OpenMed and (b) coded them to a source vocabulary (ICD-10-CM / SNOMED for conditions, RxNorm for drugs, LOINC for labs β see the linking skills). Use this skill to turn those coded facts into OMOP rows. It is not a clinical NER skill and not a code-linking skill; it assumes both are done.
Quick start
import openmed
note = "Assessment: type 2 diabetes mellitus. Started metformin 500 mg PO BID. HbA1c 8.2%."
result = openmed.analyze_text(note, output_format="dict")
# result["entities"] -> [{text,label,confidence,start,end}, ...]
# You then code each entity to a SOURCE concept using the OHDSI vocabulary you
# downloaded (see linking-umls-concepts / normalizing-rxnorm / mapping-loinc),
# and map SOURCE -> STANDARD via CONCEPT_RELATIONSHIP ('Maps to').
fact = {
"person_id": 1001,
"domain": "Condition",
"source_code": "E11.9", # ICD-10-CM, from your coding step
"source_vocabulary": "ICD10CM",
"source_concept_id": 45533010, # OHDSI CONCEPT for E11.9 (lookup)
"standard_concept_id": 201826, # 'Maps to' -> SNOMED 'Type 2 diabetes mellitus'
"start_date": "2024-03-12", # from building-patient-timelines
"char_span": (fact_start, fact_end),
}
OpenMed never ships UMLS/SNOMED/RxNorm/LOINC content. You supply the OHDSI vocabulary bundle (Athena download) and do the lookups under your own license. OpenMed provides the spans and labels.
The source β standard pattern (the heart of OMOP)
Every clinical event row carries two concept ids:
*_source_concept_idβ the OHDSI CONCEPT for your original code (e.g. the ICD-10-CM or RxNorm code your linking step produced).*_concept_idβ the standard concept, obtained by followingCONCEPT_RELATIONSHIP.relationship_id = 'Maps to'from the source concept. Conditions standardize to SNOMED, drugs to RxNorm, measurements to LOINC. If no mapping exists, set the standard id to0.
Domain β table β fields
See references/omop_cdm_v5_4_fields.md for the full per-table field list. Core
mapping by OpenMed entity domain:
| OpenMed entity domain | OMOP table | Standard vocab | Key date / value fields |
|---|---|---|---|
| Disease / Condition | condition_occurrence |
SNOMED | condition_start_date, optional condition_end_date |
| Drug / Medication | drug_exposure |
RxNorm | drug_exposure_start_date, drug_exposure_end_date, quantity, sig |
| Lab / Measurement | measurement |
LOINC | measurement_date, value_as_number, unit_concept_id, value_as_concept_id |
Type concepts: mark rows as NLP-derived
Every event row needs a *_type_concept_id recording provenance. For facts
derived from clinical text, OHDSI uses the type concept 32831 "EHR episode
record" / "Note" family β specifically prefer a "...from note" /
"NLP"-flavored standard type concept from the Type Concept vocabulary in
your bundle. Do not invent ids; resolve the type concept against the vocabulary
you loaded so cohort builders can filter NLP-derived rows.
Workflow
- Extract & code.
analyze_textβ entities; link each to a source code (linking skills). Resolvesource_concept_idand the'Maps to'standard concept from your Athena vocabulary. - Resolve dates. Attach start (and end, where known) dates per
building-patient-timelines. OMOP date fields areDATE; keep the matching*_datetimeonly if you truly have a time. - Assign
person_id. Join to yourpersontable by an internal key β not by any PHI string. De-identify upstream. - Build rows with required keys, the source+standard concept pair, the
NLP type concept, and a unique surrogate
*_occurrence_id/*_exposure_id/measurement_id. - Stage
*_source_value(the raw surface string, after de-id) for QA traceability β but never put raw PHI there. - Conform & validate. Run OHDSI Achilles/DataQualityDashboard on the loaded CDM before analytics.
Pertanyaan umum
Apakah skill ini mengekstrak entitasnya?
Tidak. Ekstraksi dan pengodean dilakukan pada langkah sebelumnya, dan skill ini mencakup pemetaan OMOP setelahnya.
Versi OMOP apa yang didukung?
Skill ditujukan untuk OMOP CDM versi 5.4.
Tabel apa saja yang ditulis?
Skill mencakup tabel condition occurrence, drug exposure, dan measurement.
Detail
Deskripsi asli dari pembuat
Map OpenMed-extracted, terminology-coded conditions, drugs, and measurements into OMOP CDM v5.4 clinical tables (condition_occurrence, drug_exposure, measurement) for OHDSI/ATLAS analytics. Use when the user wants to load NLP-derived facts into an OMOP database, build an OHDSI ETL from clinical notes, populate condition_occurrence or drug_exposure from text, or standardize note-derived findings to OMOP standard concepts. Covers the source-to-standard concept mapping pattern, required vs optional CDM fields, type concepts for NLP-derived rows, and the user-supplied OHDSI vocabulary (CONCEPT/CON
repo: maziyarpanahi/openmed
Popularitas
- Bintang GitHub
- 5.8k
- Peringkat
- #14694
- Lisensi
- Apache-2.0
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
annotating-variants
5.8kMembantu agent Anda memperkirakan apa yang dilakukan varian genetik, mengubah nama HGVS menjadi posisi genom, dan menambahkan frekuensi populasi, dengan memakai anotator publik yang gratis.
ask-openmed
5.8kMembantu agent Anda memilih alur kerja OpenMed yang tepat untuk permintaan teks klinis, dimulai dengan pemeriksaan privasi setiap kali data pasien mungkin ada.
assembling-fhir-bundles
5.8kMengemas beberapa rekam kesehatan FHIR menjadi satu Bundle transaksi yang siap dikirim ke EHR, dengan referensi internal yang terhubung dengan benar.
auditing-deid-leakage
5.8kMemindai teks klinis yang sudah dihapus identitasnya untuk mencari pengenal yang tertinggal, seperti nomor SSN, nomor kartu, email, dan tanggal, dan memblokir rilis jika masih ada.
Skill serupa
discrawl
394kMemungkinkan agent Anda mencari dan merangkum arsip pesan Discord lokal yang tersimpan, memeriksa seberapa baru arsipnya, dan membaca pesan langsung.
clickhouse-io
280kMembantu agent Anda mengoptimalkan query dan skema di database ClickHouse dengan praktik terbaik analitik berperforma tinggi. Gunakan saat query analitik terlalu lambat.
scientific-db-pubmed-database
280kMembantu agent Anda mencari artikel ilmiah di bidang biomedis. Berguna untuk riset yang membutuhkan informasi medis spesifik.