Explain the treatment for plantar warts
"plantar wart" AND treatment
| Situation | Preferred Approach |
|---|---|
| Child <12 years | Occlusive therapy, salicylic acid, or watchful waiting |
| Mosaic/multiple warts | Immunotherapy (Candida antigen, imiquimod) may clear multiple lesions simultaneously |
| Single refractory wart | Intralesional bleomycin, pulsed dye laser, or surgical curettage |
| Immunocompromised patient | More aggressive/combined approach; warts tend to be more resistant |
| Post-treatment assessment | After paring, restoration of normal skin lines = wart resolved |
Create a PDF comparison table of plantar wart treatments with efficacy rates
ls -la /home/daytona/workspace/
mkdir -p /home/daytona/workspace/plantar-warts && python3 -c "import reportlab; …
~/plantar-warts/generate_pdf.py
from reportlab.lib.pagesizes import A4, landscape
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.platypus import (
SimpleDocTemplate, Table, TableStyle, Paragraph,
Spacer, HRFlowable
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT
from reportlab.lib.colors import HexColor
OUTPUT = "/home/daytona/workspace/plantar-warts/Plantar_Wart_Treatment_Comparison.pdf"
# ── Colour palette ──────────────────────────────────────────────────────────
DARK_BLUE = HexColor("#1A3A5C")
MED_BLUE = HexColor("#2E6DA4")
LIGHT_BLUE = HexColor("#D6E8F7")
STRIPE = HexColor("#F2F7FC")
WHITE = colors.white
BLACK = colors.black
ORANGE = HexColor("#E07B39")
GREEN = HexColor("#2E8B57")
RED = HexColor("#C0392B")
AMBER = HexColor("#D4AC0D")
# ── Styles ───────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()
title_style = ParagraphStyle(
"Title", fontName="Helvetica-Bold", fontSize=18,
textColor=WHITE, alignment=TA_CENTER, spaceAfter=2
)
subtitle_style = ParagraphStyle(
"Subtitle", fontName="Helvetica", fontSize=10,
textColor=HexColor("#B0C8E0"), alignment=TA_CENTER, spaceAfter=4
)
source_style = ParagraphStyle(
"Source", fontName="Helvetica-Oblique", fontSize=7.5,
textColor=HexColor("#666666"), alignment=TA_CENTER
)
cell_style = ParagraphStyle(
"Cell", fontName="Helvetica", fontSize=8.2,
textColor=BLACK, leading=11, alignment=TA_LEFT
)
cell_bold = ParagraphStyle(
"CellBold", fontName="Helvetica-Bold", fontSize=8.5,
textColor=DARK_BLUE, leading=11, alignment=TA_LEFT
)
header_style = ParagraphStyle(
"Header", fontName="Helvetica-Bold", fontSize=9,
textColor=WHITE, alignment=TA_CENTER, leading=12
)
note_style = ParagraphStyle(
"Note", fontName="Helvetica-Oblique", fontSize=7.5,
textColor=HexColor("#444444"), leading=10
)
def P(text, style=cell_style):
return Paragraph(text, style)
def efficacy_tag(text, color):
"""Small coloured badge rendered as HTML-styled paragraph."""
hex_c = color.hexval() if hasattr(color, 'hexval') else color
return Paragraph(
f'<font color="{hex_c}"><b>{text}</b></font>', cell_style
)
# ── Table data ───────────────────────────────────────────────────────────────
# Columns: Treatment | Mechanism | Efficacy Rate | Pain Level | Sessions |
# Best For | Key Limitations
HEADERS = [
P("Treatment", header_style),
P("Mechanism", header_style),
P("Efficacy\nRate", header_style),
P("Pain\nLevel", header_style),
P("Typical\nSessions", header_style),
P("Best For", header_style),
P("Key Limitations", header_style),
]
ROWS = [
# ── First-line ──────────────────────────────────────────────────────────
[
P("<b>Salicylic Acid\n(10–60%)</b>", cell_bold),
P("Keratolytic; softens & lifts wart tissue"),
P("<font color='#2E8B57'><b>~50–70%*</b></font>"),
P("Low"),
P("Daily × 4–12 wks"),
P("First-line; children; patient self-treatment"),
P("Slow; requires daily compliance; less effective in thick plantar skin"),
],
[
P("<b>Cryotherapy\n(Liquid N₂)</b>", cell_bold),
P("Freeze–thaw destroys infected keratinocytes"),
P("<font color='#D4AC0D'><b>20–50%</b></font>"),
P("Moderate–\nHigh"),
P("Every 2–3 wks × several months"),
P("In-office first-line; periungual warts"),
P("No trial shows superiority to placebo for plantar warts; hypopigmentation; nerve damage risk"),
],
[
P("<b>Cantharidin\n(0.7%)</b>", cell_bold),
P("Disrupts desmosomes → acantholysis & blister"),
P("<font color='#D4AC0D'><b>~50–60%</b></font>"),
P("Moderate\n(delayed)"),
P("Every 2–3 wks"),
P("Office use; children (painless at application)"),
P("\"Doughnut wart\" recurrence pattern; blistering can be severe"),
],
# ── Chemical ────────────────────────────────────────────────────────────
[
P("<b>Trichloroacetic\nAcid (TCA 35–85%)</b>", cell_bold),
P("Chemical cauterisation of wart epithelium"),
P("<font color='#D4AC0D'><b>~50–60%</b></font>"),
P("High"),
P("Every 1–2 wks"),
P("Adjunct after debridement; safe in pregnancy"),
P("More ulceration & pain than alternatives; protect surrounding skin"),
],
[
P("<b>Silver Nitrate</b>", cell_bold),
P("Protein precipitation / chemical burn"),
P("<font color='#D4AC0D'><b>Moderate\n(limited data)</b></font>"),
P("Moderate"),
P("Weekly"),
P("Adjunct option when other agents unavailable"),
P("Risk of argyria (permanent skin discolouration); limited evidence base"),
],
# ── Immunotherapy ────────────────────────────────────────────────────────
[
P("<b>Candida Antigen\nInjection (IL)</b>", cell_bold),
P("Stimulates systemic Th1 immune response against HPV"),
P("<font color='#2E8B57'><b>~60–80%</b></font>"),
P("Low–\nModerate"),
P("Every 3–4 wks (up to 3×)"),
P("Refractory warts; mosaic warts; multiple lesions"),
P("May take months for full response; not effective in severely immunocompromised"),
],
[
P("<b>Imiquimod 5%\n(Cream)</b>", cell_bold),
P("TLR-7/8 agonist → local interferon/cytokine induction"),
P("<font color='#D4AC0D'><b>~30–50%</b></font>"),
P("Low\n(local erythema)"),
P("3×/wk for up to 16 wks"),
P("Immunocompromised; patients preferring non-destructive therapy"),
P("Slow response; local inflammatory reaction; expensive"),
],
[
P("<b>Bleomycin\nInjection (IL)</b>", cell_bold),
P("Cytotoxic antibiotic → DNA strand breaks in wart cells"),
P("<font color='#2E8B57'><b>~60–90%</b></font>"),
P("High\n(very painful)"),
P("1–3 sessions"),
P("Recalcitrant single/few plantar warts after other failures"),
P("Severe pain; Raynaud's phenomenon risk on digits; expensive; avoid in pregnancy"),
],
# ── Antimetabolite ───────────────────────────────────────────────────────
[
P("<b>5-Fluorouracil\n(5-FU 5% cream)</b>", cell_bold),
P("Pyrimidine antimetabolite → inhibits viral DNA replication"),
P("<font color='#D4AC0D'><b>~40–60%</b></font>"),
P("Low–\nModerate"),
P("Daily or 2×/wk × 4–12 wks"),
P("Flat/refractory warts; combination therapy"),
P("Local erosion; avoid in pregnancy; limited standalone plantar evidence"),
],
# ── Laser ────────────────────────────────────────────────────────────────
[
P("<b>Pulsed Dye\nLaser (595 nm)</b>", cell_bold),
P("Selective photothermolysis of wart vasculature"),
P("<font color='#2E8B57'><b>~70–80%</b></font>"),
P("Moderate"),
P("Every 3–4 wks × 2–4 sessions"),
P("Refractory warts; patients wanting minimal scarring"),
P("Expensive; requires specialist; multiple sessions; may need anaesthesia"),
],
[
P("<b>CO₂ Laser\nAblation</b>", cell_bold),
P("Vaporises wart tissue with precision"),
P("<font color='#2E8B57'><b>~75–85%</b></font>"),
P("Moderate\n(LA required)"),
P("Usually 1–2"),
P("Extensive/refractory lesions after other methods fail"),
P("Expensive; HPV DNA still detectable post-treatment; risk of plantar scarring"),
],
# ── Surgical ─────────────────────────────────────────────────────────────
[
P("<b>Electrosurgery /\nElectrofulguration</b>", cell_bold),
P("Thermal destruction of wart tissue by electric current"),
P("<font color='#2E8B57'><b>~70–95%\n(during Rx)</b></font>"),
P("High\n(LA required)"),
P("1–2 sessions"),
P("Refractory warts; large lesions; after failure of other methods"),
P("Scarring risk; painful plantar scar is a major complication"),
],
[
P("<b>Surgical Excision\n/ Curettage</b>", cell_bold),
P("Physical removal of wart under local anaesthesia"),
P("<font color='#D4AC0D'><b>~60–80%\n(recurrence ~30%)</b></font>"),
P("High\n(LA required)"),
P("1"),
P("Last resort; single refractory wart"),
P("High recurrence; permanent plantar scar; walking pain long-term"),
],
# ── Occlusive ────────────────────────────────────────────────────────────
[
P("<b>Occlusive Therapy\n(Duct Tape)</b>", cell_bold),
P("Mechanical occlusion ± immune stimulation (debated)"),
P("<font color='#C0392B'><b>~20%\n(adults)</b></font>"),
P("None"),
P("Continuous × 2 months"),
P("Children <12 yrs; patients refusing other treatments"),
P("Inferior to cryotherapy in adults; ~same as placebo; 75% of \"resolved\" warts recur"),
],
]
# ── Column widths (landscape A4 ≈ 27.7 cm usable) ────────────────────────────
COL_WIDTHS = [3.2*cm, 4.0*cm, 2.4*cm, 2.0*cm, 2.8*cm, 4.5*cm, 5.8*cm]
all_data = [HEADERS] + ROWS
table = Table(all_data, colWidths=COL_WIDTHS, repeatRows=1)
# Alternate row stripes
row_styles = []
for i, _ in enumerate(ROWS):
bg = STRIPE if i % 2 == 0 else WHITE
row_styles.append(("BACKGROUND", (0, i+1), (-1, i+1), bg))
table.setStyle(TableStyle([
# Header row
("BACKGROUND", (0, 0), (-1, 0), DARK_BLUE),
("TEXTCOLOR", (0, 0), (-1, 0), WHITE),
("FONTNAME", (0, 0), (-1, 0), "Helvetica-Bold"),
("FONTSIZE", (0, 0), (-1, 0), 9),
("ALIGN", (0, 0), (-1, 0), "CENTER"),
("VALIGN", (0, 0), (-1, 0), "MIDDLE"),
("ROWBACKGROUND",(0, 0), (-1, 0), DARK_BLUE),
# All cells
("FONTSIZE", (0, 1), (-1, -1), 8),
("VALIGN", (0, 1), (-1, -1), "TOP"),
("TOPPADDING", (0, 0), (-1, -1), 5),
("BOTTOMPADDING",(0, 0), (-1, -1), 5),
("LEFTPADDING", (0, 0), (-1, -1), 5),
("RIGHTPADDING", (0, 0), (-1, -1), 5),
# Grid
("GRID", (0, 0), (-1, -1), 0.4, HexColor("#AACBEA")),
("LINEBELOW", (0, 0), (-1, 0), 1.2, MED_BLUE),
# First column treatment names
("FONTNAME", (0, 1), (0, -1), "Helvetica-Bold"),
("TEXTCOLOR", (0, 1), (0, -1), DARK_BLUE),
# Highlight category separator rows (visual grouping)
] + row_styles))
# ── Document ──────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
OUTPUT,
pagesize=landscape(A4),
leftMargin=1.2*cm, rightMargin=1.2*cm,
topMargin=1.0*cm, bottomMargin=1.2*cm,
)
# Title banner
title_table = Table(
[[
Paragraph("Plantar Wart (Verruca Plantaris) — Treatment Comparison Table", title_style),
]],
colWidths=[sum(COL_WIDTHS)]
)
title_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), DARK_BLUE),
("TOPPADDING", (0,0), (-1,-1), 10),
("BOTTOMPADDING", (0,0), (-1,-1), 6),
("LEFTPADDING", (0,0), (-1,-1), 12),
]))
subtitle_table = Table(
[[
Paragraph(
"HPV-induced benign epidermal tumour of the plantar surface · "
"Caused by HPV types 1, 2, 4, 60 · "
"Allow ≥3 months per therapeutic trial before switching",
subtitle_style
)
]],
colWidths=[sum(COL_WIDTHS)]
)
subtitle_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), MED_BLUE),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 7),
("LEFTPADDING", (0,0), (-1,-1), 12),
]))
footnote = Paragraph(
"* Efficacy rates reflect reported cure/clearance rates from clinical studies; significant variation exists across trials. "
"IL = intralesional. LA = local anaesthesia. "
"Salicylic acid* rate refers to combined data including common warts; plantar wart data alone is lower. "
"Sources: Andrews' Diseases of the Skin (Clinical Dermatology); Pfenninger & Fowler's Procedures for Primary Care, 3rd Ed.",
note_style
)
story = [
title_table,
subtitle_table,
Spacer(1, 0.3*cm),
table,
Spacer(1, 0.25*cm),
HRFlowable(width="100%", thickness=0.5, color=HexColor("#AACBEA")),
Spacer(1, 0.1*cm),
footnote,
]
doc.build(story)
print(f"PDF written to: {OUTPUT}")
python3 /home/daytona/workspace/plantar-warts/generate_pdf.py
Plantar Wart Treatment Comparison
PDF Document · PDF
| Column | What it shows |
|---|---|
| Treatment | Name and formulation |
| Mechanism | How it works |
| Efficacy Rate | Colour-coded (green = high, amber = moderate, red = low) |
| Pain Level | Patient experience |
| Typical Sessions | Treatment course |
| Best For | Ideal patient/situation |
| Key Limitations | Risks, caveats, contraindications |