Make long answer notes on malignant syphilis
"malignant syphilis" OR "lues maligna"
PMID: 36250867
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).
| Feature | Ordinary Secondary Syphilis | Lues Maligna |
|---|---|---|
| Epidermis | Normal / psoriasiform | Necrotic / ulcerated |
| Dermal infiltrate | Plasma cells, lymphocytes, histiocytes (perivascular, lichenoid, or nodular) | Plasma cells + vasculitis |
| Vascular changes | Endothelial swelling | Necrotizing vasculitis |
| Spirochetes | Identified by immunohistochemistry in majority | Detectable by IHC |
| Granulomas | Possible in older lesions | Absent (tertiary pattern) |

| System | Manifestations |
|---|---|
| Neurological | Neurosyphilis, meningitis, stroke, cranial neuropathies, deafness |
| Ocular | Uveitis, iritis, neuroretinitis, optic neuritis ("otosyphilis") |
| Musculoskeletal | Arthralgia, myalgia, bone pain |
| Renal | Nephrotic syndrome |
| Cardiovascular | Cardiovascular syphilis (later) |
| Hepatic | Hepatitis |
| Pulmonary | Respiratory involvement |
| Rectal | Proctitis |
| Test | Type | Features 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 treponemal | Usually positive; may be negative in advanced HIV immunodeficiency |
| TPHA / MHA-TP | Specific treponemal hemagglutination | Usually remains positive for life |
| Setting | Regimen |
|---|---|
| Primary / Secondary / Early Latent syphilis | Benzathine penicillin G 2.4 MU IM × single dose |
| Late latent / Unknown duration | Benzathine penicillin G 2.4 MU IM weekly × 3 doses |
| Neurosyphilis | Aqueous 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 failure | Benzathine penicillin G 2.4 MU IM weekly × 3 weeks |
| Guideline | Schedule |
|---|---|
| CDC | Clinical and serological at 6 and 12 months (uncomplicated); more frequent for HIV+ patients (3, 6, 9, 12, 24 months) |
| IUSTI | Non-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 |
| Feature | Detail |
|---|---|
| Definition | Rare, severe form of secondary syphilis with ulceronecrotic skin lesions + systemic symptoms |
| Synonym | 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 lesion | Papules → pustules → necrotic nodules with ulceration and crusting (rupioid); resemble chancres |
| Distribution | Symmetrical; palms and oral mucosa often involved |
| Scarring | Yes - heals with scars (unlike typical secondary syphilis) |
| Histopathology hallmark | Necrotizing vasculitis |
| Spirochete detection | Immunohistochemistry / IHC of biopsy |
| Serology pitfall | False-negative RPR/VDRL due to prozone phenomenon or immune deficiency |
| Treatment | Benzathine penicillin G 2.4 MU IM (early); aqueous penicillin IV for neurosyphilis |
| Treatment complication | Jarisch-Herxheimer reaction (especially common in HIV; ~1/3 affected) |
| Differential | Lymphoma, vasculitis, deep fungal infection, KS, pyoderma gangrenosum |
Create a Word document summary of malignant syphilis for clinical reference
mkdir -p /home/daytona/workspace/malignant-syphilis && ls /home/daytona/workspace/malignant-syphilis
~/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);
});
cd /home/daytona/workspace/malignant-syphilis && node generate.js 2>&1
python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/malignant-syphilis/Malignant_Syphilis_Clinical_Reference.docx 2>&1
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) "
Malignant Syphilis Clinical Reference
Word Document · DOCX
| Section | Content |
|---|---|
| 1 | Definition & Overview |
| 2 | Etiology & Microbiology (T. pallidum biology) |
| 3 | Epidemiology & Risk Factors (formatted table) |
| 4 | Pathophysiology + Histopathology comparison table |
| 5 | Clinical Features - prodrome, skin lesions, systemic organ table |
| 6 | Laboratory Diagnosis - serology table, prozone pitfall callout, additional workup table |
| 7 | Differential Diagnosis + key differentiating features table |
| 8 | Management - antibiotic regimens table, Jarisch-Herxheimer, partner management |
| 9 | Monitoring & Follow-up (CDC/IUSTI schedule table, titre interpretation) |
| 10 | Syphilis-HIV Bidirectional Interactions |
| 11 | Three Types of Syphilitic Alopecia |
| 12 | At-a-Glance Summary Table |
| 13 | References (3 recent PubMed papers + 5 textbooks) |