Pular para o conteúdo
Skillpedia
Bancos de dados5,8 mil · #14714

normalizing-rxnorm

O que ela faz

Esta skill associa nomes de medicamentos a códigos RxNorm, os identificadores padrão de medicamentos dos EUA, ligando nomes comerciais, nomes genéricos e concentrações. Usa o serviço público e gratuito RxNav, então não exige licença nem chave. É para equipes que codificam medicamentos para registros e troca de dados.

Quando usar

  • ✓Quando uma nota cita medicamentos e você precisa de um código estável para cada remédio.
  • ✓Quando precisa diferenciar um princípio ativo de um produto prescrevível com sua concentração e forma farmacêutica.
  • ✓Quando nomes comerciais e genéricos devem ser combinados em um único conceito, ou quando são necessários códigos NDC.

Link da skill

https://github.com/maziyarpanahi/openmed/blob/master/skills/normalizing-rxnorm/SKILL.md

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/maziyarpanahi/openmed/blob/master/skills/normalizing-rxnorm/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Associe estes nomes de medicamentos da nota a códigos RxNorm, incluindo a concentração e a forma, e liste os equivalentes genéricos.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente envia cada nome de medicamento ao serviço público RxNav, escolhe o RxCUI correspondente ao princípio ativo ou ao produto e devolve os códigos com seus nomes.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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/MedicationRequest coded 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

  1. Extract drug spans with OpenMed (pharma_detection_superclinical).
  2. Parse each span into name + strength + dose form when present ("metformin 500 mg tablet" → ingredient metformin, strength 500 MG, form Oral Tablet).
  3. Exact match the cleaned name with /rxcui.json?name=. If empty, fall back to /approximateTerm.json.
  4. Pick the right term type (TTY) for your use case:
    • IN ingredient — analytics, allergy lists, class rollups.
    • SCD generic product / SBD brand product — orders, US Core Medication.
    • BN brand name, PIN precise ingredient — display/lineage.
  5. Validate by reading /rxcui/{rxcui}/properties.json and confirming the tty and name match expectations; record the score from approximate matches as a confidence signal.
  6. 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

Perguntas frequentes

Precisa de licença ou chave de API?

Não. O serviço RxNav é público e gratuito para uso normal.

Isto é útil fora dos Estados Unidos?

O RxNorm é centrado nos EUA, então outros países podem precisar de um sistema diferente de codificação de medicamentos.

Ele também dá códigos de embalagem?

Sim. Pode associar códigos NDC para produtos específicos.

Detalhes

Descrição original do autor

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

Popularidade

Estrelas no GitHub
5,8 mil
Posição no ranking
#14714
Licença
Apache-2.0
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas