All four leukemia comparative chart all point cover mbbs
leukemia blood smear comparison ALL AML CML CLL

Peripheral blood smear from a patient with suspected chronic lymphocytic leukemia (CLL) shows a predominance of small, mature-appearing lymphocytes with scant cytoplasm and clumped nuclear chromatin, accompanied by fragile cells that readily disrupt during smear preparation, producing numerous smudge or basket cells visible on the slide. The image depicts a single smudge cell in the upper right, with numerous small darkly staining lymphocytes occupying the field. The smear was prepared with Wright-Giemsa stain and examined under light microscopy at high magnification (approximately 1000x total magnification with oil immersion). Clinically, CLL is defined by absolute mature lymphocytosis of ≥5.0 × 10^9/L sustained for ≥3 months, often asymptomatic and detected incidentally on complete blood count. Morphology alone is insufficient for diagnosis; immunophenotyping showing co-expression of CD5, CD19, CD23 with weak surface immunoglobulin and light chain restriction supports CLL diagnosis. Smudge cells result from fragile leukemic cells and reflect underlying cytoskeletal fragility, though they are not specific. The image illustrates typical features: monomorphic lymphocytes, scant cytoplasm, condensed chromatin, and absent prominent nucleoli. This finding has diagnostic significance, guiding further workup, including flow cytometry, cytogenetics, and molecular studies, to distinguish CLL from other chronic lymphoproliferative disorders such as small lymphocytic lymphoma (SLL), mantle cell lymphoma, prolymphocytic leukemia, and reactive lymphocytosis.

Peripheral blood smear from a patient with known chronic lymphocytic leukemia (CLL) showing autoimmune hemolytic anemia (AIHA). Brightfield microscopy of Wright-Giemsa stained smear at 1000x (oil immersion) reveals two dominant cell populations: numerous small mature lymphocytes typical of CLL and red blood cells showing spherocytic deformation. A smudge cell is evident just left of center, a classical clue for CLL. Red cells display reduced central pallor consistent with spherocytes, indicating intravascular or extravascular hemolysis driven by autoantibodies. The background shows mild polychromasia and rare nucleated RBCs, consistent with a robust reticulocyte response; the corrected reticulocyte count in this case is markedly elevated (>7%). Platelets are not significantly abnormal. These features collectively support autoimmune destruction of erythrocytes in the setting of CLL. Diagnostic significance lies in recognizing AIHA as a common autoimmune complication in CLL, with a clinical picture of sudden Hb decline and compensatory erythropoiesis. Differential considerations include drug-induced hemolysis, other causes of hemolytic anemia, or marrow infiltration by CLL. Clinical correlation includes therapy implications (steroids, rituximab) and close monitoring of hemolysis markers. This image is a valuable teaching resource for hematology morphology, AIHA in CLL, and differential diagnosis in anemia.

Imaging Modality: Brightfield light microscopy of a Wright-Giemsa stained peripheral blood smear. The primary subject is leukocytes from circulating blood, with focus on small mature-appearing lymphocytes and rare prolymphocytes. At center-right, several lymphocytes exhibit condensed chromatin and scant cytoplasm, consistent with chronic lymphocytic leukemia (CLL) morphology. Along the left edge, characteristic smudge cells are visible, reflecting fragile lymphocytes commonly seen in CLL. A prolymphocyte located just below center presents with slightly irregular nuclear contours, more dispersed chromatin, a prominent nucleolus, and modestly increased cytoplasm. In CLL, prolymphocytes usually comprise less than 2% of neoplastic cells; when 10–15%, the term atypical CLL is used and carries implications of aberrant immunophenotype, cytogenetic abnormalities, cytopenias, refractoriness to therapy, and worse prognosis. If prolymphocytes predominate, consideration should be given to B-cell prolymphocytic leukemia. This image demonstrates key diagnostic features including lymphoid morphology, prolymphocytic variant, and smear artifacts. Clinically, these findings correlate with lymphocytosis and potential anemia or thrombocytopenia in affected patients. Definitive characterization requires ancillary testing such as flow cytometry, immunophenotyping, and cytogenetics. The morphology supports a differential diagnosis that includes CLL with prolymphocytic transformation, atypical CLL, and B-PLL, guiding prognosis and treatment planning.

Imaging modality: Brightfield light microscopy of a Wright-Giemsa stained peripheral blood smear. The slide shows a predominant population of small to medium-sized lymphoid cells with scant pale cytoplasm and dense, clumped chromatin. Numerous cells exhibit mature-appearing B lymphocyte morphology. A fine background of erythrocytes and occasional smudge cells is present, with no overt blasts or granulocytic abnormalities. The overall pattern is lymphocytosis with a monomorphic lymphocytic population, compatible with monoclonal B-cell lymphocytosis (MBL) or the chronic lymphocytic leukemia (CLL) spectrum. Immunophenotypic confirmation (CD5+, CD23+, CD19+, surface Ig) is typically required for definitive classification, but is outside the scope of this image. The cluster appears relatively uniform, suggesting clonality rather than reactive lymphocytosis. Genetic associations commonly reported with CLL/MBL include 13q14 deletion and trisomy 12, though such findings require molecular testing. Clinically, CLL is defined by an absolute lymphocyte count ≥5.0 x 10^9/L in peripheral blood for at least 3 months; values below this threshold meet criteria for MBL. The image illustrates morphologic correlates of indolent clonal B-cell expansions and underscores the need to integrate flow cytometry and cytogenetics for diagnosis, prognosis, and management decisions. This image is educational for hematology, pathology, and cytology reference libraries.
AML acute myeloid leukemia Auer rods blood smear blasts

This high-magnification light microscopy image shows an H&E stained tissue section documenting an extramedullary myeloid tumor (myeloid sarcoma) composed of immature myeloid precursors arranged in diffuse sheets. The cellular population includes myeloblasts with high nuclear-to-cytoplasmic ratio, fine nuclear chromatin, prominent nucleoli, and frequent mitotic figures, accompanied by promyelocytes and maturation to myelocytes in variable proportions. Cytoplasm is scant to moderate and can contain occasional cytoplasmic granules; rod-shaped inclusions (Auer rods) may be seen in scattered blasts. The architectural pattern lacks normal tissue stratification, with cohesive clusters and dispersed cells infiltrating the stroma, consistent with an extramedullary granulocytic tumor. The image corresponds to a histopathology specimen most often obtained from soft tissue, lymph node, skin, or other extramedullary sites in patients with or without overt bone marrow involvement. Clinically, myeloid sarcoma is diagnostic of acute myeloid leukemia (AML) and often precedes or heralds AML relapse; immunohistochemical profiling (MPO, CD34, CD117, CD43, lysozyme) and cytogenetic/molecular testing are essential for classification and prognosis. Potential diagnostic significance includes associations with AML subtypes and recurrent translocations (e.g., t(8;21), inv(16), 11q23). This image is valuable for educational illustration of AML-related solid tumors, hematopathology education, differential diagnosis with lymphoma or metastatic carcinoma, and correlation with systemic hematologic disease and treatment planning.

High-power histopathology image obtained from an extramedullary myeloid sarcoma demonstrates sheets of immature myeloid blasts interrupting normal tissue architecture. The smear-like arrangement is evident, with cells distributed in diffuse clusters and occasionally separated by fibrous septa, creating a pale, lace-like stromal pattern. The neoplastic cells are predominantly small to medium-sized with round to oval vesicular nuclei and finely stippled chromatin; nuclear contours are often slightly irregular, and nucleoli may be inconspicuous at this magnification. Cytoplasm is scant to moderate and variably eosinophilic. Occasional differentiated elements are seen, including maturing granulocytic precursors and, less frequently, erythroid and megakaryocytic cells, reflecting partial lineage maturation within the tumor. The cells easiest to recognize are eosinophilic myelocytes with their distinctive orange cytoplasm (as nicely seen in this case). However, they are present only in a small percentage of cases. Immunophenotypic confirmation is typically pursued; the histology alone may resemble diffuse large B-cell lymphoma, necessitating myeloid markers such as MPO, CD34, CD117, and CD43 for accurate classification. Clinical relevance lies in recognizing that granulocytic sarcoma may precede, coincide with, or herald progression to acute myeloid leukemia, influencing staging, prognosis, and therapeutic strategy (AML-type chemotherapy). Correlation with ancillary studies elevates diagnostic confidence and guides urgent management. This image captures key diagnostic features for teaching and reference.

