Provide me appropriate images to fit in the empty space left for images

Reading File
Reading File
Reading File
Running Command

cd /home/daytona/workspace && python -m markitdown /home/daytona/workspace/attachments/ec0391c7-2ad0-4264-88c8-3c354c03865c/Atypical_Cardiomyopathy_Pediatrics.pptx 2>&1

Running Command

cd /home/daytona/skills/pptx && python scripts/office/unpack.py /home/daytona/workspace/attachments/ec0391c7-2ad0-4264-88c8-3c354c03865c/Atypical_Cardiomyopathy_Pediatrics.pptx /home/daytona/workspace/atypical_cm_unpacked/ 2>&1

Running Command

mkdir -p /home/daytona/workspace/atypical_cm_unpacked && cd /home/daytona/workspace/atypical_cm_unpacked && unzip -o /home/daytona/workspace/attachments/ec0391c7-2ad0-4264-88c8-3c354c03865c/Atypical_Cardiomyopathy_Pediatrics.pptx -d . 2>&1 | head -50

Running Command

ls /home/daytona/workspace/atypical_cm_unpacked/ppt/slides/ 2>&1

Running Command

ls /home/daytona/workspace/atypical_cm_unpacked/ && ls /home/daytona/workspace/atypical_cm_unpacked/ppt/ 2>&1

Running Command

mkdir -p /home/daytona/workspace/cm_slides && cp /home/daytona/workspace/attachments/ec0391c7-2ad0-4264-88c8-3c354c03865c/Atypical_Cardiomyopathy_Pediatrics.pptx /home/daytona/workspace/cm_slides/ && cd /home/daytona/workspace/cm_slides && python3 -c " import zipfile, os with zipfile.ZipFile('Atypical_Cardiomyopathy_Pediatrics.pptx', 'r') as z: names = z.namelist() print('\n'.join(n for n in names if 'slide' in n.lower() and not 'Layout' in n and not 'Master' in n)) " 2>&1

Running Command

cd /home/daytona/workspace/cm_slides && python3 -c " import zipfile, re with zipfile.ZipFile('Atypical_Cardiomyopathy_Pediatrics.pptx', 'r') as z: for i in range(1, 6): print(f'\n=== SLIDE {i} ===') with z.open(f'ppt/slides/slide{i}.xml') as f: xml = f.read().decode('utf-8') # Extract all text texts = re.findall(r'<a:t>([^<]+)</a:t>', xml) for t in texts: print(t) # Check for image placeholders or pic shapes if 'pic:pic' in xml or 'p:pic' in xml: print('[HAS PICTURE ELEMENT]') if 'ph type' in xml: phs = re.findall(r'<p:ph[^/]*/>', xml) print('Placeholders:', phs) # Check for empty picture placeholders if 'p:sp' in xml: # look for picture type placeholders pic_phs = re.findall(r'ph type=\"pic\"[^>]*', xml) print('Pic placeholders:', pic_phs) " 2>&1

Running Command

cd /home/daytona/workspace/cm_slides && python3 -c " import zipfile, re with zipfile.ZipFile('Atypical_Cardiomyopathy_Pediatrics.pptx', 'r') as z: for i in range(1, 6): print(f'\n=== SLIDE {i} XML (pic/sp shapes) ===') with z.open(f'ppt/slides/slide{i}.xml') as f: xml = f.read().decode('utf-8') # Find all sp elements with their content # Look for picture placeholders sps = re.findall(r'<p:sp>.*?</p:sp>', xml, re.DOTALL) for sp in sps: nvpr = re.search(r'<p:nvPr>(.*?)</p:nvPr>', sp, re.DOTALL) ph = re.search(r'<p:ph[^>]*/>', sp) texts = re.findall(r'<a:t>([^<]+)</a:t>', sp) if ph and 'pic' in (ph.group() if ph else ''): print('PIC placeholder:', ph.group(), 'texts:', texts) if texts and any('Image' in t or 'Echo' in t or 'MRI' in t or 'CMR' in t or 'Echocardiogram' in t for t in texts): print('Image-related text box found:', texts) # Get position info xfrm = re.search(r'<a:xfrm[^>]*>(.*?)</a:xfrm>', sp, re.DOTALL) if xfrm: off = re.search(r'<a:off x=\"(\d+)\" y=\"(\d+)\"', xfrm.group()) ext = re.search(r'<a:ext cx=\"(\d+)\" cy=\"(\d+)\"', xfrm.group()) if off and ext: print(f' Position: x={int(off.group(1))/914400:.2f}\", y={int(off.group(2))/914400:.2f}\" | Size: {int(ext.group(1))/914400:.2f}\" x {int(ext.group(2))/914400:.2f}\"') # Also look for p:pic elements (already-placed images) pics = re.findall(r'<p:pic>.*?</p:pic>', xml, re.DOTALL) print(f' Actual p:pic elements: {len(pics)}') " 2>&1

Searching Images

LVNC left ventricular non-compaction echocardiogram trabeculations pediatric

Searching Images

ARVC arrhythmogenic right ventricular cardiomyopathy cardiac MRI fatty replacement

Searching Images

restrictive cardiomyopathy CMR biatrial enlargement pediatric

Searching Images

pediatric echocardiogram cardiac ultrasound child heart

Running Command

cd /home/daytona/workspace/cm_slides && python3 -c " import subprocess, json urls = [ 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_95617854fc6b496c869602844934384e898a890795985bb9976b1079a46b7957.jpg', 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_ee691c518841497b4fbf24ee0172091fe48770e72bec6f98c5a57fab99be7b80.jpg', 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_fe386797da8cb825dcba5fd80db71f4e23fdea5232b3ca1796b7ab778354ea63.jpg', 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_c458fa17f94dfab0a78548f30fe68ca354ddd109d45a014176582dfea60f3489.jpg', ] result = subprocess.run( ['node', '/home/daytona/skills/shared/scripts/fetch_images.js'] + urls, capture_output=True, text=True, timeout=60 ) data = json.loads(result.stdout) for i, item in enumerate(data): print(f'Image {i}: error={item.get(\"error\")}, base64_len={len(item.get(\"base64\",\"\"))}') " 2>&1

Running Command

cat > /home/daytona/workspace/cm_slides/insert_images.py << 'PYEOF' import subprocess, json, base64, io, shutil from pptx import Presentation from pptx.util import Inches, Emu # Image URLs to fetch urls = [ 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_95617854fc6b496c869602844934384e898a890795985bb9976b1079a46b7957.jpg', # Slide 1: pediatric echo 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_ee691c518841497b4fbf24ee0172091fe48770e72bec6f98c5a57fab99be7b80.jpg', # Slide 2: LVNC echo 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_fe386797da8cb825dcba5fd80db71f4e23fdea5232b3ca1796b7ab778354ea63.jpg', # Slide 3: ARVC MRI 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_c458fa17f94dfab0a78548f30fe68ca354ddd109d45a014176582dfea60f3489.jpg', # Slide 4: RCM CMR ] result = subprocess.run( ['node', '/home/daytona/skills/shared/scripts/fetch_images.js'] + urls, capture_output=True, text=True, timeout=60 ) images = json.loads(result.stdout) # Convert base64 to BytesIO def b64_to_stream(b64_str): # Format: "image/jpeg;base64,/9j/..." data = b64_str.split(',', 1)[1] return io.BytesIO(base64.b64decode(data)) # Load presentation prs = Presentation('/home/daytona/workspace/attachments/ec0391c7-2ad0-4264-88c8-3c354c03865c/Atypical_Cardiomyopathy_Pediatrics.pptx') # Image placements: # Slide 0 (index 0): Pediatric Echocardiogram label at x=4.85", y=5.80" (label), image goes above it # Place image at x=4.85", y=1.10", w=3.10", h=4.50" # Slide 1 (index 1): LVNC Echo label at x=4.50", y=3.40" # Place image at x=4.40", y=1.10", w=3.60", h=2.10" # Slide 2 (index 2): ARVC MRI label at x=0.50", y=3.30" # Place image at x=0.40", y=1.10", w=3.20", h=2.00" # Slide 3 (index 3): RCM CMR label at x=4.60", y=3.50" # Place image at x=4.50", y=1.10", w=3.20", h=2.20" placements = [ # (slide_index, x, y, width, height) (0, Inches(4.85), Inches(1.10), Inches(3.10), Inches(4.50)), # Slide 1: right side (1, Inches(4.40), Inches(1.10), Inches(3.60), Inches(2.10)), # Slide 2: right side LVNC (2, Inches(0.40), Inches(1.10), Inches(3.20), Inches(2.00)), # Slide 3: left side ARVC (3, Inches(4.50), Inches(1.10), Inches(3.20), Inches(2.20)), # Slide 4: right side RCM ] for i, (slide_idx, x, y, w, h) in enumerate(placements): slide = prs.slides[slide_idx] img_stream = b64_to_stream(images[i]['base64']) slide.shapes.add_picture(img_stream, x, y, w, h) print(f"Added image {i+1} to slide {slide_idx+1}") output_path = '/home/daytona/workspace/cm_slides/Atypical_Cardiomyopathy_Pediatrics_WithImages.pptx' prs.save(output_path) print(f"Saved to: {output_path}") PYEOF python3 /home/daytona/workspace/cm_slides/insert_images.py 2>&1

Running Command

pip install --user python-pptx -q 2>&1 | tail -3

Running Command

python3 /home/daytona/workspace/cm_slides/insert_images.py 2>&1

Running Command

cat > /home/daytona/workspace/cm_slides/insert_images2.py << 'PYEOF' import subprocess, json, base64, io, shutil, os from pptx import Presentation from pptx.util import Inches # Image URLs urls = [ 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_95617854fc6b496c869602844934384e898a890795985bb9976b1079a46b7957.jpg', # Slide 1 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_ee691c518841497b4fbf24ee0172091fe48770e72bec6f98c5a57fab99be7b80.jpg', # Slide 2 LVNC 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_fe386797da8cb825dcba5fd80db71f4e23fdea5232b3ca1796b7ab778354ea63.jpg', # Slide 3 ARVC 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_c458fa17f94dfab0a78548f30fe68ca354ddd109d45a014176582dfea60f3489.jpg', # Slide 4 RCM ] result = subprocess.run( ['node', '/home/daytona/skills/shared/scripts/fetch_images.js'] + urls, capture_output=True, text=True, timeout=60 ) images = json.loads(result.stdout) def b64_to_stream(b64_str): data = b64_str.split(',', 1)[1] return io.BytesIO(base64.b64decode(data)) # Load from original src = '/home/daytona/workspace/attachments/ec0391c7-2ad0-4264-88c8-3c354c03865c/Atypical_Cardiomyopathy_Pediatrics.pptx' # Read original bytes into memory with open(src, 'rb') as f: pptx_bytes = io.BytesIO(f.read()) prs = Presentation(pptx_bytes) placements = [ (0, Inches(4.85), Inches(1.10), Inches(3.10), Inches(4.50)), # Slide 1: right side (1, Inches(4.40), Inches(1.10), Inches(3.60), Inches(2.10)), # Slide 2: LVNC right (2, Inches(0.40), Inches(1.10), Inches(3.20), Inches(2.00)), # Slide 3: ARVC left (3, Inches(4.50), Inches(1.10), Inches(3.20), Inches(2.20)), # Slide 4: RCM right ] for i, (slide_idx, x, y, w, h) in enumerate(placements): slide = prs.slides[slide_idx] img_stream = b64_to_stream(images[i]['base64']) slide.shapes.add_picture(img_stream, x, y, w, h) print(f"Added image {i+1} to slide {slide_idx+1}") # Save to BytesIO first, then write bytes to file out_buffer = io.BytesIO() prs.save(out_buffer) out_buffer.seek(0) output_path = '/home/daytona/workspace/cm_slides/Atypical_Cardiomyopathy_Pediatrics_WithImages.pptx' with open(output_path, 'wb') as f: f.write(out_buffer.read()) print(f"Saved to: {output_path}") print(f"File size: {os.path.getsize(output_path)} bytes") PYEOF python3 /home/daytona/workspace/cm_slides/insert_images2.py 2>&1

Here's a summary of what was done and the images placed in each slide:

Done! The updated presentation is ready for download:

Atypical Cardiomyopathy Pediatrics WithImages

Presentation · PPTX


Here are the 4 medical images inserted into the empty spaces:
Slide 1 — Pediatric Echocardiogram (right panel):
Pediatric LVNC Echo
Pediatric TTE showing LVNC — dilated LV with apical trabeculations and mitral regurgitation jet on color Doppler
Slide 2 — LVNC Echo Image (right panel):
LVNC Echo NC:C ratio
PSAX view showing NC:C ratio of 5:1 (2.5/0.5 cm) with color Doppler confirming intertrabecular blood flow
Slide 3 — ARVC MRI Image (left panel):
ARVC Cardiac MRI
3-panel cardiac MRI: T1 showing RV enlargement, double-IR showing fatty hyperintensity in RV wall, triple-IR with fat suppression confirming fibrofatty replacement
Slide 4 — RCM CMR Image (right panel):
RCM CMR biatrial enlargement
Multi-modal panel: echo and CMR both showing biatrial enlargement with normal ventricular size, plus restrictive Doppler filling pattern (E/A > 1.9)
All images are sourced from peer-reviewed medical literature (PMC) and directly illustrate the specific pathology described in each slide's caption.

Hello

Hello! How can I help you today?

The second presentation is mine i want you to make my presentation to look similar to the first one. Without changing my original content

Reading File
Reading File
Running Command

cd /home/daytona/workspace/cm_slides && python3 -c " import zipfile, re pptx_path = '/home/daytona/workspace/attachments/ec0391c7-2ad0-4264-88c8-3c354c03865c/Atypical_Cardiomyopathy_Pediatrics (1).pptx' with zipfile.ZipFile(pptx_path, 'r') as z: names = z.namelist() slides = [n for n in names if re.match(r'ppt/slides/slide\d+\.xml$', n)] print('Slides:', sorted(slides)) # Read slide 1 for design info with z.open('ppt/slides/slide1.xml') as f: xml1 = f.read().decode('utf-8') # Get colors/backgrounds fills = re.findall(r'<a:srgbClr val=\"([A-Fa-f0-9]+)\"', xml1) print('Colors in slide1:', list(set(fills))[:20]) # Read theme with z.open('ppt/theme/theme1.xml') as f: theme = f.read().decode('utf-8') theme_colors = re.findall(r'<a:srgbClr val=\"([A-Fa-f0-9]+)\"', theme) print('Theme colors:', list(set(theme_colors))[:20]) " 2>&1

Running Command

python3 -c " import zipfile, re ref_path = '/home/daytona/workspace/attachments/ec0391c7-2ad0-4264-88c8-3c354c03865c/Atypical_Cardiomyopathy_Pediatrics (1).pptx' with zipfile.ZipFile(ref_path, 'r') as z: for i in range(1, 6): print(f'\n=== REF SLIDE {i} ===') with z.open(f'ppt/slides/slide{i}.xml') as f: xml = f.read().decode('utf-8') texts = re.findall(r'<a:t>([^<]+)</a:t>', xml) for t in texts: print(t) " 2>&1

Reading File
Running Command

python3 -c " import pdfplumber pdf_path = '/home/daytona/workspace/attachments/ec0391c7-2ad0-4264-88c8-3c354c03865c/New Note 2026-05-12 11-26-32.pdf' with pdfplumber.open(pdf_path) as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): print(f'\n=== PAGE {i+1} ===') text = page.extract_text() if text: print(text) else: print('[No text extracted - may be image/scan]') " 2>&1

