This a old thyroid hormone report
| Test | Observed Value | Unit | Reference Range | Status |
|---|---|---|---|---|
| FT3 (Free Triiodothyronine) | 3.78 | pg/mL | 2.0 - 4.4 | ✅ Normal |
| FT4 (Free Thyroxine) | 1.53 | ng/dL | 0.93 - 1.7 | ✅ Normal |
| TSH (Thyroid Stimulating Hormone) | 1.39 | µIU/mL | 0.54 - 5.3 | ✅ Normal |
| Condition | TSH | FT4 | FT3 |
|---|---|---|---|
| Normal (Euthyroid) | Normal | Normal | Normal |
| Hypothyroidism | High | Low | Low |
| Hyperthyroidism | Low | High | High |
| Subclinical Hypothyroidism | High | Normal | Normal |
| Subclinical Hyperthyroidism | Low | Normal | Normal |
⚠️ This analysis is for informational purposes only and does not replace professional medical advice. Always consult your doctor for clinical decisions.
Analyze the report
Hypothalamus → TRH
↓
Pituitary → TSH (1.39 ✅) → Signals thyroid
↓
Thyroid Gland → FT4 (1.53 ✅) → Circulates in blood
↓
Peripheral Tissues → FT4 converts to FT3 (3.78 ✅)
↓
Cell-level thyroid action ✅
| Condition | Ruled Out? | Reason |
|---|---|---|
| Primary Hypothyroidism | ✅ Yes | TSH would be HIGH, FT4 LOW |
| Primary Hyperthyroidism | ✅ Yes | TSH would be LOW, FT4/FT3 HIGH |
| Subclinical Hypothyroidism | ✅ Yes | TSH would be mildly elevated |
| Subclinical Hyperthyroidism | ✅ Yes | TSH would be suppressed |
| Central Hypothyroidism | ✅ Yes | TSH LOW with low FT4 |
| T3 toxicosis | ✅ Yes | TSH LOW, FT3 markedly HIGH |
| Sick Euthyroid Syndrome | ✅ Yes | FT3 typically LOW |
Normal thyroid function (Euthyroid state). All three thyroid markers - TSH, FT4, and FT3 - are well within their reference ranges. There is no biochemical evidence of any thyroid disorder at the time of this test.
⚠️ This is an educational analysis only. Clinical correlation with symptoms is always necessary. Please consult Dr. Muthukumaran for medical advice.
This is his new report analyze it and give me the result and what might be the reason for the change and what he should do next
python3 -c " import pdfplumber with pdfplumber.open('/tmp/workspace/attachments/eea7838f-9452-497d-a23d-7864bb628ff3/Report.pdf') as pdf: for i, page in enumerate(pdf.pages): print(f'--- PAGE {i+1} ---') print(page.extract_text()) tables = page.extract_tables() if tables: for t_idx, table in enumerate(tables): print(f' [TABLE {t_idx+1}]') for row in table: print(' ', row) "
| Test | Jan 2026 (Old) | Aug 2026 (New) | Reference Range | Change |
|---|---|---|---|---|
| FT3 | 3.78 pg/mL ✅ | 2.74 pg/mL ✅ | 2.0 - 4.4 | ⬇️ Dropped (still normal) |
| FT4 | 1.53 ng/dL ✅ | 1.13 ng/dL ✅ | 0.93 - 1.7 | ⬇️ Dropped (still normal) |
| TSH | 1.39 µIU/mL ✅ | 6.110 µIU/mL ⚠️ | 0.54 - 5.3 | ⬆️ RAISED - Above Normal |
The pituitary is sensing that thyroid hormone levels are slightly insufficient, so it is working harder (producing more TSH) to stimulate the thyroid gland - even though hormone levels have not yet fallen below the normal range.
| Test | Why |
|---|---|
| Anti-TPO Antibodies | Screen for Hashimoto's - the #1 cause |
| Anti-Thyroglobulin Antibodies | Complementary autoimmune marker |
| Total T3 & T4 | For a complete picture |
| CBC (Complete Blood Count) | Anaemia can co-exist with hypothyroidism |
| Lipid Profile | Hypothyroidism raises cholesterol |
| Status | |
|---|---|
| Diagnosis | Subclinical Hypothyroidism |
| Severity | Mild (TSH 6.11 - just above upper limit) |
| Most Likely Cause | Hashimoto's Autoimmune Thyroiditis (needs confirmation) |
| Urgency | Non-emergency, but needs follow-up within 1-2 weeks |
| Immediate Action | Consult a doctor + Anti-TPO antibody test |
⚠️ This analysis is for educational purposes only. Narain should consult an endocrinologist or physician for clinical evaluation, symptom correlation, and treatment decisions. Do not start thyroid medication based on this report alone.
Create a summary document on Hashimoto's thyroiditis causes and progression
mkdir -p /tmp/workspace/hashimoto-report && python3 << 'PYEOF' from docx import Document from docx.shared import Pt, Inches, RGBColor from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.oxml.ns import qn from docx.oxml import OxmlElement import datetime doc = Document() # ── Page margins ────────────────────────────────────────────────────────────── from docx.shared import Inches section = doc.sections[0] section.top_margin = Inches(1.0) section.bottom_margin = Inches(1.0) section.left_margin = Inches(1.2) section.right_margin = Inches(1.2) # ── Default body font ───────────────────────────────────────────────────────── normal_style = doc.styles["Normal"] normal_style.font.name = "Calibri" normal_style.font.size = Pt(11) # ── Helper: add a coloured heading ─────────────────────────────────────────── def add_heading(doc, text, level=1, color=(0,70,127)): p = doc.add_heading(text, level=level) for run in p.runs: run.font.color.rgb = RGBColor(*color) return p # ── Helper: bullet paragraph ───────────────────────────────────────────────── def add_bullet(doc, text, bold_prefix=None): p = doc.add_paragraph(style="List Bullet") if bold_prefix: r = p.add_run(bold_prefix + ": ") r.bold = True p.add_run(text) return p # ── Helper: shaded info box ─────────────────────────────────────────────────── def add_shaded_paragraph(doc, text, shade_color="DCE6F1"): p = doc.add_paragraph() p.paragraph_format.left_indent = Inches(0.2) p.paragraph_format.right_indent = Inches(0.2) p.paragraph_format.space_before = Pt(4) p.paragraph_format.space_after = Pt(4) pPr = p._p.get_or_add_pPr() shd = OxmlElement("w:shd") shd.set(qn("w:val"), "clear") shd.set(qn("w:color"), "auto") shd.set(qn("w:fill"), shade_color) pPr.append(shd) run = p.add_run(text) run.font.size = Pt(10.5) run.font.italic = True return p # ═══════════════════════════════════════════════════════════════════════════════ # TITLE PAGE BLOCK # ═══════════════════════════════════════════════════════════════════════════════ title_p = doc.add_paragraph() title_p.alignment = WD_ALIGN_PARAGRAPH.CENTER title_run = title_p.add_run("Hashimoto's Thyroiditis") title_run.font.name = "Calibri" title_run.font.size = Pt(26) title_run.font.bold = True title_run.font.color.rgb = RGBColor(0, 70, 127) sub_p = doc.add_paragraph() sub_p.alignment = WD_ALIGN_PARAGRAPH.CENTER sub_run = sub_p.add_run("Causes, Pathogenesis & Clinical Progression") sub_run.font.name = "Calibri" sub_run.font.size = Pt(16) sub_run.font.color.rgb = RGBColor(70, 130, 180) date_p = doc.add_paragraph() date_p.alignment = WD_ALIGN_PARAGRAPH.CENTER date_run = date_p.add_run(f"Summary Document | {datetime.date.today().strftime('%B %d, %Y')}") date_run.font.size = Pt(11) date_run.font.color.rgb = RGBColor(120,120,120) doc.add_paragraph() # spacer # Horizontal rule via bottom border on a paragraph def add_hrule(doc): p = doc.add_paragraph() pPr = p._p.get_or_add_pPr() pBdr = OxmlElement("w:pBdr") bottom = OxmlElement("w:bottom") bottom.set(qn("w:val"), "single") bottom.set(qn("w:sz"), "6") bottom.set(qn("w:space"), "1") bottom.set(qn("w:color"), "4472C4") pBdr.append(bottom) pPr.append(pBdr) return p add_hrule(doc) doc.add_paragraph() # ═══════════════════════════════════════════════════════════════════════════════ # 1. OVERVIEW # ═══════════════════════════════════════════════════════════════════════════════ add_heading(doc, "1. Overview", level=1) doc.add_paragraph( "Hashimoto's thyroiditis (also called chronic lymphocytic thyroiditis or autoimmune thyroiditis) " "is the most common inflammatory disorder of the thyroid gland and the leading cause of " "hypothyroidism worldwide. First described by Japanese physician Hakaru Hashimoto in 1912 as " "'struma lymphomatosa,' it is characterized by progressive autoimmune destruction of thyroid tissue " "driven by autoreactive T and B lymphocytes. The disease predominantly affects women aged 30-50 years " "but can occur at any age, including in young adults and adolescents." ) add_shaded_paragraph(doc, "Key fact: The annual incidence is up to 4 per 1,000 women and 1 per 1,000 men. " "Subclinical hypothyroidism is found in 6-8% of women and 3% of men. " "The annual risk of progressing to overt hypothyroidism is ~4% when TSH elevation is accompanied " "by positive anti-TPO antibodies.", shade_color="DEEBF7" ) # ═══════════════════════════════════════════════════════════════════════════════ # 2. CAUSES & RISK FACTORS # ═══════════════════════════════════════════════════════════════════════════════ add_heading(doc, "2. Causes & Risk Factors", level=1) doc.add_paragraph( "Hashimoto's thyroiditis arises from a complex interplay of genetic predisposition and " "environmental triggers that collectively cause a breakdown in self-tolerance toward thyroid antigens." ) add_heading(doc, "2.1 Genetic Factors", level=2, color=(0, 100, 0)) doc.add_paragraph( "Autoimmune hypothyroidism is highly heritable. Susceptibility is determined by variants in " "multiple immunoregulatory genes:" ) add_bullet(doc, "HLA-DR3, DR4, and DR5 in Caucasians — the best documented genetic associations (Harrison's, 22e)", bold_prefix="HLA-DR polymorphisms") add_bullet(doc, "PTPN22 and CTLA-4 — both have immunoregulatory functions; polymorphisms confer weak but confirmed risk", bold_prefix="PTPN22 / CTLA-4") add_bullet(doc, "Various cytokine genes, GITR (glucocorticoid-induced TNF-receptor), and STAT3", bold_prefix="Cytokine genes") add_bullet(doc, "A gene on chromosome 21 may explain the high rate of autoimmune thyroiditis in Down syndrome", bold_prefix="Chromosome 21 locus") add_bullet(doc, "X-chromosome-linked genetic factors contribute to female predominance; associated with Turner's syndrome", bold_prefix="X-chromosome factors") doc.add_paragraph( "These genetic associations overlap with those of type 1 diabetes mellitus, Addison's disease, " "pernicious anemia, and vitiligo — explaining the frequent co-occurrence of multiple autoimmune conditions." ) add_heading(doc, "2.2 Environmental Triggers", level=2, color=(0, 100, 0)) add_bullet(doc, "Excess dietary iodine stimulates the thyroid reflexively, increasing autoimmune risk — especially relevant in Japan where the disease is more prevalent", bold_prefix="High iodine intake") add_bullet(doc, "Selenium is essential for antioxidant enzymes in thyroid cells; low selenium increases susceptibility", bold_prefix="Low selenium intake") add_bullet(doc, "Interferon-alpha (used in hepatitis/oncology), lithium, and amiodarone are recognized triggers", bold_prefix="Medications") add_bullet(doc, "Reduced childhood microbial exposure (hygiene hypothesis) has been linked to increased autoimmune thyroid disease", bold_prefix="Reduced microbial exposure") add_bullet(doc, "Smoking cessation has been shown to transiently increase incidence; alcohol intake appears mildly protective", bold_prefix="Smoking & alcohol") add_bullet(doc, "Physical or emotional stress may unmask latent autoimmune processes", bold_prefix="Psychological/physical stress") add_heading(doc, "2.3 Sex & Hormonal Factors", level=2, color=(0, 100, 0)) doc.add_paragraph( "The female-to-male ratio is approximately 10:1 to 20:1. This strong female preponderance is " "attributed to sex steroid effects on the immune response — estrogens generally enhance immune " "reactivity while androgens suppress it. Hormonal shifts during puberty, pregnancy, and menopause " "can all precipitate or worsen thyroid autoimmunity." ) # ═══════════════════════════════════════════════════════════════════════════════ # 3. PATHOGENESIS (MECHANISM) # ═══════════════════════════════════════════════════════════════════════════════ add_heading(doc, "3. Pathogenesis (Mechanism of Disease)", level=1) doc.add_paragraph( "The central event in Hashimoto's thyroiditis is the breakdown of self-tolerance to thyroid " "antigens, leading to chronic inflammation and progressive follicular destruction." ) add_heading(doc, "3.1 Immune Cell Cascade", level=2, color=(0, 100, 0)) steps = [ ("Step 1 - Antigen Presentation", "CD4+ helper T cells are abnormally activated against thyroid antigens " "(thyroglobulin, thyroid peroxidase/TPO, and TSH receptor). This is the initiating event."), ("Step 2 - Cytotoxic T Cell Recruitment", "Activated CD4+ T cells recruit CD8+ cytotoxic T cells (the primary effectors of thyroid " "cell destruction) into the thyroid gland."), ("Step 3 - Cytokine-Mediated Injury", "Locally produced cytokines — TNF-alpha, IL-1, and IFN-gamma — amplify the inflammatory " "response and directly injure thyroid follicular cells."), ("Step 4 - Autoantibody Production", "Activated B cells produce autoantibodies:\n" " • Anti-TPO (thyroid peroxidase) antibodies: present in ~95% of cases\n" " • Anti-thyroglobulin (Anti-Tg) antibodies: present in ~60% of cases\n" " • Anti-TSH receptor antibodies: present in ~60% of cases\n" " • Anti-sodium/iodine symporter: present in ~25% of cases\n" "These antibodies cause complement fixation and NK cell-mediated killing."), ("Step 5 - Apoptosis", "Programmed cell death (apoptosis) of thyrocytes has also been implicated as a key " "destruction mechanism, independent of the antibody-mediated pathway."), ("Step 6 - Fibrosis & Follicular Destruction", "Chronic inflammation leads to fibrosis and progressive loss of functional thyroid follicles, " "ultimately culminating in hypothyroidism."), ] for title, body in steps: p = doc.add_paragraph(style="List Number") r = p.add_run(title + ": ") r.bold = True p.add_run(body) add_heading(doc, "3.2 Role of Autoantibodies", level=2, color=(0, 100, 0)) doc.add_paragraph( "Although anti-TPO and anti-thyroglobulin antibodies are diagnostically useful, the current " "evidence suggests they are markers of the disease rather than the primary cause. They can be " "detected in individuals without thyroid dysfunction. However, their titre level is highly " "predictive of progression severity and speed — higher titres correlate with faster progression " "to overt hypothyroidism." ) # ═══════════════════════════════════════════════════════════════════════════════ # 4. HISTOLOGY (MICROSCOPIC APPEARANCE) # ═══════════════════════════════════════════════════════════════════════════════ add_heading(doc, "4. Histological Appearance", level=1) doc.add_paragraph( "The microscopic picture of Hashimoto's thyroiditis is characteristic and confirms the diagnosis " "when biopsy is performed:" ) add_bullet(doc, "Diffuse infiltration of the gland by small lymphocytes and plasma cells", bold_prefix="Lymphocytic infiltration") add_bullet(doc, "Well-developed germinal center formation within the thyroid parenchyma", bold_prefix="Germinal centers") add_bullet(doc, "Thyroid follicles are smaller than normal with markedly reduced colloid content", bold_prefix="Atrophic follicles") add_bullet(doc, "Follicles lined by Hürthle cells (Askanazy cells) — enlarged cells with abundant eosinophilic, granular cytoplasm; a hallmark finding", bold_prefix="Hürthle/Askanazy cells") add_bullet(doc, "Increased interstitial connective tissue (fibrosis)", bold_prefix="Interstitial fibrosis") doc.add_paragraph( "Gross appearance: The thyroid is usually mildly-to-moderately enlarged, firm, with a pale " "gray-tan, granular, nodular cut surface." ) add_shaded_paragraph(doc, "End-stage (Atrophic Thyroiditis): In advanced disease, fibrosis is much more extensive, " "lymphocyte infiltration is less prominent, and follicles are almost completely absent. " "This represents the burnt-out phase of Hashimoto's thyroiditis rather than a separate entity.", shade_color="FFF2CC" ) # ═══════════════════════════════════════════════════════════════════════════════ # 5. CLINICAL PROGRESSION # ═══════════════════════════════════════════════════════════════════════════════ add_heading(doc, "5. Clinical Progression", level=1) doc.add_paragraph( "Hashimoto's thyroiditis follows a characteristic progression through distinct clinical phases. " "Because the autoimmune process is slow and gradual, patients may remain asymptomatic for years." ) # Progression table table = doc.add_table(rows=1, cols=4) table.style = "Table Grid" hdr_cells = table.rows[0].cells headers = ["Phase", "TSH", "FT3 / FT4", "Clinical State"] for i, h in enumerate(headers): hdr_cells[i].text = h for run in hdr_cells[i].paragraphs[0].runs: run.bold = True # shade header tc = hdr_cells[i]._tc tcPr = tc.get_or_add_tcPr() shd = OxmlElement("w:shd") shd.set(qn("w:val"), "clear") shd.set(qn("w:color"), "auto") shd.set(qn("w:fill"), "2E74B5") tcPr.append(shd) for run in hdr_cells[i].paragraphs[0].runs: run.font.color.rgb = RGBColor(255, 255, 255) rows_data = [ ("Phase 1\nEuthyroid", "Normal (0.54-5.3)", "Normal", "Asymptomatic. Antibodies may be present. No clinical disease."), ("Phase 2\nSubclinical Hypothyroid", "Mildly Elevated (5-10)", "Normal", "Pituitary compensates. Possibly mild fatigue. Often detected only by blood test."), ("Phase 3\nOvert Hypothyroidism", "High (>10)", "Low", "Frank symptoms: fatigue, weight gain, cold intolerance, dry skin/hair, bradycardia, constipation, depression."), ("Phase 4\nAtrophic Thyroiditis", "Very High", "Very Low", "End-stage. Minimal thyroid tissue. Full replacement therapy required."), ("Variant\nHashitoxicosis", "Low", "High", "Transient hyperthyroid phase (4-8% of cases) due to follicular disruption releasing stored hormone."), ] for row_data in rows_data: row_cells = table.add_row().cells for i, val in enumerate(row_data): row_cells[i].text = val doc.add_paragraph() doc.add_paragraph( "Progression rate: 4-18% per year from subclinical to overt hypothyroidism. " "Progression is more likely in patients with:" ) add_bullet(doc, "Higher baseline TSH levels (TSH > 6-10 mIU/L)") add_bullet(doc, "Positive anti-TPO or anti-thyroglobulin antibodies") add_bullet(doc, "Presence of a goiter") add_bullet(doc, "Female sex and advancing age") # ═══════════════════════════════════════════════════════════════════════════════ # 6. CLINICAL FEATURES & SYMPTOMS # ═══════════════════════════════════════════════════════════════════════════════ add_heading(doc, "6. Clinical Features & Symptoms", level=1) doc.add_paragraph( "Symptoms develop insidiously and may be non-specific, particularly in early stages. " "Most patients present with one or more of the following:" ) # Two-column symptom layout using a table sym_table = doc.add_table(rows=1, cols=2) sym_table.style = "Table Grid" sym_h = sym_table.rows[0].cells sym_h[0].text = "Early / Subclinical Stage" sym_h[1].text = "Overt Hypothyroidism Stage" for cell in sym_h: for run in cell.paragraphs[0].runs: run.bold = True tc = cell._tc tcPr = tc.get_or_add_tcPr() shd = OxmlElement("w:shd") shd.set(qn("w:val"), "clear") shd.set(qn("w:color"), "auto") shd.set(qn("w:fill"), "BDD7EE") tcPr.append(shd) sym_rows = [ ("Painless anterior neck mass (goiter)", "Profound fatigue and lethargy"), ("Mild fatigue", "Weight gain without dietary change"), ("Asymptomatic — detected on screening", "Cold intolerance"), ("Mild mood changes", "Dry skin, dry and brittle hair"), ("Possible transient hyperthyroidism (Hashitoxicosis)", "Constipation"), ("", "Bradycardia (slow heart rate)"), ("", "Depression and cognitive slowing ('brain fog')"), ("", "Menstrual irregularities (in women)"), ("", "Hyperlipidaemia (raised cholesterol)"), ("", "Puffy face, periorbital oedema"), ] for r in sym_rows: rc = sym_table.add_row().cells rc[0].text = r[0] rc[1].text = r[1] doc.add_paragraph() # ═══════════════════════════════════════════════════════════════════════════════ # 7. DIAGNOSIS # ═══════════════════════════════════════════════════════════════════════════════ add_heading(doc, "7. Diagnosis", level=1) doc.add_paragraph( "Hashimoto's thyroiditis is primarily a clinical and biochemical diagnosis. " "Key investigations include:" ) add_bullet(doc, "Elevated serum TSH (most sensitive early marker)", bold_prefix="TSH") add_bullet(doc, "Free T4 (to distinguish subclinical from overt hypothyroidism)", bold_prefix="Free T4") add_bullet(doc, "Present in >95% of cases; confirms autoimmune aetiology", bold_prefix="Anti-TPO antibodies") add_bullet(doc, "Present in ~60% of cases; useful when anti-TPO is borderline", bold_prefix="Anti-thyroglobulin antibodies") add_bullet(doc, "Shows heterogeneous, hypoechoic gland consistent with lymphocytic infiltration; not mandatory for diagnosis", bold_prefix="Thyroid ultrasound") add_bullet(doc, "FNAB (fine needle aspiration biopsy): Reserved for suspicious nodules or rapidly enlarging goiter", bold_prefix="Biopsy") add_shaded_paragraph(doc, "Diagnosis is confirmed by: elevated TSH + positive anti-TPO antibodies. " "If TSH is elevated and free T4 is normal → Subclinical Hypothyroidism. " "If TSH is elevated and free T4 is LOW → Overt Hypothyroidism.", shade_color="E2EFDA" ) # ═══════════════════════════════════════════════════════════════════════════════ # 8. ASSOCIATED CONDITIONS # ═══════════════════════════════════════════════════════════════════════════════ add_heading(doc, "8. Associated Conditions", level=1) doc.add_paragraph( "Hashimoto's thyroiditis commonly co-exists with other autoimmune and systemic conditions:" ) add_bullet(doc, "Type 1 Diabetes Mellitus", bold_prefix="Autoimmune") add_bullet(doc, "Addison's disease (autoimmune adrenal insufficiency)", bold_prefix="Autoimmune") add_bullet(doc, "Pernicious anaemia (autoimmune gastritis)", bold_prefix="Autoimmune") add_bullet(doc, "Vitiligo, alopecia areata", bold_prefix="Autoimmune") add_bullet(doc, "Inflammatory bowel disease (IBD), primary biliary cirrhosis, coeliac disease", bold_prefix="GI / Liver") add_bullet(doc, "Sjögren's syndrome, rheumatoid arthritis, systemic lupus erythematosus", bold_prefix="Connective tissue") add_bullet(doc, "Down syndrome, Turner syndrome", bold_prefix="Chromosomal disorders") add_bullet(doc, "Thyroid lymphoma: Rare but 80x higher than background population", bold_prefix="Malignancy risk") # ═══════════════════════════════════════════════════════════════════════════════ # 9. MANAGEMENT OVERVIEW # ═══════════════════════════════════════════════════════════════════════════════ add_heading(doc, "9. Management Overview", level=1) doc.add_paragraph( "There is no treatment that reverses the underlying autoimmune process. Management is directed at " "correcting thyroid hormone deficiency and monitoring progression." ) add_heading(doc, "9.1 Subclinical Hypothyroidism", level=2, color=(0, 100, 0)) doc.add_paragraph("Treatment decision depends on TSH level, symptoms, and antibody status:") add_bullet(doc, "TSH > 10 µIU/mL → treat with levothyroxine (experts agree)", bold_prefix="TSH > 10") add_bullet(doc, "TSH 5-10 µIU/mL → treat if symptomatic, elevated LDL, or positive anti-TPO antibodies", bold_prefix="TSH 5-10") add_bullet(doc, "All others → monitor with repeat TFTs every 6-12 months", bold_prefix="TSH < 5") add_heading(doc, "9.2 Overt Hypothyroidism", level=2, color=(0, 100, 0)) add_bullet(doc, "All patients treated with Levothyroxine (synthetic T4)", bold_prefix="Treatment") add_bullet(doc, "Full replacement dose: 1.6 mcg/kg/day; start lower in elderly or cardiac patients (25-50 mcg/day)", bold_prefix="Dose") add_bullet(doc, "Take on an empty stomach, 30-60 min before breakfast or at bedtime; absorption reduced 40% with food", bold_prefix="Administration") add_bullet(doc, "Calcium, iron, antacids, PPIs, and anticonvulsants all reduce levothyroxine absorption", bold_prefix="Drug interactions") add_bullet(doc, "Recheck TSH 6 weeks after every dose change; once stable, check TSH annually", bold_prefix="Monitoring") add_heading(doc, "9.3 Selenium Supplementation", level=2, color=(0, 100, 0)) doc.add_paragraph( "Selenium supplementation (200 mcg/day) has been shown in some studies to reduce anti-TPO antibody " "titres and may slow disease progression, particularly in early disease. Evidence is still evolving." ) # ═══════════════════════════════════════════════════════════════════════════════ # 10. SUMMARY TABLE # ═══════════════════════════════════════════════════════════════════════════════ add_heading(doc, "10. Quick Reference Summary", level=1) summary_table = doc.add_table(rows=1, cols=2) summary_table.style = "Table Grid" s_hdr = summary_table.rows[0].cells s_hdr[0].text = "Feature" s_hdr[1].text = "Detail" for cell in s_hdr: for run in cell.paragraphs[0].runs: run.bold = True tc = cell._tc tcPr = tc.get_or_add_tcPr() shd = OxmlElement("w:shd") shd.set(qn("w:val"), "clear") shd.set(qn("w:color"), "auto") shd.set(qn("w:fill"), "2E74B5") tcPr.append(shd) for run in cell.paragraphs[0].runs: run.font.color.rgb = RGBColor(255, 255, 255) summary_rows = [ ("Full name", "Hashimoto's thyroiditis / Chronic lymphocytic thyroiditis"), ("First described", "Hakaru Hashimoto, 1912"), ("Type", "Organ-specific autoimmune disease"), ("Primary target", "Thyroid gland (follicular cells)"), ("Main antibodies", "Anti-TPO (95%), Anti-Tg (60%)"), ("Key cells", "CD4+ T helper, CD8+ cytotoxic T cells, B cells"), ("Cytokines involved", "TNF-alpha, IL-1, IFN-gamma"), ("Genetics", "HLA-DR3/4/5, PTPN22, CTLA-4 polymorphisms"), ("Epidemiology", "4/1000 women/yr; 1/1000 men/yr; F:M = 10-20:1"), ("Peak age", "30-50 years (but any age)"), ("Progression rate", "4-18% per year to overt hypothyroidism"), ("Hallmark histology", "Lymphocytic infiltrate + Hürthle cells + fibrosis"), ("Diagnosis", "Elevated TSH + positive Anti-TPO antibodies"), ("Treatment", "Levothyroxine (when indicated)"), ("Rare complication", "Thyroid lymphoma (80x increased risk)"), ] for row_data in summary_rows: rc = summary_table.add_row().cells rc[0].text = row_data[0] rc[1].text = row_data[1] # bold the feature column for run in rc[0].paragraphs[0].runs: run.bold = True doc.add_paragraph() # ── References ──────────────────────────────────────────────────────────────── add_hrule(doc) ref_p = doc.add_paragraph() ref_run = ref_p.add_run("References") ref_run.bold = True ref_run.font.size = Pt(10) ref_run.font.color.rgb = RGBColor(80,80,80) refs = [ "Harrison's Principles of Internal Medicine, 22nd Edition (2025) — Chapter 99: Autoimmune Hypothyroidism", "Schwartz's Principles of Surgery, 11th Edition — Lymphocytic (Hashimoto's) Thyroiditis", "Goldman-Cecil Medicine, International Edition (2-vol set) — Chapter 207: Hypothyroidism Pathobiology", "Berek & Novak's Gynecology — Hashimoto Thyroiditis", "Symptom to Diagnosis: An Evidence-Based Guide, 4th Edition — Hypothyroidism", "Dayan CM et al. Interpretation of thyroid function tests. The Lancet, Vol 357, Feb 2001.", "Laboratory Evaluation of Thyroid Function, Indian Thyroid Guidelines, JAPI, January 2011, Vol 59.", ] for ref in refs: p = doc.add_paragraph(style="List Bullet") r = p.add_run(ref) r.font.size = Pt(9.5) r.font.color.rgb = RGBColor(80,80,80) # ── Disclaimer ──────────────────────────────────────────────────────────────── doc.add_paragraph() disc_p = doc.add_paragraph() disc_p.alignment = WD_ALIGN_PARAGRAPH.CENTER disc_run = disc_p.add_run( "This document is intended for educational purposes only. " "Clinical decisions should always be made in consultation with a qualified healthcare professional." ) disc_run.font.size = Pt(9) disc_run.font.italic = True disc_run.font.color.rgb = RGBColor(150, 150, 150) # ── Save ─────────────────────────────────────────────────────────────────────── out_path = "/tmp/workspace/hashimoto-report/Hashimotos_Thyroiditis_Summary.docx" doc.save(out_path) print(f"Saved: {out_path}") PYEOF
Hashimotos Thyroiditis Summary
Word Document · DOCX