Make long answer notes on malignant syphilis

Reading File
Finding Sources
Finding Sources
Searching PubMed

"malignant syphilis" OR "lues maligna"

Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading Article

PMID: 36250867

Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
Loading Image
I now have all the information needed for comprehensive, long-answer notes. Let me compile them:

Malignant Syphilis (Lues Maligna) - Long Answer Notes


1. Definition and Overview

Malignant syphilis, also known as lues maligna or ulceronodular syphilis, is a rare and severe variant of secondary syphilis. It is characterized by disseminated ulceronecrotic skin lesions, marked systemic constitutional symptoms, and is strongly associated with immunocompromise - most commonly HIV co-infection.
It has been called "the great imitator" in its most aggressive form, mimicking many conditions including deep fungal infections, lymphoma, vasculitis, and pyoderma gangrenosum.
A 2023 review (Karanfilian et al., Int J Dermatol 2023) proposed an expanded definition to include systemic organ manifestations beyond skin, reflecting how the disease presents in the modern HIV era (PMID: 36250867).

2. Etiology and Pathogen

  • Causative organism: Treponema pallidum subspecies pallidum - a delicate, spiral-shaped, motile spirochete
  • Length: 5-20 µm; diameter: 0.2-0.3 µm
  • Cannot be cultured in vitro
  • Obligate intracellular pathogen; highly temperature-sensitive
  • Disseminates hematogenously within hours of inoculation; reaches the brain within 18 hours
  • Expresses very few surface antigens (~1% as many as E. coli), and outer membrane proteins undergo rapid antigenic variation, allowing immune evasion
  • The genome has ~1/4 the number of genes of most bacteria, with limited metabolic capacity

3. Epidemiology and Risk Factors

  • Extremely rare in immunocompetent individuals
  • Rising incidence parallels the global resurgence of syphilis, particularly among men who have sex with men (MSM) and HIV-positive individuals
  • Strongly associated with HIV co-infection - people with HIV have a higher likelihood, earlier onset, and greater severity
  • Also described in patients on immunosuppressive therapy, organ transplant recipients, and those with other causes of immunodeficiency
  • Riskier sexual behaviors (partly linked to PrEP uptake) and possible partial immune impairment by ART are thought to contribute to rising rates
  • The risk of acquiring syphilis from sexual contact with an infected partner in the prior 30 days is 16%-30%
Sources: Dermatology 2-Volume Set 5e; Fitzpatrick's Dermatology; Andrews' Diseases of the Skin

4. Pathophysiology

4a. Underlying Mechanism

Malignant syphilis occurs due to the necrotizing vasculitis triggered by T. pallidum in the setting of immune dysregulation:
  • In secondary syphilis, treponemes disseminate via the bloodstream and lymphatics 3-10 weeks after the primary chancre
  • In immunocompromised hosts, the normal host immune response is impaired, leading to exuberant and uncontrolled tissue destruction
  • The key histopathological hallmark is vasculitis (unlike ordinary secondary syphilis which shows perivascular/lichenoid/nodular dermal infiltrates)
  • Vasculitis leads to ischemic necrosis of affected tissue - explaining the ulcerative and necrotic nature of lesions

4b. Histopathology

FeatureOrdinary Secondary SyphilisLues Maligna
EpidermisNormal / psoriasiformNecrotic / ulcerated
Dermal infiltratePlasma cells, lymphocytes, histiocytes (perivascular, lichenoid, or nodular)Plasma cells + vasculitis
Vascular changesEndothelial swellingNecrotizing vasculitis
SpirochetesIdentified by immunohistochemistry in majorityDetectable by IHC
GranulomasPossible in older lesionsAbsent (tertiary pattern)
  • Spirochetes can be identified by immunohistochemistry (method of choice) or Warthin-Starry silver stain
  • Lues maligna is specifically characterized by vasculitis on biopsy - this distinguishes it from other secondary syphilis patterns
Source: Dermatology 2-Volume Set 5e, p. 1751

5. Clinical Features

5a. Prodromal Systemic Symptoms (Precede Skin Lesions)

The prodrome typically precedes the cutaneous eruption and includes:
  • High fever (often unexplained)
  • Headache
  • Arthralgia and myalgia
  • Photophobia
  • Malaise, weight loss
  • Sore throat, adenopathy

5b. Cutaneous Manifestations

The skin lesions are the hallmark of lues maligna and are distinct from typical secondary syphilis:
  • Begin as papules and pustules, progressing to necrotic nodules with ulceration and crusting
  • Lesions resemble primary chancres - deep, indurated ulcers (unlike typical secondary syphilids)
  • Described as "rupioid" - covered by thick, dirty, oyster shell-like crusts
  • Symmetrically distributed
  • Frequently involves the palms and sometimes the oral mucosa
  • Lesions heal with scarring (unlike typical secondary syphilis) - a distinctive feature
  • Hair loss within nodulo-ulcerative lesions heals with cicatricial (scarring) alopecia - a third type of syphilitic alopecia beyond the classic "moth-eaten" and diffuse types
Less common manifestations of secondary syphilis including malignant syphilis lesions (E: necrotic lesion with scale-crust; F: multiple necrotic, ulcerated and crusted lesions)
Image: Panels E and F show necrotic, ulcerated and crusted lesions of malignant syphilis. Source: Dermatology 2-Volume Set 5e

5c. Systemic / Organ Manifestations

A 2023 review proposed expanding the definition of malignant syphilis to include systemic organ involvement beyond skin. Recognized systemic features include:
SystemManifestations
NeurologicalNeurosyphilis, meningitis, stroke, cranial neuropathies, deafness
OcularUveitis, iritis, neuroretinitis, optic neuritis ("otosyphilis")
MusculoskeletalArthralgia, myalgia, bone pain
RenalNephrotic syndrome
CardiovascularCardiovascular syphilis (later)
HepaticHepatitis
PulmonaryRespiratory involvement
RectalProctitis
  • Neurosyphilis rate may be as high as 1% in HIV-positive patients with syphilis
  • Neurosyphilis can present as: asymptomatic, acute meningitis, stroke, deafness, or cranial nerve palsies

6. Laboratory Diagnosis

