Back to Guides
Pharmacy Standards
Medication Terminology System

RxNorm Guide

RxNorm is a standardized nomenclature for clinical drugs and drug delivery devices produced by the National Library of Medicine. This guide covers RxNorm concepts, database design, and pharmacy system integration.

What is RxNorm?

RxNorm provides normalized names for clinical drugs and links its names to many of the drug vocabularies commonly used in pharmacy management and drug interaction software. By providing a standard way to represent clinical drugs, RxNorm enables interoperability between systems that record or process drug information.

Each RxNorm concept has a unique identifier called RxCUI (RxNorm Concept Unique Identifier) that represents a specific drug at different levels of specificity - from ingredients to branded packs.

RxNorm Term Types

Hierarchy of Drug Concepts

IN

Ingredient

Active ingredient (e.g., "Ibuprofen", "Metformin")

SCDC

Semantic Clinical Drug Component

Ingredient + strength (e.g., "Ibuprofen 200 MG")

SCD

Semantic Clinical Drug

Generic drug (e.g., "Ibuprofen 200 MG Oral Tablet")

BN

Brand Name

Commercial name (e.g., "Advil", "Glucophage")

SBD

Semantic Branded Drug

Branded drug (e.g., "Advil 200 MG Oral Tablet")

Example: Ibuprofen Hierarchy

RxCUI: 5640        | IN   | Ibuprofen
                   |
RxCUI: 316049      | SCDC | Ibuprofen 200 MG
                   |
RxCUI: 310965      | SCD  | Ibuprofen 200 MG Oral Tablet
                   |
                   +---> RxCUI: 153010  | BN  | Advil
                   |
                   +---> RxCUI: 209387  | SBD | Advil 200 MG Oral Tablet

// NDC Codes (actual products):
NDC: 50580-0449-01 | Advil 200 MG Oral Tablet [Pfizer]
NDC: 59779-0934-01 | Ibuprofen 200 MG Oral Tablet [Generic]

RxNorm Database Schema

Recommended PostgreSQL schema for RxNorm concepts and medication data:

-- RxNorm Concepts Table
CREATE TABLE rxnorm_concept (
  rxcui               VARCHAR(20) PRIMARY KEY,         -- RxNorm Concept Unique ID
  
  -- Term Details
  str                 VARCHAR(500) NOT NULL,           -- String name
  tty                 VARCHAR(20) NOT NULL,            -- Term type (IN, SCD, BN, etc.)
  
  -- Classification
  drug_class          VARCHAR(255),
  therapeutic_class   VARCHAR(255),
  
  -- Status
  suppress            VARCHAR(1),                      -- O=active, N=not active
  
  -- Metadata
  created_at          TIMESTAMP DEFAULT NOW(),
  updated_at          TIMESTAMP DEFAULT NOW()
);

CREATE INDEX idx_rxnorm_str ON rxnorm_concept(str);
CREATE INDEX idx_rxnorm_tty ON rxnorm_concept(tty);

-- RxNorm Relationships (connects concepts)
CREATE TABLE rxnorm_relationship (
  id                  UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  rxcui1              VARCHAR(20) NOT NULL REFERENCES rxnorm_concept(rxcui),
  rxcui2              VARCHAR(20) NOT NULL REFERENCES rxnorm_concept(rxcui),
  relationship_type   VARCHAR(50) NOT NULL,            -- has_ingredient, tradename_of, etc.
  
  created_at          TIMESTAMP DEFAULT NOW()
);

CREATE INDEX idx_rxrel_rxcui1 ON rxnorm_relationship(rxcui1);
CREATE INDEX idx_rxrel_rxcui2 ON rxnorm_relationship(rxcui2);

-- NDC to RxNorm Mapping
CREATE TABLE ndc_rxnorm_map (
  ndc                 VARCHAR(20) PRIMARY KEY,         -- National Drug Code
  rxcui               VARCHAR(20) REFERENCES rxnorm_concept(rxcui),
  
  -- Product Details
  product_name        VARCHAR(500),
  manufacturer        VARCHAR(255),
  package_description VARCHAR(500),
  
  -- Status
  active              BOOLEAN DEFAULT TRUE,
  
  created_at          TIMESTAMP DEFAULT NOW(),
  updated_at          TIMESTAMP DEFAULT NOW()
);