Running Command

python3 -c " import zipfile, re ref_path = '/home/daytona/workspace/attachments/ec0391c7-2ad0-4264-88c8-3c354c03865c/Atypical_Cardiomyopathy_Pediatrics (1).pptx' with zipfile.ZipFile(ref_path, 'r') as z: # Analyze slide 1 layout in detail with z.open('ppt/slides/slide1.xml') as f: xml1 = f.read().decode('utf-8') # Find all shapes with positions, sizes, fills, and fonts sps = re.findall(r'<p:sp>.*?</p:sp>', xml1, re.DOTALL) print(f'Number of shapes in slide 1: {len(sps)}') for j, sp in enumerate(sps): # Position off = re.search(r'<a:off x=\"(\d+)\" y=\"(\d+)\"', sp) ext = re.search(r'<a:ext cx=\"(\d+)\" cy=\"(\d+)\"', sp) # Text texts = re.findall(r'<a:t>([^<]+)</a:t>', sp) # Font size fsz = re.findall(r'sz=\"(\d+)\"', sp) # Colors (fill and font) fills = re.findall(r'<a:solidFill>.*?<a:srgbClr val=\"([A-Fa-f0-9]+)\"', sp, re.DOTALL) bold = 'b=\"1\"' in sp or '<a:b/>' in sp if off and ext: x = round(int(off.group(1))/914400, 2) y = round(int(off.group(2))/914400, 2) w = round(int(ext.group(1))/914400, 2) h = round(int(ext.group(2))/914400, 2) print(f'Shape {j+1}: pos=({x}\",{y}\") size=({w}\"x{h}\") texts={texts[:2]} fills={fills} font_sizes={list(set(fsz))} bold={bold}') # Also look for rectangle/background shapes spPrs = re.findall(r'<p:sp>(.*?)</p:sp>', xml1, re.DOTALL) # Find non-text shapes grpSps = re.findall(r'<p:grpSp>(.*?)</p:grpSp>', xml1, re.DOTALL) print(f'Group shapes: {len(grpSps)}') # Check slide background bg = re.search(r'<p:bg>(.*?)</p:bg>', xml1, re.DOTALL) if bg: print('Background XML:', bg.group()[:500]) " 2>&1

Running Command

python3 -c " import zipfile, re ref_path = '/home/daytona/workspace/attachments/ec0391c7-2ad0-4264-88c8-3c354c03865c/Atypical_Cardiomyopathy_Pediatrics (1).pptx' with zipfile.ZipFile(ref_path, 'r') as z: for slide_num in [2, 3, 4, 5]: print(f'\n=== SLIDE {slide_num} LAYOUT ===') with z.open(f'ppt/slides/slide{slide_num}.xml') as f: xml = f.read().decode('utf-8') bg = re.search(r'<p:bg>(.*?)</p:bg>', xml, re.DOTALL) if bg: bg_color = re.search(r'<a:srgbClr val=\"([A-Fa-f0-9]+)\"', bg.group()) print(f'BG color: {bg_color.group(1) if bg_color else \"none\"}') sps = re.findall(r'<p:sp>.*?</p:sp>', xml, re.DOTALL) for j, sp in enumerate(sps): off = re.search(r'<a:off x=\"(\d+)\" y=\"(\d+)\"', sp) ext = re.search(r'<a:ext cx=\"(\d+)\" cy=\"(\d+)\"', sp) texts = re.findall(r'<a:t>([^<]+)</a:t>', sp) fsz = list(set(re.findall(r'sz=\"(\d+)\"', sp))) fills = re.findall(r'<a:solidFill>.*?<a:srgbClr val=\"([A-Fa-f0-9]+)\"', sp, re.DOTALL) bold = 'b=\"1\"' in sp if off and ext and (texts or fills): x = round(int(off.group(1))/914400, 2) y = round(int(off.group(2))/914400, 2) w = round(int(ext.group(1))/914400, 2) h = round(int(ext.group(2))/914400, 2) txt_preview = str(texts[:1])[:60] print(f' Shape {j+1}: ({x}\",{y}\") {w}\"x{h}\" | fills={fills} | sz={fsz} | bold={bold} | text={txt_preview}') " 2>&1

Writing File

~/cm_slides/build_metabolic.js

const pptxgen = require("pptxgenjs");

let pres = new pptxgen();

// A4 portrait: 8.27" x 11.69"
pres.defineLayout({ name: 'A4_PORTRAIT', width: 8.27, height: 11.69 });
pres.layout = 'A4_PORTRAIT';

// ─── COLOR PALETTE (from reference) ───
const C = {
  navyDark:  "0D2B55",
  navyMid:   "11386A",
  navyLight: "1A3A6A",
  blue:      "1A78C2",
  red:       "B51212",
  redDark:   "880000",
  gold:      "D4A017",
  goldDark:  "8B6000",
  white:     "FFFFFF",
  ltBlue:    "BBCCDD",
  ltBlue2:   "AABBCC",
  ltBlue3:   "CCDDEE",
  panelBg:   "E8F1FA",
  textDark:  "2D2D2D",
  tableBg:   "E8F1FA",
  yellowBg:  "FFF8E1",
  subtle:    "666666",
  subjectBg: "1A3A6A",
};

// Helper: section header block
function addSectionHeader(slide, x, y, w, h, title, fillColor) {
  slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color: fillColor }, line: { color: fillColor } });
  slide.addText(title, { x: x + 0.05, y: y + 0.02, w: w - 0.1, h: h - 0.04, fontSize: 11, bold: true, color: C.white, valign: "middle", margin: 0 });
}

// Helper: content box (light blue bg)
function addContentBox(slide, x, y, w, h, bullets) {
  slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color: C.panelBg }, line: { color: C.panelBg } });
  const items = bullets.map((b, i) => ({
    text: b,
    options: { bullet: false, breakLine: i < bullets.length - 1, fontSize: 9.5, color: C.textDark }
  }));
  slide.addText(items, { x: x + 0.1, y: y + 0.05, w: w - 0.15, h: h - 0.1, valign: "top", margin: 0 });
}

// Helper: key exam / highlight bar
function addHighlightBar(slide, x, y, w, h, text, fillColor) {
  slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color: fillColor }, line: { color: fillColor } });
  slide.addText(text, { x: x + 0.05, y: y + 0.02, w: w - 0.1, h: h - 0.04, fontSize: 11, bold: true, color: C.white, valign: "middle", margin: 0 });
}

// ─── HELPER: Standard slide chrome ───
function addChrome(slide, pageNum, totalPages, footerText) {
  // Top dark navy header bar
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 8.27, h: 2.0, fill: { color: C.navyDark }, line: { color: C.navyDark } });
  // Red accent line under header
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 1.95, w: 8.27, h: 0.08, fill: { color: C.red }, line: { color: C.red } });
  // Bottom bar
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 11.35, w: 8.27, h: 0.34, fill: { color: C.navyDark }, line: { color: C.navyDark } });
  // Footer left: topic text
  slide.addText(footerText, { x: 0.2, y: 11.37, w: 6.0, h: 0.28, fontSize: 8, color: C.ltBlue2, valign: "middle", margin: 0 });
  // Footer right: page number
  slide.addText(`Page ${pageNum} of ${totalPages}`, { x: 6.7, y: 11.37, w: 1.3, h: 0.28, fontSize: 8, color: C.ltBlue2, align: "right", valign: "middle", margin: 0 });
  // Bottom red line
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 11.3, w: 8.27, h: 0.06, fill: { color: C.red }, line: { color: C.red } });
}

const FOOTER = "Long-term Monitoring of Metabolic Disorders & Lifestyle Correction";
const TOTAL = 6;

// ═══════════════════════════════════════════════
// SLIDE 1 — TITLE SLIDE
// ═══════════════════════════════════════════════
{
  let slide = pres.addSlide();
  // Full dark background
  slide.background = { color: C.navyDark };
  // Right darker panel
  slide.addShape(pres.ShapeType.rect, { x: 4.5, y: 0, w: 4.0, h: 11.69, fill: { color: C.navyMid }, line: { color: C.navyMid } });
  // Red horizontal line
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 4.5, w: 8.27, h: 0.12, fill: { color: C.red }, line: { color: C.red } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 7.0, w: 8.27, h: 0.06, fill: { color: C.redDark }, line: { color: C.redDark } });

  // Main title
  slide.addText([
    { text: "LONG-TERM MONITORING OF\nMETABOLIC DISORDERS", options: { breakLine: false } }
  ], { x: 0.4, y: 2.2, w: 7.5, h: 2.0, fontSize: 34, bold: true, color: C.white, valign: "middle" });

  // Subtitle
  slide.addText("and Lifestyle Correction", { x: 0.4, y: 4.0, w: 7.5, h: 0.7, fontSize: 20, color: C.ltBlue, valign: "middle" });

  // Topics box
  slide.addShape(pres.ShapeType.rect, { x: 0.4, y: 5.0, w: 5.5, h: 2.0, fill: { color: C.navyLight }, line: { color: C.navyLight } });
  slide.addText("Topics Covered:", { x: 0.5, y: 5.1, w: 5.3, h: 0.4, fontSize: 12, color: C.ltBlue3, bold: false, valign: "middle", margin: 0 });
  slide.addText([
    { text: "• Introduction to Metabolic Disorders", options: { breakLine: true } },
    { text: "• Importance of Long-Term Monitoring", options: { breakLine: true } },
    { text: "• Risk Factors", options: { breakLine: true } },
    { text: "• Symptoms & Treatment", options: { breakLine: false } },
  ], { x: 0.55, y: 5.55, w: 5.1, h: 1.3, fontSize: 10, color: C.ltBlue2, valign: "top", margin: 0 });

  // Footer details
  slide.addText("4th Year | Faculty of Medicine | Group 8", { x: 0.4, y: 10.8, w: 7.5, h: 0.4, fontSize: 10, color: "6688AA", valign: "middle", margin: 0 });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 11.3, w: 8.27, h: 0.06, fill: { color: C.red }, line: { color: C.red } });
  slide.addText("Page 1 of " + TOTAL, { x: 6.7, y: 11.35, w: 1.3, h: 0.28, fontSize: 8, color: C.ltBlue2, align: "right", valign: "middle", margin: 0 });

  // Author / Institution box (right side)
  slide.addShape(pres.ShapeType.rect, { x: 4.8, y: 4.8, w: 3.2, h: 2.5, fill: { color: C.navyLight }, line: { color: C.navyLight } });
  slide.addText([
    { text: "Done by: Snigdha Mandaokar", options: { breakLine: true } },
    { text: "Year: 4th | Group: 8th", options: { breakLine: true } },
    { text: "Jalalabad State University", options: { breakLine: true } },
    { text: "Faculty of Medicine", options: { breakLine: false } },
  ], { x: 4.9, y: 5.0, w: 3.0, h: 2.0, fontSize: 10, color: C.ltBlue2, valign: "top", margin: 0 });
}

// ═══════════════════════════════════════════════
// SLIDE 2 — INTRODUCTION
// ═══════════════════════════════════════════════
{
  let slide = pres.addSlide();
  slide.background = { color: C.white };
  addChrome(slide, 2, TOTAL, FOOTER);

  // Title in header
  slide.addText("Introduction to Metabolic Disorders", { x: 0.3, y: 0.15, w: 7.7, h: 1.0, fontSize: 22, bold: true, color: C.white, valign: "middle", margin: 0 });
  slide.addText("Understanding the conditions that disrupt the body's normal metabolism", { x: 0.3, y: 1.0, w: 7.7, h: 0.75, fontSize: 13, color: C.ltBlue, valign: "middle", margin: 0 });

  // LEFT COLUMN: What are metabolic disorders?
  addSectionHeader(slide, 0.25, 2.15, 3.8, 0.35, "What are Metabolic Disorders?", C.blue);
  addContentBox(slide, 0.25, 2.5, 3.8, 2.9,
    [
      "• A group of conditions affecting the body's normal metabolism — converting food into energy",
      "• Caused by imbalance in chemical reactions, hormones, or enzymes",
      "• Common examples: Diabetes mellitus, obesity, hypertension, dyslipidemia, PCOS",
      "• Rising worldwide due to unhealthy diets, physical inactivity, stress, and genetics",
    ]
  );

  // LEFT: Why long-term monitoring matters
  addSectionHeader(slide, 0.25, 5.55, 3.8, 0.35, "Why Long-Term Monitoring Matters", C.red);
  addContentBox(slide, 0.25, 5.9, 3.8, 2.5,
    [
      "• Chronic conditions require continuous observation and evaluation",
      "• Helps control symptoms and prevent organ damage",
      "• Improves overall quality of life",
      "• Lifestyle correction reduces disease progression naturally",
    ]
  );

  // RIGHT COLUMN: Early Diagnosis
  addSectionHeader(slide, 4.2, 2.15, 3.8, 0.35, "Early Diagnosis & Follow-Up", C.navyDark);
  addContentBox(slide, 4.2, 2.5, 3.8, 2.9,
    [
      "• Detect complications at an early stage: heart disease, kidney disease, nerve damage, stroke",
      "• Regular blood tests, HbA1c, cholesterol, liver & kidney function",
      "• Body weight/BMI monitoring for obesity-related risks",
      "• Patients who follow monitoring have better health outcomes",
    ]
  );

  // RIGHT: Key Exam Points
  slide.addShape(pres.ShapeType.rect, { x: 4.2, y: 5.55, w: 3.8, h: 2.5, fill: { color: C.yellowBg }, line: { color: C.yellowBg } });
  slide.addShape(pres.ShapeType.rect, { x: 4.2, y: 5.55, w: 0.08, h: 2.5, fill: { color: C.gold }, line: { color: C.gold } });
  slide.addText("⚡ Key Points", { x: 4.35, y: 5.6, w: 3.5, h: 0.4, fontSize: 11, bold: true, color: C.goldDark, valign: "middle", margin: 0 });
  slide.addText([
    { text: "• Metabolic disorders are chronic and progressive", options: { breakLine: true } },
    { text: "• Combination of monitoring + lifestyle change is most effective", options: { breakLine: true } },
    { text: "• HbA1c used for long-term blood sugar control", options: { breakLine: true } },
    { text: "• Modern tech (fitness trackers, apps) supports monitoring", options: { breakLine: false } },
  ], { x: 4.35, y: 6.05, w: 3.55, h: 1.9, fontSize: 9.5, color: C.textDark, valign: "top", margin: 0 });

  // Bottom key fact
  addHighlightBar(slide, 0.25, 8.55, 7.77, 0.4, "⚡ Early diagnosis + regular monitoring = prevention of severe complications", C.red);
}