6a. Serological Tests

TestTypeFeatures in Lues Maligna / HIV
VDRL / RPR (non-treponemal)Cardiolipin antibody (IgG/IgM)Usually positive in secondary syphilis; may be falsely negative due to prozone phenomenon
FTA-ABS (fluorescent treponemal antibody)Specific treponemalUsually positive; may be negative in advanced HIV immunodeficiency
TPHA / MHA-TPSpecific treponemal hemagglutinationUsually remains positive for life
Critical caveat in HIV co-infection:
  • False-positive VDRL can occur due to polyclonal B-cell activation
  • False-negative VDRL / RPR can occur due to:
    1. Prozone phenomenon: massively elevated antibody titers paradoxically impair the agglutination assay
    2. Delayed antibody formation due to immune deficiency
    3. The anti-FTA test itself may be negative in advanced immunodeficiency
  • A high index of suspicion is mandatory - negative serology does not exclude the diagnosis

6b. Microbiological / Tissue Diagnosis

  • Darkfield microscopy: Demonstrates motile treponemes from skin/mucosal exudates (NOT from oral lesions - due to commensal oral treponemes)
  • Direct fluorescent antibody testing (DFA): Confirms darkfield findings
  • Skin biopsy with immunohistochemistry (IHC): Gold standard for tissue diagnosis; identifies spirochetes in the majority of cases
  • PCR-based assays for T. pallidum: Increasingly available; useful when serology is non-reactive
  • Warthin-Starry silver stain: Alternative if IHC is unavailable

6c. Additional Workup

  • HIV testing: Mandatory in all syphilis cases
  • Lumbar puncture (CSF analysis): Indicated when:
    • Neurological symptoms (headache, hearing loss, cranial neuropathies)
    • Ocular symptoms
    • Treatment failure suspected (persistent/recurrent signs or failure of titers to fall fourfold within 6-12 months)
    • HIV-positive with CD4 <350 cells/mL and/or RPR titer ≥1:32
    • New diagnosis of syphilis with advanced HIV disease
  • Ophthalmologic evaluation (slit-lamp): If photophobia or visual changes present
  • Otological exam: If hearing loss or vertigo present
  • Note: CSF evaluation in patients with only otosyphilis does not assist in management - lumbar puncture not recommended for isolated ear involvement

7. Differential Diagnosis

Malignant syphilis is a notorious mimic. The differential includes:
Skin-focused differentials:
  • Ecthyma gangrenosum (Pseudomonas sepsis)
  • Deep fungal infections (histoplasmosis, cryptococcosis, aspergillosis)
  • Non-tuberculous mycobacterial skin infections
  • Kaposi sarcoma (particularly in HIV)
  • Pyoderma gangrenosum
  • Vasculitis (leukocytoclastic, polyarteritis nodosa)
  • Atypical cutaneous lymphoma
  • Nodular secondary syphilis (without ulceration)
Systemic differentials:
  • Lymphoma (can be confused with nodal and systemic involvement)
  • Bacillary angiomatosis (Bartonella sp.)
  • CMV infection with cutaneous ulceration
A 2025 review specifically described a case of malignant syphilis mimicking lymphoma in an HIV patient (PMID: 40431141).
Key differentiating features of lues maligna:
  • Positive serology (usually, but prozone caveat applies)
  • Spirochetes on biopsy/IHC
  • Dramatic response to penicillin
  • Constitutional prodrome preceding skin lesions

8. Management

8a. Antimicrobial Treatment

Penicillin G remains the treatment of choice for all stages of syphilis, including malignant syphilis:
SettingRegimen
Primary / Secondary / Early Latent syphilisBenzathine penicillin G 2.4 MU IM × single dose
Late latent / Unknown durationBenzathine penicillin G 2.4 MU IM weekly × 3 doses
NeurosyphilisAqueous crystalline penicillin G 18-24 MU IV daily × 10-14 days (as 3-4 MU IV every 4 hours or continuous infusion)
Penicillin allergy (non-pregnant)Doxycycline 100 mg PO twice daily × 14 days (early); or desensitization preferred for late/neurosyphilis
Retreat if treatment failureBenzathine penicillin G 2.4 MU IM weekly × 3 weeks
Notes on treatment in HIV:
  • CDC and IUSTI recommend the same syphilis regimens for HIV-positive and HIV-negative patients
  • HIV-infected patients have higher rates of treatment failure with single-dose IM penicillin for primary/secondary syphilis, but alternative regimens have not proven superior
  • Treponemicidal penicillin level: >0.018 mg/L serum (maximally effective in vitro: 0.36 mg/L)
  • No tendency toward penicillin resistance has been detected in T. pallidum
  • Azithromycin 2 g single dose can be effective, but treatment failures due to macrolide-resistant T. pallidum have been reported - use with caution

8b. Jarisch-Herxheimer Reaction

  • An acute systemic reaction that occurs upon initiation of antibiotic therapy for early syphilis
  • Characterized by: acute fever, headache, myalgias (within 2-8 hours of first dose)
  • Mechanism: massive release of cytokines from dying spirochetes
  • More common in HIV patients (~1/3 will experience this reaction with syphilis treatment)
  • Also more common in HIV patients in general; adverse reactions to syphilis therapy are more frequent
  • In pregnancy: can precipitate preterm labor or fetal distress if it occurs in the second half of pregnancy
  • Self-limiting; managed with antipyretics

8c. Sexual Partners

  • Identify and test all sexual partners
  • Partners exposed within 90 days of primary, secondary, or early latent syphilis diagnosis should be treated presumptively, even if seronegative
  • Partners exposed >90 days ago: treat presumptively if follow-up is uncertain
  • If infectious source RPR titer >1:32 → presume infectious early syphilis → treat partners

9. Monitoring and Follow-up

9a. Serological Follow-up

