Ak khurana ppt on types of cataract brief
types of cataract classification ophthalmology AK Khurana
cataract classification
~/
mkdir -p "/tmp/workspace/cataract-types-ppt/src" "/tmp/workspace/cataract-types-ppt/output" && python - <<'PY' from pathlib import Path p=Path('/tmp/workspace/cataract-types-ppt/src/create_cataract_ppt.py') p.write_text('''from pptx import Presentation from pptx.util import Inches, Pt from pptx.dml.color import RGBColor from pptx.enum.shapes import MSO_SHAPE from pptx.enum.text import PP_ALIGN, MSO_ANCHOR from pptx.enum.dml import MSO_THEME_COLOR OUT = "/tmp/workspace/cataract-types-ppt/output/Types_of_Cataract_AK_Khurana_Brief.pptx" prs = Presentation() prs.slide_width = Inches(13.333) prs.slide_height = Inches(7.5) blank = prs.slide_layouts[6] NAVY=RGBColor(10,38,71); BLUE=RGBColor(20,103,160); TEAL=RGBColor(31,151,151) PALE=RGBColor(238,246,250); WHITE=RGBColor(255,255,255); INK=RGBColor(33,43,54) GREY=RGBColor(102,115,128); GOLD=RGBColor(226,165,49); RED=RGBColor(186,70,65) def bg(slide): b=slide.background.fill; b.solid(); b.fore_color.rgb=WHITE sh=slide.shapes.add_shape(MSO_SHAPE.RECTANGLE,0,0,prs.slide_width,Inches(.22)); sh.fill.solid(); sh.fill.fore_color.rgb=TEAL; sh.line.fill.background() # footer tb=slide.shapes.add_textbox(Inches(.55), Inches(7.07), Inches(12.2), Inches(.22)) tf=tb.text_frame; tf.clear(); tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0 p=tf.paragraphs[0]; p.text='Types of Cataract | Brief undergraduate review'; p.alignment=PP_ALIGN.RIGHT p.runs[0].font.size=Pt(9); p.runs[0].font.color.rgb=GREY def text(slide,x,y,w,h,txt,size=22,color=INK,bold=False,align=PP_ALIGN.LEFT): tb=slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h)); tf=tb.text_frame tf.clear(); tf.word_wrap=True; tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0 p=tf.paragraphs[0]; p.text=txt; p.alignment=align; p.space_after=Pt(0) for r in p.runs: r.font.name='Aptos'; r.font.size=Pt(size); r.font.bold=bold; r.font.color.rgb=color return tb def title(slide, main, sub=None): text(slide,.62,.52,12,.55,main,28,NAVY,True) if sub: text(slide,.64,1.12,12,.34,sub,13,GREY) def card(slide,x,y,w,h,head,body,accent=BLUE,body_size=17): s=slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(x), Inches(y), Inches(w), Inches(h)) s.fill.solid(); s.fill.fore_color.rgb=PALE; s.line.color.rgb=RGBColor(205,224,234) bar=slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, Inches(x), Inches(y), Inches(.12), Inches(h)); bar.fill.solid(); bar.fill.fore_color.rgb=accent; bar.line.fill.background() text(slide,x+.3,y+.24,w-.5,.34,head,18,NAVY,True) text(slide,x+.3,y+.75,w-.52,h-.95,body,body_size,INK) def lens(slide,x,y,label,kind,color): # outer lens + capsule o=slide.shapes.add_shape(MSO_SHAPE.OVAL, Inches(x), Inches(y), Inches(1.65), Inches(1.65)); o.fill.solid(); o.fill.fore_color.rgb=RGBColor(250,252,253); o.line.color.rgb=NAVY; o.line.width=Pt(1.5) if kind=='nuclear': q=slide.shapes.add_shape(MSO_SHAPE.OVAL, Inches(x+.43), Inches(y+.43), Inches(.79), Inches(.79)); q.fill.solid(); q.fill.fore_color.rgb=color; q.line.color.rgb=color elif kind=='cortical': for dx,dy,ww,hh in [(0.15,.7,.48,.13),(1.02,.7,.48,.13),(.73,.15,.13,.48),(.73,1.02,.13,.48)]: q=slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, Inches(x+dx), Inches(y+dy), Inches(ww), Inches(hh)); q.fill.solid();q.fill.fore_color.rgb=color;q.line.fill.background() elif kind=='psc': q=slide.shapes.add_shape(MSO_SHAPE.OVAL, Inches(x+.52), Inches(y+1.12), Inches(.62), Inches(.24));q.fill.solid();q.fill.fore_color.rgb=color;q.line.fill.background() text(slide,x-.1,y+1.8,1.85,.35,label,14,NAVY,True,PP_ALIGN.CENTER) def bullet_box(slide,x,y,w,h,items,accent=TEAL): s=slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(x), Inches(y), Inches(w), Inches(h));s.fill.solid();s.fill.fore_color.rgb=PALE;s.line.color.rgb=RGBColor(205,224,234) tb=slide.shapes.add_textbox(Inches(x+.3),Inches(y+.25),Inches(w-.55),Inches(h-.45));tf=tb.text_frame;tf.clear();tf.word_wrap=True tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0 for i,item in enumerate(items): p=tf.paragraphs[0] if i==0 else tf.add_paragraph();p.text=item;p.level=0;p.font.size=Pt(17);p.font.color.rgb=INK;p.space_after=Pt(12);p.bullet=True # 1 s=prs.slides.add_slide(blank); bg(s) text(s,.78,1.12,8.4,.72,'Types of Cataract',38,NAVY,True) text(s,.82,1.98,7.5,.44,'Brief classification for MBBS / undergraduate ophthalmology',18,TEAL,True) text(s,.82,2.64,7.8,.8,'Cataract = any opacity of the crystalline lens or its capsule that scatters light and can reduce vision.',21,INK) # eye/lens motif for i,(lab,k,c) in enumerate([('Nuclear','nuclear',GOLD),('Cortical','cortical',BLUE),('PSC','psc',RED)]): lens(s,9.35+i*1.15,1.55,lab,k,c) text(s,.82,5.8,9.5,.4,'Framework adapted to the usual A.K. Khurana-style classification.',15,GREY) text(s,.82,6.3,9.5,.35,'Prepared as a concise revision deck. Verify terminology with the edition prescribed by your institution.',12,GREY) # 2 s=prs.slides.add_slide(blank);bg(s);title(s,'How cataracts are classified','Classify by age/onset, morphology, maturity and cause.') card(s,.65,1.75,3.0,3.85,'1. By age / onset','• Congenital or developmental\n• Acquired',TEAL,19) card(s,3.95,1.75,3.0,3.85,'2. By morphology','• Capsular / subcapsular\n• Nuclear\n• Cortical\n• Polar and other forms',BLUE,18) card(s,7.25,1.75,2.55,3.85,'3. By maturity','• Incipient\n• Immature\n• Mature\n• Hypermature',GOLD,18) card(s,10.1,1.75,2.55,3.85,'4. By cause','• Senile\n• Traumatic\n• Complicated\n• Metabolic / drug-induced',RED,17) # 3 s=prs.slides.add_slide(blank);bg(s);title(s,'Senile (age-related) cataract','The commonest acquired cataract. The major morphological types may coexist.') lens(s,1.0,2.0,'Nuclear sclerosis','nuclear',GOLD); lens(s,4.25,2.0,'Cortical','cortical',BLUE); lens(s,7.5,2.0,'Posterior subcapsular','psc',RED) card(s,10.05,1.7,2.6,1.75,'Nuclear','Central yellowing then brunescence. May produce a myopic shift: “second sight”.',GOLD,13) card(s,10.05,3.65,2.6,1.4,'Cortical','Hydration clefts and vacuoles progress to radial spokes. Glare is common.',BLUE,13) card(s,10.05,5.25,2.6,1.15,'PSC','Central posterior plaque. Disproportionate glare and poor near vision.',RED,13) # 4 s=prs.slides.add_slide(blank);bg(s);title(s,'Congenital and developmental cataract','Important because visual deprivation can cause amblyopia.') card(s,.65,1.65,3.85,4.55,'By morphology','• Anterior polar\n• Posterior polar\n• Lamellar (zonular)\n• Sutural\n• Cerulean (blue-dot)\n• Total cataract',TEAL,18) card(s,4.75,1.65,3.85,4.55,'Aetiological groups','• Hereditary\n• Intrauterine infection, e.g. rubella\n• Metabolic, e.g. galactosaemia\n• Syndromic / idiopathic',BLUE,18) card(s,8.85,1.65,3.85,4.55,'Clinical note','Unilateral dense congenital cataract is an ophthalmic urgency. Early assessment and treatment are required to prevent irreversible amblyopia.',RED,18) # 5 s=prs.slides.add_slide(blank);bg(s);title(s,'Other acquired cataracts','Think of the context in which the lens opacity has developed.') card(s,.7,1.65,3.85,2.0,'Traumatic','Blunt trauma: rosette cataract.\nPenetrating injury: localized or total opacity.\nElectric injury may cause anterior subcapsular opacity.',RED,16) card(s,4.75,1.65,3.85,2.0,'Complicated','Secondary to chronic intraocular disease, classically chronic uveitis or high myopia. Often begins posteriorly.',BLUE,16) card(s,8.8,1.65,3.85,2.0,'Metabolic / systemic','Diabetes: snowflake cataract in young patients with severe hyperglycaemia.\nAlso: myotonic dystrophy, atopic dermatitis and others.',TEAL,15) card(s,.7,4.1,5.85,1.65,'Drug-induced','Corticosteroids: posterior subcapsular cataract is characteristic. Other drugs have less common associations.',GOLD,17) card(s,6.75,4.1,5.85,1.65,'Radiation / toxic','Ionizing radiation and some toxic exposures can induce lens opacities. Obtain exposure history.',NAVY,17) # 6 s=prs.slides.add_slide(blank);bg(s);title(s,'Classification by maturity','Used mainly for senile cortical cataract.') card(s,.65,1.75,2.95,3.6,'Incipient','Early peripheral spokes or water clefts.\nVisual acuity may be near normal.',TEAL,18) card(s,3.9,1.75,2.95,3.6,'Immature','Lens partly opaque.\nIris shadow is present.\nMay become intumescent.',BLUE,18) card(s,7.15,1.75,2.95,3.6,'Mature','Lens completely opaque.\nIris shadow absent.\nFundus view is obscured.',GOLD,18) card(s,10.4,1.75,2.3,3.6,'Hypermature','Liquefied cortex or shrunken wrinkled capsule.\nMay cause lens-induced inflammation / glaucoma.',RED,16) # 7 s=prs.slides.add_slide(blank);bg(s);title(s,'Rapid revision','A concise way to answer “Classify cataract” in a viva.') bullet_box(s,.8,1.55,11.75,3.25,['Start with congenital/developmental versus acquired.','For acquired cataract, list senile, traumatic, complicated, metabolic/systemic, drug-induced and radiation-induced forms.','State the three common senile morphological types: nuclear, cortical and posterior subcapsular.','Add maturity stages for senile cortical cataract: incipient, immature, mature and hypermature.']) text(s,.85,5.35,11.4,.35,'Suggested reference',17,NAVY,True) text(s,.85,5.76,11.4,.55,'Khurana AK. Comprehensive Ophthalmology. Chapter: Lens and cataract. Use your prescribed edition for exact wording and figures.',15,INK) text(s,.85,6.45,11.4,.28,'Clinical content cross-checked with Kanski’s Clinical Ophthalmology, 10th ed., pp. 308-312 and 337 onward.',11,GREY) # add slide numbers for i,slide in enumerate(prs.slides,1): text(slide,.58,7.07,.4,.2,str(i),9,GREY) prs.save(OUT) print(OUT) ''') PY python "/tmp/workspace/cataract-types-ppt/src/create_cataract_ppt.py"
~/cataract-types-ppt/
python - <<'PY' from pathlib import Path import re p=Path('/tmp/workspace/cataract-types-ppt/src/create_cataract_ppt.py') s=p.read_text() def fix(m): return "'"+m.group(1).replace('\\','\\\\').replace('\n','\\n')+"'" s=re.sub(r"'([^']*)'", fix, s, flags=re.S) p.write_text(s) PY python "/tmp/workspace/cataract-types-ppt/src/create_cataract_ppt.py" && python - <<'PY' from pptx import Presentation p='/tmp/workspace/cataract-types-ppt/output/Types_of_Cataract_AK_Khurana_Brief.pptx' prs=Presentation(p) print('slides=',len(prs.slides)) for i,s in enumerate(prs.slides,1): txt=' '.join(sh.text for sh in s.shapes if getattr(sh,'has_text_frame',False)) print(i, txt[:90]) PY
Unable to open
~/cataract-types-ppt/output
Types of Cataract AK Khurana Brief
Presentation · PPTX