Made a simple presentation on thyroid investigation and take reference from sabastian and love and baily surgery book
thyroid ultrasound nodule

Diagnostic ultrasound image of the thyroid gland in a transverse or longitudinal view, demonstrating a solid, hyperechoic nodule. The nodule is demarcated by four calipers (X and + markers) indicating its dimensions. It exhibits increased echogenicity compared to the surrounding thyroid parenchyma, which itself displays a heterogeneous echotexture. The nodule possesses smooth, well-defined margins and a 'wider-than-tall' orientation. Notably, there is an absence of internal punctate echogenic foci, macrocalcifications, or posterior acoustic shadowing. These visual features are used in clinical practice to determine the ACR TI-RADS score; in this case, the combination of a solid composition (2 points) and hyperechogenicity (1 point) results in a total score of 3, classifying it as a TR3 (mildly suspicious) risk level. The image serves as an educational example of benign-appearing ultrasound morphology in thyroid pathology.

Diagnostic ultrasound of a thyroid nodule, presenting two side-by-side views. Panel (A) shows a longitudinal B-mode ultrasound of a 5.06 x 3.07 cm partially cystic thyroid nodule (PCTN). The nodule features a predominant hypoechoic solid component (occupying approximately 64% of the volume) situated eccentrically with an acute angle relative to the cyst wall. Arrows highlight an ill-defined margin and scattered punctate echogenic foci consistent with micro-calcifications. Panel (B) demonstrates a Color Doppler Flow Imaging (CDFI) study of the same nodule, revealing prominent internal and peripheral vascularity localized within the solid component. These sonographic features (eccentric solid component, ill-defined margins, micro-calcifications, and high vascularity) are clinically significant as they are highly suspicious for malignancy. This case was pathologically confirmed as papillary thyroid carcinoma. The image is intended for educational use in endocrinology and radiology to illustrate the ultrasound characteristics used in thyroid nodule risk stratification and scoring systems.

Diagnostic ultrasound of the thyroid gland showing a solitary thyroid nodule in both longitudinal (left) and transverse (right) planes. The nodule is oval-shaped, measuring approximately 11 x 9 x 7 mm, with a primarily isoechoic background relative to the surrounding thyroid parenchyma. It exhibits a mixed internal composition characterized by multiple microcystic cavities (hypoechoic/anechoic areas). Within these cavities, punctate hyperechoic spots are visible, specifically located at the posterior aspect or 'bottom' of the cystic spaces, which can represent concentrated colloid or microcalcifications. The image is an educational example of Thyroid Imaging and Reporting Data System (TIRADS) risk stratification, demonstrating features that may be classified differently across systems (e.g., ACR-TIRADS 4, EU-TIRADS 3, K-TIRADS 4). The presence of mixed solid-cystic components and hyperechoic foci are key parameters in determining the malignancy risk of thyroid nodules in clinical practice.
thyroid scintigraphy isotope scan

This diagnostic image is a thyroid scintigraphy (nuclear scan) demonstrating radioactive isotope uptake in the thyroid gland. The scan reveals two distinct areas of tracer accumulation against a light background. On the anatomical right side, there is a large, intensely dark, and well-defined focal area of increased tracer uptake, characteristic of an autonomous hyperfunctioning 'hot' nodule or toxic adenoma. The anatomical left side shows a much smaller, faint, and poorly defined region of tracer uptake, suggesting suppression of the surrounding normal thyroid tissue due to the activity of the hyperfunctioning nodule. This visual finding is typical of Marine-Lenhart syndrome or a solitary toxic adenoma where the high hormonal output from the 'hot' nodule inhibits TSH secretion, resulting in reduced activity in the contralateral lobe. The image serves as an educational tool for identifying thyroid hyperactivity patterns and differentiating between focal and diffuse thyroid pathology in nuclear medicine.

This diagnostic image demonstrates dual-isotope planar pinhole subtraction scintigraphy for parathyroid localization. The display consists of three panels depicting the thyroid and parathyroid regions. The upper left panel shows a 99mTc-sestamibi (MIBI) pinhole scan, which highlights both thyroid and hyperfunctional parathyroid tissue. The upper right panel displays a 123I pinhole scan, which selectively images the thyroid gland, showing the characteristic 'U' or 'V' shaped morphology. Both upper images include a red outline of the thyroid gland. The bottom left panel shows the subtraction image, created by removing the thyroid signal (123I) from the MIBI signal. This subtraction reveals a distinct focal area of high tracer intensity (hot spot) on the left side of the thyroid, consistent with a parathyroid adenoma. This imaging technique is a clinical standard in nuclear medicine for identifying ectopic or enlarged parathyroid glands in patients with primary hyperparathyroidism by isolating uptake that does not correspond to thyroid tissue.

