Make study summary notes for this topic and include relevant points from the document slide provided as well. Make notes using the picture from Guyton, and don't use any notes or ideas from other books or anywhere else. Just stick with the slides and pictures from the textbooks.

Reading File
Browsing Directory

~/attachments/d2dea31d-2747-42c6-a682-a9c38c273154

Running Command

cd /tmp/workspace/attachments/d2dea31d-2747-42c6-a682-a9c38c273154 && python3 -c " from docx import Document for fname in ['wbc.docx', 'White blood cells .docx']: print('='*40, fname, '='*40) doc = Document(fname) for p in doc.paragraphs: style = p.style.name if p.style else 'None' if p.text.strip(): print(f'[{style}] {p.text}') # tables for i, t in enumerate(doc.tables): print(f'--- table {i} ---') for row in t.rows: print(' | '.join(c.text for c in row.cells)) "

Running Command

cd /tmp/workspace/attachments/d2dea31d-2747-42c6-a682-a9c38c273154 && mkdir -p /tmp/workspace/wbc_notes/assets && for f in "wbc.docx" "White blood cells .docx"; do base=$(basename "$f" .docx) mkdir -p "/tmp/workspace/wbc_notes/assets/$base" python3 - "$f" "/tmp/workspace/wbc_notes/assets/$base" <<'EOF' import sys, zipfile, os f, outdir = sys.argv[1], sys.argv[2] z = zipfile.ZipFile(f) media = [n for n in z.namelist() if n.startswith('word/media/')] for m in media: data = z.read(m) outpath = os.path.join(outdir, os.path.basename(m)) with open(outpath, 'wb') as fh: fh.write(data) print(outpath, len(data)) EOF done

Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Running Command

cd /tmp/workspace/wbc_notes/assets && python3 -c " from PIL import Image import os for root, dirs, files in os.walk('.'): if 'compressed' in root: continue for fn in files: if fn.lower().endswith(('.png', '.jpeg', '.jpg')): path = os.path.join(root, fn) out_dir = os.path.join('compressed', root) os.makedirs(out_dir, exist_ok=True) im = Image.open(path).convert('RGB') w,h = im.size scale = min(1, 1100/max(w,h)) im2 = im.resize((int(w*scale), int(h*scale))) outpath = os.path.join(out_dir, os.path.splitext(fn)[0]+'.jpg') im2.save(outpath, 'JPEG', quality=70) print(outpath, os.path.getsize(outpath)) "

Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Running Command

cd /tmp/workspace/wbc_notes/assets/wbc && python3 -c " from PIL import Image for f in ['image1.png','image2.png','image3.png','image4.png']: im = Image.open(f) print(f, im.size) "

Running Command

cd /tmp/workspace/wbc_notes/assets/wbc && mkdir -p figs && python3 -c " from PIL import Image crops = { 'fig34_1_2.png': ('image1.png', (200, 60, 620, 300)), # both genesis figures + chemotaxis fig on facing page 'fig34_3.png': ('image2.png', (10, 75, 350, 350)), 'fig34_4_5.png': ('image2.png', (760, 75, 1431, 350)), 'fig34_6.png': ('image3.png', (60, 75, 390, 350)), 'fig34_7.png': ('image3.png', (790, 75, 1431, 350)), 'fig34_8.png': ('image4.png', (10, 60, 390, 400)), } for out, (src, box) in crops.items(): im = Image.open(src) im.crop(box).save('figs/'+out) print(out, im.crop(box).size) "

Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Running Command

cd /tmp/workspace/wbc_notes/assets/wbc && python3 -c " from PIL import Image crops = { 'fig34_1.png': ('image1.png', (200, 55, 700, 340)), 'fig34_2.png': ('image1.png', (850, 75, 1290, 310)), 'fig34_3.png': ('image2.png', (10, 75, 350, 430)), 'fig34_8.png': ('image4.png', (10, 55, 400, 470)), } for out, (src, box) in crops.items(): im = Image.open(src) im.crop(box).save('figs/'+out) print(out, im.crop(box).size) "

Reading File
Reading File
Reading File
Reading File
Good, the crops look clean. Now I'll build the final study notes document combining the slide content and the Guyton figures.
Writing File

~/wbc_notes/build_notes.py

from docx import Document
from docx.shared import Pt, Inches, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.enum.table import WD_TABLE_ALIGNMENT

FIGS = "/tmp/workspace/wbc_notes/assets/wbc/figs"
GRAY = RGBColor(0x40, 0x40, 0x40)
GREEN = RGBColor(0x1e, 0x7a, 0x3c)

doc = Document()
style = doc.styles["Normal"]
style.font.name = "Calibri"
style.font.size = Pt(11)

def h1(text):
    p = doc.add_heading(text, level=1)
    for r in p.runs:
        r.font.color.rgb = GREEN
    return p

def h2(text):
    p = doc.add_heading(text, level=2)
    return p

def bullet(text, level=0):
    p = doc.add_paragraph(text, style="List Bullet" if level == 0 else "List Bullet 2")
    return p

def cap(text):
    p = doc.add_paragraph(text)
    p.alignment = WD_ALIGN_PARAGRAPH.CENTER
    r = p.runs[0]
    r.italic = True
    r.font.size = Pt(9)
    r.font.color.rgb = GRAY
    return p

def pic(filename, width=5.5):
    doc.add_picture(f"{FIGS}/{filename}", width=Inches(width))
    doc.paragraphs[-1].alignment = WD_ALIGN_PARAGRAPH.CENTER

# ------------------------------------------------------------------
# TITLE
# ------------------------------------------------------------------
title = doc.add_heading("White Blood Cells (Leukocytes) - Study Notes", level=0)
for r in title.runs:
    r.font.color.rgb = GREEN
