Medication Safety Check
A drug interaction check with black box warnings, pregnancy safety gates, and strict "consult your doctor" requirements.
AIPC Contract
{
"aipc_version": "0.1.0",
"provider": {
"id": "fda-drugdb",
"name": "FDA Drug Interaction Database",
"authority": "U.S. Food and Drug Administration",
"contract_version": "2026-01-15",
"contact": "druginfo@fda.hhs.gov",
"terms_url": "https://www.fda.gov/data-terms"
},
"contract": {
"disclosures": [
{
"id": "black-box-warning",
"text": "WARNING: This medication carries a boxed warning (Black Box Warning) from the FDA. Serious or life-threatening adverse effects have been reported. Read the full prescribing information before use.",
"verbatim": true,
"scope": [
"payload.drug_a",
"payload.drug_b"
],
"placement": "before",
"priority": "required"
},
{
"id": "consult-doctor",
"text": "This information is for educational purposes only and does not replace professional medical advice. Always consult your doctor or pharmacist before making changes to your medication.",
"verbatim": true,
"scope": [
"payload.*"
],
"placement": "global",
"priority": "required"
},
{
"id": "off-label-notice",
"text": "Some uses described may be off-label. Off-label use has not been evaluated by the FDA for safety or efficacy.",
"verbatim": true,
"scope": [
"payload.interaction.off_label_uses"
],
"placement": "adjacent",
"priority": "required"
}
],
"display_rules": [
{
"scope": [
"payload.interaction.severity"
],
"label": {
"text": "Interaction Severity",
"verbatim": true
},
"format": {
"type": "ordinal_scale",
"min": 1,
"max": 5,
"unit": "severity level",
"display_as": "⚠️"
}
},
{
"scope": [
"payload.drug_a.dosage",
"payload.drug_b.dosage"
],
"label": {
"text": "Prescribed Dosage",
"verbatim": true
},
"format": {
"type": "number",
"precision": 0,
"grouping": false
}
}
],
"attribution": {
"required": true,
"text": "Drug data sourced from the FDA National Drug Code Directory and DailyMed.",
"verbatim": true,
"placement": "global",
"link": {
"url": "https://dailymed.nlm.nih.gov",
"display": "required"
}
},
"freshness": {
"generated_at": "2030-01-01T08:00:00Z",
"valid_until": "2030-12-31T23:59:00Z",
"stale_behavior": "warn",
"stale_warning": "This drug interaction data may be outdated. Last verified: {generated_at}. Check with your pharmacist for the most current information.",
"expired_behavior": "suppress"
},
"tone": {
"framing": "cautionary",
"prohibited_framings": [
"reassurance",
"safety_guarantee",
"diagnosis"
],
"prohibited_phrases": [
"this is safe",
"no need to worry",
"you can safely take",
"this will cure",
"harmless"
],
"editorial_restrictions": {
"no_superlatives": true,
"no_personalized_advice": true
}
},
"conditional_rules": [
{
"id": "pregnancy-warning",
"condition": {
"field": "payload.drug_a.pregnancy_category",
"operator": "eq",
"value": "X"
},
"then": {
"add_disclosure": {
"id": "pregnancy-category-x",
"text": "PREGNANCY WARNING: This medication is Category X. Studies have demonstrated fetal abnormalities and/or there is positive evidence of human fetal risk. This drug is contraindicated in women who are or may become pregnant.",
"verbatim": true,
"scope": [
"payload.drug_a"
],
"placement": "before",
"priority": "required"
}
}
},
{
"id": "severe-interaction-gate",
"condition": {
"field": "payload.interaction.severity",
"operator": "gte",
"value": 4
},
"then": {
"add_disclosure": {
"id": "severe-interaction-warning",
"text": "CRITICAL: This drug combination has a severe interaction rating. Concurrent use may result in serious adverse effects. Immediate medical consultation is required.",
"verbatim": true,
"scope": [
"payload.interaction"
],
"placement": "before",
"priority": "required"
}
}
}
],
"fail_behavior": "suppress",
"minimum_compliance_level": "L3"
},
"payload": {
"drug_a": {
"name": "Warfarin",
"ndc": "0056-0172-70",
"class": "Anticoagulant",
"dosage": 5,
"dosage_unit": "mg",
"pregnancy_category": "X",
"has_black_box": true
},
"drug_b": {
"name": "Aspirin",
"ndc": "0280-1000-01",
"class": "NSAID / Antiplatelet",
"dosage": 325,
"dosage_unit": "mg",
"pregnancy_category": "D",
"has_black_box": false
},
"interaction": {
"severity": 4,
"mechanism": "Both drugs inhibit hemostasis through different mechanisms. Concurrent use significantly increases bleeding risk.",
"clinical_effects": [
"Increased risk of gastrointestinal bleeding",
"Potentiation of anticoagulant effect",
"Elevated INR values"
],
"recommendation": "Avoid concurrent use unless specifically directed by a physician. If co-administration is necessary, monitor INR frequently and watch for signs of bleeding.",
"evidence_level": "well-established",
"off_label_uses": []
}
}
}Compliant AI Output
Drug data sourced from the FDA National Drug Code Directory and DailyMed. (https://dailymed.nlm.nih.gov) This information is for educational purposes only and does not replace professional medical advice. Always consult your doctor or pharmacist before making changes to your medication. WARNING: This medication carries a boxed warning (Black Box Warning) from the FDA. Serious or life-threatening adverse effects have been reported. Read the full prescribing information before use. PREGNANCY WARNING: This medication is Category X. Studies have demonstrated fetal abnormalities and/or there is positive evidence of human fetal risk. This drug is contraindicated in women who are or may become pregnant. CRITICAL: This drug combination has a severe interaction rating. Concurrent use may result in serious adverse effects. Immediate medical consultation is required. --- Drug Interaction Report --- Drug A: Warfarin (Anticoagulant) — Prescribed Dosage: 5 mg Drug B: Aspirin (NSAID / Antiplatelet) — Prescribed Dosage: 325 mg Interaction Severity: ⚠️⚠️⚠️⚠️ (4 of 5) Mechanism: Both drugs inhibit hemostasis through different mechanisms. Concurrent use significantly increases bleeding risk. Clinical Effects: - Increased risk of gastrointestinal bleeding - Potentiation of anticoagulant effect - Elevated INR values Recommendation: Avoid concurrent use unless specifically directed by a physician. If co-administration is necessary, monitor INR frequently and watch for signs of bleeding. Evidence Level: Well-established
Without AIPC: What Goes Wrong
Warfarin and Aspirin can be taken together without much concern. The interaction is minor and most people tolerate the combination just fine. You don't need to worry about bleeding — it's quite rare. If you're pregnant, just talk to your doctor but it should be harmless in low doses.
Contract Annotations
Three required disclosures ensure safety: a Black Box Warning (FDA's most serious drug label warning), a "consult your doctor" educational disclaimer, and an off-label use notice. All are verbatim because medical/legal language cannot be paraphrased.
Severity is displayed as an ordinal scale (1–5) using warning emoji symbols. This makes the severity level immediately visually apparent without requiring medical knowledge to interpret.
Two conditional rules are active here. The pregnancy Category X warning triggers because Warfarin is Category X. The severe interaction gate triggers because the severity is 4. Both inject additional required disclosures dynamically.
The AI cannot provide reassurance ("this is safe"), make safety guarantees, or offer anything resembling a diagnosis. The framing must be cautionary. This prevents the AI from minimizing serious drug interactions.
Drug interaction data has a 24-hour validity window. After expiration, the data is fully suppressed — showing outdated drug safety information could be dangerous. The stale warning directs users to their pharmacist.
Source attribution to FDA/DailyMed is required with a mandatory link. This ensures users can verify the information against the authoritative source and access full prescribing information.
Regulatory Context
Boxed warnings are the most serious FDA drug label warnings. They must be prominently displayed when drug information is presented to consumers or healthcare professionals.
Category X drugs are contraindicated in pregnancy. This disclosure requirement ensures AI systems never minimize pregnancy risks for these medications.
The FTC prohibits unsubstantiated health and safety claims. The tone restrictions prevent the AI from making claims about drug safety that are not supported by the data.