This histopathology image represents a diffuse, high-cellularity mammary lesion consisting of immature myeloid blasts arranged in sheets with effacement of normal breast architecture. On routine H&E staining, tumor cells show medium to large size, scant to moderate cytoplasm, finely dispersed chromatin, and punctate nucleoli. The background may reveal a vascular, inflammatory stroma with little residual glandular differentiation. The finding is pathognomonic for extramedullary myeloid sarcoma (chloroma) and, in the appropriate clinical setting, diagnostic of acute myeloid leukemia. Immunophenotyping would typically reveal myeloid lineage markers; immunocytochemistry can show myeloperoxidase (MPO), CD33, CD13, CD34, CD68, and other Auer rod-associated features in some cases; cytochemical MPO positivity supports diagnosis. Clinically, breast myeloid sarcoma mandates systemic AML-type chemotherapy, not isolated local therapy; prognosis depends on systemic treatment response and risk of extramedullary relapse. Diagnostic significance includes the need for hematologic workup (bone marrow evaluation, peripheral smear) and genetic/cytogenetic/molecular profiling to guide therapy. Differential diagnoses include lymphoblastic lymphoma and metastatic breast carcinoma; multidisciplinary coordination is essential to optimize disease control, monitor for CNS involvement, and implement prophylaxis as indicated. This image emphasizes the importance of recognizing extramedullary AML manifestations in solid organs for timely, systemic treatment.
CML chronic myeloid leukemia peripheral blood smear myelocytes Philadelphia chromosome

A diagnostic microphotograph of a peripheral blood interphase cell from a patient with Chronic Myeloid Leukemia (CML), analyzed via Fluorescence In Situ Hybridization (FISH). The image demonstrates an atypical BCR-ABL1 translocation pattern using a dual-color, dual-fusion probe. Against the dark blue DAPI-stained nuclear background, four distinct fluorescent signals are visible. The observed configuration is classified as 1F1G2R: one orange/yellow fusion signal (representing the BCR-ABL1 hybrid on the derivative chromosome 22), one green signal (representing the native BCR locus on chromosome 22), and two red signals (representing the native ABL1 locus on chromosome 9). This atypical pattern deviates from the standard 2F1G1R fusion signal usually seen in Philadelphia chromosome-positive cells, indicating clonal evolution or complex chromosomal rearrangements. This image serves as an educational example of cytogenetic variability in hematologic malignancies and the use of FISH for monitoring molecular response in patients undergoing tyrosine kinase inhibitor (TKI) therapy like imatinib.

This diagnostic image displays a fluorescence in situ hybridization (FISH) analysis of human bone marrow cells, used primarily for detecting the BCR-ABL1 gene fusion associated with Chronic Myeloid Leukemia (CML). The image shows two blue-stained nuclei (DAPI) against a dark background. On the left, a larger metaphase cell exhibits a normal signal pattern with two distinct cyan/green signals and two distinct red signals (2G2R), representing the normal location of the ABL1 and BCR genes on their respective chromosomes. On the right, a smaller interphase cell demonstrates a fusion signal where a red and a cyan/green signal overlap or are closely apposed, indicative of a chromosomal translocation. This visual is a key educational tool for demonstrating molecular cytogenetics, specifically the dual-color, dual-fusion probe technique used in hematopathology to identify the Philadelphia chromosome.

This composite educational image illustrates the clinical and laboratory findings of splenic infarction in a patient with Chronic Myeloid Leukemia (CML). Panel A is a grayscale abdominal ultrasound showing an enlarged spleen (splenomegaly) with multiple peripheral, wedge-shaped hypoechoic lesions consistent with splenic infarcts; calipers measure several zones between 1.58 cm and 3.21 cm. Panel B displays a non-enhanced axial CT scan of the upper abdomen, confirming the presence of multiple peripheral hypodense areas within the spleen, which correlate with the ultrasound findings of infarction. Panel C is a line graph correlating laboratory values over a 42-day period, showing the relationship between Phosphorus (mg/dL), Creatinine (mg/dL), and White Blood Cell (WBC) count. Notably, the graph demonstrates an extreme shift from hyperphosphatemia to severe hypophosphatemia (<0.5 mg/dL) as the WBC count rapidly increases, suggesting a high metabolic demand or 'tumor lysis-like' sequestration during a leukemic blast crisis. This visual set is used to teach the radiological presentation of vascular complications in hematologic malignancies and the interpretation of metabolic trends in aggressive leukemia.
ALL acute lymphoblastic leukemia lymphoblasts TdT bone marrow

Histopathology image of a prepubertal testis with acute lymphoblastic leukemia involvement. Hematoxylin and eosin (H&E) stained tissue shows diffuse interstitial infiltration by small to medium lymphoblasts arranged in loose sheets between seminiferous tubules. Neoplastic cells display scant cytoplasm, high nuclear-to-cytoplasmic ratio, round to oval nuclei with fine chromatin and inconspicuous nucleoli. The infiltrate disrupts normal testicular architecture by expanding the interstitium and compressing adjacent tubules while largely preserving some tubules in variable fashion. Mitotic activity may be present and cellular density is high, with a basophilic cytoplasm that stains purple-pink. The pattern resembles lymphomatous involvement, reflecting a leukemic infiltration rather than focal germ cell tumor. Immunophenotypic features (if tested) would typically include TdT positivity and B-cell markers (CD10, CD19) with CD34 positivity common in blasts; however, these are inferred from diagnostic context rather than visible in the H&E image. Clinically this finding reinforces that the testis can act as a sanctuary site in leukemia and may be bilateral in pediatric cases, potentially predating overt marrow relapse or presenting at remission. Correlation with peripheral blood counts and bone marrow studies is essential to determine systemic involvement and guide therapy, including consideration of testicular-directed therapy or CNS prophylaxis.

Educational panel demonstrating the clinical and histopathological pathology of Acute Lymphoblastic Leukemia (ALL) in human patients and NOG mouse xenograft models. (A) Coronal CT scan of a human abdomen showing marked hepatosplenomegaly. (B) Macroscopic comparison between normal and leukemic NOG mice organs, highlighting significant splenomegaly, hepatomegaly, and a pale femur (bone marrow) in the leukemic model. (C) H&E-stained histopathological sections of mouse livers across different ALL cases (IV and IF injection routes), showing dense clusters of leukemic lymphoblasts infiltrating the portal areas surrounding the portal vein (pv); arrowheads indicate bile ducts. (D) Sequential histopathological analysis at 3, 6, and 9 weeks post-transplantation, contrasting the progression of leukemic cell accumulation. Large, expanding clusters are visible in the portal area over time, while the sinusoidal areas show only sparse, scattered leukemic cells. This visual evidence supports the portal area as a specific niche for ALL cell harboring and proliferation.