sub = doc.add_paragraph("Source: Lecture slides + Guyton & Hall, Textbook of Medical Physiology, Ch. 34 - Resistance of the Body to Infection: Leukocytes, Granulocytes, the Monocyte-Macrophage System, and Inflammation")
sub.runs[0].italic = True
sub.runs[0].font.size = Pt(10)
doc.add_paragraph()

# ------------------------------------------------------------------
# 1. GENERAL CHARACTERISTICS / CLASSIFICATION
# ------------------------------------------------------------------
h1("1. Classification of White Blood Cells")
bullet("WBCs (leukocytes) are the mobile units of the body's protective system.")
bullet("Formed partly in the bone marrow (granulocytes and monocytes) and partly in lymphoid tissue (lymphocytes and plasma cells).")
bullet("Transported in the blood to areas of infection/inflammation - can be rapidly delivered where needed.")
bullet("Two main groups (as per slide):")
bullet("Granulocytes - Neutrophil, Eosinophil, Basophil", level=1)
bullet("Agranulocytes - Monocyte, Lymphocyte", level=1)

pic("../../compressed-placeholder", width=1)  # placeholder removed below
doc.paragraphs[-1]._p.getparent().remove(doc.paragraphs[-1]._p)  # cleanup placeholder line

doc.save("/tmp/workspace/wbc_notes/White_Blood_Cells_Study_Notes.docx")
print("draft ok")
Writing File

~/wbc_notes/build_notes.py

from docx import Document
from docx.shared import Pt, Inches, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH

GFIG = "/tmp/workspace/wbc_notes/assets/wbc/figs"
SLIDE = "/tmp/workspace/wbc_notes/assets/compressed/./White blood cells "
GRAY = RGBColor(0x40, 0x40, 0x40)
GREEN = RGBColor(0x1e, 0x7a, 0x3c)
NAVY = RGBColor(0x1f, 0x3b, 0x66)

doc = Document()
style = doc.styles["Normal"]
style.font.name = "Calibri"
style.font.size = Pt(11)

def h1(text):
    p = doc.add_heading(text, level=1)
    for r in p.runs:
        r.font.color.rgb = GREEN
    return p

def h2(text):
    p = doc.add_heading(text, level=2)
    for r in p.runs:
        r.font.color.rgb = NAVY
    return p

def bullet(text, level=0):
    p = doc.add_paragraph(text, style="List Bullet" if level == 0 else "List Bullet 2")
    return p

def cap(text):
    p = doc.add_paragraph(text)
    p.alignment = WD_ALIGN_PARAGRAPH.CENTER
    r = p.runs[0] if p.runs else p.add_run(text)
    r.italic = True
    r.font.size = Pt(9)
    r.font.color.rgb = GRAY
    return p

def pic(path, width=5.5, caption=None):
    doc.add_picture(path, width=Inches(width))
    doc.paragraphs[-1].alignment = WD_ALIGN_PARAGRAPH.CENTER
    if caption:
        cap(caption)

# ==================================================================
# TITLE
# ==================================================================
title = doc.add_heading("White Blood Cells (Leukocytes) - Study Notes", level=0)
for r in title.runs:
    r.font.color.rgb = GREEN
sub = doc.add_paragraph("Compiled strictly from: (1) the lecture slide deck provided, and (2) Guyton & Hall, Textbook of "
                        "Medical Physiology - Chapter 34, \"Resistance of the Body to Infection: I. Leukocytes, "
                        "Granulocytes, the Monocyte-Macrophage System, and Inflammation.\"")
sub.runs[0].italic = True
sub.runs[0].font.size = Pt(10)
doc.add_paragraph()

# ==================================================================
# 1. CLASSIFICATION
# ==================================================================
h1("1. General Characteristics and Classification")
bullet("Leukocytes (WBCs) are the mobile units of the body's protective system - they are formed partly in the "
       "bone marrow (granulocytes and monocytes) and partly in lymphoid tissue (lymphocytes and plasma cells).")
bullet("After formation, they are transported in the blood to the different parts of the body where they are needed.")
bullet("Real value of WBCs: most are specifically transported to areas of serious infection/inflammation, giving a "
       "rapid, potent defense against infectious agents. Granulocytes and monocytes have a special ability to "
       "\"seek out and destroy\" a foreign invader.")
bullet("Six types of WBCs normally present in blood (Guyton):")
bullet("Polymorphonuclear (granular): Neutrophils, Eosinophils, Basophils", level=1)
bullet("Mononuclear (agranular): Monocytes, Lymphocytes, Plasma cells", level=1)
bullet("Slide classification (same 5 cell types, grouped by granularity):")
pic(f"{SLIDE}/image2.jpg", width=5.5, caption="Slide - Agranulocytes (Monocyte, Lymphocyte) vs Granulocytes (Neutrophil, Eosinophil, Basophil)")

h2("Normal WBC counts (per Guyton)")
bullet("Total WBCs: ~7000/microliter of blood (vs ~5,000,000 RBCs/microliter).")
bullet("Neutrophils: 62.0%")
bullet("Lymphocytes: 30.0%")
bullet("Monocytes: 5.3%")
bullet("Eosinophils: 2.3%")
bullet("Basophils: 0.4%")
bullet("Platelets (cell fragments, not true WBCs): 150,000-450,000/microliter, average ~300,000.")

# ==================================================================
# 2. GENESIS OF WBCs
# ==================================================================
h1("2. Genesis of White Blood Cells")
bullet("All WBCs originate from the pluripotent hematopoietic stem cell in the bone marrow, which gives rise to "
       "two major lineages: the myelocytic and the lymphocytic lineage.")