GuidelineSchedule
CDCClinical and serological at 6 and 12 months (uncomplicated); more frequent for HIV+ patients (3, 6, 9, 12, 24 months)
IUSTINon-treponemal tests at 1, 2, 3, 6 months after early syphilis; then every 6 months for up to 2 years; late syphilis: every 6 months for up to 3 years
  • Treatment success: ≥4-fold (2-dilution) decline in non-treponemal titer
  • Treatment failure / reinfection: ≥4-fold rise in titer
  • Failure to decline 4-fold within 6-12 months: may indicate failure (but 15-20% of treated primary/secondary syphilis will not achieve this at 1 year)
  • Titers may decline more slowly in HIV-positive patients
  • Serofast state: Persistently reactive VDRL without evidence of active infection; more common in late syphilis - retreatment decision individualized
  • Specific treponemal tests (FTA-ABS, MHA-TP) may serorevert in ~24-13% by 36 months

9b. CSF Monitoring

If CSF was abnormal at baseline (neurosyphilis):
  • Lumbar puncture every 6 months until cell counts normalize and CSF-VDRL is negative

9c. HIV Interaction Surveillance

  • Syphilis transiently increases HIV viral load and decreases CD4+ T-cell count during infection; resolves with treatment
  • Syphilis is associated with HIV acquisition (genital ulcers disrupt barriers and attract HIV target cells)
  • HIV-infected patients should be screened for syphilis at entry into HIV care, and annually (or every 3-6 months in high-risk individuals)
  • "Neurorelapse" can occur: development of neurosyphilis following apparently appropriate treatment for primary/secondary/early latent syphilis - monitor carefully

10. Special Considerations

Syphilis-HIV Bidirectional Interaction

  • HIV impairs immunity → more severe syphilis manifestations (lues maligna, condyloma lata, neurosyphilis)
  • Syphilis impairs HIV control → decreased CD4, increased viral load
  • Syphilis enhances HIV transmission: via mucosal barrier disruption and mononuclear cells with enhanced CCR5 (HIV co-receptor) expression in syphilitic lesions
  • HIV-infected patients present more often with secondary syphilis at the time of diagnosis; are more likely to have a persistent chancre overlapping with secondary syphilis signs (43% vs. 15% in HIV-negative)

Alopecia in Lues Maligna

Three types of syphilitic alopecia are recognized:
  1. Non-scarring "moth-eaten" patchy alopecia (classic secondary syphilis)
  2. Diffuse non-scarring alopecia
  3. Cicatricial (scarring) alopecia - seen specifically in lues maligna, within nodulo-ulcerative lesions; this heals with permanent scarring

Updated Definition (Karanfilian et al., 2023)

The original definition of malignant syphilis was limited to cutaneous manifestations. With the modern HIV-syphilis co-epidemic, the definition has been proposed to be expanded to include systemic manifestations: musculoskeletal, CNS, ocular, aural, cardiovascular, rectal, hepatic, pulmonary, and renal involvement. This broader definition may prevent devastating long-term complications through earlier recognition.

11. Summary Table

FeatureDetail
DefinitionRare, severe form of secondary syphilis with ulceronecrotic skin lesions + systemic symptoms
SynonymLues maligna, ulceronodular syphilis
Causative organismTreponema pallidum subspecies pallidum
Key risk factorHIV co-infection / immunocompromise
StageSecondary syphilis
ProdromeFever, headache, arthralgia, myalgia, photophobia
Skin lesionPapules → pustules → necrotic nodules with ulceration and crusting (rupioid); resemble chancres
DistributionSymmetrical; palms and oral mucosa often involved
ScarringYes - heals with scars (unlike typical secondary syphilis)
Histopathology hallmarkNecrotizing vasculitis
Spirochete detectionImmunohistochemistry / IHC of biopsy
Serology pitfallFalse-negative RPR/VDRL due to prozone phenomenon or immune deficiency
TreatmentBenzathine penicillin G 2.4 MU IM (early); aqueous penicillin IV for neurosyphilis
Treatment complicationJarisch-Herxheimer reaction (especially common in HIV; ~1/3 affected)
DifferentialLymphoma, vasculitis, deep fungal infection, KS, pyoderma gangrenosum

Sources:
  • Dermatology 2-Volume Set 5e (Chs. 78, 82)
  • Fitzpatrick's Dermatology, Volume 1 & 2 (Ch. 170)
  • Andrews' Diseases of the Skin, Clinical Dermatology
  • Harrison's Principles of Internal Medicine, 22nd Edition
  • Andrews' Diseases of the Skin Clinical Atlas, 2e
  • Karanfilian KM et al. "Malignant syphilis: a new and revised definition." Int J Dermatol 2023 (PMID: 36250867)
  • Maci C et al. "Malignant syphilis mimicking lymphoma in HIV." Microorganisms 2025 (PMID: 40431141)

Create a Word document summary of malignant syphilis for clinical reference

Reading File
Running Command

mkdir -p /home/daytona/workspace/malignant-syphilis && ls /home/daytona/workspace/malignant-syphilis

Writing File

~/malignant-syphilis/generate.js

const {
  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
  HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
  VerticalAlign, PageNumber, Header, Footer, TableOfContents,
  PageBreak, UnderlineType
} = require('docx');
const fs = require('fs');

// ── Colour palette ──────────────────────────────────────────────
const DARK_NAVY   = "1B3A5C";
const MID_BLUE    = "2E6DA4";
const LIGHT_BLUE  = "D6E4F0";
const ACCENT_RED  = "C0392B";
const TABLE_HEADER_BG = "2E6DA4";
const TABLE_ALT_BG    = "EAF2FB";
const WHITE = "FFFFFF";

// ── Helper: coloured heading ────────────────────────────────────
function heading1(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_1,
    spacing: { before: 360, after: 120 },
    border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: MID_BLUE } },
    children: [
      new TextRun({
        text,
        bold: true,
        color: DARK_NAVY,
        size: 28,
        font: "Calibri",
      }),
    ],
  });
}

function heading2(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_2,
    spacing: { before: 240, after: 80 },
    children: [
      new TextRun({
        text,
        bold: true,
        color: MID_BLUE,
        size: 24,
        font: "Calibri",
      }),
    ],
  });
}

function heading3(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_3,
    spacing: { before: 180, after: 60 },
    children: [
      new TextRun({
        text,
        bold: true,
        color: ACCENT_RED,
        size: 22,
        font: "Calibri",
      }),
    ],
  });
}