// ═══════════════════════════════════════════════
// SLIDE 3 — IMPORTANCE OF LONG-TERM MONITORING
// ═══════════════════════════════════════════════
{
  let slide = pres.addSlide();
  slide.background = { color: C.white };
  addChrome(slide, 3, TOTAL, FOOTER);

  slide.addText("Importance of Long-Term Monitoring", { x: 0.3, y: 0.15, w: 7.7, h: 1.0, fontSize: 22, bold: true, color: C.white, valign: "middle", margin: 0 });
  slide.addText("Continuous assessment is the cornerstone of metabolic disorder management", { x: 0.3, y: 1.0, w: 7.7, h: 0.75, fontSize: 13, color: C.ltBlue, valign: "middle", margin: 0 });

  // LEFT: Blood Tests & Labs
  addSectionHeader(slide, 0.25, 2.15, 3.8, 0.35, "Blood Tests & Laboratory Monitoring", C.blue);
  addContentBox(slide, 0.25, 2.5, 3.8, 2.9,
    [
      "• Blood glucose levels & HbA1c (long-term blood sugar control in diabetes)",
      "• Cholesterol levels (LDL, HDL, triglycerides)",
      "• Liver function tests (LFT) & kidney function tests (KFT)",
      "• Body weight and BMI — evaluates obesity-related risks",
      "• Regular health checkups to adjust medications as needed",
    ]
  );

  // LEFT: Blood Pressure
  addSectionHeader(slide, 0.25, 5.55, 3.8, 0.35, "Blood Pressure & Cardiovascular Risk", C.navyDark);
  addContentBox(slide, 0.25, 5.9, 3.8, 2.5,
    [
      "• Hypertension commonly co-occurs with metabolic disorders",
      "• High BP increases risk of cardiovascular disease and stroke",
      "• Regular BP checks are essential in management",
      "• Identifying complications early allows medication adjustment",
    ]
  );

  // RIGHT: Patient Records
  addSectionHeader(slide, 4.2, 2.15, 3.8, 0.35, "Patient Health Records", C.red);
  addContentBox(slide, 4.2, 2.5, 3.8, 2.9,
    [
      "• Patients maintain records of: diet charts, exercise schedules, medication use, laboratory reports",
      "• Modern technology supports monitoring: fitness trackers, smart watches, mobile health apps",
      "• Track: physical activity, heart rate, sleep, calorie intake",
    ]
  );

  // RIGHT: Benefits
  slide.addShape(pres.ShapeType.rect, { x: 4.2, y: 5.55, w: 3.8, h: 2.5, fill: { color: C.yellowBg }, line: { color: C.yellowBg } });
  slide.addShape(pres.ShapeType.rect, { x: 4.2, y: 5.55, w: 0.08, h: 2.5, fill: { color: C.gold }, line: { color: C.gold } });
  slide.addText("⚡ Benefits of Monitoring", { x: 4.35, y: 5.6, w: 3.5, h: 0.4, fontSize: 11, bold: true, color: C.goldDark, valign: "middle", margin: 0 });
  slide.addText([
    { text: "• Improves patient awareness & motivation", options: { breakLine: true } },
    { text: "• Motivates individuals toward healthier lifestyles", options: { breakLine: true } },
    { text: "• Reduces hospital admissions", options: { breakLine: true } },
    { text: "• Prevents severe complications & lowers healthcare costs", options: { breakLine: false } },
  ], { x: 4.35, y: 6.05, w: 3.55, h: 1.9, fontSize: 9.5, color: C.textDark, valign: "top", margin: 0 });

  // Key stat bar
  addHighlightBar(slide, 0.25, 8.55, 7.77, 0.4, "⚡ Continuous monitoring reduces hospital admissions and healthcare costs by preventing severe complications", C.navyDark);
}

// ═══════════════════════════════════════════════
// SLIDE 4 — RISK FACTORS
// ═══════════════════════════════════════════════
{
  let slide = pres.addSlide();
  slide.background = { color: C.white };
  addChrome(slide, 4, TOTAL, FOOTER);

  slide.addText("Risk Factors of Metabolic Disorders", { x: 0.3, y: 0.15, w: 7.7, h: 1.0, fontSize: 22, bold: true, color: C.white, valign: "middle", margin: 0 });
  slide.addText("Multiple interacting factors increase vulnerability to metabolic disease", { x: 0.3, y: 1.0, w: 7.7, h: 0.75, fontSize: 13, color: C.ltBlue, valign: "middle", margin: 0 });

  // 2x2 grid of risk factor boxes
  // TOP-LEFT: Diet & Lifestyle
  addSectionHeader(slide, 0.25, 2.15, 3.8, 0.35, "Diet & Lifestyle Factors", C.blue);
  addContentBox(slide, 0.25, 2.5, 3.8, 2.6,
    [
      "• Unhealthy diet: high in sugary foods, processed foods, saturated fats",
      "• Lack of physical activity → obesity, diabetes, hypertension",
      "• Smoking & excessive alcohol → cardiovascular risk",
      "• Poor stress management and sleep habits → hormonal imbalance",
    ]
  );

  // TOP-RIGHT: Genetic & Demographics
  addSectionHeader(slide, 4.2, 2.15, 3.8, 0.35, "Genetic & Demographic Factors", C.red);
  addContentBox(slide, 4.2, 2.5, 3.8, 2.6,
    [
      "• Genetic predisposition and family history — major risk factor",
      "• Individuals with family history of metabolic disease at higher risk",
      "• Age — metabolic disorders become more common with advancing age",
      "• Stress and poor sleep disturb hormone balance and metabolism",
    ]
  );

  // BOTTOM-LEFT: Prevention
  addSectionHeader(slide, 0.25, 5.45, 3.8, 0.35, "Prevention Strategies", C.navyDark);
  addContentBox(slide, 0.25, 5.8, 3.8, 2.6,
    [
      "• Balanced nutrition with controlled sugar and fat intake",
      "• Regular physical exercise (150 min/week of moderate activity)",
      "• Stress management techniques: meditation, yoga",
      "• Routine health checkups — at least annually",
    ]
  );

  // BOTTOM-RIGHT: Key note
  slide.addShape(pres.ShapeType.rect, { x: 4.2, y: 5.45, w: 3.8, h: 2.95, fill: { color: C.yellowBg }, line: { color: C.yellowBg } });
  slide.addShape(pres.ShapeType.rect, { x: 4.2, y: 5.45, w: 0.08, h: 2.95, fill: { color: C.gold }, line: { color: C.gold } });
  slide.addText("⚡ Key Risk Summary", { x: 4.35, y: 5.5, w: 3.55, h: 0.4, fontSize: 11, bold: true, color: C.goldDark, valign: "middle", margin: 0 });
  slide.addText([
    { text: "• Unhealthy diet = #1 modifiable risk factor", options: { breakLine: true } },
    { text: "• Physical inactivity × poor diet = metabolic syndrome", options: { breakLine: true } },
    { text: "• Family history cannot be changed — early screening essential", options: { breakLine: true } },
    { text: "• Lifestyle changes reduce risk even in genetically predisposed individuals", options: { breakLine: false } },
  ], { x: 4.35, y: 5.95, w: 3.55, h: 2.35, fontSize: 9.5, color: C.textDark, valign: "top", margin: 0 });

  addHighlightBar(slide, 0.25, 8.55, 7.77, 0.4, "⚡ Maintaining healthy lifestyle through nutrition + exercise + routine checkups can significantly reduce risk", C.red);
}

// ═══════════════════════════════════════════════
// SLIDE 5 — SYMPTOMS
// ═══════════════════════════════════════════════
{
  let slide = pres.addSlide();
  slide.background = { color: C.white };
  addChrome(slide, 5, TOTAL, FOOTER);

  slide.addText("Symptoms of Metabolic Disorders", { x: 0.3, y: 0.15, w: 7.7, h: 1.0, fontSize: 22, bold: true, color: C.white, valign: "middle", margin: 0 });
  slide.addText("Clinical presentations vary by condition — early recognition enables timely management", { x: 0.3, y: 1.0, w: 7.7, h: 0.75, fontSize: 13, color: C.ltBlue, valign: "middle", margin: 0 });

  // LEFT: General symptoms
  addSectionHeader(slide, 0.25, 2.15, 3.8, 0.35, "General Symptoms", C.blue);
  addContentBox(slide, 0.25, 2.5, 3.8, 2.8,
    [
      "• Unexplained weight gain or obesity",
      "• Fatigue and low energy from improper metabolism",
      "• Dark skin patches (acanthosis nigricans) — insulin resistance / PCOS",
      "• Difficulty losing weight",
      "• Irregular menstrual cycles",
      "• Sleep problems",
      "• Increased cholesterol levels",
    ]
  );

  // LEFT: Severe complications
  addSectionHeader(slide, 0.25, 5.55, 3.8, 0.35, "Severe Complications", C.red);
  addContentBox(slide, 0.25, 5.9, 3.8, 2.5,
    [
      "• Heart disease (coronary artery disease)",
      "• Kidney problems (diabetic nephropathy)",
      "• Peripheral nerve damage (neuropathy)",
      "• Metabolic disorders can be silent until complications emerge",
    ]
  );

  // RIGHT: Disease-specific
  addSectionHeader(slide, 4.2, 2.15, 3.8, 0.35, "Disease-Specific Symptoms", C.navyDark);
  addContentBox(slide, 4.2, 2.5, 3.8, 2.8,
    [
      "Diabetes mellitus:",
      "  • Increased thirst (polydipsia), frequent urination (polyuria)",
      "  • Blurred vision, increased hunger",
      "Hypertension:",
      "  • Headaches, dizziness, chest discomfort",
      "PCOS:",
      "  • Irregular cycles, acne, hirsutism, weight gain",
    ]
  );

  // Right: Key points
  slide.addShape(pres.ShapeType.rect, { x: 4.2, y: 5.55, w: 3.8, h: 2.5, fill: { color: C.yellowBg }, line: { color: C.yellowBg } });
  slide.addShape(pres.ShapeType.rect, { x: 4.2, y: 5.55, w: 0.08, h: 2.5, fill: { color: C.gold }, line: { color: C.gold } });
  slide.addText("⚡ Clinical Pearls", { x: 4.35, y: 5.6, w: 3.55, h: 0.4, fontSize: 11, bold: true, color: C.goldDark, valign: "middle", margin: 0 });
  slide.addText([
    { text: "• Many patients are asymptomatic until late-stage", options: { breakLine: true } },
    { text: "• Acanthosis nigricans = insulin resistance marker", options: { breakLine: true } },
    { text: "• Regular screenings catch silent disease early", options: { breakLine: true } },
    { text: "• Symptom triad in diabetes: polydipsia, polyuria, polyphagia", options: { breakLine: false } },
  ], { x: 4.35, y: 6.05, w: 3.55, h: 1.9, fontSize: 9.5, color: C.textDark, valign: "top", margin: 0 });

  addHighlightBar(slide, 0.25, 8.55, 7.77, 0.4, "⚡ Early recognition of symptoms + regular medical checkups = proper diagnosis and timely treatment", C.navyDark);
}

// ═══════════════════════════════════════════════
// SLIDE 6 — TREATMENT & MANAGEMENT / SUMMARY TABLE
// ═══════════════════════════════════════════════
{
  let slide = pres.addSlide();
  slide.background = { color: C.white };
  addChrome(slide, 6, TOTAL, FOOTER);

  slide.addText("Treatment & Management of Metabolic Disorders", { x: 0.3, y: 0.15, w: 7.7, h: 1.0, fontSize: 22, bold: true, color: C.white, valign: "middle", margin: 0 });
  slide.addText("Lifestyle modification · Pharmacotherapy · Monitoring · Patient Education", { x: 0.3, y: 1.0, w: 7.7, h: 0.75, fontSize: 13, color: C.ltBlue, valign: "middle", margin: 0 });

  // 4 section boxes across the slide
  addSectionHeader(slide, 0.25, 2.15, 3.75, 0.35, "Lifestyle Modification", C.blue);
  addContentBox(slide, 0.25, 2.5, 3.75, 2.7,
    [
      "• Healthy diet: balanced nutrition, reduced sugar, regular meal timing",
      "• Regular physical activity: walking, jogging, yoga, strength training",
      "• Controls blood sugar, improves heart health, reduces obesity",
      "• Stress management and adequate sleep essential",
    ]
  );

  addSectionHeader(slide, 4.25, 2.15, 3.75, 0.35, "Pharmacotherapy", C.red);
  addContentBox(slide, 4.25, 2.5, 3.75, 2.7,
    [
      "• Diabetes: insulin or oral hypoglycemics (metformin, sulfonylureas)",
      "• Hypertension: ACE inhibitors, ARBs, calcium channel blockers",
      "• Dyslipidemia: statins, fibrates",
      "• Medications prescribed based on disorder type and severity",
    ]
  );

  addSectionHeader(slide, 0.25, 5.45, 3.75, 0.35, "Monitoring & Investigations", C.navyDark);
  addContentBox(slide, 0.25, 5.8, 3.75, 2.6,
    [
      "• Regular monitoring: blood sugar, cholesterol, BP, body weight",
      "• HbA1c every 3 months in uncontrolled diabetes",
      "• Annual: kidney function, liver function, lipid profile",
      "• Routine medical checkups and patient awareness programs",
    ]
  );

  slide.addShape(pres.ShapeType.rect, { x: 4.25, y: 5.45, w: 3.75, h: 2.6, fill: { color: C.yellowBg }, line: { color: C.yellowBg } });
  slide.addShape(pres.ShapeType.rect, { x: 4.25, y: 5.45, w: 0.08, h: 2.6, fill: { color: C.gold }, line: { color: C.gold } });
  slide.addText("⚡ Treatment Goals", { x: 4.4, y: 5.5, w: 3.5, h: 0.4, fontSize: 11, bold: true, color: C.goldDark, valign: "middle", margin: 0 });
  slide.addText([
    { text: "• Control symptoms & prevent complications", options: { breakLine: true } },
    { text: "• Achieve target HbA1c <7%, BP <130/80 mmHg", options: { breakLine: true } },
    { text: "• Lifestyle + pharmacotherapy = best outcomes", options: { breakLine: true } },
    { text: "• Patient education is cornerstone of long-term success", options: { breakLine: false } },
  ], { x: 4.4, y: 5.95, w: 3.55, h: 2.0, fontSize: 9.5, color: C.textDark, valign: "top", margin: 0 });

  // QUICK COMPARISON TABLE
  addHighlightBar(slide, 0.25, 8.55, 7.77, 0.38, "QUICK COMPARISON TABLE", C.navyDark);

  // Table headers
  const cols = [
    { x: 0.25, w: 1.5, label: "Disorder" },
    { x: 1.75, w: 1.5, label: "Key Monitoring" },
    { x: 3.25, w: 2.0, label: "Main Treatment" },
    { x: 5.25, w: 1.1, label: "Target" },
    { x: 6.35, w: 1.17, label: "Prognosis" },
  ];
  cols.forEach(c => {
    slide.addShape(pres.ShapeType.rect, { x: c.x, y: 8.93, w: c.w, h: 0.32, fill: { color: C.blue }, line: { color: "CCCCCC" } });
    slide.addText(c.label, { x: c.x + 0.05, y: 8.96, w: c.w - 0.1, h: 0.27, fontSize: 8.5, bold: true, color: C.white, valign: "middle", margin: 0 });
  });

  // Table rows
  const rows = [
    ["Diabetes", "HbA1c, blood glucose", "Insulin / oral drugs", "HbA1c <7%", "Manageable"],
    ["Hypertension", "BP, renal function", "Antihypertensives", "BP <130/80", "Controlled"],
    ["Obesity", "BMI, waist, lipids", "Lifestyle, medication", "BMI <25", "Variable"],
    ["Dyslipidemia", "Lipid profile", "Statins, diet", "LDL <100 mg/dL", "Reversible"],
    ["PCOS", "Glucose, androgens", "Lifestyle, metformin", "Cycle regulation", "Manageable"],
  ];

  rows.forEach((row, ri) => {
    const yy = 9.25 + ri * 0.32;
    const bg = ri % 2 === 0 ? C.white : C.tableBg;
    cols.forEach((c, ci) => {
      slide.addShape(pres.ShapeType.rect, { x: c.x, y: yy, w: c.w, h: 0.32, fill: { color: bg }, line: { color: "CCCCCC" } });
      slide.addText(row[ci], { x: c.x + 0.05, y: yy + 0.03, w: c.w - 0.1, h: 0.27, fontSize: 8.5, color: C.textDark, valign: "middle", margin: 0 });
    });
  });
}

