What is Dispensing?
Dispensing refers to the process of preparing and providing medications to patients in healthcare and pharmacy settings. In healthcare data systems, dispensing data captures critical information about medication distribution, inventory management, and patient safety.
Common Dispensing Abbreviations
Core Dispensing Terms
| Abbreviation | Full Term | Description |
|---|---|---|
disp_id | dispensing identifier | Unique identifier for each dispensing transaction |
disp_dt | dispensing date | Date medication was dispensed |
disp_qty | dispensing quantity | Amount of medication dispensed |
disp_nbr | dispensing number | Reference number for the dispensing event |
disp_loc | dispensing location | Pharmacy or facility location |
disp_phrm | dispensing pharmacist | Pharmacist who dispensed the medication |
disp_sts | dispensing status | Current status (completed, pending, cancelled) |
disp_typ | dispensing type | Type of dispensing (retail, hospital, mail order) |
Related Medication Terms
rx_id- prescription identifiermed_id- medication identifierndc_cd- National Drug Coderefill_nbr- refill numberdays_supply- days supply quantity
Database Schema Example
Dispensing Table Design
CREATE TABLE dispensing (
disp_id VARCHAR(50) PRIMARY KEY,
rx_id VARCHAR(50) NOT NULL,
pt_id VARCHAR(50) NOT NULL,
med_id VARCHAR(50) NOT NULL,
ndc_cd VARCHAR(20),
-- Dispensing Details
disp_dt DATE NOT NULL,
disp_qty DECIMAL(10,2),
days_supply INT,
refill_nbr INT,
-- Location & Staff
disp_loc VARCHAR(100),
disp_phrm VARCHAR(100),
-- Status & Type
disp_sts VARCHAR(20),
disp_typ VARCHAR(50),
-- Audit
crtd_dt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
upd_dt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-- Foreign Keys
FOREIGN KEY (rx_id) REFERENCES prescriptions(rx_id),
FOREIGN KEY (pt_id) REFERENCES patients(pt_id),
FOREIGN KEY (med_id) REFERENCES medications(med_id)
);
-- Indexes for performance
CREATE INDEX idx_disp_rx ON dispensing(rx_id);
CREATE INDEX idx_disp_pt ON dispensing(pt_id);
CREATE INDEX idx_disp_dt ON dispensing(disp_dt);
CREATE INDEX idx_disp_med ON dispensing(med_id);Common Dispensing Workflows
1. Retail Pharmacy Dispensing
- Prescription received
- Insurance verification
- Medication preparation
- Patient counseling
- Dispensing transaction recorded
2. Hospital Dispensing
- Order verification
- Clinical review
- Medication preparation
- Administration tracking
- Inventory management
3. Mail Order Dispensing
- Prescription processing
- Medication packaging
- Shipping coordination
- Delivery confirmation
Regulatory Compliance
Required Data Elements
According to pharmacy regulations, dispensing records must capture:
Patient Information
- Patient identifier
- Patient name
- Date of birth
Medication Details
- NDC code
- Medication name
- Strength and formulation
- Quantity dispensed
Prescriber Information
- Prescriber identifier (NPI)
- Prescriber name
- DEA number (for controlled substances)
Dispensing Information
- Dispensing date
- Pharmacist identifier
- Pharmacy location
- Refill information
Dispensing Abbreviations: Extended Reference
Days Supply & Quantity Terms
| Abbreviation | Full Term | Description |
|---|---|---|
days_sup | days supply | Number of days the dispensed quantity should last |
disp_qty_uom | dispensing quantity unit of measure | Unit (EA, ML, GM, TAB, CAP) |
pkg_qty | package quantity | Number of packages dispensed |
pkg_sz | package size | Quantity per package |
mme_qty | morphine milligram equivalent quantity | Opioid strength conversion for safety monitoring |
Controlled Substance Terms
dea_sch— DEA schedule (I–V)cs_flg— controlled substance flagdea_nbr— prescriber DEA numberpdmp_rptd_flg— PDMP reported flagearly_fill_flg— early fill indicator
Dispensing Fee & Billing Terms
disp_fee— dispensing feeingr_cost— ingredient costuc_price— usual and customary pricecopay_amt— patient copay amountadjud_sts— adjudication statusrej_cd— NCPDP rejection code
Medication Adherence Metrics
Pharmacy dispensing data is the primary source for medication adherence measurement — critical for STAR ratings and HEDIS measures.
Proportion of Days Covered (PDC)
PDC is the gold standard adherence metric. A patient is considered adherent when PDC ≥ 80%.
-- Calculate PDC for Diabetes Medications (measurement year)
WITH fills AS (
SELECT
d.pt_id,
d.disp_dt AS fill_dt,
d.disp_dt + d.days_supply AS end_dt,
d.days_supply
FROM dispensing d
JOIN medications m ON m.med_id = d.med_id
WHERE m.drug_class IN ('METFORMIN','SULFONYLUREA','DPP4','GLP1','SGLT2','INSULIN')
AND d.disp_dt BETWEEN '2025-01-01' AND '2025-12-31'
),
covered_days AS (
SELECT
pt_id,
-- Count distinct days covered (handles overlapping fills)
COUNT(DISTINCT gs::DATE) AS days_covered
FROM fills,
LATERAL generate_series(fill_dt, LEAST(end_dt, '2025-12-31'), '1 day') gs
WHERE gs::DATE >= '2025-01-01'
GROUP BY pt_id
)
SELECT
pt_id,
days_covered,
365 AS measurement_days,
ROUND(days_covered::DECIMAL / 365, 3) AS pdc,
CASE WHEN days_covered >= 292 THEN 'ADHERENT' ELSE 'NON-ADHERENT' END AS adherence_status
FROM covered_days
ORDER BY pdc;DAW (Dispense As Written) Codes
| DAW Code | Meaning |
|---|---|
| 0 | No product selection indicated (generic dispensed) |
| 1 | Substitution not allowed — prescriber's instructions |
| 2 | Substitution allowed — patient requested brand |
| 3 | Substitution allowed — pharmacist selected brand |
| 4 | Substitution allowed — generic out of stock |
| 7 | Substitution not allowed — brand medically necessary |
| 9 | Other |
340B Drug Program Dispensing
The 340B Drug Pricing Program requires covered entities to track 340B-purchased drugs separately from non-340B inventory to prevent diversion or duplicate discounts. Dispensing systems must flag and audit 340B transactions.
ALTER TABLE dispensing ADD COLUMN is_340b_eligible BOOLEAN DEFAULT FALSE;
ALTER TABLE dispensing ADD COLUMN is_340b_purchased BOOLEAN DEFAULT FALSE;
ALTER TABLE dispensing ADD COLUMN contract_pharmacy_id VARCHAR(50);
-- 340B eligibility: patient must be treated at or referred by the covered entity
-- and the drug must be dispensed for the covered entity's patient population
CREATE INDEX idx_disp_340b ON dispensing(is_340b_purchased, disp_dt)
WHERE is_340b_purchased = TRUE;Best Practices
Data Quality
- ✅ Validate NDC codes against FDA database
- ✅ Capture exact dispensing timestamps
- ✅ Record lot numbers for medication recall tracking
- ✅ Document pharmacist verification and DUR overrides
- ✅ Validate days supply is clinically reasonable for the drug class
Controlled Substance Compliance
- ✅ Report to state PDMP within required timeframe (typically 24 hours)
- ✅ Flag and review early fills (refills more than 75% through days supply)
- ✅ Calculate and flag high MME per day (≥ 90 MME/day triggers CDC guideline review)
- ✅ Verify DEA schedule against prescriber DEA number
Security & Privacy
- ✅ Encrypt patient identifiers and sensitive fields
- ✅ Audit all dispensing record access
- ✅ HIPAA-compliant logging with user, timestamp, and action
- ✅ Role-based access — pharmacists vs technicians vs billing staff
Performance Optimization
- ✅ Partition dispensing table by year/month for large datasets
- ✅ Index on (pt_id, disp_dt) for patient history queries
- ✅ Index on (ndc_cd, disp_dt) for drug utilization reports
- ✅ Archive dispensing records older than 7 years per state requirements