// ── Helper: body paragraph ─────────────────────────────────────
function body(text, { bold = false, italic = false, indent = false } = {}) {
  return new Paragraph({
    spacing: { after: 100 },
    indent: indent ? { left: 400 } : undefined,
    children: [
      new TextRun({
        text,
        bold,
        italic,
        size: 22,
        font: "Calibri",
        color: "2C2C2C",
      }),
    ],
  });
}

// ── Helper: bullet point ───────────────────────────────────────
function bullet(text, level = 0) {
  return new Paragraph({
    bullet: { level },
    spacing: { after: 80 },
    indent: { left: 400 + level * 360, hanging: 260 },
    children: [
      new TextRun({
        text,
        size: 22,
        font: "Calibri",
        color: "2C2C2C",
      }),
    ],
  });
}

// ── Helper: warning / callout box ─────────────────────────────
function callout(text, { bg = "FFF3CD", borderColor = "FFC107", label = "NOTE" } = {}) {
  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { fill: bg, type: ShadingType.CLEAR, color: "auto" },
            borders: {
              top: { style: BorderStyle.SINGLE, size: 4, color: borderColor },
              bottom: { style: BorderStyle.SINGLE, size: 4, color: borderColor },
              left: { style: BorderStyle.THICK, size: 12, color: borderColor },
              right: { style: BorderStyle.SINGLE, size: 4, color: borderColor },
            },
            margins: { top: 100, bottom: 100, left: 200, right: 200 },
            children: [
              new Paragraph({
                children: [
                  new TextRun({ text: `${label}: `, bold: true, size: 22, font: "Calibri", color: "7B4000" }),
                  new TextRun({ text, size: 22, font: "Calibri", color: "2C2C2C" }),
                ],
              }),
            ],
          }),
        ],
      }),
    ],
  });
}

// ── Helper: generic 2-column table ────────────────────────────
function twoColTable(rows, { headerBg = TABLE_HEADER_BG, altBg = TABLE_ALT_BG } = {}) {
  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: rows.map(([col1, col2], i) => {
      const isHeader = i === 0;
      const rowBg = isHeader ? headerBg : (i % 2 === 0 ? WHITE : altBg);
      const textColor = isHeader ? WHITE : "2C2C2C";
      const isBold = isHeader;
      return new TableRow({
        children: [col1, col2].map((txt) =>
          new TableCell({
            shading: { fill: rowBg, type: ShadingType.CLEAR, color: "auto" },
            borders: {
              top: { style: BorderStyle.SINGLE, size: 2, color: "CCCCCC" },
              bottom: { style: BorderStyle.SINGLE, size: 2, color: "CCCCCC" },
              left: { style: BorderStyle.SINGLE, size: 2, color: "CCCCCC" },
              right: { style: BorderStyle.SINGLE, size: 2, color: "CCCCCC" },
            },
            margins: { top: 80, bottom: 80, left: 150, right: 150 },
            children: [
              new Paragraph({
                children: [
                  new TextRun({ text: txt, bold: isBold, size: 22, font: "Calibri", color: textColor }),
                ],
              }),
            ],
          })
        ),
      });
    }),
  });
}

// ── Helper: 3-column table ─────────────────────────────────────
function threeColTable(rows) {
  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: rows.map(([c1, c2, c3], i) => {
      const isHeader = i === 0;
      const rowBg = isHeader ? TABLE_HEADER_BG : (i % 2 === 0 ? WHITE : TABLE_ALT_BG);
      const textColor = isHeader ? WHITE : "2C2C2C";
      return new TableRow({
        children: [c1, c2, c3].map((txt) =>
          new TableCell({
            shading: { fill: rowBg, type: ShadingType.CLEAR, color: "auto" },
            borders: {
              top: { style: BorderStyle.SINGLE, size: 2, color: "CCCCCC" },
              bottom: { style: BorderStyle.SINGLE, size: 2, color: "CCCCCC" },
              left: { style: BorderStyle.SINGLE, size: 2, color: "CCCCCC" },
              right: { style: BorderStyle.SINGLE, size: 2, color: "CCCCCC" },
            },
            margins: { top: 80, bottom: 80, left: 150, right: 150 },
            children: [
              new Paragraph({
                children: [
                  new TextRun({ text: txt, bold: isHeader, size: 22, font: "Calibri", color: textColor }),
                ],
              }),
            ],
          })
        ),
      });
    }),
  });
}

function spacer() {
  return new Paragraph({ spacing: { after: 160 }, children: [new TextRun("")] });
}

function pageBreak() {
  return new Paragraph({ children: [new PageBreak()] });
}

// ─────────────────────────────────────────────────────────────────
//  DOCUMENT CONTENT
// ─────────────────────────────────────────────────────────────────

const children = [];

// ── TITLE PAGE ───────────────────────────────────────────────────
children.push(
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { before: 1200, after: 200 },
    children: [
      new TextRun({
        text: "MALIGNANT SYPHILIS",
        bold: true,
        size: 52,
        font: "Calibri",
        color: DARK_NAVY,
      }),
    ],
  }),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { after: 200 },
    children: [
      new TextRun({
        text: "Lues Maligna",
        bold: false,
        italics: true,
        size: 36,
        font: "Calibri",
        color: MID_BLUE,
      }),
    ],
  }),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { after: 400 },
    children: [
      new TextRun({
        text: "Clinical Reference Summary",
        size: 26,
        font: "Calibri",
        color: "666666",
      }),
    ],
  }),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { after: 100 },
    children: [
      new TextRun({
        text: "─────────────────────────────────",
        size: 24,
        font: "Calibri",
        color: MID_BLUE,
      }),
    ],
  }),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { after: 200 },
    children: [
      new TextRun({
        text: "Sources: Dermatology 2-Vol Set 5e  |  Fitzpatrick's Dermatology  |  Harrison's 22e  |  Andrews' Diseases of the Skin",
        size: 18,
        font: "Calibri",
        color: "888888",
        italics: true,
      }),
    ],
  }),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { after: 200 },
    children: [
      new TextRun({
        text: `Date: ${new Date().toLocaleDateString('en-GB', { day: 'numeric', month: 'long', year: 'numeric' })}`,
        size: 20,
        font: "Calibri",
        color: "888888",
      }),
    ],
  }),
  pageBreak()
);

