Explain easiy for example
| Factor | Simple Example |
|---|---|
| Genetic | Like inheriting your father's nose - you inherit genes (PSORS1) that make you prone to psoriasis. 9 genes identified. >50% have family history. |
| Environmental triggers | Like a spark igniting a fire - infections, stress, smoking, alcohol, physical injury can "switch on" the disease in a genetically prone person |
Trigger (infection/stress)
โ
Activates antigen-presenting cells (dendritic/Langerhans cells)
โ
These activate T-cells (CD4+ TH1 and TH17 cells)
โ
T-cells release chemicals: TNF-ฮฑ, IL-17, IL-22, interferon-ฮณ
โ
These chemicals speed up skin cell production
โ
Skin cells pile up = PSORIATIC PLAQUE
| Sign | What it means (simply) |
|---|---|
| Pink-red plaques with silvery scales | Red raised patches covered with white-silver flakes, like dandruff stuck on a red patch |
| Woronoff's sign | A pale white ring/halo around the lesion |
| Extensor surfaces | Mainly on elbows, knees, scalp (the "outside" surfaces you knock against things) |
| Auspitz sign | Pinpoint bleeding when you scrape the scale off - like tiny red dots appearing |
| Koebner phenomenon | New psoriasis patches appearing at sites of skin injury - if you scratch your arm, psoriasis appears there |
| Candle grease/wax spot sign | Scraping the plaque causes silvery scales to fall off like scraping a wax candle |
| Type | Description | Memory tip |
|---|---|---|
| Plaque (Vulgaris) | Most common (90%). Thick silvery plaques on elbows/knees | "Vulgaris = Very common" |
| Guttate | Small rain-drop shaped lesions, often after strep throat | "Gutta = drop (Latin)" |
| Inverse | In skin folds (armpits, groin) - no scales | "Inverse = opposite location" |
| Pustular | Pus-filled blisters | "Pustular = pus" |
| Erythrodermic | Entire body turns red - medical emergency | "Erythro = red, Derma = skin" |
| Von Zumbusch | Generalized pustular - severe form |
| Drug | Simple Role |
|---|---|
| Emollients (petroleum jelly) | Moisturize and soften the skin |
| Topical steroids (betamethasone) | Reduce inflammation |
| Salicylic acid | "Scale remover" - helps other drugs penetrate |
| Calcipotriene (Vit D analog) | Slows down skin cell overproduction |
| Coal tar | Anti-inflammatory, used with steroids |
| Type | Simple Explanation |
|---|---|
| UVB (295-320 nm) | Sunlight therapy, used 3-5x/week |
| UVB Narrow band (311 nm) | More targeted, kills T-cells that cause psoriasis |
| PUVA | Psoralen (a plant chemical) + UVA light. The psoralen acts like a "key" that gets activated by UV light and cross-links DNA in overactive skin cells, stopping them from multiplying |
| Excimer laser (308 nm) | Treats only affected patches precisely |
PUVA memory trick: P = Psoralen (plant drug), U = Ultraviolet, V = Very effective, A = UVA light
| Drug | Role |
|---|---|
| Methotrexate | Slows down rapidly dividing skin cells (like hitting the brakes on the conveyor belt) |
| Acitretin | Vitamin A analog - regulates skin cell growth |
| Cyclosporine | Suppresses the overactive immune T-cells |
| Apremilast | Blocks PDE4 enzyme - reduces inflammation signals |
PSORIASIS =
P - Plaques (silvery, well-defined)
S - Scalp, Skin, nails involved
O - On extensor surfaces (elbows/knees)
R - Red base under scales
I - Immune mediated (T-cells + cytokines)
A - Auspitz sign (bleeding on scraping)
S - Speeds up skin cell turnover (4 days vs 27 days)
I - Itchy (sometimes) + chronic course
S - Silvery scales = hallmark
Create a study guide PDF on psoriasis types and treatments
mkdir -p /home/daytona/workspace/psoriasis-study-guide && ls /home/daytona/worksโฆ
~/psoriasis-study-guide/generate_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm, mm
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, KeepTogether, PageBreak
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import Flowable
# โโ Colour palette โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
NAVY = colors.HexColor("#1A3A5C")
TEAL = colors.HexColor("#0D7C8C")
ORANGE = colors.HexColor("#E87722")
LIGHT_BG = colors.HexColor("#EAF4F6")
YELLOW_BG = colors.HexColor("#FFF8E1")
GREEN_BG = colors.HexColor("#E8F5E9")
RED_BG = colors.HexColor("#FFEBEE")
WHITE = colors.white
GREY_LINE = colors.HexColor("#CCCCCC")
# โโ Document setup โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
OUTPUT = "/home/daytona/workspace/psoriasis-study-guide/Psoriasis_Study_Guide.pdf"
doc = SimpleDocTemplate(
OUTPUT, pagesize=A4,
leftMargin=1.8*cm, rightMargin=1.8*cm,
topMargin=2*cm, bottomMargin=2*cm
)
# โโ Styles โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
base = getSampleStyleSheet()
def S(name, parent="Normal", **kw):
return ParagraphStyle(name, parent=base[parent], **kw)
cover_title = S("CoverTitle", fontSize=32, textColor=WHITE,
fontName="Helvetica-Bold", alignment=TA_CENTER, leading=38)
cover_sub = S("CoverSub", fontSize=14, textColor=colors.HexColor("#D0ECF0"),
fontName="Helvetica", alignment=TA_CENTER, leading=20)
cover_meta = S("CoverMeta", fontSize=10, textColor=colors.HexColor("#B0D8E0"),
fontName="Helvetica", alignment=TA_CENTER)
h1 = S("H1", fontSize=16, textColor=WHITE, fontName="Helvetica-Bold",
spaceBefore=6, spaceAfter=4, leading=20)
h2 = S("H2", fontSize=13, textColor=NAVY, fontName="Helvetica-Bold",
spaceBefore=10, spaceAfter=4, leading=16)
h3 = S("H3", fontSize=11, textColor=TEAL, fontName="Helvetica-Bold",
spaceBefore=8, spaceAfter=3, leading=14)
body = S("Body", fontSize=9.5, fontName="Helvetica",
leading=14, spaceAfter=3, alignment=TA_JUSTIFY)
bullet = S("Bullet", fontSize=9.5, fontName="Helvetica",
leading=14, spaceAfter=2, leftIndent=12, firstLineIndent=-12)
small = S("Small", fontSize=8.5, fontName="Helvetica",
leading=12, textColor=colors.HexColor("#444444"))
caption = S("Caption", fontSize=8, fontName="Helvetica-Oblique",
textColor=colors.HexColor("#666666"), alignment=TA_CENTER)
note_style = S("Note", fontSize=9, fontName="Helvetica-Oblique",
textColor=colors.HexColor("#5D4037"), leading=13)
tip_style = S("Tip", fontSize=9, fontName="Helvetica-Bold",
textColor=colors.HexColor("#1B5E20"), leading=13)
# โโ Helper flowables โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
def section_header(text, bg=NAVY):
"""Full-width coloured section banner."""
data = [[Paragraph(text, h1)]]
t = Table(data, colWidths=[17.4*cm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("TOPPADDING", (0,0), (-1,-1), 8),
("BOTTOMPADDING", (0,0), (-1,-1), 8),
("LEFTPADDING", (0,0), (-1,-1), 12),
("RIGHTPADDING", (0,0), (-1,-1), 12),
("ROUNDEDCORNERS", [6]),
]))
return t
def info_box(text, bg=LIGHT_BG, border=TEAL):
data = [[Paragraph(text, note_style)]]
t = Table(data, colWidths=[17.4*cm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
("TOPPADDING", (0,0), (-1,-1), 8),
("BOTTOMPADDING",(0,0), (-1,-1), 8),
("LINEAFTER", (0,0), (0,-1), 3, border), # left accent bar trick โ use LINEBEFORE
("LINEBEFORE", (0,0), (0,-1), 4, border),
("ROUNDEDCORNERS", [4]),
]))
return t
def tip_box(text):
return info_box("๐ก " + text, bg=GREEN_BG, border=colors.HexColor("#388E3C"))
def warning_box(text):
return info_box("โ ๏ธ " + text, bg=RED_BG, border=colors.HexColor("#C62828"))
def hr():
return HRFlowable(width="100%", thickness=0.5, color=GREY_LINE, spaceAfter=6, spaceBefore=6)
def sp(h=6):
return Spacer(1, h)
def bul(text):
return Paragraph(f"โข {text}", bullet)
# โโ Table helpers โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
HDR_STYLE = TableStyle([
("BACKGROUND", (0,0), (-1,0), NAVY),
("TEXTCOLOR", (0,0), (-1,0), WHITE),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,0), 9.5),
("BOTTOMPADDING", (0,0), (-1,0), 7),
("TOPPADDING", (0,0), (-1,0), 7),
("ALIGN", (0,0), (-1,-1), "LEFT"),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("FONTNAME", (0,1), (-1,-1), "Helvetica"),
("FONTSIZE", (0,1), (-1,-1), 9),
("ROWBACKGROUNDS",(0,1), (-1,-1), [WHITE, LIGHT_BG]),
("TOPPADDING", (0,1), (-1,-1), 5),
("BOTTOMPADDING", (0,1), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 8),
("RIGHTPADDING", (0,0), (-1,-1), 8),
("GRID", (0,0), (-1,-1), 0.4, GREY_LINE),
("ROUNDEDCORNERS", [4]),
])
def make_table(headers, rows, col_widths=None):
data = [[Paragraph(f"<b>{h}</b>", S("th", fontSize=9.5, textColor=WHITE,
fontName="Helvetica-Bold", leading=13)) for h in headers]]
for row in rows:
data.append([Paragraph(str(c), small) for c in row])
t = Table(data, colWidths=col_widths, repeatRows=1)
t.setStyle(HDR_STYLE)
return t
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# BUILD CONTENT
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story = []
# โโ COVER PAGE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
cover_data = [[
Paragraph("PSORIASIS", cover_title),
Paragraph("Complete Study Guide", cover_sub),
Paragraph("Types ยท Pathogenesis ยท Clinical Features ยท Investigations ยท Treatment", cover_sub),
Spacer(1, 10),
Paragraph("Chapter 19 โ Dermatology, Venereology and Leprosy", cover_meta),
]]
cover_table = Table([[item] for item in [
Paragraph("PSORIASIS", cover_title),
Spacer(1, 8),
Paragraph("Complete Study Guide", cover_sub),
Spacer(1, 6),
Paragraph("Types ยท Pathogenesis ยท Clinical Features ยท Treatment", cover_sub),
Spacer(1, 14),
Paragraph("Chapter 19 โ Dermatology, Venereology & Leprosy", cover_meta),
Spacer(1, 6),
Paragraph("Based on standard medical textbook content", cover_meta),
]], colWidths=[17.4*cm])
cover_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), NAVY),
("TOPPADDING", (0,0), (-1,-1), 14),
("BOTTOMPADDING", (0,0), (-1,-1), 14),
("LEFTPADDING", (0,0), (-1,-1), 20),
("RIGHTPADDING", (0,0), (-1,-1), 20),
("ROUNDEDCORNERS", [10]),
]))
story.append(Spacer(1, 60))
story.append(cover_table)
story.append(Spacer(1, 30))
# small decorative strip
strip_data = [["QUICK FACTS"]]
strip = Table(strip_data, colWidths=[17.4*cm])
strip.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), TEAL),
("TEXTCOLOR", (0,0), (-1,-1), WHITE),
("FONTNAME", (0,0), (-1,-1), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,-1), 11),
("ALIGN", (0,0), (-1,-1), "CENTER"),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING", (0,0), (-1,-1), 6),
]))
story.append(strip)
story.append(Spacer(1, 8))
facts = [
["Prevalence", "Affects ~2-3% of world population"],
["Peak onset", "Bimodal: 16-22 yrs (early) and 57-60 yrs (late)"],
["Genetics", "9 susceptibility genes (PSORS1-9); most important: PSORS1"],
["Key lesion", "Well-defined silvery-scaled erythematous plaque on extensor surfaces"],
["Hallmark sign", "Auspitz sign (pinpoint bleeding on scale removal)"],
["Most common type", "Plaque psoriasis (Psoriasis Vulgaris) โ 90% of cases"],
]
facts_table = Table(facts, colWidths=[5*cm, 12.4*cm])
facts_table.setStyle(TableStyle([
("FONTNAME", (0,0), (-1,-1), "Helvetica"),
("FONTSIZE", (0,0), (-1,-1), 9),
("FONTNAME", (0,0), (0,-1), "Helvetica-Bold"),
("TEXTCOLOR", (0,0), (0,-1), NAVY),
("ROWBACKGROUNDS",(0,0), (-1,-1), [WHITE, LIGHT_BG]),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 8),
("GRID", (0,0), (-1,-1), 0.3, GREY_LINE),
]))
story.append(facts_table)
story.append(PageBreak())
# โโ SECTION 1: ETIOLOGY โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(section_header("1. ETIOLOGY"))
story.append(sp(8))
story.append(Paragraph("The exact etiology of psoriasis is not known. It results from a combination of genetic predisposition and environmental triggers.", body))
story.append(sp(6))
etio_data = [
["Factor", "Details", "Memory Tip"],
["Genetic\n(Polygenic)", "Complex polygenic inheritance. Positive family history in >50% of patients.\n9 susceptibility genes: PSORS1โPSORS9.\nMost important: PSORS1 (chromosome 6p21.3).",
"\"9 PSORS genes\" โ think 9 players in a team"],
["Environmental\nTriggers", "Infections (bacterial/viral)\nStress & physical injury / trauma\nSmoking, alcohol, drugs",
"\"STAID\" โ Stress, Trauma, Alcohol, Infections, Drugs"],
]
story.append(make_table(etio_data[0], etio_data[1:], col_widths=[3.5*cm, 9.5*cm, 4.4*cm]))
story.append(sp(10))
# โโ SECTION 2: PATHOGENESIS โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(section_header("2. PATHOGENESIS", bg=TEAL))
story.append(sp(8))
story.append(Paragraph("<b>Core concept:</b> Psoriasis results from interactions between genetic factors and environmental triggers, leading to immune activation and accelerated keratinocyte proliferation.", body))
story.append(sp(6))
story.append(Paragraph("Step-by-step pathway:", h3))
steps = [
("1", "Environmental trigger activates antigen-presenting cells (Dendritic / Langerhans cells)"),
("2", "These activate CD4+ TH1 and TH17 cells via IL-12 and IL-23 respectively"),
("3", "T-cells enter skin and accumulate in epidermis"),
("4", "T-cells secrete mediators: TNF-ฮฑ, IFN-ฮณ (TH1) โข IL-17A, IL-17F, IL-22 (TH17)"),
("5", "Mediators activate keratinocytes โ produce antimicrobial peptides (ฮฒ-defensins), cytokines (TNF-ฮฑ, IL-1ฮฒ, IL-6) and chemokines"),
("6", "Result: shortened cell cycle (36 hrs vs 311 hrs normal) and turnover (4 days vs 27 days normal)"),
]
step_table = Table(
[[Paragraph(f"<b>{n}</b>", S("sn", fontSize=11, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER)),
Paragraph(d, small)] for n, d in steps],
colWidths=[1.2*cm, 16.2*cm]
)
step_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (0,-1), TEAL),
("BACKGROUND", (1,0), (1,-1), WHITE),
("ROWBACKGROUNDS",(1,0), (1,-1), [WHITE, LIGHT_BG]),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 7),
("BOTTOMPADDING", (0,0), (-1,-1), 7),
("LEFTPADDING", (0,0), (0,-1), 4),
("LEFTPADDING", (1,0), (1,-1), 10),
("GRID", (0,0), (-1,-1), 0.3, GREY_LINE),
]))
story.append(step_table)
story.append(sp(8))
story.append(tip_box("Key cytokines to remember: TNF-ฮฑ, IL-17, IL-22, IL-23, IL-12, IFN-ฮณ. Biologic drugs target many of these!"))
story.append(PageBreak())
# โโ SECTION 3: PATHOLOGY โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(section_header("3. PATHOLOGY (Histology)"))
story.append(sp(8))
path_data = [
["Histological Feature", "Description", "Significance"],
["Hyperproliferation of keratinocytes", "Increased epidermal cell proliferation", "Explains thick scaly plaques"],
["Dilated tortuous blood vessels", "In dermal papillae, surrounded by mixed neutrophilic & lymphohistiocytic infiltrate", "Explains Auspitz sign (bleeding)"],
["Munro's microabscesses", "Polymorphonuclear abscesses within parakeratotic stratum corneum", "Pathognomonic for psoriasis"],
["Spongiform pustules", "PMN abscesses within mildly spongiotic foci of superficial epidermis", "Seen in pustular psoriasis"],
["Parakeratosis", "Nuclei retained in stratum corneum (incomplete keratinization)", "Explains silvery scale"],
]
story.append(make_table(path_data[0], path_data[1:], col_widths=[4.5*cm, 7.5*cm, 5.4*cm]))
story.append(sp(10))
# โโ SECTION 4: CLINICAL FEATURES โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(section_header("4. CLINICAL FEATURES", bg=TEAL))
story.append(sp(8))
story.append(Paragraph("Key characteristics of psoriatic lesions:", h3))
features = [
"Well-defined pink-red, sharply demarcated macules, papules, or rounded plaques",
"Covered by silvery scales with a whitish halo around lesions (Woronoff's sign)",
"Predominantly affects extensor surfaces (elbows, knees) and scalp",
"Usually covered by silvery scales; has a chronic fluctuating course",
"Increased association with HIV infection",
]
for f in features:
story.append(bul(f))
story.append(sp(8))
story.append(Paragraph("Classic Signs โ The Auspitz Sign (Step-by-Step):", h3))
auspitz = [
["Step", "Action", "Finding", "Term"],
["Step 1", "Gently scrape lesion with glass slide", "Silver scales fall off more prominently", "Grattage test positive"],
["Step 2", "Continue scraping (remove all scales)", "Glistening white adherent membrane appears", "Berkeley's membrane"],
["Step 3", "Remove the membrane", "Pinpoint bleeding points become visible", "Auspitz sign โ"],
]
story.append(make_table(auspitz[0], auspitz[1:], col_widths=[2*cm, 5.5*cm, 6*cm, 3.9*cm]))
story.append(sp(6))
other_signs = [
["Sign", "Description"],
["Woronoff's sign", "Whitish halo around psoriatic lesion"],
["Koebner phenomenon", "New psoriatic lesion appears at site of skin trauma/injury in susceptible individuals"],
["Candle grease / Wax spot sign", "Scraping plaque causes silvery scales to fall off like scraping a wax candle"],
["Last membrane phenomenon", "Wet layer adhered to lesion is last layer of dermal papillae โ pathognomonic of psoriasis"],
]
story.append(make_table(other_signs[0], other_signs[1:], col_widths=[5*cm, 12.4*cm]))
story.append(PageBreak())
# โโ SECTION 5: TYPES โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(section_header("5. TYPES OF PSORIASIS"))
story.append(sp(8))
types_data = [
["Type", "Key Features", "Special Notes / Memory"],
["Plaque (Psoriasis Vulgaris)\nโ
MOST COMMON",
"90% of cases. Symmetrically distributed thick silvery plaques on elbows, knees, scalp, lower back. 1-10 cm diameter, raised, well-defined margins.",
"Think: 'Vulgaris = Very common'\nKoebner phenomenon can occur"],
["Guttate Psoriasis",
"Small rain-drop shaped (0.5-2 cm) lesions scattered over trunk. Often follows streptococcal throat infection in children/young adults.",
"'Gutta' = drop (Latin)\nTrigger: Strep throat"],
["Inverse (Flexural) Psoriasis",
"Affects skin folds: axillae, groin, submammary, perianal. Smooth, red, shiny lesions โ minimal or NO scales (moisture prevents scaling).",
"Inverse = opposite location to plaque\nNo silvery scales!"],
["Localized Pustular Psoriasis",
"Pustules localized to palms and soles (palmoplantar pustulosis). Chronic, relapsing course.",
"Palms + Soles\n= Palmoplantar pustulosis"],
["Generalized Pustular Psoriasis\n(Von Zumbusch)",
"Acute onset. Widespread sterile pustules on erythematous base. Fever, malaise, leucocytosis. Medical emergency.",
"Von Zumbusch = Very severe\nMEDICAL EMERGENCY"],
["Erythrodermic Psoriasis",
"Entire body surface (>90%) becomes red, inflamed, scaling. Can be life-threatening. Causes: withdrawal of systemic steroids, infection.",
"Erythro = red, Derma = skin\nMEDICAL EMERGENCY"],
["Palmoplantar Psoriasis",
"Involves palms and soles. Hyperkeratotic plaques; can be debilitating.",
"Difficult to treat; consider systemic therapy early"],
]
story.append(make_table(types_data[0], types_data[1:], col_widths=[4*cm, 7.5*cm, 5.9*cm]))
story.append(sp(8))
story.append(warning_box("Erythrodermic psoriasis and Von Zumbusch generalized pustular psoriasis are both MEDICAL EMERGENCIES requiring urgent hospitalization."))
story.append(PageBreak())
# โโ SECTION 6: NAIL & JOINT FEATURES โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(section_header("6. NAIL CHANGES & PSORIATIC ARTHROPATHY", bg=TEAL))
story.append(sp(8))
story.append(Paragraph("Nail Involvement (up to 50% of patients):", h2))
nail_data = [
["Nail Change", "Description", "Analogy"],
["Thimble pitting", "Tiny pits/depressions on nail surface", "Like a sewing thimble surface"],
["Onycholysis", "Distal separation of nail plate from nail bed", "Like a floor tile lifting off"],
["Oil drop sign", "Yellow-brown discoloration under nail plate", "Looks like an oil drop under nail"],
["Subungual hyperkeratosis", "Thickening of tissue under nail", "Nail stuffed with thick material"],
["Onychodystraphy", "Thickened, deformed nail overall", "Complete nail destruction"],
]
story.append(make_table(nail_data[0], nail_data[1:], col_widths=[4.5*cm, 7*cm, 5.9*cm]))
story.append(sp(6))
story.append(info_box("For diagnosis of nail psoriasis: >6 nails must be involved, each nail having >20 pits.", bg=YELLOW_BG, border=ORANGE))
story.append(sp(10))
story.append(Paragraph("Psoriatic Arthropathy:", h2))
story.append(bul("Occurs in 5-10% of psoriatic patients"))
story.append(bul("Usually develops several years after skin lesions appear"))
story.append(bul("Most patients will have nail changes"))
story.append(bul("It is a form of chronic seronegative spondyloarthropathy (see Chapter 8)"))
story.append(PageBreak())
# โโ SECTION 7: INVESTIGATIONS โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(section_header("7. INVESTIGATIONS & DIAGNOSIS"))
story.append(sp(8))
story.append(info_box("In most cases, the diagnosis can be made based on history and physical examination alone. Biopsy is seldom necessary.", bg=GREEN_BG, border=TEAL))
story.append(sp(8))
story.append(Paragraph("Associated Comorbidities to Screen For:", h3))
comorbidities = [
"Metabolic syndrome",
"Ulcerative colitis",
"Crohn's disease",
"Coronary artery disease",
"Lymphoma",
"HIV infection (increases association and severity)",
]
for c in comorbidities:
story.append(bul(c))
story.append(PageBreak())
# โโ SECTION 8: TREATMENT โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(section_header("8. MANAGEMENT OF PSORIASIS"))
story.append(sp(8))
story.append(Paragraph("Treatment is divided into 4 broad categories:", body))
story.append(sp(4))
cats = Table([
[Paragraph("<b>(1) Topical Agents</b>", S("c", fontSize=10, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER)),
Paragraph("<b>(2) Phototherapy (UV)</b>", S("c2", fontSize=10, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER)),
Paragraph("<b>(3) Systemic Agents</b>", S("c3", fontSize=10, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER)),
Paragraph("<b>(4) Biologics</b>", S("c4", fontSize=10, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER)),
]
], colWidths=[4.35*cm, 4.35*cm, 4.35*cm, 4.35*cm])
cats.setStyle(TableStyle([
("BACKGROUND", (0,0), (0,0), TEAL),
("BACKGROUND", (1,0), (1,0), ORANGE),
("BACKGROUND", (2,0), (2,0), NAVY),
("BACKGROUND", (3,0), (3,0), colors.HexColor("#6A1B9A")),
("TOPPADDING", (0,0), (-1,-1), 10),
("BOTTOMPADDING", (0,0), (-1,-1), 10),
("ALIGN", (0,0), (-1,-1), "CENTER"),
("ROUNDEDCORNERS", [4]),
("INNERGRID", (0,0), (-1,-1), 1, WHITE),
]))
story.append(cats)
story.append(sp(10))
# STEP 1
story.append(Paragraph("STEP 1 โ Topical Treatments (First-line for mild-moderate disease)", h2))
step1_data = [
["Drug", "Mechanism / Notes", "Use"],
["Emollients / Moisturizers\n(Petroleum jelly, thick creams)", "Hydrate skin; reduce scaling\nMost effective after hydrating bath/shower", "All severity levels โ baseline therapy"],
["Topical Corticosteroids\n(e.g. Betamethasone 0.5%)", "Anti-inflammatory; mainstay of treatment\nHigh-potency for thick plaques on extensor surfaces\nLow-potency (e.g. 0.05% fluocinonide) for face/folds", "First-line for most cases"],
["Coal Tar", "Anti-inflammatory and antiproliferative\nUsually combined with steroids", "Mild-moderate; also used in phototherapy regimens"],
["Calcipotriene / Calcitriol\n(Vitamin D3 analog)", "Affects growth and differentiation of keratinocytes\nSlows down cell overproduction", "Good alternative or add-on to steroids"],
["Tazarotene\n(Topical retinoid)", "Vitamin A derivative; normalizes keratinocyte differentiation", "Moderate plaque psoriasis"],
["Topical Calcineurin Inhibitors\n(Tacrolimus, Pimecrolimus)", "Immunosuppressant; blocks T-cell activation", "Face and intertriginous areas (sensitive skin)"],
["Salicylic Acid", "Keratolytic โ softens and removes scales\nAllows other topical meds to penetrate better", "Always use BEFORE other topicals"],
["Topical Anthralin", "Antiproliferative; reduces keratinocyte turnover", "Short-contact therapy for scalp"],
]
story.append(make_table(step1_data[0], step1_data[1:], col_widths=[4.5*cm, 8.5*cm, 4.4*cm]))
story.append(sp(10))
# STEP 2
story.append(Paragraph("STEP 2 โ Phototherapy (Moderate-extensive disease)", h2))
story.append(info_box("Mechanism: Effect likely through immunomodulatory properties (induces apoptosis of T-cells, reduces inflammatory cytokines)", bg=LIGHT_BG, border=TEAL))
story.append(sp(6))
step2_data = [
["Modality", "Details", "Key Points"],
["Sunlight", "Careful sun exposure may improve psoriasis", "Sunburn may exacerbate!"],
["UVB (295-320 nm) Broadband", "Erythema-inducing doses 3-5x/week until remission", "Moderate to extensive disease"],
["UVB Narrow Band (311 nm)", "More effective than broadband; induces T-cell apoptosis", "Preferred over broadband; fewer sessions"],
["PUVA\n(Psoralen + UVA 320-400 nm)", "Oral psoralen (8-MOP) then UVA exposure.\nPsoralen intercalates DNA; UVA cross-links DNA strands โ stops cell division.\n75% patients show marked improvement.\nโ Risk: cataract, pigmentation, premature ageing, skin cancer", "Used when UVB fails (moderate-severe)\nOther uses: vitiligo, mycosis fungoides, atopic dermatitis"],
["Excimer Laser (308 nm)", "High-energy laser targeting only involved skin", "Treats only plaques; spares normal skin"],
["Goeckerman Regimen", "UVB + Coal tar", "Classic combination therapy"],
["Ingram Regimen", "Coal tar + UVB + Dithranol", "Second classic regimen"],
]
story.append(make_table(step2_data[0], step2_data[1:], col_widths=[4*cm, 9*cm, 4.4*cm]))
story.append(sp(8))
story.append(tip_box("PUVA memory: P = Psoralen (plant drug) | U = Ultraviolet | V = Very effective (75%) | A = UVA light (320-400 nm)"))
story.append(PageBreak())
# STEP 3
story.append(section_header("STEP 3 โ Systemic Therapy (Severe / Refractory disease)", bg=colors.HexColor("#6A1B9A")))
story.append(sp(8))
step3_data = [
["Drug", "Class / Mechanism", "Indications", "Key Side Effects / Notes"],
["Methotrexate", "Folate antagonist; inhibits rapidly dividing cells", "Severe psoriasis, psoriatic arthritis, nail disease, erythrodermic & pustular variants", "Teratogen! Hepatotoxicity. Can combine with UVB/PUVA"],
["Acitretin", "Vitamin A analog (retinoid); regulates keratinocyte growth & differentiation", "Severe psoriasis, especially pustular and erythrodermic types", "Teratogen โ contraindicated in pregnancy and for 3 years after stopping. Avoid excess sun/alcohol"],
["Cyclosporine", "T-cell suppressor; calcineurin inhibitor", "Severe psoriasis not responding to other agents", "Nephrotoxicity, hypertension; short-term use"],
["Apremilast", "Phosphodiesterase-4 (PDE4) inhibitor; reduces inflammatory signals", "Moderate-to-severe plaque psoriasis", "Oral; GI side effects initially. No lab monitoring required"],
]
story.append(make_table(step3_data[0], step3_data[1:], col_widths=[3*cm, 4.5*cm, 5*cm, 4.9*cm]))
story.append(sp(8))
story.append(warning_box("Both Methotrexate and Acitretin are TERATOGENS. Always confirm the patient is not pregnant before prescribing."))
story.append(sp(10))
# Biologics box
story.append(Paragraph("STEP 4 โ Biological Therapies (targeting specific cytokines)", h2))
bio_data = [
["Drug Class", "Targets", "Examples"],
["TNF-ฮฑ inhibitors", "Tumor necrosis factor-alpha", "Etanercept, Infliximab, Adalimumab"],
["IL-12/23 inhibitors", "IL-12 and IL-23 (p40 subunit)", "Ustekinumab"],
["IL-17 inhibitors", "IL-17A", "Secukinumab, Ixekizumab"],
["IL-23 inhibitors", "IL-23 (p19 subunit)", "Guselkumab, Risankizumab"],
]
story.append(make_table(bio_data[0], bio_data[1:], col_widths=[5*cm, 6*cm, 6.4*cm]))
story.append(PageBreak())
# โโ SECTION 9: QUICK REVISION โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(section_header("9. QUICK REVISION โ MNEMONICS & MEMORY TABLES"))
story.append(sp(8))
story.append(Paragraph("PSORIASIS Mnemonic:", h2))
mnemo = [
["Letter", "Stands For"],
["P", "Plaques โ silvery, well-defined"],
["S", "Scalp, Skin, nails involved"],
["O", "On extensor surfaces (elbows, knees)"],
["R", "Red base under silvery scales"],
["I", "Immune-mediated (T-cells + cytokines)"],
["A", "Auspitz sign โ hallmark sign (pinpoint bleeding)"],
["S", "Speeds up cell turnover (4 days vs 27 days normal)"],
["I", "Itchy (sometimes); chronic fluctuating course"],
["S", "Silvery scales โ hallmark feature"],
]
story.append(make_table(mnemo[0], mnemo[1:], col_widths=[2*cm, 15.4*cm]))
story.append(sp(10))
story.append(Paragraph("Key Numbers to Remember:", h2))
numbers = [
["Value", "What it represents"],
["90%", "Plaque psoriasis (psoriasis vulgaris) accounts for 90% of all cases"],
["4 days", "Epidermal turnover time in psoriasis (vs. 27 days normal)"],
["36 hours", "Cell cycle time for keratinocytes in psoriasis (vs. 311 hours normal)"],
[">50%", "Patients with positive family history"],
["9", "Number of susceptibility genes (PSORS1-PSORS9)"],
["6p21.3", "Chromosome location of the most important gene PSORS1"],
["5-10%", "Patients who develop psoriatic arthropathy"],
[">6 nails, >20 pits", "Criteria for diagnosing nail psoriasis"],
["75%", "Patient improvement rate with PUVA therapy"],
["3 years", "Duration after stopping Acitretin before pregnancy is safe"],
]
story.append(make_table(numbers[0], numbers[1:], col_widths=[4.5*cm, 12.9*cm]))
story.append(PageBreak())
# โโ SECTION 10: EXAM TIPS โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(section_header("10. HIGH-YIELD EXAM POINTS", bg=ORANGE))
story.append(sp(8))
exam_points = [
"Auspitz sign = pathognomonic for psoriasis (pinpoint bleeding after scale removal)",
"Last membrane phenomenon = pathognomonic (last wet layer adherent to lesion = deepest layer of dermal papillae)",
"Munro's microabscesses on histology = pathognomonic for psoriasis",
"PSORS1 on chromosome 6p21.3 = most important susceptibility gene",
"Koebner phenomenon: also seen in vitiligo, lichen planus, warts โ but classic for psoriasis",
"Guttate psoriasis is triggered by Streptococcal throat infection (most common trigger in children)",
"Von Zumbusch (generalized pustular) and Erythrodermic psoriasis = MEDICAL EMERGENCIES",
"Methotrexate is teratogenic โ contraindicated in pregnancy",
"Acitretin: pregnancy contraindicated for 3 years after stopping (due to long half-life)",
"PUVA = Psoralen (8-methoxypsoralen) + UVA (320-400 nm); risk of skin cancer with long-term use",
"Goeckerman regimen = UVB + Coal tar | Ingram regimen = Coal tar + UVB + Dithranol",
"For nail psoriasis diagnosis: >6 nails involved, each with >20 pits",
"Psoriatic arthropathy = chronic seronegative spondyloarthropathy (RF negative)",
"PUVA also used for: vitiligo, mycosis fungoides, atopic dermatitis, senile pruritus",
"Inverse psoriasis = NO silvery scales (moisture in skin folds prevents scaling)",
]
for i, pt in enumerate(exam_points, 1):
story.append(Paragraph(f"<b>{i}.</b> {pt}", bullet))
story.append(sp(2))
story.append(sp(10))
story.append(hr())
story.append(Paragraph("Study Guide prepared from Chapter 19: Dermatology, Venereology and Leprosy โ Standard Medical Textbook", caption))
story.append(Paragraph("For educational purposes only. Always refer to current clinical guidelines for patient care.", caption))
# โโ BUILD PDF โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
doc.build(story)
print(f"PDF created: {OUTPUT}")
cd /home/daytona/workspace/psoriasis-study-guide && python generate_pdf.py 2>&1
ls -lh /home/daytona/workspace/psoriasis-study-guide/Psoriasis_Study_Guide.pdf
Psoriasis Study Guide
PDF Document ยท PDF
| Section | Content |
|---|---|
| Cover Page | Title + Quick Facts table (prevalence, onset, key signs) |
| 1. Etiology | Genetic factors (PSORS genes) + Environmental triggers with memory tips |
| 2. Pathogenesis | Step-by-step immune pathway (T-cells, cytokines, IL-12, IL-17, TNF-ฮฑ) |
| 3. Pathology | Histological features (Munro's microabscesses, spongiform pustules, parakeratosis) |
| 4. Clinical Features | Auspitz sign steps, Woronoff's sign, Koebner phenomenon, other classic signs |
| 5. Types of Psoriasis | All 7 types with key features, special notes, and memory tips |
| 6. Nail & Joint Changes | 5 nail changes with analogies + psoriatic arthropathy |
| 7. Investigations | Diagnosis approach + comorbidities to screen for |
| 8. Treatment | Full 4-step management: Topical โ Phototherapy โ Systemic โ Biologics |
| 9. Mnemonics | PSORIASIS mnemonic + all key numbers to remember |
| 10. Exam High-Yield Points | 15 most important exam facts |
Atopic dermatitis nd sebboric dermatitis notes for exam