right funiculate epididymo architis , managment and rx including fever pain and swelling rx
epididymo-orchitis management treatment
PMID: 40698982
| Investigation | Purpose |
|---|---|
| Scrotal Doppler ultrasound | Confirms increased blood flow (rules out torsion which shows absent flow); 92-100% sensitivity for epididymo-orchitis |
| Urinalysis + urine culture | Pyuria, bacteriuria; obtain before antibiotics |
| Urethral swab + NAAT (PCR) | Detects N. gonorrhoeae and C. trachomatis |
| FBC | Leukocytosis confirms infection |
| STI screen | In all sexually active men |
If there is any clinical doubt distinguishing epididymo-orchitis from torsion - especially in adolescents - proceed to surgical scrotal exploration without delay. A missed torsion leads to testicular necrosis.
The 2024 European guideline (PMID 40698982) no longer recommends dual therapy with azithromycin unless cefixime is being substituted for ceftriaxone.
Oral antibiotic treatment should continue for at least 10 days or until inflammation has fully subsided. - Bailey & Love's, p. 1589
| Severity | Management |
|---|---|
| Mild fever (<38.5°C) | Oral NSAIDs (ibuprofen 400-600 mg TDS with food) or paracetamol 1 g QDS |
| High fever (>38.5°C) or rigors | Admit for IV antibiotics + IV fluids for hydration |
| Septic presentation (high fever, tachycardia, hypotension) | ICU-level care, blood cultures, broad-spectrum IV antibiotics (e.g. piperacillin-tazobactam), consider source control |
"Local measures including scrotal support and analgesia are helpful." - Bailey & Love's Short Practice of Surgery 28th ed., p. 1589
"Bed rest, scrotal elevation, and the use of nonsteroidal anti-inflammatory agents are helpful in reducing the duration of symptoms." - Smith & Tanagho's General Urology 19th ed., p. 234
| Complication | Management |
|---|---|
| Scrotal abscess | Surgical incision and drainage; IV antibiotics |
| Testicular infarction | Urgent surgical exploration; possible orchiectomy |
| Testicular atrophy | Long-term follow-up; fertility counselling |
| Chronic epididymitis | Quinolones or doxycycline 4-6 weeks; consider epididymectomy if refractory |
| Infertility | Semen analysis at follow-up if bilateral involvement |
| Element | Treatment |
|---|---|
| Antibiotics (STI) | Ceftriaxone 1 g IM stat + Doxycycline 100 mg BD x 10-14 days |
| Antibiotics (enteric) | Levofloxacin 500 mg OD x 10-14 days |
| Antibiotics (mixed) | Ceftriaxone 1 g IM + Levofloxacin 500 mg OD x 10 days |
| IV antibiotics (severe) | Ceftriaxone IV +/- Gentamicin or Ciprofloxacin IV |
| Fever | NSAIDs (ibuprofen) or paracetamol; IV fluids if admitted |
| Pain | NSAIDs → paracetamol → opioids; ice packs; spermatic cord block |
| Swelling | Scrotal support + elevation, ice packs, NSAIDs, bed rest |
| Abscess | Surgical drainage |
| Duration | Minimum 10 days antibiotics; until inflammation resolved |
elevated TSH (7.44 mIU/L) + OLIGOZOOSPERMIA WITH IMPAIRMENT OF MOTILITY
hypothyroidism oligozoospermia male infertility TSH
thyroid hormone male fertility spermatogenesis
subclinical hypothyroidism sperm quality levothyroxine treatment
hypothyroidism levothyroxine sperm parameters male fertility improvement
"Both elevated and depressed levels of thyroid hormone can impair spermatogenesis. Replacement or removal of low or excessive thyroid hormone is effective treatment for infertility." - Smith & Tanagho's General Urology 19th Ed.
"Euthyroidism is important for normal hypothalamic hormone secretion and for normal sex hormone-binding protein levels that govern the testosterone:estrogen ratio." - Smith & Tanagho's, p. 234
| Test | Purpose |
|---|---|
| Free T4 (fT4) | Distinguish overt (low fT4) from subclinical (normal fT4) hypothyroidism |
| Anti-TPO antibodies | Autoimmune (Hashimoto's) vs other cause |
| Anti-thyroglobulin antibodies | Additional autoimmune marker |
| Repeat TSH after 4-6 weeks | Confirm persistently elevated TSH before treating |
| Test | Purpose |
|---|---|
| Semen analysis x2 (WHO 2021 criteria) | Confirm oligozoospermia + assess motility grades |
| Serum FSH, LH | Classify: secondary hypogonadism (low/normal FSH+LH) vs primary testicular failure (elevated FSH) |
| Total testosterone (morning sample) | Assess androgen status |
| Free testosterone / SHBG | Assess bioavailable androgen given SHBG disruption by hypothyroidism |
| Prolactin | Exclude concomitant hyperprolactinemia (also causes oligospermia) |
| Scrotal Doppler ultrasound | Exclude varicocele, assess testicular volume |
| Estradiol (E2) | Elevated if SHBG is low and aromatase activity is increased |
| Parameter | Detail |
|---|---|
| Starting dose | 25-50 mcg/day (start low in older patients or those with cardiac disease) |
| Usual full replacement | 1.6 mcg/kg/day (e.g., ~100-125 mcg/day for 70 kg man) |
| Target TSH | 0.5-2.5 mIU/L (lower end of normal for fertility purposes) |
| Monitoring | Recheck TSH at 6-8 weeks, then every 6-12 months once stable |
| Administration | Fasting, 30-60 min before breakfast; separate from calcium, iron, antacids |
| Sperm count | Motility | ART approach |
|---|---|---|
| 15-20 × 10⁶/mL, normal motility | Mild | Expectant management initially |
| 10-15 × 10⁶/mL, 20-40% motility | Moderate | IUI ± ovulation induction in partner |
| <10 × 10⁶/mL, <10% motility | Severe | IVF + ICSI |
| Factor | Recommendation |
|---|---|
| Scrotal temperature | Avoid hot baths, tight underwear, prolonged laptop use |
| Smoking | Cessation - directly impairs sperm motility |
| Alcohol | Limit to <14 units/week |
| BMI | Target 20-25 - obesity worsens hypothyroidism and reduces SHBG further |
| Exercise | Moderate aerobic exercise - improves testosterone, reduces estrogen |
| Stress | Reduce - elevated cortisol suppresses GnRH |
| Timing of intercourse | Every 2-3 days around ovulation window of partner |
TSH 7.44 → Check fT4 + anti-TPO
↓
Confirm hypothyroidism → Start Levothyroxine
↓
Target TSH 0.5-2.5 mIU/L
↓
Repeat semen analysis at 3-6 months
↓
Normalized? → Continue monitoring, attempt natural conception
Not normalized? → FSH/LH/testosterone workup → Empiric therapy (clomiphene/hCG)
± ART (IUI → IVF/ICSI based on severity)
PREPARE A FULL Summary Algorithm FLOW CHART
mkdir -p /tmp/workspace/flowchart && ls /tmp/workspace/flowchart
~/flowchart/generate_flowchart.py
from PIL import Image, ImageDraw, ImageFont
import os
# Canvas settings
W, H = 1400, 2900
bg = (250, 252, 255)
img = Image.new("RGB", (W, H), bg)
draw = ImageDraw.Draw(img)
# ── colour palette ──────────────────────────────────────────────
C_TITLE = (15, 78, 153) # deep blue – title bar
C_START = (15, 78, 153) # dark blue – start/end ovals
C_DIAG = (34, 139, 230) # mid blue – diagnostic boxes
C_DECISION = (255, 160, 20) # amber – diamond decisions
C_TREAT = (39, 174, 96) # green – treatment boxes
C_WARN = (220, 60, 60) # red – warning / urgent
C_ART = (142, 68, 173) # purple – ART options
C_LIFE = (22, 160, 133) # teal – lifestyle
C_ARROW = (60, 60, 80) # dark grey – arrows
C_WHITE = (255, 255, 255)
C_DARK = (30, 30, 50)
C_BORDER_D = (200, 140, 0) # dark amber border
C_BORDER_W = (200, 40, 40) # dark red border
C_SHADOW = (180, 190, 210) # shadow
# ── font loading (fall back to default) ─────────────────────────
def load_font(size, bold=False):
paths = [
f"/usr/share/fonts/truetype/dejavu/DejaVuSans{'-Bold' if bold else ''}.ttf",
f"/usr/share/fonts/truetype/liberation/LiberationSans{'-Bold' if bold else '-Regular'}.ttf",
"/usr/share/fonts/truetype/freefont/FreeSans.ttf",
]
for p in paths:
if os.path.exists(p):
return ImageFont.truetype(p, size)
return ImageFont.load_default()
fT = load_font(28, bold=True) # title
fB = load_font(21, bold=True) # bold body
fR = load_font(19) # regular body
fS = load_font(16) # small label
fXS = load_font(14) # tiny
# ── helpers ──────────────────────────────────────────────────────
def shadow_rect(x1,y1,x2,y2, offset=4):
draw.rounded_rectangle([x1+offset, y1+offset, x2+offset, y2+offset],
radius=12, fill=C_SHADOW)
def box(x1,y1,x2,y2, fill, border, radius=12, width=3):
shadow_rect(x1,y1,x2,y2)
draw.rounded_rectangle([x1,y1,x2,y2], radius=radius, fill=fill, outline=border, width=width)
def oval(x1,y1,x2,y2, fill, border, width=3):
draw.ellipse([x1+4,y1+4,x2+4,y2+4], fill=C_SHADOW)
draw.ellipse([x1,y1,x2,y2], fill=fill, outline=border, width=width)
def diamond(cx, cy, hw, hh, fill, border, width=3):
pts = [(cx, cy-hh),(cx+hw, cy),(cx, cy+hh),(cx-hw, cy)]
off = [(p[0]+4, p[1]+4) for p in pts]
draw.polygon(off, fill=C_SHADOW)
draw.polygon(pts, fill=fill, outline=border)
draw.line(pts + [pts[0]], fill=border, width=width)
def arrow(x1,y1,x2,y2, label="", colour=C_ARROW):
draw.line([(x1,y1),(x2,y2)], fill=colour, width=3)
# arrowhead
import math
angle = math.atan2(y2-y1, x2-x1)
size = 12
for a in [angle+0.4, angle-0.4]:
draw.line([(x2,y2),(int(x2-size*math.cos(a)), int(y2-size*math.sin(a)))],
fill=colour, width=3)
if label:
mx, my = (x1+x2)//2, (y1+y2)//2
draw.text((mx+5, my-20), label, font=fS, fill=colour)
def centred(text, cx, cy, font, colour=C_DARK):
bbox = draw.textbbox((0,0), text, font=font)
tw = bbox[2]-bbox[0]; th = bbox[3]-bbox[1]
draw.text((cx - tw//2, cy - th//2), text, font=font, fill=colour)
def multiline_centred(lines, cx, top_y, font, colour=C_DARK, line_gap=6):
lh = draw.textbbox((0,0),"Ag",font=font)[3] + line_gap
for i,line in enumerate(lines):
centred(line, cx, top_y + i*lh, font, colour)
return top_y + len(lines)*lh
def multiline_left(lines, lx, top_y, font, colour=C_DARK, line_gap=4):
lh = draw.textbbox((0,0),"Ag",font=font)[3] + line_gap
for i,line in enumerate(lines):
draw.text((lx, top_y + i*lh), line, font=font, fill=colour)
return top_y + len(lines)*lh
# ════════════════════════════════════════════════════════════════
# TITLE BAR
# ════════════════════════════════════════════════════════════════
draw.rectangle([0,0,W,80], fill=C_TITLE)
centred("ELEVATED TSH (7.44 mIU/L) + OLIGOZOOSPERMIA WITH IMPAIRED MOTILITY", W//2, 27, fT, C_WHITE)
centred("Full Management & Treatment Algorithm", W//2, 58, fB, (180,220,255))
CX = W // 2 # centre x
# ════════════════════════════════════════════════════════════════
# NODE 1 – PRESENTATION
# ════════════════════════════════════════════════════════════════
y = 100
oval(CX-280, y, CX+280, y+60, C_START, (10,50,120))
multiline_centred(["PATIENT PRESENTATION: Male • TSH 7.44 mIU/L • Oligozoospermia + Impaired Motility"], CX, y+30, fB, C_WHITE)
# ════════════════════════════════════════════════════════════════
# NODE 2 – INITIAL WORKUP
# ════════════════════════════════════════════════════════════════
y2 = 200
arrow(CX, y+60, CX, y2)
box(CX-360, y2, CX+360, y2+140, (235,245,255), C_DIAG)
centred("STEP 1 — INITIAL INVESTIGATIONS", CX, y2+18, fB, C_DIAG)
draw.line([(CX-340, y2+34),(CX+340, y2+34)], fill=C_DIAG, width=2)
cols = [
["THYROID PANEL", "• Free T4 (fT4)", "• Anti-TPO antibodies", "• Anti-Tg antibodies", "• Repeat TSH 4-6 wks"],
["HORMONAL PANEL", "• FSH • LH", "• Total testosterone (AM)", "• Free T / SHBG", "• Prolactin • Estradiol"],
["SEMEN & IMAGING", "• Semen analysis ×2", " (WHO 2021 criteria)", "• Scrotal Doppler US", "• Testicular volume"],
]
col_w = 220
for i,col in enumerate(cols):
lx = CX - 330 + i*col_w
draw.text((lx, y2+42), col[0], font=fB, fill=C_DIAG)
for j,line in enumerate(col[1:]):
draw.text((lx, y2+62+j*19), line, font=fR, fill=C_DARK)
# ════════════════════════════════════════════════════════════════
# DECISION 1 – fT4 status
# ════════════════════════════════════════════════════════════════
y3 = 380
arrow(CX, y2+140, CX, y3)
diamond(CX, y3+50, 240, 55, C_DECISION, C_BORDER_D, width=3)
centred("fT4 result?", CX, y3+50, fB, C_DARK)
# Branch LEFT – Overt hypothyroid
yL = y3+30
box(120, yL, 480, yL+80, (255,235,235), C_WARN, radius=10)
centred("OVERT HYPOTHYROIDISM", 300, yL+22, fB, C_WARN)
centred("Low fT4 + High TSH", 300, yL+48, fR, C_DARK)
centred("(TSH >10 or TSH 4-10 + low fT4)", 300, yL+68, fXS, C_DARK)
draw.line([(CX-240, y3+50),(300, y3+50)], fill=C_BORDER_D, width=3)
draw.text((CX-240+5, y3+35), "Low fT4", font=fS, fill=C_WARN)
arrow(300, y3+50, 300, yL)
# Branch RIGHT – Subclinical
box(920, yL, 1280, yL+80, (255,248,220), C_BORDER_D, radius=10)
centred("SUBCLINICAL HYPOTHYROIDISM", 1100, yL+22, fB, (160,100,0))
centred("Normal fT4 + High TSH", 1100, yL+48, fR, C_DARK)
centred("(TSH 4-10 mIU/L, fT4 normal)", 1100, yL+68, fXS, C_DARK)
draw.line([(CX+240, y3+50),(1100, y3+50)], fill=C_BORDER_D, width=3)
draw.text((CX+245, y3+35), "Normal fT4", font=fS, fill=(160,100,0))
arrow(1100, y3+50, 1100, yL)
# ════════════════════════════════════════════════════════════════
# NODE 3 – LEVOTHYROXINE TREATMENT (merge both branches)
# ════════════════════════════════════════════════════════════════
y4 = 520
arrow(300, yL+80, 300, y4+20); draw.line([(300,y4+20),(CX,y4+20)], fill=C_ARROW, width=3)
arrow(1100, yL+80, 1100, y4+20); draw.line([(1100,y4+20),(CX,y4+20)], fill=C_ARROW, width=3)
arrow(CX, y4+20, CX, y4+30)
box(CX-380, y4+30, CX+380, y4+200, (230,255,240), C_TREAT)
centred("STEP 2 — LEVOTHYROXINE (L-T4) REPLACEMENT", CX, y4+52, fB, C_TREAT)
draw.line([(CX-360, y4+68),(CX+360, y4+68)], fill=C_TREAT, width=2)
levo_lines = [
"Starting dose: 25–50 mcg/day (low start in elderly / cardiac disease)",
"Full replacement: ~1.6 mcg/kg/day (e.g. 100–125 mcg/day for 70 kg)",
"TARGET TSH: 0.5 – 2.5 mIU/L (lower-normal range for fertility purposes)",
"Administration: Fasting, 30–60 min before breakfast",
"Separate from: calcium, iron, antacids (by ≥4 hours)",
"Recheck TSH: at 6–8 weeks → adjust dose → stable every 6–12 months",
]
for i,ln in enumerate(levo_lines):
draw.text((CX-360, y4+78+i*20), " "+ln, font=fS, fill=C_DARK)
# ════════════════════════════════════════════════════════════════
# NODE 4 – TIMELINE
# ════════════════════════════════════════════════════════════════
y5 = y4+240
arrow(CX, y4+200, CX, y5)
box(CX-300, y5, CX+300, y5+70, (240,248,255), C_DIAG, radius=8)
centred("WAIT 3–6 MONTHS AFTER ACHIEVING EUTHYROIDISM", CX, y5+22, fB, C_DIAG)
centred("(One spermatogenic cycle ≈ 74 days | Full recovery up to 6–12 months)", CX, y5+50, fS, C_DARK)
# ════════════════════════════════════════════════════════════════
# NODE 5 – REPEAT SEMEN ANALYSIS
# ════════════════════════════════════════════════════════════════
y6 = y5+110
arrow(CX, y5+70, CX, y6)
box(CX-300, y6, CX+300, y6+55, (240,248,255), C_DIAG, radius=8)
centred("REPEAT SEMEN ANALYSIS ×2 (3–6 months post-euthyroidism)", CX, y6+18, fB, C_DIAG)
centred("WHO 2021: Count ≥16×10⁶/mL • Progressive motility ≥30% • Morphology ≥4%", CX, y6+42, fS, C_DARK)
# ════════════════════════════════════════════════════════════════
# DECISION 2 – Semen normalised?
# ════════════════════════════════════════════════════════════════
y7 = y6+100
arrow(CX, y6+55, CX, y7)
diamond(CX, y7+55, 200, 55, C_DECISION, C_BORDER_D, width=3)
centred("Semen parameters", CX, y7+45, fB, C_DARK)
centred("normalised?", CX, y7+65, fB, C_DARK)
# YES branch (LEFT)
yY = y7+35
box(80, yY, 430, yY+120, (220,255,230), C_TREAT, radius=10)
centred("NORMALISED ✓", 255, yY+22, fB, C_TREAT)
multiline_centred(
["• Continue Levothyroxine", "• Attempt natural conception", "• Optimise timing (every 2-3 days", " around ovulation window)", "• Follow-up semen analysis 6/12"],
255, yY+55, fS, C_DARK, line_gap=4)
draw.line([(CX-200, y7+55),(255, y7+55)], fill=C_BORDER_D, width=3)
draw.text((CX-195, y7+38), "YES", font=fB, fill=C_TREAT)
arrow(255, y7+55, 255, yY)
# NO branch (RIGHT) → further workup
yN_box = y7+10
box(970, yN_box, 1320, yN_box+100, (255,235,210), (200,100,0), radius=10)
centred("PERSISTING ABNORMALITY", 1145, yN_box+22, fB, (180,80,0))
multiline_centred(["Oligoasthenozoospermia persists","despite euthyroidism","→ Additional investigations"], 1145, yN_box+52, fS, C_DARK)
draw.line([(CX+200, y7+55),(1145, y7+55)], fill=C_BORDER_D, width=3)
draw.text((CX+205, y7+38), "NO", font=fB, fill=C_WARN)
arrow(1145, y7+55, 1145, yN_box)
# ════════════════════════════════════════════════════════════════
# NODE 6 – FSH/LH CLASSIFICATION (below NO branch, centred)
# ════════════════════════════════════════════════════════════════
y8 = y7+210
# connect NO box to centre
arrow(1145, yN_box+100, 1145, y8+30)
draw.line([(1145, y8+30),(CX, y8+30)], fill=C_ARROW, width=3)
arrow(CX, y8+30, CX, y8+40)
box(CX-400, y8+40, CX+400, y8+160, (245,240,255), (100,70,180))
centred("STEP 3 — CLASSIFY RESIDUAL HYPOGONADISM (FSH + LH + Testosterone)", CX, y8+60, fB, (80,50,160))
draw.line([(CX-380, y8+76),(CX+380, y8+76)], fill=(100,70,180), width=2)
class_cols = [
["SECONDARY (Pretesticular)", "Low/normal FSH + LH", "Low testosterone", "→ Pituitary / hypothalamic", "→ Treat with gonadotropins"],
["PRIMARY (Testicular)", "Elevated FSH", "Low/normal testosterone", "→ Testicular failure", "→ ART (IUI/IVF/ICSI)"],
["NORMOGONADOTROPHIC", "Normal FSH + LH", "Normal testosterone", "→ Idiopathic cause", "→ Empiric therapy"],
]
for i,col in enumerate(class_cols):
lx = CX - 380 + i*270
draw.text((lx, y8+84), col[0], font=fB, fill=(80,50,160))
for j,line in enumerate(col[1:]):
col_colour = C_TREAT if "Treat" in line or "ART" in line or "Empiric" in line else C_DARK
draw.text((lx, y8+104+j*17), line, font=fS, fill=col_colour)
# ════════════════════════════════════════════════════════════════
# NODE 7 – EMPIRIC MEDICAL THERAPY
# ════════════════════════════════════════════════════════════════
y9 = y8+240
arrow(CX, y8+160, CX, y9)
box(CX-400, y9, CX+400, y9+180, (230,255,240), C_TREAT)
centred("STEP 4 — EMPIRIC / HORMONAL MEDICAL THERAPY", CX, y9+18, fB, C_TREAT)
draw.line([(CX-380, y9+34),(CX+380, y9+34)], fill=C_TREAT, width=2)
med_left = [
("Clomiphene Citrate", "25–50 mg/day PO (antiestrogen)"),
("", "↑ GnRH → FSH/LH → testosterone"),
("", "For: low-normal FSH/LH + low-normal T"),
("hCG (Pregnyl)", "1,000–2,000 IU IM ×3/week"),
("", "↑ intratesticular testosterone"),
("+ rFSH", "75 IU SC ×2/week if FSH also low"),
]
med_right = [
("ANTIOXIDANTS (Adjunctive)", ""),
("CoQ10", "200–400 mg/day"),
("Vitamin E + C", "400 IU + 1,000 mg/day"),
("L-Carnitine", "2–3 g/day (sperm motility)"),
("Selenium", "100–200 mcg/day"),
("Zinc", "25–50 mg/day"),
]
for i,(a,b) in enumerate(med_left):
y_off = y9+44+i*19
if a: draw.text((CX-390, y_off), a+":", font=fB, fill=C_TREAT)
draw.text((CX-230, y_off), b, font=fS, fill=C_DARK)
for i,(a,b) in enumerate(med_right):
y_off = y9+44+i*19
if i==0:
draw.text((CX+10, y_off), a, font=fB, fill=C_LIFE)
else:
draw.text((CX+10, y_off), a+":", font=fB, fill=C_LIFE)
draw.text((CX+140, y_off), b, font=fS, fill=C_DARK)
# ════════════════════════════════════════════════════════════════
# NODE 8 – REASSESS (3 months)
# ════════════════════════════════════════════════════════════════
y10 = y9+220
arrow(CX, y9+180, CX, y10)
box(CX-280, y10, CX+280, y10+55, (240,248,255), C_DIAG, radius=8)
centred("REASSESS SEMEN ANALYSIS AT 3 MONTHS", CX, y10+18, fB, C_DIAG)
centred("Also check: FSH • LH • Testosterone • TSH • Prolactin", CX, y10+42, fS, C_DARK)
# ════════════════════════════════════════════════════════════════
# DECISION 3 – improved?
# ════════════════════════════════════════════════════════════════
y11 = y10+100
arrow(CX, y10+55, CX, y11)
diamond(CX, y11+50, 200, 50, C_DECISION, C_BORDER_D, width=3)
centred("Parameters", CX, y11+40, fB, C_DARK)
centred("improved?", CX, y11+60, fB, C_DARK)
# YES → continue
box(CX-180, y11+140, CX+180, y11+210, (220,255,230), C_TREAT, radius=8)
centred("Continue therapy — attempt", CX, y11+162, fB, C_TREAT)
centred("natural / assisted conception", CX, y11+186, fR, C_DARK)
arrow(CX, y11+100, CX, y11+140, "YES")
# ════════════════════════════════════════════════════════════════
# NODE 9 – ART (if still not improved)
# ════════════════════════════════════════════════════════════════
y12 = y11+260
# NO branch from decision 3
draw.line([(CX+200, y11+50),(CX+300, y11+50)], fill=C_BORDER_D, width=3)
draw.line([(CX+300, y11+50),(CX+300, y12)], fill=C_BORDER_D, width=3)
draw.text((CX+205, y11+32), "NO", font=fB, fill=C_WARN)
arrow(CX+300, y12, CX+1, y12)
box(CX-400, y12, CX+400, y12+175, (245,230,255), C_ART)
centred("STEP 5 — ASSISTED REPRODUCTIVE TECHNOLOGY (ART)", CX, y12+18, fB, C_ART)
draw.line([(CX-380, y12+34),(CX+380, y12+34)], fill=C_ART, width=2)
art_data = [
("MILD defect", "Count 15–20×10⁶/mL • Normal motility", "Expectant management ± optimise female partner"),
("MODERATE defect","Count 10–15×10⁶/mL • 20–40% motility", "Intrauterine Insemination (IUI) ± clomiphene/gonadotropins"),
("SEVERE defect", "Count <10×10⁶/mL • <10% motility", "IVF with ICSI (intracytoplasmic sperm injection)"),
("AZOOSPERMIA", "No sperm in ejaculate", "Testicular sperm extraction (TESE) + ICSI / Donor sperm"),
]
for i,(sev,crit,mgmt) in enumerate(art_data):
yo = y12+44+i*32
# severity badge
col = [C_TREAT, (200,140,0), C_WARN, (150,0,0)][i]
draw.rounded_rectangle([CX-395, yo, CX-250, yo+22], radius=5, fill=col)
centred(sev, CX-322, yo+11, fS, C_WHITE)
draw.text((CX-240, yo+3), crit, font=fS, fill=C_DARK)
draw.text((CX-240, yo+15), "→ "+mgmt, font=fS, fill=(80,50,160))
# ════════════════════════════════════════════════════════════════
# NODE 10 – LIFESTYLE (side panel right)
# ════════════════════════════════════════════════════════════════
yLS = 1560
box(980, yLS, 1380, yLS+320, (225,250,245), C_LIFE)
centred("LIFESTYLE", 1180, yLS+18, fB, C_LIFE)
centred("MODIFICATIONS", 1180, yLS+38, fB, C_LIFE)
centred("(ALL patients – throughout)", 1180, yLS+56, fS, C_DARK)
draw.line([(990,yLS+70),(1370,yLS+70)], fill=C_LIFE, width=2)
ls_items = [
"• Scrotal cooling – avoid hot baths,",
" tight underwear, laptop on lap",
"• Stop smoking (↓ sperm motility)",
"• Alcohol ≤14 units/week",
"• BMI target 20–25 (obesity worsens",
" hypothyroidism + reduces SHBG)",
"• Moderate aerobic exercise",
"• Reduce psychological stress",
"• Intercourse every 2–3 days around",
" partner's ovulation window",
"• Avoid gonadotoxins (chemo,",
" anabolic steroids, recreational drugs)",
]
for i,ln in enumerate(ls_items):
draw.text((995, yLS+80+i*18), ln, font=fS, fill=C_DARK)
# connect lifestyle box to main flow
draw.line([(980, yLS+160),(CX+400, y9+90)], fill=C_LIFE, width=2)
draw.text((830, yLS+140), "Apply throughout", font=fXS, fill=C_LIFE)
# ════════════════════════════════════════════════════════════════
# FINAL OUTCOME BOX
# ════════════════════════════════════════════════════════════════
y_fin = y12+215
arrow(CX, y12+175, CX, y_fin)
oval(CX-340, y_fin, CX+340, y_fin+65, C_START, (10,50,120))
multiline_centred(["GOAL: Achieve natural conception or ART-assisted pregnancy",
"Key message: Hypothyroid oligoasthenozoospermia is FULLY REVERSIBLE with Levothyroxine"],
CX, y_fin+18, fS, C_WHITE, line_gap=10)
# ════════════════════════════════════════════════════════════════
# MECHANISM INSET (top right)
# ════════════════════════════════════════════════════════════════
xM, yM = 960, 100
box(xM, yM, 1380, yM+270, (255,250,235), (180,130,20), radius=10)
centred("MECHANISM OF IMPAIRMENT", (xM+1380)//2, yM+18, fB, (140,100,0))
draw.line([(xM+10,yM+32),(1370,yM+32)], fill=(180,130,20), width=1)
mech = [
"↑ TSH / ↓ Thyroid hormone",
" ↓",
"① Disrupts GnRH pulsatility (hypothalamus)",
" → ↓ FSH & LH secretion",
"② ↓ SHBG → altered T:E₂ ratio",
" → ↑ free estrogen → ↓ FSH/LH feedback",
"③ Direct Sertoli cell dysfunction",
" → impaired blood-testis barrier",
" → poor sperm maturation support",
"④ Mitochondrial dysfunction in sperm",
" → impaired oxidative phosphorylation",
" → ↓ sperm motility (asthenozoospermia)",
"⑤ Overall: Oligoasthenoteratozoospermia",
]
for i,ln in enumerate(mech):
col = C_WARN if ln.startswith("↑") else ((140,100,0) if ln.startswith("⑤") else C_DARK)
draw.text((xM+12, yM+40+i*16), ln, font=fXS, fill=col)
# ════════════════════════════════════════════════════════════════
# LEGEND
# ════════════════════════════════════════════════════════════════
yLeg = H-95
box(30, yLeg, 980, H-10, (248,248,255), (180,180,200), radius=8)
draw.text((45,yLeg+8), "LEGEND:", font=fB, fill=C_DARK)
legend_items = [
(C_START, "Oval = Start / End"),
(C_DIAG, "Blue box = Investigation / Assessment"),
(C_TREAT, "Green box = Treatment step"),
(C_DECISION, "Diamond = Decision point"),
(C_ART, "Purple = ART options"),
(C_LIFE, "Teal = Lifestyle measures"),
(C_WARN, "Red = Urgent / Warning"),
]
for i,(col,txt) in enumerate(legend_items):
lx = 50 + i*130
draw.rectangle([lx, yLeg+30, lx+18, yLeg+46], fill=col, outline=(80,80,80))
draw.text((lx+22, yLeg+30), txt, font=fXS, fill=C_DARK)
# ════════════════════════════════════════════════════════════════
# FOOTER
# ════════════════════════════════════════════════════════════════
draw.rectangle([0, H-28, W, H], fill=(200,210,230))
centred("Sources: Smith & Tanagho's General Urology 19e • Harrison's IM 22e (2025) • Campbell-Walsh Urology • Sabiston Surgery • 2024 European Guideline (PMID 40698982)",
W//2, H-14, fXS, C_DARK)
# Save
out_path = "/tmp/workspace/flowchart/TSH_Oligozoospermia_Algorithm.png"
img.save(out_path, dpi=(150,150))
print(f"Saved: {out_path} ({W}×{H})")
cd /tmp/workspace/flowchart && python generate_flowchart.py 2>&1
TSH Oligozoospermia Algorithm
Image · PNG
SUGGEST LIFESTYLE MODIFICATIONS TO MAINTAIN TSH LEVELS AND FOR HOW MANY DAYS IS Levothyroxine REQUIRED, PATIENT HAS VERY SEDENTRY SITTING PC JOB
hypothyroidism lifestyle exercise diet TSH management
PMID: 37162766
subclinical hypothyroidism levothyroxine duration selenium iodine diet
exercise physical activity thyroid function TSH improvement
PMID: 40446861
| Cause | Duration |
|---|---|
| Hashimoto's autoimmune thyroiditis (most common, anti-TPO +ve) | Lifelong - the gland progressively destroys itself and thyroid reserve falls permanently |
| Subclinical hypothyroidism (TSH 4-10, normal fT4) | Trial of 3-6 months initially; reassess if anti-TPO negative and TSH not rising |
| Iodine deficiency / dietary cause | Can be reversible with iodine correction and lifestyle change |
| Drug-induced (lithium, amiodarone, etc.) | Duration = while causative drug continues |
| Post-thyroiditis (transient) | May be temporary - reassess after 6-12 months |
"Levothyroxine is recommended for younger patients trying to conceive... symptoms generally improve within a few weeks, although complete recovery may take months." - Lippincott Pharmacology 6th Ed.
Steady-state TSH is reached at 6-8 weeks after any dose change. TSH monitoring is repeated at 4-6 months, then yearly once stable. - Tietz Laboratory Medicine 7th Ed., p. 4186
| Type | Frequency | Duration | Goal |
|---|---|---|---|
| Brisk walking | 5 days/week | 30-45 min | Primary cardio exercise |
| Cycling (outdoor or stationary) | 3-4 days/week | 30-40 min | Low-impact, thyroid stimulating |
| Resistance/weight training | 2-3 days/week | 30-40 min | ↑ metabolic rate, ↓ weight |
| Yoga / breathing exercises | Daily | 20-30 min | Reduces cortisol, supports HPT axis |
| Standing desk breaks | Every 45-60 min | 5-10 min standing/walking | Breaks metabolic stagnation |
| Food | Iodine content |
|---|---|
| Iodised salt (1/4 tsp) | ~95 mcg |
| Seaweed / kelp | 16-2,984 mcg (variable - avoid excess) |
| Cod fish (85g) | ~99 mcg |
| Low-fat yoghurt (1 cup) | ~75 mcg |
| Eggs (1 large) | ~25 mcg |
| Milk (1 cup) | ~56 mcg |
| Substance | Effect on Levothyroxine / Thyroid | Action |
|---|---|---|
| Coffee / caffeine | Reduces levothyroxine absorption by ~25-30% | Take levothyroxine 60 min before coffee |
| Soy products (tofu, soy milk) | Inhibits iodine uptake; reduces LT4 absorption | Avoid within 4 hours of LT4 dose |
| High-fibre foods (bran cereals) | Binds LT4 in gut, reduces absorption | Separate by ≥4 hours |
| Calcium supplements / dairy | Significantly reduce LT4 absorption | Separate by ≥4 hours |
| Iron supplements | Chelates LT4 in gut | Separate by ≥4 hours |
| Alcohol | Directly toxic to thyroid follicular cells; impairs both thyroid and spermatogenesis | Limit to <7 units/week |
| Processed sugar / refined carbs | Worsens insulin resistance, disrupts HPT axis | Reduce significantly |
| Gluten (if Hashimoto's + anti-TPO +ve) | Molecular mimicry may worsen autoimmune attack | Consider trial gluten reduction |
| Problem | Solution |
|---|---|
| Prolonged sitting → slows metabolism → worsens hypothyroidism | Standing desk or desk converter; set timer to stand/walk every 45 min |
| Screen blue light → disrupts melatonin/circadian rhythm → worsens TSH night peak | Install f.lux or Night Shift; blue-light glasses after 6 PM |
| Scrotal heating from laptop → impairs spermatogenesis | Never place laptop on lap - always use desk; cooling pad if needed |
| Mental stress from PC work → elevated cortisol → suppresses HPT axis | Pomodoro technique (work 25 min, break 5 min); midday 10-min walk |
| Vitamin D deficiency from indoor work | Supplement D3 2,000-4,000 IU/day; take lunch outdoors when possible |
| Weight gain from sedentary work → ↑ aromatase → ↑ estrogen → ↑ TSH | Caloric-controlled Mediterranean diet + resistance training 2-3x/week |
| Category | Recommendation | Minimum Duration |
|---|---|---|
| Levothyroxine | Until TSH stable + fertility achieved; lifelong if Hashimoto's | Check anti-TPO to decide |
| TSH monitoring | At 6-8 weeks post dose change, then 4-6 months, then yearly | Ongoing |
| Exercise | 30-45 min moderate aerobic, 5 days/week + resistance 2-3x/week | 12+ weeks to see TSH effect |
| Iodine | 150 mcg/day via diet (iodised salt, fish, dairy, eggs) | Daily, ongoing |
| Selenium | 1-2 Brazil nuts/day OR 100-200 mcg supplement | Daily, ongoing |
| Vitamin D3 | 2,000-4,000 IU/day | After checking baseline level |
| Zinc | 25-50 mg/day | 3+ months |
| LT4 timing | Fasting, 30-60 min before breakfast; separate from coffee/calcium/iron by 4h | Strict daily routine |
| Sleep | 7-9 hours, consistent schedule, no screens after 9 PM | Immediate change |
| Desk habits | Stand/walk every 45 min; no laptop on lap; outdoor lunch break | Immediate change |
| Alcohol | ≤7 units/week | Immediate |
| Smoking | Stop completely | Immediate |
| Weight | Target BMI 20-25; 5-10% weight reduction if overweight | 3-6 months |
Key message: Lifestyle modification is not optional adjunctive therapy - it is a core pillar of management. A 2025 meta-analysis of RCTs (PMID 40446861) found that exercise alone significantly reduces TSH and increases T4 in hypothyroid patients. Combined with levothyroxine, the synergistic approach produces the best results for both thyroid control and fertility restoration.