// ── SECTION 1: DEFINITION & OVERVIEW ────────────────────────────
children.push(
  heading1("1. Definition & Overview"),
  body("Malignant syphilis (lues maligna, ulceronodular syphilis) is a rare and severe variant of secondary syphilis characterized by:"),
  bullet("Disseminated ulceronecrotic skin lesions that resemble primary chancres"),
  bullet("Marked systemic constitutional symptoms"),
  bullet("A predilection for immunocompromised hosts, especially HIV-positive patients"),
  spacer(),
  callout(
    "Malignant syphilis is part of the broader 'great imitator' spectrum of syphilis and must be distinguished from deep fungal infections, lymphoma, vasculitis, and pyoderma gangrenosum.",
    { label: "CLINICAL PEARL" }
  ),
  spacer()
);

// ── SECTION 2: ETIOLOGY & MICROBIOLOGY ─────────────────────────
children.push(
  heading1("2. Etiology & Microbiology"),
  heading2("Causative Organism"),
  body("Treponema pallidum subspecies pallidum - a motile, spiral-shaped spirochete"),
  bullet("Length 5-20 µm; diameter 0.2-0.3 µm"),
  bullet("Cannot be cultured in vitro"),
  bullet("Obligate intracellular pathogen; highly temperature-sensitive"),
  bullet("Disseminates hematogenously within hours of inoculation; reaches the brain within 18 hours"),
  bullet("Expresses very few surface antigens (~1% compared to E. coli)"),
  bullet("Outer membrane proteins undergo rapid antigenic variation, enabling immune evasion"),
  bullet("Genome contains ~1/4 the number of genes of most bacteria (limited metabolic capacity)"),
  spacer()
);

// ── SECTION 3: EPIDEMIOLOGY ──────────────────────────────────────
children.push(
  heading1("3. Epidemiology & Risk Factors"),
  body("Malignant syphilis is extremely rare in immunocompetent individuals. Rising incidence parallels global syphilis resurgence."),
  spacer(),
  twoColTable([
    ["Risk Factor", "Detail"],
    ["HIV co-infection", "Most common; higher likelihood, earlier onset, greater severity"],
    ["MSM (men who have sex with men)", "Predominant affected population in USA and Western Europe"],
    ["Immunosuppressive therapy", "Transplant recipients, chemotherapy patients"],
    ["Other immunodeficiency", "Any cause of impaired cell-mediated immunity"],
    ["Behavioural factors", "Riskier sexual behaviours, partly linked to PrEP uptake"],
    ["Transmission risk", "16%-30% per sexual contact with an infected partner in the prior 30 days"],
  ]),
  spacer()
);

// ── SECTION 4: PATHOPHYSIOLOGY ──────────────────────────────────
children.push(
  heading1("4. Pathophysiology"),
  heading2("Mechanism"),
  body("Malignant syphilis results from necrotizing vasculitis triggered by T. pallidum in the setting of immune dysregulation:"),
  bullet("T. pallidum disseminates via bloodstream and lymphatics 3-10 weeks after primary chancre"),
  bullet("In immunocompromised hosts, normal immune containment fails"),
  bullet("Uncontrolled vasculitic tissue destruction causes ischemic necrosis - explaining ulcerative and necrotic lesions"),
  spacer(),
  heading2("Histopathology"),
  twoColTable([
    ["Feature", "Lues Maligna vs. Ordinary Secondary Syphilis"],
    ["Epidermis", "Necrotic / ulcerated (vs. normal or psoriasiform)"],
    ["Dermal infiltrate", "Plasma cells + VASCULITIS (hallmark) vs. perivascular/lichenoid/nodular infiltrates"],
    ["Vascular changes", "Necrotizing vasculitis (vs. endothelial swelling only)"],
    ["Spirochetes (IHC)", "Detectable in majority of biopsies"],
    ["Granulomas", "Absent (present only in tertiary pattern)"],
  ]),
  spacer(),
  callout(
    "The pathological hallmark of lues maligna is NECROTIZING VASCULITIS on biopsy. This distinguishes it from other patterns of secondary syphilis.",
    { label: "HISTOLOGY KEY POINT", bg: "D6EAF8", borderColor: MID_BLUE }
  ),
  spacer()
);

// ── SECTION 5: CLINICAL FEATURES ────────────────────────────────
children.push(
  heading1("5. Clinical Features"),
  heading2("5a. Prodromal Systemic Symptoms (Precede Skin Lesions)"),
  bullet("High fever (often the first clue)"),
  bullet("Headache"),
  bullet("Arthralgia and myalgia"),
  bullet("Photophobia"),
  bullet("Malaise and weight loss"),
  bullet("Sore throat and adenopathy"),
  spacer(),
  heading2("5b. Cutaneous Manifestations"),
  body("Skin lesions are the hallmark and are distinctly different from typical secondary syphilis:"),
  bullet("Begin as papules and pustules"),
  bullet("Progress to necrotic nodules with ulceration and thick crusting"),
  bullet("Lesions resemble primary chancres (deep, indurated ulcers)"),
  bullet("Described as 'rupioid' - covered by thick, oyster shell-like dirty crusts"),
  bullet("Symmetrically distributed"),
  bullet("Frequently involves the palms; sometimes oral mucosa"),
  bullet("Heals with SCARRING (unlike typical secondary syphilis - this is a key differentiator)"),
  bullet("Cicatricial (scarring) alopecia within lesions - a unique third type of syphilitic alopecia"),
  spacer(),
  heading2("5c. Systemic / Organ Manifestations"),
  body("A 2023 review proposed expanding the definition to include systemic organ manifestations (Karanfilian et al., Int J Dermatol 2023; PMID: 36250867):"),
  spacer(),
  twoColTable([
    ["System", "Manifestations"],
    ["Neurological", "Neurosyphilis, meningitis, stroke, cranial neuropathies, deafness"],
    ["Ocular", "Uveitis, iritis, neuroretinitis, optic neuritis"],
    ["Musculoskeletal", "Arthralgia, myalgia, bone pain"],
    ["Renal", "Nephrotic syndrome"],
    ["Hepatic", "Hepatitis, hepatomegaly"],
    ["Cardiovascular", "Cardiovascular involvement"],
    ["Pulmonary", "Respiratory involvement"],
    ["Rectal", "Proctitis"],
  ]),
  spacer(),
  callout(
    "Neurosyphilis may occur in up to 1% of HIV-positive patients with syphilis. It presents as: asymptomatic, acute meningitis, stroke, deafness, or cranial nerve palsies.",
    { label: "WARNING", bg: "FDECEA", borderColor: ACCENT_RED }
  ),
  spacer()
);

