Make notes on Thalasesemia as given by claude and my marrow note but claude has given very deep so make is short and from my marrow notes as well for my university final year theory examination peds pdf format
mkdir -p /home/daytona/workspace/thalassemia-notes && ls /home/daytona/workspace…
~/thalassemia-notes/generate_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import mm, cm
from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table,
TableStyle, HRFlowable, KeepTogether)
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.platypus import PageBreak
OUTPUT = "/home/daytona/workspace/thalassemia-notes/Thalassemia_Final_Year_Peds_Notes.pdf"
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
leftMargin=18*mm, rightMargin=18*mm,
topMargin=18*mm, bottomMargin=18*mm,
title="Thalassemia - Final Year Paediatrics Notes"
)
# ── Colour palette ────────────────────────────────────────────────────────────
MAROON = colors.HexColor("#7B1A1A")
DARK_NAV = colors.HexColor("#1C2D5A")
GOLD = colors.HexColor("#C8960C")
CREAM = colors.HexColor("#FFF8E7")
LTBLUE = colors.HexColor("#E8F0FB")
LTYELLOW = colors.HexColor("#FFFDE7")
LTRED = colors.HexColor("#FBE9E9")
WHITE = colors.white
BLACK = colors.black
GREY = colors.HexColor("#F4F4F4")
DKGREY = colors.HexColor("#444444")
# ── Styles ────────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()
def S(name, **kw):
return ParagraphStyle(name, **kw)
title_style = S("MainTitle",
fontName="Helvetica-Bold", fontSize=18, textColor=WHITE,
alignment=TA_CENTER, spaceAfter=4, spaceBefore=4, leading=22)
subtitle_style = S("SubTitle",
fontName="Helvetica", fontSize=9, textColor=WHITE,
alignment=TA_CENTER, spaceAfter=2, leading=12)
sec_style = S("SectionHead",
fontName="Helvetica-Bold", fontSize=11, textColor=WHITE,
spaceBefore=10, spaceAfter=4, leading=14)
subsec_style = S("SubSecHead",
fontName="Helvetica-Bold", fontSize=10, textColor=MAROON,
spaceBefore=6, spaceAfter=2, leading=13)
body_style = S("Body",
fontName="Helvetica", fontSize=9, textColor=BLACK,
spaceAfter=2, leading=13, alignment=TA_JUSTIFY)
bullet_style = S("Bullet",
fontName="Helvetica", fontSize=9, textColor=BLACK,
spaceAfter=1, leading=12, leftIndent=12, bulletIndent=0,
bulletText="\u2022")
bold_bullet = S("BoldBullet",
fontName="Helvetica-Bold", fontSize=9, textColor=BLACK,
spaceAfter=1, leading=12, leftIndent=12)
sub_bullet = S("SubBullet",
fontName="Helvetica", fontSize=8.5, textColor=DKGREY,
spaceAfter=1, leading=11, leftIndent=24, bulletIndent=12,
bulletText="\u25e6")
pearl_style = S("Pearl",
fontName="Helvetica-BoldOblique", fontSize=8.5, textColor=DARK_NAV,
spaceAfter=1, leading=11, leftIndent=12)
small_body = S("SmallBody",
fontName="Helvetica", fontSize=8.5, textColor=BLACK,
spaceAfter=1, leading=11)
footer_style = S("Footer",
fontName="Helvetica-Oblique", fontSize=7.5, textColor=colors.grey,
alignment=TA_CENTER, spaceAfter=0)
def tbl_hdr(*kw):
return ParagraphStyle("TH", fontName="Helvetica-Bold", fontSize=8.5,
textColor=WHITE, leading=11, alignment=TA_CENTER)
def tbl_cell(*kw):
return ParagraphStyle("TC", fontName="Helvetica", fontSize=8.5,
textColor=BLACK, leading=11)
def tbl_cell_bold(*kw):
return ParagraphStyle("TCB", fontName="Helvetica-Bold", fontSize=8.5,
textColor=BLACK, leading=11)
TH = tbl_hdr(); TC = tbl_cell(); TCB = tbl_cell_bold()
# ── Helpers ───────────────────────────────────────────────────────────────────
def section_block(title_text):
"""Coloured section header bar."""
data = [[Paragraph(title_text, sec_style)]]
t = Table(data, colWidths=[174*mm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), MAROON),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 8),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("ROUNDEDCORNERS", [4,4,4,4]),
]))
return t
def subsec(txt):
return Paragraph(txt, subsec_style)
def B(txt): # bullet
return Paragraph(txt, bullet_style)
def SB(txt): # sub-bullet
return Paragraph(txt, sub_bullet)
def body(txt):
return Paragraph(txt, body_style)
def pearl_box(lines, bg=LTYELLOW):
"""Star exam pearl box."""
content = [Paragraph("<b>\u2605 Exam Pearl / High-Yield</b>", pearl_style)]
for l in lines:
content.append(Paragraph(l, small_body))
data = [[content]]
t = Table(data, colWidths=[170*mm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("BOX", (0,0), (-1,-1), 1, GOLD),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 8),
("RIGHTPADDING", (0,0), (-1,-1), 6),
]))
return t
def make_table(header_row, data_rows, col_widths, alt=True):
all_rows = [header_row] + data_rows
t = Table(all_rows, colWidths=col_widths, repeatRows=1)
style = [
("BACKGROUND", (0,0), (-1,0), DARK_NAV),
("TEXTCOLOR", (0,0), (-1,0), WHITE),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,-1), 8.5),
("ALIGN", (0,0), (-1,-1), "LEFT"),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, GREY] if alt else [WHITE]),
("GRID", (0,0), (-1,-1), 0.4, colors.lightgrey),
("TOPPADDING", (0,0), (-1,-1), 3),
("BOTTOMPADDING",(0,0), (-1,-1), 3),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
]
t.setStyle(TableStyle(style))
return t
sp = Spacer(1, 4*mm)
sp2 = Spacer(1, 2*mm)
hr = HRFlowable(width="100%", thickness=0.5, color=colors.lightgrey)
# ══════════════════════════════════════════════════════════════════════════════
# BUILD CONTENT
# ══════════════════════════════════════════════════════════════════════════════
story = []
# ── TITLE BANNER ─────────────────────────────────────────────────────────────
title_data = [[
Paragraph("THALASSEMIA", title_style),
],[
Paragraph("Final Year Paediatrics \u2022 University Theory Examination Notes", subtitle_style),
],[
Paragraph("Sources: Marrow Paediatrics v5.0 / 8.0 (2024) \u2022 Ghai Essential Paediatrics Ch.13", subtitle_style),
]]
tb = Table([[Paragraph("THALASSEMIA", title_style)],
[Paragraph("Final Year Paediatrics \u2022 University Theory Exam Notes", subtitle_style)],
[Paragraph("Ref: Marrow Paediatrics v5.0/8.0 (2024) + Ghai Essential Paediatrics Ch.13", subtitle_style)]],
colWidths=[174*mm])
tb.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), MAROON),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING", (0,0), (-1,-1), 6),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
]))
story.append(tb)
story.append(sp2)
# ══════════════════════════════════════════════════════════════════════════════
# 1. DEFINITION
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_block("1. DEFINITION & GENETICS"))
story.append(sp2)
story.append(body("<b>Thalassemia</b> = Hemoglobinopathy caused by <b>reduction/absence of \u03b2-globin chain synthesis</b> due to mutations in the \u03b2-globin gene (chromosome 11). Autosomal Recessive (AR)."))
story.append(sp2)
# Genotype table
story.append(subsec("Genotype Classification (Marrow Table)"))
hdr = [Paragraph("Genotype", TH), Paragraph("Name", TH), Paragraph("Severity", TH)]
rows = [
[Paragraph("\u03b2/\u03b2", TC), Paragraph("Normal", TC), Paragraph("—", TC)],
[Paragraph("\u03b2/\u03b2\u207a or \u03b2/\u03b2\u2070", TC), Paragraph("\u03b2-Thalassemia Trait/Minor", TC), Paragraph("Asymptomatic", TC)],
[Paragraph("\u03b2\u207a/\u03b2\u207a or \u03b2\u207a/\u03b2\u2070", TC), Paragraph("\u03b2-Thalassemia Intermedia (NTDT)", TC), Paragraph("Mild–moderate; non-transfusion dependent", TC)],
[Paragraph("\u03b2\u2070/\u03b2\u2070 (most severe)", TCB), Paragraph("\u03b2-Thalassemia Major (Cooley's Anemia)", TCB), Paragraph("SEVERE — Transfusion every 3–4 weeks (TDT)", TCB)],
]
story.append(make_table(hdr, rows, [30*mm, 72*mm, 72*mm]))
story.append(sp2)
story.append(pearl_box([
"\u03b2\u2070 = no production; \u03b2\u207a = reduced production; \u03b2 = normal.",
"Severity: \u03b2\u2070/\u03b2\u2070 > \u03b2\u207a/\u03b2\u2070 > \u03b2\u207a/\u03b2\u207a",
"Two carrier parents \u2192 25% affected, 50% carrier, 25% normal per pregnancy.",
"Carrier rate in India: 3–17% depending on community/region (Ghai).",
]))
story.append(sp)
# ══════════════════════════════════════════════════════════════════════════════
# 2. PATHOPHYSIOLOGY
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_block("2. PATHOPHYSIOLOGY (Marrow Flow Chart)"))
story.append(sp2)
path_steps = [
"Absent/reduced \u03b2-globin chain synthesis",
"\u2193",
"Accumulation of unpaired free \u03b1-chains in RBCs",
"\u2193",
"Instability of cells \u2192 Early destruction \u2192 Ineffective erythropoiesis",
"\u2193",
"<b>Severe chronic hemolytic anemia</b> (Transfusion dependent) + <b>Compensatory extramedullary hematopoiesis</b>",
]
for s in path_steps:
story.append(Paragraph(s, body_style))
story.append(sp2)
# Two consequences side by side
cons_data = [
[Paragraph("<b>Severe Anemia</b>", tbl_cell_bold()),
Paragraph("<b>Extramedullary Hematopoiesis</b>", tbl_cell_bold())],
[Paragraph("• Pallor, FTT, growth retardation\n• Exercise intolerance\n• Heart failure (severe/untreated)\n• Hypermetabolic state", TC),
Paragraph("• Hepatosplenomegaly\n• Thalassemic facies (skull)\n• Hair-on-end skull X-ray\n• Paravertebral masses (intermedia)", TC)],
]
ct = Table(cons_data, colWidths=[87*mm, 87*mm])
ct.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), LTBLUE),
("BOX", (0,0), (-1,-1), 0.6, DARK_NAV),
("INNERGRID", (0,0), (-1,-1), 0.4, colors.lightgrey),
("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), "TOP"),
]))
story.append(ct)
story.append(sp2)
story.append(Paragraph("<b>Note (Marrow):</b> \u03b1 & \u03b2 chains are produced in 1:1 ratio. Iron overload = chronic transfusions + \u2191 GI iron absorption \u2192 principal driver of long-term morbidity/mortality.", body_style))
story.append(sp)
# ══════════════════════════════════════════════════════════════════════════════
# 3. CLINICAL FEATURES
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_block("3. CLINICAL FEATURES"))
story.append(sp2)
story.append(B("<b>Onset:</b> Asymptomatic at birth (protected by HbF). Presents from <b>6–12 months</b> once HbF declines."))
story.append(sp2)
story.append(subsec("a) Due to Severe Anemia"))
for item in ["Severe pallor (almost always)", "Failure to thrive, growth retardation",
"Exercise intolerance, irritability",
"Heart murmur \u2192 Congestive cardiac failure (severe/untreated)",
"Fever, hypermetabolic state"]:
story.append(B(item))
story.append(sp2)
story.append(subsec("b) Thalassemic (Hemolytic) Facies [Marrow Diagram]"))
story.append(body("Due to skull marrow expansion (extramedullary hematopoiesis):"))
fac_items = [
("Frontal bossing", "F"),
("Depressed nasal bridge", "D"),
("Maxillary prominence / overgrowth \u2192 overbite", "M"),
("Dental malocclusion", "D"),
]
for item, _ in fac_items:
story.append(B(item))
story.append(sp2)
story.append(subsec("c) Bony Changes"))
for item in [
"Hair-on-end skull (prominent vertical trabeculae) on X-ray — widened diploic spaces",
"Generalised osteoporosis/osteopenia (worsens with age)",
"Frontal bossing, maxillary overbite",
]:
story.append(B(item))
story.append(sp2)
story.append(subsec("d) Other Features"))
for item in [
"Hepatosplenomegaly (almost always present)",
"Icterus — absent early; mild–moderate jaundice later (iron overload liver dysfunction)",
"Bronze/grey skin discoloration (iron overload)",
"Endocrinopathies: hypothyroidism, hypogonadism, diabetes, growth failure (inadequate chelation)",
"Hyperuricemia (increased cell turnover)",
]:
story.append(B(item))
story.append(sp)
story.append(pearl_box([
"<b>Classic Triad:</b> Severe anemia + Hepatosplenomegaly + Thalassemic facies",
"Hair-on-end X-ray = widened diploic spaces from marrow expansion (also in sickle cell disease).",
"Thalassemic facies mnemonic: <b>F</b>rontal bossing, <b>D</b>epressed nasal bridge, <b>M</b>axillary prominence, <b>D</b>ental malocclusion.",
]))
story.append(sp)
# ══════════════════════════════════════════════════════════════════════════════
# 4. INVESTIGATIONS
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_block("4. INVESTIGATIONS"))
story.append(sp2)
story.append(subsec("a) Peripheral Blood Smear (Marrow)"))
for item in [
"Microcytic hypochromic RBCs (central pallor > 1/3rd of cell)",
"Nucleated RBCs (NRBCs), anisopoikilocytosis",
"Polychromasia, basophilic stippling",
"Target cells (especially in HbE/\u03b2 thalassemia)",
"Reticulocyte count elevated (5–8%)",
]:
story.append(B(item))
story.append(sp2)
story.append(subsec("b) Key Diagnostic Tests (Marrow)"))
inv_hdr = [Paragraph("Test", TH), Paragraph("Significance", TH)]
inv_rows = [
[Paragraph("Hemoglobin Electrophoresis", TCB), Paragraph("Initial diagnostic screening test", TC)],
[Paragraph("HPLC (High Performance Liquid Chromatography)", TCB), Paragraph("Gold standard — shows absent/\u2193 HbA + elevated HbF; identifies carrier by \u2191 HbA2", TC)],
[Paragraph("CBC", TC), Paragraph("Hb 2–8 g/dL (untreated major); MCV/MCH markedly low", TC)],
[Paragraph("Serum Ferritin", TC), Paragraph("> 1000 mcg/L \u2192 start chelation therapy", TC)],
[Paragraph("Cardiac T2* MRI (R2/R2*)", TCB), Paragraph("Best to assess cardiac iron overload; predicts cardiomyopathy up to 2 yrs before onset", TC)],
[Paragraph("Liver MRI (R2/R2*)", TC), Paragraph("Best modality for hepatic iron overload", TC)],
[Paragraph("Prenatal: CVS", TC), Paragraph("Chorionic villus sampling at 10–12 weeks in at-risk couples", TC)],
]
story.append(make_table(inv_hdr, inv_rows, [60*mm, 114*mm]))
story.append(sp2)
story.append(pearl_box([
"<b>Thalassemia Trait vs IDA</b> (classic differentiation):",
"Trait: Normal/\u2191 RBC count, Low RDW, Normal/borderline-low iron & ferritin, <b>\u2191 HbA2 on HPLC</b>.",
"IDA: Low RBC count, High RDW (13–15%), Low serum iron & ferritin, Normal HbA2.",
"Suspect trait in any child with microcytic hypochromic anemia NOT responding to iron therapy.",
]))
story.append(sp)
# ══════════════════════════════════════════════════════════════════════════════
# 5. MANAGEMENT
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_block("5. MANAGEMENT"))
story.append(sp2)
story.append(subsec("A. Supportive — Regular Blood Transfusion (Marrow)"))
for item in [
"<b>Every 3–4 weeks</b> using leukocyte-depleted/irradiated packed red cells \u2192 \u2193 allergic reactions.",
"<b>Transfusion threshold:</b> Start if Hb persistently < 7 g/dL.",
"<b>Pre-transfusion target Hb: 9–10 g/dL</b> — promotes growth, \u2193es deformities.",
"Nutritional supplements: Folic acid, Vit C (small doses), Vit E.",
"<b>NEVER give iron preparations</b> in thalassemia major/intermedia.",
"Hepatitis B vaccination + surveillance for Hep B, C and HIV.",
]:
story.append(B(item))
story.append(sp2)
story.append(subsec("B. Iron Chelation Therapy (Marrow + Ghai)"))
story.append(B("<b>Start when:</b> Serum ferritin > 1000 mcg/L, or after ~2–3 years / 10–20 transfusions."))
story.append(sp2)
chel_hdr = [Paragraph("Drug", TH), Paragraph("Route", TH), Paragraph("Key Points", TH), Paragraph("Side Effects", TH)]
chel_rows = [
[Paragraph("Deferoxamine (DFO)", TCB), Paragraph("S.C.", TC),
Paragraph("Historical gold standard; 40–60 mg/kg/day; 8–12 hr infusion, 5–6 days/week; urine turns orange (ferrioxamine)", TC),
Paragraph("Ototoxicity, retinal toxicity, growth retardation at high doses", TC)],
[Paragraph("Deferasirox", TCB), Paragraph("Oral (Preferred)", TC),
Paragraph("Tridentate ligand; 20–30 mg/kg/day; chelates intra- & extracellular iron; excreted in feces", TC),
Paragraph("Mild GI disturbance, skin rash; monitor renal/hepatic function", TC)],
[Paragraph("Deferiprone", TCB), Paragraph("Oral", TC),
Paragraph("Best for cardiac iron removal; 50–75 mg/kg/day", TC),
Paragraph("<b>Neutropenia/agranulocytosis</b> (CBC monitoring); cartilage damage/arthropathy", TC)],
]
story.append(make_table(chel_hdr, chel_rows, [28*mm, 22*mm, 72*mm, 52*mm]))
story.append(sp2)
story.append(subsec("C. Splenectomy"))
for item in [
"Indicated for <b>hypersplenism</b>: transfusion requirement > 200–250 mL/kg packed cells/year.",
"Delayed until child is <b>\u2265 5 years old</b>.",
"Pre-splenectomy: Immunize for pneumococcal, meningococcal, Hib.",
"Post-splenectomy: Prophylactic antibiotics (penicillin) to prevent overwhelming sepsis.",
]:
story.append(B(item))
story.append(sp2)
story.append(subsec("D. Curative Therapy"))
for item in [
"<b>Hematopoietic Stem Cell Transplant (HSCT)</b> from HLA-matched sibling — only established cure. (Marrow: HSCT circled as curative)",
"Best outcomes when done early, before complications develop.",
"<b>Thalassemia Bal Sewa Yojana</b> (India, Coal India) — helps cover HSCT costs.",
"<b>Hydroxyurea</b> (10–20 mg/kg/day) — boosts HbF, reduces transfusion need (useful in NTDT/certain genotypes).",
]:
story.append(B(item))
story.append(sp)
# ══════════════════════════════════════════════════════════════════════════════
# 6. COMPLICATIONS OF IRON OVERLOAD
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_block("6. COMPLICATIONS (Iron Overload — Main Cause of Morbidity/Mortality)"))
story.append(sp2)
comp_hdr = [Paragraph("Complication", TH), Paragraph("Key Points", TH)]
comp_rows = [
[Paragraph("Cardiac (commonest cause of death)", TCB), Paragraph("Iron-induced cardiomyopathy \u2192 CCF, arrhythmia. Monitor with T2* cardiac MRI.", TC)],
[Paragraph("Liver", TC), Paragraph("Hepatic iron overload \u2192 hepatic fibrosis/cirrhosis; risk of hepatitis B/C from transfusions.", TC)],
[Paragraph("Endocrinopathies", TC), Paragraph("Hypothyroidism, hypogonadism, diabetes mellitus, hypoparathyroidism, growth failure, delayed puberty.", TC)],
[Paragraph("Bone disease", TC), Paragraph("Hair-on-end skull, maxillary overbite, osteoporosis. Treat with Vit D + bisphosphonates.", TC)],
[Paragraph("Infection", TCB), Paragraph("<b>Yersinia enterocolitica</b> (m/c due to \u2193 lactoferrin bacteriostatic action). Also mucormycosis (Rhizopus oryzae), Listeria. Treat Yersinia: gentamicin + cotrimoxazole.", TC)],
[Paragraph("Transfusion reactions", TC), Paragraph("Febrile/allergic reactions, alloimmunization to RBC antigens. Prevented by leukocyte-depleted/irradiated blood.", TC)],
]
story.append(make_table(comp_hdr, comp_rows, [44*mm, 130*mm]))
story.append(sp)
# ══════════════════════════════════════════════════════════════════════════════
# 7. SPECTRUM TABLE
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_block("7. SPECTRUM OF \u03b2-THALASSEMIA — COMPARISON TABLE"))
story.append(sp2)
spec_hdr = [Paragraph("Feature", TH), Paragraph("Trait/Minor", TH), Paragraph("Intermedia (NTDT)", TH), Paragraph("Major (TDT)", TH)]
spec_rows = [
[Paragraph("Genotype", TC), Paragraph("\u03b2/\u03b2\u207a or \u03b2/\u03b2\u2070", TC), Paragraph("\u03b2\u207a/\u03b2\u207a or \u03b2\u207a/\u03b2\u2070", TC), Paragraph("\u03b2\u2070/\u03b2\u2070", TC)],
[Paragraph("Onset", TC), Paragraph("Asymptomatic; incidental finding", TC), Paragraph("> 2 years", TC), Paragraph("9–12 months", TC)],
[Paragraph("Hb level", TC), Paragraph("10–12 g/dL", TC), Paragraph("Variable, mild–moderate", TC), Paragraph("2–8 g/dL (untreated)", TC)],
[Paragraph("Transfusion", TC), Paragraph("Not needed", TC), Paragraph("Variable / may not need", TC), Paragraph("Lifelong, every 3–4 wks", TC)],
[Paragraph("Organomegaly", TC), Paragraph("Absent", TC), Paragraph("Present, variable", TC), Paragraph("Marked hepatosplenomegaly", TC)],
[Paragraph("Bone changes", TC), Paragraph("Absent", TC), Paragraph("May develop over time", TC), Paragraph("Frontal bossing, hair-on-end skull", TC)],
]
story.append(make_table(spec_hdr, spec_rows, [28*mm, 38*mm, 48*mm, 60*mm]))
story.append(sp)
# ══════════════════════════════════════════════════════════════════════════════
# 8. PREVENTION
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_block("8. PREVENTION"))
story.append(sp2)
for item in [
"<b>Genetic counseling</b> of carrier couples — prevent birth of affected children.",
"<b>Antenatal screening</b>: Both partners tested; if both carriers \u2192 prenatal diagnosis offered.",
"<b>Prenatal diagnosis: CVS at 10–12 weeks</b> of gestation (chorionic villus sampling).",
"India's <b>National Health Mission</b> promotes adolescent screening for carrier status.",
"Persons with thalassemia trait: No medical follow-up needed; <b>avoid iron unless coexistent IDA confirmed</b>.",
]:
story.append(B(item))
story.append(sp)
# ══════════════════════════════════════════════════════════════════════════════
# 9. RECENT ADVANCES
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_block("9. RECENT ADVANCES IN MANAGEMENT"))
story.append(sp2)
story.append(body("Beyond conventional transfusion-chelation, newer disease-modifying and curative approaches:"))
story.append(sp2)
adv_hdr = [Paragraph("Therapy", TH), Paragraph("Mechanism / Status", TH)]
adv_rows = [
[Paragraph("Luspatercept", TCB), Paragraph("TGF-\u03b2 ligand trap \u2192 promotes late-stage erythroid maturation, \u2193 ineffective erythropoiesis. Approved for TDT adults (BELIEVE trial). Reduces transfusion burden.", TC)],
[Paragraph("Mitapivat / Etavopivat", TC), Paragraph("Oral pyruvate kinase activators \u2192 \u2193 hemolysis & ineffective erythropoiesis. In trials for \u03b1 & \u03b2 thalassemia including NTDT.", TC)],
[Paragraph("Gene Therapy (lentiviral \u03b2-globin addition)", TCB), Paragraph("Autologous HSCs modified to express functional \u03b2-globin. Phase 2/3 trials show sustained transfusion independence. Approved in select TDT patients in some countries.", TC)],
[Paragraph("Gene Editing (CRISPR-Cas9)", TCB), Paragraph("Reactivates fetal HbF (targets BCL11A enhancer). Clinical trials show transfusion independence in TDT.", TC)],
[Paragraph("Hepcidin pathway agents", TC), Paragraph("TMPRSS6 inhibitors / ferroportin inhibitors — correct iron dysregulation in NTDT.", TC)],
]
story.append(make_table(adv_hdr, adv_rows, [44*mm, 130*mm]))
story.append(sp2)
story.append(pearl_box([
"<b>Theory exam answer =</b> Transfusion + Chelation + HSCT (as curative option).",
"<b>Viva/NEET PG bonus:</b> Mention Luspatercept (TGF-\u03b2 ligand trap) + Gene therapy/Gene editing as emerging strategies.",
], bg=LTRED))
story.append(sp)
# ══════════════════════════════════════════════════════════════════════════════
# 10. RAPID REVISION BOX
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_block("10. RAPID REVISION \u2014 ONE-LINERS"))
story.append(sp2)
rev_items = [
("<b>Inheritance:</b>", "Autosomal recessive; \u03b2-globin gene, chromosome 11."),
("<b>Pathogenesis:</b>", "\u2193\u03b2-chain \u2192 excess free \u03b1-chains \u2192 unstable RBCs \u2192 ineffective erythropoiesis + hemolysis."),
("<b>Onset:</b>", "6–12 months (once HbF/\u03b3-chain production declines)."),
("<b>Classic triad:</b>", "Severe anemia + Hepatosplenomegaly + Thalassemic (hemolytic) facies."),
("<b>Best initial test:</b>", "CBC + peripheral smear."),
("<b>Confirmatory:</b>", "HPLC (gold standard) — \u2191HbF, absent/\u2193HbA."),
("<b>Mainstay Rx:</b>", "Regular transfusion (target pre-Tx Hb 9–10 g/dL) + Iron chelation."),
("<b>Only curative Rx:</b>", "HLA-matched sibling HSCT."),
("<b>Never give:</b>", "Iron supplements in thalassemia major/intermedia."),
("<b>Commonest cause of death:</b>", "Iron overload \u2192 cardiac/hepatic/endocrine damage."),
("<b>Infection risk:</b>", "Yersinia enterocolitica (m/c); also mucormycosis."),
("<b>Newer agents:</b>", "Luspatercept, Mitapivat; Gene therapy, CRISPR-Cas9 gene editing."),
]
rev_data = [[Paragraph(k, tbl_cell_bold()), Paragraph(v, TC)] for k, v in rev_items]
rev_t = Table(rev_data, colWidths=[46*mm, 128*mm])
rev_t.setStyle(TableStyle([
("ROWBACKGROUNDS", (0,0), (-1,-1), [CREAM, WHITE]),
("GRID", (0,0), (-1,-1), 0.3, colors.lightgrey),
("TOPPADDING", (0,0),(-1,-1), 3),
("BOTTOMPADDING",(0,0),(-1,-1), 3),
("LEFTPADDING", (0,0),(-1,-1), 5),
("RIGHTPADDING", (0,0),(-1,-1), 5),
("VALIGN", (0,0),(-1,-1), "MIDDLE"),
("BOX", (0,0),(-1,-1), 0.8, MAROON),
]))
story.append(rev_t)
story.append(sp)
# ── Footer ────────────────────────────────────────────────────────────────────
story.append(hr)
story.append(Spacer(1,2*mm))
story.append(Paragraph(
"Compiled for University Final Year Theory Examination (Paediatrics) | "
"Sources: Marrow Paediatrics v5.0/8.0 (2024) + Ghai Essential Paediatrics Ch.13 | "
"For educational use only.",
footer_style))
# ── BUILD ─────────────────────────────────────────────────────────────────────
doc.build(story)
print("PDF generated:", OUTPUT)
cd /home/daytona/workspace/thalassemia-notes && python generate_pdf.py 2>&1
ls -lh /home/daytona/workspace/thalassemia-notes/
Thalassemia Final Year Peds Notes
PDF Document · PDF