Medication Decision Support Systems
Complete guide to clinical decision support for medications including drug interaction checking, contraindication alerts, allergy screening, duplicate therapy detection, and database design for safety systems.
Abbreviations Used in This Guide
cdss= clinical decision support systemddi= drug-drug interactioncd= codedesc= descriptionid= identifierdt= datedttm= datetimeqty= quantityView complete glossary: Healthcare Abbreviations | Healthcare Definitions
Table of Contents
1Overview of Decision Support
Medication Decision Support Systems (CDSS) are computerized systems that help healthcare providers make safer medication decisions by automatically screening for potential safety issues before medications are prescribed or dispensed.
Critical Use Cases:
- • Preventing adverse drug events and medication errors
- • Alerting providers to drug-drug interactions
- • Screening for drug allergies and sensitivities
- • Detecting contraindications based on patient conditions
- • Identifying duplicate therapy and therapeutic overlap
- • Dose range checking and renal/hepatic adjustments
- • Age-specific and pregnancy/lactation warnings
Clinical Impact
Studies show that CDSS can prevent up to 86% of potential adverse drug eventswhen properly implemented and used. However, alert fatigue from excessive or poorly designed alerts can reduce effectiveness.
2Types of Medication Alerts
| Alert Type | Severity | Example |
|---|---|---|
| Drug-Drug Interaction | High | Warfarin + Aspirin = Bleeding risk |
| Drug Allergy | Critical | Patient allergic to penicillin |
| Contraindication | High | Beta-blocker in severe asthma |
| Duplicate Therapy | Medium | Two ACE inhibitors prescribed |
| Dose Range | Medium | Dose exceeds maximum daily limit |
| Age/Pregnancy | Variable | Category X drug in pregnancy |
| Renal/Hepatic | High | Drug requires dose adjustment for CrCl <30 |
⚠️ Alert Severity Levels
- • Critical: Life-threatening - must be addressed before proceeding
- • High: Significant risk - strong recommendation to reconsider
- • Medium: Moderate risk - clinical judgment required
- • Low: Minor concern - informational only
3Database Design
-- Patient Allergies CREATE TABLE patient_allergies ( allergy_id VARCHAR(50) PRIMARY KEY, patient_id VARCHAR(50) NOT NULL, allergen_type VARCHAR(50), -- DRUG, FOOD, ENVIRONMENTAL allergen_nm VARCHAR(255) NOT NULL, allergen_cd VARCHAR(50), -- RxNorm or custom code reaction_desc TEXT, severity_cd VARCHAR(20), -- MILD, MODERATE, SEVERE, LIFE_THREATENING onset_dt DATE, verified_ind CHAR(1) DEFAULT 'N', created_dttm TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); -- Drug Interaction Rules CREATE TABLE drug_interaction_rules ( interaction_id VARCHAR(50) PRIMARY KEY, drug_a_rxcui VARCHAR(20) NOT NULL, drug_a_nm VARCHAR(255), drug_b_rxcui VARCHAR(20) NOT NULL, drug_b_nm VARCHAR(255), severity_cd VARCHAR(20), -- CRITICAL, HIGH, MODERATE, LOW interaction_desc TEXT, clinical_effect TEXT, management_rec TEXT, -- Recommended management evidence_level VARCHAR(20), -- PROVEN, PROBABLE, POSSIBLE source_nm VARCHAR(100), -- First DataBank, Micromedex, etc. created_dttm TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); -- Contraindication Rules CREATE TABLE contraindication_rules ( contraindication_id VARCHAR(50) PRIMARY KEY, drug_rxcui VARCHAR(20) NOT NULL, drug_nm VARCHAR(255), condition_cd VARCHAR(50), -- ICD-10 or SNOMED condition_nm VARCHAR(255), severity_cd VARCHAR(20), contraindication_desc TEXT, alternative_therapy TEXT, created_dttm TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); -- Alert Log (for tracking which alerts were shown) CREATE TABLE alert_log ( alert_log_id VARCHAR(50) PRIMARY KEY, patient_id VARCHAR(50), prescriber_id VARCHAR(50), alert_type VARCHAR(50), -- DDI, ALLERGY, CONTRAINDICATION, etc. alert_severity VARCHAR(20), alert_msg TEXT, drug_rxcui VARCHAR(20), override_ind CHAR(1) DEFAULT 'N', override_reason TEXT, alert_dttm TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); -- Indexes CREATE INDEX idx_allergies_patient ON patient_allergies(patient_id); CREATE INDEX idx_allergies_allergen ON patient_allergies(allergen_cd); CREATE INDEX idx_ddi_drug_a ON drug_interaction_rules(drug_a_rxcui); CREATE INDEX idx_ddi_drug_b ON drug_interaction_rules(drug_b_rxcui); CREATE INDEX idx_contra_drug ON contraindication_rules(drug_rxcui); CREATE INDEX idx_contra_condition ON contraindication_rules(condition_cd);
4Drug-Drug Interactions (DDI)
Drug-drug interactions occur when one medication affects the activity of another, potentially leading to adverse effects or reduced efficacy.
Common DDI Mechanisms:
Pharmacokinetic
Changes in absorption, distribution, metabolism, or excretion
Example: Ketoconazole inhibits CYP3A4, increasing simvastatin levels
Pharmacodynamic
Additive or opposing effects at receptor sites
Example: Combining two CNS depressants increases sedation
-- Check if new prescription interacts with patient's current meds
WITH patient_current_meds AS (
SELECT DISTINCT rxcui
FROM prescriptions
WHERE patient_id = '12345'
AND active_ind = 'Y'
)
SELECT
ddi.severity_cd,
ddi.drug_a_nm,
ddi.drug_b_nm,
ddi.interaction_desc,
ddi.clinical_effect,
ddi.management_rec
FROM drug_interaction_rules ddi
WHERE (
-- New drug vs existing meds
(ddi.drug_a_rxcui = '197361' -- New prescription RxCUI
AND ddi.drug_b_rxcui IN (SELECT rxcui FROM patient_current_meds))
OR
(ddi.drug_b_rxcui = '197361'
AND ddi.drug_a_rxcui IN (SELECT rxcui FROM patient_current_meds))
)
AND ddi.severity_cd IN ('CRITICAL', 'HIGH')
ORDER BY
CASE ddi.severity_cd
WHEN 'CRITICAL' THEN 1
WHEN 'HIGH' THEN 2
ELSE 3
END;5Allergy Screening
Allergy checking is one of the most critical safety checks. Systems must screen for:
Direct Match
Exact match between prescribed drug and documented allergy
Class Allergy
Cross-reactivity within drug classes (e.g., all penicillins)
Ingredient Allergy
Allergies to specific inactive ingredients (dyes, preservatives)
-- Screen for drug allergies before prescribing
SELECT
pa.allergen_nm,
pa.reaction_desc,
pa.severity_cd,
'ALLERGY ALERT: Patient has documented allergy' as alert_msg
FROM patient_allergies pa
WHERE pa.patient_id = '12345'
AND pa.allergen_type = 'DRUG'
AND (
-- Direct match on drug name
pa.allergen_nm ILIKE '%amoxicillin%'
OR
-- Match on drug class (would need class mapping table)
pa.allergen_cd IN (
SELECT drug_class_cd
FROM drug_classes
WHERE rxcui = '723' -- Amoxicillin RxCUI
)
)
ORDER BY
CASE pa.severity_cd
WHEN 'LIFE_THREATENING' THEN 1
WHEN 'SEVERE' THEN 2
WHEN 'MODERATE' THEN 3
ELSE 4
END;6Contraindications
Contraindications are conditions or factors that make a particular treatment inadvisable. They can be absolute (never use) or relative (use with caution).
Common Contraindication Types:
- • Disease-based: Drug contraindicated in specific medical conditions
- • Age-based: Pediatric or geriatric contraindications
- • Pregnancy/Lactation: Teratogenic or harmful in breastfeeding
- • Lab-based: Contraindicated with abnormal lab values (e.g., low K+)
- • Organ dysfunction: Renal or hepatic impairment
Example Contraindications:
7Duplicate Therapy Detection
Duplicate therapy alerts warn when a patient is prescribed multiple drugs from the same therapeutic class, which may be unintentional or potentially harmful.
Detection Scenarios:
- • Same Ingredient: Two formulations of the same drug (e.g., Lipitor + atorvastatin generic)
- • Same Class: Two drugs from same therapeutic class (e.g., two statins)
- • Same Mechanism: Drugs with identical or overlapping mechanisms
- • Additive Effects: Drugs that produce same physiologic effect
-- Find duplicate therapy in patient's medication list
WITH patient_meds_with_class AS (
SELECT
p.rx_id,
p.drug_nm,
dc.therapeutic_class,
dc.mechanism_of_action
FROM prescriptions p
JOIN drug_classes dc ON p.rxcui = dc.rxcui
WHERE p.patient_id = '12345'
AND p.active_ind = 'Y'
)
SELECT
m1.drug_nm as drug_1,
m2.drug_nm as drug_2,
m1.therapeutic_class,
'DUPLICATE THERAPY: Multiple drugs from same class' as alert_msg
FROM patient_meds_with_class m1
JOIN patient_meds_with_class m2
ON m1.therapeutic_class = m2.therapeutic_class
AND m1.rx_id < m2.rx_id -- Avoid duplicate pairs
WHERE m1.therapeutic_class IS NOT NULL
ORDER BY m1.therapeutic_class;8Implementation Guide
Best Practices for CDSS Implementation:
1. Reduce Alert Fatigue
Show only clinically significant alerts. Studies show override rates >90% for low-priority alerts.
2. Provide Context
Include patient-specific data in alerts (current labs, vital signs, concurrent medications).
3. Suggest Alternatives
When alerting to a problem, provide recommended alternative medications.
4. Track Overrides
Log all alert overrides with reasons to identify alert quality issues.
5. Use Tiered Severity
Critical alerts should be interruptive; low-priority alerts can be passive.
📚 Clinical Knowledge Sources
- • First DataBank (FDB): Comprehensive drug interaction database
- • Micromedex: Evidence-based clinical decision support
- • Lexicomp: Drug information and interaction checking
- • RxNorm: NLM's normalized drug vocabulary (free)
- • DailyMed: FDA medication information (free)