// ── SECTION 6: LABORATORY DIAGNOSIS ─────────────────────────────
children.push(
  heading1("6. Laboratory Diagnosis"),
  heading2("6a. Serological Tests"),
  twoColTable([
    ["Test", "Interpretation & Pitfalls in Lues Maligna / HIV"],
    ["VDRL / RPR (non-treponemal)", "Usually positive in secondary syphilis; may be FALSE-NEGATIVE due to prozone phenomenon"],
    ["FTA-ABS (treponemal)", "Usually positive; may be FALSE-NEGATIVE in advanced HIV immunodeficiency"],
    ["TPHA / MHA-TP (treponemal)", "Usually remains positive for life; most specific"],
    ["False-positive VDRL", "Can occur due to HIV-related polyclonal B-cell activation"],
  ]),
  spacer(),
  callout(
    "PROZONE PHENOMENON: Massively elevated antibody titers in HIV patients paradoxically impair the RPR/VDRL agglutination assay, giving a FALSE-NEGATIVE result. Always request diluted titres if lues maligna is suspected. Never exclude syphilis based on a negative non-treponemal test alone.",
    { label: "CRITICAL PITFALL", bg: "FDECEA", borderColor: ACCENT_RED }
  ),
  spacer(),
  heading2("6b. Microbiological / Tissue Diagnosis"),
  bullet("Darkfield microscopy: Demonstrates motile treponemes from skin/mucosal exudates (NOT from oral lesions - commensal oral treponemes confound results)"),
  bullet("Direct fluorescent antibody testing (DFA): Confirms darkfield findings"),
  bullet("Skin biopsy with immunohistochemistry (IHC): Gold standard for tissue diagnosis; identifies spirochetes in majority of cases"),
  bullet("PCR-based assays for T. pallidum: Increasingly available; useful when serology is non-reactive"),
  bullet("Warthin-Starry silver stain: Alternative if IHC is unavailable"),
  spacer(),
  heading2("6c. Additional Workup"),
  twoColTable([
    ["Investigation", "Indication"],
    ["HIV testing", "MANDATORY in all syphilis cases"],
    ["Lumbar puncture (CSF)", "Neurological or ocular symptoms; treatment failure; HIV+ with CD4 <350 or RPR ≥1:32; unknown-stage syphilis with advanced HIV"],
    ["Slit-lamp ophthalmology", "Photophobia, visual changes (uveitis/iritis screening)"],
    ["Otological examination", "Hearing loss or vertigo"],
    ["RPR titre (diluted)", "When prozone is suspected - request serial dilutions"],
  ]),
  spacer()
);

// ── SECTION 7: DIFFERENTIAL DIAGNOSIS ───────────────────────────
children.push(
  heading1("7. Differential Diagnosis"),
  heading2("Skin-Focused Differentials"),
  bullet("Ecthyma gangrenosum (Pseudomonas sepsis)"),
  bullet("Deep fungal infections: histoplasmosis, cryptococcosis, aspergillosis"),
  bullet("Non-tuberculous mycobacterial skin infections"),
  bullet("Kaposi sarcoma (especially in HIV-positive patients)"),
  bullet("Pyoderma gangrenosum"),
  bullet("Vasculitis (leukocytoclastic, polyarteritis nodosa)"),
  bullet("Atypical cutaneous lymphoma"),
  spacer(),
  heading2("Systemic Differentials"),
  bullet("Lymphoma - lues maligna can mimic lymphoma (case report: PMID 40431141, 2025)"),
  bullet("Bacillary angiomatosis (Bartonella spp.)"),
  bullet("CMV infection with cutaneous ulceration"),
  spacer(),
  heading2("Key Differentiating Features of Lues Maligna"),
  twoColTable([
    ["Feature", "Distinguishes Lues Maligna"],
    ["Serology", "RPR/VDRL positive (with prozone caveat); treponemal tests positive"],
    ["Biopsy / IHC", "Spirochetes visible; necrotizing vasculitis"],
    ["Treatment response", "Dramatic, rapid response to penicillin"],
    ["Clinical course", "Constitutional prodrome BEFORE skin lesions"],
    ["HIV testing", "Very frequently HIV-positive"],
  ]),
  spacer()
);

