40 year old female Internal headache and relief with levocetrizine
histamine headache antihistamine relief
headache relieved by levocetirizine antihistamine histamine intolerance mechanism 2024
| Mechanism | Effect |
|---|---|
| H1-receptor blockade on cerebral vessels | Prevents histamine-induced vasodilation |
| Reduces mast cell mediator effects | Decreases neurogenic inflammation |
| Relieves nasal/sinus mucosal edema | Reduces referred sinus headache |
| Stabilizes vascular permeability | Less perivascular edema |
| Strategy | Action |
|---|---|
| Confirm histamine-mediated cause | Oral provocation with histamine-rich diet; symptom diary |
| Levocetirizine | 5 mg once daily (evening); effective and less sedating than 1st-gen antihistamines |
| Dietary modification | Low-histamine diet trial for 4 weeks if histamine intolerance suspected |
| Investigate for allergic rhinitis | Skin prick test / serum specific IgE for common aeroallergens |
| Address hormonal link | If perimenstrual pattern, consider liaison with gynecology |
| Rule out sinusitis | Nasal examination, consider ENT referral |
| Intranasal corticosteroids | If allergic rhinitis confirmed - fluticasone/mometasone as add-on |
Make a PowerPoint comparing histamine headache vs migraine vs cluster headache
ls -la /home/daytona/workspace/ 2>/dev/null && mkdir -p /home/daytona/workspace/…
~/headache-pptx/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE";
pres.title = "Headache Comparison: Histamine vs Migraine vs Cluster";
// ─────────────────────────────────────────────
// PALETTE
// Deep navy bg, warm amber accent, cool teal, crimson
const BG_DARK = "0D1B2A"; // deep navy
const BG_MID = "1B2E45"; // mid navy
const ACCENT1 = "E8A838"; // amber (histamine)
const ACCENT2 = "7EC8C8"; // teal (migraine)
const ACCENT3 = "D9534F"; // crimson (cluster)
const WHITE = "FFFFFF";
const LIGHT = "E8EEF4";
const MUTED = "8DA9C0";
const SLIDE_W = 13.3;
const SLIDE_H = 7.5;
// ─────────────────────────────────────────────
// HELPERS
function addDarkBg(slide) {
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: SLIDE_W, h: SLIDE_H,
fill: { color: BG_DARK }, line: { type: "none" }
});
}
function addMidBg(slide) {
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: SLIDE_W, h: SLIDE_H,
fill: { color: BG_MID }, line: { type: "none" }
});
}
function accentBar(slide, color) {
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 0.12, h: SLIDE_H,
fill: { color }, line: { type: "none" }
});
}
function slideLabel(slide, txt, color) {
slide.addText(txt, {
x: 0.25, y: SLIDE_H - 0.35, w: 5, h: 0.28,
fontSize: 8, color: MUTED, bold: false, fontFace: "Calibri"
});
}
// ─────────────────────────────────────────────
// SLIDE 1 — TITLE
// ─────────────────────────────────────────────
{
const s = pres.addSlide();
addDarkBg(s);
// Top accent stripe
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: SLIDE_W, h: 0.08,
fill: { color: ACCENT1 }, line: { type: "none" }
});
// Bottom accent stripe
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: SLIDE_H - 0.08, w: SLIDE_W, h: 0.08,
fill: { color: ACCENT3 }, line: { type: "none" }
});
// Three colored dots representing the three headaches
const dotY = 1.8;
const dots = [
{ x: 2.8, color: ACCENT1, label: "Histamine" },
{ x: 5.8, color: ACCENT2, label: "Migraine" },
{ x: 8.8, color: ACCENT3, label: "Cluster" }
];
dots.forEach(d => {
s.addShape(pres.shapes.OVAL, {
x: d.x, y: dotY, w: 0.55, h: 0.55,
fill: { color: d.color }, line: { type: "none" }
});
});
// Main title
s.addText("HEADACHE TYPES", {
x: 0.5, y: 2.7, w: SLIDE_W - 1, h: 1.1,
fontSize: 52, bold: true, color: WHITE,
align: "center", fontFace: "Calibri", charSpacing: 6
});
// Subtitle
s.addText("Histamine · Migraine · Cluster", {
x: 0.5, y: 3.85, w: SLIDE_W - 1, h: 0.55,
fontSize: 22, bold: false, color: LIGHT,
align: "center", fontFace: "Calibri"
});
// Tagline
s.addText("A clinical comparison for diagnosis & management", {
x: 0.5, y: 4.55, w: SLIDE_W - 1, h: 0.4,
fontSize: 14, bold: false, color: MUTED,
align: "center", fontFace: "Calibri", italic: true
});
}
// ─────────────────────────────────────────────
// SLIDE 2 — OVERVIEW / AT-A-GLANCE TABLE
// ─────────────────────────────────────────────
{
const s = pres.addSlide();
addMidBg(s);
accentBar(s, ACCENT2);
// Section label
s.addText("OVERVIEW", {
x: 0.3, y: 0.18, w: 3, h: 0.3,
fontSize: 9, color: MUTED, bold: true, charSpacing: 4, fontFace: "Calibri"
});
s.addText("At a Glance", {
x: 0.3, y: 0.52, w: SLIDE_W - 0.6, h: 0.65,
fontSize: 34, bold: true, color: WHITE, fontFace: "Calibri"
});
// Column header boxes
const colX = [2.0, 5.5, 9.0];
const colW = 3.2;
const colColors = [ACCENT1, ACCENT2, ACCENT3];
const colLabels = ["Histamine Headache", "Migraine", "Cluster Headache"];
colX.forEach((x, i) => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x, y: 1.35, w: colW, h: 0.5,
fill: { color: colColors[i] }, line: { type: "none" }, rectRadius: 0.08
});
s.addText(colLabels[i], {
x, y: 1.35, w: colW, h: 0.5,
fontSize: 14, bold: true, color: BG_DARK, align: "center",
fontFace: "Calibri", valign: "middle", margin: 0
});
});
// Row definitions
const rows = [
{ label: "Prevalence", vals: ["~1% (histamine intolerance)", "~15% of adults", "0.1% of adults"] },
{ label: "Sex", vals: ["F > M", "F:M = 3:1", "M:F = 3:1"] },
{ label: "Pain type", vals: ["Throbbing / pressure", "Throbbing, pulsating", "Severe, boring/stabbing"] },
{ label: "Duration", vals: ["Variable, recurrent", "4–72 hours", "15–180 min/attack"] },
{ label: "Location", vals: ["Diffuse / frontal", "Unilateral (often)", "Strictly unilateral, orbital"] },
{ label: "Key trigger", vals: ["Dietary histamine / allergen", "Many (hormones, stress, food)", "Alcohol, nitroglycerin"] },
];
const rowH = 0.52;
const rowStartY = 1.98;
rows.forEach((row, ri) => {
const y = rowStartY + ri * rowH;
const rowBg = ri % 2 === 0 ? "162035" : BG_MID;
// Row bg
s.addShape(pres.shapes.RECTANGLE, {
x: 0.2, y, w: SLIDE_W - 0.4, h: rowH - 0.04,
fill: { color: rowBg }, line: { type: "none" }
});
// Row label
s.addText(row.label, {
x: 0.25, y, w: 1.6, h: rowH - 0.04,
fontSize: 11, bold: true, color: MUTED,
fontFace: "Calibri", valign: "middle"
});
// Values
colX.forEach((cx, ci) => {
s.addText(row.vals[ci], {
x: cx, y, w: colW, h: rowH - 0.04,
fontSize: 11, color: LIGHT,
fontFace: "Calibri", valign: "middle", align: "center"
});
});
});
}
// ─────────────────────────────────────────────
// SLIDE 3 — HISTAMINE HEADACHE (deep dive)
// ─────────────────────────────────────────────
{
const s = pres.addSlide();
addDarkBg(s);
accentBar(s, ACCENT1);
// Header band
s.addShape(pres.shapes.RECTANGLE, {
x: 0.2, y: 0, w: SLIDE_W - 0.2, h: 1.1,
fill: { color: ACCENT1 }, line: { type: "none" }
});
s.addText("HISTAMINE HEADACHE", {
x: 0.35, y: 0.05, w: 10, h: 0.6,
fontSize: 28, bold: true, color: BG_DARK, fontFace: "Calibri"
});
s.addText("Also known as: Dietary histamine / Histamine Intolerance headache", {
x: 0.35, y: 0.65, w: 11, h: 0.38,
fontSize: 13, color: BG_MID, fontFace: "Calibri", italic: true
});
// Cards
const cardData = [
{
title: "Pathophysiology",
color: "1A2E45",
x: 0.25, y: 1.25, w: 3.9, h: 2.5,
points: [
"H1 receptor activation on cerebral vessels",
"Vasodilation → stretching of vessel walls",
"Neurogenic inflammation",
"Reduced DAO enzyme → histamine accumulates",
"Estrogen promotes mast cell histamine release"
]
},
{
title: "Clinical Features",
color: "1A2E45",
x: 4.35, y: 1.25, w: 3.9, h: 2.5,
points: [
"Throbbing / pressure-type pain",
"Diffuse or frontal location",
"Often with flushing, rhinorrhoea",
"Urticaria or skin flushing may co-occur",
"Relieved by H1-antihistamines (e.g., levocetirizine)"
]
},
{
title: "Triggers",
color: "1A2E45",
x: 8.45, y: 1.25, w: 4.6, h: 2.5,
points: [
"Fermented foods (cheese, wine, sauerkraut)",
"Processed meats, canned fish",
"Alcohol (especially red wine)",
"Allergen exposure",
"Perimenstrual hormonal fluctuation"
]
}
];
cardData.forEach(c => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: c.x, y: c.y, w: c.w, h: c.h,
fill: { color: c.color },
line: { color: ACCENT1, pt: 1.5 },
rectRadius: 0.1,
shadow: { type: "outer", color: "000000", blur: 8, offset: 2, angle: 135, opacity: 0.25 }
});
s.addText(c.title, {
x: c.x + 0.12, y: c.y + 0.1, w: c.w - 0.24, h: 0.38,
fontSize: 13, bold: true, color: ACCENT1, fontFace: "Calibri"
});
s.addText(
c.points.map(p => ({ text: p, options: { bullet: { indent: 12 }, breakLine: true } })),
{
x: c.x + 0.12, y: c.y + 0.52, w: c.w - 0.24, h: c.h - 0.65,
fontSize: 10.5, color: LIGHT, fontFace: "Calibri", valign: "top"
}
);
});
// Treatment
s.addShape(pres.shapes.RECTANGLE, {
x: 0.25, y: 3.92, w: SLIDE_W - 0.5, h: 1.65,
fill: { color: "12243A" }, line: { color: ACCENT1, pt: 1 }
});
s.addText("MANAGEMENT", {
x: 0.4, y: 3.98, w: 3, h: 0.32,
fontSize: 11, bold: true, color: ACCENT1, fontFace: "Calibri", charSpacing: 3
});
const txts = [
{ label: "Acute", val: "Levocetirizine 5 mg PO / Cetirizine 10 mg PO" },
{ label: "Dietary", val: "Low-histamine diet trial (4 weeks)" },
{ label: "Lab workup", val: "Serum DAO enzyme level, specific IgE panel" },
{ label: "Preventive", val: "Regular antihistamine; avoid triggers; hormonal review if perimenstrual" }
];
txts.forEach((t, i) => {
const tx = 0.4 + i * 3.2;
s.addText(t.label + ":", {
x: tx, y: 4.38, w: 3.1, h: 0.28,
fontSize: 10, bold: true, color: ACCENT1, fontFace: "Calibri"
});
s.addText(t.val, {
x: tx, y: 4.68, w: 3.05, h: 0.75,
fontSize: 10, color: LIGHT, fontFace: "Calibri"
});
});
}
// ─────────────────────────────────────────────
// SLIDE 4 — MIGRAINE (deep dive)
// ─────────────────────────────────────────────
{
const s = pres.addSlide();
addDarkBg(s);
accentBar(s, ACCENT2);
s.addShape(pres.shapes.RECTANGLE, {
x: 0.2, y: 0, w: SLIDE_W - 0.2, h: 1.1,
fill: { color: ACCENT2 }, line: { type: "none" }
});
s.addText("MIGRAINE", {
x: 0.35, y: 0.05, w: 10, h: 0.6,
fontSize: 28, bold: true, color: BG_DARK, fontFace: "Calibri"
});
s.addText("Primary headache disorder — most common disabling headache in women", {
x: 0.35, y: 0.65, w: 11, h: 0.38,
fontSize: 13, color: BG_MID, fontFace: "Calibri", italic: true
});
const cardData = [
{
title: "Pathophysiology",
color: "1A2E45",
x: 0.25, y: 1.25, w: 3.9, h: 2.5,
points: [
"Cortical spreading depression (CSD)",
"Trigeminovascular activation",
"Release of CGRP, substance P",
"Neurogenic dural inflammation",
"Serotonin (5-HT1) dysregulation",
"Histamine plays a co-triggering role"
]
},
{
title: "Clinical Features",
color: "1A2E45",
x: 4.35, y: 1.25, w: 3.9, h: 2.5,
points: [
"Moderate-severe unilateral throbbing pain",
"Nausea and/or vomiting",
"Photophobia and phonophobia",
"Aura in ~30%: visual, sensory, speech",
"Duration: 4–72 hours",
"Worsened by physical activity"
]
},
{
title: "Triggers",
color: "1A2E45",
x: 8.45, y: 1.25, w: 4.6, h: 2.5,
points: [
"Hormonal fluctuations (menstruation)",
"Sleep disruption",
"Stress and anxiety",
"Dietary: caffeine, alcohol, tyramine",
"Bright lights, strong odors",
"Weather changes, dehydration"
]
}
];
cardData.forEach(c => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: c.x, y: c.y, w: c.w, h: c.h,
fill: { color: c.color },
line: { color: ACCENT2, pt: 1.5 },
rectRadius: 0.1,
shadow: { type: "outer", color: "000000", blur: 8, offset: 2, angle: 135, opacity: 0.25 }
});
s.addText(c.title, {
x: c.x + 0.12, y: c.y + 0.1, w: c.w - 0.24, h: 0.38,
fontSize: 13, bold: true, color: ACCENT2, fontFace: "Calibri"
});
s.addText(
c.points.map(p => ({ text: p, options: { bullet: { indent: 12 }, breakLine: true } })),
{
x: c.x + 0.12, y: c.y + 0.52, w: c.w - 0.24, h: c.h - 0.65,
fontSize: 10.5, color: LIGHT, fontFace: "Calibri", valign: "top"
}
);
});
// Treatment
s.addShape(pres.shapes.RECTANGLE, {
x: 0.25, y: 3.92, w: SLIDE_W - 0.5, h: 1.65,
fill: { color: "12243A" }, line: { color: ACCENT2, pt: 1 }
});
s.addText("MANAGEMENT", {
x: 0.4, y: 3.98, w: 3, h: 0.32,
fontSize: 11, bold: true, color: ACCENT2, fontFace: "Calibri", charSpacing: 3
});
const txts = [
{ label: "Acute (mild-mod)", val: "NSAIDs (ibuprofen, naproxen), paracetamol + antiemetic" },
{ label: "Acute (mod-severe)", val: "Triptans (sumatriptan, rizatriptan) — 5-HT1 agonists" },
{ label: "CGRP antagonists", val: "Gepants (rimegepant, ubrogepant) — newer acute therapy" },
{ label: "Prophylaxis", val: "Topiramate, propranolol, amitriptyline, CGRP mAbs (erenumab)" }
];
txts.forEach((t, i) => {
const tx = 0.4 + i * 3.2;
s.addText(t.label + ":", {
x: tx, y: 4.38, w: 3.1, h: 0.28,
fontSize: 10, bold: true, color: ACCENT2, fontFace: "Calibri"
});
s.addText(t.val, {
x: tx, y: 4.68, w: 3.05, h: 0.75,
fontSize: 10, color: LIGHT, fontFace: "Calibri"
});
});
}
// ─────────────────────────────────────────────
// SLIDE 5 — CLUSTER HEADACHE (deep dive)
// ─────────────────────────────────────────────
{
const s = pres.addSlide();
addDarkBg(s);
accentBar(s, ACCENT3);
s.addShape(pres.shapes.RECTANGLE, {
x: 0.2, y: 0, w: SLIDE_W - 0.2, h: 1.1,
fill: { color: ACCENT3 }, line: { type: "none" }
});
s.addText("CLUSTER HEADACHE", {
x: 0.35, y: 0.05, w: 10, h: 0.6,
fontSize: 28, bold: true, color: WHITE, fontFace: "Calibri"
});
s.addText("Also known as: \"Histamine headache\" (Horton, 1939) — most painful primary headache", {
x: 0.35, y: 0.65, w: 12, h: 0.38,
fontSize: 13, color: "FFD0CE", fontFace: "Calibri", italic: true
});
const cardData = [
{
title: "Pathophysiology",
color: "1A2E45",
x: 0.25, y: 1.25, w: 3.9, h: 2.5,
points: [
"Hypothalamic dysregulation (circadian clock)",
"Trigeminal nerve activation",
"Parasympathetic autonomic activation",
"Histamine reproduced attacks (Horton 1939)",
"Serotonin and CGRP involvement",
"Nocturnal/circadian pattern"
]
},
{
title: "Clinical Features",
color: "1A2E45",
x: 4.35, y: 1.25, w: 3.9, h: 2.5,
points: [
"Excruciating unilateral orbital/temporal pain",
"Duration: 15–180 min, up to 8×/day",
"Ipsilateral: lacrimation, conjunctival injection",
"Ipsilateral: miosis, ptosis (Horner's)",
"Nasal congestion / rhinorrhoea",
"Restlessness — patient cannot lie still"
]
},
{
title: "Two Forms",
color: "1A2E45",
x: 8.45, y: 1.25, w: 4.6, h: 2.5,
points: [
"EPISODIC: clusters 7d–1yr, remission ≥1 month",
"CHRONIC: no remission or <1 month free",
"",
"Predominantly males (M:F = 3:1)",
"Peak age 20–40 years",
"Often nocturnal — awakens from sleep"
]
}
];
cardData.forEach(c => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: c.x, y: c.y, w: c.w, h: c.h,
fill: { color: c.color },
line: { color: ACCENT3, pt: 1.5 },
rectRadius: 0.1,
shadow: { type: "outer", color: "000000", blur: 8, offset: 2, angle: 135, opacity: 0.25 }
});
s.addText(c.title, {
x: c.x + 0.12, y: c.y + 0.1, w: c.w - 0.24, h: 0.38,
fontSize: 13, bold: true, color: ACCENT3, fontFace: "Calibri"
});
s.addText(
c.points.filter(p => p).map(p => ({ text: p, options: { bullet: { indent: 12 }, breakLine: true } })),
{
x: c.x + 0.12, y: c.y + 0.52, w: c.w - 0.24, h: c.h - 0.65,
fontSize: 10.5, color: LIGHT, fontFace: "Calibri", valign: "top"
}
);
});
// Treatment
s.addShape(pres.shapes.RECTANGLE, {
x: 0.25, y: 3.92, w: SLIDE_W - 0.5, h: 1.65,
fill: { color: "12243A" }, line: { color: ACCENT3, pt: 1 }
});
s.addText("MANAGEMENT", {
x: 0.4, y: 3.98, w: 3, h: 0.32,
fontSize: 11, bold: true, color: ACCENT3, fontFace: "Calibri", charSpacing: 3
});
const txts = [
{ label: "Abortive #1", val: "High-flow O₂: 100% at 8–12 L/min × 15 min (non-rebreather)" },
{ label: "Abortive #2", val: "Sumatriptan 6 mg SC or intranasal; Zolmitriptan intranasal" },
{ label: "Prophylaxis", val: "Verapamil (1st choice); Topiramate, Divalproex" },
{ label: "Short-term bridge", val: "Oral prednisone taper or suboccipital steroid injection" }
];
txts.forEach((t, i) => {
const tx = 0.4 + i * 3.2;
s.addText(t.label + ":", {
x: tx, y: 4.38, w: 3.1, h: 0.28,
fontSize: 10, bold: true, color: ACCENT3, fontFace: "Calibri"
});
s.addText(t.val, {
x: tx, y: 4.68, w: 3.05, h: 0.75,
fontSize: 10, color: LIGHT, fontFace: "Calibri"
});
});
}
// ─────────────────────────────────────────────
// SLIDE 6 — KEY DIFFERENTIATORS (comparison grid)
// ─────────────────────────────────────────────
{
const s = pres.addSlide();
addMidBg(s);
accentBar(s, ACCENT1);
s.addText("DIFFERENTIATING FEATURES", {
x: 0.3, y: 0.15, w: 5, h: 0.3,
fontSize: 9, bold: true, color: MUTED, charSpacing: 4, fontFace: "Calibri"
});
s.addText("How to Tell Them Apart", {
x: 0.3, y: 0.48, w: SLIDE_W - 0.6, h: 0.65,
fontSize: 34, bold: true, color: WHITE, fontFace: "Calibri"
});
const colX = [2.15, 5.55, 9.0];
const colW = 3.25;
const colColors = [ACCENT1, ACCENT2, ACCENT3];
const colLabels = ["Histamine", "Migraine", "Cluster"];
colX.forEach((x, i) => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x, y: 1.28, w: colW, h: 0.46,
fill: { color: colColors[i] }, line: { type: "none" }, rectRadius: 0.06
});
s.addText(colLabels[i], {
x, y: 1.28, w: colW, h: 0.46,
fontSize: 14, bold: true, color: BG_DARK, align: "center",
fontFace: "Calibri", valign: "middle", margin: 0
});
});
const rows = [
{ label: "Pain quality", vals: ["Pressure/throbbing", "Throbbing/pulsating", "Stabbing/boring"] },
{ label: "Laterality", vals: ["Bilateral/diffuse", "Usually unilateral", "Always unilateral"] },
{ label: "Autonomic signs", vals: ["Flushing, urticaria", "Nausea, vomiting", "Lacrimation, miosis, ptosis"] },
{ label: "Nausea/Vomiting", vals: ["Mild (histamine effect)", "Prominent", "Absent or mild"] },
{ label: "Relief agent", vals: ["Antihistamines ✓", "Triptans / NSAIDs ✓", "O₂ / Triptans ✓"] },
{ label: "Antihistamine?", vals: ["Effective ✓✓", "Partial in some", "Not standard treatment"] },
{ label: "Diagnostic test", vals: ["DAO levels; diet trial", "Clinical (ICHD-3)", "Clinical; MRI to exclude"] },
];
const rowH = 0.5;
const rowStartY = 1.84;
rows.forEach((row, ri) => {
const y = rowStartY + ri * rowH;
const rowBg = ri % 2 === 0 ? "142030" : BG_MID;
s.addShape(pres.shapes.RECTANGLE, {
x: 0.2, y, w: SLIDE_W - 0.4, h: rowH - 0.04,
fill: { color: rowBg }, line: { type: "none" }
});
s.addText(row.label, {
x: 0.25, y, w: 1.75, h: rowH - 0.04,
fontSize: 11, bold: true, color: MUTED,
fontFace: "Calibri", valign: "middle"
});
colX.forEach((cx, ci) => {
s.addText(row.vals[ci], {
x: cx, y, w: colW, h: rowH - 0.04,
fontSize: 10.5, color: LIGHT,
fontFace: "Calibri", valign: "middle", align: "center"
});
});
});
}
// ─────────────────────────────────────────────
// SLIDE 7 — HISTAMINE ROLE ACROSS ALL THREE
// ─────────────────────────────────────────────
{
const s = pres.addSlide();
addDarkBg(s);
// Title bar
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: SLIDE_W, h: 1.0,
fill: { color: "142030" }, line: { type: "none" }
});
s.addText("The Role of Histamine", {
x: 0.4, y: 0.08, w: 9, h: 0.55,
fontSize: 30, bold: true, color: WHITE, fontFace: "Calibri"
});
s.addText("How histamine connects all three headache types", {
x: 0.4, y: 0.63, w: 9, h: 0.3,
fontSize: 13, color: MUTED, italic: true, fontFace: "Calibri"
});
// Three panels
const panels = [
{
title: "Histamine Headache",
color: ACCENT1, textColor: BG_DARK,
x: 0.25, y: 1.1, w: 4.0, h: 5.9,
content: [
"PRIMARY driver of headache",
"",
"• H1 receptor activation on cerebral and meningeal blood vessels",
"• Direct vasodilation causes wall stretching and throbbing pain",
"• Reduced DAO enzyme → histamine builds up in blood",
"• Dietary histamine overload as trigger",
"• Mast cell activation with histamine release",
"• Estrogen stimulates mast cell degranulation",
"",
"Antihistamine = definitive treatment"
]
},
{
title: "Migraine",
color: ACCENT2, textColor: BG_DARK,
x: 4.5, y: 1.1, w: 4.0, h: 5.9,
content: [
"CONTRIBUTING factor",
"",
"• Histamine infusion triggers migraine in 96% of migraineurs",
"• Mast cell activation in trigeminovascular system",
"• Histamine modulates CGRP release",
"• Some patients partially respond to antihistamines",
"• Red wine (histamine + tyramine) is a known trigger",
"• Not the primary mechanism — serotonin/CGRP dominate",
"",
"Antihistamine = partial/adjunctive role"
]
},
{
title: "Cluster Headache",
color: ACCENT3, textColor: WHITE,
x: 8.75, y: 1.1, w: 4.3, h: 5.9,
content: [
"HISTORICAL link (not primary)",
"",
"• Horton (1939): IV histamine reproduced cluster attacks",
"• Named 'histamine headache' historically",
"• Now understood as hypothalamic/trigeminoautonomic",
"• Histamine not a primary pathophysiological driver",
"• Alcohol (triggers histamine release) is a trigger",
"• Antihistamines not effective treatment",
"",
"Antihistamine = NOT standard treatment"
]
}
];
panels.forEach(p => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: p.x, y: p.y, w: p.w, h: p.h,
fill: { color: p.color }, line: { type: "none" }, rectRadius: 0.12
});
s.addText(p.title, {
x: p.x + 0.15, y: p.y + 0.1, w: p.w - 0.3, h: 0.45,
fontSize: 15, bold: true, color: p.textColor, fontFace: "Calibri", align: "center"
});
s.addShape(pres.shapes.RECTANGLE, {
x: p.x + 0.15, y: p.y + 0.6, w: p.w - 0.3, h: 0.02,
fill: { color: p.textColor, transparency: 50 }, line: { type: "none" }
});
const textItems = p.content.map((line, idx) => {
if (line === "") return { text: " ", options: { breakLine: true, fontSize: 6 } };
if (line.startsWith("•")) return {
text: line.substring(2),
options: { bullet: { indent: 12 }, breakLine: true, fontSize: 10.5, color: idx === 0 ? p.textColor : (p.textColor === BG_DARK ? "1A2E45" : "CCDDE8") }
};
return {
text: line,
options: { breakLine: true, fontSize: idx === 0 ? 11.5 : 10.5, bold: idx === 0, color: p.textColor }
};
});
s.addText(textItems, {
x: p.x + 0.18, y: p.y + 0.72, w: p.w - 0.36, h: p.h - 0.85,
fontFace: "Calibri", valign: "top"
});
});
}
// ─────────────────────────────────────────────
// SLIDE 8 — TREATMENT SUMMARY COMPARISON
// ─────────────────────────────────────────────
{
const s = pres.addSlide();
addMidBg(s);
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: SLIDE_W, h: 1.0,
fill: { color: "0D1B2A" }, line: { type: "none" }
});
s.addText("Treatment Summary", {
x: 0.4, y: 0.12, w: 9, h: 0.52,
fontSize: 30, bold: true, color: WHITE, fontFace: "Calibri"
});
s.addText("What works — and why", {
x: 0.4, y: 0.62, w: 6, h: 0.3,
fontSize: 13, color: MUTED, italic: true, fontFace: "Calibri"
});
const txCols = [
{
title: "Histamine Headache",
color: ACCENT1, textColor: BG_DARK,
x: 0.25, w: 4.0,
acute: ["Levocetirizine 5 mg PO", "Cetirizine 10 mg PO", "Fexofenadine 120–180 mg"],
prevent: ["Daily antihistamine", "Low-histamine diet", "DAO enzyme supplementation", "Avoid trigger foods/allergens"],
avoid: ["Fermented/histamine-rich foods", "Red wine", "NSAIDs (can increase histamine)"]
},
{
title: "Migraine",
color: ACCENT2, textColor: BG_DARK,
x: 4.5, w: 4.0,
acute: ["Triptans (sumatriptan, rizatriptan)", "NSAIDs + antiemetic", "Gepants (rimegepant)", "Ergotamines (second-line)"],
prevent: ["Topiramate", "Propranolol / metoprolol", "Amitriptyline", "CGRP mAbs (erenumab)"],
avoid: ["Caffeine overuse", "Sleep irregularity", "Known personal triggers"]
},
{
title: "Cluster Headache",
color: ACCENT3, textColor: WHITE,
x: 8.75, w: 4.3,
acute: ["O₂: 100% at 8–12 L/min", "Sumatriptan 6 mg SC", "Zolmitriptan intranasal", "Lidocaine intranasal"],
prevent: ["Verapamil (first choice)", "Topiramate / divalproex", "Lithium (chronic type)", "Suboccipital steroid block"],
avoid: ["Alcohol (absolute during cluster)", "Vasodilators (nitroglycerin)", "Afternoon naps"]
}
];
txCols.forEach(col => {
// Header
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: col.x, y: 1.08, w: col.w, h: 0.44,
fill: { color: col.color }, line: { type: "none" }, rectRadius: 0.06
});
s.addText(col.title, {
x: col.x, y: 1.08, w: col.w, h: 0.44,
fontSize: 13, bold: true, color: col.textColor, align: "center",
fontFace: "Calibri", valign: "middle", margin: 0
});
// Acute
s.addText("Acute Treatment", {
x: col.x + 0.1, y: 1.62, w: col.w - 0.2, h: 0.3,
fontSize: 11, bold: true, color: col.color, fontFace: "Calibri"
});
s.addShape(pres.shapes.RECTANGLE, {
x: col.x, y: 1.94, w: col.w, h: col.acute.length * 0.32 + 0.12,
fill: { color: "122030" }, line: { color: col.color, pt: 0.8 }
});
s.addText(col.acute.map(a => ({ text: a, options: { bullet: { indent: 10 }, breakLine: true } })), {
x: col.x + 0.12, y: 1.97, w: col.w - 0.24, h: col.acute.length * 0.32,
fontSize: 10.5, color: LIGHT, fontFace: "Calibri"
});
const acuteBottom = 1.94 + col.acute.length * 0.32 + 0.22;
// Preventive
s.addText("Preventive Treatment", {
x: col.x + 0.1, y: acuteBottom, w: col.w - 0.2, h: 0.3,
fontSize: 11, bold: true, color: col.color, fontFace: "Calibri"
});
s.addShape(pres.shapes.RECTANGLE, {
x: col.x, y: acuteBottom + 0.32, w: col.w, h: col.prevent.length * 0.32 + 0.12,
fill: { color: "122030" }, line: { color: col.color, pt: 0.8 }
});
s.addText(col.prevent.map(a => ({ text: a, options: { bullet: { indent: 10 }, breakLine: true } })), {
x: col.x + 0.12, y: acuteBottom + 0.35, w: col.w - 0.24, h: col.prevent.length * 0.32,
fontSize: 10.5, color: LIGHT, fontFace: "Calibri"
});
const prevBottom = acuteBottom + 0.32 + col.prevent.length * 0.32 + 0.28;
// Avoid
s.addText("What to Avoid", {
x: col.x + 0.1, y: prevBottom, w: col.w - 0.2, h: 0.3,
fontSize: 11, bold: true, color: col.color, fontFace: "Calibri"
});
s.addShape(pres.shapes.RECTANGLE, {
x: col.x, y: prevBottom + 0.32, w: col.w, h: col.avoid.length * 0.32 + 0.12,
fill: { color: "1E1020" }, line: { color: ACCENT3, pt: 0.6 }
});
s.addText(col.avoid.map(a => ({ text: a, options: { bullet: { indent: 10 }, breakLine: true } })), {
x: col.x + 0.12, y: prevBottom + 0.35, w: col.w - 0.24, h: col.avoid.length * 0.32,
fontSize: 10.5, color: LIGHT, fontFace: "Calibri"
});
});
}
// ─────────────────────────────────────────────
// SLIDE 9 — CLINICAL CASE CALLBACK (40F)
// ─────────────────────────────────────────────
{
const s = pres.addSlide();
addDarkBg(s);
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: SLIDE_W, h: 1.05,
fill: { color: ACCENT1 }, line: { type: "none" }
});
s.addText("Clinical Case", {
x: 0.4, y: 0.1, w: 9, h: 0.52,
fontSize: 28, bold: true, color: BG_DARK, fontFace: "Calibri"
});
s.addText("40-year-old female · Internal headache · Relief with levocetirizine", {
x: 0.4, y: 0.63, w: 12, h: 0.32,
fontSize: 13, italic: true, color: BG_MID, fontFace: "Calibri"
});
// Patient info box
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 0.25, y: 1.2, w: 4.0, h: 5.85,
fill: { color: "1A2E45" },
line: { color: ACCENT1, pt: 2 }, rectRadius: 0.1
});
s.addText("PRESENTATION", {
x: 0.4, y: 1.3, w: 3.7, h: 0.32,
fontSize: 10, bold: true, color: ACCENT1, fontFace: "Calibri", charSpacing: 3
});
s.addText([
{ text: "Age/Sex: ", options: { bold: true, color: ACCENT1 } },
{ text: "40-year-old female\n", options: { color: LIGHT } },
{ text: "Symptom: ", options: { bold: true, color: ACCENT1 } },
{ text: "Diffuse internal headache\n", options: { color: LIGHT } },
{ text: "Response: ", options: { bold: true, color: ACCENT1 } },
{ text: "Relieved by levocetirizine\n\n", options: { color: LIGHT } },
{ text: "Key clues:\n", options: { bold: true, color: ACCENT1 } },
{ text: "• H1-antihistamine relieves pain\n", options: { color: LIGHT } },
{ text: "• Diffuse (not strictly unilateral)\n", options: { color: LIGHT } },
{ text: "• No autonomic signs (rules out cluster)\n", options: { color: LIGHT } },
{ text: "• Female > male (fits migraine/histamine)\n", options: { color: LIGHT } },
{ text: "• Perimenstrual worsening possible\n\n", options: { color: LIGHT } },
{ text: "Ask about:\n", options: { bold: true, color: ACCENT1 } },
{ text: "• Dietary triggers (wine, cheese, fish)\n", options: { color: LIGHT } },
{ text: "• Nasal symptoms / allergy history\n", options: { color: LIGHT } },
{ text: "• Hormonal/menstrual pattern\n", options: { color: LIGHT } },
{ text: "• Flushing, urticaria episodes\n", options: { color: LIGHT } },
], {
x: 0.4, y: 1.68, w: 3.7, h: 5.1,
fontSize: 10.5, fontFace: "Calibri", valign: "top"
});
// Diagnosis boxes
const diags = [
{
rank: "1st", title: "Histamine Intolerance Headache",
color: ACCENT1, textColor: BG_DARK,
x: 4.5, y: 1.2, w: 8.55, h: 1.6,
text: "MOST LIKELY. Antihistamine relieves pain directly = H1-mediated vasodilation. Investigate: serum DAO levels, specific IgE, histamine-free diet trial. Levocetirizine 5 mg once daily is appropriate ongoing therapy."
},
{
rank: "2nd", title: "Allergic Rhinitis-Associated Headache",
color: "7EC8C8", textColor: BG_DARK,
x: 4.5, y: 3.0, w: 8.55, h: 1.5,
text: "LIKELY. Sinonasal mucosal congestion causes referred cranial pressure. Look for: nasal congestion, sneezing, itchy eyes. Levocetirizine + intranasal fluticasone if confirmed."
},
{
rank: "3rd", title: "Migraine with Histamine Sensitivity",
color: "4A9A9A", textColor: WHITE,
x: 4.5, y: 4.65, w: 8.55, h: 1.4,
text: "POSSIBLE. Some migraineurs respond partially to antihistamines. Investigate: full migraine history, ICHD-3 criteria, triptan trial. Not mutually exclusive with histamine intolerance."
},
{
rank: "Excluded", title: "Cluster Headache",
color: "2A1010", textColor: ACCENT3,
x: 4.5, y: 6.2, w: 8.55, h: 0.7,
text: "EXCLUDED. Wrong sex ratio; no unilateral orbital pain; no autonomic signs; responds to antihistamine (not standard for cluster)."
}
];
diags.forEach(d => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: d.x, y: d.y, w: d.w, h: d.h,
fill: { color: d.color }, line: { type: "none" }, rectRadius: 0.08
});
s.addText(`[${d.rank}] ${d.title}`, {
x: d.x + 0.12, y: d.y + 0.08, w: d.w - 0.24, h: 0.36,
fontSize: 12, bold: true, color: d.textColor, fontFace: "Calibri"
});
s.addText(d.text, {
x: d.x + 0.12, y: d.y + 0.44, w: d.w - 0.24, h: d.h - 0.52,
fontSize: 10, color: d.rank === "Excluded" ? ACCENT3 : BG_DARK, fontFace: "Calibri"
});
});
}
// ─────────────────────────────────────────────
// SLIDE 10 — CLOSING / KEY TAKEAWAYS
// ─────────────────────────────────────────────
{
const s = pres.addSlide();
addDarkBg(s);
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: SLIDE_W, h: 0.08,
fill: { color: ACCENT1 }, line: { type: "none" }
});
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: SLIDE_H - 0.08, w: SLIDE_W, h: 0.08,
fill: { color: ACCENT3 }, line: { type: "none" }
});
s.addText("Key Takeaways", {
x: 0.5, y: 0.35, w: SLIDE_W - 1, h: 0.65,
fontSize: 36, bold: true, color: WHITE, align: "center", fontFace: "Calibri"
});
const takes = [
{
num: "01", color: ACCENT1,
head: "Response to antihistamine is diagnostic",
body: "Headache that responds to levocetirizine or cetirizine is almost certainly histamine-mediated. This is a valuable clinical clue — treat it as such, not as a coincidence."
},
{
num: "02", color: ACCENT2,
head: "Migraine and histamine overlap",
body: "Histamine contributes to migraine but is not the primary driver. In female migraineurs with dietary triggers or perimenstrual pattern, histamine intolerance should be co-investigated."
},
{
num: "03", color: ACCENT3,
head: "Cluster headache is not antihistamine-responsive",
body: "Despite its historical name 'histamine headache,' modern cluster headache management relies on oxygen, triptans, and verapamil — not antihistamines."
},
{
num: "04", color: "AACCDD",
head: "Histamine intolerance is underdiagnosed",
body: "Low DAO enzyme activity, dietary histamine load, and hormonal fluctuations (estrogen-mast cell axis) converge — especially in women aged 30–50. Screen with diet trial and DAO levels."
}
];
takes.forEach((t, i) => {
const col = i < 2 ? 0 : 1;
const row = i % 2;
const x = 0.35 + col * 6.4;
const y = 1.2 + row * 2.85;
const w = 6.1;
const h = 2.55;
s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x, y, w, h,
fill: { color: "142030" },
line: { color: t.color, pt: 1.5 },
rectRadius: 0.1,
shadow: { type: "outer", color: "000000", blur: 10, offset: 2, angle: 135, opacity: 0.2 }
});
s.addShape(pres.shapes.OVAL, {
x: x + 0.15, y: y + 0.15, w: 0.52, h: 0.52,
fill: { color: t.color }, line: { type: "none" }
});
s.addText(t.num, {
x: x + 0.15, y: y + 0.15, w: 0.52, h: 0.52,
fontSize: 14, bold: true, color: BG_DARK, align: "center", valign: "middle",
fontFace: "Calibri", margin: 0
});
s.addText(t.head, {
x: x + 0.8, y: y + 0.18, w: w - 0.95, h: 0.46,
fontSize: 13, bold: true, color: t.color, fontFace: "Calibri"
});
s.addText(t.body, {
x: x + 0.18, y: y + 0.82, w: w - 0.36, h: 1.55,
fontSize: 11, color: LIGHT, fontFace: "Calibri"
});
});
}
// ─────────────────────────────────────────────
// WRITE FILE
// ─────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/headache-pptx/Headache_Comparison.pptx" })
.then(() => console.log("Done: Headache_Comparison.pptx"))
.catch(e => { console.error(e); process.exit(1); });
cd /home/daytona/workspace/headache-pptx && node build.js 2>&1
Headache Comparison
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide - bold dark navy with amber/teal/crimson accents |
| 2 | At-a-Glance comparison table (6 parameters across 3 headache types) |
| 3 | Histamine Headache - deep dive (pathophysiology, features, triggers, management) |
| 4 | Migraine - deep dive (CSD, CGRP, triptans, gepants, prophylaxis) |
| 5 | Cluster Headache - deep dive (hypothalamic, autonomic features, O₂/triptans) |
| 6 | Key Differentiators grid (pain quality, laterality, autonomic signs, antihistamine response) |
| 7 | The Role of Histamine across all three types |
| 8 | Treatment Summary - acute, preventive, and "what to avoid" for each type |
| 9 | Clinical Case callback - 40F with levocetirizine relief, differential diagnosis ranked |
| 10 | Key Takeaways (4 clinical pearls) |