A laq for 2nd yr mbbs pathology exam with reference from harsh mohan and robbins textbook of pathology on the topic down syndrome
Summary of Karyotypes (from Robbins Basic Pathology):
Type Karyotype Frequency Maternal age effect? Trisomy 21 47,XX(XY),+21 95% Yes Translocation 46,XX(XY),der(14;21)(q10;q10),+21 4% No Mosaic 46,XX/47,XX,+21 1% No

| Feature | Details |
|---|---|
| Incidence | 1 in 700 live births |
| Karyotype (most common) | 47, XX/XY, +21 |
| Cause | Meiotic non-disjunction (95%) |
| Maternal age effect | Strong (for non-disjunction type only) |
| Hallmark facies | Flat face, epicanthic folds, upslanting fissures |
| Intellect | IQ 25-50 (most); near-normal in mosaics |
| Major cardiac defect | AVSD (43% of cardiac cases) |
| Risk of leukemia | AML 500x; ALL 20x increased |
| Alzheimer risk | 100% by >40 years |
| Prenatal diagnosis | Nuchal translucency, cfDNA (NIPT), karyotype |
Generate a pdf for quick reference
ls -la /home/daytona/workspace/ 2>/dev/null || mkdir -p /home/daytona/workspace
mkdir -p /home/daytona/workspace/down-syndrome && python3 -c "from reportlab.lib…
~/down-syndrome/generate_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, KeepTogether
)
from reportlab.platypus.flowables import HRFlowable
from reportlab.pdfbase import pdfmetrics
import urllib.request
import os
OUTPUT = "/home/daytona/workspace/down-syndrome/Down_Syndrome_LAQ.pdf"
# ── colour palette ────────────────────────────────────────────────────────────
BLUE_DARK = colors.HexColor("#1a3a6b")
BLUE_MID = colors.HexColor("#2563a8")
BLUE_LIGHT = colors.HexColor("#dbeafe")
TEAL = colors.HexColor("#0f766e")
TEAL_LIGHT = colors.HexColor("#ccfbf1")
RED_DARK = colors.HexColor("#991b1b")
RED_LIGHT = colors.HexColor("#fee2e2")
YELLOW_BG = colors.HexColor("#fefce8")
YELLOW_BD = colors.HexColor("#ca8a04")
GREY_LINE = colors.HexColor("#cbd5e1")
WHITE = colors.white
BLACK = colors.black
# ── document ──────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
leftMargin=1.8*cm, rightMargin=1.8*cm,
topMargin=2*cm, bottomMargin=2*cm,
title="Down Syndrome – LAQ Reference",
author="Orris Medical AI"
)
W, H = A4
CONTENT_W = W - 3.6*cm
# ── styles ────────────────────────────────────────────────────────────────────
base = getSampleStyleSheet()
def ps(name, parent="Normal", **kw):
return ParagraphStyle(name, parent=base[parent], **kw)
TITLE = ps("MyTitle", "Title",
fontSize=22, textColor=WHITE, alignment=TA_CENTER,
spaceAfter=4, leading=28)
SUBTITLE = ps("MySub", "Normal",
fontSize=10, textColor=colors.HexColor("#bfdbfe"),
alignment=TA_CENTER, spaceAfter=2)
REF_STYLE= ps("Ref", "Normal",
fontSize=7.5, textColor=colors.HexColor("#94a3b8"),
alignment=TA_CENTER, spaceAfter=0)
H1 = ps("H1", "Heading1",
fontSize=12, textColor=WHITE, leading=16,
spaceBefore=10, spaceAfter=4,
backColor=BLUE_DARK,
leftIndent=-8, rightIndent=-8,
borderPadding=(4,8,4,8))
H2 = ps("H2", "Heading2",
fontSize=10, textColor=BLUE_DARK, leading=14,
spaceBefore=8, spaceAfter=2,
borderPadding=(2,0,2,0))
BODY = ps("Body", "Normal",
fontSize=9, leading=14, spaceAfter=3,
alignment=TA_JUSTIFY)
BULLET = ps("Bullet", "Normal",
fontSize=9, leading=13, spaceAfter=2,
leftIndent=14, firstLineIndent=-10)
SUB_BULL = ps("SubBull", "Normal",
fontSize=8.5, leading=12, spaceAfter=1,
leftIndent=26, firstLineIndent=-10,
textColor=colors.HexColor("#374151"))
BOLD_B = ps("BoldBody", "Normal",
fontSize=9, leading=13, spaceAfter=2,
fontName="Helvetica-Bold")
CAPTION = ps("Caption", "Normal",
fontSize=7.5, textColor=colors.HexColor("#6b7280"),
alignment=TA_CENTER, spaceAfter=4)
KEYBOX = ps("KeyBox", "Normal",
fontSize=8.5, leading=12,
backColor=TEAL_LIGHT,
borderColor=TEAL, borderWidth=0.5, borderPadding=4)
WARN = ps("Warn", "Normal",
fontSize=8.5, leading=12,
backColor=RED_LIGHT,
borderColor=RED_DARK, borderWidth=0.5, borderPadding=4)
NOTE = ps("Note", "Normal",
fontSize=8.5, leading=12,
backColor=YELLOW_BG,
borderColor=YELLOW_BD, borderWidth=0.5, borderPadding=4)
def b(text): return f"<b>{text}</b>"
def i(text): return f"<i>{text}</i>"
def bi(text): return f"<b><i>{text}</i></b>"
def col(text, c): return f'<font color="{c}">{text}</font>'
# ── header banner ─────────────────────────────────────────────────────────────
def header_banner():
banner_data = [[Paragraph(
'<font color="white" size="22"><b>DOWN SYNDROME (TRISOMY 21)</b></font><br/>'
'<font color="#bfdbfe" size="10">Long Answer Question – Pathology Quick Reference</font><br/>'
'<font color="#94a3b8" size="8">Ref: Robbins & Kumar Basic Pathology 11e | Robbins Cotran Pathologic Basis of Disease 10e | Harsh Mohan 7e</font>',
ps("BannerP","Normal", alignment=TA_CENTER, leading=20))
]]
t = Table(banner_data, colWidths=[CONTENT_W])
t.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), BLUE_DARK),
("TOPPADDING", (0,0),(-1,-1), 16),
("BOTTOMPADDING",(0,0),(-1,-1), 16),
("LEFTPADDING", (0,0),(-1,-1), 12),
("RIGHTPADDING", (0,0),(-1,-1), 12),
("ROUNDEDCORNERS", (0,0),(-1,-1), [6,6,6,6]),
]))
return t
# ── section heading ───────────────────────────────────────────────────────────
def section(num, title, color=BLUE_DARK):
data = [[Paragraph(f'<font color="white" size="10"><b>{num}. {title.upper()}</b></font>',
ps("SH","Normal",alignment=TA_LEFT, leading=14))]]
t = Table(data, colWidths=[CONTENT_W])
t.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), color),
("TOPPADDING", (0,0),(-1,-1), 5),
("BOTTOMPADDING",(0,0),(-1,-1), 5),
("LEFTPADDING", (0,0),(-1,-1), 10),
("RIGHTPADDING", (0,0),(-1,-1), 10),
]))
return t
def bullet(text, level=1):
dot = "\u2022" if level == 1 else "\u25e6"
indent = 14 if level==1 else 26
fi = -10
style = ps(f"bul{level}","Normal",
fontSize=9, leading=13, spaceAfter=2,
leftIndent=indent, firstLineIndent=fi)
return Paragraph(f"{dot} {text}", style)
def hr(): return HRFlowable(width="100%", thickness=0.5, color=GREY_LINE, spaceAfter=4, spaceBefore=4)
# ── karyotype table ───────────────────────────────────────────────────────────
def karyotype_table():
hdr = ["Type", "Karyotype", "Frequency", "Maternal Age Effect?"]
rows = [
["Trisomy 21 (Meiotic non-disjunction)", "47, XX/XY, +21", "~95%", "YES (strong)"],
["Robertsonian Translocation", "46, XX/XY, der(14;21)(q10;q10), +21", "~4%", "NO"],
["Mosaicism (Mitotic non-disjunction)", "46, XX / 47, XX, +21", "~1%", "NO"],
]
col_w = [CONTENT_W*0.36, CONTENT_W*0.33, CONTENT_W*0.13, CONTENT_W*0.18]
table_data = [
[Paragraph(b(h), ps("TH","Normal",fontSize=8.5,textColor=WHITE,alignment=TA_CENTER)) for h in hdr]
] + [
[Paragraph(c, ps("TD","Normal",fontSize=8.5,leading=12)) for c in row]
for row in rows
]
t = Table(table_data, colWidths=col_w, repeatRows=1)
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), BLUE_MID),
("BACKGROUND", (0,1), (-1,1), BLUE_LIGHT),
("BACKGROUND", (0,2), (-1,2), WHITE),
("BACKGROUND", (0,3), (-1,3), BLUE_LIGHT),
("GRID", (0,0), (-1,-1), 0.4, GREY_LINE),
("TOPPADDING", (0,0),(-1,-1), 4),
("BOTTOMPADDING",(0,0),(-1,-1), 4),
("LEFTPADDING", (0,0),(-1,-1), 5),
("RIGHTPADDING", (0,0),(-1,-1), 5),
("VALIGN", (0,0),(-1,-1),"MIDDLE"),
]))
return t
# ── maternal age table ────────────────────────────────────────────────────────
def maternal_age_table():
hdr = ["Maternal Age", "Risk of Down Syndrome"]
rows = [
["< 20 years", "1 in 1,550 live births"],
["25 years", "1 in 1,300"],
["30 years", "1 in 900"],
["35 years", "1 in 365"],
["40 years", "1 in 100"],
["> 45 years", "1 in 25 live births"],
]
col_w = [CONTENT_W*0.40, CONTENT_W*0.60]
table_data = [
[Paragraph(b(h), ps("TH2","Normal",fontSize=8.5,textColor=WHITE,alignment=TA_CENTER)) for h in hdr]
] + [
[Paragraph(c, ps("TD2","Normal",fontSize=8.5,leading=12,
fontName="Helvetica-Bold" if i==5 else "Helvetica")) for c in row]
for i, row in enumerate(rows)
]
t = Table(table_data, colWidths=col_w, repeatRows=1)
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), TEAL),
("BACKGROUND", (0,1), (-1,1), TEAL_LIGHT),
("BACKGROUND", (0,2), (-1,2), WHITE),
("BACKGROUND", (0,3), (-1,3), TEAL_LIGHT),
("BACKGROUND", (0,4), (-1,4), WHITE),
("BACKGROUND", (0,5), (-1,5), TEAL_LIGHT),
("BACKGROUND", (0,6), (-1,6), RED_LIGHT),
("GRID", (0,0), (-1,-1), 0.4, GREY_LINE),
("TOPPADDING", (0,0),(-1,-1), 4),
("BOTTOMPADDING",(0,0),(-1,-1), 4),
("LEFTPADDING", (0,0),(-1,-1), 8),
("VALIGN", (0,0),(-1,-1),"MIDDLE"),
]))
return t
# ── summary table ─────────────────────────────────────────────────────────────
def summary_table():
rows = [
["Incidence", "1 in 700 live births"],
["Chromosome", "Trisomy 21 (extra chromosome 21)"],
["Most common karyotype", "47, XX/XY, +21"],
["Main cause", "Meiotic non-disjunction (95%)"],
["Maternal age effect", "Strong – risk rises sharply after 35 years"],
["Hallmark facies", "Flat face, epicanthic folds, upslanting palpebral fissures"],
["Intelligence", "IQ 25–50 (most); near-normal in mosaics"],
["Most common cardiac defect","AVSD (43% of cardiac cases in DS)"],
["Leukemia risk", "AML: 500x increased | ALL: 20x increased"],
["Alzheimer risk", "~100% by >40 years (APP overexpression)"],
["Median age at death", "~60 years (up from 25 years in 1983)"],
["Prenatal diagnosis", "Nuchal translucency, cfDNA (NIPT), karyotype / FISH"],
]
col_w = [CONTENT_W*0.38, CONTENT_W*0.62]
table_data = [
[Paragraph(b("Feature"), ps("SH","Normal",fontSize=8.5,textColor=WHITE,alignment=TA_CENTER)),
Paragraph(b("Details"), ps("SH","Normal",fontSize=8.5,textColor=WHITE,alignment=TA_CENTER))]
] + [
[Paragraph(b(r[0]), ps("TK","Normal",fontSize=8.5,leading=12,textColor=BLUE_DARK)),
Paragraph(r[1], ps("TV","Normal",fontSize=8.5,leading=12))]
for r in rows
]
t = Table(table_data, colWidths=col_w, repeatRows=1)
colors_alt = [BLUE_LIGHT if i%2==0 else WHITE for i in range(len(rows))]
style = [
("BACKGROUND", (0,0), (-1,0), BLUE_DARK),
("GRID", (0,0), (-1,-1), 0.4, GREY_LINE),
("TOPPADDING", (0,0),(-1,-1), 4),
("BOTTOMPADDING",(0,0),(-1,-1), 4),
("LEFTPADDING", (0,0),(-1,-1), 6),
("RIGHTPADDING", (0,0),(-1,-1), 6),
("VALIGN", (0,0),(-1,-1),"MIDDLE"),
]
for i, c in enumerate(colors_alt):
style.append(("BACKGROUND", (0,i+1),(-1,i+1), c))
t.setStyle(TableStyle(style))
return t
# ── cardiac defects table ─────────────────────────────────────────────────────
def cardiac_table():
hdr = ["Cardiac Defect", "% of Cardiac Cases in DS"]
rows = [
["Atrioventricular Septal Defect (AVSD)", "43% — MOST COMMON"],
["Ventricular Septal Defect (VSD)", "32%"],
["Atrial Septal Defect (ASD)", "19%"],
["Tetralogy of Fallot", "6%"],
]
col_w = [CONTENT_W*0.60, CONTENT_W*0.40]
table_data = [
[Paragraph(b(h), ps("CH","Normal",fontSize=8.5,textColor=WHITE)) for h in hdr]
] + [
[Paragraph(r[0], ps("CR","Normal",fontSize=8.5,leading=12,
fontName="Helvetica-Bold" if i==0 else "Helvetica")),
Paragraph(r[1], ps("CR2","Normal",fontSize=8.5,leading=12,
textColor=RED_DARK if i==0 else BLACK,
fontName="Helvetica-Bold" if i==0 else "Helvetica"))]
for i, r in enumerate(rows)
]
t = Table(table_data, colWidths=col_w, repeatRows=1)
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), RED_DARK),
("BACKGROUND", (0,1), (-1,1), RED_LIGHT),
("BACKGROUND", (0,2), (-1,2), WHITE),
("BACKGROUND", (0,3), (-1,3), RED_LIGHT),
("BACKGROUND", (0,4), (-1,4), WHITE),
("GRID", (0,0), (-1,-1), 0.4, GREY_LINE),
("TOPPADDING", (0,0),(-1,-1), 4),
("BOTTOMPADDING",(0,0),(-1,-1), 4),
("LEFTPADDING", (0,0),(-1,-1), 6),
("VALIGN", (0,0),(-1,-1),"MIDDLE"),
]))
return t
# ── build story ───────────────────────────────────────────────────────────────
story = []
SP = lambda n=1: Spacer(1, n*0.3*cm)
# TITLE BANNER
story.append(header_banner())
story.append(SP(2))
# 1. INTRODUCTION
story.append(KeepTogether([
section(1, "Introduction / Definition"),
SP(),
Paragraph(
"Down syndrome (Trisomy 21) is the <b>most common chromosomal disorder</b> and the leading "
"genetic cause of intellectual disability in humans. First described by <b>John Langdon Down "
"in 1866</b>, its chromosomal basis (an extra chromosome 21) was established by <b>Jerome "
"Lejeune in 1959</b>. Incidence is approximately <b>1 in 700 live births</b>.",
BODY),
SP(),
]))
# 2. CYTOGENETICS
story.append(section(2, "Cytogenetics / Karyotypes"))
story.append(SP())
story.append(Paragraph(b("Three distinct mechanisms produce Down syndrome:"), BODY))
story.append(SP(0.5))
story.append(karyotype_table())
story.append(SP())
story.append(Paragraph(b("A. Trisomy 21 – Meiotic Non-disjunction (~95%)"), H2))
story.append(bullet(f"Failure of chromosome 21 to separate during {b('meiosis I or II')}, most often in the maternal ovum"))
story.append(bullet(f"In {b('95% of trisomy 21 cases')} the extra chromosome is of {b('maternal origin')}"))
story.append(bullet("Parents have a normal karyotype; condition is NOT familial"))
story.append(bullet(f"FISH with chromosome 21 probes shows {b('three fluorescent signals')}"))
story.append(SP(0.5))
story.append(Paragraph(b("B. Robertsonian Translocation (~4%)"), H2))
story.append(bullet(f"Long arm of chromosome 21 translocated to chromosome {b('14 or 22')}"))
story.append(bullet("Total chromosome count = 46, but there is triple gene dosage of Chr 21 material"))
story.append(bullet(f"{b('Frequently familial')} – carrier parent (usually mother) has Robertsonian translocation"))
story.append(bullet(f"Example maternal carrier karyotype: {i('45, XX, del(14;21)(q10;q10)')}"))
story.append(bullet(f"{b('Maternal age has NO effect')} in this type"))
story.append(SP(0.5))
story.append(Paragraph(b("C. Mosaicism – Mitotic Non-disjunction (~1%)"), H2))
story.append(bullet("Mitotic non-disjunction of Chr 21 during early embryogenesis"))
story.append(bullet(f"Mix of {b('46-chromosome')} and {b('47-chromosome')} cells"))
story.append(bullet(f"Features are {b('variably milder')}; intelligence may be near-normal"))
story.append(bullet(f"{b('Maternal age has NO effect')}"))
story.append(SP())
# 3. MATERNAL AGE
story.append(section(3, "Role of Maternal Age"))
story.append(SP())
story.append(Paragraph(
"Maternal age has a <b>profound influence</b> on the incidence of trisomy 21 (applies to "
"non-disjunction type only). The aging ovum becomes increasingly susceptible to non-disjunction "
"by an as-yet unknown mechanism. <b>No paternal age effect</b> has been established.",
BODY))
story.append(SP(0.5))
story.append(maternal_age_table())
story.append(SP())
# 4. PATHOGENESIS
story.append(section(4, "Pathogenesis / Molecular Basis"))
story.append(SP())
story.append(Paragraph(
"Clinical features arise predominantly from <b>gene dosage effects</b> — extra copies of genes "
"on chromosome 21 lead to overexpression of multiple gene products:",
BODY))
story.append(SP(0.5))
story.append(bullet(f"{b('APP gene overexpression')} – Amyloid Precursor Protein on chr 21 is overexpressed; "
"excess amyloid-beta deposition drives early-onset Alzheimer disease"))
story.append(bullet(f"{b('Mitochondrial dysfunction')} – ~10% of overexpressed genes regulate mitochondrial "
"function; broken/swollen cristae, ROS generation, and apoptosis activation are seen"))
story.append(bullet(f"{b('Noncoding RNAs')} – chr 21 has highest density of lncRNAs; contributions to "
"phenotype under active investigation"))
story.append(bullet(f"{b('Immune dysregulation')} – T-cell function mainly affected; predisposes to "
"infections and autoimmunity"))
story.append(SP())
# 5. CLINICAL FEATURES
story.append(section(5, "Clinical Features"))
story.append(SP())
story.append(Paragraph(b("Facies (usually evident at birth):"), BOLD_B))
story.append(bullet(f"{b('Flat facial profile')}"))
story.append(bullet(f"{b('Oblique (upward slanting) palpebral fissures')} — mongoloid slant"))
story.append(bullet(f"{b('Epicanthic folds')} — vertical skin folds at inner canthus"))
story.append(bullet("Flat nasal bridge"))
story.append(bullet("Protruding tongue (macroglossia / hypotonia of tongue)"))
story.append(bullet("Small, low-set ears"))
story.append(bullet("Short neck with excess nuchal skin"))
story.append(SP(0.5))
story.append(Paragraph(b("Skull and Limbs:"), BOLD_B))
story.append(bullet(f"{b('Brachycephaly')} with flat occiput"))
story.append(bullet(f"{b('Simian crease')} (single palmar transverse crease) – ~50% of cases"))
story.append(bullet("Clinodactyly – incurved 5th finger"))
story.append(bullet("Sandal gap – wide space between 1st and 2nd toes"))
story.append(bullet("Short stature; short broad hands"))
story.append(bullet("Generalized hypotonia"))
story.append(SP(0.5))
story.append(Paragraph(b("Neurological:"), BOLD_B))
story.append(bullet(f"{b('Intellectual disability')} – IQ typically 25–50 (~80% of cases); range 25–70"))
story.append(bullet("Mosaics may have near-normal intelligence"))
story.append(SP())
# 6. COMPLICATIONS
story.append(section(6, "Complications and Associated Conditions"))
story.append(SP())
story.append(Paragraph(b("A. Congenital Heart Disease (~40% of patients) — Main cause of death in infancy:"), H2))
story.append(SP(0.3))
story.append(cardiac_table())
story.append(SP(0.5))
story.append(Paragraph(b("B. Leukemia"), H2))
story.append(bullet(f"{b('500-fold')} increased risk of Acute Myeloid Leukemia (AML) – especially {b('megakaryoblastic type (FAB M7)')}, ages 1–5 years"))
story.append(bullet(f"{b('20-fold')} increased risk of precursor B-cell Acute Lymphoblastic Leukemia (ALL)"))
story.append(bullet("AML in Down syndrome: increased chemosensitivity (especially to methotrexate), relatively favorable prognosis"))
story.append(SP(0.5))
story.append(Paragraph(b("C. Alzheimer Disease"), H2))
story.append(bullet(f"Virtually {b('ALL patients >40 years')} develop neuropathological changes of Alzheimer disease"))
story.append(bullet(f"Mechanism: {b('APP gene')} (chr 21) overexpression → excess amyloid-beta deposition → senile plaques and NFTs"))
story.append(SP(0.5))
story.append(Paragraph(b("D. Immune Defects"), H2))
story.append(bullet("Abnormal T-cell function → serious pulmonary infections"))
story.append(bullet("Increased susceptibility to thyroid autoimmunity (Hashimoto's thyroiditis)"))
story.append(SP(0.5))
story.append(Paragraph(b("E. Gastrointestinal Anomalies"), H2))
story.append(bullet("Esophageal and duodenal atresia ('double bubble' sign on X-ray)"))
story.append(bullet("Hirschsprung disease, small bowel atresias"))
story.append(SP(0.5))
story.append(Paragraph(b("F. Other Associations"), H2))
story.append(bullet("Eyes: Brushfield spots on iris, cataracts, refractive errors"))
story.append(bullet("Atlantoaxial instability (ligamentous laxity)"))
story.append(bullet("Hearing loss; cryptorchidism; hypospadias"))
story.append(SP())
# 7. PRENATAL DIAGNOSIS
story.append(section(7, "Prenatal Diagnosis"))
story.append(SP())
story.append(Paragraph(b("Biochemical Screening (Triple / Quadruple Test):"), BOLD_B))
story.append(bullet(f"{b('Decreased')}: maternal serum AFP (~25% lower), unconjugated estriol (uE3)"))
story.append(bullet(f"{b('Increased')}: beta-hCG, inhibin-A"))
story.append(SP(0.5))
story.append(Paragraph(b("Ultrasound Markers (1st trimester):"), BOLD_B))
story.append(bullet(f"{b('Increased nuchal translucency')} (>3 mm at 11–13 weeks) — most sensitive early marker"))
story.append(bullet("Absent / hypoplastic nasal bone"))
story.append(bullet("'Double bubble' sign on ultrasound (duodenal atresia)"))
story.append(SP(0.5))
story.append(Paragraph(b("Cell-Free Fetal DNA (cfDNA / NIPT):"), BOLD_B))
story.append(bullet("5–10% of total cell-free DNA in maternal blood is fetal in origin"))
story.append(bullet("Next-generation sequencing detects gene dosage imbalance of chr 21"))
story.append(bullet("High sensitivity and specificity – now standard non-invasive screening"))
story.append(SP(0.5))
story.append(Paragraph(b("Definitive Diagnosis:"), BOLD_B))
story.append(bullet("Amniocentesis (15–18 weeks) or Chorionic villus sampling (CVS, 10–12 weeks)"))
story.append(bullet("Karyotyping of fetal cells; FISH with chromosome 21 probes (three signals = trisomy 21)"))
story.append(SP())
# 8. PROGNOSIS
story.append(section(8, "Prognosis / Longevity"))
story.append(SP())
story.append(Paragraph(
"Improved medical care has dramatically increased survival. Median age at death was "
f"{b('25 years in 1983')}; currently the median age at death is {b('~60 years')} "
"(Robbins & Kumar Basic Pathology, 11e). Cardiac surgery and better management of "
"infections are the main contributors.",
BODY))
story.append(SP())
# 9. SUMMARY TABLE
story.append(section(9, "Quick Reference Summary", color=TEAL))
story.append(SP())
story.append(summary_table())
story.append(SP(2))
# FOOTER NOTE
footer_data = [[
Paragraph(
'<font size="7.5" color="#64748b"><b>References:</b> Robbins & Kumar Basic Pathology, '
'11th ed., Ch. 4, pp. 125–126 | Robbins, Cotran & Kumar Pathologic Basis of Disease, '
'10th ed., Ch. 5, pp. 163–165 | Harsh Mohan Textbook of Pathology, 7th ed., Ch. 3, pp. 46–50'
'<br/>Generated by Orris Medical AI – for educational purposes only.</font>',
ps("Footer","Normal", alignment=TA_CENTER))
]]
ft = Table(footer_data, colWidths=[CONTENT_W])
ft.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), BLUE_LIGHT),
("TOPPADDING", (0,0),(-1,-1), 8),
("BOTTOMPADDING", (0,0),(-1,-1), 8),
("LEFTPADDING", (0,0),(-1,-1), 10),
("RIGHTPADDING", (0,0),(-1,-1), 10),
]))
story.append(ft)
# ── build ─────────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF generated: {OUTPUT}")
cd /home/daytona/workspace/down-syndrome && python3 generate_pdf.py 2>&1
ls -lh /home/daytona/workspace/down-syndrome/Down_Syndrome_LAQ.pdf
Down Syndrome LAQ
PDF Document · PDF
| Section | Content |
|---|---|
| 1. Introduction | Definition, history, incidence |
| 2. Cytogenetics | All 3 karyotype types in a formatted table (Trisomy 21, Translocation, Mosaic) |
| 3. Maternal Age | Risk table from <20 to >45 years |
| 4. Pathogenesis | APP gene, mitochondrial dysfunction, ncRNAs, immune dysregulation |
| 5. Clinical Features | Facies, skull/limbs, neurological |
| 6. Complications | Cardiac defects table, leukemia (AML 500x / ALL 20x), Alzheimer, GI, immune |
| 7. Prenatal Diagnosis | Biochemical, USG, cfDNA/NIPT, definitive karyotype/FISH |
| 8. Prognosis | Median survival 60 years |
| 9. Summary Table | All key facts at a glance |