bullet("Myelocytic lineage begins with the myeloblast -> promyelocyte -> myelocyte stages -> mature "
       "granulocytes (neutrophils, eosinophils, basophils) and monocytes.")
bullet("Lymphocytic lineage begins with the lymphoblast -> lymphocytes and plasma cells (produced mainly in "
       "lymph nodes, spleen, thymus, tonsils, and other lymphogenous tissue, and in Peyer's patches).")
bullet("Monocytes also arise from the bone marrow (monoblast) and share a common progenitor with granulocytes.")
pic(f"{GFIG}/fig34_1.png", width=5.0, caption="Guyton Figure 34-1. Genesis of white blood cells - the myelocytic "
    "(myeloblast) and lymphocytic (lymphoblast) series.")

h2("Life span of white blood cells")
bullet("Granulocytes: normally circulate in blood for 4-8 hours, then spend 4-5 days in the tissues before being "
       "used up.")
bullet("In serious tissue infection, this total life span is often shortened to only a few hours because the "
       "granulocytes proceed rapidly to the infected area, perform their function, and are themselves destroyed.")
bullet("Monocytes: have only a short transit time (10-20 hours) in blood before wandering through capillary "
       "membranes into tissues, where they swell to become tissue macrophages and can survive months as the "
       "tissue macrophage system.")
bullet("Lymphocytes enter the circulatory system continually, along with drainage of lymph from lymph nodes and "
       "other lymphoid tissue, and re-enter the lymph and pass back into the blood; this cycle repeats continually. "
       "Lymphocytes live for weeks to months.")

# ==================================================================
# 3. MOVEMENT INTO TISSUES
# ==================================================================
h1("3. Entry of WBCs into Tissue Spaces")
h2("Diapedesis")
bullet("Neutrophils and monocytes can squeeze through gaps between endothelial cells of the blood capillaries and "
       "postcapillary venules by diapedesis - a small portion of the cell slides through the gap, momentarily "
       "constricted to the width of the gap.")
h2("Ameboid motion")
bullet("Once in the tissues, WBCs move by ameboid motion using pseudopod extensions, at velocities up to "
       "40 micrometers/min - as fast as, or faster than, the cell's own length.")
h2("Chemotaxis")
bullet("Movement of WBCs toward an area of tissue damage is directed by chemotactic substances released from the "
       "damaged tissue - this phenomenon is called chemotaxis.")
bullet("Chemotaxis is effective up to 100 micrometers from the inflamed area; because almost no tissue is farther "
       "than 50 micrometers from a capillary, the chemotactic signal easily moves WBCs from capillaries into the "
       "inflamed area.")
bullet("Sequence at the inflamed area: increased capillary permeability -> margination (neutrophils line up along "
       "the endothelium) -> diapedesis -> chemotaxis toward the damaged tissue.")
pic(f"{GFIG}/fig34_2.png", width=5.0, caption="Guyton Figure 34-2. Movement of neutrophils by diapedesis "
    "(through capillary pores) and chemotaxis toward an area of tissue damage.")

# ==================================================================
# 4. PHAGOCYTOSIS
# ==================================================================
h1("4. Phagocytosis")
bullet("Phagocytosis is the major function of neutrophils and macrophages - cellular ingestion of the offending "
       "agent.")
bullet("Selectivity of phagocytosis: normally, smooth surfaces resist phagocytosis, whereas rough surfaces "
       "increase it; a coating of antibodies makes bacteria very susceptible (the antibody attaches to the "
       "phagocyte membrane receptor, invaginating the cell membrane to initiate phagocytosis); dead/degenerating "
       "tissue and foreign particles that are not protected by protective coats are also readily phagocytized.")
bullet("Steps: pseudopod formation and engulfment around the particle -> formation of a closed phagosome -> "
       "fusion with lysosomes to form a phagolysosome -> digestion of the microbe by proteolytic enzymes and "
       "other bactericidal agents -> exocytosis of residual products.")
bullet("A single neutrophil can usually phagocytize 3-20 bacteria before it becomes inactivated and dies; "
       "macrophages are far more powerful, capable of phagocytizing as many as 100 bacteria, and can engulf "
       "much larger particles, even whole RBCs.")
pic(f"{GFIG}/fig34_3.png", width=3.8, caption="Guyton Figure 34-3. Phagocytosis of a pathogen by a phagocytic "
    "cell: antibody coating, pseudopod, phagosome, lysosome fusion (phagolysosome), digestion, and exocytosis.")

h2("Killing of the bacterium")
bullet("Both neutrophils and macrophages contain lysosomes filled with proteolytic enzymes for digesting bacteria "
       "and other foreign protein material; macrophage lysosomes also contain large amounts of lipases that "
       "digest the thick lipid membranes of organisms such as the tuberculosis bacillus.")
bullet("Oxidizing agents (superoxide, hydrogen peroxide, hydroxyl ions) formed by enzymes in the phagosome "
       "membrane, and myeloperoxidase-catalyzed hypochlorite formation, are powerful bactericidal mechanisms.")
bullet("Some bacteria (e.g. the tuberculosis bacillus) resist lysosomal digestion and can cause chronic disease.")

# ==================================================================
# 5. MONOCYTE-MACROPHAGE (RETICULOENDOTHELIAL) SYSTEM
# ==================================================================
h1("5. Monocyte-Macrophage Cell System (Reticuloendothelial System)")
bullet("Monocytes entering tissues swell and develop large numbers of lysosomes to become tissue macrophages, "
       "which can live for months and are the end-stage phagocytic cell.")