This diagnostic image series presents four sets of serial radioactive iodine (I-131) whole-body scintigraphy scans (labeled A through D) taken at 6-month intervals. Each set includes supine and prone projections. The scans track the treatment response of metastatic follicular thyroid carcinoma (FTC). Scan A shows high-intensity focal uptake in the thyroid bed/neck region and several metastatic lesions in the pelvis and upper chest. In subsequent scans (B, C, and D), there is a progressive reduction in both the number and the radiotracer intensity of these lesions, particularly in the neck and pelvic regions. This visual progression demonstrates a positive therapeutic response to repeated doses of radioactive iodine (RAI) therapy, indicating stable disease without new lesion development or metabolic progression. The images utilize nuclear medicine imaging to monitor systemic disease burden and the efficacy of targeted isotope therapy in a patient with metastatic thyroid malignancy.
mkdir -p /tmp/workspace/thyroid-pptx && ls /tmp/workspace/thyroid-pptx/
~/thyroid-pptx/build_pptx.py
import json, subprocess, base64
from io import BytesIO
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
# ── Colour palette ──────────────────────────────────────────────
TEAL = RGBColor(0x00, 0x7A, 0x87) # header bars
TEAL_LIGHT = RGBColor(0xE0, 0xF5, 0xF8) # subtle background tint
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
DARK_GREY = RGBColor(0x1A, 0x1A, 0x2E)
MID_GREY = RGBColor(0x44, 0x44, 0x55)
GOLD = RGBColor(0xF0, 0xA5, 0x00)
LIGHT_BG = RGBColor(0xF4, 0xF9, 0xFB)
W = Inches(13.333)
H = Inches(7.5)
prs = Presentation()
prs.slide_width = W
prs.slide_height = H
blank = prs.slide_layouts[6] # fully blank
# ────────────────────────────────────────────────────────────────
# Helper utilities
# ────────────────────────────────────────────────────────────────
def add_rect(slide, x, y, w, h, fill=None, line=None):
from pptx.util import Emu
shape = slide.shapes.add_shape(
1, # MSO_SHAPE_TYPE.RECTANGLE
x, y, w, h
)
shape.line.fill.background()
if fill:
shape.fill.solid()
shape.fill.fore_color.rgb = fill
else:
shape.fill.background()
if line:
shape.line.color.rgb = line
shape.line.width = Pt(1)
else:
shape.line.fill.background()
return shape
def add_text(slide, text, x, y, w, h,
size=18, bold=False, color=DARK_GREY,
align=PP_ALIGN.LEFT, wrap=True, italic=False):
tb = slide.shapes.add_textbox(x, y, w, h)
tf = tb.text_frame
tf.word_wrap = wrap
tf.margin_left = Inches(0.05)
tf.margin_right = Inches(0.05)
tf.margin_top = Inches(0.02)
tf.margin_bottom = Inches(0.02)
p = tf.paragraphs[0]
p.alignment = align
run = p.add_run()
run.text = text
run.font.name = "Calibri"
run.font.size = Pt(size)
run.font.bold = bold
run.font.italic = italic
run.font.color.rgb = color
return tf
def add_bullets(slide, items, x, y, w, h, size=15, color=DARK_GREY, indent=True):
tb = slide.shapes.add_textbox(x, y, w, h)
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = Inches(0.1)
tf.margin_right = Inches(0.05)
tf.margin_top = Inches(0.02)
tf.margin_bottom= Inches(0.02)
for i, item in enumerate(items):
p = tf.paragraphs[0] if i == 0 else tf.add_paragraph()
p.alignment = PP_ALIGN.LEFT
if indent and item.startswith(" "):
p.level = 1
txt = item.strip()
bullet_char = "◦ "
else:
p.level = 0
txt = item.lstrip("- •")
bullet_char = "● "
run = p.add_run()
run.text = bullet_char + txt
run.font.name = "Calibri"
run.font.size = Pt(size)
run.font.color.rgb = color
return tf
def fetch_image_b64(url):
result = json.loads(subprocess.check_output(
["python", "/tmp/skills/shared/scripts/fetch_images.py", url]
))
return result[0]["base64"] if result and result[0]["base64"] else None
def add_image_from_url(slide, url, x, y, w, h):
b64 = fetch_image_b64(url)
if not b64:
return
mime, data = b64.split(";base64,", 1)
raw = base64.b64decode(data)
buf = BytesIO(raw)
slide.shapes.add_picture(buf, x, y, width=w, height=h)
def slide_header(slide, title, subtitle=None):
# full-width teal header bar
add_rect(slide, 0, 0, W, Inches(1.1), fill=TEAL)
add_text(slide, title,
Inches(0.4), Inches(0.1), Inches(12.5), Inches(0.8),
size=30, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
if subtitle:
add_text(slide, subtitle,
Inches(0.4), Inches(0.82), Inches(12.5), Inches(0.35),
size=13, bold=False, color=TEAL_LIGHT, align=PP_ALIGN.LEFT, italic=True)
# thin gold accent line under header
add_rect(slide, 0, Inches(1.1), W, Pt(4), fill=GOLD)
# light background fill for content area
add_rect(slide, 0, Inches(1.14), W, H - Inches(1.14), fill=LIGHT_BG)
def footer_ref(slide, text):
add_text(slide, text,
Inches(0.3), Inches(7.1), Inches(12.7), Inches(0.35),
size=9, italic=True, color=MID_GREY, align=PP_ALIGN.LEFT)
# ════════════════════════════════════════════════════════════════
# SLIDE 1 – Title
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
# full teal background
add_rect(slide, 0, 0, W, H, fill=TEAL)
# large circle accent (decorative)
from pptx.util import Inches as I
circle = slide.shapes.add_shape(9, I(9.5), I(-1.5), I(5), I(5)) # oval
circle.fill.solid(); circle.fill.fore_color.rgb = RGBColor(0x00, 0x5F, 0x6B)
circle.line.fill.background()
# title text
add_text(slide, "Thyroid Investigation",
I(0.8), I(1.8), I(10), I(1.6),
size=52, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
add_text(slide, "A Surgical & Clinical Perspective",
I(0.8), I(3.5), I(9), I(0.7),
size=22, bold=False, color=TEAL_LIGHT, italic=True)
add_rect(slide, I(0.8), I(4.3), I(3.5), Pt(4), fill=GOLD)
add_text(slide, "Reference Sources:",
I(0.8), I(4.6), I(11), I(0.4),
size=13, color=TEAL_LIGHT)
add_text(slide, "• Bailey and Love's Short Practice of Surgery, 28th Edition",
I(0.8), I(5.0), I(11), I(0.4),
size=14, bold=False, color=WHITE)
add_text(slide, "• Sabiston Textbook of Surgery, The Biological Basis of Modern Surgical Practice",
I(0.8), I(5.45), I(11), I(0.4),
size=14, bold=False, color=WHITE)
add_text(slide, "July 2026",
I(0.8), I(6.6), I(5), I(0.4),
size=13, color=TEAL_LIGHT)
# ════════════════════════════════════════════════════════════════
# SLIDE 2 – Overview / Why Investigate?
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_header(slide, "Why Investigate the Thyroid?", "Clinical indications for thyroid workup")
add_bullets(slide,
[
"Thyroid disease is the second most common endocrine disorder after diabetes mellitus",
"Clinical assessment alone is often insufficient — biochemical and imaging workup is mandatory",
"Investigations guide diagnosis of: goitre, nodules, hyper/hypothyroidism, and malignancy",
"Surgeon's perspective: investigations determine operability, surgical approach and extent",
"Essential investigations vs optional investigations must be clearly distinguished",
],
I(0.5), I(1.3), I(12.3), I(5.5),
size=17, color=DARK_GREY
)
footer_ref(slide, "Bailey & Love's Surgery 28e, Ch.55 | Sabiston Textbook of Surgery, Ch.73")
# ════════════════════════════════════════════════════════════════
# SLIDE 3 – Classification of Investigations
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_header(slide, "Classification of Thyroid Investigations")
# Box 1: Biochemical
add_rect(slide, I(0.35), I(1.3), I(5.8), I(2.7), fill=WHITE, line=TEAL)
add_text(slide, "BIOCHEMICAL", I(0.4), I(1.3), I(5.7), I(0.5),
size=14, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
r2 = slide.shapes[-1]
add_rect(slide, I(0.35), I(1.3), I(5.8), I(0.45), fill=TEAL)
add_text(slide, "BIOCHEMICAL", I(0.4), I(1.3), I(5.7), I(0.45),
size=14, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_bullets(slide,
["Serum TSH", " Free T3 and Free T4", "Thyroid autoantibodies (TPO-Ab, TgAb, TRAb)",
" Thyroglobulin (post-thyroidectomy)", " Calcitonin (for medullary carcinoma)"],
I(0.5), I(1.8), I(5.5), I(2.1), size=14)
# Box 2: Cytology / Histology
add_rect(slide, I(6.4), I(1.3), I(6.55), I(2.7), fill=WHITE, line=GOLD)
add_rect(slide, I(6.4), I(1.3), I(6.55), I(0.45), fill=GOLD)
add_text(slide, "CYTOLOGY / HISTOLOGY", I(6.45), I(1.3), I(6.4), I(0.45),
size=14, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_bullets(slide,
["Fine Needle Aspiration Cytology (FNAC)", " Gold standard for thyroid nodule evaluation",
" Bethesda classification system used to report",
"Core needle biopsy (selected cases)"],
I(6.55), I(1.8), I(6.2), I(2.1), size=14)
# Box 3: Imaging
add_rect(slide, I(0.35), I(4.2), I(5.8), I(2.85), fill=WHITE, line=TEAL)
add_rect(slide, I(0.35), I(4.2), I(5.8), I(0.45), fill=TEAL)
add_text(slide, "IMAGING", I(0.4), I(4.2), I(5.7), I(0.45),
size=14, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_bullets(slide,
["Ultrasonography (USG) — workhorse", "Isotope/Radionuclide Scan (Tc-99m / I-123)",
"CT scan", "MRI", "Chest X-Ray (retrosternal goitre)", "PET scan (selected cases)"],
I(0.5), I(4.7), I(5.5), I(2.3), size=14)
# Box 4: Genetic
add_rect(slide, I(6.4), I(4.2), I(6.55), I(2.85), fill=WHITE, line=GOLD)
add_rect(slide, I(6.4), I(4.2), I(6.55), I(0.45), fill=GOLD)
add_text(slide, "GENETIC & MOLECULAR", I(6.45), I(4.2), I(6.4), I(0.45),
size=14, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_bullets(slide,
["BRAF mutation (papillary carcinoma)",
"RET proto-oncogene (medullary carcinoma / MEN2)",
"RAS / PAX8-PPARγ (follicular carcinoma)",
"Molecular testing on FNA samples (Afirma, ThyroSeq)"],
I(6.55), I(4.7), I(6.2), I(2.3), size=14)
footer_ref(slide, "Bailey & Love's Surgery 28e | Sabiston Textbook of Surgery")
# ════════════════════════════════════════════════════════════════
# SLIDE 4 – Serum TSH
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_header(slide, "Thyroid Function Tests — Serum TSH",
"The single most sensitive and reliable first-line test")
# Left content
add_bullets(slide,
[
"TSH: 28-kDa glycoprotein secreted by anterior pituitary",
"Follows circadian rhythm; measured by 3rd/4th-generation ultrasensitive radioimmunoassay",
"Normal range: 0.4 – 4.12 mIU/L (adult); sensitivity up to 97%",
"Negative feedback from T3/T4 on TSH follows a log-linear relationship",
" → Small changes in thyroid hormone = large TSH swings",
"Most common screening test for thyroid dysfunction",
"Must interpret TSH alongside free T4 (and free T3 in select cases)",
"Caution: falsely altered by pregnancy, euthyroid sick syndrome,",
" glucocorticoids, furosemide, anticonvulsants, metformin, amiodarone",
],
I(0.5), I(1.25), I(7.5), I(5.5),
size=15, color=DARK_GREY
)
# Right: TFT table
add_rect(slide, I(8.2), I(1.3), I(4.8), I(5.6), fill=WHITE, line=TEAL)
add_rect(slide, I(8.2), I(1.3), I(4.8), I(0.45), fill=TEAL)
add_text(slide, "TFT Interpretation (Bailey & Love Table 55.1)",
I(8.25), I(1.3), I(4.7), I(0.45),
size=11, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
rows = [
("State", "TSH", "Free T4", "Free T3"),
("Euthyroid", "Normal", "Normal", "Normal"),
("Thyrotoxic", "Undetectable", "High", "High"),
("Myxoedema", "High", "Low", "Low"),
("T4 therapy", "Undetectable", "High", "High/Normal"),
("T3 toxicosis", "Low/Undetect.", "Normal", "High"),
]
row_h = Inches(0.66)
col_w = [Inches(1.5), Inches(1.1), Inches(1.1), Inches(1.1)]
col_x = [I(8.25), I(9.75), I(10.85), I(11.95)]
for ri, row in enumerate(rows):
y = I(1.78) + ri * row_h
bg = TEAL if ri == 0 else (RGBColor(0xE8,0xF7,0xFA) if ri % 2 == 0 else WHITE)
for ci, (cell, cw, cx) in enumerate(zip(row, col_w, col_x)):
add_rect(slide, cx, y, cw, row_h, fill=bg, line=TEAL_LIGHT)
fc = WHITE if ri == 0 else DARK_GREY
add_text(slide, cell, cx + Inches(0.03), y + Inches(0.05),
cw - Inches(0.06), row_h - Inches(0.1),
size=11, bold=(ri == 0), color=fc, align=PP_ALIGN.CENTER)
footer_ref(slide, "Sabiston Ch.73 (Thyroid Biomarkers) | Bailey & Love 28e, Table 55.1")
# ════════════════════════════════════════════════════════════════
# SLIDE 5 – Free T3 / T4 & Autoantibodies
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_header(slide, "Free T3, Free T4 & Thyroid Autoantibodies")
# Left column
add_rect(slide, I(0.3), I(1.25), I(6.2), I(2.8), fill=WHITE, line=TEAL)
add_rect(slide, I(0.3), I(1.25), I(6.2), I(0.4), fill=TEAL)
add_text(slide, "Serum Thyroid Hormones (T3 & T4)",
I(0.35), I(1.25), I(6.1), I(0.4),
size=13, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_bullets(slide,
[">99.8% of T3 & T4 is protein-bound; only free fractions are biologically active",
"Free T4 is preferred over total T4 for accuracy",
"Free T3: useful for hyperthyroidism confirmation and euthyroid sick syndrome",
"TSH + Free T4 = most commonly paired tests for thyroid dysfunction monitoring",
"Normal ranges are age-dependent (paediatric vs adult standards differ)"],
I(0.45), I(1.7), I(6.0), I(2.3), size=14)
# Right column
add_rect(slide, I(6.85), I(1.25), I(6.15), I(2.8), fill=WHITE, line=GOLD)
add_rect(slide, I(6.85), I(1.25), I(6.15), I(0.4), fill=GOLD)
add_text(slide, "Thyroid Autoantibodies",
I(6.9), I(1.25), I(6.05), I(0.4),
size=13, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_bullets(slide,
["Anti-TPO (TPOAb): most accurate screening test for autoimmune thyroiditis",
" Significant if > 25 U/mL (Bailey & Love)",
"Anti-Thyroglobulin (TgAb): raised in Hashimoto's / Graves'",
" Significant titre > 1:100 (Bailey & Love)",
"TRAb (TSH-receptor antibodies): diagnostic of Graves' disease",
" Protracted action 16–24 hr vs TSH 1.5–3 hr; responsible for virtually all non-nodular thyrotoxicosis"],
I(7.0), I(1.7), I(5.9), I(2.3), size=14)
# Bottom section — Thyroglobulin & Calcitonin
add_rect(slide, I(0.3), I(4.2), I(6.2), I(2.8), fill=WHITE, line=TEAL)
add_rect(slide, I(0.3), I(4.2), I(6.2), I(0.4), fill=TEAL)
add_text(slide, "Thyroglobulin (Tg)",
I(0.35), I(4.2), I(6.1), I(0.4),
size=13, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_bullets(slide,
["Most useful as post-thyroidectomy tumour marker for differentiated thyroid cancer (DTC)",
"Undetectable Tg after total thyroidectomy = no residual / recurrent disease",
"Must be interpreted alongside TgAb (TgAb can falsely suppress Tg measurement)"],
I(0.45), I(4.65), I(6.0), I(2.3), size=14)
add_rect(slide, I(6.85), I(4.2), I(6.15), I(2.8), fill=WHITE, line=GOLD)
add_rect(slide, I(6.85), I(4.2), I(6.15), I(0.4), fill=GOLD)
add_text(slide, "Calcitonin",
I(6.9), I(4.2), I(6.05), I(0.4),
size=13, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_bullets(slide,
["Secreted by parafollicular C cells of the thyroid",
"Elevated in medullary thyroid carcinoma (MTC)",
"CEA may be used as alternative screening marker for MTC",
"Useful for screening RET proto-oncogene mutation carriers (MEN 2A/2B)"],
I(7.0), I(4.65), I(5.9), I(2.3), size=14)
footer_ref(slide, "Sabiston Ch.73 | Bailey & Love 28e, Ch.55")
# ════════════════════════════════════════════════════════════════
# SLIDE 6 – FNAC
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_header(slide, "Fine Needle Aspiration Cytology (FNAC)",
"Essential first-line investigation for all discrete thyroid swellings")
add_bullets(slide,
[
"FNAC is mandatory for all palpable discrete thyroid swellings — Bailey & Love",
"Ultrasound-guided FNA is more accurate than free-hand technique",
" USG guidance allows precise targeting, reduces non-diagnostic samples",
"Results reported using the Bethesda System for Reporting Thyroid Cytopathology:",
],
I(0.5), I(1.25), I(12.5), I(2.5), size=16)
# Bethesda table
headers = ["Category", "Bethesda", "Description", "Malignancy Risk"]
beth = [
["I", "Non-diagnostic / Unsatisfactory", "Insufficient cells", "1–4%"],
["II", "Benign", "Benign follicular / colloid / thyroiditis", "0–3%"],
["III","Atypia of undetermined significance (AUS)", "Indeterminate", "5–15%"],
["IV", "Follicular neoplasm", "Follicular lesion", "15–30%"],
["V", "Suspicious for malignancy", "High suspicion", "60–75%"],
["VI", "Malignant", "PTC, MTC, anaplastic, lymphoma", "97–99%"],
]
rh = Inches(0.52)
cw = [Inches(0.7), Inches(1.1), Inches(5.2), Inches(2.1)]
cx = [I(0.4), I(1.15), I(2.3), I(7.55)]
for ri, row in enumerate([headers] + beth):
y = I(3.9) + ri * rh
bg = TEAL if ri == 0 else (RGBColor(0xE8,0xF7,0xFA) if ri % 2 == 0 else WHITE)
for ci, (cell, w, x) in enumerate(zip(row, cw, cx)):
add_rect(slide, x, y, w, rh, fill=bg, line=TEAL_LIGHT)
fc = WHITE if ri == 0 else DARK_GREY
add_text(slide, cell, x+I(0.03), y+I(0.03), w-I(0.06), rh-I(0.06),
size=12, bold=(ri==0), color=fc, align=PP_ALIGN.CENTER)
add_text(slide, "Repeat / Lobectomy / Hemithyroidectomy → Molecular testing if Bethesda III/IV",
I(9.8), I(3.9), I(3.0), I(3.0),
size=13, color=MID_GREY, wrap=True)
footer_ref(slide, "Sabiston Ch.73 | Bailey & Love 28e, Ch.55")
# ════════════════════════════════════════════════════════════════
# SLIDE 7 – Ultrasonography (with image)
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_header(slide, "Ultrasonography — The Workhorse Investigation",
"First-line imaging for all thyroid disorders")
add_bullets(slide,
[
"Workhorse investigation for thyroid disease in the surgeon's practice (Bailey & Love)",
"Assesses: gland size, echotexture, nodule characteristics, regional lymphatics",
"Key nodule features evaluated: number, size, shape, margins, vascularity, microcalcifications",
"Predicts malignancy risk — forms the basis of TI-RADS scoring",
"USG-guided FNA improves accuracy vs free-hand technique",
"Advantages: no ionising radiation, non-invasive, low cost",
"Limitation: limited visualisation of central/retrosternal nodes",
],
I(0.5), I(1.25), I(7.2), I(5.5),
size=15, color=DARK_GREY
)
# TI-RADS mini table
add_rect(slide, I(7.9), I(1.3), I(5.1), I(3.5), fill=WHITE, line=TEAL)
add_rect(slide, I(7.9), I(1.3), I(5.1), I(0.4), fill=TEAL)
add_text(slide, "ACR TI-RADS Risk Categories",
I(7.95), I(1.3), I(5.0), I(0.4),
size=12, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
tirads = [
("TR1 — Benign", "Score 0", "No FNA needed"),
("TR2 — Not Suspicious", "Score 2", "No FNA needed"),
("TR3 — Mildly Susp.", "Score 3", "FNA if ≥2.5 cm"),
("TR4 — Moderately Susp.","Score 4–6", "FNA if ≥1.5 cm"),
("TR5 — Highly Susp.", "Score ≥7", "FNA if ≥1 cm"),
]
rh2 = Inches(0.55)
for ri, (cat, score, action) in enumerate(tirads):
y = I(1.73) + ri * rh2
bg = RGBColor(0xE8,0xF7,0xFA) if ri % 2 == 0 else WHITE
add_rect(slide, I(7.95), y, I(2.1), rh2, fill=bg, line=TEAL_LIGHT)
add_rect(slide, I(10.05), y, I(1.1), rh2, fill=bg, line=TEAL_LIGHT)
add_rect(slide, I(11.15), y, I(1.8), rh2, fill=bg, line=TEAL_LIGHT)
add_text(slide, cat, I(7.97), y+I(0.05), I(2.05), rh2-I(0.1), size=11, color=DARK_GREY)
add_text(slide, score, I(10.07),y+I(0.05), I(1.05), rh2-I(0.1), size=11, color=DARK_GREY, align=PP_ALIGN.CENTER)
add_text(slide, action,I(11.17),y+I(0.05), I(1.75), rh2-I(0.1), size=11, color=DARK_GREY)
# Add USG image
try:
add_image_from_url(slide,
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_33f2b2a2b292ab516a3f3e5fb49a5b09e80fbd956ff6533bac4524933fc4cb71.jpg",
I(7.9), I(4.95), I(5.1), I(2.1))
add_text(slide, "USG: Solid hyperechoic thyroid nodule (TR3 — mildly suspicious)",
I(7.9), I(7.1), I(5.1), I(0.3), size=9, color=MID_GREY, italic=True, align=PP_ALIGN.CENTER)
except Exception as e:
print(f"USG image failed: {e}")
footer_ref(slide, "Bailey & Love 28e, Ch.55 | Sabiston Ch.73 (Thyroid Imaging)")
# ════════════════════════════════════════════════════════════════
# SLIDE 8 – Isotope Scan
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_header(slide, "Radionuclide / Isotope Scan",
"Tc-99m pertechnetate | I-123 | I-131")
add_bullets(slide,
[
"Indications (Bailey & Love): discrete swelling + thyrotoxicosis coexist",
"Largely rendered obsolete by high-resolution USG for most scenarios (Sabiston)",
"",
"Hot nodule: increased uptake — 'autonomous' hyperfunctioning; extremely low malignancy risk",
"Cold nodule: decreased uptake — ~15% risk of malignancy",
"Warm nodule: equal uptake to surrounding tissue",
"",
"Key uses today:",
" 1. Differentiate Graves' disease (diffuse uptake) vs toxic adenoma (focal hot nodule)",
" 2. Tc-99m or I-123 for initial scanning; I-131 for RAI therapy",
" 3. Post-thyroidectomy whole-body scan to detect metastatic differentiated thyroid cancer",
" 4. Assess residual thyroid tissue after ablation",
],
I(0.5), I(1.25), I(7.2), I(5.9),
size=15, color=DARK_GREY
)
try:
add_image_from_url(slide,
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_918e5d8dba2af1d9708e0d72b4da0cfd21d532a95db96ddae0a464d94ab9a955.jpg",
I(7.9), I(1.3), I(5.1), I(5.8))
add_text(slide, "Isotope scan: hot nodule (right lobe) with suppressed contralateral tissue — toxic adenoma",
I(7.9), I(7.1), I(5.1), I(0.3), size=9, color=MID_GREY, italic=True, align=PP_ALIGN.CENTER)
except Exception as e:
print(f"Isotope image failed: {e}")
footer_ref(slide, "Bailey & Love 28e, Ch.55 | Sabiston Ch.73")
# ════════════════════════════════════════════════════════════════
# SLIDE 9 – CT / MRI / CXR
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_header(slide, "CT, MRI & Chest X-Ray",
"Cross-sectional imaging for selected indications")
# Left — CT
add_rect(slide, I(0.3), I(1.25), I(6.2), I(5.9), fill=WHITE, line=TEAL)
add_rect(slide, I(0.3), I(1.25), I(6.2), I(0.45), fill=TEAL)
add_text(slide, "CT Scan", I(0.35), I(1.25), I(6.1), I(0.45),
size=14, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_bullets(slide,
["Preferred cross-sectional modality for thyroid surgeons (easier interpretation vs MRI)",
"Key indications:",
" • Substernal (intrathoracic) goitre — defines inferior extent",
" • Advanced thyroid cancer — invasion of trachea, oesophagus, vessels",
" • Cervical lymph node metastases (superior to MRI)",
" • Craniocaudal scan: skull base → tracheal bifurcation",
"Non-contrast CT: sufficient for retrosternal goitre assessment",
"Contrast-enhanced CT: needed for locally advanced cancer / bulky lymph nodes",
"On non-contrast CT: thyroid appears hyperattenuating vs surrounding muscles"],
I(0.45), I(1.75), I(6.0), I(5.3), size=14)
# Right — MRI + CXR
add_rect(slide, I(6.85), I(1.25), I(6.15), I(2.7), fill=WHITE, line=GOLD)
add_rect(slide, I(6.85), I(1.25), I(6.15), I(0.45), fill=GOLD)
add_text(slide, "MRI", I(6.9), I(1.25), I(6.05), I(0.45),
size=14, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_bullets(slide,
["T1/T2-weighted: thyroid mildly hyperintense; bright gadolinium enhancement",
"Role: complementary to CT for invasive thyroid cancer",
"Useful for vascular anomaly detection (e.g. lusoria artery → non-RLN risk)",
"Superior soft-tissue contrast for aerodigestive tract invasion"],
I(7.0), I(1.75), I(5.9), I(2.3), size=14)
add_rect(slide, I(6.85), I(4.1), I(6.15), I(3.05), fill=WHITE, line=TEAL)
add_rect(slide, I(6.85), I(4.1), I(6.15), I(0.45), fill=TEAL)
add_text(slide, "Chest X-Ray (CXR)", I(6.9), I(4.1), I(6.05), I(0.45),
size=14, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_bullets(slide,
["Predicts retrosternal extension",
"Demonstrates tracheal deviation / compression",
"Identifies calcification in a large goitre",
"PET Scan: used for Tg-positive / RAI-negative DTC patients",
" → Detects metabolically active disease"],
I(7.0), I(4.6), I(5.9), I(2.5), size=14)
footer_ref(slide, "Sabiston Ch.73 (Cross-Sectional Imaging) | Bailey & Love 28e, Ch.55")
# ════════════════════════════════════════════════════════════════
# SLIDE 10 – Essential vs Optional Summary
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_header(slide, "Summary: Essential vs Optional Investigations",
"Bailey & Love's Framework — Ch. 55")
add_rect(slide, I(0.3), I(1.25), I(6.1), I(5.9), fill=WHITE, line=TEAL)
add_rect(slide, I(0.3), I(1.25), I(6.1), I(0.5), fill=TEAL)
add_text(slide, "✔ ESSENTIAL", I(0.35), I(1.25), I(6.0), I(0.5),
size=15, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_bullets(slide,
["Serum TSH",
" (Free T3 and Free T4 if TSH is abnormal)",
"Thyroid autoantibodies",
"Fine Needle Aspiration Cytology (FNAC) of palpable discrete swellings"],
I(0.45), I(1.8), I(5.9), I(5.3), size=16)
add_rect(slide, I(6.85), I(1.25), I(6.15), I(5.9), fill=WHITE, line=GOLD)
add_rect(slide, I(6.85), I(1.25), I(6.15), I(0.5), fill=GOLD)
add_text(slide, "◉ OPTIONAL", I(6.9), I(1.25), I(6.05), I(0.5),
size=15, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_bullets(slide,
["Corrected serum calcium",
"Serum calcitonin (or CEA as alternative for medullary cancer screening)",
"Imaging:",
" • CXR / thoracic inlet — tracheal deviation / retrosternal goitre",
" • CT / MRI — known cancer, reoperations, retrosternal goitre",
" • Isotope scan — discrete swelling + thyrotoxicosis coexist",
"Genetic / molecular testing (BRAF, RET, RAS, Afirma, ThyroSeq)"],
I(7.0), I(1.8), I(5.9), I(5.3), size=16)
footer_ref(slide, "Bailey & Love's Short Practice of Surgery 28e, Ch.55")
# ════════════════════════════════════════════════════════════════
# SLIDE 11 – Key Take-Away / References
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, W, H, fill=TEAL)
add_rect(slide, 0, 0, W, Inches(1.2), fill=RGBColor(0x00, 0x5F, 0x6B))
add_text(slide, "Key Clinical Points & References",
I(0.5), I(0.2), I(12.3), I(0.9),
size=28, bold=True, color=WHITE)
add_rect(slide, I(0.3), I(1.35), I(12.7), Pt(3), fill=GOLD)
pts = [
"1. TSH is the single best initial screening test — a suppressed TSH mandates further evaluation for thyrotoxicosis.",
"2. FNAC is essential for all discrete thyroid swellings and is the cornerstone of pre-operative cancer diagnosis.",
"3. Ultrasonography is the imaging workhorse — USG-guided FNA is preferred over free-hand.",
"4. Isotope scans are now largely reserved for: Graves' vs toxic adenoma differentiation and post-thyroidectomy RAI surveillance.",
"5. CT is the preferred cross-sectional modality for substernal goitre and locally advanced thyroid cancer.",
"6. Autoantibodies (TPOAb, TgAb, TRAb) help differentiate autoimmune thyroid disorders.",
"7. Calcitonin / RET mutation testing is mandatory when medullary carcinoma is suspected.",
]
for i, pt in enumerate(pts):
add_text(slide, pt, I(0.5), I(1.5) + i * Inches(0.73),
I(12.3), I(0.68), size=14, color=WHITE)
add_rect(slide, I(0.3), I(6.7), I(12.7), Pt(2), fill=GOLD)
add_text(slide,
"References: Bailey and Love's Short Practice of Surgery, 28th Ed., Ch. 55 | "
"Sabiston Textbook of Surgery (Biological Basis of Modern Surgical Practice), Ch. 73 — The Thyroid",
I(0.3), I(6.75), I(12.7), I(0.65),
size=11, italic=True, color=TEAL_LIGHT)
# ── Save ────────────────────────────────────────────────────────
out_path = "/tmp/workspace/thyroid-pptx/Thyroid_Investigation.pptx"
buf = BytesIO()
prs.save(buf)
with open(out_path, "wb") as f:
f.write(buf.getvalue())
print(f"Saved → {out_path}")
cd /tmp/workspace/thyroid-pptx && python build_pptx.py 2>&1
~/thyroid-pptx/build_pptx.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/thyroid-pptx/build_pptx.py'
cd /tmp/workspace/thyroid-pptx && python build_pptx.py 2>&1
python3 -c " from pptx import Presentation prs = Presentation('/tmp/workspace/thyroid-pptx/Thyroid_Investigation.pptx') print(f'Slides: {len(prs.slides)}') for i, slide in enumerate(prs.slides, 1): texts = [s.text_frame.text.strip()[:60] for s in slide.shapes if s.has_text_frame and s.text_frame.text.strip()] print(f' Slide {i}: {texts[0] if texts else \"(no text)\"}') import os; print(f'File size: {os.path.getsize(\"/tmp/workspace/thyroid-pptx/Thyroid_Investigation.pptx\"):,} bytes') "
Thyroid Investigation
Presentation · PPTX
| # | Slide | Content |
|---|---|---|
| 1 | Title slide | Teal design with both reference books listed |
| 2 | Why Investigate? | Clinical rationale, surgeon's perspective |
| 3 | Classification | 4 boxes: Biochemical / Cytology / Imaging / Genetic-Molecular |
| 4 | Serum TSH | Mechanism, normal range, log-linear feedback; full TFT interpretation table (Bailey & Love Table 55.1) |
| 5 | Free T3, T4 & Autoantibodies | Free vs total hormones; TPOAb, TgAb, TRAb thresholds; Thyroglobulin; Calcitonin |
| 6 | FNAC | Bethesda I–VI system with malignancy risk % per category |
| 7 | Ultrasonography | Workhorse investigation; TI-RADS table; real USG nodule image embedded |
| 8 | Isotope / Radionuclide Scan | Hot vs cold nodules; Graves' vs toxic adenoma; RAI therapy; real scintigraphy image embedded |
| 9 | CT / MRI / CXR | Substernal goitre; advanced cancer; PET scan indications |
| 10 | Essential vs Optional | Bailey & Love's framework — direct textbook reference |
| 11 | Key Points & References | 7 clinical take-aways + full citations |
Note: "Sebastian" is not a standard surgical textbook. The closest match in the library is Sabiston Textbook of Surgery - if you meant a different book, let me know and I'll update the slides.