Write 10 marks answer for glycogen storage disorder gor md pathology exam and make pdf
mkdir -p /tmp/workspace/gsd-exam && ls /tmp/workspace/gsd-exam/
cat << 'PYEOF' > /tmp/workspace/gsd-exam/generate_pdf.py import urllib.request from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.units import cm, mm from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable, Image from reportlab.platypus import KeepTogether from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY import io import os # Download images img_urls = { "diagram": "https://cdn.orris.care/cdss_images/8ec8667d3cee9c79a3b52cc700fb4eaa86376cc758cdbd69c488e754306fc9c0.png", "pompe": "https://cdn.orris.care/cdss_images/dbc2a361f5e97628a2f17b307d970f225a626ab56ab1c2ff7079f728688277c8.png", } img_paths = {} for key, url in img_urls.items(): path = f"/tmp/workspace/gsd-exam/{key}.png" try: urllib.request.urlretrieve(url, path) img_paths[key] = path print(f"Downloaded {key}") except Exception as e: print(f"Failed {key}: {e}") # PDF setup output_path = "/tmp/workspace/gsd-exam/Glycogen_Storage_Disorders_MD_Pathology.pdf" doc = SimpleDocTemplate( output_path, pagesize=A4, rightMargin=2*cm, leftMargin=2*cm, topMargin=2.5*cm, bottomMargin=2*cm, ) styles = getSampleStyleSheet() # Custom styles title_style = ParagraphStyle( "TitleStyle", parent=styles["Title"], fontSize=18, textColor=colors.HexColor("#1a3a5c"), spaceAfter=4, alignment=TA_CENTER, fontName="Helvetica-Bold", ) subtitle_style = ParagraphStyle( "SubtitleStyle", parent=styles["Normal"], fontSize=11, textColor=colors.HexColor("#555555"), spaceAfter=2, alignment=TA_CENTER, fontName="Helvetica", ) section_style = ParagraphStyle( "SectionStyle", parent=styles["Heading1"], fontSize=13, textColor=colors.white, spaceBefore=14, spaceAfter=6, fontName="Helvetica-Bold", leftIndent=0, backColor=colors.HexColor("#1a3a5c"), borderPad=5, ) subsection_style = ParagraphStyle( "SubsectionStyle", parent=styles["Heading2"], fontSize=11, textColor=colors.HexColor("#1a3a5c"), spaceBefore=8, spaceAfter=4, fontName="Helvetica-Bold", ) body_style = ParagraphStyle( "BodyStyle", parent=styles["Normal"], fontSize=10, leading=15, spaceAfter=5, alignment=TA_JUSTIFY, fontName="Helvetica", ) bullet_style = ParagraphStyle( "BulletStyle", parent=body_style, leftIndent=18, bulletIndent=6, spaceBefore=1, spaceAfter=2, ) caption_style = ParagraphStyle( "CaptionStyle", parent=styles["Normal"], fontSize=8.5, textColor=colors.HexColor("#555555"), alignment=TA_CENTER, fontName="Helvetica-Oblique", spaceAfter=6, ) ref_style = ParagraphStyle( "RefStyle", parent=styles["Normal"], fontSize=8, textColor=colors.HexColor("#777777"), alignment=TA_CENTER, fontName="Helvetica-Oblique", ) story = [] # Header box story.append(Spacer(1, 0.3*cm)) story.append(Paragraph("GLYCOGEN STORAGE DISORDERS", title_style)) story.append(Paragraph("(Glycogenoses)", subtitle_style)) story.append(Paragraph("MD Pathology Examination Answer | 10 Marks", subtitle_style)) story.append(HRFlowable(width="100%", thickness=2, color=colors.HexColor("#1a3a5c"), spaceAfter=8)) # SECTION 1: DEFINITION story.append(Paragraph("1. DEFINITION AND INTRODUCTION", section_style)) story.append(Paragraph( "Glycogen storage disorders (GSDs), also called <b>glycogenoses</b>, are a group of inherited metabolic " "diseases caused by deficiencies of enzymes involved in <b>glycogen synthesis or degradation</b>. " "These deficiencies lead to abnormal accumulation of glycogen (normal or abnormal in structure) " "predominantly in the liver, skeletal muscles, heart, and other organs.", body_style )) story.append(Paragraph( "They are transmitted as <b>autosomal recessive</b> traits (except Phosphoglycerate kinase deficiency " "which is X-linked). Over <b>12 types</b> have been described, designated by Roman numerals (Type I to XII+), " "based on specific enzyme deficiencies.", body_style )) # SECTION 2: PATHWAYS (simplified) story.append(Paragraph("2. NORMAL GLYCOGEN METABOLISM", section_style)) story.append(Paragraph( "Glycogen is the principal storage form of glucose. Metabolism involves:", body_style )) bullets = [ "<b>Glycogenesis:</b> Glucose-1-phosphate → UDP-glucose → Glycogen (via glycogen synthase + branching enzyme)", "<b>Glycogenolysis:</b> Glycogen → Glucose-1-phosphate (via phosphorylase + debranching enzyme)", "<b>Hepatic output:</b> Glucose-6-phosphate → Glucose (via glucose-6-phosphatase) → released into blood", "<b>Muscle energy:</b> Glycogen → Glucose → ATP via glycolysis", "<b>Lysosomal pathway:</b> Acid alpha-glucosidase (acid maltase) degrades cytoplasmic glycogen taken up by lysosomes", ] for b in bullets: story.append(Paragraph(f"• {b}", bullet_style)) # Diagram image if "diagram" in img_paths: story.append(Spacer(1, 0.3*cm)) im = Image(img_paths["diagram"], width=16*cm, height=8.5*cm) story.append(im) story.append(Paragraph( "Fig. 1: Glycogen metabolism in liver and skeletal muscle. Left: Normal. Right: Effects of enzyme deficiencies " "in hepatic type (top) and myopathic type (bottom). [Robbins & Cotran Pathologic Basis of Disease]", caption_style )) # SECTION 3: CLASSIFICATION story.append(Paragraph("3. CLASSIFICATION OF GLYCOGEN STORAGE DISEASES", section_style)) story.append(Paragraph( "Based on pathophysiology, glycogenoses are classified into three major groups:", body_style )) # Table table_data = [ [ Paragraph("<b>Category</b>", ParagraphStyle("th", parent=body_style, textColor=colors.white, fontName="Helvetica-Bold")), Paragraph("<b>Type (Eponym)</b>", ParagraphStyle("th", parent=body_style, textColor=colors.white, fontName="Helvetica-Bold")), Paragraph("<b>Enzyme Deficiency</b>", ParagraphStyle("th", parent=body_style, textColor=colors.white, fontName="Helvetica-Bold")), Paragraph("<b>Morphology</b>", ParagraphStyle("th", parent=body_style, textColor=colors.white, fontName="Helvetica-Bold")), Paragraph("<b>Clinical Features</b>", ParagraphStyle("th", parent=body_style, textColor=colors.white, fontName="Helvetica-Bold")), ], [ Paragraph("<b>Hepatic Type</b>", body_style), Paragraph("Type I — Von Gierke disease", body_style), Paragraph("Glucose-6-phosphatase", body_style), Paragraph("Hepatomegaly; intracellular glycogen + lipid; intranuclear glycogen; renomegaly", body_style), Paragraph("Failure to thrive; stunted growth; severe hypoglycemia (convulsions); hyperlipidemia; hyperuricemia; gout; xanthomas; bleeding (platelet dysfunction); late: hepatic adenomas", body_style), ], [ Paragraph("<b>Myopathic Type</b>", body_style), Paragraph("Type V — McArdle disease", body_style), Paragraph("Muscle phosphorylase", body_style), Paragraph("Skeletal muscle only; glycogen accumulation (predominantly subsarcolemmal location)", body_style), Paragraph("Painful cramps after strenuous exercise; myoglobinuria (50%); onset >20 yrs; failure of venous lactate rise after exercise; serum CK always elevated; normal longevity", body_style), ], [ Paragraph("<b>Generalized / Miscellaneous</b>", body_style), Paragraph("Type II — Pompe disease", body_style), Paragraph("Lysosomal acid alpha-glucosidase (acid maltase)", body_style), Paragraph("Mild hepatomegaly; ballooning of lysosomes → lacy cytoplasmic pattern; massive cardiomegaly; glycogen in sarcoplasm and membrane-bound; similar changes in skeletal muscle", body_style), Paragraph("Massive cardiomegaly; muscle hypotonia; cardiorespiratory failure within 2 years (infantile form); adult form: chronic myopathy only; enzyme replacement therapy (ERT) available", body_style), ], ] col_widths = [2.8*cm, 3.0*cm, 3.0*cm, 3.5*cm, 4.7*cm] tbl = Table(table_data, colWidths=col_widths, repeatRows=1) tbl.setStyle(TableStyle([ ("BACKGROUND", (0, 0), (-1, 0), colors.HexColor("#1a3a5c")), ("TEXTCOLOR", (0, 0), (-1, 0), colors.white), ("ROWBACKGROUNDS", (0, 1), (-1, -1), [colors.HexColor("#eaf1fb"), colors.white]), ("GRID", (0, 0), (-1, -1), 0.5, colors.HexColor("#aaaaaa")), ("VALIGN", (0, 0), (-1, -1), "TOP"), ("PADDING", (0, 0), (-1, -1), 5), ("FONTNAME", (0, 1), (-1, -1), "Helvetica"), ("FONTSIZE", (0, 1), (-1, -1), 8.5), ("LEADING", (0, 0), (-1, -1), 12), ])) story.append(tbl) story.append(Paragraph( "Table 1: Principal subgroups of glycogenoses (Modified from Table 5.7, Robbins Pathologic Basis of Disease)", caption_style )) # SECTION 4: DETAILED DISEASES story.append(Paragraph("4. IMPORTANT TYPES IN DETAIL", section_style)) story.append(Paragraph("A. Type I — Von Gierke Disease (Hepatorenal Glycogenosis)", subsection_style)) story.append(Paragraph( "<b>Gene/Chromosome:</b> G6PC gene (chromosome 17q21); autosomal recessive.", body_style )) story.append(Paragraph("<b>Pathophysiology:</b> Deficiency of <b>glucose-6-phosphatase</b> prevents conversion of G-6-P to glucose in the liver. " "Glycogen and lipid accumulate in hepatocytes. Blood glucose cannot be released from liver → severe fasting hypoglycemia.", body_style)) story.append(Paragraph("<b>Morphology:</b>", body_style)) for b in [ "Liver: massively enlarged with pale, glycogen-laden hepatocytes", "Intranuclear glycogen inclusions in hepatocytes", "Marked fatty change (lipid accumulation)", "Kidneys: enlarged due to tubular glycogen deposition", "PAS stain: hepatocytes strongly positive (glycogen)", ]: story.append(Paragraph(f"• {b}", bullet_style)) story.append(Paragraph("<b>Clinical Features:</b>", body_style)) for b in [ "Failure to thrive, short stature in children", "Hepatomegaly and renomegaly", "Severe fasting hypoglycemia → seizures", "Hyperlipidemia → eruptive xanthomas", "Hyperuricemia → gout", "Bleeding tendency (platelet dysfunction)", "Late complications: hepatic adenomas (risk of HCC)", ]: story.append(Paragraph(f"• {b}", bullet_style)) story.append(Paragraph("<b>Lab:</b> Hypoglycemia, lactic acidosis, hyperuricemia, hyperlipidemia. Glucagon/epinephrine fail to raise blood glucose (diagnostic test).", body_style)) story.append(Spacer(1, 0.3*cm)) story.append(Paragraph("B. Type II — Pompe Disease (Generalized Glycogenosis)", subsection_style)) story.append(Paragraph( "<b>Gene:</b> GAA gene; autosomal recessive. Enzyme: Lysosomal acid alpha-glucosidase (acid maltase).", body_style )) story.append(Paragraph( "<b>Pathophysiology:</b> Deficiency of <b>acid alpha-glucosidase</b> (lysosomal enzyme) → failure to digest lysosomal glycogen " "→ lysosomes balloon with glycogen in ALL organs. Heart is most severely affected.", body_style )) story.append(Paragraph("<b>Morphology:</b>", body_style)) for b in [ "Heart: massive cardiomegaly; cardiomyocytes filled with glycogen (sarcoplasm + membrane-bound) — lacy vacuolated pattern on H&E", "Skeletal muscle: vacuolar myopathy; glycogen within enlarged lysosomes", "Liver: mild hepatomegaly — ballooning of lysosomes → lacy cytoplasmic pattern", "Neurons: glycogen accumulation", "PAS stain positive; diastase-sensitive", ]: story.append(Paragraph(f"• {b}", bullet_style)) # Pompe histology image if "pompe" in img_paths: story.append(Spacer(1, 0.2*cm)) im2 = Image(img_paths["pompe"], width=14*cm, height=5.5*cm) story.append(im2) story.append(Paragraph( "Fig. 2: Pompe disease (GSD Type II). (A) Normal myocardium. (B) Pompe disease — myocardial fibers filled with " "glycogen appear as clear spaces. [Robbins & Cotran Pathologic Basis of Disease]", caption_style )) story.append(Paragraph("<b>Clinical Features:</b>", body_style)) for b in [ "Infantile form: massive cardiomegaly, generalized muscle hypotonia ('floppy infant'), macroglossia, cardiorespiratory failure → death within 2 years", "Adult form: slowly progressive skeletal muscle weakness (resembles limb-girdle muscular dystrophy), no cardiac involvement", "Treatment: Enzyme Replacement Therapy (ERT) with alglucosidase alfa (Myozyme) — approved", ]: story.append(Paragraph(f"• {b}", bullet_style)) story.append(Spacer(1, 0.3*cm)) story.append(Paragraph("C. Type V — McArdle Disease (Myophosphorylase Deficiency)", subsection_style)) story.append(Paragraph( "<b>Gene:</b> PYGM gene; autosomal recessive. Enzyme: <b>Muscle phosphorylase</b>.", body_style )) story.append(Paragraph( "<b>Pathophysiology:</b> Glycogen cannot be broken down in skeletal muscle during exercise → failure to generate ATP " "and lactate → muscle cramps and fatigue. No hypoglycemia (liver unaffected).", body_style )) story.append(Paragraph("<b>Morphology:</b>", body_style)) for b in [ "Skeletal muscle biopsy: glycogen accumulation predominantly in subsarcolemmal location", "PAS stain positive in affected fibers", "No branching/structural abnormality of glycogen", ]: story.append(Paragraph(f"• {b}", bullet_style)) story.append(Paragraph("<b>Clinical Features:</b>", body_style)) for b in [ "Onset in adulthood (>20 years)", "Painful muscle cramps and easy fatigue during strenuous exercise", "Myoglobinuria in ~50% of cases (after vigorous exercise) → risk of acute tubular necrosis", "Forearm ischemic exercise test: <b>venous lactate fails to rise</b> (diagnostic; ammonia rises normally)", "Serum creatine kinase (CK) always elevated", "Compatible with normal longevity", "'Second wind' phenomenon — symptoms ease after brief rest (rerouting to FFA metabolism)", ]: story.append(Paragraph(f"• {b}", bullet_style)) story.append(Spacer(1, 0.3*cm)) story.append(Paragraph("D. Other Notable Types", subsection_style)) sub_table_data = [ [ Paragraph("<b>Type</b>", ParagraphStyle("sth", parent=body_style, textColor=colors.white, fontName="Helvetica-Bold")), Paragraph("<b>Eponym</b>", ParagraphStyle("sth", parent=body_style, textColor=colors.white, fontName="Helvetica-Bold")), Paragraph("<b>Enzyme</b>", ParagraphStyle("sth", parent=body_style, textColor=colors.white, fontName="Helvetica-Bold")), Paragraph("<b>Key Feature</b>", ParagraphStyle("sth", parent=body_style, textColor=colors.white, fontName="Helvetica-Bold")), ], [Paragraph("III", body_style), Paragraph("Cori / Forbes disease", body_style), Paragraph("Debranching enzyme (amylo-1,6-glucosidase)", body_style), Paragraph("Hepatomegaly + myopathy; abnormal glycogen (short outer chains)", body_style)], [Paragraph("IV", body_style), Paragraph("Andersen disease", body_style), Paragraph("Branching enzyme", body_style), Paragraph("Hepatosplenomegaly; cirrhosis; abnormal (amylopectin-like) glycogen; fatal early", body_style)], [Paragraph("VI", body_style), Paragraph("Hers disease", body_style), Paragraph("Liver phosphorylase", body_style), Paragraph("Benign hepatomegaly; mild hypoglycemia; good prognosis", body_style)], [Paragraph("VII", body_style), Paragraph("Tarui disease", body_style), Paragraph("Phosphofructokinase (PFK)", body_style), Paragraph("Like McArdle but with hemolytic anemia; no response to glucose infusion", body_style)], [Paragraph("0", body_style), Paragraph("—", body_style), Paragraph("Glycogen synthase", body_style), Paragraph("Absence of glycogen stores; fasting hypoglycemia; post-prandial hyperglycemia", body_style)], ] sub_col_widths = [1.5*cm, 3.5*cm, 4.5*cm, 7.5*cm] sub_tbl = Table(sub_table_data, colWidths=sub_col_widths, repeatRows=1) sub_tbl.setStyle(TableStyle([ ("BACKGROUND", (0, 0), (-1, 0), colors.HexColor("#2e6da4")), ("TEXTCOLOR", (0, 0), (-1, 0), colors.white), ("ROWBACKGROUNDS", (0, 1), (-1, -1), [colors.HexColor("#f0f5fb"), colors.white]), ("GRID", (0, 0), (-1, -1), 0.5, colors.HexColor("#aaaaaa")), ("VALIGN", (0, 0), (-1, -1), "TOP"), ("PADDING", (0, 0), (-1, -1), 5), ("FONTNAME", (0, 1), (-1, -1), "Helvetica"), ("FONTSIZE", (0, 1), (-1, -1), 9), ("LEADING", (0, 0), (-1, -1), 12), ])) story.append(sub_tbl) # SECTION 5: DIAGNOSIS story.append(Paragraph("5. DIAGNOSIS", section_style)) story.append(Paragraph("<b>Biochemical:</b>", body_style)) for b in [ "Blood glucose, lactate, uric acid, CK, liver enzymes, lipid profile", "Forearm ischemic exercise test (McArdle: lactate does not rise; ammonia rises)", "Glucagon stimulation test (Type I: no glucose rise despite glycogenolysis)", ]: story.append(Paragraph(f"• {b}", bullet_style)) story.append(Paragraph("<b>Histopathology:</b>", body_style)) for b in [ "Liver/muscle biopsy: PAS stain (bright magenta) — positive in glycogen-laden cells; diastase-sensitive (confirms glycogen)", "Electron microscopy: abnormal glycogen particle morphology in certain types", "Enzyme assay in tissue (liver, muscle, fibroblasts, leukocytes) — definitive", ]: story.append(Paragraph(f"• {b}", bullet_style)) story.append(Paragraph("<b>Molecular:</b>", body_style)) for b in [ "DNA mutation analysis (confirmatory)", "Newborn screening for Pompe disease (acid alpha-glucosidase activity in dried blood spot)", ]: story.append(Paragraph(f"• {b}", bullet_style)) # SECTION 6: TREATMENT story.append(Paragraph("6. TREATMENT", section_style)) for b in [ "<b>Type I (Von Gierke):</b> Frequent feeds/cornstarch; avoid fasting; liver transplant for severe cases", "<b>Type II (Pompe):</b> Enzyme Replacement Therapy — Alglucosidase alfa (Myozyme); neonatal screening allows early ERT", "<b>Type V (McArdle):</b> Avoid strenuous exercise; sucrose before exercise; high-protein diet; no specific pharmacological cure", "<b>Types III, VI:</b> Dietary management (protein-rich diet); generally good prognosis", "<b>Gene therapy:</b> Under investigation for several types", ]: story.append(Paragraph(f"• {b}", bullet_style)) # SECTION 7: SUMMARY TABLE story.append(Paragraph("7. QUICK MEMORY AID", section_style)) memory_table = [ [Paragraph("<b>Mnemonic</b>", ParagraphStyle("mt", parent=body_style, textColor=colors.white, fontName="Helvetica-Bold")), Paragraph("<b>Key Point</b>", ParagraphStyle("mt", parent=body_style, textColor=colors.white, fontName="Helvetica-Bold"))], [Paragraph("Von Gierke → <b>G</b>lucose-6-phosphatase", body_style), Paragraph("Hepatorenal; severe hypoglycemia; liver + kidney enlarged", body_style)], [Paragraph("Pompe → <b>P</b>umps the heart", body_style), Paragraph("Cardiomegaly; lysosomal enzyme; all organs affected; ERT available", body_style)], [Paragraph("McArdle → <b>M</b>uscle cramps", body_style), Paragraph("No lactate rise after exercise; myoglobinuria; normal longevity", body_style)], [Paragraph("Andersen → <b>A</b>bnormal glycogen", body_style), Paragraph("Branching enzyme; amylopectin-like; cirrhosis; fatal", body_style)], [Paragraph("Cori/Forbes → <b>C</b>ore-debranching", body_style), Paragraph("Short outer chains; liver + muscle; moderate severity", body_style)], ] mem_tbl = Table(memory_table, colWidths=[8.5*cm, 8.5*cm], repeatRows=1) mem_tbl.setStyle(TableStyle([ ("BACKGROUND", (0, 0), (-1, 0), colors.HexColor("#c0392b")), ("TEXTCOLOR", (0, 0), (-1, 0), colors.white), ("ROWBACKGROUNDS", (0, 1), (-1, -1), [colors.HexColor("#fdf2f1"), colors.white]), ("GRID", (0, 0), (-1, -1), 0.5, colors.HexColor("#aaaaaa")), ("VALIGN", (0, 0), (-1, -1), "TOP"), ("PADDING", (0, 0), (-1, -1), 5), ("FONTSIZE", (0, 1), (-1, -1), 9), ("LEADING", (0, 0), (-1, -1), 12), ])) story.append(mem_tbl) # Footer story.append(Spacer(1, 0.5*cm)) story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor("#cccccc"))) story.append(Spacer(1, 0.2*cm)) story.append(Paragraph( "Sources: Robbins, Cotran & Kumar — Pathologic Basis of Disease (2023); Robbins & Kumar Basic Pathology; " "Goldman-Cecil Medicine; Henry's Clinical Diagnosis and Management by Laboratory Methods", ref_style )) doc.build(story) print(f"PDF saved to: {output_path}") PYEOF python3 /tmp/workspace/gsd-exam/generate_pdf.py
Glycogen Storage Disorders MD Pathology
PDF Document · PDF

| Category | Type / Eponym | Enzyme Deficiency | Key Features |
|---|---|---|---|
| Hepatic | Type I — Von Gierke | Glucose-6-phosphatase | Hepatomegaly, hypoglycemia, hyperlipidemia, hyperuricemia |
| Myopathic | Type V — McArdle | Muscle phosphorylase | Cramps on exercise, no lactate rise, myoglobinuria |
| Generalized | Type II — Pompe | Lysosomal acid alpha-glucosidase | Cardiomegaly, lacy lysosomes, all organs affected |

| Type | Eponym | Enzyme | Key Feature |
|---|---|---|---|
| III | Cori/Forbes | Debranching enzyme | Hepatomegaly + myopathy; short outer glycogen chains |
| IV | Andersen | Branching enzyme | Amylopectin-like glycogen; cirrhosis; fatal early |
| VI | Hers | Liver phosphorylase | Benign hepatomegaly; good prognosis |
| VII | Tarui | Phosphofructokinase | Like McArdle + hemolytic anemia |
| 0 | — | Glycogen synthase | No glycogen stores; fasting hypoglycemia |