bullet("The combination of monocytes, mobile macrophages, fixed tissue macrophages, and specialized endothelial "
       "cells in bone marrow, spleen, and lymph nodes is called the reticuloendothelial system - because it is "
       "essentially synonymous with the monocyte-macrophage system, the term monocyte-macrophage system is now "
       "preferred.")

h2("Tissue macrophages in lymph nodes and liver")
bullet("Lymph nodes: bacteria are removed by macrophages lining the lymph sinuses before the lymph is returned "
       "to the blood; foreign particulate matter entering via afferent lymphatics is phagocytized as it passes "
       "through, preventing general dissemination.")
bullet("Liver sinusoids (Kupffer cells): a special line of macrophages lines the liver sinusoids so that almost "
       "no bacteria from the gastrointestinal tract pass into the general circulating blood.")
pic(f"{GFIG}/fig34_4_5.png", width=5.7, caption="Guyton Figures 34-4 and 34-5. Functional diagram of a lymph "
    "node (left) and Kupffer cells lining the liver sinusoids, phagocytizing India ink particles (right).")

h2("Spleen and bone marrow macrophages")
bullet("If an invading organism succeeds in reaching the general circulation, other lines of macrophages in the "
       "spleen and bone marrow help remove it.")
bullet("In the spleen, blood percolates through the trabecular meshwork of the red pulp before entering the "
       "venous sinuses; the walling-off process of red pulp allows exceptional phagocytosis of unwanted debris, "
       "including old and abnormal RBCs.")
pic(f"{GFIG}/fig34_6.png", width=3.3, caption="Guyton Figure 34-6. Functional structures of the spleen - pulp, "
    "capillaries, venous sinuses, vein, and artery.")

h2("Tissue-specific names of fixed macrophages (slide)")
pic(f"{SLIDE}/image5.jpg", width=5.7, caption="Slide - Tissue-specific names of fixed macrophages (e.g. Kupffer "
    "cells in liver, microglia in CNS, osteoclasts in bone, alveolar macrophages in lungs, Langerhans cells in "
    "skin, etc.)")

# ==================================================================
# 6. INFLAMMATION
# ==================================================================
h1("6. Inflammation and the Neutrophil/Macrophage Response")
bullet("Inflammation is the tissue response to injury (bacteria, trauma, chemicals, heat, or other phenomena) and "
       "is characterized by: (1) vasodilation with increased local blood flow; (2) increased capillary "
       "permeability with leakage of fluid into interstitial spaces; (3) clotting of interstitial fluid due to "
       "fibrinogen leakage; (4) migration of granulocytes and monocytes into the tissue; and (5) swelling of "
       "tissue cells.")
bullet("Products of tissue injury/inflammation (histamine, bradykinin, serotonin, prostaglandins, complement "
       "reaction products, blood-clotting reaction products, and lymphokines) strongly activate the "
       "macrophage system, and within minutes local macrophages begin phagocytic actions.")

h2("Sequence of neutrophil recruitment (Guyton Figure 34-7)")
bullet("Margination: increased expression of adhesion molecules (selectins, ICAM-1) on inflamed endothelium "
       "causes neutrophils to marginate along the vessel wall.")
bullet("Rolling adhesion and tight binding: neutrophil receptors bind loosely to selectins, then more firmly "
       "to ICAM-1 via integrins.")
bullet("Diapedesis: the neutrophil squeezes through the wall of the vessel.")
bullet("Migration: the neutrophil moves through the tissue toward the site of injury, guided by chemotactic "
       "cytokines.")
pic(f"{GFIG}/fig34_7.png", width=5.7, caption="Guyton Figure 34-7. Migration of a neutrophil from blood into "
    "inflamed tissue - rolling adhesion, tight binding, diapedesis, migration.")

bullet("Acute increase in neutrophils in the blood (neutrophilia) occurs within a few hours after onset of acute "
       "severe inflammation, as chemical factors mobilize neutrophils from the bone marrow.")
bullet("Macrophage invasion is a second, slightly delayed line of defense; monocytes entering inflamed tissue "
       "enlarge to become macrophages, and the population of macrophages can be augmented by mitotic "
       "division of macrophages already in the tissue.")
bullet("Increased production of granulocytes and monocytes by the bone marrow is a fourth line of defense, "
       "stimulated by factors such as TNF, IL-1, GM-CSF, G-CSF, and M-CSF released from activated macrophages "
       "and inflamed tissues; it takes 3-4 days for the marrow response to become significant.")
pic(f"{GFIG}/fig34_8.png", width=3.7, caption="Guyton Figure 34-8. Feedback control of bone marrow production of "
    "granulocytes and monocytes/macrophages via TNF, IL-1, GM-CSF, G-CSF, and M-CSF.")

# ==================================================================
# 7. LEUKOPENIA & LEUKEMIA
# ==================================================================
h1("7. Leukopenia and Leukemia (Guyton)")
bullet("Leukopenia is a clinical condition in which the bone marrow produces very few WBCs, leaving the body "
       "unprotected against many bacteria and other invading agents; it can be rapidly fatal.")
bullet("Leukemias are caused by cancerous mutation of a myelogenous or lymphogenous cell, producing greatly "
       "increased numbers of abnormal WBCs. The two general types are lymphocytic leukemia (cancerous "
       "lymphoid cells) and myelogenous leukemia (cancerous production of young myelogenous cells in bone "
       "marrow, which may spread throughout the body and produce leukemic tissue in extramedullary sites such "
       "as lymph nodes, spleen, and liver).")