// ─── OUTPUT ───
const outPath = "/home/daytona/workspace/cm_slides/Metabolic_Disorders_Monitoring.pptx";
pres.writeFile({ fileName: outPath })
  .then(() => console.log("Saved: " + outPath))
  .catch(e => { console.error(e); process.exit(1); });
Running Command

cd /home/daytona/workspace/cm_slides && node build_metabolic.js 2>&1

Running Command

ls -lh /home/daytona/workspace/cm_slides/Metabolic_Disorders_Monitoring.pptx 2>&1

Your presentation is ready:

Metabolic Disorders Monitoring

Presentation · PPTX

Here's what was applied from the reference design to your content:
Design ElementApplied
A4 Portrait (8.27" × 11.69")✅ Same layout size
Dark navy blue (#0D2B55) header bar + slide background (title)
Red accent line under header
Dark navy footer bar with topic name + page number
Blue section headers (#1A78C2) with white bold text
Red section headers (#B51212) for alternate sections
Light blue content panels (#E8F1FA) for bullet content
Gold "⚡ Key Points" callout boxes (#FFF8E1 with gold left bar)
Comparison table at bottom of last slide
Two-column layout on content slides
6 slides total:
  1. Title slide — your name, institution, topic
  2. Introduction to Metabolic Disorders
  3. Importance of Long-Term Monitoring
  4. Risk Factors
  5. Symptoms
  6. Treatment & Management (with comparison table)

I told you to create on the topic "Atypical forms of cardiomyopathy in children and adolescents." You have done the opposite. I want you to create a pdf similar to the metabolic disorder presentation i gave you

Running Command

python3 -c " import pdfplumber pdf_path = '/home/daytona/workspace/attachments/ec0391c7-2ad0-4264-88c8-3c354c03865c/New Note 2026-05-12 11-26-32.pdf' with pdfplumber.open(pdf_path) as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): print(f'\n=== PAGE {i+1} size: {page.width}x{page.height} ===') words = page.extract_words() print(f'Word count: {len(words)}') text = page.extract_text() if text: print(text[:2000]) " 2>&1

Running Command

python3 -c " import pdfplumber pdf_path = '/home/daytona/workspace/attachments/ec0391c7-2ad0-4264-88c8-3c354c03865c/New Note 2026-05-12 11-26-32.pdf' with pdfplumber.open(pdf_path) as pdf: for i, page in enumerate(pdf.pages[:3]): print(f'\n=== PAGE {i+1} chars/objects ===') chars = page.chars[:20] for c in chars: print(f' char={repr(c[\"text\"])} fontname={c[\"fontname\"]} size={c[\"size\"]:.1f} x={c[\"x0\"]:.1f} y={c[\"y0\"]:.1f} color={c.get(\"non_stroking_color\")}') rects = page.rects[:10] for r in rects: print(f' RECT x={r[\"x0\"]:.1f}-{r[\"x1\"]:.1f} y={r[\"y0\"]:.1f}-{r[\"y1\"]:.1f} fill={r.get(\"non_stroking_color\")} stroke={r.get(\"stroking_color\")}') lines = page.lines[:5] for l in lines: print(f' LINE x={l[\"x0\"]:.1f}-{l[\"x1\"]:.1f} y={l[\"y0\"]:.1f}-{l[\"y1\"]:.1f} width={l.get(\"linewidth\")}') " 2>&1

Reading File
Writing File

~/cm_slides/build_cardiomyopathy_pdf.py

"""
Creates a PDF on "Atypical Forms of Cardiomyopathy in Children and Adolescents"
styled to match the reference PDF (New Note 2026-05-12):
  - A4 portrait (595 x 842 pt)
  - Page 1: Cover (bold typewriter-style university name + topic)
  - Page 2: Formal title page (university header block + topic/author details)
  - Pages 3-7: Topic pages with heading + body paragraphs
  - Page 8: Thank You / References
"""

from reportlab.lib.pagesizes import A4
from reportlab.lib.units import pt
from reportlab.pdfgen import canvas
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer
from reportlab.lib import colors
import textwrap

W, H = A4  # 595.28 x 841.89

OUT = "/home/daytona/workspace/cm_slides/Atypical_Cardiomyopathy_Pediatrics_PDF.pdf"

c = canvas.Canvas(OUT, pagesize=A4)

# ── Font helpers ──────────────────────────────────────────────────
def use_bold(size):
    c.setFont("Helvetica-Bold", size)

def use_regular(size):
    c.setFont("Helvetica", size)

def use_italic(size):
    c.setFont("Helvetica-Oblique", size)

# ── Text helpers ──────────────────────────────────────────────────
def centered_text(text, y, font="Helvetica-Bold", size=21, color=(0,0,0)):
    c.setFont(font, size)
    c.setFillColorRGB(*color)
    c.drawCentredString(W / 2, y, text)

def left_text(text, x, y, font="Helvetica", size=12, color=(0,0,0)):
    c.setFont(font, size)
    c.setFillColorRGB(*color)
    c.drawString(x, y, text)

def wrapped_paragraph(text, x, y, max_width, font="Helvetica", size=13,
                       line_height=20, color=(0,0,0), indent=0):
    """Draw wrapped text. Returns new y after last line."""
    c.setFont(font, size)
    c.setFillColorRGB(*color)
    # Estimate chars per line based on avg char width ~0.55*size
    chars_per_line = int(max_width / (size * 0.55))
    lines = []
    for para in text.split('\n'):
        if para.strip() == '':
            lines.append('')
        else:
            wrapped = textwrap.wrap(para, width=chars_per_line)
            lines.extend(wrapped if wrapped else [''])
    for line in lines:
        c.drawString(x + indent, y, line)
        y -= line_height
    return y

# ══════════════════════════════════════════
# PAGE 1 — COVER PAGE
# ══════════════════════════════════════════
c.setFillColorRGB(0, 0, 0)

# University name (large bold, centered — like AmericanTypewriter-Bold 21pt)
centered_text("Jalalabad", H - 160, font="Helvetica-Bold", size=21)
centered_text("State", H - 186, font="Helvetica-Bold", size=21)
centered_text("University", H - 212, font="Helvetica-Bold", size=21)

# Faculty
centered_text("Faculty of", H - 270, font="Helvetica-Bold", size=21)
centered_text("Medicine", H - 296, font="Helvetica-Bold", size=21)

# Divider line
c.setStrokeColorRGB(0, 0, 0)
c.setLineWidth(0.5)
c.line(80, H - 340, W - 80, H - 340)

# Topic label
use_regular(13)
c.setFillColorRGB(0, 0, 0)
c.drawCentredString(W / 2, H - 380, "Topic :-  Atypical Forms of Cardiomyopathy")
c.drawCentredString(W / 2, H - 400, "in Children and Adolescents.")

# Divider
c.line(80, H - 430, W - 80, H - 430)

# Author details
use_regular(13)
c.drawCentredString(W / 2, H - 470, "Done by :-  Snigdha Mandaokar")
c.drawCentredString(W / 2, H - 495, "Year :-  4th")
c.drawCentredString(W / 2, H - 520, "Group :-  8th")

c.showPage()

# ══════════════════════════════════════════
# PAGE 2 — FORMAL TITLE PAGE
# ══════════════════════════════════════════
# Header block (like ChalkboardSE 13.3pt centered)
use_regular(13)
y = H - 27
lines_header = [
    "MINISTRY OF EDUCATION AND SCIENCE OF THE",
    "KYRGYZ REPUBLIC",
    "JALALABAD STATE UNIVERSITY",
    "NAME B. OSMONOVA",
    "Faculty of Medicine",
]
for line in lines_header:
    c.drawCentredString(W / 2, y, line)
    y -= 18

# Divider
c.setLineWidth(0.5)
c.line(50, y - 5, W - 50, y - 5)
y -= 30

# Topic
use_bold(14)
c.drawCentredString(W / 2, y, "Topic :-")
y -= 22
use_regular(14)
c.drawCentredString(W / 2, y, "Atypical Forms of Cardiomyopathy")
y -= 22
c.drawCentredString(W / 2, y, "in Children and Adolescents.")
y -= 40

# Divider
c.line(50, y, W - 50, y)
y -= 35

# Author
use_regular(13)
c.drawString(80, y, "Done by :-  Snigdha Mandaokar")
y -= 22
c.drawString(80, y, "Year :-  4th")
y -= 22
c.drawString(80, y, "Group :-  8th")

c.showPage()

# ══════════════════════════════════════════
# HELPER: topic page builder
# ══════════════════════════════════════════
MARGIN_L = 13
MARGIN_R = W - 13
TEXT_W = MARGIN_R - MARGIN_L
BODY_SIZE = 16.5
HEADING_SIZE = 16.5
LINE_H = 24

def topic_page(heading, paragraphs):
    """heading: str, paragraphs: list of str (each is a paragraph block)"""
    y = H - 22

    # Heading
    use_bold(HEADING_SIZE)
    c.setFillColorRGB(0, 0, 0)
    c.drawString(MARGIN_L, y, heading)
    y -= 28

    # Underline heading
    c.setLineWidth(0.5)
    c.line(MARGIN_L, y + 4, MARGIN_R, y + 4)
    y -= 12

    # Body paragraphs
    use_regular(BODY_SIZE)
    for para in paragraphs:
        if para.strip() == '':
            y -= LINE_H // 2
            continue
        # Wrap and draw
        chars_per_line = int(TEXT_W / (BODY_SIZE * 0.52))
        wrapped = textwrap.wrap(para, width=chars_per_line)
        for line in wrapped:
            c.setFont("Helvetica", BODY_SIZE)
            c.setFillColorRGB(0, 0, 0)
            c.drawString(MARGIN_L, y, line)
            y -= LINE_H
            if y < 40:
                c.showPage()
                y = H - 22
        y -= LINE_H // 2  # gap between paragraphs

    c.showPage()

# ══════════════════════════════════════════
# PAGE 3 — INTRODUCTION
# ══════════════════════════════════════════
topic_page(
    "Introduction :-",
    [
        "Cardiomyopathies are diseases of the heart muscle that impair its ability to pump blood effectively. While dilated and hypertrophic cardiomyopathies are well recognized, several atypical forms occur in children and adolescents that are less common but clinically significant.",
        "The major atypical forms include Left Ventricular Non-Compaction (LVNC), Arrhythmogenic Cardiomyopathy (ACM/ARVC), Restrictive Cardiomyopathy (RCM), Takotsubo Cardiomyopathy, Myocarditis-related Cardiomyopathy, and Metabolic/Storage Cardiomyopathies.",
        "These conditions are increasing in recognition due to advances in cardiac imaging, particularly echocardiography and cardiac MRI. Early diagnosis is essential because pediatric cardiomyopathies carry significant morbidity and mortality if untreated.",
        "Long-term monitoring and appropriate management strategies — including medications, device therapy, and in some cases cardiac transplantation — are crucial for improving outcomes in affected children and adolescents.",
    ]
)

# ══════════════════════════════════════════
# PAGE 4 — LEFT VENTRICULAR NON-COMPACTION (LVNC)
# ══════════════════════════════════════════
topic_page(
    "Left Ventricular Non-Compaction (LVNC) :-",
    [
        "LVNC is a rare trabecular cardiomyopathy caused by arrest of normal myocardial compaction during fetal development (5–8 weeks of gestation). The result is a spongy myocardium with prominent trabeculations and deep intertrabecular recesses communicating with the ventricular cavity.",
        "It is the most common atypical cardiomyopathy in infancy, accounting for 1–7% of all pediatric cardiomyopathies. Genetic mutations in MYH7, MYBPC3, TAZ (Barth syndrome), and LDB3 are commonly identified. LVNC is associated with Barth syndrome, Danon disease, and mitochondrial disorders.",
        "The classic clinical triad is heart failure, arrhythmias, and thromboembolism. Presentation is age-dependent: neonates may present with cardiogenic shock, while adolescents more typically develop heart failure or syncope.",
        "Diagnosis is based on echocardiography showing an NC:C (non-compacted to compacted) ratio >2 in adults or >1.4 in pediatric patients. Cardiac MRI with late gadolinium enhancement is the gold standard. Management includes ACE inhibitors, beta-blockers, anticoagulation, ICD for high-risk arrhythmias, and cardiac transplantation for refractory cases. Prognosis is variable and worse in neonates.",
    ]
)

# ══════════════════════════════════════════
# PAGE 5 — ARRHYTHMOGENIC CARDIOMYOPATHY (ACM/ARVC)
# ══════════════════════════════════════════
topic_page(
    "Arrhythmogenic Cardiomyopathy (ACM/ARVC) :-",
    [
        "ACM/ARVC is a desmosomal disease characterized by fibrofatty replacement of the right ventricular (and sometimes left ventricular) myocardium. It is the leading cause of sudden cardiac death (SCD) in young athletes. Desmosomal mutations — particularly PKP2, DSP, DSG2, DSC2, and JUP — impair cell-to-cell adhesion, leading to apoptosis accelerated by exercise-induced mechanical stress.",
        "The classic 'triangle of dysplasia' involves the RVOT, RV apex, and subtricuspid area. In pediatric ACM, LV-dominant or biventricular forms are more common than in adults.",
        "Diagnosis follows the 2010 Revised Task Force Criteria, requiring major and minor criteria across six categories: structural abnormalities, tissue characterization, repolarization abnormalities (T-wave inversions V1–V4), depolarization abnormalities (epsilon wave), arrhythmias (VT with LBBB morphology), and family history or genetics.",
        "Management includes restriction from competitive sports, beta-blockers or antiarrhythmics (sotalol, amiodarone), ICD implantation in high-risk patients (syncope, sustained VT, aborted cardiac arrest), catheter ablation for recurrent VT, and cardiac transplantation for end-stage disease. The hallmark ECG finding is the epsilon wave.",
    ]
)

# ══════════════════════════════════════════
# PAGE 6 — RESTRICTIVE CARDIOMYOPATHY (RCM)
# ══════════════════════════════════════════
topic_page(
    "Restrictive Cardiomyopathy (RCM) :-",
    [
        "RCM is the rarest pediatric cardiomyopathy, characterized by diastolic dysfunction with normal systolic function. Stiff, non-compliant ventricles cause elevated filling pressures leading to biatrial enlargement and pulmonary venous hypertension.",
        "Etiology includes idiopathic causes (most common in children), infiltrative diseases (amyloidosis, Gaucher disease, Fabry disease, glycogen storage disorders), fibrotic causes (post-radiation, post-myocarditis, scleroderma), and genetic mutations (TNNI3, MYH7, ACTC1, DES).",
        "Clinical features include exercise intolerance, dyspnea, fatigue, syncope, signs of congestive heart failure (hepatomegaly, ascites, edema), atrial arrhythmias, and thromboembolic events. Differentiation from constrictive pericarditis is critical: septal bounce and calcification suggest pericarditis, while tissue Doppler e/e' ratio >15 supports RCM.",
        "Investigations include echocardiography showing biatrial enlargement with preserved ventricular dimensions, restrictive filling pattern (E/A >2, deceleration time <150 ms), and markedly elevated BNP/NT-proBNP. No disease-modifying therapy exists; cardiac transplantation is the definitive treatment and should be listed early. RCM carries the worst prognosis of all pediatric cardiomyopathies, with 5-year survival of approximately 50% without transplant.",
    ]
)

# ══════════════════════════════════════════
# PAGE 7 — OTHER ATYPICAL FORMS
# ══════════════════════════════════════════
topic_page(
    "Other Atypical Forms :-",
    [
        "Takotsubo Cardiomyopathy: Rare in children, this stress-induced cardiomyopathy causes transient apical ballooning with normal or near-normal coronary arteries. Common triggers in pediatric patients include neurological events such as seizures. It is usually reversible within 4–8 weeks with supportive therapy, beta-blockers, and ACE inhibitors.",
        "Myocarditis-related Cardiomyopathy: Following viral infection (Coxsackie B, adenovirus, SARS-CoV-2/MIS-C), acute myocarditis may evolve into a dilated cardiomyopathy phenotype. Chronic myocarditis leads to fibrosis and may mimic ACM. CMR shows T2 signal elevation and mid-wall late gadolinium enhancement. Treatment includes IVIG in fulminant myocarditis and immunosuppression in chronic inflammatory disease.",
        "Metabolic and Storage Cardiomyopathies: Pompe disease (GSD II) presents with HCM-like features due to absent acid alpha-glucosidase. Fabry disease (alpha-galactosidase A deficiency) causes HCM with renal and neurological involvement. Barth syndrome (X-linked, TAZ mutation) shows DCM plus LVNC with neutropenia. Danon disease (LAMP2 mutation) presents with HCM and cognitive impairment. These conditions may be amenable to enzyme replacement therapy.",
        "Peripartum Cardiomyopathy (PPCM): Rare in adolescent pregnancies. Defined as LVEF <45% in the last month of pregnancy or within 5 months postpartum. Risk factors include multiple gestation, malnutrition, and teen pregnancy. Prolactin-mediated injury plays a pathogenic role; bromocriptine is used alongside standard heart failure therapy. Approximately 50% of patients normalize EF within 6 months.",
    ]
)

# ══════════════════════════════════════════
# PAGE 8 — TREATMENT AND MANAGEMENT
# ══════════════════════════════════════════
topic_page(
    "Treatment and Management :-",
    [
        "The treatment of atypical cardiomyopathies in children is largely condition-specific, but several general principles apply. Heart failure is managed with ACE inhibitors, beta-blockers, and diuretics. Anticoagulation is indicated for patients with severely reduced ejection fraction, LVNC, or atrial fibrillation to prevent thromboembolic complications.",
        "Arrhythmia management is a key component: beta-blockers are used for most forms, while amiodarone or sotalol is reserved for more refractory ventricular arrhythmias. ICD implantation is mandatory in high-risk patients — those with prior cardiac arrest, syncope due to ventricular arrhythmia, or significant ventricular dysfunction.",
        "Restriction from competitive sports is recommended in ACM/ARVC and other arrhythmogenic conditions, as exercise accelerates disease progression and triggers potentially fatal arrhythmias.",
        "Cardiac transplantation remains the definitive treatment for end-stage cardiomyopathy refractory to medical therapy. Early listing is particularly important in RCM due to its poor prognosis. For metabolic and storage cardiomyopathies, disease-specific enzyme replacement therapy (e.g., alglucosidase alfa in Pompe disease, agalsidase in Fabry disease) can slow progression.",
        "Routine monitoring with echocardiography, Holter monitoring, and cardiac MRI is essential for tracking disease progression and guiding therapeutic decisions. Family screening with genetic testing is recommended given the high heritability of most atypical cardiomyopathies.",
    ]
)

# ══════════════════════════════════════════
# PAGE 9 — THANK YOU
# ══════════════════════════════════════════
use_bold(20)
c.setFillColorRGB(0, 0, 0)
c.drawCentredString(W / 2, H / 2, "THANK YOU")
c.showPage()

c.save()
print(f"Saved: {OUT}")
Running Command

python3 /home/daytona/workspace/cm_slides/build_cardiomyopathy_pdf.py 2>&1

Editing File

~/cm_slides/build_cardiomyopathy_pdf.py

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/cm_slides/build_cardiomyopathy_pdf.py'
Running Command

python3 /home/daytona/workspace/cm_slides/build_cardiomyopathy_pdf.py 2>&1 && ls -lh /home/daytona/workspace/cm_slides/Atypical_Cardiomyopathy_Pediatrics_PDF.pdf

Your PDF is ready. I apologize for the earlier mix-up.

Atypical Cardiomyopathy Pediatrics PDF

PDF Document · PDF

Here's how it mirrors your metabolic disorders PDF:
FeatureYour PDFThis PDF
FormatA4 portraitA4 portrait ✅
Page 1Cover: University name + topicJalalabad State University, Faculty of Medicine + topic ✅
Page 2Formal title page (Ministry header)Ministry of Education header, same details ✅
Pages 3–8Heading + paragraph body textSame structure ✅
Last page"THANK YOU""THANK YOU" ✅
Author/year/groupSnigdha Mandaokar, 4th, 8thSame ✅
Content pages:
  1. Introduction to atypical cardiomyopathies
  2. Left Ventricular Non-Compaction (LVNC)
  3. Arrhythmogenic Cardiomyopathy (ACM/ARVC)
  4. Restrictive Cardiomyopathy (RCM)
  5. Other Atypical Forms (Takotsubo, Myocarditis, Metabolic, PPCM)
  6. Treatment and Management
  7. Thank You

Add some related images on each page and make the background layout colour full. This pdf looks boring make it more attractive

Searching Images

LVNC left ventricular non-compaction echocardiogram trabeculations pediatric

Searching Images

ARVC arrhythmogenic right ventricular cardiomyopathy cardiac MRI epsilon wave ECG

Searching Images

restrictive cardiomyopathy biatrial enlargement echocardiogram pediatric

Searching Images

Takotsubo cardiomyopathy apical ballooning echocardiogram stress cardiomyopathy

Searching Images

pediatric heart cardiomyopathy cardiac anatomy illustration children

Running Command

cd /home/daytona/workspace/cm_slides && python3 -c " import subprocess, json, base64, os urls = [ ('intro', 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_71f481a4b30d9a8a6d668ef1d58e0e8be68350d15a9e56f1aa9c88d4975f1ec8.jpg'), ('lvnc', 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_94d0d4c659ecda38390bba36342535f0c5d3d9d51c431a093333d40eb61dd304.jpg'), ('arvc', 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_d65acbdb065967303a2a2b15238a47ac1ab3eb9106c3c61e87a6faacf2eac1b8.jpg'), ('rcm', 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_24ebe5d5c428d8222d2f458d7b08c986c1c4f84a18fb4e230f5839fa71b2addd.jpg'), ('takotsubo','https://cdn.orris.care/cdss_images/pmc_clinical_VQA_c6021993840345b8856726d8526734bbd273e014a562a1a7c11bf144d093da75.jpg'), ('treatment','https://cdn.orris.care/cdss_images/pmc_clinical_VQA_fd0924b6a2a09a191eccc73d1331f98a3e1c644246946d0d02fc0923d99071fb.jpg'), ] result = subprocess.run( ['node', '/home/daytona/skills/shared/scripts/fetch_images.js'] + [u for _,u in urls], capture_output=True, text=True, timeout=60 ) data = json.loads(result.stdout) os.makedirs('img_cache', exist_ok=True) for i, (name, url) in enumerate(urls): b64 = data[i]['base64'] img_data = base64.b64decode(b64.split(',',1)[1]) path = f'img_cache/{name}.jpg' with open(path, 'wb') as f: f.write(img_data) print(f'Saved {path}: {len(img_data)} bytes, error={data[i][\"error\"]}') " 2>&1

Writing File

~/cm_slides/build_colorful_pdf.py

"""
Colorful redesign of Atypical Cardiomyopathy PDF
- A4 portrait
- Each content page has:
    • Gradient-style colored header band
    • Side accent stripe
    • Medical image (right side)
    • Clean body text (left/full width below image row)
    • Color-coded page backgrounds (subtle tint)
- Cover: bold full-color design
- Formal title page: clean institutional look
"""

from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import A4
from reportlab.lib.utils import ImageReader
from reportlab.lib.colors import HexColor, white, black
import textwrap
import io

W, H = A4   # 595.28 x 841.89 pt
OUT = "/home/daytona/workspace/cm_slides/Atypical_Cardiomyopathy_Colorful.pdf"

# ── Palette ──────────────────────────────────────────────────────
NAVY       = HexColor("#0D2B55")
TEAL       = HexColor("#0B6E8A")
PURPLE     = HexColor("#5B2D8E")
CRIMSON    = HexColor("#B51212")
GOLD       = HexColor("#D4A017")
GREEN      = HexColor("#1A7A4A")
ORANGE     = HexColor("#C45C1A")
SLATE      = HexColor("#3A506B")
WHITE      = white
BLACK      = black

# Page-specific header colours (one per content page)
PAGE_COLORS = [NAVY, TEAL, PURPLE, CRIMSON, GREEN, ORANGE, SLATE]
# Matching light tints for page background
PAGE_TINTS  = [
    HexColor("#EAF0F8"), HexColor("#E6F4F8"), HexColor("#F0EAF8"),
    HexColor("#FAE8E8"), HexColor("#E8F5EC"), HexColor("#FDF0E6"),
    HexColor("#EBF0F5"),
]

c = canvas.Canvas(OUT, pagesize=A4)

# ── Helper: draw rounded rectangle ───────────────────────────────
def rounded_rect(x, y, w, h, r, fill_color, stroke_color=None):
    c.saveState()
    c.setFillColor(fill_color)
    if stroke_color:
        c.setStrokeColor(stroke_color)
        c.setLineWidth(0.5)
    else:
        c.setStrokeColor(fill_color)
    c.roundRect(x, y, w, h, r, fill=1, stroke=1 if stroke_color else 0)
    c.restoreState()

# ── Helper: wrapped text, returns next y ─────────────────────────
def draw_wrapped(text, x, y, max_w, font, size, leading, color=BLACK, max_y=40):
    c.saveState()
    c.setFont(font, size)
    c.setFillColor(color)
    chars_per = max(10, int(max_w / (size * 0.52)))
    for para in text.split('\n'):
        if not para.strip():
            y -= leading * 0.6
            continue
        for line in textwrap.wrap(para, width=chars_per) or ['']:
            if y < max_y:
                break
            c.drawString(x, y, line)
            y -= leading
        y -= leading * 0.35
    c.restoreState()
    return y

# ── Helper: page background tint ─────────────────────────────────
def bg_tint(tint_color):
    c.saveState()
    c.setFillColor(tint_color)
    c.rect(0, 0, W, H, fill=1, stroke=0)
    c.restoreState()

# ── Helper: full-width header band with title ─────────────────────
def header_band(title, subtitle, accent_color, page_num, total):
    band_h = 105
    # Main band
    c.saveState()
    c.setFillColor(accent_color)
    c.rect(0, H - band_h, W, band_h, fill=1, stroke=0)
    # Gold accent bottom stripe
    c.setFillColor(GOLD)
    c.rect(0, H - band_h - 4, W, 4, fill=1, stroke=0)
    # Left accent stripe
    c.setFillColor(WHITE)
    c.setFillAlpha(0.15)
    c.rect(0, H - band_h, 8, band_h, fill=1, stroke=0)
    c.setFillAlpha(1.0)
    # Title
    c.setFillColor(WHITE)
    c.setFont("Helvetica-Bold", 22)
    c.drawString(18, H - 52, title)
    # Subtitle
    c.setFont("Helvetica-Oblique", 11)
    c.setFillColor(HexColor("#DDDDDD"))
    c.drawString(18, H - 72, subtitle)
    # Page pill
    pill_x = W - 80
    c.setFillColor(WHITE)
    c.setFillAlpha(0.25)
    c.roundRect(pill_x, H - 42, 65, 22, 8, fill=1, stroke=0)
    c.setFillAlpha(1.0)
    c.setFillColor(WHITE)
    c.setFont("Helvetica-Bold", 9)
    c.drawCentredString(pill_x + 32, H - 34, f"Page {page_num} of {total}")
    c.restoreState()

# ── Helper: footer bar ────────────────────────────────────────────
def footer_bar(accent_color):
    c.saveState()
    c.setFillColor(accent_color)
    c.rect(0, 0, W, 28, fill=1, stroke=0)
    c.setFillColor(WHITE)
    c.setFont("Helvetica", 8)
    c.drawCentredString(W / 2, 10,
        "Atypical Forms of Cardiomyopathy in Children and Adolescents  |  4th Year MBBS  |  Snigdha Mandaokar")
    c.restoreState()

# ── Helper: embed image in a nice frame ──────────────────────────
def place_image(path, x, y, w, h, caption, accent_color):
    try:
        img = ImageReader(path)
        iw, ih = img.getSize()
        # Maintain aspect
        aspect = ih / iw
        new_h = w * aspect
        if new_h > h:
            new_h = h
            w = h / aspect
        # Frame
        pad = 4
        c.saveState()
        c.setFillColor(WHITE)
        c.setStrokeColor(accent_color)
        c.setLineWidth(1.5)
        c.roundRect(x - pad, y - pad - new_h, w + pad*2, new_h + pad*2, 4, fill=1, stroke=1)
        # Image
        c.drawImage(img, x, y - new_h, w, new_h, preserveAspectRatio=True, mask='auto')
        # Caption badge
        c.setFillColor(accent_color)
        c.roundRect(x - pad, y - new_h - pad - 16, w + pad*2, 17, 3, fill=1, stroke=0)
        c.setFillColor(WHITE)
        c.setFont("Helvetica-Oblique", 7.5)
        c.drawCentredString(x + w/2, y - new_h - pad - 8, caption)
        c.restoreState()
        return y - new_h - pad - 20
    except Exception as e:
        print(f"Image error {path}: {e}")
        return y

# ══════════════════════════════════════════════════════════════════
# PAGE 1 — COVER
# ══════════════════════════════════════════════════════════════════
# Deep dark background
c.saveState()
c.setFillColor(NAVY)
c.rect(0, 0, W, H, fill=1, stroke=0)
# Right side accent panel
c.setFillColor(HexColor("#112244"))
c.rect(W * 0.62, 0, W * 0.38, H, fill=1, stroke=0)
# Decorative circles
c.setFillColor(HexColor("#1A4080"))
c.setFillAlpha(0.4)
c.circle(W * 0.78, H * 0.72, 90, fill=1, stroke=0)
c.circle(W * 0.88, H * 0.25, 55, fill=1, stroke=0)
c.setFillAlpha(1.0)
# Gold accent strip
c.setFillColor(GOLD)
c.rect(0, H * 0.42, W * 0.62, 6, fill=1, stroke=0)
c.setFillColor(CRIMSON)
c.rect(0, H * 0.42 - 10, W * 0.62, 4, fill=1, stroke=0)
c.restoreState()

# University name
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 20)
c.drawString(28, H - 60, "Jalalabad State University")
c.setFont("Helvetica", 11)
c.setFillColor(HexColor("#AABBDD"))
c.drawString(28, H - 78, "Faculty of Medicine")

# Divider
c.setStrokeColor(GOLD)
c.setLineWidth(1.5)
c.line(28, H - 92, W * 0.58, H - 92)

# Main title
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 30)
c.drawString(28, H - 155, "ATYPICAL FORMS OF")
c.setFont("Helvetica-Bold", 30)
c.drawString(28, H - 192, "CARDIOMYOPATHY")
c.setFillColor(GOLD)
c.setFont("Helvetica-Bold", 18)
c.drawString(28, H - 225, "in Children and Adolescents")

# Topics list box
rounded_rect(28, H - 390, W * 0.56, 140, 8, HexColor("#1A3A6A"))
c.setFillColor(GOLD)
c.setFont("Helvetica-Bold", 10)
c.drawString(42, H - 275, "TOPICS COVERED")
topics = [
    "• Left Ventricular Non-Compaction (LVNC)",
    "• Arrhythmogenic Cardiomyopathy (ACM/ARVC)",
    "• Restrictive Cardiomyopathy (RCM)",
    "• Takotsubo & Myocarditis-related CMP",
    "• Metabolic / Storage Cardiomyopathies",
    "• Treatment & Management",
]
c.setFillColor(HexColor("#CCDDEE"))
c.setFont("Helvetica", 10)
ty = H - 294
for t in topics:
    c.drawString(42, ty, t)
    ty -= 16

# Author card
rounded_rect(28, H - 530, W * 0.56, 115, 8, HexColor("#0A2040"))
c.setFillColor(HexColor("#AABBDD"))
c.setFont("Helvetica", 10)
details = [
    ("Done by :", "Snigdha Mandaokar"),
    ("Year :",    "4th Year MBBS"),
    ("Group :",   "8th Group"),
    ("Subject :", "Pediatric Cardiology"),
]
ay = H - 438
for label, val in details:
    c.setFont("Helvetica-Bold", 10)
    c.setFillColor(GOLD)
    c.drawString(42, ay, label)
    c.setFont("Helvetica", 10)
    c.setFillColor(WHITE)
    c.drawString(115, ay, val)
    ay -= 18

# Bottom strip
c.setFillColor(CRIMSON)
c.rect(0, 0, W, 24, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Helvetica", 8)
c.drawCentredString(W / 2, 8, "4th Year MBBS  |  Pediatric Cardiology  |  Jalalabad State University")

c.showPage()

# ══════════════════════════════════════════════════════════════════
# PAGE 2 — FORMAL TITLE PAGE
# ══════════════════════════════════════════════════════════════════
bg_tint(HexColor("#F0F4FA"))

# Top institutional header band
c.saveState()
c.setFillColor(NAVY)
c.rect(0, H - 90, W, 90, fill=1, stroke=0)
c.setFillColor(GOLD)
c.rect(0, H - 94, W, 4, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 13)
c.drawCentredString(W/2, H - 30, "MINISTRY OF EDUCATION AND SCIENCE OF THE KYRGYZ REPUBLIC")
c.setFont("Helvetica", 11)
c.setFillColor(HexColor("#AABBDD"))
c.drawCentredString(W/2, H - 50, "JALALABAD STATE UNIVERSITY NAME B. OSMONOVA")
c.setFont("Helvetica-Oblique", 10)
c.drawCentredString(W/2, H - 68, "Faculty of Medicine")
c.restoreState()

# Central topic box
rounded_rect(50, H - 340, W - 100, 210, 10, WHITE, NAVY)
c.setFillColor(NAVY)
c.setFont("Helvetica-Bold", 12)
c.drawCentredString(W/2, H - 168, "TOPIC :-")
c.setFont("Helvetica-Bold", 16)
c.setFillColor(TEAL)
c.drawCentredString(W/2, H - 195, "Atypical Forms of Cardiomyopathy")
c.setFont("Helvetica-Bold", 16)
c.drawCentredString(W/2, H - 218, "in Children and Adolescents")
c.setFillColor(CRIMSON)
c.setFont("Helvetica", 10)
c.drawCentredString(W/2, H - 248, "A Clinical Overview for 4th Year MBBS Students")

# Divider line
c.setStrokeColor(GOLD)
c.setLineWidth(1.5)
c.line(80, H - 265, W - 80, H - 265)

# Author details
rounded_rect(100, H - 500, W - 200, 130, 8, HexColor("#EAF0F8"), TEAL)
rows = [
    ("Done by :",  "Snigdha Mandaokar"),
    ("Year :",     "4th Year"),
    ("Group :",    "8th Group"),
    ("Subject :",  "Pediatric Cardiology"),
    ("University :","Jalalabad State University"),
]
dy = H - 390
for label, val in rows:
    c.setFillColor(TEAL)
    c.setFont("Helvetica-Bold", 11)
    c.drawString(120, dy, label)
    c.setFillColor(NAVY)
    c.setFont("Helvetica", 11)
    c.drawString(220, dy, val)
    dy -= 20

# Footer
c.setFillColor(NAVY)
c.rect(0, 0, W, 28, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Helvetica", 8)
c.drawCentredString(W/2, 10, "Atypical Forms of Cardiomyopathy in Children and Adolescents  |  4th Year MBBS  |  Snigdha Mandaokar")

c.showPage()

# ══════════════════════════════════════════════════════════════════
# CONTENT PAGE BUILDER
# ══════════════════════════════════════════════════════════════════
def content_page(page_idx, title, subtitle, img_path, img_caption, paragraphs):
    accent = PAGE_COLORS[page_idx % len(PAGE_COLORS)]
    tint   = PAGE_TINTS[page_idx % len(PAGE_TINTS)]
    pg_num = page_idx + 3  # cover=1, title=2, content starts at 3
    total  = 9

    # Background tint
    bg_tint(tint)

    # Left accent stripe
    c.saveState()
    c.setFillColor(accent)
    c.rect(0, 28, 6, H - 28 - 109, fill=1, stroke=0)
    c.restoreState()

    # Header band
    header_band(title, subtitle, accent, pg_num, total)

    # Image (right column, top)
    img_x = W - 220
    img_y = H - 118
    img_w = 200
    img_max_h = 180
    img_bottom = place_image(img_path, img_x, img_y, img_w, img_max_h, img_caption, accent)

    # Section label pill
    rounded_rect(16, H - 130, 130, 22, 6, accent)
    c.setFillColor(WHITE)
    c.setFont("Helvetica-Bold", 9)
    c.drawString(24, H - 122, "◆  KEY CONTENT")

    # Body text — full width below image row
    text_top   = min(img_bottom - 12, H - 148)
    text_left  = 16
    text_right = W - 16
    text_w     = text_right - text_left

    y = text_top
    for para in paragraphs:
        if para.startswith("##"):
            # Subsection heading
            heading_text = para[2:].strip()
            y -= 4
            rounded_rect(text_left, y - 2, text_w, 20, 4, accent)
            c.setFillColor(WHITE)
            c.setFont("Helvetica-Bold", 10)
            c.drawString(text_left + 8, y + 4, heading_text)
            y -= 26
        else:
            y = draw_wrapped(para, text_left + 6, y, text_w - 12,
                             "Helvetica", 11, 17, BLACK, max_y=38)

    footer_bar(accent)
    c.showPage()

# ══════════════════════════════════════════════════════════════════
# PAGE 3 — INTRODUCTION
# ══════════════════════════════════════════════════════════════════
content_page(
    0,
    "Introduction",
    "Cardiomyopathies that affect the young — an overview",
    "/home/daytona/workspace/cm_slides/img_cache/intro.jpg",
    "Fig 1. Echocardiogram of a pediatric patient with dilated cardiomyopathy",
    [
        "Cardiomyopathies are diseases of the heart muscle that impair its ability to pump blood effectively. While dilated and hypertrophic cardiomyopathies are well recognized, several atypical forms occur in children and adolescents that are less common but clinically significant.",
        "The major atypical forms include: Left Ventricular Non-Compaction (LVNC), Arrhythmogenic Cardiomyopathy (ACM/ARVC), Restrictive Cardiomyopathy (RCM), Takotsubo Cardiomyopathy, Myocarditis-related Cardiomyopathy, and Metabolic/Storage Cardiomyopathies.",
        "These conditions are increasing in recognition due to advances in cardiac imaging — particularly echocardiography and cardiac MRI. Early diagnosis is essential because pediatric cardiomyopathies carry significant morbidity and mortality if left untreated.",
        "Long-term monitoring and appropriate management — including medications, device therapy, and in some cases cardiac transplantation — are crucial for improving outcomes in affected children and adolescents.",
    ]
)

# ══════════════════════════════════════════════════════════════════
# PAGE 4 — LVNC
# ══════════════════════════════════════════════════════════════════
content_page(
    1,
    "Left Ventricular Non-Compaction (LVNC)",
    "Spongy myocardium — arrest of normal fetal myocardial compaction",
    "/home/daytona/workspace/cm_slides/img_cache/lvnc.jpg",
    "Fig 2. Echo: Apical 4-chamber & PSAX views showing LVNC trabeculations",
    [
        "LVNC is a rare trabecular cardiomyopathy caused by arrest of normal myocardial compaction during fetal development (5–8 weeks of gestation). The result is a spongy myocardium with prominent trabeculations and deep intertrabecular recesses communicating with the ventricular cavity.",
        "It accounts for 1–7% of all pediatric cardiomyopathies. Genetic mutations in MYH7, MYBPC3, TAZ (Barth syndrome), and LDB3 are commonly identified. LVNC is associated with Barth syndrome, Danon disease, and mitochondrial disorders.",
        "The classic clinical triad is: heart failure, arrhythmias, and thromboembolism. Presentation is age-dependent — neonates may develop cardiogenic shock, while adolescents more typically present with heart failure or syncope.",
        "Diagnosis is based on echocardiography showing an NC:C ratio >2 (adults) or >1.4 (pediatric). Cardiac MRI with late gadolinium enhancement is the gold standard. Management includes ACE inhibitors, beta-blockers, anticoagulation, ICD for high-risk arrhythmias, and cardiac transplantation for refractory cases.",
    ]
)

# ══════════════════════════════════════════════════════════════════
# PAGE 5 — ARVC
# ══════════════════════════════════════════════════════════════════
content_page(
    2,
    "Arrhythmogenic Cardiomyopathy (ACM/ARVC)",
    "Leading cause of sudden cardiac death in young athletes — desmosomal disease",
    "/home/daytona/workspace/cm_slides/img_cache/arvc.jpg",
    "Fig 3. ECG epsilon waves & MRI fibrofatty RV replacement in ARVC",
    [
        "ACM/ARVC is a desmosomal disease characterized by fibrofatty replacement of the RV (and sometimes LV) myocardium. It is the #1 cause of sudden cardiac death (SCD) in young athletes. Desmosomal mutations — PKP2, DSP, DSG2, DSC2, JUP — impair cell-to-cell adhesion, leading to apoptosis accelerated by exercise-induced mechanical stress.",
        "The classic 'triangle of dysplasia' involves the RVOT, RV apex, and subtricuspid area. In pediatric ACM, LV-dominant or biventricular forms are more common than in adults.",
        "Diagnosis follows the 2010 Revised Task Force Criteria across six categories: structural abnormalities, tissue characterization, repolarization abnormalities (T-wave inversions V1–V4), depolarization abnormalities (epsilon wave — pathognomonic), arrhythmias (VT with LBBB morphology), and family history/genetics.",
        "Management: restriction from competitive sports, beta-blockers or antiarrhythmics (sotalol, amiodarone), ICD implantation in high-risk patients, catheter ablation for recurrent VT, and cardiac transplantation for end-stage disease.",
    ]
)

# ══════════════════════════════════════════════════════════════════
# PAGE 6 — RCM
# ══════════════════════════════════════════════════════════════════
content_page(
    3,
    "Restrictive Cardiomyopathy (RCM)",
    "Rarest pediatric CMP — diastolic dysfunction with preserved systolic function",
    "/home/daytona/workspace/cm_slides/img_cache/rcm.jpg",
    "Fig 4. CXR cardiomegaly & echo biatrial enlargement in pediatric RCM",
    [
        "RCM is the rarest pediatric cardiomyopathy. Stiff, non-compliant ventricles cause elevated filling pressures leading to biatrial enlargement and pulmonary venous hypertension. Systolic function is characteristically preserved.",
        "Etiology: idiopathic (most common in children), infiltrative diseases (amyloidosis, Gaucher, Fabry disease, glycogen storage disorders), fibrotic causes (post-radiation, post-myocarditis, scleroderma), and genetic mutations (TNNI3, MYH7, ACTC1, DES).",
        "Clinical features include exercise intolerance, dyspnea, fatigue, syncope, congestive heart failure signs (hepatomegaly, ascites, edema), atrial arrhythmias, and thromboembolic events. Key differential: constrictive pericarditis — septal bounce and pericardial calcification suggest pericarditis; tissue Doppler e/e' ratio >15 supports RCM.",
        "Investigations: echo showing biatrial enlargement with preserved ventricular dimensions, restrictive filling pattern (E/A >2, DT <150 ms), markedly elevated BNP/NT-proBNP. No disease-modifying therapy exists — cardiac transplantation is definitive. 5-year survival without transplant ~50%. RCM carries the worst prognosis of all pediatric cardiomyopathies.",
    ]
)

# ══════════════════════════════════════════════════════════════════
# PAGE 7 — OTHER ATYPICAL FORMS
# ══════════════════════════════════════════════════════════════════
content_page(
    4,
    "Other Atypical Forms",
    "Takotsubo · Myocarditis-related · Metabolic/Storage · PPCM",
    "/home/daytona/workspace/cm_slides/img_cache/takotsubo.jpg",
    "Fig 5. Echo: Apical ballooning — hallmark of Takotsubo cardiomyopathy",
    [
        "Takotsubo Cardiomyopathy: Rare in children. Stress-induced transient apical ballooning with normal coronaries. Triggers include seizures and emotional stress. Usually reversible in 4–8 weeks with supportive therapy, beta-blockers, and ACEi.",
        "Myocarditis-related CMP: Post-viral (Coxsackie B, adenovirus, SARS-CoV-2/MIS-C). Acute phase: DCM-like presentation. Chronic: fibrosis → arrhythmogenic phenotype. CMR shows T2 elevation + mid-wall LGE. Treatment: IVIG in fulminant myocarditis; immunosuppression in chronic disease.",
        "Metabolic & Storage Cardiomyopathies: Pompe disease (GSD II) — HCM-like, absent acid alpha-glucosidase. Fabry disease — HCM + renal/neuro involvement. Barth syndrome (X-linked, TAZ) — DCM + LVNC + neutropenia. Danon disease (LAMP2) — HCM + cognitive impairment. Mitochondrial CMP — multi-system, maternal inheritance. Enzyme replacement therapy available for several.",
        "Peripartum CMP (PPCM): Rare in adolescent pregnancies. LVEF <45% in last month or ≤5 months postpartum. Prolactin-mediated injury; bromocriptine used alongside standard HF therapy. ~50% normalize EF within 6 months.",
    ]
)

# ══════════════════════════════════════════════════════════════════
# PAGE 8 — TREATMENT & MANAGEMENT
# ══════════════════════════════════════════════════════════════════
content_page(
    5,
    "Treatment & Management",
    "Pharmacotherapy · Device therapy · Transplantation · Monitoring",
    "/home/daytona/workspace/cm_slides/img_cache/treatment.jpg",
    "Fig 6. Pediatric VAD & echo — mechanical support in end-stage cardiomyopathy",
    [
        "Heart failure management: ACE inhibitors, beta-blockers, and diuretics form the backbone. Anticoagulation is indicated for severely reduced ejection fraction, LVNC, or atrial fibrillation to prevent thromboembolism.",
        "Arrhythmia management: Beta-blockers are used for most forms. Amiodarone or sotalol for refractory ventricular arrhythmias. ICD implantation is mandatory in high-risk patients — prior cardiac arrest, syncope from ventricular arrhythmia, or significant ventricular dysfunction.",
        "Activity restriction: Competitive sports are contraindicated in ACM/ARVC and other arrhythmogenic conditions, as exercise accelerates disease progression and may trigger fatal arrhythmias.",
        "Cardiac transplantation is the definitive treatment for end-stage cardiomyopathy. Early listing is especially important in RCM. For metabolic/storage cardiomyopathies, enzyme replacement therapy (alglucosidase alfa in Pompe; agalsidase in Fabry) can slow progression.",
        "Long-term monitoring: Echocardiography, Holter monitoring, and cardiac MRI are essential for tracking disease progression and guiding therapy. Family screening with genetic testing is recommended given the high heritability of most atypical cardiomyopathies.",
    ]
)

# ══════════════════════════════════════════════════════════════════
# PAGE 9 — THANK YOU
# ══════════════════════════════════════════════════════════════════
bg_tint(HexColor("#EAF0F8"))
c.saveState()
c.setFillColor(NAVY)
c.rect(0, H - 80, W, 80, fill=1, stroke=0)
c.setFillColor(GOLD)
c.rect(0, H - 84, W, 4, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 13)
c.drawCentredString(W/2, H - 45, "Atypical Forms of Cardiomyopathy in Children and Adolescents")
c.setFont("Helvetica", 10)
c.setFillColor(HexColor("#AABBDD"))
c.drawCentredString(W/2, H - 63, "4th Year MBBS  |  Pediatric Cardiology  |  Snigdha Mandaokar")
c.restoreState()

# Big THANK YOU
rounded_rect(80, H - 380, W - 160, 180, 12, NAVY)
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 54)
c.drawCentredString(W/2, H - 275, "THANK YOU")
c.setFont("Helvetica-Oblique", 13)
c.setFillColor(GOLD)
c.drawCentredString(W/2, H - 310, "for your attention")

# Key takeaway box
rounded_rect(60, H - 540, W - 120, 120, 8, HexColor("#F0F4FA"), TEAL)
c.setFillColor(TEAL)
c.setFont("Helvetica-Bold", 11)
c.drawCentredString(W/2, H - 450, "Key Takeaways")
takeaways = [
    "• Early diagnosis and continuous monitoring are essential in pediatric cardiomyopathies",
    "• Each atypical form has a distinct pathophysiology, imaging signature, and management",
    "• Cardiac transplantation is the definitive option for end-stage disease",
]
c.setFont("Helvetica", 10)
c.setFillColor(NAVY)
ty = H - 470
for t in takeaways:
    c.drawCentredString(W/2, ty, t)
    ty -= 17

# Footer
c.setFillColor(NAVY)
c.rect(0, 0, W, 28, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Helvetica", 8)
c.drawCentredString(W/2, 10, "Atypical Forms of Cardiomyopathy in Children and Adolescents  |  4th Year MBBS  |  Snigdha Mandaokar")

c.showPage()
c.save()
print(f"Saved: {OUT}")
Running Command

cd /home/daytona/workspace/cm_slides && python3 build_colorful_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/cm_slides/Atypical_Cardiomyopathy_Colorful.pdf

Your colorful PDF is ready!

Atypical Cardiomyopathy Colorful

PDF Document · PDF

Here's what was redesigned — 9 pages total:
PageContentColor ThemeImage
1CoverDark navy + gold + crimson
2Formal title pageNavy + teal institutional
3IntroductionNavy bluePediatric echo (DCM)
4LVNCTealLVNC echo with trabeculations
5ACM/ARVCPurpleECG epsilon wave + MRI fibrofatty RV
6RCMCrimsonCXR cardiomegaly + echo biatrial enlargement
7Other Atypical FormsGreenTakotsubo apical ballooning echo
8Treatment & ManagementOrangePediatric VAD + echo
9Thank YouNavy
Design features added:
  • Colored header band (different color per page)
  • Tinted background per page (no more plain white)
  • Gold accent stripe under every header
  • Left accent sidebar stripe
  • Medical images framed with colored border + caption badge
  • Rounded section pills and callout boxes
  • Matching footer bar on every page

My name is Raghul Balaji.Make this pdf presentation into black and white and increase the size of the images . I don't want you to make change in any of the content. Don't spoil the originality

Reading File
Reading File
Running Command

cp /home/daytona/workspace/cm_slides/build_colorful_pdf.py /home/daytona/workspace/cm_slides/build_bw_pdf.py # Read full file to understand all color references wc -l /home/daytona/workspace/cm_slides/build_bw_pdf.py

Running Command

python3 - << 'PYEOF' with open('/home/daytona/workspace/cm_slides/build_bw_pdf.py', 'r') as f: src = f.read() # 1. Output file rename src = src.replace( 'OUT = "/home/daytona/workspace/cm_slides/Atypical_Cardiomyopathy_Colorful.pdf"', 'OUT = "/home/daytona/workspace/cm_slides/Atypical_Cardiomyopathy_BW.pdf"' ) # 2. Replace name everywhere src = src.replace("Snigdha Mandaokar", "Raghul Balaji") # 3. Replace full color palette with B&W equivalents color_map = { 'NAVY = HexColor("#0D2B55")': 'NAVY = HexColor("#111111")', 'TEAL = HexColor("#0B6E8A")': 'TEAL = HexColor("#222222")', 'PURPLE = HexColor("#5B2D8E")': 'PURPLE = HexColor("#333333")', 'CRIMSON = HexColor("#B51212")': 'CRIMSON = HexColor("#444444")', 'GOLD = HexColor("#D4A017")': 'GOLD = HexColor("#666666")', 'GREEN = HexColor("#1A7A4A")': 'GREEN = HexColor("#222222")', 'ORANGE = HexColor("#C45C1A")': 'ORANGE = HexColor("#333333")', 'SLATE = HexColor("#3A506B")': 'SLATE = HexColor("#444444")', # Page tints -> very light grey 'HexColor("#EAF0F8")': 'HexColor("#F5F5F5")', 'HexColor("#E6F4F8")': 'HexColor("#F5F5F5")', 'HexColor("#F0EAF8")': 'HexColor("#F5F5F5")', 'HexColor("#FAE8E8")': 'HexColor("#F5F5F5")', 'HexColor("#E8F5EC")': 'HexColor("#F5F5F5")', 'HexColor("#FDF0E6")': 'HexColor("#F5F5F5")', 'HexColor("#EBF0F5")': 'HexColor("#F5F5F5")', # Other inline hex colors 'HexColor("#112244")': 'HexColor("#222222")', 'HexColor("#1A4080")': 'HexColor("#555555")', 'HexColor("#0A2040")': 'HexColor("#111111")', 'HexColor("#1A3A6A")': 'HexColor("#222222")', 'HexColor("#AABBDD")': 'HexColor("#BBBBBB")', 'HexColor("#AABBCC")': 'HexColor("#BBBBBB")', 'HexColor("#CCDDEE")': 'HexColor("#CCCCCC")', 'HexColor("#DDDDDD")': 'HexColor("#CCCCCC")', 'HexColor("#F0F4FA")': 'HexColor("#F5F5F5")', 'HexColor("#EAF0F8")': 'HexColor("#F5F5F5")', 'HexColor("#F0F4FA")': 'HexColor("#F5F5F5")', 'HexColor("#2D2D2D")': 'HexColor("#111111")', } for old, new in color_map.items(): src = src.replace(old, new) # 4. Enlarge images: change img_w from 200 to 260, img_max_h from 180 to 240 src = src.replace('img_w = 200', 'img_w = 260') src = src.replace('img_max_h = 180', 'img_max_h = 240') # Also shift img_x left to accommodate wider image src = src.replace('img_x = W - 220', 'img_x = W - 278') with open('/home/daytona/workspace/cm_slides/build_bw_pdf.py', 'w') as f: f.write(src) print("Done. Lines:", src.count('\n')) PYEOF

Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.

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

Asking for Preferences
Here are 15 ENT patient case logs with Kyrgyz names, ready to print or copy:

══════════════════════════════════════════════════════════════════
                    ENT DEPARTMENT — PATIENT LOG
                 Jalalabad State University Hospital
                  Student: Raghul Balaji | 4th Year MBBS
══════════════════════════════════════════════════════════════════

─────────────────────────────────────────────────────────────────
CASE 01
─────────────────────────────────────────────────────────────────
Time            : 09:10 AM
Patient Name    : Айгүл Маматова (Aigul Mamatova)
Age             : 28 years | Female
BP              : 118/76 mmHg
Diagnosis       : Acute Tonsillitis
─────────────────────────────────────────────────────────────────
Chief Complaint : Severe sore throat for 3 days, difficulty
                  swallowing, and fever.
─────────────────────────────────────────────────────────────────
Clinical Findings:
  • Temperature: 38.6°C
  • Oropharynx: Bilateral tonsillar enlargement (Grade II),
    erythema, and exudative white patches on tonsils
  • Tender bilateral anterior cervical lymphadenopathy
  • Uvula midline, no peritonsillar bulge
─────────────────────────────────────────────────────────────────
Treatment Plan  :
  • Amoxicillin 500 mg TDS × 7 days
  • Paracetamol 500 mg SOS for fever/pain
  • Throat gargles with warm saline (4× daily)
  • Adequate oral hydration; soft diet
  • Review after 5 days; tonsillectomy counselling if recurrent
═════════════════════════════════════════════════════════════════

─────────────────────────────────────────────────────────────────
CASE 02
─────────────────────────────────────────────────────────────────
Time            : 09:45 AM
Patient Name    : Бакыт Дүйшөнов (Bakyt Duishonov)
Age             : 42 years | Male
BP              : 134/88 mmHg
Diagnosis       : Chronic Suppurative Otitis Media (CSOM) —
                  Tubotympanic type
─────────────────────────────────────────────────────────────────
Chief Complaint : Recurrent ear discharge from the right ear
                  for 6 months, associated with decreased hearing.
─────────────────────────────────────────────────────────────────
Clinical Findings:
  • Right ear: Mucopurulent discharge; central perforation of
    tympanic membrane (anteroinferior quadrant)
  • Left ear: Normal TM, no discharge
  • Weber test: Lateralizes to right (affected) ear
  • Rinne test: Negative on right (conductive hearing loss)
  • No facial nerve palsy; no mastoid tenderness
─────────────────────────────────────────────────────────────────
Treatment Plan  :
  • Aural toilet (dry mopping) of right ear
  • Ciprofloxacin ear drops 3 drops TDS × 2 weeks
  • Oral Amoxicillin-Clavulanate 625 mg BD × 7 days
  • Audiogram and high-resolution CT temporal bones
  • Refer to senior ENT for tympanoplasty counselling
  • Advise: keep ear dry, avoid swimming
═════════════════════════════════════════════════════════════════

─────────────────────────────────────────────────────────────────
CASE 03
─────────────────────────────────────────────────────────────────
Time            : 10:15 AM
Patient Name    : Нургүл Токтоматова (Nurgul Toktomatova)
Age             : 7 years | Female
BP              : 96/64 mmHg
Diagnosis       : Adenoid Hypertrophy with Obstructive
                  Sleep-Disordered Breathing
─────────────────────────────────────────────────────────────────
Chief Complaint : Mouth breathing, snoring at night, and nasal
                  obstruction for 4 months (reported by mother).
─────────────────────────────────────────────────────────────────
Clinical Findings:
  • Adenoid facies: open mouth posture, elongated face
  • Nasal endoscopy: large adenoid pad obstructing >75%
    of the nasopharyngeal airway
  • Bilateral tympanic membranes dull/retracted (Eustachian
    tube dysfunction)
  • Tonsils: Grade I–II bilaterally
  • No stridor at rest
─────────────────────────────────────────────────────────────────
Treatment Plan  :
  • Mometasone nasal spray 1 puff each nostril OD × 6 weeks
  • Montelukast 4 mg OD (adjunct for allergic component)
  • Lateral neck X-ray: confirm adenoid-nasopharyngeal ratio
  • Polysomnography if apnea episodes confirmed by parents
  • Surgical referral: adenoidectomy ± grommet insertion
═════════════════════════════════════════════════════════════════

─────────────────────────────────────────────────────────────────
CASE 04
─────────────────────────────────────────────────────────────────
Time            : 10:50 AM
Patient Name    : Эрлан Жакшылыков (Erlan Zhakshy lykov)
Age             : 55 years | Male
BP              : 148/92 mmHg
Diagnosis       : Epistaxis (Anterior) — Hypertension-related
─────────────────────────────────────────────────────────────────
Chief Complaint : Sudden onset bleeding from the left nostril
                  for 20 minutes, not stopping with pinching.
─────────────────────────────────────────────────────────────────
Clinical Findings:
  • Active bleeding from left nostril; Little's area erythematous
    with visible vessel on anterior nasal septum
  • BP at presentation: 164/98 mmHg (elevated)
  • No posterior pharyngeal blood clots visible
  • No nasal trauma history; no anticoagulant use
  • SpO₂: 98% on room air
─────────────────────────────────────────────────────────────────
Treatment Plan  :
  • Immediate: Seat patient upright, lean forward; pinch
    cartilaginous nose for 10–15 minutes
  • Silver nitrate cauterisation of bleeding vessel (Little's area)
  • Anterior nasal packing (BIPP/Vaseline gauze) if cautery fails
  • Amlodipine 5 mg OD — initiate antihypertensive therapy
  • BP monitoring every 30 min for 2 hours post-procedure
  • Refer to medicine for hypertension management
  • Avoid nose-blowing and strenuous activity for 5 days
═════════════════════════════════════════════════════════════════

─────────────────────────────────────────────────────────────────
CASE 05
─────────────────────────────────────────────────────────────────
Time            : 11:30 AM
Patient Name    : Зарина Асанова (Zarina Asanova)
Age             : 34 years | Female
BP              : 120/78 mmHg
Diagnosis       : Allergic Rhinitis (Perennial)
─────────────────────────────────────────────────────────────────
Chief Complaint : Persistent nasal blockage, watery nasal
                  discharge, sneezing, and itchy eyes for 1 year,
                  worse in dusty environments.
─────────────────────────────────────────────────────────────────
Clinical Findings:
  • Nasal mucosa pale and boggy; clear watery rhinorrhoea
  • Inferior turbinates hypertrophied bilaterally
  • Allergic salute sign present
  • Eyes: mild bilateral conjunctival injection
  • No nasal polyps visible on anterior rhinoscopy
  • Skin prick test: positive for house dust mite, mold
─────────────────────────────────────────────────────────────────
Treatment Plan  :
  • Fluticasone nasal spray 2 puffs each nostril OD
  • Cetirizine 10 mg OD (at bedtime)
  • Saline nasal irrigation BD
  • Allergen avoidance: dust-proof pillowcase, reduce carpets
  • Consider allergen immunotherapy if poorly controlled
    after 3 months
═════════════════════════════════════════════════════════════════

─────────────────────────────────────────────────────────────────
CASE 06
─────────────────────────────────────────────────────────────────
Time            : 12:05 PM
Patient Name    : Канат Осмонов (Kanat Osmonov)
Age             : 19 years | Male
BP              : 112/72 mmHg
Diagnosis       : Acute Otitis Externa (Swimmer's Ear)
─────────────────────────────────────────────────────────────────
Chief Complaint : Right ear pain and itching for 4 days,
                  worsened after swimming; slight discharge.
─────────────────────────────────────────────────────────────────
Clinical Findings:
  • Right ear: Tragal tenderness ++; pinna traction pain ++
  • EAC: Oedematous, erythematous; scant serous discharge
  • Tympanic membrane partially visible but intact
  • Left ear: Normal
  • No fever; no lymphadenopathy
─────────────────────────────────────────────────────────────────
Treatment Plan  :
  • Gentle aural toilet; suction clearance of debris
  • Ciprofloxacin + Dexamethasone ear drops 4 drops QID × 7 days
  • Wick insertion (Pope wick) if canal too swollen for drops
  • Oral ibuprofen 400 mg TDS for pain relief
  • Strict water precautions: ear plugs when bathing
  • Review in 7 days
═════════════════════════════════════════════════════════════════

─────────────────────────────────────────────────────────────────
CASE 07
─────────────────────────────────────────────────────────────────
Time            : 12:40 PM
Patient Name    : Гүлбарчын Исакова (Gulbarchyn Isakova)
Age             : 62 years | Female
BP              : 142/86 mmHg
Diagnosis       : Benign Paroxysmal Positional Vertigo (BPPV)
                  — Posterior semicircular canal (right)
─────────────────────────────────────────────────────────────────
Chief Complaint : Brief episodes of spinning dizziness triggered
                  by rolling over in bed and looking up, for 2 weeks.
─────────────────────────────────────────────────────────────────
Clinical Findings:
  • Dix-Hallpike test (right): Positive — upbeat-torsional
    nystagmus with 5-second latency, fatigable
  • Dix-Hallpike (left): Negative
  • Neurological exam: No focal deficits, gait normal
  • Otoscopy: Bilateral normal TMs
  • No hearing loss; no tinnitus
─────────────────────────────────────────────────────────────────
Treatment Plan  :
  • Epley canalith repositioning manoeuvre (right side) —
    performed in clinic; vertigo resolved post-procedure
  • Betahistine 16 mg TDS × 2 weeks (symptomatic relief)
  • Home Brandt-Daroff exercises (BD × 2 weeks)
  • Advise: avoid sudden head movements; fall precautions
  • BP follow-up with physician
  • Review in 2 weeks; repeat Dix-Hallpike to confirm resolution
═════════════════════════════════════════════════════════════════

─────────────────────────────────────────────────────────────────
CASE 08
─────────────────────────────────────────────────────────────────
Time            : 02:00 PM
Patient Name    : Мирлан Кадыров (Mirlan Kadyrov)
Age             : 38 years | Male
BP              : 126/80 mmHg
Diagnosis       : Deviated Nasal Septum (DNS) with
                  Secondary Sinusitis
─────────────────────────────────────────────────────────────────
Chief Complaint : Left-sided nasal obstruction since childhood,
                  now with recurrent headaches and facial pain
                  for 3 months.
─────────────────────────────────────────────────────────────────
Clinical Findings:
  • Anterior rhinoscopy: C-shaped DNS to the left; nasal spur
    at osteocartilaginous junction
  • Left turbinate: Compensatory hypertrophy
  • Facial tenderness over left maxillary sinus region
  • Nasal endoscopy: mucopus in left middle meatus
  • X-ray PNS (Waters view): Haziness of left maxillary sinus
─────────────────────────────────────────────────────────────────
Treatment Plan  :
  • Amoxicillin-Clavulanate 625 mg BD × 10 days
  • Mometasone nasal spray OD × 4 weeks
  • Saline nasal irrigation TDS
  • CT PNS (coronal cuts) to assess sinus disease extent
  • Surgical referral: Septoplasty ± FESS (Functional
    Endoscopic Sinus Surgery)
═════════════════════════════════════════════════════════════════

─────────────────────────────────────────────────────────────────
CASE 09
─────────────────────────────────────────────────────────────────
Time            : 02:35 PM
Patient Name    : Адалат Эгембердиева (Adalat Egemberdieva)
Age             : 15 years | Female
BP              : 108/68 mmHg
Diagnosis       : Peritonsillar Abscess (Quinsy) — Left side
─────────────────────────────────────────────────────────────────
Chief Complaint : Progressive severe sore throat for 5 days,
                  now with inability to open mouth fully and
                  muffled voice.
─────────────────────────────────────────────────────────────────
Clinical Findings:
  • Temperature: 39.1°C
  • Trismus present (mouth opening ~2 cm)
  • Left peritonsillar bulge with uvular deviation to the right
  • Left tonsil pushed inferomedially; fluctuance on palpation
  • Hot potato (muffled) voice
  • Tender left jugulodigastric lymph node
─────────────────────────────────────────────────────────────────
Treatment Plan  :
  • IV Benzylpenicillin 1.2 g QID + Metronidazole 500 mg TDS
  • IV Dexamethasone 8 mg stat (reduces oedema, trismus)
  • Needle aspiration of abscess under LA — 4 mL pus drained
  • IV fluids (maintenance); soft diet when tolerated
  • Upgrade to incision & drainage if aspiration insufficient
  • Tonsillectomy (interval) recommended after 6 weeks
    (quinsy tonsillectomy counselled)
═════════════════════════════════════════════════════════════════

─────────────────────────────────────────────────────────────────
CASE 10
─────────────────────────────────────────────────────────────────
Time            : 03:10 PM
Patient Name    : Темирбек Султанов (Temirbek Sultanov)
Age             : 47 years | Male
BP              : 138/84 mmHg
Diagnosis       : Sudden Sensorineural Hearing Loss (SSNHL)
                  — Left ear
─────────────────────────────────────────────────────────────────
Chief Complaint : Sudden complete hearing loss in the left ear
                  on waking this morning, associated with
                  tinnitus and mild vertigo.
─────────────────────────────────────────────────────────────────
Clinical Findings:
  • Otoscopy: Bilateral normal TMs; no discharge
  • Tuning fork:
    – Weber: Lateralizes to right (normal) ear
    – Rinne: AC > BC bilaterally (sensorineural pattern left)
  • Audiogram: Left ear — profound SNHL across all frequencies
  • MRI IAC: Ordered to exclude acoustic neuroma / MS
  • No facial palsy; no preceding URTI
─────────────────────────────────────────────────────────────────
Treatment Plan  :
  • Prednisolone 1 mg/kg/day (max 60 mg) OD × 7 days,
    then taper over 5 days — URGENT (within 24–48 hrs)
  • Intratympanic dexamethasone injection if systemic steroids
    contraindicated or fail
  • Carbogen (95% O₂ + 5% CO₂) inhalation therapy
  • Urgent audiogram and BERA (Brainstem Evoked Response)
  • Strict bed rest; avoid noise exposure
  • Prognosis counselling: 30–65% recovery with early treatment
═════════════════════════════════════════════════════════════════

─────────────────────────────────────────────────────────────────
CASE 11
─────────────────────────────────────────────────────────────────
Time            : 03:45 PM
Patient Name    : Жылдыз Бекова (Zhyldyz Bekova)
Age             : 31 years | Female
BP              : 116/74 mmHg
Diagnosis       : Vocal Cord Nodules (Singer's Nodules)
─────────────────────────────────────────────────────────────────
Chief Complaint : Progressive hoarseness of voice for 4 months,
                  worse with prolonged speaking; works as a
                  school teacher.
─────────────────────────────────────────────────────────────────
Clinical Findings:
  • Voice: Rough, breathy dysphonia; reduced volume
  • Indirect laryngoscopy / Flexible nasolaryngoscopy:
    Bilateral whitish nodules at the anterior 1/3–2/3
    junction of vocal cords ("kissing nodules")
  • Vocal cords mobile; no mucosal irregularity
  • No neck lymphadenopathy
  • GERD symptoms present (throat clearing, post-nasal drip)
─────────────────────────────────────────────────────────────────
Treatment Plan  :
  • Voice rest: reduce speaking to minimum for 2 weeks
  • Speech therapy (voice hygiene training) × 6–8 sessions
  • Pantoprazole 40 mg BD × 4 weeks (treat GERD component)
  • Adequate hydration; avoid caffeine and smoking
  • Microlaryngoscopy + excision if no improvement after
    6–8 weeks of conservative therapy
  • Occupational advice: voice amplifier at work
═════════════════════════════════════════════════════════════════

─────────────────────────────────────────────────────────────────
CASE 12
─────────────────────────────────────────────────────────────────
Time            : 04:20 PM
Patient Name    : Болот Чоротегин (Bolot Chorotegin)
Age             : 9 years | Male
BP              : 98/62 mmHg
Diagnosis       : Foreign Body Nose — Left nostril (bead)
─────────────────────────────────────────────────────────────────
Chief Complaint : Foul-smelling unilateral nasal discharge from
                  left nostril for 10 days (reported by mother;
                  child denies inserting anything).
─────────────────────────────────────────────────────────────────
Clinical Findings:
  • Left nostril: Purulent malodorous discharge; mucosa
    erythematous and swollen
  • Anterior rhinoscopy: Small round blue bead visible in
    left nasal cavity, anterior floor
  • Right nostril: Normal
  • No signs of respiratory distress
─────────────────────────────────────────────────────────────────
Treatment Plan  :
  • Mother's kiss technique attempted — unsuccessful
  • Removal under direct visualisation using Jobson-Horne
    probe and Tilley's forceps; bead extracted successfully
  • Nasal mucosa inspected post-removal: intact, no ulceration
  • Saline nasal drops BD × 3 days
  • Parent counselling: keep small objects away from child
  • No antibiotics needed (discharge resolved on removal)
═════════════════════════════════════════════════════════════════

─────────────────────────────────────────────────────────────────
CASE 13
─────────────────────────────────────────────────────────────────
Time            : 04:55 PM
Patient Name    : Салтанат Токтогулова (Saltanat Toktogulova)
Age             : 53 years | Female
BP              : 150/94 mmHg
Diagnosis       : Chronic Rhinosinusitis with Nasal Polyposis
─────────────────────────────────────────────────────────────────
Chief Complaint : Complete nasal blockage, loss of smell, and
                  chronic headache for over 1 year; not
                  responding to prior nasal sprays.
─────────────────────────────────────────────────────────────────
Clinical Findings:
  • Anterior rhinoscopy: Bilateral pale grey semi-translucent
    polyps prolapsing from middle meatus; Grade III polyposis
  • Anosmia confirmed (smell identification test)
  • CT PNS: Bilateral opacification of ethmoid and maxillary
    sinuses; osteomeatal complex blocked bilaterally
  • No features of malignancy (irregular margins, bony erosion)
─────────────────────────────────────────────────────────────────
Treatment Plan  :
  • Prednisolone 30 mg OD × 14 days (oral steroid reduction)
  • Mometasone nasal spray 2 puffs BD (maintenance long-term)
  • Saline nasal irrigation TDS
  • Allergy evaluation; Aspirin sensitivity testing
  • Surgical referral: FESS (bilateral) — polypectomy +
    ethmoidectomy + middle meatal antrostomy
  • Post-FESS steroid nasal spray indefinitely to prevent
    recurrence
  • BP follow-up with physician
═════════════════════════════════════════════════════════════════

─────────────────────────────────────────────────────────────────
CASE 14
─────────────────────────────────────────────────────────────────
Time            : 05:30 PM
Patient Name    : Улукбек Мамытбеков (Ulukbek Mamytbekov)
Age             : 24 years | Male
BP              : 122/78 mmHg
Diagnosis       : Acute Laryngitis with Dysphonia
─────────────────────────────────────────────────────────────────
Chief Complaint : Complete loss of voice (aphonia) for 2 days
                  following a cold; mild throat pain and dry
                  cough.
─────────────────────────────────────────────────────────────────
Clinical Findings:
  • Temperature: 37.8°C (low-grade fever)
  • Voice: Aphonic; forced whisper only
  • Flexible laryngoscopy: Bilateral vocal cords erythematous
    and oedematous; no ulcers, no mass, no stridor
  • Anterior cervical mild lymphadenopathy
  • No respiratory distress; SpO₂ 99%
─────────────────────────────────────────────────────────────────
Treatment Plan  :
  • Complete voice rest × 5–7 days (absolute silence)
  • Steam inhalation TDS × 5 days
  • Benzydamine hydrochloride throat spray (anti-inflammatory)
  • Paracetamol 500 mg TDS for discomfort
  • Avoid whispering (as harmful as speaking)
  • Adequate hydration; humidifier advised
  • Reassess in 10 days; laryngoscopy if dysphonia persists
    > 3 weeks (exclude malignancy)
═════════════════════════════════════════════════════════════════

─────────────────────────────────────────────────────────────────
CASE 15
─────────────────────────────────────────────────────────────────
Time            : 06:00 PM
Patient Name    : Нурбек Эсенгулов (Nurbek Esengulov)
Age             : 16 years | Male
BP              : 110/70 mmHg
Diagnosis       : Otitis Media with Effusion (Glue Ear) —
                  Bilateral
─────────────────────────────────────────────────────────────────
Chief Complaint : Bilateral hearing difficulty and a sensation
                  of fullness in both ears for 2 months;
                  teacher reports inattentiveness in class.
─────────────────────────────────────────────────────────────────
Clinical Findings:
  • Otoscopy: Bilateral amber/yellow TMs, retracted; loss of
    light reflex; fluid level visible behind left TM
  • Rinne: AC < BC bilaterally (conductive hearing loss)
  • Weber: Midline (bilateral equal loss)
  • Pure Tone Audiogram: Bilateral 30–35 dB conductive HL
  • Tympanogram: Bilateral type B (flat curves)
  • Nasopharyngoscopy: Mild adenoid hypertrophy
─────────────────────────────────────────────────────────────────
Treatment Plan  :
  • Watchful waiting for 6–8 weeks (first-line if < 3 months)
  • Autoinflation (Valsalva / Otovent balloon) TDS
  • Intranasal steroid spray (Mometasone) OD × 6 weeks
  • Adenoidectomy + bilateral grommet (ventilation tube)
    insertion if no resolution at 8-week review
  • Hearing therapy and classroom seating advice
    (front row, face teacher)
  • Audiological re-evaluation at 8-week follow-up
══════════════════════════════════════════════════════════════════
                      END OF DAILY LOG
              ENT Department | Jalalabad State University
══════════════════════════════════════════════════════════════════

15 cases covering diverse ENT presentations:
#DiagnosisKey Teaching Point
1Acute TonsillitisExudative, Group A Strep
2CSOM TubotympanicCentral perforation, safe type
3Adenoid HypertrophyAdenoid facies, pediatric
4Anterior EpistaxisLittle's area, hypertensive
5Allergic RhinitisPerennial, dust mite
6Otitis ExternaSwimmer's ear, tragal tenderness
7BPPVEpley manoeuvre, Dix-Hallpike
8DNS + SinusitisSeptoplasty + FESS
9Peritonsillar AbscessQuinsy, trismus, hot potato voice
10SSNHLSteroid emergency within 48 hrs
11Vocal Cord NodulesTeacher, voice therapy
12Foreign Body NoseChild, bead, mother's kiss
13Nasal PolyposisGrade III, FESS indication
14Acute LaryngitisAphonia, voice rest
15Glue Ear (OME)Grommets, tympanogram type B
All names are authentic Kyrgyz names. Let me know if you want this exported as a PDF or Word document, or if you want to add more cases or adjust any details!

Export these 15 cases as a printable PDF document

Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.

Purchase a top-up for immediate access to convert the 15 ENT cases to PDF

Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.
attachment
attachment

Don't change the originality just make sure every text and number looks same and font and font side similar if not correct only those and give me a flawless image

Running Command

ls /home/daytona/workspace/ && pip show reportlab 2>&1 | head -3

Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.
This is a shared conversation. Sign in to Orris to start your own chat.