Take second PPT as the reference and make the SOAP analysis on the sandhya case sheet
python3 -c " import pdfplumber with pdfplumber.open('/tmp/workspace/attachments/7a031ae3-ca05-4ad9-97d2-3e811e0b5695/Sandhya .pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages, 1): text = page.extract_text() print(f'--- PAGE {i} ---') print(text) print() "
python3 -c " from pptx import Presentation prs = Presentation('/tmp/workspace/attachments/7a031ae3-ca05-4ad9-97d2-3e811e0b5695/5_6095778492585089495 (1).pptx') print(f'Total slides: {len(prs.slides)}') for i, slide in enumerate(prs.slides, 1): print(f'--- SLIDE {i} ---') for shape in slide.shapes: if shape.has_text_frame and shape.text_frame.text.strip(): print(f'[{shape.name}]: {shape.text_frame.text}') print() "
python3 -c " from pypdf import PdfReader reader = PdfReader('/tmp/workspace/attachments/7a031ae3-ca05-4ad9-97d2-3e811e0b5695/Sandhya .pdf') print(f'Pages: {len(reader.pages)}') # Check if there are images for i, page in enumerate(reader.pages[:5], 1): print(f'Page {i}: images={len(page.images)}, text={repr(page.extract_text()[:200])}') "
python3 -c " import os from pypdf import PdfReader reader = PdfReader('/tmp/workspace/attachments/7a031ae3-ca05-4ad9-97d2-3e811e0b5695/Sandhya .pdf') os.makedirs('/tmp/workspace/sandhya_pages', exist_ok=True) # Extract images from first 20 pages for i, page in enumerate(reader.pages[:20], 1): if page.images: img = page.images[0] out = f'/tmp/workspace/sandhya_pages/page_{i:02d}.jpg' with open(out, 'wb') as f: f.write(img.data) print(f'Saved page {i}: {out} ({len(img.data)} bytes)') print('Done') "
python3 -c " # Try using pdf2image and pytesseract for OCR import subprocess result = subprocess.run(['python3', '-c', 'import pytesseract; print(\"pytesseract available\")'], capture_output=True, text=True) print('pytesseract:', result.stdout, result.stderr) result2 = subprocess.run(['python3', '-c', 'import pdf2image; print(\"pdf2image available\")'], capture_output=True, text=True) print('pdf2image:', result2.stdout, result2.stderr) result3 = subprocess.run(['python3', '-c', 'from PIL import Image; print(\"PIL available\")'], capture_output=True, text=True) print('PIL:', result3.stdout, result3.stderr) "
pip install --user pytesseract 2>&1 | tail -3; tesseract --version 2>&1 | head -2
python3 -c " # Try using markitdown as another approach import subprocess result = subprocess.run(['python3', '-m', 'markitdown', '/tmp/workspace/attachments/7a031ae3-ca05-4ad9-97d2-3e811e0b5695/Sandhya .pdf'], capture_output=True, text=True) print('STDOUT:', result.stdout[:3000]) print('STDERR:', result.stderr[:1000]) "
python3 -c " # Use pdf2image to convert pages then use PIL to encode as base64 for display from pdf2image import convert_from_path import base64, io pages = convert_from_path('/tmp/workspace/attachments/7a031ae3-ca05-4ad9-97d2-3e811e0b5695/Sandhya .pdf', first_page=1, last_page=5, dpi=200) for i, page in enumerate(pages, 1): page.save(f'/tmp/workspace/sandhya_pages/hires_page_{i:02d}.png') print(f'Saved hires page {i}') print('Done') "
python3 -c " from PIL import Image import os # Make smaller compressed versions for i in range(1, 6): path = f'/tmp/workspace/sandhya_pages/hires_page_{i:02d}.png' if os.path.exists(path): img = Image.open(path) # Resize to smaller ratio = 800 / max(img.size) new_size = (int(img.size[0]*ratio), int(img.size[1]*ratio)) img_resized = img.resize(new_size, Image.LANCZOS) out = f'/tmp/workspace/sandhya_pages/small_page_{i:02d}.jpg' img_resized.save(out, 'JPEG', quality=85) print(f'Page {i}: {img.size} -> {new_size}, saved {os.path.getsize(out)} bytes to {out}') "
python3 -c " from pdf2image import convert_from_path from PIL import Image import os # Convert pages 6-20 and make small versions pages = convert_from_path('/tmp/workspace/attachments/7a031ae3-ca05-4ad9-97d2-3e811e0b5695/Sandhya .pdf', first_page=6, last_page=20, dpi=200) for i, page in enumerate(pages, 6): ratio = 800 / max(page.size) new_size = (int(page.size[0]*ratio), int(page.size[1]*ratio)) page_resized = page.resize(new_size, Image.LANCZOS) out = f'/tmp/workspace/sandhya_pages/small_page_{i:02d}.jpg' page_resized.save(out, 'JPEG', quality=85) print(f'Saved page {i}') print('Done') "
python3 << 'PYEOF' from pptx import Presentation from pptx.util import Inches, Pt, Emu from pptx.dml.color import RGBColor from pptx.enum.text import PP_ALIGN from pptx.util import Inches, Pt from copy import deepcopy import copy # Load the reference PPT to use as template prs = Presentation('/tmp/workspace/attachments/7a031ae3-ca05-4ad9-97d2-3e811e0b5695/5_6095778492585089495 (1).pptx') # Check slide dimensions print(f"Slide width: {prs.slide_width.inches:.2f} in") print(f"Slide height: {prs.slide_height.inches:.2f} in") print(f"Number of slides: {len(prs.slides)}") # Check slide layouts print("\nSlide layouts:") for i, layout in enumerate(prs.slide_layouts): print(f" {i}: {layout.name}") PYEOF
| Field | Details |
|---|---|
| Patient | Mrs. K. Sandhiya, 27/F |
| IP No. | IP260406067 / UHID: 2507170487 |
| Admitted | 06-Apr-2026, Female Medical Unit-1 |
| Diagnosis | ALE of BA (Acute Exacerbation of Bronchial Asthma) |
| Complaints | Chest tightness, cough with expectoration, running nose x 6 days; fever 3 days ago; weight loss 8kg/20 days; anorexia; nausea; insomnia |
| Past History | Known wheezer x 14 years on inhaler; no DM/HTN/seizures |
| Vitals | Temp 98°F, BP 110/60, PR 86/min, RR 20/min, SpO2 98%, Wt 59kg |
| Systemic | CVS S1S2+; RS: BAE+ bilateral scattered wheeze; P/A: soft, non-tender; CNS: NFND |
| Medications | Inj. Taxim 1g IV BD, Inj. Hydrocort 100mg IV BD, Inj. MgSO4 2g IV OD, Inj. Pan 40mg IV BD, Inj. Deriphylline 2cc IV BD, T. Azee 500mg, T. Montelson, T. Pulmolear, T. Paracetamol 500mg, Inj. Emeset 4mg, Neb. Duolin+Budecort Q8H, Neb. NAC TDS, Syp. Ascoril 5ml TDS |
| Investigations | CBC, RBS, CRP, RFT, LFT, S. Electrolytes, CXR-PA, ECG, Urine R/E, Sputum C/S |
Continue
mkdir -p /tmp/workspace/sandhya_soap && python3 << 'PYEOF' from pptx import Presentation from pptx.util import Inches, Pt, Emu from pptx.dml.color import RGBColor from pptx.enum.text import PP_ALIGN from pptx.oxml.ns import qn from pptx.util import Inches, Pt from lxml import etree import copy # ── Colours matching reference PPT ────────────────────────────────────── DARK_BLUE = RGBColor(0x1F, 0x39, 0x64) # title slide bg MID_BLUE = RGBColor(0x2E, 0x74, 0xB5) # section headers LIGHT_BLUE = RGBColor(0xBD, 0xD7, 0xEE) # subtle highlight WHITE = RGBColor(0xFF, 0xFF, 0xFF) NEAR_BLACK = RGBColor(0x10, 0x10, 0x10) YELLOW = RGBColor(0xFF, 0xC0, 0x00) # accent # ── Helpers ────────────────────────────────────────────────────────────── def new_prs(): prs = Presentation() prs.slide_width = Inches(13.33) prs.slide_height = Inches(7.50) return prs def blank_slide(prs): layout = prs.slide_layouts[6] # Blank return prs.slides.add_slide(layout) def set_bg(slide, color: RGBColor): bg = slide.background fill = bg.fill fill.solid() fill.fore_color.rgb = color def add_textbox(slide, text, l, t, w, h, font_size=20, bold=False, color=WHITE, align=PP_ALIGN.LEFT, wrap=True): txb = slide.shapes.add_textbox(Inches(l), Inches(t), Inches(w), Inches(h)) tf = txb.text_frame tf.word_wrap = wrap p = tf.paragraphs[0] p.alignment = align run = p.add_run() run.text = text run.font.size = Pt(font_size) run.font.bold = bold run.font.color.rgb = color return txb def add_rect(slide, l, t, w, h, fill_color: RGBColor, line_color=None): shape = slide.shapes.add_shape( 1, # MSO_SHAPE_TYPE.RECTANGLE Inches(l), Inches(t), Inches(w), Inches(h)) shape.fill.solid() shape.fill.fore_color.rgb = fill_color if line_color: shape.line.color.rgb = line_color else: shape.line.fill.background() return shape def add_para(tf, text, font_size=16, bold=False, color=NEAR_BLACK, align=PP_ALIGN.LEFT, space_before=0): p = tf.add_paragraph() p.alignment = align p.space_before = Pt(space_before) run = p.add_run() run.text = text run.font.size = Pt(font_size) run.font.bold = bold run.font.color.rgb = color return p def section_slide(prs, title): """Dark blue slide with centred white title – mirrors reference section headers.""" slide = blank_slide(prs) set_bg(slide, DARK_BLUE) # Decorative top bar add_rect(slide, 0, 0, 13.33, 0.18, MID_BLUE) # Bottom bar add_rect(slide, 0, 7.32, 13.33, 0.18, MID_BLUE) # Title centred add_textbox(slide, title, 0.5, 2.8, 12.33, 1.5, font_size=44, bold=True, color=WHITE, align=PP_ALIGN.CENTER) return slide def content_slide(prs, title, body_lines, title_color=MID_BLUE, font_size=17, bullet=True): """White content slide with blue title bar.""" slide = blank_slide(prs) set_bg(slide, WHITE) # Title bar add_rect(slide, 0, 0, 13.33, 1.0, DARK_BLUE) add_textbox(slide, title, 0.3, 0.08, 12.7, 0.84, font_size=28, bold=True, color=WHITE, align=PP_ALIGN.LEFT) # Bottom accent add_rect(slide, 0, 7.32, 13.33, 0.18, MID_BLUE) # Body text box txb = slide.shapes.add_textbox(Inches(0.4), Inches(1.15), Inches(12.5), Inches(6.0)) tf = txb.text_frame tf.word_wrap = True first = True for line in body_lines: if first: p = tf.paragraphs[0] first = False else: p = tf.add_paragraph() p.alignment = PP_ALIGN.LEFT p.space_before = Pt(2) run = p.add_run() prefix = "• " if bullet and line and not line.startswith(" ") else "" run.text = prefix + line run.font.size = Pt(font_size) run.font.color.rgb = NEAR_BLACK return slide def two_col_slide(prs, title, left_title, left_lines, right_title, right_lines, font_size=15): slide = blank_slide(prs) set_bg(slide, WHITE) add_rect(slide, 0, 0, 13.33, 1.0, DARK_BLUE) add_textbox(slide, title, 0.3, 0.08, 12.7, 0.84, font_size=28, bold=True, color=WHITE, align=PP_ALIGN.LEFT) add_rect(slide, 0, 7.32, 13.33, 0.18, MID_BLUE) # Left column add_rect(slide, 0.3, 1.1, 5.9, 0.45, MID_BLUE) add_textbox(slide, left_title, 0.35, 1.1, 5.8, 0.45, font_size=16, bold=True, color=WHITE) txb = slide.shapes.add_textbox(Inches(0.4), Inches(1.6), Inches(5.8), Inches(5.6)) tf = txb.text_frame; tf.word_wrap = True; first = True for line in left_lines: p = tf.paragraphs[0] if first else tf.add_paragraph() first = False p.alignment = PP_ALIGN.LEFT; p.space_before = Pt(2) run = p.add_run(); run.text = "• " + line if line else "" run.font.size = Pt(font_size); run.font.color.rgb = NEAR_BLACK # Right column add_rect(slide, 6.8, 1.1, 6.2, 0.45, MID_BLUE) add_textbox(slide, right_title, 6.85, 1.1, 6.1, 0.45, font_size=16, bold=True, color=WHITE) txb2 = slide.shapes.add_textbox(Inches(6.9), Inches(1.6), Inches(6.1), Inches(5.6)) tf2 = txb2.text_frame; tf2.word_wrap = True; first2 = True for line in right_lines: p = tf2.paragraphs[0] if first2 else tf2.add_paragraph() first2 = False p.alignment = PP_ALIGN.LEFT; p.space_before = Pt(2) run = p.add_run(); run.text = "• " + line if line else "" run.font.size = Pt(font_size); run.font.color.rgb = NEAR_BLACK return slide # ════════════════════════════════════════════════════════════════════════ prs = new_prs() # ── SLIDE 1 : Title ────────────────────────────────────────────────────── slide1 = blank_slide(prs) set_bg(slide1, DARK_BLUE) add_rect(slide1, 0, 0, 13.33, 0.20, MID_BLUE) add_rect(slide1, 0, 7.30, 13.33, 0.20, MID_BLUE) # Gold horizontal rule add_rect(slide1, 1.5, 2.55, 10.33, 0.06, YELLOW) add_rect(slide1, 1.5, 4.85, 10.33, 0.06, YELLOW) add_textbox(slide1, "SECOND SESSIONAL PRACTICAL EXAMINATION", 0.5, 0.6, 12.33, 0.9, font_size=24, bold=True, color=YELLOW, align=PP_ALIGN.CENTER) add_textbox(slide1, "PHARMACOTHERAPEUTICS - I", 0.5, 1.55, 12.33, 0.9, font_size=32, bold=True, color=WHITE, align=PP_ALIGN.CENTER) add_textbox(slide1, "SOAP ANALYSIS", 0.5, 2.65, 12.33, 0.9, font_size=40, bold=True, color=WHITE, align=PP_ALIGN.CENTER) add_textbox(slide1, "CASE OF ACUTE EXACERBATION OF BRONCHIAL ASTHMA", 0.5, 3.55, 12.33, 0.75, font_size=22, bold=True, color=YELLOW, align=PP_ALIGN.CENTER) add_textbox(slide1, "Presented by,\nSandhiya K\n2nd Pharm D", 0.5, 4.95, 12.33, 1.3, font_size=18, bold=False, color=WHITE, align=PP_ALIGN.CENTER) # ── SLIDE 2 : SUBJECTIVE section header ────────────────────────────────── section_slide(prs, "SUBJECTIVE") # ── SLIDE 3 : Chief Complaints + HPI ───────────────────────────────────── content_slide(prs, "SUBJECTIVE", [ "Patient: Mrs. K. Sandhiya | Age/Sex: 27 years / Female", "IP No.: IP260406067 | UHID: 2507170487", "Date of Admission: 06-April-2026 at 1:08 PM", "Ward: Female Medical Unit-1 (RM-I), Nandha Medical College & Hospital", "Unit Chief: Dr. N. Sathya", "", "CHIEF COMPLAINTS", " c/o Chest tightness ─ 6 days", " c/o Cough with expectoration ─ 6 days", " c/o Running nose ─ 6 days", " c/o Fever ─ 3 days back", " H/O Loss of weight (8 kg in 20 days)", " H/O Loss of appetite", " H/O Nausea", " H/O Insomnia | H/O Disturbed sleep x 10 days", " No H/O chest pain / palpitation", " No H/O abdominal pain / burning micturition", " No H/O pet / dust / allergy exposure", ], font_size=16) # ── SLIDE 4 : Past History + Personal History ──────────────────────────── two_col_slide(prs, "SUBJECTIVE – History", "HISTORY OF PRESENT ILLNESS", [ "Patient with k/c/o Bronchial Asthma since 14 years", "On inhaler (Tiova Rotacaps 2 puff OD + Budamate Rotacaps 2 puff OD)", "Presented with chest tightness, cough with expectoration, running nose × 6 days", "Fever 3 days back", "Received from Respiratory Medicine Dept → General Medicine ward", "Shortness of breath × 3 days", "No specific complaints on review", ], "PAST HISTORY", [ "Known wheeze / Bronchial Asthma – 14 years", "On inhaler treatment", "NKICLO: DM, HTN, Seizures", "Nil surgical history", "Nil surgical / blood transfusion history", "", "FAMILY HISTORY: Nil significant", "", "PERSONAL HISTORY", "Mixed diet", "Insomnia present", "Normal bowel & bladder habits", "Menstrual History: Menarche @ 14 yrs; Regular 3-4/30; no clots/pain; 5 pads/day", ], font_size=14) # ── SLIDE 5 : OBJECTIVE section header ─────────────────────────────────── section_slide(prs, "OBJECTIVE") # ── SLIDE 6 : General Examination + Vitals ─────────────────────────────── two_col_slide(prs, "OBJECTIVE – General & Systemic Examination", "GENERAL EXAMINATION", [ "Conscious, Oriented, Afebrile", "Temperature : 98 °F", "Blood Pressure : 110/60 mmHg", "Pulse Rate : 86 beats/min", "Respiratory Rate : 20 breaths/min", "SpO₂ : 98 % @ Room Air", "Weight : 59 kg", "", "No Clubbing", "No Cyanosis", "No Jaundice", "No Pedal Oedema", "No Anaemia (clinically)", ], "SYSTEMIC EXAMINATION", [ "CVS : S1 S2 heard, no murmur", "RS : BAE +, Bilateral scattered wheeze present", "P/A : Soft, Non-tender", "CNS : No focal neurological deficit (NFND)", "", "On review (06-04-2026 8 PM):", " BP 110/80 | PR 82 | RR 20 | SpO₂ 98% | T 97.6 °F", " RS: BAE+, Bilateral wheeze +", "", "On review (07-04-2026):", " BP 120/80 | PR 85 | RR 19 | SpO₂ 99% | T 97.1 °F", " RS: BAE+, B/L wheeze +", "", "On review (08-04-2026):", " BP 110/70 | PR 79 | RR 18 | SpO₂ 98% | T 97.5 °F", " RS: BAE+, wheeze mild", ], font_size=13) # ── SLIDE 7 : Lab Investigations ───────────────────────────────────────── two_col_slide(prs, "OBJECTIVE – Laboratory Investigations", "HAEMATOLOGY & BIOCHEMISTRY (06-04-2026)", [ "CBC:", " Hb : 10.9 g/dL (↓ – Microcytic Anaemia)", " WBC : 9,800 cells/µL", " Platelets : 5,24,000 /µL", " PCV : 32.4 %", " MCV : 67.7 fL (↓)", " MCH : 22.8 pg (↓)", "", "RBS : 148 mg/dL", "CRP : Negative (4.44 mg/dL)", "", "LFT:", " Total Bilirubin : 0.44 mg/dL", " SGOT : 14 IU/L", " SGPT : 13 IU/L", " S. Globulin : 2.3 g/dL", "", "RFT:", " S. Urea : 26 mg/dL", " S. Creatinine : 0.7 mg/dL", ], "INVESTIGATIONS (cont.)", [ "Serum Electrolytes:", " Na⁺ : 138 mEq/L (Normal)", " K⁺ : 3.8 mEq/L (Normal)", " Cl⁻ : 104 mEq/L (Normal)", "", "Urine Routine/Examination:", " pH : 5.0 – 5.5", " Protein : Trace", " Sugar : Nil", " Ketone : Negative", " Pus cells : 4–6 /HPF", " RBC : 1–2 /HPF", " Bacteria : ++ (UTI likely)", "", "Pending Investigations:", " Chest X-ray PA view", " ECG", " Sputum C/S", " Urine C/S (follow-up)", " Peak Flow Rate / Spirometry", ], font_size=13) # ── SLIDE 8 : ASSESSMENT (Diagnosis) ────────────────────────────────────── section_slide(prs, "ASSESSMENT") content_slide(prs, "ASSESSMENT – Diagnosis", [ "PROVISIONAL DIAGNOSIS (Admission)", " ALE of BA → Acute Exacerbation of Bronchial Asthma", "", "FINAL DIAGNOSIS", " Acute Exacerbation of Bronchial Asthma (AE of BA)", " + Concurrent Urinary Tract Infection (Urine: Bacteria ++, Pus cells 4-6)", " + Microcytic Hypochromic Anaemia (Hb 10.9, MCV 67.7, MCH 22.8)", "", "CLINICAL REASONING", " Triggers: Possible RTI (cough + expectoration + running nose + low-grade fever)", " Bronchospasm evidenced by: Bilateral scattered wheeze, RR 20/min, SpO₂ 98%", " Known asthmatic (14 yrs) – stepped down treatment at home with inhalers", " Fever resolved – CRP mildly elevated (4.44) suggesting resolving infection", " Weight loss 8 kg / 20 days → monitor for other causes", " Urine bacteria ++ → antibiotic cover added (Norflox / Taxim)", " Insomnia documented – assess for steroid-induced or anxiety-related cause", ], font_size=16) # ── SLIDE 9 : PLAN section header ──────────────────────────────────────── section_slide(prs, "PLAN") # ── SLIDE 10 : Drug Chart ──────────────────────────────────────────────── content_slide(prs, "PLAN – Drug Chart (In-Patient Treatment)", [ "INJECTIONS (IV)", " 1. Inj. TAXIM (Cefotaxime) 1 g IV BD [ATD] – Antibiotic for RTI/UTI", " 2. Inj. HYDROCORT (Hydrocortisone) 100 mg IV BD – Anti-inflammatory / Bronchodilator", " 3. Inj. MgSO₄ 2 g in 100 mL NS IV OD over 20 mins – Bronchospasm relief", " 4. Inj. PAN (Pantoprazole) 40 mg IV BD – Gastroprotection (steroid cover)", " 5. Inj. DERIPHYLLINE (Etofylline + Theophylline) 2 cc IV BD – Bronchodilator", " 6. Inj. EMESET (Ondansetron) 4 mg IV 1-0-1 – Anti-emetic", "", "ORAL TABLETS", " 7. T. AZEE (Azithromycin) 500 mg 1-0-0 – Antibiotic (atypical cover)", " 8. T. MONDESELOR (Montelukast + Desloratadine) 1-0-1 – Leukotriene antagonist", " 9. T. PULMOLEAR (Acebrophylline) 1-0-1 – Mucolytic + Bronchodilator", " 10. T. PARA (Paracetamol) 500 mg 1-1-1 – Antipyretic / Analgesic", "", "NEBULISATIONS", " 11. Neb. DUOLIN + BUDECORT Q8H – Ipratropium + Salbutamol / Budesonide", " 12. Neb. NAC (N-Acetylcysteine) TDS – Mucolytic", "", "SYRUPS", " 13. Syp. ASCORIL LS 5 mL TDS – Expectorant (Levosalbutamol + Bromhexine)", " 14. Fluticasone Nasal Spray HS – Nasal corticosteroid for rhinitis", " 15. Syp. LACTULOSE 15 mL HS – Laxative (constipation precaution on opioids/codeine)", " 16. T. NORFLOX 100 mg 1-0-1 – Added for UTI (Bacteria ++ urine)", ], font_size=14) # ── SLIDE 11 : Non-pharmacological Plan ───────────────────────────────── content_slide(prs, "PLAN – Non-Pharmacological & Monitoring", [ "NON-PHARMACOLOGICAL MEASURES", " Bed rest; head-end elevation (semi-Fowler's position)", " Avoid known triggers: dust, smoke, cold air, allergens", " Adequate hydration (oral); Nutritious diet for weight gain", " Regular nebulization technique education", " Incentive spirometry / breathing exercises post-acute phase", " Patient counselled on inhaler technique (Tiova + Budamate Rotacaps)", "", "MONITORING PARAMETERS", " Vitals (BP, PR, RR, SpO₂, Temperature) – every 8 hours", " Peak Expiratory Flow Rate (PEFR) – daily", " Chest X-ray PA view – initial + follow-up", " CBC, S. Electrolytes – repeat as clinically indicated", " Urine C/S – follow-up to guide antibiotic change if needed", " Sputum C/S – to guide antibiotic sensitivity", " Blood glucose monitoring (steroid-induced hyperglycaemia – RBS 148 mg/dL on Day 1)", " Watch for hypokalaemia (Salbutamol + IV MgSO₄)", " Theophylline toxicity signs (Deriphylline): nausea, palpitation, tremors", ], font_size=16) # ── SLIDE 12 : Discharge Summary ──────────────────────────────────────── content_slide(prs, "PLAN – Discharge Summary", [ "Patient showed progressive clinical improvement:", " Day 1 → Day 4: wheeze decreased from 'scattered' to 'mild'", " Afebrile from Day 2 onwards", " No specific complaints on daily review", " SpO₂ maintained ≥ 98% on room air throughout", "", "DISCHARGE MEDICATIONS", " 1. T. Azithromycin (Azee) 500 mg 1-0-0", " 2. T. Montelukast+Desloratadine (Mondeselor) 1-0-1", " 3. T. Acebrophylline (Pulmolear) 1-0-1", " 4. T. Paracetamol 500 mg 1-1-1 (SOS)", " 5. Neb. Duolin + Budecort Q8H", " 6. Neb. NAC TDS", " 7. Syp. Ascoril LS 5 mL TDS", " 8. Fluticasone Nasal Spray HS", " 9. Syp. Lactulose 15 mL HS", " 10. T. Norflox 100 mg 1-0-1 (complete course)", "", "DISCHARGE ADVICE", " Continue home inhalers: Tiova Rotacaps + Budamate Rotacaps as prescribed", " Avoid triggers; follow-up in Respiratory Medicine OPD within 1 week", " Repeat CBC / Urine C/S at follow-up", " Return if breathlessness / wheeze worsens", ], font_size=15) # ── SLIDE 13 : Thank You ───────────────────────────────────────────────── slide13 = blank_slide(prs) set_bg(slide13, DARK_BLUE) add_rect(slide13, 0, 0, 13.33, 0.20, MID_BLUE) add_rect(slide13, 0, 7.30, 13.33, 0.20, MID_BLUE) add_rect(slide13, 1.5, 3.45, 10.33, 0.06, YELLOW) add_textbox(slide13, "THANK YOU", 0.5, 3.0, 12.33, 1.5, font_size=52, bold=True, color=WHITE, align=PP_ALIGN.CENTER) # ── Save ───────────────────────────────────────────────────────────────── out = "/tmp/workspace/sandhya_soap/Sandhya_SOAP_Analysis.pptx" prs.save(out) print(f"Saved: {out}") PYEOF
python3 -c " from pptx import Presentation prs = Presentation('/tmp/workspace/sandhya_soap/Sandhya_SOAP_Analysis.pptx') print(f'Slides: {len(prs.slides)}') for i, slide in enumerate(prs.slides, 1): texts = [] for shape in slide.shapes: if shape.has_text_frame: t = shape.text_frame.text.strip() if t: texts.append(t[:80]) print(f'Slide {i}: {\" | \".join(texts[:3])}') "
Sandhya SOAP Analysis
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide – "SOAP Analysis / Pharmacotherapeutics-I / AE of BA" |
| 2 | SUBJECTIVE section header |
| 3 | Patient details, Chief Complaints (chest tightness, cough, running nose × 6 days; fever; wt loss; nausea; insomnia) |
| 4 | HPI + Past History / Family / Menstrual / Personal History (two-column) |
| 5 | OBJECTIVE section header |
| 6 | General Examination + Vitals + Serial Systemic Examination (day-wise) |
| 7 | Lab values: CBC (Hb 10.9, MCV 67.7 - microcytic anaemia), LFT, RFT, CRP, Electrolytes, Urine R/E (UTI) |
| 8 | ASSESSMENT section header |
| 9 | Final Diagnosis: AE of Bronchial Asthma + UTI + Microcytic Anaemia + clinical reasoning |
| 10 | PLAN section header |
| 11 | Drug Chart: all 16 drugs with routes, frequencies, and pharmacological rationale |
| 12 | Non-pharmacological measures + monitoring parameters |
| 13 | Discharge summary + discharge medications |
| 14 | Thank You |