bullet("Effects of leukemia on the body: (1) metastatic growth of leukemic cells in abnormal areas, causing bone "
       "pain and fractures; (2) spread to spleen, lymph nodes, liver, and other vascular regions, with common "
       "effects being development of infection, severe anemia, and a bleeding tendency from thrombocytopenia "
       "(lack of platelets) due to displacement of normal marrow/lymphoid cells; (3) excessive metabolic use of "
       "substrates by the rapidly growing leukemic tissue, causing depletion of body reserves for foodstuffs, "
       "amino acids, and vitamins - metabolic starvation of normal tissues can eventually be a cause of death.")

# ==================================================================
# 8. WBC DISORDERS (SLIDE)
# ==================================================================
h1("8. WBC Disorders (Slide Summary Tables)")
h2("Neutrophils")
pic(f"{SLIDE}/image6.jpg", width=6.0, caption="Slide - Neutrophilia (neutrophilic leukocytosis) and Neutropenia: "
    "variation and associated conditions.")
h2("Eosinophils and Basophils")
pic(f"{SLIDE}/image7.jpg", width=6.0, caption="Slide - Eosinophilia, Eosinopenia, Basophilia, and Basopenia: "
    "variation and associated conditions.")
h2("Monocytes and Lymphocytes")
pic(f"{SLIDE}/image8.jpg", width=6.0, caption="Slide - Monocytosis, Monocytopenia, Lymphocytosis, and "
    "Lymphocytopenia: variation and associated conditions.")

# ==================================================================
# 9. FEVER (SLIDE CONTINUATION)
# ==================================================================
h1("9. Fever (Slide - continuation of the inflammatory response)")
bullet("Fever = elevation in core body temperature above the daily range of an individual (> 37.8 C).")
h2("Pathophysiology of fever")
bullet("Exogenous pyrogens (bacteria, viruses, antigen-antibody complexes) activate host inflammatory cells "
       "(macrophages, neutrophils, Kupffer cells, splenic and alveolar macrophages).")
bullet("These cells produce endogenous pyrogens (IL-1, IL-6, TNF, and other pyrogenic cytokines).")
bullet("Endogenous pyrogens stimulate synthesis of PGE2 in the hypothalamus, acting on the thermoregulatory "
       "center (preoptic neurons of the anterior hypothalamus).")
bullet("This elevates the hypothalamic thermostat \"set point\", producing physiologic and behavioral changes "
       "that result in fever.")
pic(f"{SLIDE}/image9.jpg", width=5.5, caption="Slide - Pathophysiology of fever: pyrogens -> inflammatory cells -> "
    "cytokines -> PGE2 -> hypothalamic set-point elevation -> fever.")

h2("Arachidonic acid pathway (source of PGE2)")
bullet("Membrane phospholipase A2 releases arachidonic acid from linoleic acid in the cell membrane.")
bullet("COX-1/COX-2 convert arachidonic acid to prostaglandin H2, which is converted to PGE2 (fever, COX-2; also "
       "central sensitization of pain signaling, COX-1&2) and other prostaglandins/thromboxane.")
bullet("5-Lipoxygenase converts arachidonic acid to leukotrienes (bronchoconstriction, mucus secretion, edema, "
       "eosinophil migration).")
bullet("Drug classes shown on the slide acting on this pathway: glucocorticoids (inhibit phospholipase A2), "
       "nonselective NSAIDs (inhibit COX-1/COX-2), selective COX-2 inhibitors, 5-lipoxygenase inhibitors "
       "(zileuton), and leukotriene receptor antagonists (montelukast, zafirlukast).")
pic(f"{SLIDE}/image10.jpg", width=6.0, caption="Slide - Arachidonic acid pathway: production of prostaglandins, "
    "thromboxane, and leukotrienes, and sites of drug action.")

h2("Physiologic effects of fever")
bullet("Heat conservation (vasoconstriction): increases heat production in the periphery and causes a subjective "
       "cold sensation in the hands and feet as blood is shunted from the periphery to internal organs.")
bullet("Heat production (thermogenesis of muscle and adipose tissue): increased core temperature via release of "
       "ATP; muscle heat production causes shivering; adipose tissue heat production is increased in neonates "
       "due to a higher percentage of brown fat.")
bullet("Once the hypothalamic set-point resets downward, heat loss occurs through vasodilation, sweating, and "
       "behavior changes - possibly due to a reduction in pyrogenic cytokines or use of antipyretics.")
bullet("Common symptoms: rigors (shivering), sweats, chills, flushing of skin, tachycardia or palpitations, "
       "lethargy.")
pic(f"{SLIDE}/image11.jpg", width=5.7, caption="Slide - Physiologic effects of fever and common symptoms.")

doc.save("/tmp/workspace/wbc_notes/White_Blood_Cells_Study_Notes.docx")
print("saved")
Running Command

rm -f /tmp/workspace/wbc_notes/build_notes.py

Writing File

~/wbc_notes/build_notes.py

from docx import Document
from docx.shared import Pt, Inches, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH

GFIG = "/tmp/workspace/wbc_notes/assets/wbc/figs"
SLIDE = "/tmp/workspace/wbc_notes/assets/compressed/./White blood cells "
GRAY = RGBColor(0x40, 0x40, 0x40)
GREEN = RGBColor(0x1e, 0x7a, 0x3c)
NAVY = RGBColor(0x1f, 0x3b, 0x66)

doc = Document()
style = doc.styles["Normal"]
style.font.name = "Calibri"
style.font.size = Pt(11)

def h1(text):
    p = doc.add_heading(text, level=1)
    for r in p.runs:
        r.font.color.rgb = GREEN
    return p

def h2(text):
    p = doc.add_heading(text, level=2)
    for r in p.runs:
        r.font.color.rgb = NAVY
    return p

def bullet(text, level=0):
    p = doc.add_paragraph(text, style="List Bullet" if level == 0 else "List Bullet 2")
    return p

