normalizing-rxnorm
하는 일
이 스킬은 약품 이름을 표준 미국 약물 식별자인 RxNorm 코드에 맞추고, 상품명, 일반명, 함량을 연결합니다. 무료 공개 RxNav 서비스를 사용하므로 라이선스나 키가 필요하지 않습니다. 기록과 데이터 교환을 위해 약을 코드화하는 팀을 위한 스킬입니다.
사용하는 경우
- ✓노트에 약품 이름이 있고 약마다 안정적인 코드 하나가 필요할 때.
- ✓성분과 함량, 제형이 있는 처방 가능한 제품을 구분해야 할 때.
- ✓상품명과 일반명을 하나의 개념으로 묶거나 NDC 코드가 필요할 때.
스킬 링크
https://github.com/maziyarpanahi/openmed/blob/master/skills/normalizing-rxnorm/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“노트의 이 약품 이름들을 함량과 제형까지 포함해 RxNorm 코드에 맞추고, 일반 동등 약품도 나열해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 각 약품 이름을 공개 RxNav 서비스로 보내고, 성분 또는 제품에 맞는 RxCUI를 고른 뒤, 이름과 함께 코드를 돌려줍니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Normalizing drug mentions to RxNorm
Map free-text medication mentions that OpenMed extracts to RxNorm — the U.S. National Library of Medicine's normalized drug nomenclature. The unit of meaning is the RxCUI (RxNorm Concept Unique Identifier): a stable integer that ties together brand, generic, ingredient, strength, and dose form.
RxNorm and the RxNav REST API are fully public and free: no API key, no license agreement, no rate-limit registration for normal use. Of every skill in this terminology batch, this one has the highest value-to-friction ratio — start here when grounding medications.
When to use
- A clinical note names drugs ("metformin 500 mg", "Lipitor", "amox/clav") and you need one stable code per drug for storage, analytics, or interoperability.
- You must distinguish ingredient ("metformin",
IN) from a prescribable product — SCD (Semantic Clinical Drug, generic) or SBD (Semantic Brand Drug) — e.g. "metformin 500 MG Oral Tablet". - You need to de-duplicate brand/generic synonyms onto one concept.
- You need NDC codes (package-level) for a product, or a US Core
Medication/MedicationRequestcoded with RxNorm.
If the source text is non-English or you need ATC/SNOMED links instead, see
mapping-to-snomed; RxNorm itself is U.S.-centric.
Quick start (real RxNav API calls)
Base URL: https://rxnav.nlm.nih.gov/REST. No auth. JSON via ?...&... paths
ending in nothing or .json depending on endpoint; the REST root returns XML by
default, so request JSON explicitly.
import requests
BASE = "https://rxnav.nlm.nih.gov/REST"
def rxcui_for(name: str) -> str | None:
"""Exact-match RxCUI lookup for a normalized drug name."""
r = requests.get(f"{BASE}/rxcui.json", params={"name": name}, timeout=10)
r.raise_for_status()
ids = r.json().get("idGroup", {}).get("rxnormId", [])
return ids[0] if ids else None
def approximate(name: str, max_entries: int = 3) -> list[dict]:
"""Fuzzy match for misspelled or abbreviated drug text."""
r = requests.get(
f"{BASE}/approximateTerm.json",
params={"term": name, "maxEntries": max_entries},
timeout=10,
)
r.raise_for_status()
return r.json().get("approximateGroup", {}).get("candidate", [])
print(rxcui_for("metformin")) # -> '6809' (ingredient)
print(approximate("metformin 500")) # fuzzy -> candidate RxCUIs
Resolve a full prescribable product (ingredient + strength + form) to an SCD:
# getApproximateMatch / getRxConceptProperties give term type (TTY)
def properties(rxcui: str) -> dict:
r = requests.get(f"{BASE}/rxcui/{rxcui}/properties.json", timeout=10)
r.raise_for_status()
return r.json().get("properties", {})
# Find the SCD ("metformin 500 MG Oral Tablet") from the ingredient:
def related_by_tty(rxcui: str, tty: str) -> list[dict]:
r = requests.get(
f"{BASE}/rxcui/{rxcui}/related.json", params={"tty": tty}, timeout=10
)
r.raise_for_status()
groups = r.json().get("relatedGroup", {}).get("conceptGroup", [])
out = []
for g in groups:
out.extend(g.get("conceptProperties", []) or [])
return out
Attach NDCs and check interactions (both public):
ndcs = requests.get(f"{BASE}/rxcui/{rxcui}/ndcs.json").json() # package codes
Workflow
- Extract drug spans with OpenMed (
pharma_detection_superclinical). - Parse each span into name + strength + dose form when present
("metformin 500 mg tablet" → ingredient
metformin, strength500 MG, formOral Tablet). - Exact match the cleaned name with
/rxcui.json?name=. If empty, fall back to/approximateTerm.json. - Pick the right term type (TTY) for your use case:
INingredient — analytics, allergy lists, class rollups.SCDgeneric product /SBDbrand product — orders, US Core Medication.BNbrand name,PINprecise ingredient — display/lineage.
- Validate by reading
/rxcui/{rxcui}/properties.jsonand confirming thettyandnamematch expectations; record thescorefrom approximate matches as a confidence signal. - Emit
{system: "http://www.nlm.nih.gov/research/umls/rxnorm", code, display}.
Hand-off from OpenMed
OpenMed's analyze_text returns a dict whose entities list contains, per
span, the keys text, label, confidence, start, end. Consume the
Pharmaceutical/Chemical entities di
자주 묻는 질문
라이선스나 API 키가 필요한가요?
아니요. RxNav 서비스는 공개되어 있고 일반적인 사용에 무료입니다.
미국 밖에서도 유용한가요?
RxNorm은 미국 중심이므로, 다른 나라에서는 다른 약물 코딩 체계가 필요할 수 있습니다.
패키지 코드도 제공하나요?
네. 특정 제품에 대해 NDC 코드를 붙일 수 있습니다.
상세 정보
작성자의 원본 설명
Normalizes drug mentions extracted by OpenMed to RxNorm RxCUIs using the free public RxNav/RxNorm REST API. Use when the user wants to code, standardize, or de-duplicate medication names, resolve a brand/generic/ingredient to a stable RxCUI, link strength+dose-form to an SCD/SBD, attach NDCs, or build a US Core Medication resource. Trigger keywords: RxNorm, RxCUI, RxNav, drug normalization, medication coding, NDC, ingredient, SCD, SBD, brand vs generic, getApproximateMatch. Pairs after OpenMed NER: consume Pharmaceutical/Chemical entities from openmed.analyze_text and map each drug span to an
repo: maziyarpanahi/openmed
인기도
- GitHub 스타
- 5.8k
- 순위
- #14714
- 라이선스
- 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생의학 분야의 과학 논문을 에이전트가 검색하도록 돕습니다. 특정 의학 정보가 필요한 연구에 유용합니다.