linking-umls-concepts
하는 일
이 스킬은 여러 의학 용어집의 동의어를 통합하는 UMLS 개념 식별자에 의학 용어를 연결합니다. UMLS 콘텐츠에는 라이선스 제한이 있으므로 사용자 자신의 UMLS 용어 서비스 키를 사용합니다. 여러 용어집에서 하나의 개념 ID가 필요한 팀을 위한 스킬입니다.
사용하는 경우
- ✓SNOMED, ICD-10, RxNorm 등 여러 용어집에서 공유 개념 ID가 하나 필요할 때.
- ✓MI와 심근경색처럼 동의어가 같은 개념에 대응해야 할 때.
- ✓질환이나 약물처럼 의미 유형으로 개념을 걸러 내고 싶을 때.
스킬 링크
https://github.com/maziyarpanahi/openmed/blob/master/skills/linking-umls-concepts/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 UTS 키로 이 노트의 용어를 UMLS 개념 ID에 연결하고, 동의어를 묶어 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 각 용어를 사용자의 키로 NLM 용어 서비스에 보내고, 서비스가 돌려준 개념 식별자와 이름만 보관합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Linking OpenMed entities to UMLS CUIs
Resolve concept spans that OpenMed extracts to UMLS Metathesaurus concepts.
The atom is the CUI (Concept Unique Identifier, e.g. C0011860): one CUI
unifies synonyms from many source vocabularies (SNOMED CT, ICD-10-CM, RxNorm,
MeSH, LOINC), making the CUI the natural hub for cross-vocabulary normalization.
Every concept also carries one or more semantic types (TUIs, e.g. Disease or
Syndrome T047) for type-based filtering.
Hard licensing boundary — read first. The UMLS Metathesaurus is license-restricted. OpenMed and this skill never bundle, ship, or cache Metathesaurus content. Concept linking runs out-of-process against the NLM UTS (UMLS Terminology Services) REST API using the user's own UTS API key. A free UTS account + API key is required (request at uts.nlm.nih.gov and accept the UMLS license). The Metathesaurus stays user-supplied: your code holds only the key (from the environment) and stores only returned CUIs/strings.
When to use
- You need one canonical id across vocabularies — e.g. to unify a SNOMED CT disorder, an ICD-10 code, and a free-text mention onto a single CUI.
- You want synonym normalization ("MI", "myocardial infarction", "heart
attack" →
C0027051). - You need semantic-type filtering to keep only, say, Pharmacologic Substance or Disease or Syndrome entities.
- You are cross-walking codes and need the CUI as the join key before pivoting to
RxNorm (
normalizing-rxnorm) or SNOMED (mapping-to-snomed).
Quick start (user-supplied UTS API key)
The UTS REST API base is https://uts-ws.nlm.nih.gov/rest. Authentication uses
your API key as the apiKey query parameter (the modern, simplest method).
import os, requests
UTS = "https://uts-ws.nlm.nih.gov/rest"
API_KEY = os.environ["UTS_API_KEY"] # USER's own key — never hardcoded
VERSION = "current" # or a fixed release like 2024AB
def search(term: str, sabs: str | None = None, count: int = 10) -> list[dict]:
"""Search the Metathesaurus for a term; optionally restrict source vocabs."""
params = {"string": term, "apiKey": API_KEY, "pageSize": count}
if sabs: # e.g. "SNOMEDCT_US,RXNORM,ICD10CM"
params["sabs"] = sabs
r = requests.get(f"{UTS}/search/{VERSION}", params=params, timeout=15)
r.raise_for_status()
return r.json().get("result", {}).get("results", [])
def concept(cui: str) -> dict:
"""Pull a concept's preferred name and semantic types."""
r = requests.get(f"{UTS}/content/{VERSION}/CUI/{cui}",
params={"apiKey": API_KEY}, timeout=15)
r.raise_for_status()
return r.json().get("result", {})
def crosswalk(cui: str, target_sab: str) -> list[dict]:
"""Atoms of a CUI in a target vocabulary (the cross-walk)."""
r = requests.get(f"{UTS}/content/{VERSION}/CUI/{cui}/atoms",
params={"apiKey": API_KEY, "sabs": target_sab,
"pageSize": 50}, timeout=20)
r.raise_for_status()
return r.json().get("result", [])
hits = search("type 2 diabetes") # -> [{ui: 'C0011860', name: ...}, ...]
sct = crosswalk("C0011860", "SNOMEDCT_US") # CUI -> SNOMED CT codes
Workflow
- Extract spans with OpenMed (Disease, Pharmaceutical, Chemical, Anatomy).
- Search each span via
/search/{version}for candidate CUIs. - Filter by semantic type (TUI) so a drug span resolves to a substance
concept, not a same-named disease. Pull semantic types from
/content/.../CUI/{cui}and keep only the expected group. - Rank candidates (exact preferred-name match > synonym match) and combine
with OpenMed's
confidenceto choose one CUI. - Cross-walk the chosen CUI to whatever target you actually store —
SNOMEDCT_US, ICD10CM, RXNORM, MSH — via
/CUI/{cui}/atoms?sabs=. - Emit the CUI plus the target code(s) and OpenMed source offsets.
Hand-off from OpenMed
openmed.analyze_text(..., output_format="dict") returns entities, each a dict
with text, label, confidence, start, end. Use the label to pick the
semantic-type group you keep:
import openmed
note = "History of myocardial infarction; started on lisinopril."
result = openmed.analyze_text(
note,
model_name="disease_detection_superclinical", # Disease category
output_format="dict",
)
# OpenMed label -> acceptab
자주 묻는 질문
스킬에 UMLS 콘텐츠가 포함되나요?
아니요. UMLS 콘텐츠를 함께 배포하거나 저장하지 않으며, 각 사용자는 자신의 무료 계정과 키가 필요합니다.
키는 어디에서 가져오나요?
환경 설정에서 가져오므로 코드가 키를 저장하지 않습니다.
개념 유형으로 걸러 낼 수 있나요?
네. 의미 유형으로 개념을 걸러 낼 수 있습니다.
상세 정보
작성자의 원본 설명
Links entities extracted by OpenMed to UMLS Metathesaurus CUIs using the USER'S OWN UTS API key, with nothing from the Metathesaurus bundled or cached. Use when the user wants to normalize concepts across vocabularies to a single CUI, resolve synonyms via the UMLS, filter by semantic type, or cross-walk between SNOMED CT, ICD-10, RxNorm and MeSH through their shared CUI. Trigger keywords: UMLS, CUI, Metathesaurus, UTS API key, semantic type, TUI, MetaMap, QuickUMLS, concept normalization, cross-vocabulary. Pairs after OpenMed NER: consume Disease/Pharmaceutical/Chemical/Anatomy entities from o
repo: maziyarpanahi/openmed
인기도
- GitHub 스타
- 5.8k
- 순위
- #14709
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
annotating-variants
5.8k에이전트가 유전 변이의 효과를 예측하고, HGVS 이름을 게놈 위치로 바꾸고, 무료 공개 주석 도구를 사용해 인구 빈도를 붙이도록 돕습니다.
ask-openmed
5.8k에이전트가 임상 텍스트 요청에 맞는 OpenMed 워크플로를 고르도록 돕되, 환자 데이터가 있을 수 있으면 먼저 개인 정보 확인을 거치게 합니다.
assembling-fhir-bundles
5.8k여러 FHIR 건강 기록을 EHR로 보낼 수 있도록 하나의 트랜잭션 Bundle로 묶고, 내부 참조를 올바르게 연결하도록 에이전트를 돕습니다.
auditing-deid-leakage
5.8k비식별화된 임상 텍스트에 남은 SSN, 카드 번호, 이메일, 날짜 같은 식별자를 검사하고, 남은 것이 있으면 공개를 막도록 돕습니다.
비슷한 스킬
discrawl
394k에이전트가 저장된 로컬 Discord 메시지 보관본을 검색하고 요약하며, 최신 상태를 확인하고 다이렉트 메시지를 읽도록 돕습니다.
clickhouse-io
280k에이전트가 ClickHouse 데이터베이스의 쿼리와 스키마를 최적화하도록 돕습니다. 고성능 분석 작업의 모범 사례를 적용합니다. 분석 쿼리가 느릴 때 씁니다.
scientific-db-pubmed-database
280k생의학 분야의 과학 논문을 에이전트가 검색하도록 돕습니다. 특정 의학 정보가 필요한 연구에 유용합니다.