def cap(text):
    p = doc.add_paragraph(text)
    p.alignment = WD_ALIGN_PARAGRAPH.CENTER
    r = p.add_run(text) if not p.runs else p.runs[0]
    r.italic = True
    r.font.size = Pt(9)
    r.font.color.rgb = GRAY
    return p

def pic(path, width=5.5, caption=None):
    doc.add_picture(path, width=Inches(width))
    doc.paragraphs[-1].alignment = WD_ALIGN_PARAGRAPH.CENTER
    if caption:
        cap(caption)

# ==================================================================
title = doc.add_heading("White Blood Cells (Leukocytes) - Study Notes", level=0)
for r in title.runs:
    r.font.color.rgb = GREEN
sub = doc.add_paragraph("Compiled strictly from: (1) the lecture slide deck provided, and (2) Guyton & Hall, "
                        "Textbook of Medical Physiology - Chapter 34, \"Resistance of the Body to Infection: "
                        "I. Leukocytes, Granulocytes, the Monocyte-Macrophage System, and Inflammation.\"")
sub.runs[0].italic = True
sub.runs[0].font.size = Pt(10)
doc.add_paragraph()

# 1
h1("1. General Characteristics and Classification")
bullet("Leukocytes (WBCs) are the mobile units of the body's protective system - formed partly in the bone "
       "marrow (granulocytes and monocytes) and partly in lymphoid tissue (lymphocytes and plasma cells).")
bullet("After formation, they are transported in the blood to the parts of the body where they are needed.")
bullet("Real value of WBCs: most are specifically transported to areas of serious infection/inflammation, giving "
       "a rapid, potent defense. Granulocytes and monocytes have a special ability to \"seek out and destroy\" "
       "a foreign invader.")
bullet("Six types of WBCs normally present in blood (Guyton):")
bullet("Polymorphonuclear (granular): Neutrophils, Eosinophils, Basophils", level=1)
bullet("Mononuclear (agranular): Monocytes, Lymphocytes, Plasma cells", level=1)
bullet("Slide classification (same cell types, grouped by granularity):")
pic(f"{SLIDE}/image2.jpg", width=5.5, caption="Slide - Agranulocytes (Monocyte, Lymphocyte) vs Granulocytes "
    "(Neutrophil, Eosinophil, Basophil)")

h2("Normal WBC counts (Guyton)")
bullet("Total WBCs: ~7000/microliter of blood (vs ~5,000,000 RBCs/microliter).")
bullet("Neutrophils: 62.0%  |  Lymphocytes: 30.0%  |  Monocytes: 5.3%  |  Eosinophils: 2.3%  |  Basophils: 0.4%")
bullet("Platelets (cell fragments, not true WBCs): 150,000-450,000/microliter, average ~300,000.")

# 2
h1("2. Genesis of White Blood Cells")
bullet("All WBCs originate from the pluripotent hematopoietic stem cell in the bone marrow, giving rise to the "
       "myelocytic and lymphocytic lineages.")
bullet("Myelocytic lineage: myeloblast -> promyelocyte -> myelocyte stages -> mature granulocytes (neutrophils, "
       "eosinophils, basophils) and monocytes.")
bullet("Lymphocytic lineage: lymphoblast -> lymphocytes and plasma cells (produced mainly in lymph nodes, "
       "spleen, thymus, tonsils, and Peyer's patches).")
pic(f"{GFIG}/fig34_1.png", width=5.0, caption="Guyton Figure 34-1. Genesis of white blood cells - the "
    "myelocytic (myeloblast) and lymphocytic (lymphoblast) series.")

h2("Life span of white blood cells")
bullet("Granulocytes: circulate in blood 4-8 hours, then spend 4-5 days in tissues before being used up; in "
       "serious infection this life span is often shortened to just a few hours.")
bullet("Monocytes: short transit time (10-20 hours) in blood, then swell in tissues to become tissue macrophages "
       "and can survive for months (tissue macrophage system).")
bullet("Lymphocytes: enter the circulation continually with lymph drainage, recirculate between blood and lymph, "
       "and live for weeks to months.")

# 3
h1("3. Entry of WBCs into Tissue Spaces")
h2("Diapedesis, ameboid motion, chemotaxis")
bullet("Diapedesis: neutrophils and monocytes squeeze through gaps between endothelial cells of capillaries and "
       "postcapillary venules; a small portion of the cell slides through momentarily, constricted to the width "
       "of the gap.")
bullet("Ameboid motion: once in tissue, WBCs move via pseudopod extensions at velocities up to 40 micrometers/min.")
bullet("Chemotaxis: movement toward tissue damage directed by chemotactic substances; effective up to 100 "
       "micrometers from the inflamed area (no tissue is farther than 50 micrometers from a capillary).")
bullet("Sequence: increased capillary permeability -> margination -> diapedesis -> chemotaxis toward the "
       "damaged tissue.")
pic(f"{GFIG}/fig34_2.png", width=5.0, caption="Guyton Figure 34-2. Movement of neutrophils by diapedesis "
    "(through capillary pores) and chemotaxis toward an area of tissue damage.")

# 4
h1("4. Phagocytosis")
bullet("Major function of neutrophils and macrophages - cellular ingestion of the offending agent.")
bullet("Selectivity: smooth surfaces resist phagocytosis, rough surfaces favor it; antibody-coated bacteria "
       "(opsonization) are very susceptible; dead/degenerating tissue and unprotected foreign particles are "
       "readily phagocytized.")
bullet("Steps: pseudopod engulfment -> phagosome formation -> fusion with lysosome (phagolysosome) -> "
       "digestion by proteolytic enzymes and bactericidal agents -> exocytosis of residual products.")