// ── SECTION 8: MANAGEMENT ────────────────────────────────────────
children.push(
  heading1("8. Management"),
  heading2("8a. Antibiotic Treatment"),
  twoColTable([
    ["Clinical Setting", "Recommended Regimen"],
    ["Primary / Secondary / Early Latent syphilis", "Benzathine penicillin G 2.4 MU IM x single dose"],
    ["Late latent / Unknown duration", "Benzathine penicillin G 2.4 MU IM weekly x 3 doses"],
    ["Neurosyphilis", "Aqueous crystalline penicillin G 18-24 MU IV daily x 10-14 days (3-4 MU IV every 4 hours or continuous infusion)"],
    ["Penicillin allergy (non-pregnant)", "Doxycycline 100 mg PO twice daily x 14 days (early syphilis); desensitization preferred for neurosyphilis"],
    ["Treatment failure / Retreatment", "Benzathine penicillin G 2.4 MU IM weekly x 3 weeks"],
  ]),
  spacer(),
  callout(
    "CDC and IUSTI recommend the SAME syphilis treatment regimens for HIV-positive and HIV-negative patients. No alternative regimen has been shown to be superior in HIV. No penicillin resistance in T. pallidum has been detected.",
    { label: "GUIDELINE NOTE", bg: "D6EAF8", borderColor: MID_BLUE }
  ),
  spacer(),
  callout(
    "Azithromycin 2 g single dose may be effective but TREATMENT FAILURES due to macrolide-resistant T. pallidum have been documented. Use with caution - not first-line.",
    { label: "WARNING", bg: "FDECEA", borderColor: ACCENT_RED }
  ),
  spacer(),
  heading2("8b. Jarisch-Herxheimer Reaction"),
  body("An acute systemic reaction occurring within 2-8 hours of first antibiotic dose. More common in HIV patients (~1/3 affected)."),
  bullet("Symptoms: Acute fever, rigors, headache, myalgias, hypotension"),
  bullet("Mechanism: Massive cytokine release from dying spirochetes"),
  bullet("Management: Antipyretics (paracetamol/acetaminophen); supportive care; self-limiting"),
  bullet("In pregnancy: Can precipitate preterm labour or fetal distress if it occurs in second half of pregnancy"),
  bullet("Adverse reactions to syphilis therapy in general are more frequent in HIV patients"),
  spacer(),
  heading2("8c. Sexual Partner Management"),
  bullet("Identify and test all sexual partners"),
  bullet("Partners exposed within 90 days: treat presumptively even if seronegative"),
  bullet("Partners exposed >90 days: treat presumptively if follow-up is uncertain"),
  bullet("Source RPR titer >1:32: presume infectious early syphilis; treat all at-risk contacts"),
  spacer()
);

// ── SECTION 9: MONITORING & FOLLOW-UP ───────────────────────────
children.push(
  heading1("9. Monitoring & Follow-Up"),
  heading2("9a. Serological Follow-Up Schedule"),
  twoColTable([
    ["Guideline", "Recommended Schedule"],
    ["CDC (HIV-negative)", "Clinical + serological at 6 and 12 months"],
    ["CDC (HIV-positive)", "More frequent: at 3, 6, 9, 12, and 24 months"],
    ["IUSTI (early syphilis)", "Non-treponemal tests at 1, 2, 3, and 6 months; then every 6 months up to 2 years"],
    ["IUSTI (late syphilis)", "Every 6 months for up to 3 years"],
  ]),
  spacer(),
  heading2("9b. Interpreting Titres After Treatment"),
  bullet("Treatment success: >=4-fold (2-dilution) decline in non-treponemal titre"),
  bullet("Treatment failure / reinfection: >=4-fold rise in titre"),
  bullet("15-20% of treated primary/secondary syphilis will NOT achieve 4-fold decline at 1 year - does not automatically indicate failure"),
  bullet("Titres may decline more slowly in HIV-positive patients"),
  bullet("Serofast state: Persistently reactive VDRL without active infection - more common in late syphilis; retreatment decision individualized"),
  spacer(),
  heading2("9c. CSF Monitoring (Neurosyphilis)"),
  bullet("If CSF was abnormal at baseline: lumbar puncture every 6 months"),
  bullet("Until: cell counts normalize AND CSF-VDRL becomes negative"),
  spacer()
);

// ── SECTION 10: SYPHILIS-HIV INTERACTIONS ────────────────────────
children.push(
  heading1("10. Syphilis-HIV Interactions"),
  body("The syphilis-HIV interaction is bidirectional and clinically important:"),
  spacer(),
  heading2("HIV Effect on Syphilis"),
  bullet("HIV-positive patients more likely to present with secondary syphilis at the time of diagnosis (53% vs. 33%)"),
  bullet("More likely to have a persistent chancre overlapping with secondary lesions (43% vs. 15%)"),
  bullet("Higher rates of lues maligna, condyloma lata, and early neurosyphilis"),
  bullet("Syphilis may transiently increase HIV viral load and decrease CD4+ T-cell count"),
  bullet("'Neurorelapse': Neurosyphilis can develop after apparently adequate treatment of primary/secondary syphilis"),
  spacer(),
  heading2("Syphilis Effect on HIV"),
  bullet("Genital ulcers disrupt mucosal barriers -> facilitate HIV acquisition and transmission"),
  bullet("Mononuclear cells in syphilitic lesions show enhanced CCR5 (HIV co-receptor) expression"),
  bullet("Syphilis associated with decreased CD4 counts and increased HIV viral loads"),
  bullet("Common behavioural risk factors (lack of condom use) drive co-infection risk"),
  spacer(),
  callout(
    "All patients presenting with syphilis should be tested for HIV. All HIV-positive patients entering care should have a baseline syphilis serology, repeated annually (or every 3-6 months if high-risk).",
    { label: "SCREENING RECOMMENDATION", bg: "D6EAF8", borderColor: MID_BLUE }
  ),
  spacer()
);

// ── SECTION 11: ALOPECIA IN LUES MALIGNA ────────────────────────
children.push(
  heading1("11. Syphilitic Alopecia: Three Types"),
  twoColTable([
    ["Type", "Description"],
    ["1. Non-scarring moth-eaten alopecia", "Classic secondary syphilis; patchy, non-scarring; reversible"],
    ["2. Diffuse non-scarring alopecia", "Telogen effluvium pattern; reversible"],
    ["3. Cicatricial (scarring) alopecia", "SPECIFIC TO LUES MALIGNA; within nodulo-ulcerative lesions; heals with permanent scarring"],
  ]),
  spacer()
);

// ── SECTION 12: QUICK REFERENCE SUMMARY TABLE ────────────────────
children.push(
  heading1("12. At-a-Glance Summary"),
  twoColTable([
    ["Feature", "Summary"],
    ["Definition", "Rare, severe secondary syphilis with ulceronecrotic lesions + systemic symptoms"],
    ["Synonyms", "Lues maligna, ulceronodular syphilis"],
    ["Causative organism", "Treponema pallidum subspecies pallidum"],
    ["Key risk factor", "HIV co-infection / immunocompromise"],
    ["Stage", "Secondary syphilis"],
    ["Prodrome", "Fever, headache, arthralgia, myalgia, photophobia"],
    ["Skin lesions", "Pustules -> necrotic nodules with ulceration and oyster-shell crusting (rupioid)"],
    ["Distribution", "Symmetrical; palms and oral mucosa often involved"],
    ["Scarring", "YES - heals with scars (unlike typical secondary syphilis)"],
    ["Histopathology hallmark", "Necrotizing vasculitis on biopsy"],
    ["Spirochete detection", "Immunohistochemistry (IHC) of skin biopsy"],
    ["Serology pitfall", "False-negative RPR/VDRL due to prozone phenomenon or immune deficiency"],
    ["First-line treatment", "Benzathine penicillin G 2.4 MU IM (early); aqueous penicillin IV for neurosyphilis"],
    ["Treatment complication", "Jarisch-Herxheimer reaction (~1/3 of HIV patients)"],
    ["Key differentials", "Lymphoma, vasculitis, deep fungal infection, KS, pyoderma gangrenosum"],
  ]),
  spacer()
);