This pathophysiology diagram illustrates the remodeling of the bone marrow microenvironment (BMM) during the transition from Acute Lymphoblastic Leukemia (ALL) disease to remission. The upper panel depicts two states: 'ALL disease' and 'Post-remission'. In the disease state, the BMM is crowded with leukemia blasts (pink clusters), showing profound depletion of adipocytes (yellow spheres) and the presence of Mesenchymal Stem Cells (MSCs). Following 'Remission Chemotherapy', the post-remission niche shows adipocyte reconstitution and 'Subclone resistance' with fewer, persistent leukemia cells. Quantitative area charts indicate that as the 'Adipocyte Niche' expands, there is a reciprocal decline in 'Tumourigenic Capacity', 'Cell cycling', and 'Translation capacity'. The lower panel compares 'ALL Progression' with 'ALL Persistence'. 'ALL Progression' is characterized by a high expansion rate and active cell proliferation (indicated by outward arrows). In contrast, 'ALL Persistence' describes a dormant state defined by 'Low Proteome Flux', 'Global Stress Resistance', and 'Quiescence'. The diagram highlights how the adipocyte-rich remission niche promotes leukemia cell dormancy and chemoprotection, potentially mediated by GCN2-related pathways.
| Feature | ALL | AML | CML | CLL |
|---|---|---|---|---|
| Full name | Acute Lymphoblastic Leukemia | Acute Myeloid Leukemia | Chronic Myeloid Leukemia | Chronic Lymphocytic Leukemia |
| Cell of origin | Immature B or T lymphoblast | Immature myeloid precursor (myeloblast) | Pluripotent stem cell (myeloid lineage) | Mature B lymphocyte |
| Most common in | Children (peak 3 yrs); 85% B-ALL | Adults (>60 yrs most common) | Middle-age adults (40-60 yrs) | Elderly (median age 70 yrs); most common leukemia in Western world |
| Onset | Acute (weeks) | Acute (days-weeks) | Chronic (insidious) | Chronic (very insidious, often incidental) |
| Feature | ALL | AML | CML | CLL |
|---|---|---|---|---|
| Key risk factors | Down syndrome, radiation, t(12;21), t(9;22) in adults | Down syndrome, prior chemotherapy (alkylating agents, topoisomerase II inhibitors), radiation, myelodysplasia | Unknown; radiation exposure | Pesticides, Agent Orange exposure; strong familial tendency |
| Genetics | NOTCH1 mutations (T-ALL); PAX5, ETV6, RUNX1, BCR::ABL1 (B-ALL); hyperploidy (>50 chr) common | RUNX1-RUNX1T1 t(8;21); PML-RARA t(15;17); inv(16); NPM1, CEBPA mutations | Philadelphia chromosome t(9;22) - BCR::ABL1 fusion producing p210 protein | Del 13q14 (most common), del 11q, del 17p (TP53) - worst prognosis; trisomy 12 |
| Feature | ALL | AML | CML | CLL |
|---|---|---|---|---|
| Symptoms | Fatigue, pallor, fever, bleeding, bone pain (children) | Fatigue, bleeding, infection, gum hypertrophy (monocytic), skin infiltration | Massive splenomegaly (hallmark), fatigue, early satiety, weight loss | Often asymptomatic (found on routine CBC); fatigue, weight loss, lymphadenopathy |
| Lymphadenopathy | Common | Less common | Uncommon in chronic phase | Generalized (50-60% of symptomatic patients) |
| Splenomegaly | Moderate | Moderate | Massive (most prominent feature) | Moderate (hepatosplenomegaly in 50-60%) |
| CNS involvement | Common - requires CNS prophylaxis | Less common | Rare in chronic phase | Rare |
| Mediastinal mass | T-ALL - anterior mediastinal mass (thymic) | No | No | No |
| Feature | ALL | AML | CML | CLL |
|---|---|---|---|---|
| WBC count | Variable (can be very high) | Variable, often elevated | Markedly elevated (leukocytosis with full myeloid spectrum) | Very high lymphocyte count (>5 × 10^9/L for >3 months) |
| Peripheral smear | Lymphoblasts (large nuclei, prominent nucleoli, scant cytoplasm) | Myeloblasts (Auer rods pathognomonic) | Entire myeloid spectrum - myelocytes predominate ("myelocyte bulge"), basophilia, eosinophilia | Small, mature-appearing lymphocytes; smudge/basket cells pathognomonic |
| Hallmark smear finding | Lymphoblasts | Auer rods (pink needle-like inclusions, MPO+) | Myelocyte bulge + basophilia + thrombocytosis | Smudge cells (fragile lymphocytes rupturing) |
| LAP score | Normal/high | Normal/high | Low (leukocyte alkaline phosphatase score) | Normal |
| Anemia | Yes (marrow replacement) | Yes | Mild initially | Mild; AIHA in 10-15% |
| Platelets | Thrombocytopenia | Thrombocytopenia | Thrombocytosis (initially) | Thrombocytopenia (late/autoimmune) |
| Feature | ALL | AML | CML | CLL |
|---|---|---|---|---|
| Key markers | B-ALL: CD10 (CALLA)+, CD19+, CD20+, TdT+ | CD13+, CD33+, CD117+, MPO+ | CD13, CD33 (myeloid panel) | CD5+, CD19+, CD20+ (weak), CD23+; weak surface Ig |
| TdT | Positive (hallmark of ALL) | Negative | Negative | Negative |
| Special stain | PAS positive (clumpy pattern) | MPO positive; Sudan Black B positive | MPO positive (myeloid cells) | PAS positive (diffuse) |
| Feature | ALL | AML | CML | CLL |
|---|---|---|---|---|
| Classic translocation | t(9;22) = Ph+ ALL (poor prognosis in adults); t(12;21) = best prognosis | t(15;17) = APL (M3) - ATRA sensitive; t(8;21), inv(16) = favorable | t(9;22) Philadelphia chromosome - BCR::ABL1 p210 (MANDATORY for diagnosis) | Del 13q14 (favorable); del 17p, del 11q (unfavorable) |
| Prognostic significance | t(12;21) = best; t(9;22), t(4;11) = worst | t(15;17), t(8;21), inv(16) = favorable; complex karyotype = worst | Sokal/EUTOS score; additional chromosomal abnormalities in blast crisis = worst | Rai & Binet staging; ZAP-70 expression = poor; mutated IGHV = good |
| Feature | ALL | AML | CML | CLL |
|---|---|---|---|---|
| Phases | Induction → Consolidation → Maintenance | Induction → Consolidation | Chronic → Accelerated → Blast crisis | Smoldering → Progressive (Rai 0-IV; Binet A-C) |
| Blast crisis (CML) | - | - | Blasts ≥20%; resembles acute leukemia (AML or ALL type) | - |
| Accelerated phase (CML) | - | - | Blasts 10-19%, basophils ≥20%, major cytogenetic abnormalities | - |
| Richter transformation (CLL) | - | - | - | 5-10% transform to aggressive DLBCL (Richter syndrome); very poor prognosis |
| Feature | ALL | AML | CML | CLL |
|---|---|---|---|---|
| First-line | Vincristine + Prednisolone + L-asparaginase + Anthracycline (induction) | Cytarabine ("7+3") + Anthracycline (idarubicin/daunorubicin) | Imatinib (Gleevec) - TKI targeting BCR-ABL1; 2nd gen: dasatinib, nilotinib | Watch-and-wait if asymptomatic; BTK inhibitors (ibrutinib), BCL2 inhibitor (venetoclax), anti-CD20 (rituximab) |
| Special therapy | Ph+ ALL: add TKI (imatinib/dasatinib) | APL (M3): ATRA + Arsenic trioxide (highly effective, often curative) | 2nd/3rd gen TKIs (dasatinib, ponatinib) for resistance; allo-SCT for blast crisis | Allo-SCT for refractory disease |
| CNS prophylaxis | Mandatory (intrathecal methotrexate) | Selective | Not routine | Not routine |
| Prognosis | Children: ~90% cure rate; adults worse | 40-50% long-term remission in younger adults; poorer in elderly | Excellent with TKI (near-normal life expectancy); blast crisis = poor | Indolent; median survival ~10 years; highly variable |
| Feature | ALL | AML | CML | CLL |
|---|---|---|---|---|
| Overall | Children: EXCELLENT; Adults: POOR | MODERATE (age-dependent) | GOOD (with TKI) | INDOLENT (variable) |
| Good prognostic features | Age 1-10 yrs, WBC <10,000, t(12;21), hyperploidy | t(15;17), t(8;21), inv(16), young age, NPM1 mut | Chronic phase, low Sokal score, TKI response (CCyR) | Rai 0, mutated IGHV, del 13q only |
| Poor prognostic features | Age <1 yr or adult, WBC >100,000, t(9;22), t(4;11), hypoploidy | Complex karyotype, FLT3-ITD, TP53, elderly | Blast crisis, del 17p, ABL kinase domain mutations | Del 17p (TP53), del 11q, ZAP-70+, unmutated IGHV |
| Mnemonics / Points | Details |
|---|---|
| ALL = children | Peak age 3 years, B-ALL (85%), T-ALL presents with anterior mediastinal mass |
| AML = adults + Auer rods | Pathognomonic Auer rods (MPO+ pink needles); M3-APL is ATRA sensitive - do not delay |
| CML = Philadelphia chromosome | t(9;22) BCR-ABL p210; LOW LAP score; massive splenomegaly; treat with imatinib |
| CLL = elderly + smudge cells | Most common leukemia in Western world; smudge cells; CD5+CD19+CD23+; watch-and-wait |
| TdT | Positive ONLY in ALL (lymphoblasts) - never in AML/CML/CLL |
| LAP score | LOW only in CML (to distinguish from leukemoid reaction) |
| Smudge cells | CLL (fragile mature lymphocytes) |
| Auer rods | AML only |
| APL emergency | AML-M3 can cause DIC - start ATRA immediately |
| CML blast crisis | Can transform to AML (70%) or ALL (30%) type blast crisis |