bullet("A single neutrophil can phagocytize 3-20 bacteria before it is inactivated and dies; macrophages are "
       "far more powerful - up to about 100 bacteria, and can engulf much larger particles, even whole RBCs.")
pic(f"{GFIG}/fig34_3.png", width=3.8, caption="Guyton Figure 34-3. Phagocytosis of a pathogen: antibody coating, "
    "pseudopod, phagosome, lysosome fusion (phagolysosome), digestion, and exocytosis.")

h2("Killing of the bacterium")
bullet("Neutrophil/macrophage lysosomes contain proteolytic enzymes; macrophage lysosomes also contain lipases "
       "that digest thick lipid membranes (e.g. tuberculosis bacillus).")
bullet("Oxidizing agents (superoxide, hydrogen peroxide, hydroxyl ions) and myeloperoxidase-catalyzed "
       "hypochlorite formation are powerful bactericidal mechanisms.")
bullet("Some organisms (e.g. tuberculosis bacillus) resist lysosomal digestion, causing chronic disease.")

# 5
h1("5. Monocyte-Macrophage Cell System (Reticuloendothelial System)")
bullet("Monocytes entering tissue swell and develop lysosomes to become tissue macrophages - the end-stage "
       "phagocytic cell, which can live for months.")
bullet("The combination of monocytes, mobile macrophages, fixed tissue macrophages, and specialized "
       "endothelial cells in bone marrow, spleen, and lymph nodes is called the reticuloendothelial system, "
       "now more precisely termed the monocyte-macrophage system.")

h2("Tissue macrophages in lymph nodes and liver")
bullet("Lymph nodes: macrophages line the lymph sinuses and phagocytize foreign particulate matter as lymph "
       "passes through, preventing general dissemination before lymph returns to the blood.")
bullet("Liver sinusoids (Kupffer cells): line the sinusoids so that almost no bacteria from the GI tract pass "
       "into the general circulation.")
pic(f"{GFIG}/fig34_4_5.png", width=5.7, caption="Guyton Figures 34-4 and 34-5. Functional diagram of a lymph "
    "node (left) and Kupffer cells lining the liver sinusoids (right).")

h2("Spleen and bone marrow macrophages")
bullet("Blood percolates through the trabecular meshwork (red pulp) before entering venous sinuses; this "
       "walling-off allows exceptional phagocytosis of unwanted debris, including old/abnormal RBCs.")
pic(f"{GFIG}/fig34_6.png", width=3.3, caption="Guyton Figure 34-6. Functional structures of the spleen - pulp, "
    "capillaries, venous sinuses, vein, artery.")

h2("Tissue-specific names of fixed macrophages (slide)")
pic(f"{SLIDE}/image5.jpg", width=5.7, caption="Slide - Tissue-specific names of fixed macrophages (e.g. Kupffer "
    "cells-liver, microglia-CNS, osteoclasts-bone, alveolar macrophages-lungs, Langerhans cells-skin).")

# 6
h1("6. Inflammation and the Neutrophil/Macrophage Response")
bullet("Inflammation is the tissue response to injury, characterized by: (1) vasodilation with increased local "
       "blood flow; (2) increased capillary permeability with fluid leakage; (3) clotting of interstitial "
       "fluid; (4) migration of granulocytes/monocytes into tissue; (5) swelling of tissue cells.")
bullet("Products of tissue injury (histamine, bradykinin, serotonin, prostaglandins, complement products, "
       "clotting products, lymphokines) activate the macrophage system within minutes.")

h2("Sequence of neutrophil recruitment (Guyton Figure 34-7)")
bullet("Margination (selectins, ICAM-1 on inflamed endothelium) -> rolling adhesion -> tight binding (integrins) "
       "-> diapedesis -> migration toward the site of injury, guided by chemotactic cytokines.")
pic(f"{GFIG}/fig34_7.png", width=5.7, caption="Guyton Figure 34-7. Migration of a neutrophil from blood into "
    "inflamed tissue - rolling adhesion, tight binding, diapedesis, migration.")

bullet("Neutrophilia occurs within hours of acute severe inflammation as chemical factors mobilize neutrophils "
       "from bone marrow.")
bullet("Macrophage invasion is a delayed second line of defense (monocytes enlarging into macrophages).")
bullet("Increased bone marrow production of granulocytes/monocytes is a fourth line of defense, stimulated by "
       "TNF, IL-1, GM-CSF, G-CSF, and M-CSF from activated macrophages/inflamed tissue; takes 3-4 days to "
       "become significant.")
pic(f"{GFIG}/fig34_8.png", width=3.7, caption="Guyton Figure 34-8. Feedback control of bone marrow production of "
    "granulocytes and monocytes/macrophages via TNF, IL-1, GM-CSF, G-CSF, M-CSF.")

# 7
h1("7. Leukopenia and Leukemia (Guyton)")
bullet("Leukopenia: bone marrow produces very few WBCs, leaving the body unprotected against invading agents; "
       "can be rapidly fatal.")
bullet("Leukemias arise from cancerous mutation of a myelogenous or lymphogenous cell -> lymphocytic leukemia "
       "or myelogenous leukemia, with leukemic tissue spreading to lymph nodes, spleen, liver, bone.")
bullet("Effects of leukemia: metastatic growth of leukemic cells causing bone pain/fractures; spread to spleen, "
       "lymph nodes, liver; infection, severe anemia, and bleeding tendency (thrombocytopenia) from "
       "displacement of normal marrow/lymphoid cells; excessive metabolic substrate use by leukemic tissue "
       "leading to metabolic starvation, which alone can cause death.")