CREATE INDEX idx_ndc_rxcui ON ndc_rxnorm_map(rxcui);

-- Medication Table (actual prescriptions/administrations)
CREATE TABLE medication (
  id                  UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  
  -- Patient & Order
  patient_id          UUID NOT NULL,
  prescription_id     UUID,
  encounter_id        UUID,
  
  -- Drug Information
  rxcui               VARCHAR(20) REFERENCES rxnorm_concept(rxcui),
  ndc                 VARCHAR(20),
  drug_name           VARCHAR(500) NOT NULL,
  
  -- Dosage
  strength            VARCHAR(100),
  dose_form           VARCHAR(100),                    -- Tablet, Capsule, etc.
  route               VARCHAR(50),                     -- Oral, IV, etc.
  
  -- Administration
  sig                 TEXT,                            -- Prescription directions
  quantity            DECIMAL(10,2),
  refills             INTEGER,
  days_supply         INTEGER,
  
  -- Dates
  prescribed_date     DATE NOT NULL,
  start_date          DATE,
  end_date            DATE,
  
  -- Provider
  prescriber_npi      VARCHAR(10),
  pharmacy_ncpdp      VARCHAR(20),
  
  -- Status
  status              VARCHAR(50),                     -- active, completed, stopped
  
  -- Metadata
  created_at          TIMESTAMP DEFAULT NOW(),
  updated_at          TIMESTAMP DEFAULT NOW()
);

CREATE INDEX idx_med_patient ON medication(patient_id);
CREATE INDEX idx_med_rxcui ON medication(rxcui);
CREATE INDEX idx_med_ndc ON medication(ndc);
CREATE INDEX idx_med_prescribed_date ON medication(prescribed_date);

SQL Query Examples

Find All Forms of a Drug (e.g., Metformin)

SELECT 
  rc.rxcui,
  rc.str,
  rc.tty
FROM rxnorm_concept rc
JOIN rxnorm_relationship rr ON rc.rxcui = rr.rxcui2
JOIN rxnorm_concept ing ON rr.rxcui1 = ing.rxcui
WHERE ing.str = 'Metformin'
  AND ing.tty = 'IN'
  AND rr.relationship_type = 'has_ingredient'
  AND rc.tty IN ('SCD', 'SBD')
ORDER BY rc.str;

Get Patient's Active Medications

SELECT 
  m.drug_name,
  rc.str as rxnorm_name,
  m.strength,
  m.dose_form,
  m.sig,
  m.prescribed_date,
  m.days_supply
FROM medication m
LEFT JOIN rxnorm_concept rc ON m.rxcui = rc.rxcui
WHERE m.patient_id = 'patient-uuid'
  AND m.status = 'active'
  AND (m.end_date IS NULL OR m.end_date >= CURRENT_DATE)
ORDER BY m.prescribed_date DESC;

Map NDC to RxNorm

SELECT 
  nrm.ndc,
  nrm.product_name,
  nrm.manufacturer,
  rc.rxcui,
  rc.str as generic_name,
  rc.tty
FROM ndc_rxnorm_map nrm
JOIN rxnorm_concept rc ON nrm.rxcui = rc.rxcui
WHERE nrm.ndc = '50580-0449-01';

Implementation Best Practices

Use SCD for Clinical Documentation

Semantic Clinical Drugs (SCD) are generic formulations ideal for EHR documentation and interoperability.

Map NDC to RxCUI for Dispensing

Maintain NDC-to-RxCUI mappings to link pharmacy dispensing data with clinical records.

Check Drug Interactions

Use RxNorm with interaction databases (FDB, First Databank) to screen for contraindications.

Update Monthly

RxNorm releases monthly updates. Schedule regular imports to maintain current drug information.

Related Healthcare Standards