Skills

Querying Openfda Labels

Looks up FDA drug labels, NDC directory entries, indications, boxed warnings, and...

Install

npx skills add maziyarpanahi/openmed --skill querying-openfda-labels -g -a claude-code -y
Repository
maziyarpanahi/openmed5.8k
Category
Writing
Updated
4d ago
License
Apache-2.0
Context cost
Mediumabout 1,624 tokens
Runs scripts
No, instructions only

What it does

Looks up FDA drug labels, NDC directory entries, indications, boxed warnings, and recalls/enforcement actions via the free public OpenFDA API to enrich drugs that OpenMed extracts. Use when the user wants the prescribing information for a drug, its boxed warning, approved indications, dosage forms and routes, package NDC codes, RxCUI, or whether a product has an open recall. Trigger keywords: OpenFDA, drug label, SPL, prescribing information, boxed warning, black box warning, indications, NDC, package code, recall, enforcement, Class I recall, drug enrichment. Pairs adjacent to OpenMed NER: take a drug name (or RxNorm RxCUI) from openmed.analyze_text and resolve its label, NDC, and recall status. OpenFDA is public and free, no license barrier; send only de-identified drug names, never raw clinical notes.

Querying OpenFDA drug labels, NDC, and recalls

Once OpenMed has pulled a drug name out of a note, you often need authoritative product facts: the boxed warning, approved indications, dosage form / route, package NDC codes, and whether the product is under recall. The FDA's OpenFDA API exposes the Structured Product Labeling (SPL), the NDC directory, and enforcement (recall) reports, all public and free.

This skill is enrichment: it attaches regulatory facts to an extracted drug. It is not clinical decision support, a label lookup informs a human, it does not prescribe.

When to use

  • You extracted a drug and need its boxed warning or indications for display, alerting, or expectedness checks.
  • You need NDC package codes, dosage form, or route for a product.
  • You want to know if a drug/lot is under an open recall (enforcement).
  • You want to map a brand name to its generic ingredient and RxCUI via the label's openfda block.

The three endpoints

EndpointUseKey fields
https://api.fda.gov/drug/label.jsonSPL prescribing infoboxed_warning, indications_and_usage, warnings, dosage_and_administration, openfda.brand_name, openfda.generic_name, openfda.rxcui, openfda.product_ndc
https://api.fda.gov/drug/ndc.jsonNDC directoryproduct_ndc, generic_name, brand_name, dosage_form, route, active_ingredients
https://api.fda.gov/drug/enforcement.jsonRecallsproduct_description, reason_for_recall, classification (Class I/II/III), recalling_firm, status, recall_initiation_date

No key needed to try it (240 req/min, 1,000/day per IP). A free api_key= raises the daily cap to 120,000.

Quick start (real OpenFDA queries)

import requests
Read the whole SKILL.md on GitHub

More in Writing