Make it look like an college assignment not a pdf presentation. Add more relevant images. I want images below the text not on the sides
cd /home/daytona/workspace && python3 -c " import pdfplumber with pdfplumber.open('/home/daytona/workspace/attachments/2e7251d8-3bd5-4d73-8d3a-1491af037752/Atypical_Cardiomyopathy_Pediatrics_RaghulBalaji.pdf') as pdf: print(f'Pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): print(f'--- PAGE {i+1} ---') print(page.extract_text()) print() "
hypertrophic cardiomyopathy pediatric echocardiogram
dilated cardiomyopathy pediatric heart pathology
left ventricular non-compaction LVNC echocardiogram trabeculations
arrhythmogenic right ventricular cardiomyopathy ARVC cardiac MRI epsilon wave ECG
restrictive cardiomyopathy biatrial enlargement cardiac MRI
Takotsubo stress cardiomyopathy apical ballooning left ventricle
Pompe disease Fabry disease metabolic storage cardiomyopathy cardiac
/home/daytona/skills/docx
mkdir -p /home/daytona/workspace/cardiomyopathy-assignment/images && cd /home/daytona/workspace/cardiomyopathy-assignment/images && curl -sO "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_94d0d4c659ecda38390bba36342535f0c5d3d9d51c431a093333d40eb61dd304.jpg" && mv "pmc_clinical_VQA_94d0d4c659ecda38390bba36342535f0c5d3d9d51c431a093333d40eb61dd304.jpg" lvnc_echo.jpg && curl -sO "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_d65acbdb065967303a2a2b15238a47ac1ab3eb9106c3c61e87a6faacf2eac1b8.jpg" && mv "pmc_clinical_VQA_d65acbdb065967303a2a2b15238a47ac1ab3eb9106c3c61e87a6faacf2eac1b8.jpg" arvc_multi.jpg && curl -sO "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_330758af9dbf99f014efe99288408e401039e8a6d16bd59683cdf1cd20942740.jpg" && mv "pmc_clinical_VQA_330758af9dbf99f014efe99288408e401039e8a6d16bd59683cdf1cd20942740.jpg" arvc_ecg.jpg && curl -sO "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_c458fa17f94dfab0a78548f30fe68ca354ddd109d45a014176582dfea60f3489.jpg" && mv "pmc_clinical_VQA_c458fa17f94dfab0a78548f30fe68ca354ddd109d45a014176582dfea60f3489.jpg" rcm_echo_mri.jpg && curl -sO "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_c6021993840345b8856726d8526734bbd273e014a562a1a7c11bf144d093da75.jpg" && mv "pmc_clinical_VQA_c6021993840345b8856726d8526734bbd273e014a562a1a7c11bf144d093da75.jpg" takotsubo_echo.jpg && curl -sO "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_b4faaa492cc356544810045433998526118012e0a6266c817c11ec9da40dd9b4.jpg" && mv "pmc_clinical_VQA_b4faaa492cc356544810045433998526118012e0a6266c817c11ec9da40dd9b4.jpg" pompe_xray.jpg && curl -sO "https://cdn.orris.care/cdss_images/Pathology_1760051491928_b8622da6-9ed0-4e8d-8cf5-b8c4419666f6.jpg" && mv "Pathology_1760051491928_b8622da6-9ed0-4e8d-8cf5-b8c4419666f6.jpg" fabry_histology.jpg && ls -lh
mkdir -p /home/daytona/workspace/cardiomyopathy-assignment/images && cd /home/daytona/workspace/cardiomyopathy-assignment/images && curl -s "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_94d0d4c659ecda38390bba36342535f0c5d3d9d51c431a093333d40eb61dd304.jpg" -o lvnc_echo.jpg && curl -s "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_d65acbdb065967303a2a2b15238a47ac1ab3eb9106c3c61e87a6faacf2eac1b8.jpg" -o arvc_multi.jpg && curl -s "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_330758af9dbf99f014efe99288408e401039e8a6d16bd59683cdf1cd20942740.jpg" -o arvc_ecg.jpg && curl -s "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_c458fa17f94dfab0a78548f30fe68ca354ddd109d45a014176582dfea60f3489.jpg" -o rcm_echo_mri.jpg && curl -s "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_c6021993840345b8856726d8526734bbd273e014a562a1a7c11bf144d093da75.jpg" -o takotsubo_echo.jpg && curl -s "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_b4faaa492cc356544810045433998526118012e0a6266c817c11ec9da40dd9b4.jpg" -o pompe_xray.jpg && curl -s "https://cdn.orris.care/cdss_images/Pathology_1760051491928_b8622da6-9ed0-4e8d-8cf5-b8c4419666f6.jpg" -o fabry_histology.jpg && ls -lh
~/cardiomyopathy-assignment/create_assignment.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
ImageRun, AlignmentType, HeadingLevel, BorderStyle, WidthType,
ShadingType, VerticalAlign, PageNumber, Header, Footer,
TableOfContents, convertInchesToTwip
} = require('docx');
const fs = require('fs');
const path = require('path');
const imgDir = '/home/daytona/workspace/cardiomyopathy-assignment/images';
function loadImage(filename) {
return fs.readFileSync(path.join(imgDir, filename));
}
function heading1(text) {
return new Paragraph({
text,
heading: HeadingLevel.HEADING_1,
spacing: { before: 360, after: 120 },
border: {
bottom: { color: '2E4057', size: 8, space: 4, style: BorderStyle.SINGLE }
}
});
}
function heading2(text) {
return new Paragraph({
text,
heading: HeadingLevel.HEADING_2,
spacing: { before: 280, after: 80 }
});
}
function heading3(text) {
return new Paragraph({
text,
heading: HeadingLevel.HEADING_3,
spacing: { before: 200, after: 60 }
});
}
function bodyText(text, bold = false) {
return new Paragraph({
children: [new TextRun({ text, size: 24, bold, font: 'Times New Roman' })],
spacing: { after: 120, line: 360 },
indent: { left: 0 }
});
}
function bulletPoint(text, bold_part = '', rest = '') {
const runs = [];
if (bold_part) {
runs.push(new TextRun({ text: bold_part, bold: true, size: 24, font: 'Times New Roman' }));
runs.push(new TextRun({ text: rest, size: 24, font: 'Times New Roman' }));
} else {
runs.push(new TextRun({ text, size: 24, font: 'Times New Roman' }));
}
return new Paragraph({
children: runs,
bullet: { level: 0 },
spacing: { after: 80 }
});
}
function imgFigure(filename, caption, width = 400, height = 280) {
const data = loadImage(filename);
return [
new Paragraph({
children: [
new ImageRun({
data,
transformation: { width, height }
})
],
alignment: AlignmentType.CENTER,
spacing: { before: 160, after: 60 }
}),
new Paragraph({
children: [
new TextRun({ text: caption, italics: true, size: 20, color: '555555', font: 'Times New Roman' })
],
alignment: AlignmentType.CENTER,
spacing: { after: 200 }
})
];
}
function spacer() {
return new Paragraph({ text: '', spacing: { after: 60 } });
}
// ============================================================
// COVER PAGE
// ============================================================
const coverPage = [
new Paragraph({ text: '', spacing: { before: 600, after: 0 } }),
new Paragraph({
children: [new TextRun({ text: 'JALALABAD STATE UNIVERSITY', bold: true, size: 28, font: 'Times New Roman', allCaps: true })],
alignment: AlignmentType.CENTER,
spacing: { after: 80 }
}),
new Paragraph({
children: [new TextRun({ text: 'Faculty of Medicine — Named after B. Osmonova', size: 24, font: 'Times New Roman', italics: true })],
alignment: AlignmentType.CENTER,
spacing: { after: 600 }
}),
new Paragraph({
children: [new TextRun({ text: 'ATYPICAL FORMS OF CARDIOMYOPATHY', bold: true, size: 40, font: 'Times New Roman', allCaps: true, color: '2E4057' })],
alignment: AlignmentType.CENTER,
spacing: { after: 120 }
}),
new Paragraph({
children: [new TextRun({ text: 'in Children and Adolescents', bold: true, size: 30, font: 'Times New Roman', color: '2E4057' })],
alignment: AlignmentType.CENTER,
spacing: { after: 600 }
}),
new Paragraph({
children: [new TextRun({ text: 'Topic: Long-term monitoring and atypical forms of cardiomyopathy', size: 24, font: 'Times New Roman', italics: true })],
alignment: AlignmentType.CENTER,
spacing: { after: 600 }
}),
new Paragraph({ text: '', spacing: { after: 200 } }),
new Paragraph({
children: [new TextRun({ text: 'Done by: ', bold: true, size: 24, font: 'Times New Roman' }), new TextRun({ text: 'Raghul Balaji', size: 24, font: 'Times New Roman' })],
alignment: AlignmentType.CENTER,
spacing: { after: 80 }
}),
new Paragraph({
children: [new TextRun({ text: 'Year: ', bold: true, size: 24, font: 'Times New Roman' }), new TextRun({ text: '4th MBBS', size: 24, font: 'Times New Roman' })],
alignment: AlignmentType.CENTER,
spacing: { after: 80 }
}),
new Paragraph({
children: [new TextRun({ text: 'Group: ', bold: true, size: 24, font: 'Times New Roman' }), new TextRun({ text: '8th', size: 24, font: 'Times New Roman' })],
alignment: AlignmentType.CENTER,
spacing: { after: 80 }
}),
new Paragraph({
children: [new TextRun({ text: 'Institution: ', bold: true, size: 24, font: 'Times New Roman' }), new TextRun({ text: 'Jalalabad State University', size: 24, font: 'Times New Roman' })],
alignment: AlignmentType.CENTER,
spacing: { after: 80 }
}),
new Paragraph({ text: '', pageBreakBefore: true })
];
// ============================================================
// INTRODUCTION
// ============================================================
const introSection = [
heading1('Introduction'),
bodyText(
'Cardiomyopathies are myocardial diseases characterised by structural and functional abnormality in the absence of coronary artery disease, hypertension, or valvular disease. While dilated (DCM) and hypertrophic (HCM) forms are well-known, a significant subset in children falls into atypical forms — rare, heterogeneous, and often under-recognised. These represent a major cause of heart failure, sudden cardiac death (SCD), and cardiac transplantation in the young.'
),
bodyText(
'Modern tools — cardiac MRI (CMR), genetic panels, and advanced echocardiography — allow precise phenotyping and guide individualised management. This assignment covers six major atypical cardiomyopathy entities encountered in paediatric and adolescent practice:'
),
bulletPoint('Left Ventricular Non-Compaction (LVNC)'),
bulletPoint('Arrhythmogenic Cardiomyopathy (ACM / ARVC)'),
bulletPoint('Restrictive Cardiomyopathy (RCM)'),
bulletPoint('Takotsubo (Stress) Cardiomyopathy'),
bulletPoint('Myocarditis-related Cardiomyopathy'),
bulletPoint('Metabolic / Storage Cardiomyopathies'),
spacer()
];
// ============================================================
// SECTION 1: LVNC
// ============================================================
const lvncSection = [
heading1('1. Left Ventricular Non-Compaction (LVNC)'),
heading2('Pathophysiology'),
bodyText(
'LVNC results from an arrest of normal myocardial compaction between 5 and 8 weeks of gestation. This arrest leaves prominent trabeculations and deep intertrabecular recesses that communicate directly with the LV cavity, producing the characteristic sponge-like appearance. The consequence is a two-layered myocardium: an outer compact layer and an inner non-compacted layer.'
),
heading2('Genetics'),
bodyText(
'A genetic aetiology is identified in 30–50% of cases, and most index patients have an affected first-degree relative. Key causative genes include TAZ (responsible for Barth syndrome — X-linked), MYH7, MYBPC3, LDB3, and ACTC1. LVNC is also associated with Barth syndrome (LVNC + DCM + neutropenia), Danon disease, Noonan syndrome, and mitochondrial disorders.'
),
heading2('Clinical Presentation — Classic Triad'),
bulletPoint('Heart failure (systolic dysfunction, reduced EF)'),
bulletPoint('Ventricular arrhythmias (VT, VF, SCD risk)'),
bulletPoint('Thromboembolism (due to stasis in recesses)'),
heading2('Diagnosis'),
bodyText(
'Echocardiography is the first-line modality. A non-compacted to compacted (NC:C) ratio >2.0 in adults or >1.4 in the paediatric population supports the diagnosis. Cardiac MRI is the gold standard as it confirms the extent of non-compaction and detects late gadolinium enhancement (LGE), which indicates myocardial fibrosis and is a risk marker for adverse outcomes.'
),
spacer(),
...imgFigure('lvnc_echo.jpg', 'Figure 1. Transthoracic echocardiogram showing hallmark LVNC features: spongy apical myocardium with prominent trabeculations and deep intertrabecular recesses. Left panel — apical 4-chamber view; right panel — parasternal short-axis view. The non-compacted to compacted ratio exceeds 2.0.', 460, 300),
heading2('Management'),
bulletPoint('ACE inhibitors + beta-blockers + diuretics for heart failure'),
bulletPoint('Anticoagulation if EF < 35% or atrial fibrillation'),
bulletPoint('ICD for high-risk VT / syncope'),
bulletPoint('Cardiac transplantation for end-stage disease'),
heading2('Key Points'),
bulletPoint('Represents 1–7% of all paediatric cardiomyopathies; most common presentation is in infancy.'),
bulletPoint('', 'Barth syndrome = ', 'LVNC + DCM + neutropenia + 3-methylglutaconic aciduria (TAZ gene mutation, X-linked).'),
bulletPoint('CMR differentiates LVNC from HCM by the absence of marked LV hypertrophy and confirms LGE.'),
spacer()
];
// ============================================================
// SECTION 2: ARVC
// ============================================================
const arvcSection = [
heading1('2. Arrhythmogenic Cardiomyopathy (ACM / ARVC)'),
bodyText(
'ACM is a heritable cardiomyopathy characterised by fibrofatty replacement of the myocardium, predominantly affecting the right ventricle — though biventricular and LV-dominant forms exist. It is the leading cause of sudden cardiac death in young competitive athletes, accounting for up to 20% of sport-related deaths. Physical exercise accelerates disease progression by stressing defective desmosomes.'
),
heading2('Genetics'),
bodyText(
'Desmosomal mutations impair cell-to-cell adhesion, triggering apoptosis and fibrofatty remodelling. The most common mutation is PKP2 (~40% of cases), followed by DSP, DSG2, DSC2, and JUP. In the paediatric population, LV-dominant or biventricular forms are more common than in adults and carry a worse prognosis.'
),
heading2('Classic Triangle of Dysplasia (Areas of Predilection)'),
bulletPoint('Right ventricular outflow tract (RVOT)'),
bulletPoint('RV apex'),
bulletPoint('Subtricuspid area'),
heading2('Diagnosis — 2010 Revised Task Force Criteria'),
bodyText(
'A definite diagnosis requires: 2 major criteria; OR 1 major + 2 minor; OR 4 minor criteria from different categories.'
),
bulletPoint('', 'Structural (Major): ', 'RV regional akinesia/dyskinesia + RVEDV/BSA ≥110 (M) / 100 (F) mL/m² on CMR/echo'),
bulletPoint('', 'Tissue (Major): ', 'Fibrofatty replacement on biopsy (residual myocytes < 60%)'),
bulletPoint('', 'Repolarisation (Major): ', 'T-wave inversions V1–V4 in age > 14 years without complete RBBB'),
bulletPoint('', 'Depolarisation (Major): ', 'Epsilon wave in V1–V3'),
bulletPoint('', 'Arrhythmia (Major): ', 'Sustained / non-sustained VT with LBBB morphology, superior axis'),
bulletPoint('', 'Family (Major): ', 'First-degree relative with confirmed ACM or identified pathogenic mutation'),
spacer(),
...imgFigure('arvc_multi.jpg', 'Figure 2. Multi-modal ARVC findings. Panel A: ECG showing T-wave inversions V1–V5 and epsilon waves. Panel B: Cardiac MRI showing RV dilatation with thinned walls. Panel C: Macroscopic specimen demonstrating fibro-adipose RV replacement. Panels D–E: Histology confirming myocyte loss with adipocyte and fibrous tissue infiltration.', 480, 320),
spacer(),
...imgFigure('arvc_ecg.jpg', 'Figure 3. 12-lead ECG in ARVC. The blue arrow indicates a classic epsilon wave (low-amplitude notch at the end of QRS in V1), and deep T-wave inversions are visible in V1–V3. These are major diagnostic criteria under the 2010 Task Force.', 460, 280),
heading2('Management'),
bulletPoint('Mandatory sport restriction — the most important modifiable trigger for disease progression'),
bulletPoint('Beta-blockers; sotalol or amiodarone for arrhythmia suppression'),
bulletPoint('ICD mandatory in high-risk patients (SCD survivors, sustained VT, syncope, severe RV dysfunction)'),
bulletPoint('Catheter ablation for recurrent VT storms'),
bulletPoint('Cardiac transplantation for end-stage disease'),
heading2('Key Points'),
bulletPoint('', 'Epsilon wave ', '(low-amplitude signal after QRS in V1–V3) = pathognomonic ECG sign of ARVC.'),
bulletPoint('LBBB-morphology VT in a young athlete → suspect ARVC; screen all first-degree relatives.'),
bulletPoint('PKP2 is the most common mutation (~40%); exercise restriction is life-saving even pre-symptomatically.'),
spacer()
];
// ============================================================
// SECTION 3: RCM
// ============================================================
const rcmSection = [
heading1('3. Restrictive Cardiomyopathy (RCM)'),
heading2('Aetiology'),
bulletPoint('', 'Idiopathic ', '(most common in children; TNNI3, MYH7, ACTC1 mutations)'),
bulletPoint('', 'Infiltrative: ', 'amyloidosis, Gaucher disease, Fabry disease'),
bulletPoint('', 'Fibrotic: ', 'post-myocarditis, scleroderma'),
heading2('Pathophysiology'),
bodyText(
'Non-compliant, stiff ventricles lead to elevated filling pressures, which drive biatrial enlargement and eventually pulmonary venous and arterial hypertension. Systolic function is typically preserved until late-stage disease, making diastolic dysfunction the dominant haemodynamic abnormality.'
),
heading2('Clinical Presentation'),
bodyText(
'Children present with dyspnoea, exercise intolerance, hepatomegaly, and ascites. Atrial fibrillation and thromboembolism are common complications owing to markedly enlarged atria.'
),
heading2('Diagnosis'),
bulletPoint('Echo: biatrial enlargement + diastolic dysfunction Grade III/IV (E/A > 2, DT < 150 ms, E/e\' > 15)'),
bulletPoint('CMR ± late gadolinium enhancement'),
bulletPoint('Endomyocardial biopsy in selected cases to exclude infiltrative causes'),
spacer(),
...imgFigure('rcm_echo_mri.jpg', 'Figure 4. Multi-modal imaging in RCM. Panels A–B: Echocardiography showing severe biatrial enlargement with normal ventricular dimensions. Panel C: Colour Doppler confirming tricuspid regurgitation. Panel D: Mitral pulsed-wave Doppler with restrictive E/A ratio. Panels E–F: Cardiac MRI corroborating massive atrial dilatation and preserved ventricular wall thickness.', 480, 340),
heading2('Management & Prognosis'),
bodyText(
'Treatment is largely supportive: diuretics for congestion and anticoagulation for AF and thromboembolism risk. There is no disease-modifying therapy. RCM carries the worst prognosis of all paediatric cardiomyopathies, with a 5-year survival of approximately 50% without transplantation. Early listing for cardiac transplantation is therefore essential.'
),
heading2('Key Points'),
bulletPoint('Worst prognosis of all paediatric CMPs — early transplant listing is life-saving.'),
bulletPoint('Key differentiator: constrictive pericarditis (septal bounce, pericardial calcification on CT) vs RCM (E/e\' > 15, tissue Doppler abnormalities).'),
bulletPoint('Any child with unexplained biatrial enlargement + pulmonary hypertension → suspect RCM.'),
spacer()
];
// ============================================================
// SECTION 4 & 5: Takotsubo + Myocarditis
// ============================================================
const takoSection = [
heading1('4. Takotsubo (Stress) Cardiomyopathy'),
bodyText(
'Takotsubo cardiomyopathy (TTCM) is rare in children but well-documented. A stress-induced catecholamine surge causes transient apical LV ballooning with relative basal hypercontractility, mimicking anterior MI but with normal coronary arteries. Common paediatric triggers include emotional stress, seizures, subarachnoid haemorrhage, and pheochromocytoma.'
),
heading2('Diagnosis'),
bulletPoint('ECG: ST elevation or deep T-wave inversions'),
bulletPoint('Echo / ventriculography: apical ballooning with hypercontractile base'),
bulletPoint('Normal coronary angiography (no obstructive CAD)'),
spacer(),
...imgFigure('takotsubo_echo.jpg', 'Figure 5. Apical 4-chamber echocardiogram demonstrating the classic Takotsubo pattern: a dilated, akinetic LV apex (blue arrows) contrasted against a more narrow, relatively preserved basal segment. This characteristic "octopus pot" morphology is transient and typically resolves within 4–8 weeks.', 440, 300),
heading2('Management'),
bodyText(
'Management is supportive — beta-blockers and ACE inhibitors for haemodynamic support. The condition is generally self-limiting and reversible within 4–8 weeks, with an excellent prognosis compared to other cardiomyopathies.'
),
spacer(),
heading1('5. Myocarditis-related Cardiomyopathy'),
bodyText(
'Viral myocarditis is a leading trigger for acquired cardiomyopathy in children. Common pathogens include Coxsackie B virus, adenovirus, parvovirus B19, and SARS-CoV-2 / MIS-C. In the acute phase, the phenotype mimics DCM with systolic dysfunction. In chronic disease, ongoing fibrosis can produce an ACM phenocopy.'
),
heading2('Diagnosis'),
bulletPoint('CMR: T2 elevation (oedema) + mid-wall LGE (fibrosis)'),
bulletPoint('Endomyocardial biopsy: Dallas criteria (inflammatory infiltrate + myocyte necrosis)'),
heading2('Management'),
bulletPoint('IVIG in fulminant myocarditis'),
bulletPoint('Immunosuppression (corticosteroids ± azathioprine) in chronic biopsy-proven myocarditis'),
bulletPoint('Standard heart failure therapy (ACEi, beta-blockers, diuretics)'),
spacer()
];
// ============================================================
// SECTION 6: METABOLIC
// ============================================================
const metabolicSection = [
heading1('6. Metabolic and Storage Cardiomyopathies'),
bodyText(
'Metabolic cardiomyopathies arise from inherited enzyme deficiencies, lysosomal storage disorders, or mitochondrial dysfunction. Multi-system involvement is the key clinical clue — cardiac findings alongside neurological, skeletal, renal, or haematological features should prompt targeted enzyme assays and genetic testing.'
),
heading2('Common Disorders'),
spacer()
];
// Table for metabolic CMPs
const metabolicTable = new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
rows: [
new TableRow({
tableHeader: true,
children: [
new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: 'Disorder', bold: true, size: 22, font: 'Times New Roman' })] })], shading: { fill: '2E4057', type: ShadingType.CLEAR, color: 'FFFFFF' } }),
new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: 'Gene', bold: true, size: 22, font: 'Times New Roman', color: 'FFFFFF' })] })], shading: { fill: '2E4057', type: ShadingType.CLEAR } }),
new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: 'CMP Phenotype', bold: true, size: 22, font: 'Times New Roman', color: 'FFFFFF' })] })], shading: { fill: '2E4057', type: ShadingType.CLEAR } }),
new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: 'Key Feature', bold: true, size: 22, font: 'Times New Roman', color: 'FFFFFF' })] })], shading: { fill: '2E4057', type: ShadingType.CLEAR } }),
new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: 'Treatment', bold: true, size: 22, font: 'Times New Roman', color: 'FFFFFF' })] })], shading: { fill: '2E4057', type: ShadingType.CLEAR } }),
]
}),
...[
['Pompe (GSD II)', 'GAA', 'HCM-like', 'Hypotonia, absent acid α-glucosidase', 'ERT (alglucosidase alfa)'],
['Fabry disease', 'GLA (X-linked)', 'HCM', 'Renal, neuro, skin, corneal whorls', 'ERT (agalsidase)'],
['Barth syndrome', 'TAZ (X-linked)', 'DCM + LVNC', 'Neutropenia, 3-MGA, myopathy', 'Supportive; ERT trials'],
['Danon disease', 'LAMP2 (X-linked)', 'HCM', 'Cognitive impairment, WPW, retinopathy', 'Transplant; gene therapy'],
['Mitochondrial CMP', 'mtDNA / nuclear', 'HCM or DCM', 'Multi-system, lactic acidosis', 'Supportive + cofactors'],
].map((row, i) => new TableRow({
children: row.map(cell => new TableCell({
children: [new Paragraph({ children: [new TextRun({ text: cell, size: 20, font: 'Times New Roman' })] })],
shading: i % 2 === 0 ? { fill: 'EEF2F5', type: ShadingType.CLEAR } : { fill: 'FFFFFF', type: ShadingType.CLEAR }
}))
}))
]
});
const metabolicSectionAfterTable = [
spacer(),
...imgFigure('pompe_xray.jpg', 'Figure 6. Chest X-ray of a neonate with infantile-onset Pompe disease (GSD II). Marked cardiomegaly is evident, with the cardiac silhouette occupying the majority of the thoracic cavity. This is a classic presentation of the HCM-like phenotype seen in GAA enzyme deficiency.', 420, 300),
spacer(),
...imgFigure('fabry_histology.jpg', 'Figure 7. Light microscopy of cardiac tissue in Fabry disease (H&E stain). Cardiomyocytes show pronounced cytoplasmic vacuolisation owing to lysosomal accumulation of globotriaosylceramide (Gb3), a consequence of α-galactosidase A (GLA gene) deficiency. These changes underlie the HCM phenotype in Fabry disease.', 420, 320),
];
// ============================================================
// SUMMARY TABLE
// ============================================================
const summarySection = [
heading1('Comparative Summary'),
bodyText('The table below consolidates the key differentiating features across all atypical cardiomyopathy subtypes discussed in this assignment.'),
spacer()
];
const summaryTable = new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
rows: [
new TableRow({
tableHeader: true,
children: ['Type', 'Key Genetics', 'Hallmark Imaging', 'ECG Sign', 'Prognosis'].map(h =>
new TableCell({
children: [new Paragraph({ children: [new TextRun({ text: h, bold: true, size: 22, font: 'Times New Roman', color: 'FFFFFF' })] })],
shading: { fill: '2E4057', type: ShadingType.CLEAR }
})
)
}),
...[
['LVNC', 'TAZ, MYH7', 'Echo NC:C > 2 / CMR', 'LVH, WPW', 'Variable'],
['ACM / ARVC', 'PKP2, DSP', 'CMR: fatty RV wall', 'Epsilon wave, LBBB-VT', 'SCD risk ↑'],
['RCM', 'TNNI3, MYH7', 'Biatrial enlargement', 'AF, CHB', 'Worst'],
['Takotsubo', 'None', 'Apical ballooning', 'ST elevation', 'Good (reversible)'],
['Myocarditis-related', 'None', 'CMR T2↑ + mid-wall LGE', 'Variable', 'Depends on severity'],
['Metabolic CMPs', 'Various', 'HCM or DCM pattern', 'Variable / WPW', 'Disease-dependent'],
].map((row, i) => new TableRow({
children: row.map(cell => new TableCell({
children: [new Paragraph({ children: [new TextRun({ text: cell, size: 20, font: 'Times New Roman' })] })],
shading: i % 2 === 0 ? { fill: 'EEF2F5', type: ShadingType.CLEAR } : { fill: 'FFFFFF', type: ShadingType.CLEAR }
}))
}))
]
});
// ============================================================
// CONCLUSION
// ============================================================
const conclusionSection = [
spacer(),
heading1('Conclusion'),
bodyText(
'Atypical cardiomyopathies in children are clinically heterogeneous but share a need for early diagnosis, genetic workup, and family screening. LVNC and ARVC demand vigilance for SCD risk; RCM requires prompt transplant listing; Takotsubo is generally reversible; and metabolic CMPs benefit from targeted enzyme replacement therapy. Cardiac MRI, genetic panels, and multidisciplinary care are the cornerstones of modern paediatric cardiomyopathy management.'
),
spacer(),
heading2('High-Yield Summary for Examinations'),
bulletPoint('', 'LVNC: ', 'NC:C > 2 on echo | Barth syndrome (TAZ) = LVNC + DCM + neutropenia'),
bulletPoint('', 'ARVC: ', 'Epsilon wave + LBBB-VT in young athlete | PKP2 most common | restrict sport'),
bulletPoint('', 'RCM: ', 'Worst prognosis | biatrial enlargement + preserved LVEF | early transplant listing'),
bulletPoint('', 'Takotsubo: ', 'Stress-triggered, apical ballooning, reversible — Rx supportive'),
bulletPoint('', 'Metabolic: ', 'Pompe = GAA, Fabry = GLA, Barth = TAZ, Danon = LAMP2 — multisystem clues'),
spacer()
];
// ============================================================
// REFERENCES
// ============================================================
const refSection = [
heading1('References'),
new Paragraph({
children: [new TextRun({ text: '1.', bold: true, size: 22, font: 'Times New Roman' }), new TextRun({ text: ' Arbustini E, et al. Classification of cardiomyopathies: a position statement from the ESC Working Group on Myocardial and Pericardial Diseases. ', size: 22, font: 'Times New Roman' }), new TextRun({ text: 'Eur Heart J.', size: 22, font: 'Times New Roman', italics: true }), new TextRun({ text: ' 2013;34(18):1336–1345.', size: 22, font: 'Times New Roman' })],
spacing: { after: 80 }
}),
new Paragraph({
children: [new TextRun({ text: '2.', bold: true, size: 22, font: 'Times New Roman' }), new TextRun({ text: ' Marcus FI, et al. Diagnosis of arrhythmogenic right ventricular cardiomyopathy/dysplasia: proposed modification of the Task Force Criteria. ', size: 22, font: 'Times New Roman' }), new TextRun({ text: 'Eur Heart J.', size: 22, font: 'Times New Roman', italics: true }), new TextRun({ text: ' 2010;31(7):806–814.', size: 22, font: 'Times New Roman' })],
spacing: { after: 80 }
}),
new Paragraph({
children: [new TextRun({ text: '3.', bold: true, size: 22, font: 'Times New Roman' }), new TextRun({ text: ' Towbin JA, et al. Incidence, causes, and outcomes of dilated cardiomyopathy in children. ', size: 22, font: 'Times New Roman' }), new TextRun({ text: 'JAMA.', size: 22, font: 'Times New Roman', italics: true }), new TextRun({ text: ' 2006;296(15):1867–1876.', size: 22, font: 'Times New Roman' })],
spacing: { after: 80 }
}),
new Paragraph({
children: [new TextRun({ text: '4.', bold: true, size: 22, font: 'Times New Roman' }), new TextRun({ text: ' Lipshultz SE, et al. The incidence of pediatric cardiomyopathy in two regions of the United States. ', size: 22, font: 'Times New Roman' }), new TextRun({ text: 'N Engl J Med.', size: 22, font: 'Times New Roman', italics: true }), new TextRun({ text: ' 2003;348(17):1647–1655.', size: 22, font: 'Times New Roman' })],
spacing: { after: 80 }
}),
new Paragraph({
children: [new TextRun({ text: '5.', bold: true, size: 22, font: 'Times New Roman' }), new TextRun({ text: ' Corrado D, et al. Arrhythmogenic right ventricular cardiomyopathy. ', size: 22, font: 'Times New Roman' }), new TextRun({ text: 'Nat Rev Dis Primers.', size: 22, font: 'Times New Roman', italics: true }), new TextRun({ text: ' 2017;3:17042.', size: 22, font: 'Times New Roman' })],
spacing: { after: 80 }
}),
];
// ============================================================
// ASSEMBLE DOCUMENT
// ============================================================
const doc = new Document({
creator: 'Raghul Balaji',
title: 'Atypical Forms of Cardiomyopathy in Children and Adolescents',
description: '4th MBBS Assignment — Jalalabad State University',
styles: {
default: {
document: {
run: { font: 'Times New Roman', size: 24 }
},
heading1: {
run: { font: 'Times New Roman', bold: true, size: 32, color: '2E4057' },
paragraph: { spacing: { before: 400, after: 160 } }
},
heading2: {
run: { font: 'Times New Roman', bold: true, size: 26, color: '3B5998' },
paragraph: { spacing: { before: 280, after: 80 } }
},
heading3: {
run: { font: 'Times New Roman', bold: true, size: 24, color: '555555' },
paragraph: { spacing: { before: 200, after: 60 } }
}
}
},
sections: [
{
properties: {
page: {
margin: {
top: convertInchesToTwip(1),
right: convertInchesToTwip(1.25),
bottom: convertInchesToTwip(1),
left: convertInchesToTwip(1.25)
}
}
},
headers: {
default: new Header({
children: [
new Paragraph({
children: [
new TextRun({ text: 'Atypical Cardiomyopathies in Children & Adolescents', size: 18, font: 'Times New Roman', italics: true, color: '888888' }),
new TextRun({ text: ' | Raghul Balaji | 4th MBBS | Group 8', size: 18, font: 'Times New Roman', color: '888888' })
],
alignment: AlignmentType.RIGHT
})
]
})
},
footers: {
default: new Footer({
children: [
new Paragraph({
children: [
new TextRun({ text: 'Jalalabad State University — Faculty of Medicine ', size: 18, font: 'Times New Roman', color: '888888' }),
new TextRun({ children: [PageNumber.CURRENT], size: 18, font: 'Times New Roman', color: '888888' }),
new TextRun({ text: ' / ', size: 18, font: 'Times New Roman', color: '888888' }),
new TextRun({ children: [PageNumber.TOTAL_PAGES], size: 18, font: 'Times New Roman', color: '888888' })
],
alignment: AlignmentType.CENTER
})
]
})
},
children: [
...coverPage,
...introSection,
...lvncSection,
...arvcSection,
...rcmSection,
...takoSection,
...metabolicSection,
metabolicTable,
...metabolicSectionAfterTable,
...summarySection,
summaryTable,
...conclusionSection,
...refSection
]
}
]
});
Packer.toBuffer(doc).then(buffer => {
fs.writeFileSync('/home/daytona/workspace/cardiomyopathy-assignment/Atypical_Cardiomyopathy_Pediatrics_RaghulBalaji.docx', buffer);
console.log('Document created successfully!');
}).catch(err => {
console.error('Error:', err);
process.exit(1);
});
cd /home/daytona/workspace/cardiomyopathy-assignment && node create_assignment.js
python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/cardiomyopathy-assignment/Atypical_Cardiomyopathy_Pediatrics_RaghulBalaji.docx && ls -lh /home/daytona/workspace/cardiomyopathy-assignment/Atypical_Cardiomyopathy_Pediatrics_RaghulBalaji.docx
python3 -c " import zipfile, os path = '/home/daytona/workspace/cardiomyopathy-assignment/Atypical_Cardiomyopathy_Pediatrics_RaghulBalaji.docx' size = os.path.getsize(path) print(f'File size: {size/1024:.1f} KB') with zipfile.ZipFile(path, 'r') as z: files = z.namelist() print('Contents:', files[:10]) # Quick check document.xml exists and has content with z.open('word/document.xml') as f: content = f.read() print(f'document.xml size: {len(content)} bytes') # Check for image references img_count = content.count(b'<a:blip') print(f'Image references: {img_count}') print('File appears valid.') "
How do they perform usg/ ct biopsy
ultrasound CT guided percutaneous biopsy procedure technique steps
ultrasound guided core needle biopsy technique probe needle
| Feature | Fine Needle Aspiration (FNA) | Core Needle Biopsy |
|---|---|---|
| Needle gauge | 20–25 G (small) | 14–19 G (large) |
| Sample type | Cells → cytology | Tissue cylinder → histology |
| Advantage | Can transgress bowel or cross vascular structures safely | Preserves architecture; allows immunohistochemistry & receptor testing |
| Use | Superficial lesions, near critical vessels | Most tumour diagnoses, cancer staging |


