Pt had htn with c/o burrning both feet finger overlaping
burning feet in hypertensive patient causes differential: diabetic neuropathy, Fabry, erythromelalgia, amlodipine, B12
"burning feet" OR "small fiber neuropathy" AND hypertension
Pt on temlikind amlo still bp not reduce
"resistant hypertension" AND "spironolactone"
Make a presentation on neuropathy causes in hypertensive patients
ls -la /tmp/workspace/ && mkdir -p /tmp/workspace/htn-neuropathy-ppt/output
~/htn-neuropathy-ppt/build.py
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.enum.shapes import MSO_SHAPE
from pptx.oxml.ns import qn
from lxml import etree
NAVY = RGBColor(0x0B, 0x25, 0x45)
TEAL = RGBColor(0x13, 0x8D, 0x90)
AMBER = RGBColor(0xE8, 0x9F, 0x2B)
RED = RGBColor(0xC0, 0x39, 0x2B)
LIGHT = RGBColor(0xF1, 0xF5, 0xF9)
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
TEXT = RGBColor(0x1F, 0x29, 0x33)
GREY = RGBColor(0x62, 0x6F, 0x7D)
FONT = "Calibri"
prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
BLANK = prs.slide_layouts[6]
warnings = []
def est_height(paras, width_in):
"""rough estimate of text height in inches"""
total = 0
for text, size in paras:
cpl = max(1, int(width_in * 72 / (size * 0.50)))
lines = max(1, -(-len(text) // cpl))
total += lines * size * 1.25 / 72 + 0.08
return total
def rect(slide, x, y, w, h, fill, line=None, shape=MSO_SHAPE.RECTANGLE):
s = slide.shapes.add_shape(shape, Inches(x), Inches(y), Inches(w), Inches(h))
s.fill.solid()
s.fill.fore_color.rgb = fill
if line is None:
s.line.fill.background()
else:
s.line.color.rgb = line
s.line.width = Pt(1)
s.shadow.inherit = False
return s
def set_bullet(p, char="•", indent=0.22):
pPr = p._p.get_or_add_pPr()
pPr.set("marL", str(int(Inches(indent))))
pPr.set("indent", str(-int(Inches(indent))))
for tag in ("a:buNone", "a:buChar"):
for e in pPr.findall(qn(tag)):
pPr.remove(e)
bu = etree.SubElement(pPr, qn("a:buChar"))
bu.set("char", char)
def text(slide, x, y, w, h, items, size=16, color=TEXT, bullet=False,
bold=False, align=PP_ALIGN.LEFT, anchor=MSO_ANCHOR.TOP, space=6, check=True):
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = True
tf.vertical_anchor = anchor
tf.margin_left = tf.margin_right = Inches(0.05)
tf.margin_top = tf.margin_bottom = Inches(0.03)
if isinstance(items, str):
items = [items]
est = []
for i, it in enumerate(items):
p = tf.paragraphs[0] if i == 0 else tf.add_paragraph()
p.alignment = align
p.space_after = Pt(space)
# allow (label, rest) tuples: bold label
if isinstance(it, tuple):
r1 = p.add_run()
r1.text = it[0]
r1.font.bold = True
r1.font.size = Pt(size)
r1.font.name = FONT
r1.font.color.rgb = color
r2 = p.add_run()
r2.text = it[1]
r2.font.size = Pt(size)
r2.font.name = FONT
r2.font.color.rgb = color
est.append((it[0] + it[1], size))
else:
r = p.add_run()
r.text = it
r.font.size = Pt(size)
r.font.bold = bold
r.font.name = FONT
r.font.color.rgb = color
est.append((it, size))
if bullet:
set_bullet(p)
if check:
eh = est_height(est, w - 0.3 if bullet else w - 0.1)
if eh > h:
warnings.append(f"slide {len(prs.slides)}: text may overflow ({eh:.1f} > {h:.1f}): {est[0][0][:40]}")
return tb
def base(title, kicker=None, source=None):
s = prs.slides.add_slide(BLANK)
rect(s, 0, 0, 13.333, 7.5, WHITE)
rect(s, 0, 0, 0.25, 7.5, TEAL)
if kicker:
text(s, 0.65, 0.35, 11, 0.35, kicker.upper(), size=13, color=TEAL, bold=True, check=False)
text(s, 0.65, 0.65, 12, 0.9, title, size=32, color=NAVY, bold=True, check=False)
if source:
text(s, 0.65, 6.95, 11.6, 0.4, "Source: " + source, size=11, color=GREY, check=False)
n = len(prs.slides)
text(s, 12.2, 6.95, 0.8, 0.4, str(n), size=11, color=GREY, align=PP_ALIGN.RIGHT, check=False)
return s
def card(slide, x, y, w, h, header, items, color=TEAL, size=15, hsize=17):
rect(slide, x, y, w, h, LIGHT)
rect(slide, x, y, w, 0.55, color)
text(slide, x + 0.1, y + 0.04, w - 0.2, 0.5, header, size=hsize, color=WHITE, bold=True,
anchor=MSO_ANCHOR.MIDDLE, check=False)
text(slide, x + 0.12, y + 0.68, w - 0.24, h - 0.78, items, size=size, bullet=True, space=5)
def table(slide, x, y, w, col_w, rows, size=14, header_fill=NAVY, row_h=0.55):
nrows, ncols = len(rows), len(rows[0])
gs = slide.shapes.add_table(nrows, ncols, Inches(x), Inches(y), Inches(w), Inches(row_h * nrows))
t = gs.table
for j, cw in enumerate(col_w):
t.columns[j].width = Inches(cw)
for i, row in enumerate(rows):
t.rows[i].height = Inches(row_h)
for j, val in enumerate(row):
c = t.cell(i, j)
c.fill.solid()
c.fill.fore_color.rgb = header_fill if i == 0 else (LIGHT if i % 2 else WHITE)
c.vertical_anchor = MSO_ANCHOR.MIDDLE
c.margin_left = c.margin_right = Inches(0.1)
tf = c.text_frame
tf.word_wrap = True
p = tf.paragraphs[0]
r = p.add_run()
r.text = val
r.font.size = Pt(size)
r.font.name = FONT
r.font.bold = (i == 0) or (j == 0)
r.font.color.rgb = WHITE if i == 0 else TEXT
cpl = int(col_w[j] * 72 / (size * 0.5))
if -(-len(val) // cpl) * size * 1.25 / 72 + 0.15 > row_h:
warnings.append(f"slide {len(prs.slides)}: table cell tall: {val[:30]}")
return t
def notes(slide, txt):
slide.notes_slide.notes_text_frame.text = txt
# ---------- 1. Title ----------
s = prs.slides.add_slide(BLANK)
rect(s, 0, 0, 13.333, 7.5, NAVY)
rect(s, 0.8, 2.2, 0.12, 2.3, AMBER)
text(s, 1.15, 2.1, 11, 1.6, "Neuropathy in Hypertensive Patients", size=44, color=WHITE, bold=True, check=False)
text(s, 1.15, 3.5, 11, 1.0,
"Causes, clinical clues and work-up of burning feet and other neuropathic symptoms",
size=22, color=RGBColor(0xC9, 0xD6, 0xE3), check=False)
text(s, 1.15, 6.4, 11, 0.5, "Based on standard neurology, nephrology and internal medicine textbooks",
size=14, color=RGBColor(0x9F, 0xB3, 0xC8), check=False)
notes(s, "Case prompt: hypertensive patient with bilateral burning feet, BP not controlled on telmisartan plus amlodipine. This deck covers why neuropathy and hypertension travel together.")
# ---------- 2. Why they travel together ----------
s = base("Why neuropathy and hypertension travel together", "Framework",
"Adams and Victor's Principles of Neurology 12e; Bradley and Daroff's Neurology in Clinical Practice")
text(s, 0.65, 1.55, 12, 0.9,
"Hypertension is rarely the sole cause of a peripheral neuropathy. The link usually runs through a shared disease, a target-organ complication or a drug. Finding the linked cause is the task.",
size=18, color=TEXT, check=False)
card(s, 0.65, 2.7, 3.9, 3.95, "1. Shared disease", [
"Diabetes and prediabetes",
"Metabolic syndrome: obesity, high triglycerides and hypertension are themselves risk factors for diabetic polyneuropathy",
"Chronic kidney disease",
], TEAL, size=15)
card(s, 4.72, 2.7, 3.9, 3.95, "2. Treatment effect", [
"Hydralazine: B6-responsive neuropathy",
"Dihydropyridine calcium channel blockers: erythromelalgia-like burning",
"Metformin co-therapy: B12 deficiency",
], AMBER, size=15)
card(s, 8.79, 2.7, 3.9, 3.95, "3. Hypertension as a feature", [
"Fabry disease",
"Systemic vasculitis (polyarteritis nodosa)",
"Acromegaly, polycythemia vera, erythromelalgia",
], NAVY, size=15)
notes(s, "The Adams and Victor statement about metabolic syndrome components, including hypertension, as risk factors for diabetic polyneuropathy refers to Tesfaye and colleagues.")
# ---------- 3. Pattern recognition ----------
s = base("Match the symptom pattern to the cause", "Clinical approach",
"Synthesis of cited textbook sections; patterns are general teaching points")
rows = [
["Pattern", "What it suggests", "Typical causes in a hypertensive patient"],
["Symmetric, distal, burning, worse at night", "Length-dependent small-fiber neuropathy", "Diabetes, B12 or B6 deficiency, CKD, hypothyroidism, alcohol"],
["Episodic burning with red, warm feet; eased by cooling", "Erythromelalgia", "Calcium channel blocker, polycythemia vera, secondary causes"],
["Attacks of pain triggered by heat, exercise or fever", "Acroparesthesia", "Fabry disease (check kidneys and cornea)"],
["Asymmetric, stepwise, foot or wrist drop", "Mononeuritis multiplex", "Vasculitis such as polyarteritis nodosa"],
["Hand tingling at night", "Median nerve entrapment", "Acromegaly, diabetes, obesity, hypothyroidism"],
]
table(s, 0.65, 1.7, 12.0, [3.8, 3.3, 4.9], rows, size=15, row_h=0.88)
# ---------- 4. Diabetes ----------
s = base("Diabetes and metabolic syndrome", "Cause 1: the commonest link",
"Adams and Victor's Principles of Neurology 12e, Diabetic Neuropathy; RACGP Burning feet syndrome")
text(s, 0.65, 1.65, 7.4, 5.0, [
("Most common cause ", "of symmetric burning feet. Hypertension and diabetes often coexist."),
("Risk factors: ", "triglycerides, body mass and hypertension are risk factors for diabetic polyneuropathy, independent of glycemic control."),
("Pattern: ", "distal, symmetric, small-fiber first. Burning, tingling and allodynia, often worse at night."),
("Prediabetes ", "can already produce painful small-fiber neuropathy."),
("Autonomic involvement ", "(orthostatic BP drop, supine hypertension) can make BP control harder."),
], size=17, bullet=True, space=10)
rect(s, 8.5, 1.75, 4.2, 4.7, LIGHT)
rect(s, 8.5, 1.75, 4.2, 0.55, TEAL)
text(s, 8.6, 1.79, 4.0, 0.5, "Tests", size=18, color=WHITE, bold=True, anchor=MSO_ANCHOR.MIDDLE, check=False)
text(s, 8.65, 2.5, 3.9, 3.8, [
"Fasting glucose and HbA1c",
"OGTT if borderline",
"Vitamin B12 if on metformin",
"Monofilament, vibration and pinprick on exam",
"Nerve conduction studies may be normal in pure small-fiber disease",
], size=16, bullet=True, space=8)
# ---------- 5. CKD ----------
s = base("Chronic kidney disease", "Cause 2: hypertension as cause and consequence",
"Goldman-Cecil Medicine, CKD clinical disorders table; Brenner and Rector's The Kidney, Uremic Polyneuropathy")
text(s, 0.65, 1.65, 7.4, 5.0, [
("Mechanism: ", "toxicity from retained solutes causes peripheral neuropathy, mainly at advanced stages (G5)."),
("Hyperkalemic depolarization ", "has been proposed as a contributor rather than middle molecules alone."),
("Dialysis patients ", "may develop burning feet, possibly from associated nutritional deficiency."),
("Why it matters here: ", "uncontrolled hypertension may be renal in origin, and CKD changes drug choices such as spironolactone."),
], size=17, bullet=True, space=10)
rect(s, 8.5, 1.75, 4.2, 4.7, LIGHT)
rect(s, 8.5, 1.75, 4.2, 0.55, NAVY)
text(s, 8.6, 1.79, 4.0, 0.5, "Check", size=18, color=WHITE, bold=True, anchor=MSO_ANCHOR.MIDDLE, check=False)
text(s, 8.65, 2.5, 3.9, 3.8, [
"Creatinine and eGFR",
"Urine albumin to creatinine ratio",
"Electrolytes, especially potassium",
"CBC for anemia",
"Use caution with NSAIDs given for foot pain",
], size=16, bullet=True, space=8)
# ---------- 6. Drugs ----------
s = base("Drug-related neuropathy in treated hypertension", "Cause 3: look at the medication list",
"Bradley and Daroff's (Hydralazine); Goodman and Gilman's (Toxicity); Adams and Victor's (Drug-Induced Neuropathies)")
card(s, 0.65, 1.7, 4.0, 4.95, "Hydralazine", [
"Distal tingling and numbness in about 15% of patients",
"Mechanism: binds pyridoxine to form a hydrazone, causing B6 deficiency",
"Uncommon at 200 mg/day or less",
"Improves after withdrawal; pyridoxine helps",
"Very high-dose pyridoxine can itself cause a sensory ganglionopathy",
], RED, size=14)
card(s, 4.85, 1.7, 3.85, 4.95, "Dihydropyridine CCBs", [
"Amlodipine, nifedipine",
"Reported to trigger erythromelalgia-like burning, redness and warmth, plus ankle edema",
"Evidence is mostly case reports",
"Consider a switch of class if symptoms began after starting",
], AMBER, size=14)
card(s, 8.9, 1.7, 3.8, 4.95, "Co-prescribed drugs", [
"Metformin: B12 deficiency can add to diabetic neuropathy",
"NSAIDs for pain raise BP and blunt ARBs",
"Duloxetine and tricyclics for pain can raise BP",
"Telmisartan has no well-known direct neuropathy",
], NAVY, size=14)
notes(s, "The calcium channel blocker erythromelalgia point comes from general medical knowledge and case reports, not from the cited textbook passages. Metformin and B12 comes from NIDDK-sourced web material.")
# ---------- 7. Fabry ----------
s = base("Fabry disease", "Cause 4: burning pain, kidneys and blood pressure together",
"Bradley and Daroff's; Harrison's 22e (Fabry Disease); Goldman-Cecil Medicine; Sleisenger and Fordtran's")
text(s, 0.65, 1.65, 7.4, 5.0, [
("Defect: ", "X-linked deficiency of lysosomal alpha-galactosidase A; glycosphingolipid deposits in endothelium and smooth muscle."),
("Neuropathy: ", "painful peripheral neuropathy and acroparesthesia lasting minutes to days, triggered by temperature change, exercise, fatigue or fever."),
("Other features: ", "renal disease, hypertension, cardiomegaly, autonomic dysfunction, angiokeratoma, anhidrosis."),
("Eye clue: ", "corneal and lenticular lesions on slit-lamp examination."),
], size=17, bullet=True, space=10)
rect(s, 8.5, 1.75, 4.2, 4.7, LIGHT)
rect(s, 8.5, 1.75, 4.2, 0.55, AMBER)
text(s, 8.6, 1.79, 4.0, 0.5, "Think of it when", size=18, color=WHITE, bold=True, anchor=MSO_ANCHOR.MIDDLE, check=False)
text(s, 8.65, 2.5, 3.9, 3.8, [
"Young onset burning hands and feet",
"Hypertension with proteinuria or CKD",
"Family history of renal or cardiac disease",
"Confirm with alpha-galactosidase A activity and GLA gene testing",
"Enzyme replacement (agalsidase) is available",
], size=16, bullet=True, space=8)
# ---------- 8. Vasculitis ----------
s = base("Vasculitic neuropathy", "Cause 5: the one not to miss",
"Goldman-Cecil Medicine (Medium-Vessel Vasculitides); Bradley and Daroff's; Dermatology 5e")
text(s, 0.65, 1.65, 7.4, 5.0, [
("Polyarteritis nodosa: ", "more than 80% in some series have vasculitic neuropathy, typically mononeuritis multiplex."),
("Hypertension: ", "renal artery involvement causes renovascular hypertension and renal failure."),
("Systemic signs: ", "fever, malaise, weight loss and hypertension; neuropathy is often the first manifestation."),
("Connective tissue disease: ", "rheumatoid vasculitis is the most common cause of vasculitic neuropathy in that group."),
], size=17, bullet=True, space=10)
rect(s, 8.5, 1.75, 4.2, 4.7, LIGHT)
rect(s, 8.5, 1.75, 4.2, 0.55, RED)
text(s, 8.6, 1.79, 4.0, 0.5, "Red flags and tests", size=18, color=WHITE, bold=True, anchor=MSO_ANCHOR.MIDDLE, check=False)
text(s, 8.65, 2.5, 3.9, 3.8, [
"Asymmetric, acute or stepwise deficits",
"Painful foot or wrist drop",
"Constitutional symptoms, abdominal pain",
"ESR, CRP, ANCA, ANA, RF, hepatitis B and C",
"Nerve and muscle biopsy for confirmation",
], size=16, bullet=True, space=8)
# ---------- 9. Other contributors ----------
s = base("Other conditions linking hypertension and neuropathy", "Cause 6: less common contributors",
"Mulholland and Greenfield's Surgery; Bradley and Daroff's; Fitzpatrick's Dermatology; Adams and Victor's")
rows = [
["Condition", "Hypertension link", "Neuropathic feature"],
["Acromegaly", "Higher rates of hypertension and diabetes", "Carpal tunnel syndrome"],
["Polycythemia vera", "Raised hematocrit; secondary erythromelalgia", "Burning feet, water-triggered itch"],
["Erythromelalgia", "Listed with atherosclerosis and hypertension", "Burning pain, redness and warmth of feet"],
["Amyloidosis", "Cardiac and renal involvement", "Painful small-fiber and autonomic neuropathy"],
["Hypothyroidism", "Diastolic hypertension", "Burning feet, entrapment neuropathy"],
["Alcohol and malnutrition", "Alcohol raises BP", "Length-dependent painful neuropathy, B-vitamin deficiency"],
]
table(s, 0.65, 1.7, 12.0, [3.0, 4.4, 4.6], rows, size=15, row_h=0.72)
# ---------- 10. Work-up ----------
s = base("Practical work-up", "Putting it together",
"Synthesis of cited textbook content; tailor to the individual patient")
rows = [
["Step", "What to do"],
["1. History", "Drug list with start dates, alcohol, diet, family history, symptom timing and triggers"],
["2. Examination", "Pinprick, temperature, vibration, ankle reflexes, pulses, skin color, foot deformity, corneas and skin"],
["3. First-line labs", "Glucose, HbA1c, B12, CBC, TSH, creatinine and eGFR, electrolytes, LFTs, urine protein"],
["4. If unexplained", "SPEP, ESR and CRP, ANCA, alpha-galactosidase A, skin biopsy for small fibers"],
["5. Neurophysiology", "Nerve conduction studies and EMG for large-fiber or asymmetric disease"],
]
table(s, 0.65, 1.7, 12.0, [2.8, 9.2], rows, size=16, row_h=0.82)
# ---------- 11. Management ----------
s = base("Management principles", "What to do next",
"Synthesis of cited textbook content and standard practice; follow local guidelines")
card(s, 0.65, 1.7, 5.9, 4.95, "Treat the cause", [
"Optimize glucose control in diabetes",
"Replace B12, B6 or other deficient vitamins",
"Review hydralazine and calcium channel blocker use",
"Manage CKD and secondary hypertension",
"Refer for vasculitis or Fabry disease",
], TEAL, size=16)
card(s, 6.8, 1.7, 5.9, 4.95, "Control symptoms and BP", [
"Pain options: duloxetine, pregabalin, gabapentin, amitriptyline, topical capsaicin or lidocaine",
"Check pain drugs for BP effects and edema",
"Escalate BP therapy stepwise: thiazide-like diuretic, then spironolactone",
"Foot care and footwear advice",
], NAVY, size=16)
# ---------- 12. Takeaways ----------
s = base("Key takeaways", "Summary")
items = [
"Hypertension is usually linked to neuropathy through diabetes, CKD, drugs or a systemic disease.",
"Bilateral burning feet: check glucose, B12, kidney function and thyroid first.",
"Review the antihypertensive list: hydralazine (B6) and amlodipine (erythromelalgia-like) can contribute.",
"Painful neuropathy with hypertension and kidney disease: think Fabry disease.",
"Asymmetric, stepwise deficits with hypertension: think vasculitis.",
"Treat the cause, then the symptoms.",
]
y = 1.7
for i, it in enumerate(items):
rect(s, 0.65, y, 0.55, 0.55, TEAL, shape=MSO_SHAPE.OVAL)
text(s, 0.65, y, 0.55, 0.55, str(i + 1), size=16, color=WHITE, bold=True, align=PP_ALIGN.CENTER,
anchor=MSO_ANCHOR.MIDDLE, check=False)
text(s, 1.4, y - 0.02, 11.2, 0.62, it, size=18, anchor=MSO_ANCHOR.MIDDLE)
y += 0.8
text(s, 0.65, 6.6, 12, 0.4,
"Educational summary. Doses and thresholds should follow local guidelines.", size=12, color=GREY, check=False)
out = "/tmp/workspace/htn-neuropathy-ppt/output/Neuropathy_in_Hypertensive_Patients.pptx"
prs.save(out)
print("saved", out)
print("\n".join(warnings) if warnings else "no overflow warnings")
cd /tmp/workspace/htn-neuropathy-ppt && python build.py
ls -la /tmp/workspace/htn-neuropathy-ppt/ /tmp/workspace/htn-neuropathy-ppt/output
cd /tmp/workspace/htn-neuropathy-ppt && python build.py
cd /tmp/workspace/htn-neuropathy-ppt && sed -i 's/text(s, 1.4, y - 0.02, 11.2, 0.62, it, size=18, anchor=MSO_ANCHOR.MIDDLE)/text(s, 1.4, y - 0.02, 11.4, 0.62, it, size=16, anchor=MSO_ANCHOR.MIDDLE)/; s/size=15, row_h=0.88)/size=15, row_h=0.82)/' build.py && python build.py && python - <<'EOF' from pptx import Presentation p=Presentation("/tmp/workspace/htn-neuropathy-ppt/output/Neuropathy_in_Hypertensive_Patients.pptx") print(len(p.slides.__iter__.__self__._sldIdLst)) for i,s in enumerate(p.slides,1): for sh in s.shapes: if sh.top+sh.height>p.slide_height+10 or sh.left+sh.width>p.slide_width+10: print("off-slide",i,sh.shape_type) EOF
Neuropathy in Hypertensive Patients
Presentation · PPTX