# 8
h1("8. WBC Disorders (Slide Summary Tables)")
h2("Neutrophils")
pic(f"{SLIDE}/image6.jpg", width=6.0, caption="Slide - Neutrophilia (neutrophilic leukocytosis) and "
    "Neutropenia: variation and associated conditions.")
h2("Eosinophils and Basophils")
pic(f"{SLIDE}/image7.jpg", width=6.0, caption="Slide - Eosinophilia, Eosinopenia, Basophilia, and Basopenia: "
    "variation and associated conditions.")
h2("Monocytes and Lymphocytes")
pic(f"{SLIDE}/image8.jpg", width=6.0, caption="Slide - Monocytosis, Monocytopenia, Lymphocytosis, and "
    "Lymphocytopenia: variation and associated conditions.")

# 9
h1("9. Fever (Slide - continuation of the inflammatory response)")
bullet("Fever = elevation in core body temperature above the daily range of an individual (> 37.8 C).")
h2("Pathophysiology of fever")
bullet("Exogenous pyrogens (bacteria, viruses, antigen-antibody complexes) activate host inflammatory cells "
       "(macrophages, neutrophils, Kupffer cells, splenic and alveolar macrophages).")
bullet("These cells produce endogenous pyrogens (IL-1, IL-6, TNF, other pyrogenic cytokines) -> synthesis of "
       "PGE2 in the hypothalamus -> acts on the thermoregulatory center (preoptic neurons of anterior "
       "hypothalamus) -> elevates the hypothalamic \"set point\" -> physiologic/behavioral changes -> fever.")
pic(f"{SLIDE}/image9.jpg", width=5.5, caption="Slide - Pathophysiology of fever: pyrogens -> inflammatory cells "
    "-> cytokines -> PGE2 -> hypothalamic set-point elevation -> fever.")

h2("Arachidonic acid pathway (source of PGE2)")
bullet("Phospholipase A2 releases arachidonic acid from membrane linoleic acid.")
bullet("COX-1/COX-2 convert it to prostaglandin H2 -> PGE2 (fever via COX-2; also central pain sensitization "
       "via COX-1&2) and other prostaglandins/thromboxane; 5-lipoxygenase produces leukotrienes "
       "(bronchoconstriction, mucus secretion, edema, eosinophil migration).")
bullet("Drug classes on this pathway (slide): glucocorticoids (inhibit phospholipase A2), nonselective NSAIDs "
       "and selective COX-2 inhibitors (inhibit COX), 5-lipoxygenase inhibitors (zileuton), leukotriene "
       "receptor antagonists (montelukast, zafirlukast).")
pic(f"{SLIDE}/image10.jpg", width=6.0, caption="Slide - Arachidonic acid pathway: prostaglandins, thromboxane, "
    "leukotrienes, and sites of drug action.")

h2("Physiologic effects of fever")
bullet("Heat conservation (vasoconstriction): increases peripheral heat production and causes subjective cold "
       "sensation in hands/feet as blood shunts to internal organs.")
bullet("Heat production (thermogenesis of muscle and adipose tissue): via ATP release; muscle heat production "
       "causes shivering; adipose tissue heat production is greater in neonates (more brown fat).")
bullet("Once the hypothalamic set-point resets downward, heat loss occurs via vasodilation, sweating, and "
       "behavior change - possibly from reduced pyrogenic cytokines or antipyretic use.")
bullet("Common symptoms: rigors (shivering), sweats, chills, flushing of skin, tachycardia/palpitations, "
       "lethargy.")
pic(f"{SLIDE}/image11.jpg", width=5.7, caption="Slide - Physiologic effects of fever and common symptoms.")

doc.save("/tmp/workspace/wbc_notes/White_Blood_Cells_Study_Notes.docx")
print("saved")
Running Command

cd /tmp/workspace/wbc_notes && python3 build_notes.py && ls -la White_Blood_Cells_Study_Notes.docx

The document built successfully. Here are the study notes, compiled strictly from the lecture slides and Guyton figures:

White Blood Cells Study Notes

Word Document · DOCX

Contents:
  1. General Characteristics and Classification - granulocytes vs. agranulocytes (slide diagram), normal WBC % counts (Guyton)
  2. Genesis of WBCs - myelocytic/lymphocytic lineages, with Guyton Fig. 34-1; life span of granulocytes, monocytes, lymphocytes
  3. Entry into Tissue Spaces - diapedesis, ameboid motion, chemotaxis, with Guyton Fig. 34-2
  4. Phagocytosis - selectivity, steps, bacterial killing, with Guyton Fig. 34-3
  5. Monocyte-Macrophage (Reticuloendothelial) System - lymph node/Kupffer cell macrophages (Guyton Figs. 34-4, 34-5), spleen (Fig. 34-6), plus the slide's tissue-specific fixed-macrophage names table
  6. Inflammation - the 5 cardinal changes, neutrophil recruitment sequence with Guyton Fig. 34-7, and bone marrow feedback control with Fig. 34-8
  7. Leukopenia and Leukemia - definitions and systemic effects (Guyton)
  8. WBC Disorders - slide tables on neutrophilia/neutropenia, eosinophilia/eosinopenia, basophilia/basopenia, monocytosis/monocytopenia, lymphocytosis/lymphocytopenia
  9. Fever - pathophysiology, arachidonic acid/prostaglandin pathway, and physiologic effects, all from the slide deck
All text content is drawn only from the Guyton Chapter 34 pages and the provided slide deck, and the Guyton figures (34-1, 34-2, 34-3, 34-4, 34-5, 34-6, 34-7, 34-8) plus the relevant slide images/tables are embedded directly in the document as visuals - no outside sources were used.
This is a shared conversation. Sign in to Orris to start your own chat.