| Feature | USG | CT |
|---|---|---|
| Real-time guidance | Yes (continuous) | No (intermittent) / CT fluoroscopy = near real-time |
| Radiation | None | Yes |
| Best targets | Soft tissue, liver, thyroid, breast, kidney, LN | Lung, bone, retroperitoneum, deep/obscured structures |
| Speed | ~15–30 min | ~45–60 min |
| Limitations | Poor through bone/gas | Radiation; no true real-time |
| Coaxial technique | Occasionally | Routinely (lung) |
How it is different from surgical biopsy
| Type | What is done | When used |
|---|---|---|
| Incisional biopsy | A portion of the lesion is cut out (lesion left in place) | Large tumours (> 5 cm) where a needle cannot give enough tissue |
| Excisional biopsy | The entire lesion is removed with a margin of normal tissue | Small, superficial lesions (< 5 cm); done with curative intent |
| Feature | Image-Guided Biopsy (USG/CT) | Surgical (Open) Biopsy |
|---|---|---|
| Approach | Percutaneous — needle through intact skin | Open incision into skin, dissection to the lesion |
| Anaesthesia | Local ± sedation | Regional or general anaesthesia usually required |
| Setting | Radiology suite / day case | Operating theatre |
| Size of sample | Small core (14–19 G) or cells (FNA) | Large — can remove the entire lesion |
| Tissue architecture | Core biopsy preserves architecture; FNA does not | Fully preserved — best for lymphoma, complex lesions |
| Sampling error | Yes — 19–44% of atypical ductal hyperplasia on core are actually carcinoma on excision | Minimal with excisional biopsy; entire lesion in the pot |
| Diagnostic accuracy | ~95–99% for accessible, well-targeted lesions | Near 100% with excision |
| Complication rate | < 1% (bleeding, infection, pneumothorax for lung) | Higher — bleeding, wound infection, anaesthesia risks, scarring |
| Morbidity | Very low | Significant — operative recovery needed |
| Cost | Much lower | Much higher (OR time, GA, admission) |
| Time | 15–60 min, usually same day | Hours (procedure + recovery); often inpatient |
| Tumour seeding risk | Low; sheathed needle + planned tract excision at definitive surgery | Higher if incision improperly placed or extensive dissection done |
| Repeat sampling | Easy to repeat | Re-operation is more morbid |
| Immunohistochemistry / molecular testing | Usually adequate with core biopsy | Always adequate |
| Lymphoma diagnosis | Inadequate — cannot assess nodal architecture | Entire node needed → open excision mandatory |
Core needle biopsy samples only a tiny sliver of tissue. If that sliver is not representative (e.g. it samples the necrotic centre, a reactive area, or misses a small focus of malignancy), the result is false negative. This is especially relevant in:
- Atypical ductal hyperplasia of the breast (19–44% upgraded to carcinoma on excision)
- Heterogeneous tumours
- Very small lesions
Okay I need this type of format by mentioning time Patient name,age,BP,diagnosis,patient Complaint,clinical Findings and treatment Plan.The name should be the names if kyrgyz people because I'm studying mbbs in Kyrgyzstan.Then my posting is under ENT department ,so give me situations according to that