Based on this file i will give some slides of diagnosis please give me notes for dmsf SGD
python3 -c " import pdfplumber with pdfplumber.open('/home/daytona/workspace/attachments/e4eee30c-d949-4a9c-9abe-83b65a10443f/General Pathology SGD (Guidelines and Evaluation Rubrics).pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): print(f'--- PAGE {i+1} ---') print(page.extract_text()) print() "
python3 -c " from pypdf import PdfReader import base64, os reader = PdfReader('/home/daytona/workspace/attachments/e4eee30c-d949-4a9c-9abe-83b65a10443f/General Pathology SGD (Guidelines and Evaluation Rubrics).pdf') print(f'Pages: {len(reader.pages)}') for i, page in enumerate(reader.pages): print(f'--- PAGE {i+1} text ---') print(repr(page.extract_text())) print(f'Images on page {i+1}: {len(page.images)}') for img in page.images: print(f' Image name: {img.name}, size: {len(img.data)} bytes') "
python3 -c " from pypdf import PdfReader import os reader = PdfReader('/home/daytona/workspace/attachments/e4eee30c-d949-4a9c-9abe-83b65a10443f/General Pathology SGD (Guidelines and Evaluation Rubrics).pdf') os.makedirs('/home/daytona/workspace/sgd_images', exist_ok=True) for i, page in enumerate(reader.pages): for img in page.images: path = f'/home/daytona/workspace/sgd_images/page{i+1}.jpg' with open(path, 'wb') as f: f.write(img.data) print(f'Saved: {path}') "
cd /home/daytona/workspace/sgd_images && python3 -m http.server 8765 & sleep 2 echo "Server started" curl -s -o /dev/null -w "%{http_code}" http://localhost:8765/page1.jpg
python3 -m http.server 8765 --directory /home/daytona/workspace/sgd_images & sleep 3 && echo "done"
python3 << 'EOF' import pytesseract from PIL import Image for i in range(1, 5): path = f'/home/daytona/workspace/sgd_images/page{i}.jpg' img = Image.open(path) text = pytesseract.image_to_string(img) print(f'=== PAGE {i} ===') print(text) print() EOF
Read the above file and give me short notes for my discussion must know concepts only
| Subtype | Genetics | Behavior |
|---|---|---|
| Well-differentiated | Amplification 12q13-q15 (includes MDM2) | Indolent; good prognosis if resectable |
| Myxoid | t(12;16) fusion gene | Intermediate |
| Pleomorphic | Complex karyotype | Aggressive; frequent metastasis |
| Disease | Key Micro Feature | Key Location | Key Marker/Test |
|---|---|---|---|
| Renal Osteodystrophy | Undermineralized osteoid + resorption | Generalized skeleton | ↑PTH, ↓vit D, ↓Ca²⁺ |
| Purulent Osteomyelitis | Neutrophils + sequestrum + involucrum | Metaphysis (children) | Staph aureus; culture |
| Paget Disease | Mosaic lamellar bone (cement lines) | Axial skeleton/femur | ↑Alk phosphatase |
| Osteochondroma | Hyaline cartilage cap + stalk continuity | Metaphysis near knee | EXT1/EXT2 mutations |
| Fibrous Dysplasia | Woven bone WITHOUT osteoblast rimming | Metaphysis | GNAS1 mutation |
| Giant Cell Tumor | Multinucleate GCs + oval mononuclear cells | Epiphysis (distal femur) | RANKL expression |
| Osteosarcoma | Malignant cells + osteoid | Metaphysis (near knee) | Codman triangle; RB, TP53 |
| Ewing Sarcoma | Small round blue cells + onion-skin | Diaphysis | t(11;22) EWSR1-FLI1 |
| Gout | Negatively birefringent needle crystals | 1st MTP joint | Serum uric acid >6.8 |
| Rheumatoid Arthritis | Pannus + lymphoplasmacytic infiltrate | Small joints (MCP/PIP) | RF, ACPA, HLA-DR4 |
| Osteoarthritis | Fibrillation + eburnation + osteophytes | Weight-bearing joints | No autoantibodies |
| Benign Fibrous Histiocytoma | Spindle cells + pseudoepitheliomatous hyperplasia | Dermis (legs) | Benign |
| Granular Cell Tumor | Eosinophilic granular cytoplasm | Tongue most common | S100+ |
| Fibrosarcoma (skin) | Herringbone pattern | Skin/subcutis | COL1A1-PDGFB t(17;22) |
| Rhabdomyosarcoma | Rhabdomyoblasts + cross-striations | Head/neck, GU tract | Myogenin IHC; PAX-FOXO1 |
| Liposarcoma | Lipoblasts + arborizing capillaries (myxoid) | Deep soft tissue/retro | MDM2 amplification (WD) |
| Leiomyosarcoma | Spindle cells in fascicles + cigar nuclei | Retroperitoneum/uterus | SMA, desmin positive |
SGD tip: For every slide, state: (1) the diagnosis, (2) one key gross/micro finding that confirmed it, (3) the etiology/pathogenesis in 2 sentences, and (4) one clinical feature or complication. That covers all rubric categories cleanly.
Give me very short notes for all in a word document
ls /home/daytona/workspace/skills/docx/scripts/office/ 2>/dev/null || ls /home/daytona/skills/docx/scripts/office/
mkdir -p /home/daytona/workspace/sgd-notes && cat > /home/daytona/workspace/sgd-notes/create_notes.js << 'JSEOF' const { Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell, HeadingLevel, AlignmentType, BorderStyle, WidthType, VerticalAlign, ShadingType, PageBreak } = require('docx'); const fs = require('fs'); const teal = "1A6B8A"; const lightTeal = "E8F4F8"; const darkBlue = "003366"; const orange = "C0392B"; function heading1(text) { return new Paragraph({ children: [new TextRun({ text, bold: true, size: 28, color: "FFFFFF", font: "Calibri" })], heading: HeadingLevel.HEADING_1, shading: { type: ShadingType.SOLID, color: teal, fill: teal }, spacing: { before: 200, after: 100 }, indent: { left: 100 } }); } function heading2(text) { return new Paragraph({ children: [new TextRun({ text, bold: true, size: 24, color: "FFFFFF", font: "Calibri" })], shading: { type: ShadingType.SOLID, color: "2E86AB", fill: "2E86AB" }, spacing: { before: 180, after: 80 }, indent: { left: 80 } }); } function sectionTitle(text) { return new Paragraph({ children: [new TextRun({ text, bold: true, size: 22, color: darkBlue, font: "Calibri" })], shading: { type: ShadingType.SOLID, color: lightTeal, fill: lightTeal }, spacing: { before: 140, after: 60 }, indent: { left: 60 } }); } function bullet(label, value) { return new Paragraph({ children: [ new TextRun({ text: label + ": ", bold: true, size: 18, color: "1A1A1A", font: "Calibri" }), new TextRun({ text: value, size: 18, color: "2C2C2C", font: "Calibri" }) ], bullet: { level: 0 }, spacing: { before: 40, after: 40 } }); } function subbullet(text) { return new Paragraph({ children: [new TextRun({ text, size: 17, color: "333333", font: "Calibri" })], bullet: { level: 1 }, spacing: { before: 20, after: 20 } }); } function spacer() { return new Paragraph({ children: [new TextRun({ text: "" })], spacing: { before: 60, after: 60 } }); } function keyBox(text) { return new Paragraph({ children: [new TextRun({ text: "🔑 KEY: " + text, bold: true, size: 18, color: orange, font: "Calibri" })], shading: { type: ShadingType.SOLID, color: "FFF3F3", fill: "FFF3F3" }, spacing: { before: 80, after: 80 }, indent: { left: 60 } }); } // --- COMPARISON TABLE --- function makeComparisonTable() { const headers = ["Disease", "Key Micro Feature", "Location", "Key Marker"]; const rows = [ ["Renal Osteodystrophy", "Unmineralized osteoid + resorption", "Generalized", "↑PTH, ↓vit D, ↓Ca²⁺"], ["Purulent Osteomyelitis", "Neutrophils + sequestrum + involucrum", "Metaphysis", "S. aureus culture"], ["Paget Disease", "Mosaic lamellar bone (cement lines)", "Axial/proximal femur", "↑Alk Phosphatase"], ["Osteochondroma", "Hyaline cartilage cap + stalk continuity", "Metaphysis near knee", "EXT1/EXT2 mutation"], ["Fibrous Dysplasia", "Woven bone WITHOUT osteoblast rimming", "Metaphysis", "GNAS1 mutation"], ["Giant Cell Tumor", "Multinucleate GCs + oval mononuclear cells", "EPIPHYSIS (distal femur)", "RANKL expression"], ["Osteosarcoma", "Malignant cells + osteoid production", "Metaphysis near knee", "Codman △; RB/TP53"], ["Ewing Sarcoma", "Small round blue cells + onion-skin", "DIAPHYSIS", "t(11;22) EWSR1-FLI1"], ["Gout", "Neg. birefringent needle crystals", "1st MTP joint", "Serum urate >6.8"], ["Rheumatoid Arthritis", "Pannus + lymphoplasmacytic infiltrate", "Small joints (MCP/PIP)", "RF, ACPA, HLA-DR4"], ["Osteoarthritis", "Fibrillation + eburnation + osteophytes", "Weight-bearing joints", "No autoantibodies"], ["Benign Fibrous Histiocytoma", "Spindle cells + pseudoepitheliomatous hyperplasia", "Dermis (legs)", "ALK/PKC fusion; benign"], ["Granular Cell Tumor", "Eosinophilic granular cytoplasm", "Tongue (most common)", "S100+"], ["Skin Fibrosarcoma", "Herringbone pattern", "Skin/subcutis", "COL1A1-PDGFB t(17;22)"], ["Rhabdomyosarcoma", "Rhabdomyoblasts + cross-striations", "Head/neck, GU tract", "Myogenin IHC; PAX-FOXO1"], ["Liposarcoma", "Lipoblasts + arborizing capillaries", "Deep soft tissue/retro", "MDM2 amplification (WD)"], ["Leiomyosarcoma", "Eosinophilic spindle cells in fascicles", "Retroperitoneum/uterus", "SMA, desmin+"], ]; const headerRow = new TableRow({ children: headers.map(h => new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: h, bold: true, size: 18, color: "FFFFFF", font: "Calibri" })], alignment: AlignmentType.CENTER })], shading: { type: ShadingType.SOLID, color: teal, fill: teal }, verticalAlign: VerticalAlign.CENTER })), tableHeader: true }); const dataRows = rows.map((row, i) => new TableRow({ children: row.map(cell => new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: cell, size: 17, font: "Calibri" })], })], shading: i % 2 === 0 ? { type: ShadingType.SOLID, color: "F0F8FF", fill: "F0F8FF" } : { type: ShadingType.SOLID, color: "FFFFFF", fill: "FFFFFF" }, verticalAlign: VerticalAlign.CENTER })) })); return new Table({ rows: [headerRow, ...dataRows], width: { size: 100, type: WidthType.PERCENTAGE }, }); } const children = [ // TITLE new Paragraph({ children: [new TextRun({ text: "GENERAL PATHOLOGY SGD NOTES", bold: true, size: 36, color: "FFFFFF", font: "Calibri" })], alignment: AlignmentType.CENTER, shading: { type: ShadingType.SOLID, color: "003366", fill: "003366" }, spacing: { before: 0, after: 200 } }), new Paragraph({ children: [new TextRun({ text: "Bone · Joint · Soft Tissue Tumors | DMSF SGD Quick Reference", size: 22, color: "FFFFFF", font: "Calibri", italics: true })], alignment: AlignmentType.CENTER, shading: { type: ShadingType.SOLID, color: "1A6B8A", fill: "1A6B8A" }, spacing: { before: 0, after: 300 } }), // ===================== SECTION 1: BONE DISEASES ===================== heading1("SECTION 1: BONE DISEASES"), // 1. RENAL OSTEODYSTROPHY heading2("SLIDE 190 — BONE: RENAL OSTEODYSTROPHY"), bullet("Etiology", "Chronic renal failure (CRF/ESRD)"), bullet("Pathogenesis", "Tubular acidosis → ↑RANKL → ↑osteoclast activity; ↓vit D → osteomalacia; ↓Ca²⁺ → 2° hyperparathyroidism → ↑PTH → bone resorption"), bullet("3 Types", ""), subbullet("High-turnover: ↑resorption > formation"), subbullet("Low-turnover (aplastic): adynamic bone, little osteoblast/osteoclast activity"), subbullet("Mixed pattern"), bullet("Morphology", "Undermineralized osteoid + subperiosteal resorption + growth retardation"), keyBox("Occurs in dialysis pts. ↑PTH, ↓Ca²⁺, ↓1,25(OH)₂ vit D"), spacer(), // 2. PURULENT OSTEOMYELITIS heading2("SLIDE 191 — PURULENT OSTEOMYELITIS"), bullet("Etiology", "S. aureus (most common); neonates: Group B Strep/E. coli; sickle cell: Salmonella"), bullet("Routes", "Hematogenous (children) > contiguous spread > direct implantation"), bullet("Pathogenesis", "Bacteria → neutrophils → bone necrosis (48h) → sequestrum (dead bone) + involucrum (reactive new bone)"), bullet("Morphology", "Acute: neutrophils + bone necrosis; Chronic: sequestrum + involucrum + sinus tracts"), keyBox("Sequestrum = dead cortical bone | Involucrum = reactive periosteal bone shell"), spacer(), // 3. PAGET DISEASE heading2("SLIDE 41 — PAGET DISEASE OF THE BONE"), bullet("Etiology", "SQSTM1 gene mutation → ↑NF-κB → ↑osteoclast activity; possible viral trigger (measles)"), bullet("3 Phases", ""), subbullet("1. Lytic: massive osteoclastic resorption (osteoclasts with 100+ nuclei)"), subbullet("2. Mixed: osteoclastic + osteoblastic"), subbullet("3. Sclerotic: osteoblastic; thick but weak bone"), bullet("Morphology", "MOSAIC pattern of lamellar bone (jigsaw puzzle cement lines) — PATHOGNOMONIC"), bullet("Clinical", "↑Alk phosphatase; bowing of limbs; lion face; chalk-stick fractures; rare → osteosarcoma"), keyBox("Mosaic/jigsaw cement lines = Paget | ↑ALP | Axial skeleton + proximal femur"), spacer(), // 4. OSTEOCHONDROMA heading2("SLIDE 253 — OSTEOCHONDROMA (NEW)"), bullet("Etiology", "Loss-of-function EXT1/EXT2 mutations → disrupted Indian Hedgehog signaling"), bullet("Morphology", "Cartilage-capped bony exostosis; hyaline cartilage cap + stalk cortex continuous with host bone cortex; metaphysis near knee; sessile or pedunculated"), bullet("Clinical", "Stops growing at growth plate closure; rare malignant transformation to chondrosarcoma"), keyBox("Cartilage cap + continuity of stalk with host bone cortex = Osteochondroma"), spacer(), // 5. FIBROUS DYSPLASIA heading2("SLIDE 173 — FIBROUS DYSPLASIA"), bullet("Etiology", "Somatic gain-of-function GNAS1 mutation → constitutively active Gs protein → ↑cAMP → blocked osteoblast differentiation"), bullet("Forms", "Monostotic | Polyostotic | McCune-Albright (polyostotic + café-au-lait + precocious puberty) | Mazabraud (+ soft tissue myxoma)"), bullet("Morphology", "Woven bone trabeculae WITHOUT osteoblastic rimming in fibrous stroma (Chinese letters pattern)"), bullet("Clinical", "Pain, fractures, bowing; monostotic stops at plate closure; rare sarcomatous transformation"), keyBox("Woven bone WITHOUT osteoblast rimming = Fibrous Dysplasia | GNAS1 mutation"), spacer(), // 6. GIANT CELL TUMOR heading2("SLIDE 193 — GIANT CELL TUMOR"), bullet("Etiology", "Neoplastic osteoblast precursors express ↑RANKL → drives osteoclast proliferation → uncontrolled bone resorption"), bullet("Morphology", "EPIPHYSIS of long bones (distal femur/proximal tibia); multinucleate osteoclast-type giant cells (100+ nuclei) + uniform oval mononuclear neoplastic cells; red-brown mass with cystic degeneration"), bullet("Clinical", "3rd–5th decade; locally aggressive benign tumor; 40-60% recur after curettage; 4% lung mets (remain benign); treat with denosumab (anti-RANKL)"), keyBox("EPIPHYSIS location is key! Multinucleate GCs + mononuclear stromal cells"), spacer(), // 7. OSTEOSARCOMA heading2("SLIDE 254 — OSTEOSARCOMA (NEW)"), bullet("Etiology", "Most common primary malignant bone tumor; bimodal age (<20 yrs + elderly with Paget/infarct/radiation)"), bullet("Genetics", "RB mutations (70%); TP53 mutations (Li-Fraumeni syndrome); MDM2/CDK4 amplification"), bullet("Morphology", "Metaphysis near knee; malignant cells producing osteoid/mineralized bone; Codman triangle (periosteal lifting); sunburst pattern on X-ray"), bullet("Clinical", "Painful mass; pathologic fracture; treated with neoadjuvant chemo + surgery"), keyBox("Malignant cells + OSTEOID production = Osteosarcoma | Codman triangle | Metaphysis"), spacer(), // 8. EWING SARCOMA heading2("SLIDE 92 — EWING'S TUMOR"), bullet("Etiology", "2nd most common bone sarcoma in children; 80% under 20 yrs"), bullet("Genetics", "t(11;22) → EWSR1-FLI1 fusion (>90%); chimeric protein dysregulates transcription"), bullet("Morphology", "DIAPHYSIS; onion-skin periosteal reaction; sheets of small round blue cells; clear glycogen-rich cytoplasm (PAS+); Homer-Wright rosettes; NO bone/cartilage production"), bullet("Clinical", "Painful warm diaphyseal mass; fever (mimics osteomyelitis)"), keyBox("DIAPHYSIS + onion-skin + small round blue cells + t(11;22) = Ewing Sarcoma"), spacer(), // ===================== SECTION 2: JOINT DISEASES ===================== heading1("SECTION 2: JOINT DISEASES"), // 9. GOUT heading2("SLIDE 13 — GOUT"), bullet("Etiology", "Hyperuricemia (urate >6.8 mg/dL); primary: ↓renal excretion (mostly); secondary: HGPRT deficiency (Lesch-Nyhan), tumor lysis syndrome, diuretics"), bullet("Pathogenesis", "Urate crystals → macrophage phagocytosis → inflammasome activation → caspase-1 → IL-1β → neutrophil recruitment → acute arthritis; chronic → tophi"), bullet("Morphology", "Negatively birefringent needle-shaped urate crystals (polarized light); neutrophils; tophi = urate aggregates + fibrous reaction"), bullet("Clinical", "Acute episodic arthritis (1st MTP – podagra); 4 stages; risk: male, alcohol, purine diet, diuretics"), keyBox("Negatively birefringent needle crystals = GOUT | IL-1β is the key mediator"), spacer(), // 10. RHEUMATOID ARTHRITIS heading2("SLIDE 196 — RHEUMATOID ARTHRITIS"), bullet("Etiology", "Autoimmune; CD4+ T cells react vs citrullinated peptides in joints"), bullet("Pathogenesis", "CD4+ T cells + macrophages → TNF, IL-1, IL-6 → protease activation → cartilage destruction; RANKL → bone resorption; IL-17 → neutrophils/monocytes"), bullet("Antibodies", "ACPA (anticitrullinated peptide Ab) in 70%; RF (IgM anti-IgG Fc) in 80%; HLA-DR4 association"), bullet("Morphology", "Pannus (proliferative inflammatory tissue invades and destroys cartilage/bone); dense lymphoplasmacytic infiltrate with germinal centers; rheumatoid nodules (fibrinoid necrosis core + palisading macrophages)"), bullet("Clinical", "Women 3x > men; symmetric small joint arthritis (MCP/PIP); morning stiffness >1hr; extra-articular: lung, heart, vasculitis"), keyBox("PANNUS = RA | ACPA + RF + HLA-DR4 | Symmetric small joints"), spacer(), // 11. OSTEOARTHRITIS heading2("SLIDE 200 — OSTEOARTHRITIS"), bullet("Etiology", "Primary (aging, idiopathic) or secondary (obesity, trauma, DM, deformity)"), bullet("Pathogenesis", "Biomechanical stress → chondrocyte injury → MMPs + IL-1/TNF → matrix degradation > repair → cartilage loss; subchondral bone remodeling; minimal synovial inflammation"), bullet("Morphology", "Fibrillation/erosion of articular cartilage; eburnation (polished exposed bone); osteophytes (bone spurs); subchondral cysts; loose bodies (joint mice)"), bullet("Clinical", "Most common joint disease; weight-bearing joints (knee, hip); DIP joints (Heberden nodes); pain with activity, relieved by rest; no systemic features; no autoantibodies"), keyBox("Eburnation + Osteophytes = OA | NO autoantibodies | Mechanical, not inflammatory"), spacer(), // ===================== SECTION 3: SOFT TISSUE TUMORS ===================== heading1("SECTION 3: SOFT TISSUE TUMORS"), // 12. BENIGN FIBROUS HISTIOCYTOMA heading2("SLIDE 266 — BENIGN FIBROUS HISTIOCYTOMA (Dermatofibroma)"), bullet("Etiology", "Uncertain; some trauma-related; ALK or PKC fusion genes in subset; composed of dermal dendritic cells"), bullet("Morphology", "Firm tan-brown papule <1cm in mid-dermis; spindle cells non-encapsulated; pseudoepitheliomatous hyperplasia of overlying epidermis with hyperpigmented rete ridges; storiform pattern"), bullet("Clinical", "Benign; indolent; legs of young/middle-aged women; rarely recurs"), keyBox("Pseudoepitheliomatous hyperplasia + spindle cells in dermis = Dermatofibroma"), spacer(), // 13. GRANULAR CELL TUMOR heading2("SLIDE 269 — GRANULAR CELL TUMOR (Abrikossoff Tumor)"), bullet("Etiology", "Schwann cell origin (neural); originally misnamed 'granular cell myoblastoma' by Abrikossoff"), bullet("Morphology", "Large cells with abundant eosinophilic granular cytoplasm (lysosomes); round-oval nuclei; overlying pseudoepitheliomatous hyperplasia (can mimic SCC!); S100+"), bullet("Clinical", "Usually benign; tongue most common; also skin, breast, respiratory tract; simple excision curative"), keyBox("Eosinophilic granular cytoplasm + S100+ + tongue = Granular Cell Tumor"), spacer(), // 14. SKIN FIBROSARCOMA heading2("SLIDE 22 — SKIN FIBROSARCOMA (Dermatofibrosarcoma Protuberans)"), bullet("Etiology", "Well-differentiated fibrosarcoma of skin; t(17;22) → COL1A1-PDGFB fusion → autocrine PDGF stimulation"), bullet("Morphology", "Spindle cells in HERRINGBONE (fascicular) pattern; storiform pattern in DFSP; moderate atypia; infiltrates subcutaneous fat in honeycomb pattern"), bullet("Clinical", "Slow-growing, locally aggressive; frequent recurrence; rarely metastasizes"), keyBox("HERRINGBONE pattern of spindle cells = Fibrosarcoma"), spacer(), // 15. RHABDOMYOSARCOMA heading2("SLIDE 23 — RHABDOMYOSARCOMA"), bullet("Etiology", "Malignant tumor with skeletal muscle differentiation; most common soft tissue sarcoma in children"), bullet("Subtypes", ""), subbullet("Embryonal (50%): <10 yrs; head/neck, GU tract; heterogeneous genetics"), subbullet("Alveolar (20%): t(2;13) PAX3-FOXO1 or t(1;13) PAX7-FOXO1; WORST prognosis; trunk/extremities"), subbullet("Pleomorphic (20%): adults; bizarre giant cells; need myogenin IHC"), subbullet("Botryoides variant: grape-like polypoid mass in hollow viscera (bladder/vagina)"), bullet("Morphology", "Rhabdomyoblasts with straplike eosinophilic cytoplasm + cross-striations (embryonal); alveolar clusters with fibrous septa (alveolar)"), keyBox("Cross-striations + rhabdomyoblasts = Rhabdomyosarcoma | PAX-FOXO1 alveolar"), spacer(), // 16. LIPOSARCOMA heading2("SLIDE 25 — LIPOSARCOMA"), bullet("Etiology", "Most common sarcoma of adulthood; adipocytic differentiation; deep soft tissues/retroperitoneum; 50-60 yrs"), bullet("3 Subtypes", ""), subbullet("Well-differentiated: MDM2 amplification (12q13-15); indolent; mature adipocytes + atypical stromal cells"), subbullet("Myxoid: t(12;16) fusion; intermediate; basophilic matrix + arborizing capillaries + lipoblasts"), subbullet("Pleomorphic: complex karyotype; aggressive; frequent mets"), bullet("Key feature", "LIPOBLAST = fat vacuoles scalloping the nucleus (diagnostic of liposarcoma)"), keyBox("LIPOBLAST = Liposarcoma | Myxoid: arborizing capillaries | MDM2 amplification (WD)"), spacer(), // 17. LEIOMYOSARCOMA heading2("SLIDE 101 — LEIOMYOSARCOMA (NEW)"), bullet("Etiology", "Malignant smooth muscle tumor; older adults; more common in women; retroperitoneum, deep extremities, uterus, IVC"), bullet("Morphology", "Interweaving fascicles of eosinophilic spindle cells with CIGAR-SHAPED (blunt-ended) nuclei; mitoses + necrosis common; IHC: SMA, desmin, caldesmon positive"), bullet("Clinical", "Superficial = small, good prognosis; Retroperitoneal = poor prognosis, metastasizes to lungs"), keyBox("Cigar-shaped nuclei + smooth muscle markers (SMA/desmin) = Leiomyosarcoma"), spacer(), // ===================== QUICK COMPARISON TABLE ===================== heading1("QUICK COMPARISON TABLE — ALL 17 DIAGNOSES"), spacer(), makeComparisonTable(), spacer(), // SGD TIP new Paragraph({ children: [ new TextRun({ text: "SGD APPROACH: ", bold: true, size: 20, color: "FFFFFF", font: "Calibri" }), new TextRun({ text: "For each slide state: (1) Diagnosis, (2) Key micro finding that confirms it, (3) Etiology/Pathogenesis in 2 sentences, (4) One clinical feature or complication.", size: 19, color: "FFFFFF", font: "Calibri" }) ], shading: { type: ShadingType.SOLID, color: "003366", fill: "003366" }, spacing: { before: 200, after: 200 }, indent: { left: 80 } }), ]; const doc = new Document({ styles: { paragraphStyles: [ { id: "Normal", name: "Normal", run: { font: "Calibri", size: 20 } } ] }, sections: [{ children }] }); Packer.toBuffer(doc).then(buf => { fs.writeFileSync("/home/daytona/workspace/sgd-notes/DMSF_SGD_Notes.docx", buf); console.log("Done!"); }); JSEOF echo "Script written"
cd /home/daytona/workspace/sgd-notes && node create_notes.js 2>&1
python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/sgd-notes/DMSF_SGD_Notes.docx 2>&1
# Quick check that the file exists and is a valid zip (docx) ls -lh /home/daytona/workspace/sgd-notes/DMSF_SGD_Notes.docx python3 -c " import zipfile z = zipfile.ZipFile('/home/daytona/workspace/sgd-notes/DMSF_SGD_Notes.docx') names = z.namelist() print('Valid ZIP/DOCX. Contents:', names[:8]) "
DMSF SGD Notes
Word Document · DOCX