Diabetes with hypertension, feverish . Thiazides or diuretics to be given?
thiazide diuretics diabetes hypertension
Can we give antibiotics?
What is the suspected source/cause of the fever?
Above diaphragm metronidazole or clotrimazole?
Secnidazole used in?
Hyperthyroidism and hypothyroidism Treatment initiation and maintenance .
Which part should I cover in detail first?
| Hyperthyroidism | Hypothyroidism | |
|---|---|---|
| First-line initiation | Methimazole (or PTU in 1st trimester/storm) + beta-blocker for symptoms | Levothyroxine, dose by age/cardiac risk |
| Definitive option | RAI or thyroidectomy | None needed - lifelong replacement |
| Key monitoring test | TSH + free T4/T3 q4-6wk initially | TSH q6-8wk after dose change, then annually |
| Major initiation risk | Agranulocytosis, hepatotoxicity (thionamides) | Cardiac strain if dose too high too fast in elderly/cardiac patients |
Give me some questions for hyper and hypo thyroidism mcq based
Generate a PDF with these MCQs for study or exam prep
mkdir -p /tmp/workspace/thyroid-mcq && ls -la /tmp/workspace/
~/thyroid-mcq/generate_pdf.py
from reportlab.lib.pagesizes import LETTER
from reportlab.lib.units import inch
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER
from reportlab.lib import colors
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, PageBreak, HRFlowable
)
OUT_PATH = "/tmp/workspace/thyroid-mcq/Thyroid_MCQs_Hyper_Hypo.pdf"
styles = getSampleStyleSheet()
title_style = ParagraphStyle(
"TitleStyle", parent=styles["Title"], fontSize=20, spaceAfter=4, textColor=colors.HexColor("#1a3c6e")
)
subtitle_style = ParagraphStyle(
"SubtitleStyle", parent=styles["Normal"], fontSize=11, alignment=TA_CENTER,
textColor=colors.HexColor("#555555"), spaceAfter=18
)
section_style = ParagraphStyle(
"SectionStyle", parent=styles["Heading2"], fontSize=15, spaceBefore=18, spaceAfter=10,
textColor=colors.HexColor("#1a3c6e"), borderPadding=(0, 0, 4, 0)
)
question_style = ParagraphStyle(
"QuestionStyle", parent=styles["Normal"], fontSize=11.5, spaceBefore=10, spaceAfter=4,
leading=15, fontName="Helvetica-Bold"
)
option_style = ParagraphStyle(
"OptionStyle", parent=styles["Normal"], fontSize=11, leftIndent=16, spaceAfter=2, leading=14
)
answer_style = ParagraphStyle(
"AnswerStyle", parent=styles["Normal"], fontSize=10.5, leftIndent=16, spaceBefore=6, spaceAfter=2,
leading=14, textColor=colors.HexColor("#0b6e3d"), fontName="Helvetica-Bold"
)
explanation_style = ParagraphStyle(
"ExplanationStyle", parent=styles["Normal"], fontSize=10, leftIndent=16, spaceAfter=10,
leading=13.5, textColor=colors.HexColor("#333333")
)
# Data: (section_title, [ (qnum, question, [options], correct_letter, explanation) ])
hyperthyroidism = [
(1, "A 28-year-old woman with Graves' disease is in her first trimester of pregnancy. Which antithyroid drug is preferred at this stage?",
["A) Methimazole", "B) Propylthiouracil (PTU)", "C) Radioactive iodine", "D) Levothyroxine"],
"B",
"PTU is preferred in the first trimester because methimazole carries a higher (though still low) risk of teratogenicity (aplasia cutis, choanal/esophageal atresia). PTU is typically switched back to methimazole after the first trimester due to PTU's hepatotoxicity risk."),
(2, "What is the mechanism by which PTU has an advantage over methimazole in thyroid storm?",
["A) Longer half-life", "B) Inhibits peripheral conversion of T4 to T3", "C) Blocks iodine uptake by the thyroid", "D) Causes agranulocytosis less often"],
"B",
"PTU inhibits type 1 deiodinase, reducing peripheral T4-to-T3 conversion, giving it an added benefit in the acute hypermetabolic state of thyroid storm."),
(3, "A patient starts methimazole for Graves' disease and 3 weeks later presents with high fever and severe sore throat. What is the priority next step?",
["A) Increase methimazole dose", "B) Check CBC to rule out agranulocytosis and stop the drug", "C) Reassure - this is a normal side effect", "D) Switch to PTU immediately"],
"B",
"Agranulocytosis is a rare but serious idiosyncratic reaction to thionamides. Any fever/sore throat warrants an urgent CBC, and the drug should be held until agranulocytosis is excluded."),
(4, "Which of the following is used for rapid symptomatic control of tachycardia and tremor in thyrotoxicosis while awaiting the effect of antithyroid drugs?",
["A) Levothyroxine", "B) Propranolol", "C) Furosemide", "D) Amiodarone"],
"B",
"Beta-blockers control adrenergic symptoms immediately; thionamides take 2-6 weeks to reduce hormone levels. (Note: amiodarone can actually precipitate thyroid dysfunction and is not used for this purpose.)"),
(5, "A patient with Graves' disease is being prepared for total thyroidectomy. How long before surgery should antithyroid drugs be given to achieve a euthyroid state?",
["A) 24 hours", "B) 1 week", "C) 6 weeks", "D) 6 months"],
"C",
"About 6 weeks of preoperative thionamide therapy (+/- beta-blocker) is used to render the patient euthyroid and reduce the risk of perioperative thyroid storm."),
(6, "Radioactive iodine (I-131) therapy for hyperthyroidism is contraindicated in which of the following?",
["A) Toxic multinodular goiter", "B) Pregnancy and lactation", "C) Elderly patients", "D) Solitary toxic adenoma"],
"B",
"RAI crosses the placenta and concentrates in breast milk, causing fetal/neonatal thyroid ablation - it's absolutely contraindicated in pregnancy and breastfeeding."),
(7, "The most common long-term complication after radioactive iodine treatment for Graves' disease is:",
["A) Hyperparathyroidism", "B) Hypothyroidism", "C) Vocal cord paralysis", "D) Thyroid storm"],
"B",
"RAI ablates thyroid tissue, and most patients eventually become hypothyroid and require lifelong levothyroxine - this is an expected outcome, not a true \"complication\" in the surgical sense."),
]
hypothyroidism = [
(8, "A 70-year-old man with known coronary artery disease is diagnosed with primary hypothyroidism. What is the most appropriate initial levothyroxine dose?",
["A) 100-150 mcg/day", "B) 1.6 mcg/kg/day started immediately", "C) 12.5-25 mcg/day, titrated slowly", "D) IV levothyroxine 400 mcg loading dose"],
"C",
"In elderly patients or those with cardiac disease, \"start low, go slow\" is the rule - rapid full-dose replacement can precipitate angina or arrhythmia due to increased myocardial oxygen demand."),
(9, "How soon after a levothyroxine dose change should TSH be rechecked?",
["A) 1 week", "B) 6-8 weeks", "C) 6 months", "D) Immediately"],
"B",
"T4 has a half-life of 7-10 days, so it takes about 5-6 weeks to reach a new steady state; TSH is checked at 6-8 weeks to assess the effect of a dose change accurately."),
(10, "Which lab test is NOT reliable for monitoring levothyroxine adequacy in a patient with central (secondary) hypothyroidism due to pituitary disease?",
["A) Free T4", "B) TSH", "C) Total T4", "D) Clinical symptom assessment"],
"B",
"In central hypothyroidism, the pituitary itself is dysfunctional, so TSH does not reliably reflect thyroid hormone status. Free T4 (targeting upper-normal range) is used instead."),
(11, "A pregnant woman with treated hypothyroidism should have her levothyroxine dose adjusted because:",
["A) Estrogen decreases thyroxine-binding globulin, lowering requirements", "B) Metabolic demand and thyroxine-binding globulin increase, raising requirements", "C) Pregnancy suppresses TSH permanently", "D) Levothyroxine is contraindicated in pregnancy"],
"B",
"Pregnancy increases TBG (estrogen effect) and overall metabolic/fetal demand, typically requiring a 25-50% dose increase, with TSH monitored roughly every 4 weeks in the first half of pregnancy."),
(12, "Combination therapy with levothyroxine (T4) plus liothyronine (T3) compared to levothyroxine alone has been shown in trials to be:",
["A) Clearly superior for all patients", "B) Not superior overall, though a subset of patients report residual symptoms on T4 alone", "C) Dangerous and never used", "D) The standard first-line regimen"],
"B",
"Multiple trials show no consistent benefit of combination therapy over levothyroxine monotherapy, although some individual patients remain symptomatic despite normalized TSH on T4 alone."),
(13, "A 45-year-old woman has an incidental TSH of 6.5 mIU/L with normal free T4 and no symptoms (subclinical hypothyroidism). Management should be:",
["A) Start levothyroxine in all such patients immediately", "B) Individualize based on TSH level, symptoms, antibody status, cardiovascular risk, and pregnancy status", "C) No further action or follow-up ever needed", "D) Start radioactive iodine"],
"B",
"Subclinical hypothyroidism treatment is individualized; not every patient with a mildly elevated TSH needs levothyroxine, but factors like TPO antibody positivity, pregnancy, or a TSH significantly above 10 shift the decision toward treatment."),
(14, "Which drug interaction can necessitate an increased levothyroxine dose?",
["A) Concurrent iron or calcium supplements taken with levothyroxine", "B) Taking levothyroxine on an empty stomach", "C) Taking levothyroxine at bedtime instead of morning", "D) Vitamin D supplementation"],
"A",
"Iron, calcium, and antacids/PPIs impair levothyroxine absorption if taken together - patients should separate dosing by at least 4 hours."),
(15, "A patient presents obtunded with hypothermia, bradycardia, and a history of untreated hypothyroidism - concerning for myxedema crisis. What is the appropriate initial levothyroxine approach?",
["A) Oral levothyroxine 50 mcg/day", "B) IV levothyroxine, initial dose ~4 mcg/kg (typically 200-400 mcg), then lower daily IV doses until oral intake tolerated", "C) Withhold thyroid hormone until TSH confirmed", "D) Radioactive iodine emergently"],
"B",
"Myxedema crisis is a medical emergency requiring IV levothyroxine loading followed by maintenance IV dosing (plus supportive care and stress-dose steroids, since coexisting adrenal insufficiency must be covered) until the patient can take oral medication."),
]
def build_section(title, questions, story):
story.append(Paragraph(title, section_style))
story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor("#1a3c6e"), spaceAfter=6))
for qnum, question, options, correct, explanation in questions:
story.append(Paragraph(f"Q{qnum}. {question}", question_style))
for opt in options:
story.append(Paragraph(opt, option_style))
story.append(Paragraph(f"Answer: {correct}", answer_style))
story.append(Paragraph(f"Explanation: {explanation}", explanation_style))
def main():
doc = SimpleDocTemplate(
OUT_PATH, pagesize=LETTER,
topMargin=0.75 * inch, bottomMargin=0.75 * inch,
leftMargin=0.75 * inch, rightMargin=0.75 * inch,
title="Thyroid Disorders MCQs - Study Guide"
)
story = []
story.append(Paragraph("Hyperthyroidism & Hypothyroidism", title_style))
story.append(Paragraph("MCQ Study Guide for Exam Preparation - 15 Questions with Answers & Explanations", subtitle_style))
build_section("Section 1: Hyperthyroidism", hyperthyroidism, story)
story.append(PageBreak())
build_section("Section 2: Hypothyroidism", hypothyroidism, story)
doc.build(story)
print(f"PDF created at {OUT_PATH}")
if __name__ == "__main__":
main()
cd /tmp/workspace/thyroid-mcq && python3 generate_pdf.py
ls -la /tmp/workspace/thyroid-mcq/
Thyroid MCQs Hyper Hypo
PDF Document · PDF
Create a summary document on hyper/hypothyroidism management for clinical reference
mkdir -p /tmp/workspace/thyroid-mcq/docx && ls -la /tmp/workspace/thyroid-mcq/
~/thyroid-mcq/docx/generate_doc.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
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
OUT_PATH = "/tmp/workspace/thyroid-mcq/docx/Thyroid_Management_Clinical_Reference.docx"
NAVY = RGBColor(0x1A, 0x3C, 0x6E)
DARKGRAY = RGBColor(0x33, 0x33, 0x33)
RED = RGBColor(0xB0, 0x00, 0x00)
GREEN = RGBColor(0x0B, 0x6E, 0x3D)
doc = Document()
# Base styles
normal = doc.styles["Normal"]
normal.font.name = "Calibri"
normal.font.size = Pt(10.5)
for section in doc.sections:
section.left_margin = Inches(0.75)
section.right_margin = Inches(0.75)
section.top_margin = Inches(0.7)
section.bottom_margin = Inches(0.7)
def shade_cell(cell, hex_color):
tcPr = cell._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'), hex_color)
tcPr.append(shd)
def set_cell_text(cell, text, bold=False, color=None, size=10, align=None):
cell.text = ""
p = cell.paragraphs[0]
if align:
p.alignment = align
run = p.add_run(text)
run.bold = bold
run.font.size = Pt(size)
if color:
run.font.color.rgb = color
def add_table(headers, rows, col_widths=None, header_fill="1A3C6E"):
table = doc.add_table(rows=1, cols=len(headers))
table.style = "Table Grid"
table.alignment = WD_TABLE_ALIGNMENT.CENTER
hdr_cells = table.rows[0].cells
for i, h in enumerate(headers):
set_cell_text(hdr_cells[i], h, bold=True, color=RGBColor(0xFF, 0xFF, 0xFF), size=10.5)
shade_cell(hdr_cells[i], header_fill)
for row in rows:
cells = table.add_row().cells
for i, val in enumerate(row):
set_cell_text(cells[i], val, size=10)
if col_widths:
for i, w in enumerate(col_widths):
for row in table.rows:
row.cells[i].width = Inches(w)
doc.add_paragraph()
return table
def add_heading(text, level=1, color=NAVY):
h = doc.add_heading(level=level)
run = h.add_run(text)
run.font.color.rgb = color
run.font.name = "Calibri"
if level == 1:
run.font.size = Pt(16)
elif level == 2:
run.font.size = Pt(13)
else:
run.font.size = Pt(11.5)
return h
def add_bullet(text, bold_lead=None):
p = doc.add_paragraph(style="List Bullet")
if bold_lead:
r = p.add_run(bold_lead)
r.bold = True
p.add_run(text)
else:
p.add_run(text)
return p
def add_note(text, color=RED, label="Caution: "):
p = doc.add_paragraph()
r1 = p.add_run(label)
r1.bold = True
r1.font.color.rgb = color
r2 = p.add_run(text)
r2.italic = True
return p
# ===================== TITLE PAGE =====================
title_p = doc.add_paragraph()
title_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
run = title_p.add_run("Thyroid Disorders: Management Reference")
run.font.size = Pt(24)
run.bold = True
run.font.color.rgb = NAVY
subtitle_p = doc.add_paragraph()
subtitle_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
run = subtitle_p.add_run("Hyperthyroidism and Hypothyroidism - Diagnosis, Treatment Initiation, and Maintenance")
run.font.size = Pt(13)
run.italic = True
run.font.color.rgb = DARKGRAY
note_p = doc.add_paragraph()
note_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
run = note_p.add_run("Quick Clinical Reference - For Educational and Point-of-Care Use\nAlways confirm doses and monitoring intervals against local/institutional protocols and current guidelines.")
run.font.size = Pt(9.5)
run.font.color.rgb = RGBColor(0x66, 0x66, 0x66)
doc.add_paragraph()
# ===================== SECTION: HYPERTHYROIDISM =====================
add_heading("1. Hyperthyroidism", level=1)
add_heading("1.1 Common Causes", level=2)
add_bullet("Graves' disease (autoimmune, most common cause overall) - diffuse goiter, TSH-receptor antibodies, may have ophthalmopathy/pretibial myxedema.")
add_bullet("Toxic multinodular goiter and toxic adenoma - autonomously functioning nodules.")
add_bullet("Thyroiditis (subacute, postpartum, silent) - transient thyrotoxicosis, low RAI uptake.")
add_bullet("Exogenous/iatrogenic (levothyroxine overdose, amiodarone-induced, iodine-induced).")
add_heading("1.2 Diagnostic Confirmation", level=2)
add_bullet("Suppressed TSH with elevated free T4 and/or free T3 confirms overt hyperthyroidism.")
add_bullet("TSH-receptor antibodies (TRAb/TSI) support Graves' disease diagnosis.")
add_bullet("Radioactive iodine uptake (RAIU) scan differentiates Graves'/toxic nodules (high uptake) from thyroiditis (low uptake).")
add_heading("1.3 Treatment Initiation", level=2)
add_table(
headers=["Drug", "Starting Dose", "Key Notes"],
rows=[
["Methimazole (first-line)", "10-20 mg every 12 h, or 15-40 mg/day", "Preferred agent except in 1st trimester pregnancy, thyroid storm, or intolerance. Long half-life allows once-daily dosing once euthyroid."],
["Propylthiouracil (PTU)", "100 mg every 6-8 h (up to 300-400 mg/day)", "Preferred in 1st trimester pregnancy and thyroid storm (blocks peripheral T4-to-T3 conversion). Higher hepatotoxicity risk - avoid long-term use."],
["Propranolol (adjunct)", "Titrate to symptom control (e.g., 20-40 mg TID)", "Rapid control of tachycardia, tremor, anxiety while thionamide takes effect (2-6 week lag). Does not treat hormone excess itself."],
],
col_widths=[1.8, 2.0, 3.0]
)
add_note("Any fever or sore throat during thionamide therapy warrants an urgent CBC to rule out agranulocytosis; hold the drug pending results. Monitor LFTs if PTU is used (hepatotoxicity).")
add_heading("1.4 Definitive Therapy Options", level=2)
add_table(
headers=["Option", "Indications", "Key Considerations"],
rows=[
["Radioactive Iodine (RAI, I-131)", "Graves' disease not remitting on drugs, toxic nodules/MNG, patient preference", "Contraindicated in pregnancy/lactation; caution with active Graves' ophthalmopathy; most patients become hypothyroid over time (expected outcome, not failure)."],
["Thyroidectomy (usually total)", "Large goiter, need for rapid euthyroidism, RAI refused/contraindicated, coexisting nodules/suspicious findings, ophthalmopathy concerns", "Requires ~6 weeks of preoperative thionamide (+/- beta-blocker) to achieve euthyroid state and avoid perioperative thyroid storm; consider preoperative iodide (SSKI/Lugol) 2 weeks prior in some protocols."],
],
col_widths=[1.8, 2.6, 2.4]
)
add_heading("1.5 Maintenance and Monitoring", level=2)
add_bullet("Recheck TSH/free T4/T3 every 4-6 weeks initially; titrate thionamide dose down as levels normalize.")
add_bullet("Typical course of thionamide therapy for Graves' disease: 12-18 months, then consider a trial taper/discontinuation to assess remission.")
add_bullet("Relapse after stopping drug therapy is common and may prompt RAI or surgery.")
add_bullet("Baseline CBC and LFTs before starting thionamides; patient education on agranulocytosis and hepatotoxicity warning signs is essential.")
add_heading("1.6 Emergency: Thyroid Storm", level=2)
add_bullet("Clinical diagnosis (fever, tachycardia/arrhythmia, altered mental status, GI symptoms) in a hyperthyroid patient, often precipitated by infection, surgery, or trauma.")
add_bullet("Treatment sequence: beta-blocker (propranolol) -> PTU (blocks synthesis and peripheral T4-to-T3 conversion) -> iodine solution (given ~1 hour after thionamide to block hormone release) -> hydrocortisone (blocks peripheral conversion, supports possible relative adrenal insufficiency) -> aggressive supportive care/cooling.")
doc.add_page_break()
# ===================== SECTION: HYPOTHYROIDISM =====================
add_heading("2. Hypothyroidism", level=1)
add_heading("2.1 Common Causes", level=2)
add_bullet("Hashimoto's (autoimmune) thyroiditis - most common cause in iodine-sufficient regions; anti-TPO antibodies often positive.")
add_bullet("Post-ablative (post-RAI or post-thyroidectomy).")
add_bullet("Iodine deficiency (globally common cause).")
add_bullet("Central (secondary) hypothyroidism - pituitary/hypothalamic disease; TSH unreliable for diagnosis/monitoring.")
add_bullet("Drug-induced (amiodarone, lithium, tyrosine kinase inhibitors, immune checkpoint inhibitors).")
add_heading("2.2 Diagnostic Confirmation", level=2)
add_bullet("Primary hypothyroidism: elevated TSH with low free T4.")
add_bullet("Subclinical hypothyroidism: elevated TSH with normal free T4 - management is individualized.")
add_bullet("Central hypothyroidism: low/inappropriately normal TSH with low free T4 - use free T4, not TSH, to monitor.")
add_heading("2.3 Treatment Initiation - Levothyroxine (T4)", level=2)
add_table(
headers=["Patient Group", "Starting Dose", "Rationale"],
rows=[
["Healthy adults < 50 years", "Full dose: ~1.6-1.8 mcg/kg/day (or flat 50-100 mcg/day)", "No cardiac risk - can start near-target dose and titrate by TSH."],
["Adults > 50 years or known/suspected cardiac disease", "Low dose: 12.5-25 mcg/day, titrate slowly (increase every 4-6 weeks)", "\"Start low, go slow\" - rapid full-dose replacement can precipitate angina or arrhythmia."],
["Severe/myxedema crisis", "IV loading ~4 mcg/kg (typically 200-400 mcg), then 100 mcg IV at 24h, then 50 mcg IV daily until oral tolerated", "Medical emergency; also give stress-dose IV hydrocortisone to cover possible coexisting adrenal insufficiency."],
["Thyroid cancer (TSH-suppression goal)", "Higher than replacement dose, titrated to suppressed TSH target", "Suppressing TSH reduces the trophic stimulus to any residual differentiated thyroid cancer cells."],
],
col_widths=[2.2, 2.6, 2.0]
)
add_bullet("Administration: take on an empty stomach, once daily, 30-60 minutes before breakfast; keep timing consistent day to day.")
add_bullet("Separate dosing from calcium, iron, and antacids/PPIs by at least 4 hours - these impair absorption.")
add_heading("2.4 Maintenance and Monitoring", level=2)
add_table(
headers=["Scenario", "Monitoring Interval", "Notes"],
rows=[
["After any dose change", "Recheck TSH at 6-8 weeks", "T4 half-life is 7-10 days; steady state takes ~5-6 weeks to reach."],
["Stable maintenance dose", "TSH annually", "More frequent if symptoms change, new interacting medication, or pregnancy."],
["Pregnancy", "TSH every 4 weeks in first half of pregnancy; at least once between 26-32 weeks", "Dose typically needs to increase 25-50% due to rising TBG and metabolic demand."],
["Central hypothyroidism", "Free T4 (target upper-normal range); TSH not reliable", "Pituitary dysfunction makes TSH an invalid feedback marker."],
],
col_widths=[2.0, 2.6, 2.2]
)
add_note(
"Combination levothyroxine + liothyronine (T4+T3) has not shown consistent superiority over levothyroxine alone in trials, though a subset of patients report residual symptoms on T4 monotherapy.",
color=RGBColor(0x8A, 0x6D, 0x00), label="Note: "
)
add_heading("2.5 Subclinical Hypothyroidism - When to Treat", level=2)
add_bullet("Elevated TSH with normal free T4; occurs in ~4-10% of the general population (up to 20% in women over 50).")
add_bullet("Treatment decision is individualized based on: TSH magnitude (especially if > 10 mIU/L), symptoms, TPO antibody positivity, cardiovascular risk, and pregnancy status/pregnancy planning.")
doc.add_page_break()
# ===================== QUICK COMPARISON =====================
add_heading("3. Quick Comparison Summary", level=1)
add_table(
headers=["", "Hyperthyroidism", "Hypothyroidism"],
rows=[
["First-line drug", "Methimazole (PTU in 1st trimester/storm)", "Levothyroxine"],
["Adjunct for symptoms", "Beta-blocker (propranolol)", "N/A"],
["Definitive option", "Radioactive iodine or thyroidectomy", "None - lifelong replacement"],
["Key monitoring test", "TSH + free T4/T3 every 4-6 weeks initially", "TSH 6-8 weeks after dose change, then annually"],
["Major initiation risk", "Agranulocytosis, hepatotoxicity (thionamides)", "Cardiac strain if titrated too fast in elderly/cardiac patients"],
["Medical emergency", "Thyroid storm", "Myxedema crisis/coma"],
],
col_widths=[1.8, 3.0, 3.0],
header_fill="1A3C6E"
)
# ===================== RED FLAGS =====================
add_heading("4. Red Flags Requiring Urgent Attention", level=1)
add_bullet("Fever/sore throat on thionamide therapy -> check CBC for agranulocytosis.", bold_lead="Hyperthyroidism: ")
add_bullet("Altered mental status, fever, tachyarrhythmia in a thyrotoxic patient -> evaluate for thyroid storm.", bold_lead="Hyperthyroidism: ")
add_bullet("Hypothermia, bradycardia, altered mental status, history of hypothyroidism -> evaluate for myxedema crisis; treat empirically if suspected while confirming.", bold_lead="Hypothyroidism: ")
add_bullet("Chest pain or arrhythmia after starting/increasing levothyroxine in an elderly or cardiac patient -> reduce/hold dose and evaluate.", bold_lead="Hypothyroidism: ")
# Footer note
doc.add_paragraph()
footer = doc.add_paragraph()
footer.alignment = WD_ALIGN_PARAGRAPH.CENTER
run = footer.add_run("This reference is a condensed clinical summary for educational purposes and rapid recall. It is not a substitute for full prescribing information, institutional protocols, or individualized clinical judgment.")
run.italic = True
run.font.size = Pt(9)
run.font.color.rgb = RGBColor(0x66, 0x66, 0x66)
doc.save(OUT_PATH)
print(f"Saved to {OUT_PATH}")
cd /tmp/workspace/thyroid-mcq/docx && python3 generate_doc.py
ls -la /tmp/workspace/thyroid-mcq/docx/ && python3 -c " from docx import Document doc = Document('/tmp/workspace/thyroid-mcq/docx/Thyroid_Management_Clinical_Reference.docx') print('Paragraphs:', len(doc.paragraphs)) print('Tables:', len(doc.tables)) "
Thyroid Management Clinical Reference
Word Document · DOCX