// ── SECTION 13: REFERENCES ───────────────────────────────────────
children.push(
  heading1("13. References"),
  bullet("Dermatology 2-Volume Set, 5th Edition - Chapters 78 and 82 (Cutaneous infections; Syphilis)"),
  bullet("Fitzpatrick's Dermatology, Volumes 1 & 2 - Chapter 170 (Syphilis)"),
  bullet("Harrison's Principles of Internal Medicine, 22nd Edition (2025)"),
  bullet("Andrews' Diseases of the Skin: Clinical Dermatology - Chapter 18"),
  bullet("Andrews' Diseases of the Skin Clinical Atlas, 2nd Edition"),
  bullet("Karanfilian KM, Almohssen AA, Kapila R, Schwartz RA. Malignant syphilis: a new and revised definition. Int J Dermatol. 2023 Mar. PMID: 36250867. DOI: 10.1111/ijd.16444"),
  bullet("Maci C, Canetti D, Tassan Din C. Malignant Syphilis Mimicking Lymphoma in HIV: A Challenging Case and a Review of Literature. Microorganisms. 2025 Apr 24. PMID: 40431141"),
  bullet("Tartaglia J, Ponzano M, Sernicola A. Nodular Secondary Syphilis: Systematic Review. Int J Dermatol. 2026 Jul 12. PMID: 42438046"),
  spacer()
);

// ─────────────────────────────────────────────────────────────────
//  BUILD DOCUMENT
// ─────────────────────────────────────────────────────────────────
const doc = new Document({
  creator: "Orris Medical AI",
  title: "Malignant Syphilis - Clinical Reference Summary",
  description: "Comprehensive clinical reference document on Malignant Syphilis (Lues Maligna)",
  styles: {
    default: {
      document: {
        run: {
          font: "Calibri",
          size: 22,
          color: "2C2C2C",
        },
        paragraph: {
          spacing: { line: 276 },
        },
      },
    },
  },
  sections: [
    {
      properties: {
        page: {
          margin: { top: 1080, bottom: 1080, left: 1080, right: 1080 },
        },
      },
      headers: {
        default: new Header({
          children: [
            new Paragraph({
              border: { bottom: { style: BorderStyle.SINGLE, size: 4, color: MID_BLUE } },
              children: [
                new TextRun({
                  text: "MALIGNANT SYPHILIS (LUES MALIGNA)  |  Clinical Reference",
                  size: 16,
                  font: "Calibri",
                  color: "888888",
                }),
              ],
            }),
          ],
        }),
      },
      footers: {
        default: new Footer({
          children: [
            new Paragraph({
              alignment: AlignmentType.CENTER,
              border: { top: { style: BorderStyle.SINGLE, size: 4, color: MID_BLUE } },
              children: [
                new TextRun({
                  text: "Page ",
                  size: 16,
                  font: "Calibri",
                  color: "888888",
                }),
                new TextRun({
                  children: [PageNumber.CURRENT],
                  size: 16,
                  font: "Calibri",
                  color: "888888",
                }),
                new TextRun({
                  text: "  |  For educational/clinical reference use only",
                  size: 16,
                  font: "Calibri",
                  color: "888888",
                }),
              ],
            }),
          ],
        }),
      },
      children,
    },
  ],
});

Packer.toBuffer(doc).then((buffer) => {
  fs.writeFileSync("/home/daytona/workspace/malignant-syphilis/Malignant_Syphilis_Clinical_Reference.docx", buffer);
  console.log("SUCCESS: Document created.");
}).catch((err) => {
  console.error("ERROR:", err);
  process.exit(1);
});
Running Command

cd /home/daytona/workspace/malignant-syphilis && node generate.js 2>&1

Running Command

python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/malignant-syphilis/Malignant_Syphilis_Clinical_Reference.docx 2>&1

Running Command

ls -lh /home/daytona/workspace/malignant-syphilis/Malignant_Syphilis_Clinical_Reference.docx && python3 -c " import zipfile, sys try: with zipfile.ZipFile('/home/daytona/workspace/malignant-syphilis/Malignant_Syphilis_Clinical_Reference.docx') as z: names = z.namelist() print('Valid ZIP/DOCX. Contains', len(names), 'files:') for n in names[:15]: print(' -', n) except Exception as e: print('INVALID:', e) sys.exit(1) "

Your Word document is ready. Here's the download link:

Malignant Syphilis Clinical Reference

Word Document · DOCX


What's inside the document (13 sections):
SectionContent
1Definition & Overview
2Etiology & Microbiology (T. pallidum biology)
3Epidemiology & Risk Factors (formatted table)
4Pathophysiology + Histopathology comparison table
5Clinical Features - prodrome, skin lesions, systemic organ table
6Laboratory Diagnosis - serology table, prozone pitfall callout, additional workup table
7Differential Diagnosis + key differentiating features table
8Management - antibiotic regimens table, Jarisch-Herxheimer, partner management
9Monitoring & Follow-up (CDC/IUSTI schedule table, titre interpretation)
10Syphilis-HIV Bidirectional Interactions
11Three Types of Syphilitic Alopecia
12At-a-Glance Summary Table
13References (3 recent PubMed papers + 5 textbooks)
Formatting features: Title page, colour-coded headings (navy/blue/red), alternating-row tables, highlighted callout boxes (clinical pearls, critical warnings, guideline notes), branded header/footer with page numbers throughout.
This is a shared conversation. Sign in to Orris to start your own chat.