| Leukemia | One-liner |
|---|---|
| ALL | Most common childhood cancer; lymphoblasts; TdT+; CALLA (CD10)+; CNS prophylaxis mandatory; t(12;21) best prognosis |
| AML | Adults; Auer rods; MPO+; M3-APL = ATRA + arsenic; "7+3" chemotherapy regimen |
| CML | Philadelphia chromosome t(9;22) BCR-ABL p210; low LAP; massive splenomegaly; imatinib (TKI) is the treatment |
| CLL | Most common adult leukemia (Western); CD5+/CD19+/CD23+; smudge cells; Richter syndrome transformation; BTK inhibitors |
Generate an Excel diagnostic flowchart for differentiating the four leukemias
mkdir -p /tmp/workspace/leukemia-flowchart && ls /tmp/workspace/leukemia-flowchart/
~/leukemia-flowchart/build_leukemia_excel.py
"""
Leukemia Diagnostic Flowchart - Excel Generator
Produces a rich .xlsx with:
Sheet 1 - Visual Diagnostic Flowchart (cell-drawn with borders/fills/arrows)
Sheet 2 - Comprehensive Comparison Table
Sheet 3 - Quick Reference Card
"""
from openpyxl import Workbook
from openpyxl.styles import (
PatternFill, Font, Alignment, Border, Side, GradientFill
)
from openpyxl.utils import get_column_letter
from openpyxl.styles.numbers import FORMAT_TEXT
import openpyxl
wb = Workbook()
# ─────────────────────────────────────────────────────────
# HELPERS
# ─────────────────────────────────────────────────────────
def hex_fill(hex_color):
return PatternFill("solid", fgColor=hex_color)
def thin_border(top=True, bottom=True, left=True, right=True):
s = Side(style="thin", color="000000")
n = Side(style=None)
return Border(
top=s if top else n,
bottom=s if bottom else n,
left=s if left else n,
right=s if right else n,
)
def thick_border():
s = Side(style="medium", color="000000")
return Border(top=s, bottom=s, left=s, right=s)
def center(wrap=False):
return Alignment(horizontal="center", vertical="center", wrap_text=wrap)
def left_align(wrap=True):
return Alignment(horizontal="left", vertical="center", wrap_text=wrap)
def bold_font(size=10, color="000000"):
return Font(name="Arial", bold=True, size=size, color=color)
def regular_font(size=9, color="000000"):
return Font(name="Arial", size=size, color=color)
def merge_write(ws, r1, c1, r2, c2, value, fill=None, font=None, align=None, border=None):
ws.merge_cells(start_row=r1, start_column=c1, end_row=r2, end_column=c2)
cell = ws.cell(row=r1, column=c1)
cell.value = value
if fill: cell.fill = fill
if font: cell.font = font
if align: cell.alignment = align
if border:
for row in ws.iter_rows(min_row=r1, max_row=r2, min_col=c1, max_col=c2):
for c in row:
c.border = border
return cell
def arrow_cell(ws, row, col, direction="down"):
c = ws.cell(row=row, column=col)
c.value = "▼" if direction == "down" else ("▶" if direction == "right" else "◀")
c.font = Font(name="Arial", size=14, bold=True, color="444444")
c.alignment = center()
# ─────────────────────────────────────────────────────────
# COLOR PALETTE
# ─────────────────────────────────────────────────────────
TITLE_BG = "1A3C5E" # dark navy
TITLE_FG = "FFFFFF"
START_BG = "2E86AB" # teal - start node
DECISION_BG = "F6AE2D" # amber - decision diamonds
ALL_BG = "E63946" # red - ALL
AML_BG = "FF6B35" # orange - AML
CML_BG = "2DC653" # green - CML
CLL_BG = "8338EC" # purple - CLL
LABEL_BG = "F0F4F8" # light grey - label rows
HEADER_BG = "1A3C5E" # same as title
YES_BG = "D4EDDA" # light green yes
NO_BG = "FDECEA" # light red no
SEC_ALL = "FADBD8"
SEC_AML = "FDEBD0"
SEC_CML = "D5F5E3"
SEC_CLL = "E8DAEF"
# ══════════════════════════════════════════════════════════
# SHEET 1 – DIAGNOSTIC FLOWCHART
# ══════════════════════════════════════════════════════════
ws1 = wb.active
ws1.title = "Diagnostic Flowchart"
# Column widths
col_widths = {1:2, 2:18, 3:3, 4:18, 5:3, 6:18, 7:3, 8:18, 9:2}
for col, w in col_widths.items():
ws1.column_dimensions[get_column_letter(col)].width = w
# Row heights (will set dynamically)
def set_row_heights(ws, heights_dict):
for r, h in heights_dict.items():
ws.row_dimensions[r].height = h
# ── TITLE ──
merge_write(ws1, 1, 1, 2, 9,
"LEUKEMIA DIAGNOSTIC FLOWCHART | ALL • AML • CML • CLL",
fill=hex_fill(TITLE_BG),
font=Font(name="Arial", bold=True, size=14, color=TITLE_FG),
align=center(wrap=False),
border=thick_border()
)
# ── START NODE ──
merge_write(ws1, 4, 3, 5, 7,
"🔬 PATIENT PRESENTATION\nSuspected Leukemia",
fill=hex_fill(START_BG),
font=Font(name="Arial", bold=True, size=11, color="FFFFFF"),
align=center(wrap=True),
border=thick_border()
)
arrow_cell(ws1, 6, 5)
# ── DECISION 1: ACUTE vs CHRONIC ──
merge_write(ws1, 7, 3, 8, 7,
"◆ ONSET & BLOOD FILM\nAre blasts >20% in blood/marrow?",
fill=hex_fill(DECISION_BG),
font=Font(name="Arial", bold=True, size=10, color="1A1A1A"),
align=center(wrap=True),
border=thick_border()
)
# YES / NO labels
merge_write(ws1, 9, 2, 9, 4, "YES ▼ (Blasts ≥20%)",
fill=hex_fill(YES_BG), font=bold_font(9, "1A6B31"), align=center())
merge_write(ws1, 9, 6, 9, 8, "NO ▼ (Blasts <20%, mature cells)",
fill=hex_fill(NO_BG), font=bold_font(9, "8B0000"), align=center())
arrow_cell(ws1, 10, 3)
arrow_cell(ws1, 10, 7)
# ── DECISION 2a: ACUTE - Lineage ──
merge_write(ws1, 11, 2, 12, 4,
"◆ LINEAGE\nAre cells lymphoid?\n(TdT+, CD10+, CD19/CD3+)",
fill=hex_fill(DECISION_BG),
font=Font(name="Arial", bold=True, size=9, color="1A1A1A"),
align=center(wrap=True),
border=thick_border()
)
# ── DECISION 2b: CHRONIC - Lineage ──
merge_write(ws1, 11, 6, 12, 8,
"◆ Philadelphia Chromosome?\nt(9;22) BCR-ABL1\n(FISH / PCR)",
fill=hex_fill(DECISION_BG),
font=Font(name="Arial", bold=True, size=9, color="1A1A1A"),
align=center(wrap=True),
border=thick_border()
)
# YES/NO for acute lineage
merge_write(ws1, 13, 2, 13, 2, "YES ▼", fill=hex_fill(YES_BG), font=bold_font(8,"1A6B31"), align=center())
merge_write(ws1, 13, 4, 13, 4, "NO ▼", fill=hex_fill(NO_BG), font=bold_font(8,"8B0000"), align=center())
# YES/NO for chronic Philadelphia
merge_write(ws1, 13, 6, 13, 6, "YES ▼", fill=hex_fill(YES_BG), font=bold_font(8,"1A6B31"), align=center())
merge_write(ws1, 13, 8, 13, 8, "NO ▼", fill=hex_fill(NO_BG), font=bold_font(8,"8B0000"), align=center())
# ── DIAGNOSIS BOXES ──
# ALL
merge_write(ws1, 15, 1, 22, 3,
"✦ ALL\nAcute Lymphoblastic Leukemia\n\n"
"Age: Children (peak 3 yrs)\n"
"Cells: Lymphoblasts\n"
"TdT: POSITIVE ✓\n"
"CD10 (CALLA): + \n"
"CD19/CD3: +\n"
"Smear: Lymphoblasts\n"
"Chromosomes:\n t(12;21) = best\n t(9;22) = worst\n\n"
"Rx: Vincristine +\nPrednisolone +\nL-Asparaginase\n(+TKI if Ph+)\n\n"
"⚠ CNS prophylaxis\nmandatory!",
fill=hex_fill(ALL_BG),
font=Font(name="Arial", bold=True, size=9, color="FFFFFF"),
align=Alignment(horizontal="left", vertical="top", wrap_text=True),
border=thick_border()
)
# AML
merge_write(ws1, 15, 4, 22, 5,
"✦ AML\nAcute Myeloid Leukemia\n\n"
"Age: Adults (>60 yr)\n"
"Cells: Myeloblasts\n"
"TdT: Negative ✗\n"
"MPO: POSITIVE ✓\n"
"Auer Rods: ✓ (pathognomonic)\n"
"CD13, CD33, CD117: +\n\n"
"Key subtype:\nM3-APL → t(15;17)\nRx: ATRA + Arsenic\n(DIC risk!)\n\n"
"Others:\n'7+3' regimen\n(Cytarabine +\nAnthracycline)",
fill=hex_fill(AML_BG),
font=Font(name="Arial", bold=True, size=9, color="FFFFFF"),
align=Alignment(horizontal="left", vertical="top", wrap_text=True),
border=thick_border()
)
# CML
merge_write(ws1, 15, 6, 22, 7,
"✦ CML\nChronic Myeloid Leukemia\n\n"
"Age: 40-60 yrs\n"
"Cells: Full myeloid spectrum\n"
"Ph chromosome: POSITIVE ✓\n"
"BCR-ABL1 p210\n"
"LAP score: LOW ✓\n"
"Smear: Myelocyte bulge\n+ Basophilia\n+ Thrombocytosis\n\n"
"Phases:\nChronic → Accelerated\n→ Blast Crisis\n\n"
"Rx: Imatinib (TKI)\nDasatinib/Nilotinib",
fill=hex_fill(CML_BG),
font=Font(name="Arial", bold=True, size=9, color="FFFFFF"),
align=Alignment(horizontal="left", vertical="top", wrap_text=True),
border=thick_border()
)
# CLL
merge_write(ws1, 15, 8, 22, 9,
"✦ CLL\nChronic Lymphocytic Leukemia\n\n"
"Age: Elderly (>65 yr)\n"
"Cells: Mature B lymphocytes\n"
"Ph chromosome: Negative ✗\n"
"CD5+, CD19+, CD23+\n"
"Smear: Smudge cells ✓\n"
"(pathognomonic)\n\n"
"Often asymptomatic\nRai / Binet staging\n\n"
"Rx: Watch & wait\n→ BTK inhibitors\n(Ibrutinib)\n→ Venetoclax\n→ Rituximab",
fill=hex_fill(CLL_BG),
font=Font(name="Arial", bold=True, size=9, color="FFFFFF"),
align=Alignment(horizontal="left", vertical="top", wrap_text=True),
border=thick_border()
)
# ── KEY DIFFERENTIATORS ROW ──
merge_write(ws1, 23, 1, 23, 9,
"KEY DIFFERENTIATORS AT A GLANCE",
fill=hex_fill(HEADER_BG),
font=Font(name="Arial", bold=True, size=10, color="FFFFFF"),
align=center()
)
diff_data = [
("Test", "ALL", "AML", "CML", "CLL"),
("TdT", "✓ POSITIVE", "✗ Negative", "✗ Negative", "✗ Negative"),
("MPO / Auer Rods", "✗ Negative", "✓ POSITIVE", "✗ Negative", "✗ Negative"),
("Philadelphia chr t(9;22)", "Only in Ph+ ALL (poor Px)", "Rare", "✓ HALLMARK", "✗ Negative"),
("LAP Score", "Normal/High", "Normal/High", "✓ LOW", "Normal"),
("Smudge Cells", "✗ Absent", "✗ Absent", "✗ Absent", "✓ PRESENT"),
("Blasts in marrow", "≥20% lymphoblasts", "≥20% myeloblasts", "<10% chronic phase", "Rare"),
("CD5 expression", "✗ Negative", "✗ Negative", "✗ Negative", "✓ POSITIVE"),
("Age peak", "Children (3 yr)", "Adults (>60 yr)", "Adults (40-60 yr)", "Elderly (>65 yr)"),
("Splenomegaly", "Moderate", "Moderate", "MASSIVE ✓", "Moderate"),
("Prognosis", "Children: EXCELLENT", "MODERATE", "GOOD (with TKI)", "INDOLENT (variable)"),
]
col_fills = [LABEL_BG, SEC_ALL, SEC_AML, SEC_CML, SEC_CLL]
col_fgs = ["1A3C5E", ALL_BG, AML_BG, "1A5E3C", "5B0AAB"]
for i, row_data in enumerate(diff_data):
row_num = 24 + i
for j, val in enumerate(row_data):
cols = [1, 2, 4, 6, 8]
col_spans = [(1,2), (2,3), (4,5), (6,7), (8,9)]
ws1.merge_cells(start_row=row_num, start_column=col_spans[j][0],
end_row=row_num, end_column=col_spans[j][1])
c = ws1.cell(row=row_num, column=col_spans[j][0])
c.value = val
if i == 0:
c.fill = hex_fill(HEADER_BG)
c.font = Font(name="Arial", bold=True, size=9, color="FFFFFF")
else:
c.fill = hex_fill(col_fills[j])
is_pos = "✓" in val or "POSITIVE" in val or "HALLMARK" in val or "PRESENT" in val or "MASSIVE" in val or "EXCELLENT" in val
is_neg = "✗" in val or "Negative" in val or "Rare" in val
if j == 0:
c.font = Font(name="Arial", bold=True, size=9, color="1A3C5E")
elif is_pos:
c.font = Font(name="Arial", bold=True, size=9, color="1A5E2A")
elif is_neg:
c.font = Font(name="Arial", size=9, color="8B0000")
else:
c.font = Font(name="Arial", size=9, color="1A1A1A")
c.alignment = center(wrap=True)
c.border = thin_border()
# Row heights
rh = {1:20, 2:20, 3:8, 4:20, 5:20, 6:15,
7:25, 8:25, 9:18, 10:15, 11:30, 12:30,
13:15, 14:8}
for r in range(15, 23):
rh[r] = 16
for r in range(23, 36):
rh[r] = 20
rh[23] = 22
set_row_heights(ws1, rh)
# ── FOOTNOTE ──
merge_write(ws1, 35, 1, 35, 9,
"Source: Robbins & Cotran Pathologic Basis of Disease | Goldman-Cecil Medicine | Quick Compendium of Clinical Pathology | For MBBS/MD exam use",
fill=hex_fill("E8EDF2"),
font=Font(name="Arial", italic=True, size=8, color="666666"),
align=center()
)
# ══════════════════════════════════════════════════════════
# SHEET 2 – COMPREHENSIVE COMPARISON TABLE
# ══════════════════════════════════════════════════════════
ws2 = wb.create_sheet("Comparison Table")
# Column widths
ws2.column_dimensions["A"].width = 22
ws2.column_dimensions["B"].width = 28
ws2.column_dimensions["C"].width = 28
ws2.column_dimensions["D"].width = 28
ws2.column_dimensions["E"].width = 28
# Title
merge_write(ws2, 1, 1, 2, 5,
"COMPREHENSIVE LEUKEMIA COMPARISON TABLE — MBBS / MD Reference",
fill=hex_fill(TITLE_BG),
font=Font(name="Arial", bold=True, size=13, color="FFFFFF"),
align=center(),
border=thick_border()
)
# Headers
headers = ["PARAMETER", "ALL", "AML", "CML", "CLL"]
header_fills = [HEADER_BG, ALL_BG, AML_BG, CML_BG, CLL_BG]
for i, (h, hf) in enumerate(zip(headers, header_fills)):
c = ws2.cell(row=3, column=i+1)
c.value = h
c.fill = hex_fill(hf)
c.font = Font(name="Arial", bold=True, size=10, color="FFFFFF")
c.alignment = center(wrap=True)
c.border = thin_border()
ws2.row_dimensions[3].height = 24
# Data rows: (section_header_bool, parameter, ALL, AML, CML, CLL)
rows = [
# ── SECTION: BASIC ──
(True, "BASIC CLASSIFICATION", "", "", "", ""),
(False, "Full Name", "Acute Lymphoblastic Leukemia", "Acute Myeloid Leukemia", "Chronic Myeloid Leukemia", "Chronic Lymphocytic Leukemia"),
(False, "Cell of Origin", "Immature B or T lymphoblast", "Immature myeloblast (myeloid precursor)", "Pluripotent stem cell → myeloid lineage", "Mature B lymphocyte"),
(False, "Acute / Chronic", "ACUTE", "ACUTE", "CHRONIC", "CHRONIC"),
(False, "Myeloid / Lymphoid", "LYMPHOID", "MYELOID", "MYELOID", "LYMPHOID"),
# ── SECTION: EPIDEMIOLOGY ──
(True, "EPIDEMIOLOGY", "", "", "", ""),
(False, "Peak Age", "Children (3 yrs); adults possible", "Adults >60 yrs (most common)", "Middle age 40-60 yrs", "Elderly; median age 70 yrs"),
(False, "Sex", "Boys > Girls (slight)", "M = F", "M slightly > F", "M:F = 2:1"),
(False, "Incidence rank", "Most common childhood cancer", "Most common acute leukemia in adults", "15-20% of all adult leukemias", "Most common leukemia in Western world"),
(False, "Race", "Higher in Hispanic/Latino children", "All races", "All races", "Rare in Asians/Pacific Islanders"),
# ── SECTION: ETIOLOGY ──
(True, "ETIOLOGY & GENETICS", "", "", "", ""),
(False, "Key Chromosomal Abnormality", "t(12;21) ETV6-RUNX1 (25%, best Px)\nt(9;22) BCR-ABL1 (Ph+, poor Px)\nt(4;11) KMT2A (worst Px)\nHyperploidy >50 chr (good Px)", "t(15;17) PML-RARA → APL-M3\nt(8;21) RUNX1-RUNX1T1\ninv(16) CBFB-MYH11\nNPM1, FLT3-ITD mutations", "t(9;22) Philadelphia chromosome\nBCR-ABL1 → p210 fusion protein\n(MANDATORY for diagnosis)", "Del 13q14 (most common, favorable)\nDel 17p TP53 (worst)\nDel 11q ATM\nTrisomy 12"),
(False, "Key Mutations", "NOTCH1 (T-ALL)\nPAX5, ETV6, RUNX1 (B-ALL)", "NPM1, CEBPA (favorable)\nFLT3-ITD (poor)\nRunX1 (poor)", "BCR-ABL1 kinase domain mutations\n→ TKI resistance", "ATM, NOTCH1, TP53, IGHV mutation status"),
(False, "Risk Factors", "Down syndrome, ionizing radiation\nPrior chemotherapy", "Down syndrome, prior chemo/radiation\nMyelodysplastic syndrome\nAlkylating agents", "Ionizing radiation\n(cause often unknown)", "Pesticides, Agent Orange\n1st-degree relatives (5-8x risk)"),
# ── SECTION: CLINICAL ──
(True, "CLINICAL FEATURES", "", "", "", ""),
(False, "Onset", "Abrupt (days-weeks)", "Abrupt (days-weeks)", "Insidious (months)", "Very insidious (years); often incidental"),
(False, "Key Symptoms", "Fever, fatigue, pallor\nBone pain (children)\nLymphadenopathy", "Fatigue, bleeding gums\nInfection, petechiae\nGum hypertrophy (M5)", "Fatigue, weight loss\nEarly satiety (splenomegaly)\nNight sweats", "Often asymptomatic\nFatigue, weight loss\nFrequent infections"),
(False, "Splenomegaly", "Moderate", "Moderate", "MASSIVE (hallmark)", "Moderate (50-60%)"),
(False, "Lymphadenopathy", "Common", "Less common", "Uncommon in chronic phase", "Generalized (50-60%)"),
(False, "CNS Involvement", "COMMON → prophylaxis mandatory", "Less common", "Rare in chronic phase", "Rare"),
(False, "Mediastinal Mass", "T-ALL: anterior mediastinal mass (thymic)", "No", "No", "No"),
(False, "Gum Hypertrophy", "Rare", "M4/M5 (monocytic subtype) ✓", "No", "No"),
(False, "Hepatomegaly", "Common", "Common", "Moderate", "Moderate (50-60%)"),
# ── SECTION: LAB ──
(True, "LABORATORY FINDINGS", "", "", "", ""),
(False, "WBC Count", "Variable; can be very high or low", "Variable; often elevated blasts", "MARKEDLY elevated\n(myeloid spectrum)", "Lymphocytosis ≥5×10⁹/L for ≥3 months"),
(False, "Peripheral Smear", "Lymphoblasts\n(large nuclei, prominent nucleoli)", "Myeloblasts\nAUER RODS (pathognomonic)\nMPO-positive granules", "Full myeloid spectrum\nMyelocyte BULGE\nBasophilia + Eosinophilia", "Small mature lymphocytes\nSMUDGE CELLS (pathognomonic)"),
(False, "Anemia", "Yes (marrow replacement)", "Yes (marrow replacement)", "Mild initially", "Mild; AIHA in 10-15%"),
(False, "Platelets", "Thrombocytopenia ↓", "Thrombocytopenia ↓", "Thrombocytosis ↑ (early)", "Thrombocytopenia ↓ (late/autoimmune)"),
(False, "LAP Score", "Normal / High", "Normal / High", "LOW ← key differentiator", "Normal"),
(False, "Bone Marrow Blasts", "≥20% lymphoblasts", "≥20% myeloblasts", "<10% (chronic phase)", "Rare lymphocytes"),
(False, "Serum LDH", "Often elevated", "Often elevated", "Often elevated", "May be elevated"),
(False, "Uric Acid", "Elevated (tumor lysis risk)", "Elevated (tumor lysis risk)", "Elevated", "Mildly elevated"),
# ── SECTION: IMMUNOPHENOTYPE ──
(True, "IMMUNOPHENOTYPE", "", "", "", ""),
(False, "Key Positive Markers", "TdT ✓ (hallmark)\nCD10 (CALLA) ✓\nCD19, CD20 (B-ALL)\nCD3, CD7 (T-ALL)", "MPO ✓\nCD13, CD33, CD117 ✓\nCD34 (immature)\nCD14 (monocytic subtypes)", "CD13, CD33 (myeloid)\nCD34 (immature precursors)", "CD5 ✓\nCD19 ✓\nCD23 ✓\nCD20 (weak)\nWeak surface Ig"),
(False, "TdT", "POSITIVE (hallmark)", "Negative", "Negative", "Negative"),
(False, "Special Cytochemistry", "PAS positive (clumpy blocks)\nMPO Negative", "MPO POSITIVE ✓\nSudan Black B positive\nNSE positive (M4/M5)", "MPO positive (myeloid cells)\nLAP LOW", "PAS positive (diffuse)\nMPO negative"),
# ── SECTION: DIAGNOSIS CRITERIA ──
(True, "DIAGNOSTIC CRITERIA", "", "", "", ""),
(False, "WHO Blast Threshold", "≥20% lymphoblasts in marrow/blood", "≥20% myeloblasts in marrow/blood", "Philadelphia chromosome required\n(no blast threshold for chronic phase)", "Absolute B-lymphocyte count\n≥5×10⁹/L for ≥3 months"),
(False, "Gold Standard Test", "Bone marrow biopsy + Immunophenotyping\n(Flow cytometry)", "Bone marrow biopsy + Cytochemistry\n(MPO stain) + Cytogenetics", "FISH / PCR for BCR-ABL1\nPhiladelphia chromosome", "Flow cytometry (CD5+/CD19+/CD23+)\n+ peripheral blood count"),
(False, "Key Diagnostic Finding", "TdT+ lymphoblasts ≥20%", "Auer rods in myeloblasts", "Philadelphia chromosome t(9;22)", "Smudge cells + CD5+/CD19+/CD23+ B cells"),
# ── SECTION: STAGING ──
(True, "STAGING / PHASES", "", "", "", ""),
(False, "Staging System", "Induction → Consolidation\n→ Maintenance", "Induction → Consolidation\n(no maintenance in most protocols)", "Sokal / EUTOS risk score\n(Chronic → Accelerated → Blast Crisis)", "Rai Staging (0-IV)\nBinet Staging (A/B/C)"),
(False, "Disease Phases", "Relapse most common in marrow, CNS, testes", "De-novo or secondary (post-MDS)\nM0-M7 FAB classification", "Chronic phase (low blasts)\nAccelerated: blasts 10-19%\nBlast crisis: blasts ≥20%", "Indolent → Progressive\nRichter transformation (5-10%)\n→ Aggressive DLBCL"),
(False, "Blast Crisis (CML)", "—", "—", "Blasts ≥20%; AML-type (70%)\nor ALL-type (30%)", "—"),
# ── SECTION: TREATMENT ──
(True, "TREATMENT", "", "", "", ""),
(False, "First-Line Induction", "Vincristine + Prednisolone\n+ L-Asparaginase\n+ Anthracycline (VPDL)", "'7+3' regimen:\nCytarabine (7 days)\n+ Anthracycline (3 days)", "Imatinib (Gleevec) 400 mg/day\n→ 1st-line TKI\n(Dasatinib or Nilotinib: 2nd gen)", "Watch and Wait if asymptomatic\nBTK inhibitor: Ibrutinib\nBCL-2 inhibitor: Venetoclax\nAnti-CD20: Rituximab"),
(False, "Special/Targeted Rx", "Ph+ ALL: Add imatinib/dasatinib\nAlloSCT in high-risk", "APL-M3: ATRA + Arsenic trioxide\n(highly effective, avoid DIC)\nGemtuzumab ozogamicin", "Ponatinib for T315I mutation\nAlloSCT in blast crisis", "Chemoimmunotherapy: FCR\n(Fludarabine + Cyclophosphamide\n+ Rituximab) for fit patients"),
(False, "CNS Prophylaxis", "MANDATORY\n(Intrathecal methotrexate)", "Selective", "Not routine", "Not routine"),
(False, "Maintenance Therapy", "Yes (6-mercaptopurine +\nMethotrexate × 2-3 yrs)", "Generally not used", "Indefinite TKI (lifelong)", "Only when disease progresses"),
(False, "Stem Cell Transplant", "High-risk relapsed ALL", "AML in CR1 (high-risk)", "Blast crisis; TKI-resistant CML", "Refractory/relapsed CLL"),
# ── SECTION: PROGNOSIS ──
(True, "PROGNOSIS", "", "", "", ""),
(False, "Overall Survival", "Children: ~90% cure\nAdults: 40-50% cure", "Younger adults: 40-50% long-term\nElderly: <20% 5-yr OS", "Excellent with TKI\n(near-normal life expectancy)", "Indolent; median survival ~10 yr\n(range: 1-30+ yr)"),
(False, "Good Prognostic Factors", "Age 1-10 yr\nWBC <10,000\nt(12;21) ETV6-RUNX1\nHyperploidy >50 chr\nFemale sex", "t(15;17), t(8;21), inv(16)\nYoung age (<60 yr)\nNPM1 mutation (without FLT3)\nCEBPA biallelic", "Chronic phase at diagnosis\nLow Sokal score\nCCyR / MMR with TKI\nYoung age", "Rai 0\nMutated IGHV\nDel 13q only\nNo del 17p/11q\nZAP-70 negative"),
(False, "Poor Prognostic Factors", "Age <1 yr or adult\nWBC >100,000\nt(9;22), t(4;11)\nHypoploidy\nMale sex (T-ALL)", "Complex karyotype\nFLT3-ITD mutation\nTP53 mutation\nAge >60 yr\nSecondary AML (post-MDS)", "Blast crisis\nDel 17p / ABL kinase mutations\nHigh Sokal score\nTKI resistance", "Del 17p (TP53) - worst\nDel 11q (ATM)\nUnmutated IGHV\nZAP-70+, CD38+\nRichter transformation"),
(False, "Transformation Risk", "Relapse possible; CNS relapse", "Secondary MDS/AML post-chemo", "Blast crisis (AML or ALL type)\n~3-5%/yr untreated", "Richter syndrome → DLBCL (5-10%)"),
]
# Write rows
row_fills = {
"ALL": SEC_ALL, "AML": SEC_AML, "CML": SEC_CML, "CLL": SEC_CLL
}
current_row = 4
for is_section, param, all_v, aml_v, cml_v, cll_v in rows:
if is_section:
# Section header spanning all columns
merge_write(ws2, current_row, 1, current_row, 5,
f" {param}",
fill=hex_fill(HEADER_BG),
font=Font(name="Arial", bold=True, size=10, color="FFFFFF"),
align=Alignment(horizontal="left", vertical="center"),
border=thin_border()
)
ws2.row_dimensions[current_row].height = 20
else:
vals = [param, all_v, aml_v, cml_v, cll_v]
bgs = [LABEL_BG, SEC_ALL, SEC_AML, SEC_CML, SEC_CLL]
for col_idx, (val, bg) in enumerate(zip(vals, bgs), start=1):
c = ws2.cell(row=current_row, column=col_idx)
c.value = val
c.fill = hex_fill(bg)
if col_idx == 1:
c.font = Font(name="Arial", bold=True, size=9, color="1A3C5E")
c.alignment = Alignment(horizontal="left", vertical="center", wrap_text=True)
else:
# highlight key positive findings
is_key = any(x in str(val) for x in ["POSITIVE", "hallmark", "pathognomonic", "MANDATORY", "MASSIVE", "✓", "HALLMARK"])
c.font = Font(name="Arial", bold=is_key, size=9, color="1A1A1A")
c.alignment = Alignment(horizontal="left", vertical="top", wrap_text=True)
c.border = thin_border()
# dynamic row height based on content
max_lines = max(str(v).count("\n") + 1 for v in [all_v, aml_v, cml_v, cll_v, param])
ws2.row_dimensions[current_row].height = max(18, min(15 * max_lines, 100))
current_row += 1
# Footer
merge_write(ws2, current_row, 1, current_row, 5,
"Source: Robbins & Cotran Pathologic Basis of Disease | Goldman-Cecil Medicine | Quick Compendium of Clinical Pathology | For MBBS/MD Exam Reference",
fill=hex_fill("E8EDF2"),
font=Font(name="Arial", italic=True, size=8, color="666666"),
align=center()
)
# ══════════════════════════════════════════════════════════
# SHEET 3 – QUICK REFERENCE CARD
# ══════════════════════════════════════════════════════════
ws3 = wb.create_sheet("Quick Reference Card")
ws3.column_dimensions["A"].width = 20
ws3.column_dimensions["B"].width = 30
ws3.column_dimensions["C"].width = 30
ws3.column_dimensions["D"].width = 30
ws3.column_dimensions["E"].width = 30
merge_write(ws3, 1, 1, 2, 5,
"⚡ LEUKEMIA QUICK REFERENCE CARD — HIGH-YIELD MBBS MNEMONICS & ONE-LINERS",
fill=hex_fill(TITLE_BG),
font=Font(name="Arial", bold=True, size=13, color="FFFFFF"),
align=center()
)
quick_headers = ["LEUKEMIA", "ONE-LINER", "PATHOGNOMONIC SIGN", "DON'T MISS", "TREATMENT PEARL"]
for i, h in enumerate(quick_headers):
c = ws3.cell(row=3, column=i+1)
c.value = h
c.fill = hex_fill(HEADER_BG)
c.font = Font(name="Arial", bold=True, size=10, color="FFFFFF")
c.alignment = center(wrap=True)
c.border = thin_border()
quick_data = [
(ALL_BG, "ALL\n(Acute Lymphoblastic\nLeukemia)",
"Most common childhood cancer. Lymphoblasts. TdT+. CALLA (CD10)+. t(12;21) = best; t(9;22) = worst. CNS prophylaxis mandatory.",
"TdT POSITIVE\n(terminal deoxynucleotidyl\ntransferase)",
"T-ALL → Anterior mediastinal mass in adolescent males!\nPh+ ALL → add TKI urgently",
"Vincristine + Prednisolone\n+ L-Asparaginase\n+ Anthracycline (VPDL)\n+ Intrathecal MTX (CNS)"),
(AML_BG, "AML\n(Acute Myeloid\nLeukemia)",
"Adults. Myeloblasts. Auer rods (MPO+). M3-APL = ATRA sensitive. '7+3' regimen (Cytarabine + Anthracycline). Watch for DIC in APL.",
"AUER RODS\n(pink needle-like inclusions\nin myeloblasts; MPO+)",
"M3-APL → DIC is life-threatening!\nStart ATRA immediately\n(do NOT wait for cytogenetics!)",
"M3-APL: ATRA + Arsenic Trioxide\nOthers: Cytarabine (7 days)\n+ Idarubicin/Daunorubicin (3 days)"),
(CML_BG, "CML\n(Chronic Myeloid\nLeukemia)",
"Philadelphia chromosome t(9;22) BCR-ABL1 p210. LOW LAP score. Massive splenomegaly. Imatinib (TKI) = treatment. 3 phases: Chronic → Accelerated → Blast Crisis.",
"Philadelphia Chromosome\nt(9;22) BCR-ABL1\n+ LOW LAP score",
"Blast crisis = transforms to AML (70%)\nor ALL (30%) → poor prognosis!\nBasophilia warns of crisis",
"Imatinib (1st gen TKI) 400mg/day\nDasatinib / Nilotinib (2nd gen)\nPonatinib (T315I mutation)\nAlloSCT in blast crisis"),
(CLL_BG, "CLL\n(Chronic Lymphocytic\nLeukemia)",
"Most common adult leukemia in West. Elderly. Mature B cells. CD5+/CD19+/CD23+. Smudge cells. Often asymptomatic. Richter transformation → DLBCL (5-10%). Watch & wait if stable.",
"SMUDGE CELLS\n(fragile B lymphocytes\nrupture on smear)",
"Hypogammaglobulinemia → recurrent infections\nAutoimmune hemolytic anemia (AIHA) in 10-15%\nRichter syndrome = sudden mass + B symptoms",
"Watch & wait (asymptomatic)\nIbrutinib (BTK inhibitor)\nVenetoclax (BCL-2 inhibitor)\nRituximab (anti-CD20)\nFCR for fit patients"),
]
for i, (bg, name, oneliner, patho, miss, rx) in enumerate(quick_data):
row = 4 + i
data = [name, oneliner, patho, miss, rx]
for col_idx, val in enumerate(data, start=1):
c = ws3.cell(row=row, column=col_idx)
c.value = val
c.fill = hex_fill(bg if col_idx == 1 else "F8F9FA")
if col_idx == 1:
c.font = Font(name="Arial", bold=True, size=10, color="FFFFFF")
c.alignment = center(wrap=True)
else:
c.font = Font(name="Arial", size=9, color="1A1A1A")
c.alignment = Alignment(horizontal="left", vertical="top", wrap_text=True)
c.border = thin_border()
ws3.row_dimensions[row].height = 80
ws3.row_dimensions[3].height = 22
# ── MNEMONICS BOX ──
mnemo_row = 9
merge_write(ws3, mnemo_row, 1, mnemo_row, 5,
" MNEMONICS & HIGH-YIELD EXAM TIPS",
fill=hex_fill(HEADER_BG),
font=Font(name="Arial", bold=True, size=10, color="FFFFFF"),
align=Alignment(horizontal="left", vertical="center")
)
mnemos = [
("TdT", "ONLY positive in ALL (lymphoblasts). Think: 'T for Terminal = T for ALL'"),
("Auer Rods", "ONLY in AML. 'Auer = AML'. Myeloperoxidase (MPO) stain positive. Pathognomonic."),
("Philadelphia Chromosome", "t(9;22) BCR-ABL1. ALWAYS in CML. Also in Ph+ ALL (poor prognosis). Think: 'Ph = Philly-Myeloid-Chronic'"),
("Smudge Cells", "ONLY in CLL. Fragile mature B cells rupture during smear preparation. Think: 'CLL cells are fragile old men'"),
("LAP Score", "LOW only in CML. Distinguishes from leukemoid reaction (high LAP). Think: 'CML Lowers Alkaline Phosphatase'"),
("CD5+ B cells", "ONLY seen in CLL (and Mantle Cell Lymphoma). CD5 is a T-cell marker aberrantly expressed in CLL."),
("Age Rule", "ALL = Children | AML = Middle-aged adults | CML = 40-60 yr | CLL = Elderly (>65)"),
("Splenomegaly", "MASSIVE → always CML. Moderate in all others."),
("M3-APL Emergency", "Start ATRA IMMEDIATELY for APL-M3 (do NOT wait). DIC can be fatal. t(15;17) PML-RARA."),
("CML Phases", "Chronic (blasts <10%) → Accelerated (blasts 10-19%) → Blast Crisis (blasts ≥20%, = acute leukemia)"),
]
for i, (key, tip) in enumerate(mnemos):
row = mnemo_row + 1 + i
c_key = ws3.cell(row=row, column=1)
c_key.value = key
c_key.fill = hex_fill("1A3C5E")
c_key.font = Font(name="Arial", bold=True, size=9, color="FFFFFF")
c_key.alignment = Alignment(horizontal="left", vertical="center", wrap_text=True)
c_key.border = thin_border()
merge_write(ws3, row, 2, row, 5,
tip,
fill=hex_fill("F0F4F8"),
font=Font(name="Arial", size=9, color="1A1A1A"),
align=Alignment(horizontal="left", vertical="center", wrap_text=True),
border=thin_border()
)
ws3.row_dimensions[row].height = 22
# Footer
footer_row = mnemo_row + 1 + len(mnemos) + 1
merge_write(ws3, footer_row, 1, footer_row, 5,
"Source: Robbins & Cotran Pathologic Basis of Disease | Goldman-Cecil Medicine | Quick Compendium of Clinical Pathology | © MBBS Medical Reference",
fill=hex_fill("E8EDF2"),
font=Font(name="Arial", italic=True, size=8, color="666666"),
align=center()
)
# ─────────────────────────────────────────────────────────
# FREEZE PANES & PRINT SETTINGS
# ─────────────────────────────────────────────────────────
ws1.freeze_panes = "B3"
ws2.freeze_panes = "B4"
ws3.freeze_panes = "B4"
for ws in [ws1, ws2, ws3]:
ws.sheet_view.showGridLines = True
# ─────────────────────────────────────────────────────────
# SAVE
# ─────────────────────────────────────────────────────────
output_path = "/tmp/workspace/leukemia-flowchart/Leukemia_Diagnostic_Flowchart_MBBS.xlsx"
wb.save(output_path)
print(f"Saved: {output_path}")
cd /tmp/workspace/leukemia-flowchart && python build_leukemia_excel.py 2>&1
~/leukemia-flowchart/build_leukemia_excel.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/leukemia-flowchart/build_leukemia_excel.py'
~/leukemia-flowchart/build_leukemia_excel.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/leukemia-flowchart/build_leukemia_excel.py'
cd /tmp/workspace/leukemia-flowchart && python build_leukemia_excel.py 2>&1
ls -lh /tmp/workspace/leukemia-flowchart/Leukemia_Diagnostic_Flowchart_MBBS.xlsx && python -c " import openpyxl wb = openpyxl.load_workbook('/tmp/workspace/leukemia-flowchart/Leukemia_Diagnostic_Flowchart_MBBS.xlsx') print('Sheets:', wb.sheetnames) for name in wb.sheetnames: ws = wb[name] print(f' {name}: {ws.max_row} rows x {ws.max_column} cols') print('File OK - no errors') "
Leukemia Diagnostic Flowchart MBBS
Spreadsheet · XLSX