I want answers for all questions in pdf
cd "/tmp/workspace/attachments/3601ea47-55cb-4154-aff8-41087417839a/" && python3 -c " import pdfplumber with pdfplumber.open('MBBS Freaks Ophthalmology Question Bank.pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') # Print first 3 pages to understand structure for i, page in enumerate(pdf.pages[:3]): print(f'\n--- PAGE {i+1} ---') print(page.extract_text()) "
cd "/tmp/workspace/attachments/3601ea47-55cb-4154-aff8-41087417839a/" && python3 -c " import pdfplumber with pdfplumber.open('MBBS Freaks Ophthalmology Question Bank.pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): text = page.extract_text() if text and text.strip(): print(f'\n=== PAGE {i+1} ===') print(text) "
mkdir -p /tmp/workspace/ophthal-answers && echo "Directory ready"
~/ophthal-answers/answers_part1.py
# This script generates the full ophthalmology answer bank as a Word document
# using python-docx
from docx import Document
from docx.shared import Pt, RGBColor, Inches
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
import re
doc = Document()
# ── Styles ──
style = doc.styles['Normal']
style.font.name = 'Times New Roman'
style.font.size = Pt(11)
def add_title(doc, text):
p = doc.add_heading(text, level=0)
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
run = p.runs[0]
run.font.color.rgb = RGBColor(0, 70, 127)
def add_h1(doc, text):
p = doc.add_heading(text, level=1)
run = p.runs[0]
run.font.color.rgb = RGBColor(0, 102, 51)
def add_h2(doc, text):
p = doc.add_heading(text, level=2)
run = p.runs[0]
run.font.color.rgb = RGBColor(128, 0, 0)
def add_h3(doc, text):
doc.add_heading(text, level=3)
def add_para(doc, text):
doc.add_paragraph(text)
def add_bullet(doc, text):
doc.add_paragraph(text, style='List Bullet')
def add_numbered(doc, text):
doc.add_paragraph(text, style='List Number')
# ════════════════════════════════════════════════
add_title(doc, "MBBS Freaks – Ophthalmology Question Bank: Complete Answers")
doc.add_paragraph("Based on AK Khurana Ophthalmology & Kanski's Clinical Ophthalmology")
doc.add_page_break()
# ════════════════════════════════════════════════
# SECTION 1: ANATOMY & PHYSIOLOGY OF EYE
# ════════════════════════════════════════════════
add_h1(doc, "SECTION 1: ANATOMY & PHYSIOLOGY OF EYE")
add_h2(doc, "Q1. Rods & Cones")
add_para(doc, "Rods and cones are the photoreceptor cells of the retina responsible for vision.")
add_h3(doc, "Rods")
for b in [
"Number: ~120 million; located in peripheral retina",
"Absent from fovea; maximum density at ~20° eccentricity",
"Responsible for scotopic (dim-light) vision",
"Contain rhodopsin (visual purple) – a combination of opsin + 11-cis retinal",
"Single type – only achromatic (black-and-white) vision",
"Low threshold, high convergence (many rods → one ganglion cell) → high sensitivity, low acuity",
]:
add_bullet(doc, b)
add_h3(doc, "Cones")
for b in [
"Number: ~6–7 million; concentrated at fovea (all-cone fovea centralis)",
"Responsible for photopic (bright-light) and colour vision",
"Three types: L-cones (red, ~564 nm), M-cones (green, ~534 nm), S-cones (blue, ~420 nm)",
"High acuity due to 1:1 ratio with ganglion cells at fovea",
"Contain iodopsin (cone opsin variants)",
]:
add_bullet(doc, b)
add_h3(doc, "Key differences")
table = doc.add_table(rows=6, cols=3)
table.style = 'Table Grid'
hdr = table.rows[0].cells
hdr[0].text = "Feature"; hdr[1].text = "Rods"; hdr[2].text = "Cones"
rows_data = [
("Number", "~120 million", "~6-7 million"),
("Location", "Peripheral retina", "Fovea (central retina)"),
("Vision type", "Scotopic (dim light)", "Photopic (bright light) + colour"),
("Visual acuity", "Low", "High"),
("Pigment", "Rhodopsin", "Iodopsin (3 types)"),
]
for i, (f, r, c) in enumerate(rows_data):
row = table.rows[i+1].cells
row[0].text = f; row[1].text = r; row[2].text = c
doc.add_paragraph()
add_h2(doc, "Q2. Ciliary Ganglion")
add_para(doc, "The ciliary ganglion is a parasympathetic ganglion located in the posterior orbit, lateral to the optic nerve, between the lateral rectus muscle and the optic nerve.")
add_h3(doc, "Roots (3 roots enter the ganglion):")
for b in [
"Sensory root (long root) – from nasociliary branch of V1 (ophthalmic); passes through without synapsing",
"Motor root (short root) – parasympathetic pre-ganglionic fibres from Edinger-Westphal nucleus via CN III; SYNAPSE here",
"Sympathetic root – from superior cervical ganglion via carotid plexus; passes through without synapsing",
]:
add_bullet(doc, b)
add_h3(doc, "Output:")
for b in [
"Short ciliary nerves (8-10) emerge from ganglion and enter posterior eyeball",
"Post-ganglionic parasympathetic → sphincter pupillae (miosis) + ciliary muscle (accommodation)",
"Sympathetic fibres (passed through) → dilator pupillae",
"Sensory fibres (passed through) → cornea, iris, ciliary body",
]:
add_bullet(doc, b)
add_h3(doc, "Clinical relevance:")
for b in [
"Adie's tonic pupil – damage to short ciliary nerves/ciliary ganglion → large, poorly reactive pupil",
"Orbital anaesthesia (retrobulbar block) administered close to ciliary ganglion",
]:
add_bullet(doc, b)
add_h2(doc, "Q3. Extraocular Muscles – Origin, Insertion, Action")
add_para(doc, "There are 6 extraocular muscles (EOMs) controlling eye movement.")
table = doc.add_table(rows=7, cols=4)
table.style = 'Table Grid'
hdr = table.rows[0].cells
for i, h in enumerate(["Muscle", "Origin", "Insertion", "Action"]):
hdr[i].text = h
eom_data = [
("Medial Rectus", "Common tendinous ring (Annulus of Zinn)", "Medial sclera, 5.5 mm from limbus", "Adduction"),
("Lateral Rectus", "Common tendinous ring", "Lateral sclera, 6.9 mm from limbus", "Abduction"),
("Superior Rectus", "Common tendinous ring (upper part)", "Superior sclera, 7.7 mm from limbus", "Elevation, intorsion, adduction"),
("Inferior Rectus", "Common tendinous ring (lower part)", "Inferior sclera, 6.5 mm from limbus", "Depression, extorsion, adduction"),
("Superior Oblique", "Body of sphenoid (above optic foramen)", "Posterior-superior quadrant of sclera (via trochlea)", "Intorsion, depression (in adduction), abduction"),
("Inferior Oblique", "Orbital floor near lacrimal fossa", "Posterior-inferior quadrant of sclera", "Extorsion, elevation (in adduction), abduction"),
]
for i, row_data in enumerate(eom_data):
row = table.rows[i+1].cells
for j, val in enumerate(row_data):
row[j].text = val
doc.add_paragraph()
add_para(doc, "Nerve supply: SR, IR, MR, IO → CN III (oculomotor); SO → CN IV (trochlear); LR → CN VI (abducens). Mnemonic: LR6 SO4 rest 3.")
add_h2(doc, "Q4. Blood Supply of Eyeball")
add_h3(doc, "Arterial supply – from Ophthalmic artery (branch of internal carotid artery)")
for b in [
"Central retinal artery (CRA) – enters optic nerve 1.2 cm behind globe; supplies inner 2/3 of retina (end artery → occlusion causes sudden painless blindness)",
"Short posterior ciliary arteries (6-12) – supply choroid and outer 1/3 of retina (rods & cones)",
"Long posterior ciliary arteries (2) – supply ciliary body and iris (via major arterial circle of iris)",
"Anterior ciliary arteries (7) – from muscular branches; supply limbal area, conjunctiva",
"Circle of Zinn (Haller) – around optic nerve head, formed by short posterior ciliaries",
]:
add_bullet(doc, b)
add_h3(doc, "Venous drainage:")
for b in [
"Central retinal vein → superior ophthalmic vein → cavernous sinus",
"Vortex veins (4-5) – drain choroid → superior/inferior ophthalmic veins",
"Anterior ciliary veins – drain anterior segment",
]:
add_bullet(doc, b)
add_h2(doc, "Q5. Layers of Eyeball")
add_para(doc, "The eyeball has 3 coats (tunics):")
add_h3(doc, "1. Outer fibrous coat (corneoscleral coat)")
for b in ["Cornea (anterior 1/6) – transparent, avascular", "Sclera (posterior 5/6) – white, opaque, protective"]:
add_bullet(doc, b)
add_h3(doc, "2. Middle vascular coat (Uveal tract / Uvea)")
for b in ["Iris – coloured diaphragm; controls pupil size", "Ciliary body – secretes aqueous humour; controls accommodation", "Choroid – highly vascular; nourishes outer retina; pigmented (reduces internal reflections)"]:
add_bullet(doc, b)
add_h3(doc, "3. Inner nervous coat (Retina)")
for b in ["Optical part (posterior 2/3) – contains photoreceptors", "Non-optical / blind part (anterior 1/3) – lines ciliary body and posterior iris"]:
add_bullet(doc, b)
add_h3(doc, "Internal contents:")
for b in ["Aqueous humour (anterior & posterior chambers)", "Lens (crystalline)", "Vitreous humour (posterior cavity)"]:
add_bullet(doc, b)
add_h2(doc, "Q6. Physiology of Lens")
add_para(doc, "The lens is a biconvex, avascular, transparent structure enclosed in a capsule.")
add_h3(doc, "Structure:")
for b in [
"Capsule – elastic; thickest at equator; thinnest at posterior pole",
"Epithelium – single layer under anterior capsule; germinative cells at equator divide and differentiate into lens fibres",
"Cortex – new lens fibres (more hydrated)",
"Nucleus – older fibres; denser; subdivided into embryonic, fetal, infantile, adult nucleus",
]:
add_bullet(doc, b)
add_h3(doc, "Metabolism:")
for b in [
"Anaerobic glycolysis (90%) is main energy source",
"HMP shunt (10%) – protects against oxidative damage",
"Lens maintains high K+ and low Na+ via Na-K ATPase pump",
"Glutathione (reduced) protects –SH groups of lens proteins",
"Main proteins: α, β, γ crystallins",
]:
add_bullet(doc, b)
add_h3(doc, "Accommodation:")
for b in [
"Helmholtz theory: ciliary muscle contracts → zonular fibres relax → lens becomes more convex → increased refractive power",
"Amplitude of accommodation decreases with age → presbyopia",
"Near point moves further with age",
]:
add_bullet(doc, b)
add_h2(doc, "Q7. Wald's Visual Cycle (Photochemical cycle / Rhodopsin cycle)")
add_para(doc, "Rhodopsin (visual purple) is the photopigment in rods. It consists of opsin (protein) + 11-cis retinal (chromophore derived from Vitamin A).")
add_h3(doc, "Steps of the visual cycle:")
steps = [
"Light absorption: Rhodopsin absorbs photon → 11-cis retinal isomerizes to all-trans retinal",
"Bleaching: Rhodopsin → Metarhodopsin II (active) → opsin + all-trans retinal",
"Signal transduction: Metarhodopsin II activates transducin (G-protein) → activates phosphodiesterase → cGMP breaks down → Na+ channels close → hyperpolarization → nerve impulse",
"Dark adaptation (regeneration): all-trans retinal → (via retinal pigment epithelium) → 11-cis retinal → recombines with opsin → rhodopsin regenerated",
"Vitamin A role: All-trans retinal → all-trans retinol (Vitamin A1) in RPE → isomerized to 11-cis retinol → oxidized to 11-cis retinal → back to rods",
]
for i, s in enumerate(steps):
add_bullet(doc, f"Step {i+1}: {s}")
add_h3(doc, "Clinical significance:")
for b in [
"Vitamin A deficiency → rhodopsin cannot be regenerated → night blindness (nyctalopia)",
"Dark adaptation time: cones adapt in 7 min; rods in 20-30 min",
]:
add_bullet(doc, b)
add_h2(doc, "Q8. Colour Vision – Trichromatic Theory")
add_para(doc, "Young-Helmholtz Trichromatic Theory (1802, 1852):")
for b in [
"Three types of cones exist: red-sensitive (L-cones, ~564 nm), green-sensitive (M-cones, ~534 nm), blue-sensitive (S-cones, ~420 nm)",
"Colour perception results from the ratio of stimulation of these three types",
"White light stimulates all three equally; other colours stimulate in different proportions",
]:
add_bullet(doc, b)
add_h3(doc, "Colour blindness:")
for b in [
"Protanopia – absent red cones; Protanomaly – defective red cones",
"Deuteranopia – absent green cones (most common); Deuteranomaly – defective green cones",
"Tritanopia – absent blue cones (rare; autosomal dominant)",
"Red-green colour blindness: X-linked recessive; affects 8% males, 0.5% females",
]:
add_bullet(doc, b)
add_h3(doc, "Tests for colour vision:")
for b in [
"Ishihara pseudo-isochromatic plates – most common; detects red-green defects",
"D-15 (Farnsworth) panel test",
"100-hue test (Farnsworth-Munsell) – most sensitive",
"Anomaloscope (Nagel) – gold standard",
"City University Colour Vision Test",
]:
add_bullet(doc, b)
add_h2(doc, "Q9. Vision Tests & Tests for Colour Vision")
add_h3(doc, "Vision tests (Distance & Near):")
for b in [
"Snellen chart – standard distance visual acuity (6 m); recorded as 6/6, 6/9 etc.",
"LogMAR chart – more accurate; used in research",
"Jaeger chart – near vision",
"Pinhole test – distinguishes refractive from organic causes of reduced VA",
"Counting fingers (CF), Hand movements (HM), Perception of light (PL) – for very low vision",
]:
add_bullet(doc, b)
add_h3(doc, "Other vision tests:")
for b in [
"Visual field: Confrontation test, Perimetry (Goldmann, Humphrey), Amsler grid",
"Contrast sensitivity: Pelli-Robson chart",
"Dark adaptation: Goldmann-Weekers adaptometer",
"Stereopsis: TNO test, Titmus fly test, Lang test",
"Colour vision tests: (see Q8 above)",
]:
add_bullet(doc, b)
add_h2(doc, "Q10. Layers of Cornea")
add_para(doc, "From anterior to posterior (5 layers in AK Khurana; 6 with Dua's layer):")
layers = [
("1. Epithelium (50 µm)", "5-6 layers of non-keratinized stratified squamous cells; surface cells have microvilli; basal cells attached to Bowman's layer by hemidesmosomes; rapid regeneration (7 days); no vessels"),
("2. Bowman's layer (8-14 µm)", "Acellular, modified anterior stroma; condensed collagen fibrils; does NOT regenerate if injured → scarring"),
("3. Stroma (500 µm, 90% of thickness)", "200+ lamellae of parallel collagen fibrils (type I); keratocytes between lamellae; ground substance (keratan sulphate, chondroitin sulphate); regular arrangement → transparency"),
("4. Dua's layer (10.15 µm)", "Acellular, strong layer between stroma and Descemet's; identified 2013; withstands 1.5-2 bar pressure"),
("5. Descemet's membrane (5-10 µm)", "True basement membrane of endothelium; type IV collagen; Hassall-Henle bodies at periphery; DOES regenerate; seen as Haab's striae in buphthalmos"),
("6. Endothelium (5 µm)", "Single layer of hexagonal cells; does NOT regenerate (post-natal); Na-K ATPase pump keeps stroma dehydrated; failure → corneal oedema; normal count ~2500 cells/mm²"),
]
for name, desc in layers:
p = doc.add_paragraph()
run = p.add_run(name + ": ")
run.bold = True
p.add_run(desc)
add_h2(doc, "Q11. Retinal Layers")
add_para(doc, "10 layers (from outside/RPE to inside/vitreous – mnemonic: 'RPBONIGIG PL'):")
ret_layers = [
"1. Retinal Pigment Epithelium (RPE) – single layer; attached to Bruch's membrane; phagocytoses photoreceptor outer segments; part of blood-retinal barrier",
"2. Photoreceptor layer (outer segments) – outer segments of rods and cones",
"3. External limiting membrane (ELM) – junctions between photoreceptors and Müller cells",
"4. Outer nuclear layer (ONL) – nuclei of photoreceptors",
"5. Outer plexiform layer (OPL) – synapses between photoreceptors and bipolar/horizontal cells",
"6. Inner nuclear layer (INL) – nuclei of bipolar, horizontal, amacrine, Müller cells",
"7. Inner plexiform layer (IPL) – synapses between bipolar/amacrine and ganglion cells",
"8. Ganglion cell layer (GCL) – ganglion cell nuclei (absent at fovea)",
"9. Nerve fibre layer (NFL) – axons of ganglion cells → form optic nerve",
"10. Internal limiting membrane (ILM) – formed by Müller cell end-feet; separates retina from vitreous",
]
for l in ret_layers:
add_bullet(doc, l)
add_para(doc, "Note: Outer 5 layers (up to OPL) supplied by choroidal circulation; inner 5 layers by central retinal artery.")
add_h2(doc, "Q12. Parts of Conjunctiva & Histology")
add_h3(doc, "Parts of conjunctiva:")
for b in [
"Palpebral (tarsal) conjunctiva – lines inner surface of eyelids; firmly adherent to tarsus",
"Fornical conjunctiva – loose, redundant; superior and inferior fornix (cul-de-sac)",
"Bulbar (ocular) conjunctiva – covers anterior sclera; loose except at limbus",
"Plica semilunaris – semilunar fold at medial canthus; vestigial nictitating membrane",
"Caruncle – modified skin at medial canthus; contains sebaceous and sweat glands, fine hairs",
]:
add_bullet(doc, b)
add_h3(doc, "Histology:")
for b in [
"Epithelium: stratified columnar with goblet cells (secrete mucin of tear film); at limbus becomes stratified squamous",
"Goblet cells: most numerous in inferior fornix; secrete MUC5AC mucin",
"Substantia propria: loose connective tissue; contains lymphocytes, plasma cells, mast cells, accessory lacrimal glands (of Krause in fornix, Wolfring at tarsal borders)",
"Lymphoid tissue: organized as CALT (conjunctiva-associated lymphoid tissue)",
]:
add_bullet(doc, b)
add_h2(doc, "Q13. Corneal Transparency & Factors Responsible")
add_para(doc, "Cornea is transparent despite being tissue (most transparent tissue in body). Factors maintaining transparency:")
for b in [
"1. Avascularity – no blood vessels to scatter light",
"2. Regular arrangement of collagen fibrils in stroma – uniform diameter (~25 nm) and regular spacing → destructive interference of scattered light (Maurice's lattice theory)",
"3. Relative dehydration (78% water) – maintained by endothelial pump (Na-K ATPase) and intact epithelium",
"4. Smooth anterior surface – maintained by tear film",
"5. Absence of myelinated nerve fibres",
"6. Absence of nuclei in crystallin-rich epithelial surface cells (compared to skin)",
"7. Bowman's layer – provides smooth base",
]:
add_bullet(doc, b)
add_h3(doc, "Factors causing corneal opacity:")
for b in [
"Corneal oedema (endothelial failure) – most common",
"Inflammatory infiltration, vascularization, scarring",
"Deposition (calcium, lipid, amyloid)",
"Dystrophies",
]:
add_bullet(doc, b)
doc.add_page_break()
# ════════════════════════════════════════════════
# SECTION 2: ERRORS OF REFRACTION & ACCOMMODATION
# ════════════════════════════════════════════════
add_h1(doc, "SECTION 2: ERRORS OF REFRACTION & ACCOMMODATION")
add_h2(doc, "LAQ 1. Ametropia & Myopia (Classification, Etiology, Clinical Features, Management)")
add_h3(doc, "Ametropia:")
add_para(doc, "Ametropia is any refractive error in which, with accommodation at rest, parallel rays of light do not focus on the retina. Types: Myopia, Hypermetropia, Astigmatism.")
add_h3(doc, "Myopia (Short-sightedness / Nearsightedness):")
add_para(doc, "Parallel rays of light focus in front of the retina when accommodation is at rest.")
add_h3(doc, "Classification:")
for b in [
"By degree: Low (<3D), Moderate (3-6D), High (>6D)",
"Axial myopia – eyeball too long (most common type)",
"Curvatural myopia – cornea/lens too curved",
"Index myopia – increased refractive index of lens (nuclear sclerosis, diabetic myopia)",
"Positional myopia – anterior displacement of lens",
"Developmental (physiological) myopia – normal variation; stabilizes in early adulthood",
"Pathological (degenerative/malignant) myopia – progressive; >6D; associated with posterior staphyloma, choroidal atrophy",
"Acquired myopia: drug-induced (sulphonamides, acetazolamide), nuclear sclerosis, posterior lenticonus",
]:
add_bullet(doc, b)
add_h3(doc, "Etiology:")
for b in [
"Multifactorial: genetic predisposition + environmental factors",
"Near work / reduced outdoor activity (environmental)",
"Axial elongation begins in childhood",
]:
add_bullet(doc, b)
add_h3(doc, "Clinical features:")
for b in [
"Poor distance vision; good near vision",
"Squinting (partial eye closure) to improve VA",
"Large prominent eyes (in high myopia)",
"Deep anterior chamber",
"Large pupils",
"Fundus changes in pathological myopia: tessellated/tigroid fundus, temporal myopic crescent, posterior staphyloma, Fuchs' spots (subretinal haemorrhage at macula), chorioretinal atrophy, retinal detachment, lattice degeneration",
]:
add_bullet(doc, b)
add_h3(doc, "Complications:")
for b in [
"Posterior staphyloma (bulging of sclera)",
"Retinal detachment",
"Vitreous degeneration",
"Open-angle glaucoma",
"Amblyopia (if uncorrected in childhood)",
"Cataract (posterior subcapsular or nuclear)",
]:
add_bullet(doc, b)
add_h3(doc, "Management:")
for b in [
"Optical correction: Concave (diverging) lens",
"Contact lenses: soft/hard",
"Refractive surgery: LASIK, LASEK, PRK, SMILE",
"Phakic IOL (Implantable Collamer Lens) for high myopia (>8D)",
"Myopia control in children: low-dose atropine 0.01%, orthokeratology, bifocal/multifocal lenses, increased outdoor time",
"Treatment of complications: laser photocoagulation for lattice degeneration, surgery for RD",
]:
add_bullet(doc, b)
add_h2(doc, "LAQ 2. Emmetropia & Hypermetropia")
add_h3(doc, "Emmetropia:")
add_para(doc, "State of refraction where, with accommodation at rest, parallel rays of light focus exactly on the retina. The eye is in perfect optical equilibrium.")
add_h3(doc, "Hypermetropia (Hyperopia / Long-sightedness / Far-sightedness):")
add_para(doc, "Parallel rays of light focus behind the retina when accommodation is at rest.")
add_h3(doc, "Etiology:")
for b in [
"Axial hypermetropia – short eyeball (most common; e.g., nanophthalmos)",
"Curvatural hypermetropia – flat cornea or lens",
"Index hypermetropia – decreased refractive index of lens (rare; early diabetes)",
"Positional hypermetropia – posterior displacement of lens",
"Absence of lens (aphakia)",
]:
add_bullet(doc, b)
add_h3(doc, "Types (by accommodation):")
for b in [
"Total hypermetropia – total refractive error measured under cycloplegia",
"Manifest hypermetropia – error that exists without cycloplegia; can be corrected voluntarily",
" → Facultative manifest: corrected by accommodation (patient can see clearly, but with effort)",
" → Absolute manifest: cannot be corrected by accommodation",
"Latent hypermetropia – masked by ciliary tone; only unmasked with cycloplegia (typically 1D)",
]:
add_bullet(doc, b)
add_h3(doc, "Grading:")
for b in ["Low: <+2D", "Moderate: +2D to +5D", "High: >+5D"]:
add_bullet(doc, b)
add_h3(doc, "Clinical features:")
for b in [
"Asthenopia (eyestrain): headache, browache after near work",
"Blurred vision (near > distance) in older patients",
"Young patients may compensate fully with accommodation → no symptoms",
"Convergent squint (esotropia) – especially in children (accommodation-convergence reflex)",
"Small eye with shallow anterior chamber",
"Disc may look crowded (pseudo-papilloedema)",
]:
add_bullet(doc, b)
add_h3(doc, "Complications:")
for b in [
"Angle-closure glaucoma (shallow AC)",
"Accommodative convergent squint",
"Amblyopia",
"Chronic blepharitis",
]:
add_bullet(doc, b)
add_h3(doc, "Management:")
for b in [
"Full cycloplegic correction in children (atropine cycloplegia)",
"Convex (converging) lenses",
"For adults: correct absolute + part of facultative hypermetropia",
"Contact lenses",
"Refractive surgery: LASIK, LASEK (limited by available tissue)",
]:
add_bullet(doc, b)
add_h2(doc, "SAQ 1. Presbyopia")
add_para(doc, "Presbyopia is the age-related physiological reduction in amplitude of accommodation due to loss of elasticity of the crystalline lens.")
add_h3(doc, "Age of onset: ~40-45 years in Indians (earlier than Caucasians)")
add_h3(doc, "Pathophysiology:")
for b in [
"Lens nucleus hardens with age → cannot change shape with ciliary muscle contraction",
"Reduction in accommodative amplitude: from ~10D at age 20 to <1D by age 65",
]:
add_bullet(doc, b)
add_h3(doc, "Clinical features:")
for b in [
"Difficulty reading/near work",
"Holds reading material at arm's length",
"Headache and eyestrain with near work",
"Better in bright light (miosis increases depth of focus)",
]:
add_bullet(doc, b)
add_h3(doc, "Management:")
for b in [
"Reading glasses (near addition): +1D at 40 yrs → +3.5D at 60 yrs (increases by +0.5D every 3-4 years)",
"Bifocal lenses (distance + near correction)",
"Progressive addition lenses (PAL)",
"Monovision contact lenses",
"Surgical options: PRELEX, conductive keratoplasty, accommodating IOLs",
]:
add_bullet(doc, b)
add_h2(doc, "SAQ 2. Astigmatism")
add_para(doc, "Definition: A refractive condition in which the refractive power of the eye is not uniform in all meridians, so that rays of light in different planes do not focus at a single point.")
add_h3(doc, "Types:")
for b in [
"Regular astigmatism: principal meridians are 90° apart (perpendicular to each other); can be corrected with cylindrical lens",
" → With-the-rule (WTR): vertical meridian has greater power (corrected with +ve cylinder at 90°)",
" → Against-the-rule (ATR): horizontal meridian has greater power (corrected with +ve cylinder at 180°)",
" → Oblique: principal meridians between 30-60° and 120-150°",
"Irregular astigmatism: principal meridians not perpendicular; caused by keratoconus, corneal scar; corrected with hard contact lens",
]:
add_bullet(doc, b)
add_h3(doc, "Further classification (by focal lines and retina):")
for b in [
"Simple myopic / simple hyperopic",
"Compound myopic / compound hyperopic",
"Mixed astigmatism (one focal line anterior, one posterior to retina)",
]:
add_bullet(doc, b)
add_h3(doc, "Etiology:")
for b in [
"Corneal (most common) – unequal corneal curvature in different meridians",
"Lenticular – tilt or shape of lens",
"Surgical (post-cataract, post-corneal sutures)",
"Congenital",
]:
add_bullet(doc, b)
add_h3(doc, "Clinical features:")
for b in [
"Blurred vision at all distances",
"Asthenopia, headache",
"Tilting of head (to use least astigmatic meridian)",
"Squinting",
"Monocular diplopia / polyopia",
]:
add_bullet(doc, b)
add_h3(doc, "Management:")
for b in [
"Cylindrical lenses (spectacles)",
"Toric contact lenses",
"Refractive surgery: Toric LASIK, DALK for keratoconus",
"Corneal relaxing incisions / limbal relaxing incisions (surgical)",
]:
add_bullet(doc, b)
add_h2(doc, "SAQ 3. Aphakia")
add_para(doc, "Aphakia = absence of crystalline lens from the visual axis.")
add_h3(doc, "Etiology:")
for b in [
"Surgical: post-cataract extraction (most common)",
"Traumatic: lens dislocation/absorption after injury",
"Congenital: rare",
]:
add_bullet(doc, b)
add_h3(doc, "Clinical features:")
for b in [
"High hypermetropia (+10 to +12 D)",
"Absence of accommodation (absolute)",
"Iridodonesis (tremulous iris) – iris vibrates as it loses lens support",
"Deep anterior chamber",
"Black fundus reflex",
"Purkinje images: only 2 (P1 and P2; P3/P4 from lens absent)",
"Retinoscopy: scissor reflex with correcting lens",
]:
add_bullet(doc, b)
add_h3(doc, "Management:")
for b in [
"Thick convex spectacles (+10-12D) – high magnification (25-30%), restricted visual field, ring scotoma, jack-in-box phenomenon",
"Contact lenses (preferred) – less magnification (5-7%)",
"Secondary IOL implantation (best option)",
"Epikeratophakia (rarely done now)",
]:
add_bullet(doc, b)
add_h2(doc, "SAQ 4. Pseudophakia")
add_para(doc, "Pseudophakia = presence of artificial intraocular lens (IOL) in the eye after cataract extraction.")
add_h3(doc, "Types of IOL:")
for b in [
"Posterior chamber IOL (PCIOL) – in capsular bag (preferred); sulcus fixated",
"Anterior chamber IOL (ACIOL) – in anterior chamber (angle-supported)",
"Iris-fixated IOL",
"Phakic IOL – for high myopia; natural lens retained",
]:
add_bullet(doc, b)
add_h3(doc, "Clinical features of pseudophakia:")
for b in [
"Near-emmetropia (if IOL power calculated correctly)",
"No iridodonesis",
"IOL can be seen on slit lamp",
"Reading glasses needed for near work (monofocal IOL)",
"Complications: posterior capsular opacification (PCO/after cataract), cystoid macular oedema, IOL dislocation, endophthalmitis",
]:
add_bullet(doc, b)
add_h2(doc, "SAQ 5. Sturm's Conoid")
add_para(doc, "In regular astigmatism, the bundle of refracted rays forms an hour-glass or spindle-shaped figure called Sturm's conoid. The two extremities are the two focal lines (separated by the interval of Sturm). Between them is the circle of least confusion (where the beam has minimum cross-section). The circle of least confusion corresponds to the spherical equivalent of the astigmatic correction.")
add_h2(doc, "SAQ 6. Anisometropia")
add_para(doc, "Anisometropia = difference in refractive error between the two eyes (>1D is clinically significant, >2.5D causes problems).")
add_h3(doc, "Types:")
for b in [
"Simple – one eye emmetropic, other has refractive error",
"Compound – both eyes have same type but different degrees",
"Mixed – one myopic, one hypermetropic",
"Simple/compound astigmatic anisometropia",
"Antimetropia – one eye myopic, other hypermetropic",
]:
add_bullet(doc, b)
add_h3(doc, "Problems:")
for b in [
"Aniseikonia (different image sizes on two retinae) → diplopia, asthenopia",
"Amblyopia (more common with hypermetropic anisometropia)",
"Spectacles cause prismatic effect with eye movements → intolerance",
]:
add_bullet(doc, b)
add_h3(doc, "Management:")
for b in [
"Contact lenses (preferred – minimal image size difference)",
"Spectacles (tolerated up to ~2.5D difference)",
"Refractive surgery",
"Treat amblyopia with occlusion therapy",
]:
add_bullet(doc, b)
add_h2(doc, "SAQ 7. Pathological Myopia")
add_para(doc, "Pathological (degenerative/malignant) myopia: progressive high myopia >6D associated with structural changes of the eye due to axial elongation.")
add_h3(doc, "Features:")
for b in [
"Axial length >26 mm",
"Progressive elongation of eyeball during adult life",
"Fundus changes: tessellated (tigroid) fundus, peripapillary crescent (temporal/annular), posterior staphyloma (outward bulging of posterior sclera), chorioretinal atrophy (lacquer cracks), Fuchs' spots (subretinal neovascularization → haemorrhage → pigmentation at macula)",
"Complications: retinal detachment, vitreous degeneration (floaters), open-angle glaucoma, cataract",
]:
add_bullet(doc, b)
add_h3(doc, "Management:")
for b in [
"Optical correction as needed",
"Laser photocoagulation for lattice degeneration",
"Anti-VEGF (bevacizumab/ranibizumab) for choroidal neovascularization",
"Scleral buckling/vitreoretinal surgery for RD",
"Scleral reinforcement procedures (rarely done)",
]:
add_bullet(doc, b)
add_h2(doc, "SAQ 8. Contact Lenses")
add_h3(doc, "Types:")
for b in [
"Hard (rigid) lenses: PMMA (outdated), Rigid Gas Permeable (RGP/GP) – better O2 permeability",
"Soft lenses: hydrogel (HEMA), silicone hydrogel (highest O2 transmissibility)",
"Specialty: toric (astigmatism), bifocal/multifocal, orthokeratology (overnight reshaping)",
"Therapeutic lenses: bandage lenses for corneal conditions",
"Cosmetic/coloured lenses",
]:
add_bullet(doc, b)
add_h3(doc, "Indications:")
for b in [
"Refractive errors (especially anisometropia, high myopia, keratoconus)",
"Aphakia (better than spectacles)",
"Occupational (sports, performing arts)",
"Post-corneal graft",
"Therapeutic: bandage for bullous keratopathy, persistent epithelial defects",
]:
add_bullet(doc, b)
add_h3(doc, "Advantages over spectacles:")
for b in [
"Better cosmesis",
"Larger field of vision",
"No prismatic effect with eye movement",
"Less image magnification in aphakia",
"Better for sport",
]:
add_bullet(doc, b)
add_h3(doc, "Disadvantages:")
for b in [
"Corneal hypoxia → neovascularization",
"Infection risk (Acanthamoeba, bacterial, fungal keratitis)",
"Giant papillary conjunctivitis (GPC)",
"Dry eye worsening",
"Requires good hygiene and compliance",
"Not suitable for dry eyes, chronic blepharitis, atopic patients",
]:
add_bullet(doc, b)
add_h2(doc, "VSAQ: Radial Keratotomy & LASIK")
add_h3(doc, "Radial Keratotomy (RK):")
for b in [
"Surgical procedure for myopia: radial incisions made in peripheral cornea (sparing central optical zone)",
"Incisions flatten the central cornea → reduce myopic refractive error",
"Complications: glare, fluctuating vision, risk of perforation, progressive hyperopic shift over years",
"Largely replaced by LASIK",
]:
add_bullet(doc, b)
add_h3(doc, "LASIK (Laser-Assisted In-Situ Keratomileusis):")
for b in [
"Microkeratome (or femtosecond laser) creates corneal flap → excimer laser ablates stroma → flap replaced",
"Corrects myopia, hyperopia, astigmatism",
"Indications: stable refraction ≥1 yr, age ≥18, adequate corneal thickness (>500 µm), no KC",
"Advantages: rapid recovery, painless, precise",
"Complications: dry eye (most common), flap complications, regression, ectasia, infection, glare/halos",
]:
add_bullet(doc, b)
add_h2(doc, "VSAQs: Miscellaneous Refraction")
add_h3(doc, "Uses of Convex Lens in Ophthalmology:")
for b in [
"Correction of hypermetropia, presbyopia, aphakia",
"Indirect ophthalmoscopy (+20D lens)",
"Slit lamp examination (Volk lens +78D, +90D)",
"YAG laser capsulotomy (Peyman lens)",
"Loupe magnification",
]:
add_bullet(doc, b)
add_h3(doc, "Uses of Prisms in Ophthalmology:")
for b in [
"Measurement and correction of squint (prism cover test, prism bar)",
"Treatment of diplopia",
"Fresnel prisms for field expansion in hemianopia",
"Gonioscopy (Goldmann 3-mirror lens uses prisms)",
"In diagnostic instruments",
]:
add_bullet(doc, b)
add_h3(doc, "Reduced Eye:")
add_para(doc, "Theoretical simplified model of the eye with a single refracting surface (Listing's reduced eye): nodal point 7.08 mm from cornea, anterior focal point 15.7 mm in front of cornea, posterior focal point 24.13 mm behind cornea (on retina). Used for optical calculations.")
add_h3(doc, "Foster Fuchs' Spots:")
add_para(doc, "Dark pigmented spots at the macula in pathological myopia. They result from subretinal neovascularization (CNVM) → haemorrhage → organisation → pigmented scar. Cause central scotoma and permanent visual loss.")
doc.add_page_break()
doc.save('/tmp/workspace/ophthal-answers/ophthalmology_answers_part1.docx')
print("Part 1 saved successfully")
cd /tmp/workspace/ophthal-answers && python3 answers_part1.py
~/ophthal-answers/answers_part2.py
from docx import Document
from docx.shared import Pt, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
doc = Document('/tmp/workspace/ophthal-answers/ophthalmology_answers_part1.docx')
def add_h1(doc, text):
p = doc.add_heading(text, level=1)
p.runs[0].font.color.rgb = RGBColor(0, 102, 51)
def add_h2(doc, text):
p = doc.add_heading(text, level=2)
p.runs[0].font.color.rgb = RGBColor(128, 0, 0)
def add_h3(doc, text):
doc.add_heading(text, level=3)
def add_para(doc, text):
doc.add_paragraph(text)
def add_bullet(doc, text):
doc.add_paragraph(text, style='List Bullet')
def add_numbered(doc, text):
doc.add_paragraph(text, style='List Number')
# ════════════════════════════════════════════════
# SECTION 3: DISEASES OF CONJUNCTIVA
# ════════════════════════════════════════════════
doc.add_page_break()
add_h1(doc, "SECTION 3: DISEASES OF CONJUNCTIVA")
add_h2(doc, "LAQ 1. Ophthalmia Neonatorum")
add_para(doc, "Definition: Conjunctivitis occurring in the newborn within the first 28 days (4 weeks) of life. Also called neonatal conjunctivitis.")
add_h3(doc, "Etiology (by time of onset):")
table = doc.add_table(rows=5, cols=3)
table.style = 'Table Grid'
hdr = table.rows[0].cells
hdr[0].text = "Agent"; hdr[1].text = "Onset after birth"; hdr[2].text = "Notes"
data = [
("Chemical (silver nitrate)", "Within 24 hrs", "Now rare (1% AgNO3 prophylaxis)"),
("Neisseria gonorrhoeae", "2–5 days", "Hyperacute; copious purulent discharge; risk of corneal perforation"),
("Chlamydia trachomatis", "5–14 days", "Most common cause in developed countries"),
("Herpes simplex (HSV)", "5–7 days", "Rare; vesicular; risk of encephalitis"),
("Other bacteria (Staph, Strep, H. influenzae)", "4–5 days", "Mucopurulent discharge"),
]
for i, (a, o, n) in enumerate(data):
row = table.rows[i+1].cells
row[0].text = a; row[1].text = o; row[2].text = n
doc.add_paragraph()
add_h3(doc, "Clinical features:")
for b in [
"Swollen eyelids (chemosis, oedema)",
"Copious purulent or mucopurulent discharge",
"Conjunctival hyperaemia and congestion",
"Gonococcal: severe, bilateral, copious discharge within days; risk of corneal involvement → perforation, blindness",
"Chlamydial: less severe, may persist; pseudo-membranes; no corneal involvement usually",
]:
add_bullet(doc, b)
add_h3(doc, "Complications:")
for b in [
"Corneal ulceration and perforation (mainly gonococcal)",
"Blindness",
"Chlamydial: systemic – pneumonitis, otitis media",
"Dacryocystitis",
]:
add_bullet(doc, b)
add_h3(doc, "Diagnosis:")
for b in [
"Gram stain and culture of conjunctival discharge",
"Giemsa stain: intracytoplasmic inclusion bodies (chlamydia)",
"PCR for Chlamydia/HSV",
"Blood culture if systemic involvement suspected",
]:
add_bullet(doc, b)
add_h3(doc, "Management:")
for b in [
"Gonococcal: IV/IM ceftriaxone (systemic) + topical penicillin/ciprofloxacin eye drops; frequent eye wash with saline",
"Chlamydial: oral erythromycin (14 days) + topical tetracycline/erythromycin ointment; treat mother and sexual partner",
"Viral (HSV): topical acyclovir ointment + IV acyclovir",
"General: eye toileting (cleaning) with saline every 30-60 minutes initially",
]:
add_bullet(doc, b)
add_h3(doc, "Prophylaxis (Credé's prophylaxis):")
for b in [
"1% silver nitrate drops (original Credé's, 1881)",
"Current: 1% tetracycline ointment or 0.5% erythromycin ointment or 2.5% povidone iodine (preferred in developing countries)",
"Antenatal screening and treatment of mother's STI",
]:
add_bullet(doc, b)
add_h2(doc, "LAQ 2. Trachoma")
add_para(doc, "Chronic infectious keratoconjunctivitis caused by Chlamydia trachomatis (serotypes A, B, Ba, C). Leading cause of preventable blindness worldwide.")
add_h3(doc, "Etiology:")
for b in [
"Chlamydia trachomatis – obligate intracellular bacteria",
"Transmission: direct contact (eye-to-hand-to-eye), flies, fomites",
"Risk factors: overcrowding, poor hygiene, poor sanitation, water scarcity",
]:
add_bullet(doc, b)
add_h3(doc, "WHO Classification (FISTO grading / MacCallan's grading):")
add_para(doc, "WHO (FISTO):")
for b in [
"TF – Trachomatous Inflammation Follicular: ≥5 follicles ≥0.5 mm on upper tarsal conjunctiva",
"TI – Trachomatous Inflammation Intense: pronounced inflammatory thickening obscuring >50% of tarsal vessels",
"TS – Trachomatous Scarring: presence of scarring on tarsal conjunctiva (Arlt's lines)",
"TT – Trachomatous Trichiasis: ≥1 eyelash rubbing on eyeball",
"CO – Corneal Opacity: covering part of pupil margin → visual impairment",
]:
add_bullet(doc, b)
add_para(doc, "MacCallan's Stages:")
for b in [
"Stage I: Incipient trachoma – immature follicles on upper tarsal conjunctiva",
"Stage II: Established – mature follicles + papillae + pannus",
" IIa – Follicular predominant; IIb – Papillary predominant",
"Stage III: Scarring – Arlt's lines, Herbert's pits (cornea)",
"Stage IV: Healed – no active disease; cicatricial changes",
]:
add_bullet(doc, b)
add_h3(doc, "Clinical features:")
for b in [
"Mucopurulent discharge, lacrimation, photophobia",
"Follicles on upper tarsal conjunctiva (pathognomonic location)",
"Papillae: flat-topped vascular elevations",
"Pannus: vascularization of upper cornea (progressive pannus = vessels + infiltration > limbus)",
"Herbert's pits (healed follicles at superior limbus) – PATHOGNOMONIC",
"Arlt's lines: horizontal scars on tarsal conjunctiva",
"Cicatricial entropion → trichiasis → corneal abrasion → ulceration → blindness",
]:
add_bullet(doc, b)
add_h3(doc, "Diagnosis:")
for b in [
"Clinical (WHO criteria)",
"Giemsa stain: intracytoplasmic inclusion bodies (Halberstaedter-Prowazek bodies)",
"PCR (most sensitive and specific)",
"Immunofluorescence",
]:
add_bullet(doc, b)
add_h3(doc, "Management:")
for b in [
"Topical tetracycline 1% eye ointment × 6 weeks (TF/TI stages)",
"Oral azithromycin 1g single dose (mass drug administration) – WHO SAFE strategy",
"Surgical: trichiasis correction (bilamellar tarsal rotation), corneal transplant for opacity",
]:
add_bullet(doc, b)
add_h3(doc, "SAFE strategy (WHO):")
for b in [
"S – Surgery for trichiasis",
"A – Antibiotics (azithromycin mass treatment)",
"F – Facial cleanliness",
"E – Environmental improvement (water, sanitation)",
]:
add_bullet(doc, b)
add_h2(doc, "LAQ 3. Acute Bacterial Conjunctivitis")
add_para(doc, "Acute mucopurulent conjunctivitis caused by bacteria.")
add_h3(doc, "Etiology:")
for b in [
"Staphylococcus aureus (most common in adults)",
"Streptococcus pneumoniae (common in children)",
"Haemophilus influenzae (children, associated with otitis media)",
"Moraxella lacunata (angular conjunctivitis)",
"Neisseria gonorrhoeae (hyperacute – separate entity)",
]:
add_bullet(doc, b)
add_h3(doc, "Clinical features:")
for b in [
"Sudden onset redness, foreign body sensation",
"Mucopurulent discharge – crusting of lids in morning ('morning gluing')",
"Conjunctival hyperaemia – diffuse; more in fornices",
"Papillae on tarsal conjunctiva",
"No follicles (follicles = viral/chlamydial)",
"Vision usually normal (discharge may blur transiently)",
"Bilateral (usually spreads to second eye within 1-2 days)",
]:
add_bullet(doc, b)
add_h3(doc, "Differential diagnosis:")
for b in [
"Viral conjunctivitis (watery discharge, follicles, pre-auricular lymphadenopathy)",
"Allergic conjunctivitis (itching, ropy discharge, papillae)",
"Chlamydial (follicles, chronic course)",
"Dry eye (burning, no discharge)",
"Uveitis (perilimbal injection, photophobia, cells in AC)",
"Acute angle-closure glaucoma (halos, severe pain, hard eye)",
]:
add_bullet(doc, b)
add_h3(doc, "Treatment:")
for b in [
"Topical broad-spectrum antibiotics: chloramphenicol, fusidic acid, ciprofloxacin, tobramycin, moxifloxacin eye drops × 5-7 days",
"Eye toilet: clean discharge with cotton wool",
"Avoid patching (promotes bacterial growth)",
"Self-limiting; resolves in 1-2 weeks even without treatment",
"Culture and sensitivity if severe or unresponsive",
]:
add_bullet(doc, b)
add_h2(doc, "SAQ 1. Membranous Conjunctivitis")
add_para(doc, "Exudative response on conjunctiva with membrane formation.")
for b in [
"True membrane: exudate penetrates into epithelium; removal causes bleeding; caused by C. diphtheriae (most dangerous), beta-haemolytic Streptococcus",
"Pseudo-membrane: surface exudate; peels off without bleeding; caused by adenovirus, GAS, N. gonorrhoeae, S. pneumoniae",
]:
add_bullet(doc, b)
add_h3(doc, "Treatment:")
for b in [
"Diphtheria: antitoxin (systemic) + penicillin + topical penicillin/tetracycline",
"Membrane peeling under topical anaesthesia",
"Systemic antibiotics as per organism",
]:
add_bullet(doc, b)
add_h2(doc, "SAQ 2. Pterygium")
add_para(doc, "Definition: Fleshy, triangular, fibrovascular degenerative overgrowth of conjunctiva encroaching on the cornea, usually from the nasal side.")
add_h3(doc, "Etiology:")
for b in [
"UV radiation exposure (most important)",
"Dry, dusty, hot, windy environments",
"Chronic irritation",
]:
add_bullet(doc, b)
add_h3(doc, "Pathogenesis:")
for b in [
"UV → limbal stem cell damage → conjunctival invasion of cornea",
"Bowman's layer destroyed ahead of advancing head",
"Associated with overexpression of MMP-1, VEGF, p53",
]:
add_bullet(doc, b)
add_h3(doc, "Clinical features:")
for b in [
"Triangular fibrovascular tissue: head (on cornea), neck (at limbus), body (on conjunctiva)",
"Nasal side (3 o'clock position) most common",
"Stocker's line: iron line at leading edge of pterygium head",
"Types: Atrophic (thin, vessels visible) vs Fleshy (thick, progressive)",
]:
add_bullet(doc, b)
add_h3(doc, "Management:")
for b in [
"Conservative: sunglasses, lubricants (if no corneal involvement or vision affected)",
"Surgical: excision + conjunctival autograft (gold standard) or amniotic membrane graft",
"Recurrence rate: bare sclera technique = 30-80%; with autograft = 5-10%",
"Adjuvants for recurrent pterygium: mitomycin C (MMC), beta-irradiation",
]:
add_bullet(doc, b)
add_h3(doc, "Differentiation from pseudopterygium:")
table = doc.add_table(rows=5, cols=2)
table.style = 'Table Grid'
r = table.rows
r[0].cells[0].text = "Pterygium"; r[0].cells[1].text = "Pseudopterygium"
for a, b_ in [
("Always at limbus (3 or 9 o'clock)", "Can be anywhere on corneal periphery"),
("Progressive", "Non-progressive (stationary)"),
("Cannot pass probe under neck", "Probe can be passed under neck"),
("Bowman's layer destroyed ahead", "Bowman's layer intact ahead"),
]:
i = [r[0].cells[0].text == "Pterygium"] and data.index if False else None
pass
# Simple table replacement:
doc.tables[-1].rows[1].cells[0].text = "Always at limbus (3 or 9 o'clock)"
doc.tables[-1].rows[1].cells[1].text = "Can be anywhere on corneal periphery"
doc.tables[-1].rows[2].cells[0].text = "Progressive"
doc.tables[-1].rows[2].cells[1].text = "Non-progressive"
doc.tables[-1].rows[3].cells[0].text = "Cannot pass probe under neck"
doc.tables[-1].rows[3].cells[1].text = "Probe can be passed under neck"
doc.tables[-1].rows[4].cells[0].text = "Preceded by Stocker's line"
doc.tables[-1].rows[4].cells[1].text = "Related to corneal ulcer/chemical burn scar"
doc.add_paragraph()
add_h2(doc, "SAQ 5. Spring Catarrh / Vernal Keratoconjunctivitis (VKC)")
add_para(doc, "Recurrent bilateral chronic allergic conjunctivitis predominantly in young boys in hot, dry climates.")
add_h3(doc, "Etiology:")
for b in [
"Type I (IgE-mediated) hypersensitivity to airborne allergens",
"More common in atopic individuals (asthma, eczema)",
"Age: 3-25 years; more common in males; improves after puberty",
]:
add_bullet(doc, b)
add_h3(doc, "Clinical features:")
for b in [
"Intense itching (main symptom), photophobia, ropy/stringy mucoid discharge",
"Palpebral (tarsal) form: cobblestone/giant papillae on upper tarsal conjunctiva",
"Limbal form: Trantas' dots (white chalky spots at limbus = degenerated eosinophils); gelatinous limbal thickening",
"Mixed form: both features",
"Corneal: shield ulcer (Toynbee ulcer) – sterile, oval, in upper cornea; macroerosion; pseudogerontoxon (lipid arcus)",
]:
add_bullet(doc, b)
add_h3(doc, "Treatment:")
for b in [
"Cold compresses, sunglasses, relocation to cooler climate",
"Topical sodium cromoglycate 4% / lodoxamide (mast cell stabilisers) – prophylaxis",
"Topical antihistamines: olopatadine, epinastine",
"Topical steroids (short course): for acute flares",
"Topical cyclosporin A 0.05% – steroid-sparing",
"Supratarsal injection of triamcinolone/betamethasone – for palpebral VKC",
"Surgical: papillae removal, shield ulcer debridement + amniotic membrane",
]:
add_bullet(doc, b)
add_h2(doc, "SAQ 8. Subconjunctival Haemorrhage")
add_para(doc, "Definition: Haemorrhage beneath the conjunctiva due to rupture of small blood vessels.")
add_h3(doc, "Causes:")
for b in [
"Spontaneous: minor Valsalva (coughing, sneezing, vomiting, straining), hypertension, arteriosclerosis",
"Traumatic: direct injury, surgical, contact lens, rubbing",
"Systemic: anticoagulants (warfarin, aspirin), bleeding disorders, diabetes, leukaemia",
"Infections: bacterial endocarditis (Roth spots), meningococcaemia",
"Spontaneous in elderly is common",
]:
add_bullet(doc, b)
add_h3(doc, "Clinical features:")
for b in [
"Painless (usually) bright red patch on white of eye",
"Flat haemorrhage under conjunctiva; well-defined borders",
"No visual disturbance, no discharge",
"Resolves spontaneously in 1-2 weeks (colour changes yellow-green)",
]:
add_bullet(doc, b)
add_h3(doc, "Treatment:")
for b in [
"Reassurance in spontaneous cases (self-limiting)",
"Treat underlying cause (control BP, review anticoagulants)",
"Artificial tears for any discomfort",
"If traumatic: rule out open globe injury, orbital fracture",
"If recurrent: full blood count, clotting screen",
]:
add_bullet(doc, b)
add_h2(doc, "SAQ 4. Angular Conjunctivitis")
add_para(doc, "Conjunctivitis specifically affecting medial and lateral canthi, caused by Moraxella lacunata (Morax-Axenfeld diplobacillus).")
add_h3(doc, "Features:")
for b in [
"Maceration (reddening, excoriation) of canthal skin",
"Stringy mucoid discharge at canthi",
"Follicle-free conjunctival inflammation",
"Chronic, recurrent",
"Associated with zinc deficiency (zinc is required by Moraxella protease)",
]:
add_bullet(doc, b)
add_h3(doc, "Treatment: Zinc sulphate 0.5% eye drops; topical tetracycline/ciprofloxacin")
add_h2(doc, "SAQ 7. Phlyctenular Keratoconjunctivitis")
add_para(doc, "Type IV (delayed, cell-mediated) hypersensitivity reaction to microbial proteins (TB most common; also Staph, Moraxella, Candida).")
add_h3(doc, "Clinical features:")
for b in [
"Phlycten: small grey-white nodule at limbus or cornea, surrounded by congested vessels",
"Intense photophobia, lacrimation, blepharospasm",
"Corneal phlycten: fascicular ulcer (leash of vessels following phlycten across cornea) → pannus → scarring",
]:
add_bullet(doc, b)
add_h3(doc, "Treatment: Topical steroids + treat underlying cause (anti-TB if needed)")
doc.add_page_break()
add_h1(doc, "SECTION 4: CORNEAL DISEASES")
add_h2(doc, "LAQ 1. Bacterial Corneal Ulcer")
add_para(doc, "Clinical scenario: 50-yr-old farmer, vegetative trauma, grey-white infiltrate with epithelial defect.")
add_para(doc, "Provisional diagnosis: Bacterial corneal ulcer (Fungal also in differential given vegetative trauma)")
add_h3(doc, "Etiology – Common organisms:")
for b in [
"Pseudomonas aeruginosa (most aggressive; soft contact lens wearers)",
"Staphylococcus aureus",
"Streptococcus pneumoniae (diplococcus)",
"Moraxella (in alcoholics, immunocompromised)",
"Enterobacteriaceae (Klebsiella, E. coli)",
"Risk factors: trauma, contact lens, dry eye, immunosuppression, prior surgery",
]:
add_bullet(doc, b)
add_h3(doc, "Stages of corneal ulcer (AK Khurana):")
for b in [
"Stage of infiltration: acute exudation, stromal haze, oedema, leucocyte infiltration",
"Stage of progressive ulceration: epithelial loss, stromal melting by proteases (MMPs)",
"Stage of regression: vascularization at margins, leucocyte migration, fibroblast activity",
"Stage of cicatrization: fibrosis → nebula/macula/leucoma (depending on depth)",
]:
add_bullet(doc, b)
add_h3(doc, "Clinical features:")
for b in [
"Severe pain, photophobia, lacrimation, reduced vision",
"Circumcorneal (ciliary) congestion",
"Grey/white epithelial/stromal infiltrate with epithelial defect",
"Stromal oedema, surrounding haze",
"Hypopyon (if severe) – sterile collection of WBCs in AC",
"Lid oedema, conjunctival chemosis",
]:
add_bullet(doc, b)
add_h3(doc, "Diagnosis:")
for b in [
"Slit-lamp examination",
"Corneal scraping: Gram stain, KOH, Giemsa, culture (blood agar, chocolate agar, Sabouraud for fungus)",
"Confocal microscopy (research/specialist centres)",
]:
add_bullet(doc, b)
add_h3(doc, "Management:")
for b in [
"Hospitalisation if severe; close follow-up",
"Intensive topical antibiotics (fortified): ciprofloxacin 0.3% or ofloxacin; if Pseudomonas: tobramycin 1.3% + cefazolin 5%",
"Hourly drops initially → taper as response seen",
"Cycloplegic: atropine 1% (reduces pain, prevents posterior synechiae, reduces protein exudation)",
"No steroids until infection controlled",
"Systemic antibiotics if scleral extension or perforation risk",
"Therapeutic penetrating keratoplasty (TPK) for perforated/non-responding ulcer",
"Tissue adhesive (cyanoacrylate glue) + bandage contact lens for impending perforation",
]:
add_bullet(doc, b)
add_h3(doc, "Complications:")
for b in [
"Corneal perforation, endophthalmitis",
"Descemetocele (Descemet's bulge through stromal defect)",
"Corneal opacity (nebula/macula/leucoma/adherent leucoma)",
"Anterior staphyloma (if scar + intraocular pressure)",
]:
add_bullet(doc, b)
add_h2(doc, "LAQ 2. Hypopyon Corneal Ulcer (Ulcer Serpens)")
add_para(doc, "Hypopyon = sterile layering of WBCs in anterior chamber, seen with severe corneal ulceration.")
add_para(doc, "Ulcer Serpens (Saemisch's ulcer / hypopyon ulcer): caused by Streptococcus pneumoniae or Haemophilus influenzae; characterised by a crescent-shaped advancing ulcer (serpent-like progression).")
add_h3(doc, "Signs:")
for b in [
"Hypopyon: mobile, white, gravity-dependent level in AC",
"Grey/yellow crescent-shaped advancing ulcer with overhanging undermined edges",
"Infected area: 'dirty grey' floor",
"Active border advances (Saemisch's ulcer crosses cornea)",
]:
add_bullet(doc, b)
add_h3(doc, "Treatment:")
for b in [
"Intensive topical fluoroquinolone or fortified antibiotics",
"Cycloplegic (atropine 1%)",
"Systemic antibiotics",
"Saemisch's section (rarely done now): section through base of ulcer to drain hypopyon",
"TPK if medical treatment fails",
]:
add_bullet(doc, b)
add_h2(doc, "LAQ 3. Herpes Simplex Keratitis")
add_para(doc, "HSV-1 (primarily); HSV-2 (genital herpes; neonatal ocular herpes). Common cause of corneal blindness in developed world.")
add_h3(doc, "Signs and symptoms:")
for b in [
"Primary infection (usually childhood): follicular conjunctivitis, vesicular lid lesions, mild keratitis",
"Recurrent disease (reactivation of latent virus in trigeminal ganglion):",
"Epithelial (superficial) keratitis: dendritic ulcer (branching, linear, with terminal end bulbs – pathognomonic); geographic ulcer (large amoeboid, after steroid use or immunosuppression)",
"Stromal keratitis (immune-mediated): disciform keratitis (disc-shaped stromal oedema; Wessley immune ring); necrotising stromal keratitis (rare; active viral replication)",
"Neurotrophic keratopathy: anaesthetic cornea from destroyed nerve supply → persistent epithelial defect",
"Endotheliitis",
"Reduced corneal sensation (key clinical sign)",
]:
add_bullet(doc, b)
add_h3(doc, "Diagnosis:")
for b in [
"Clinical: dendritic ulcer with reduced corneal sensation (rose bengal staining shows terminal bulbs; fluorescein shows epithelial defect)",
"Viral culture (swab of corneal scrapings)",
"PCR (most sensitive)",
"Corneal confocal microscopy",
"Slit-lamp with fluorescein/rose bengal",
]:
add_bullet(doc, b)
add_h3(doc, "Treatment:")
for b in [
"Epithelial (dendritic/geographic) keratitis: topical acyclovir 3% ointment 5× daily × 14 days (DOC); alternative: topical ganciclovir; debridement (gentle epithelial scraping) – removes virus-laden cells",
"NEVER use topical steroids alone in active epithelial disease (worsens dendritic ulcer dramatically)",
"Stromal keratitis (disciform): topical steroids + prophylactic antiviral cover (acyclovir ointment)",
"Neurotrophic keratopathy: lubricants, bandage contact lens, tarsorrhaphy, nerve growth factor (cenegermin)",
"Oral acyclovir 400 mg BD for prophylaxis of recurrences (HEDS trial)",
"Keratoplasty (penetrating or lamellar) for corneal scarring",
]:
add_bullet(doc, b)
add_h2(doc, "LAQ 4. Mycotic (Fungal) Corneal Ulcer")
add_para(doc, "Provisional diagnosis: Mycotic corneal ulcer (scenario: cowherd, vegetative trauma with buffalo tail)")
add_h3(doc, "Etiology:")
for b in [
"Filamentous fungi (most common in India): Fusarium (most common), Aspergillus, Curvularia, Cephalosporium",
"Yeast: Candida (immunocompromised patients)",
"Risk factors: vegetative/agricultural trauma, corticosteroid use, contact lens, immunosuppression",
]:
add_bullet(doc, b)
add_h3(doc, "Pathogenesis:")
for b in [
"Fungal hyphae invade stroma → inflammatory response",
"Toxins + enzymatic activity cause necrosis",
"Hyphae can penetrate intact Descemet's → endophthalmitis",
]:
add_bullet(doc, b)
add_h3(doc, "Clinical features:")
for b in [
"Slower onset (compared to bacterial)",
"Moderate pain, redness, photophobia, blurred vision",
"Dry-looking infiltrate with feathery/irregular borders",
"Rolled-out margins",
"Satellite lesions (separate infiltrates)",
"Immune ring (Wessley ring)",
"Endothelial plaque",
"Large hypopyon (disproportionate to size of ulcer)",
"No fluorescent glow under Wood's lamp (unlike bacteria)",
]:
add_bullet(doc, b)
add_h3(doc, "Diagnosis:")
for b in [
"KOH wet mount: septate hyphae (filamentous) or yeast cells",
"Giemsa stain: hyphae",
"Culture: Sabouraud's dextrose agar (SDA) – 4 weeks",
"Calcofluor white stain under UV",
"Confocal microscopy (in vivo)",
]:
add_bullet(doc, b)
add_h3(doc, "Treatment:")
for b in [
"Natamycin 5% eye drops (DOC for filamentous fungi; available as suspension)",
"Voriconazole 1% eye drops (broad spectrum; Candida and filamentous; penetrates better)",
"Amphotericin B 0.15% (for Candida and yeast)",
"Posaconazole / itraconazole oral for deep/resistant infections",
"Cycloplegic (atropine 1%)",
"NO STEROIDS",
"Therapeutic penetrating keratoplasty (TPK) for non-responding/perforated cases",
]:
add_bullet(doc, b)
add_h2(doc, "SAQ 2. Keratoplasty")
add_para(doc, "Definition: Surgical replacement of diseased/opaque cornea with donor cornea.")
add_h3(doc, "Types:")
for b in [
"Penetrating Keratoplasty (PK/PKP) – full thickness corneal graft; all layers replaced",
"Lamellar Keratoplasty – partial thickness:",
" - ALK (Automated Lamellar Keratoplasty) – anterior",
" - DALK (Deep Anterior Lamellar Keratoplasty) – replaces all layers except endothelium and Descemet's; used in keratoconus, stromal scars",
" - DSEK/DSAEK (Descemet's Stripping Automated Endothelial Keratoplasty) – endothelium + Descemet's + thin stroma",
" - DMEK (Descemet's Membrane Endothelial Keratoplasty) – only Descemet's + endothelium; best visual outcomes for endothelial disease",
]:
add_bullet(doc, b)
add_h3(doc, "Indications for PK:")
for b in [
"Optical: corneal opacity (leucoma, adherent leucoma), keratoconus (advanced), corneal dystrophies",
"Tectonic: structural support for perforated/impending perforation cornea",
"Therapeutic: resistant infective keratitis",
"Cosmetic: improving appearance",
]:
add_bullet(doc, b)
add_h3(doc, "Indications for lamellar (DALK):")
for b in [
"Keratoconus, Macular dystrophy, Granular dystrophy",
"Stromal scars with healthy endothelium",
"Advantage: endothelium preserved → no risk of endothelial rejection; can use marginal donor tissue",
]:
add_bullet(doc, b)
add_h3(doc, "Procedure (PK):")
for b in [
"Trephination of recipient cornea (usually 7.5-8 mm button)",
"Donor button cut 0.25 mm larger than recipient",
"Suturing with 10-0 nylon; 16 interrupted or continuous sutures",
"Reformation of AC with BSS",
]:
add_bullet(doc, b)
add_h3(doc, "Complications:")
for b in [
"Graft failure (primary/secondary)",
"Graft rejection (endothelial rejection most important: Khodadoust line; episodes require emergency topical steroids)",
"Astigmatism (most common long-term complication)",
"Infection",
"Glaucoma",
"Cataract",
"Recurrence of original disease (e.g., keratoconus, HSV)",
"Epithelial downgrowth",
]:
add_bullet(doc, b)
add_h2(doc, "SAQ 8. Keratoconus")
add_para(doc, "Bilateral, progressive, non-inflammatory ectatic corneal disorder characterised by paracentral thinning and steepening → conical protrusion.")
add_h3(doc, "Features:")
for b in [
"Age: onset puberty; slowly progressive; bilateral (asymmetric)",
"Irregular myopic astigmatism (against-the-rule or oblique)",
"Munson's sign: V-shaped deformity of lower lid on downward gaze",
"Fleischer's ring: brown iron ring at base of cone (haemosiderin deposition)",
"Vogt's striae: fine vertical stress lines in deep stroma",
"Rizutti's sign: conical reflection on nasal cornea from penlight from lateral side",
"Acute hydrops: sudden stromal oedema from Descemet's rupture → intense blurring → resolves in weeks with scarring",
]:
add_bullet(doc, b)
add_h3(doc, "Management:")
for b in [
"Spectacles (early)",
"RGP contact lenses (moderate; best-corrected VA)",
"Corneal cross-linking (CXL/C3R) with riboflavin + UV-A – halts progression (standard of care)",
"Intracorneal ring segments (ICRS / Intacs) – reduces irregularity",
"DALK or PK (advanced keratoconus with intolerance to CL or severe scarring)",
]:
add_bullet(doc, b)
add_h2(doc, "SAQ 13. Mooren's Ulcer")
add_para(doc, "Chronic, progressive, painful, peripheral ulcerative keratitis (PUK) of unknown aetiology (autoimmune).")
add_h3(doc, "Features:")
for b in [
"Begins at limbus → spreads circumferentially, then centrally (undermined overhanging edge)",
"Painful, unilateral or bilateral",
"Two types: Type I (limited, benign, elderly, unilateral, responds to steroids); Type II (aggressive, bilateral, young, African)",
"Severe pain (unlike other peripheral ulcerations)",
"No systemic disease association (unlike other PUK causes)",
]:
add_bullet(doc, b)
add_h3(doc, "Treatment: Topical steroids, systemic immunosuppression (methotrexate, cyclosporin), conjunctival recession, keratoplasty")
add_h2(doc, "SAQ 18. Corneal Opacity")
add_para(doc, "Definition: Any opacity/cloudiness of the normally transparent cornea.")
add_h3(doc, "Types by density (Nebula → Macula → Leucoma):")
for b in [
"Nebula – faint opacity; can only be seen with slit lamp; does not affect vision significantly",
"Macula – moderately dense; visible with oblique illumination; some visual effect",
"Leucoma – dense white opacity; fully visible with naked eye; significantly reduces vision",
"Adherent leucoma – corneal scar with incarcerated iris tissue (post-perforation)",
"Anterior staphyloma – ectatic scar with iris adherent + forward bulging",
]:
add_bullet(doc, b)
add_h3(doc, "Causes:")
for b in [
"Post-infective: bacterial, fungal, viral keratitis",
"Traumatic",
"Degenerative: band-shaped keratopathy",
"Dystrophies: granular, macular, lattice",
"Congenital: Peters anomaly",
]:
add_bullet(doc, b)
add_h3(doc, "Treatment:")
for b in [
"Optical iridectomy (if central opacity with clear peripheral cornea)",
"Keratoplasty (penetrating or lamellar)",
"Excimer laser phototherapeutic keratectomy (PTK) for superficial opacities",
"Corneal tattooing (cosmetic only)",
]:
add_bullet(doc, b)
add_h3(doc, "Corneal vascularization:")
for b in [
"Normal cornea is avascular; vessels indicate chronic inflammation/hypoxia",
"Superficial: from limbal conjunctival vessels → extend under epithelium",
"Deep: from anterior ciliary arteries → extend in stroma",
"Causes: trachoma (pannus), interstitial keratitis (deep), contact lens hypoxia, alkali burns",
]:
add_bullet(doc, b)
doc.add_page_break()
add_h1(doc, "SECTION 5: DISEASES OF SCLERA")
add_h2(doc, "Episcleritis")
add_para(doc, "Inflammation of episclera (tissue between conjunctiva and sclera). Benign, self-limiting, common in young women.")
add_h3(doc, "Types: Simple (diffuse) and Nodular")
add_h3(doc, "Clinical features:")
for b in [
"Acute, unilateral, mild-moderate ocular pain/discomfort",
"Sectoral or diffuse redness (salmon-pink)",
"No discharge; no photophobia",
"Movable nodule in nodular type",
"10% phenylephrine test: blanches episcleral vessels (not scleral) → differentiates from scleritis",
"Mostly idiopathic; sometimes associated with RA, gout, IBD",
]:
add_bullet(doc, b)
add_h3(doc, "Treatment:")
for b in [
"Usually self-limiting (6-8 weeks)",
"Topical NSAIDs (ketorolac) or lubricants",
"Oral NSAIDs (indomethacin) for persistent/nodular cases",
"Short course topical steroids",
]:
add_bullet(doc, b)
add_h2(doc, "Scleritis")
add_para(doc, "Inflammation of sclera; more severe than episcleritis; associated with systemic disease in 50% cases.")
add_h3(doc, "Etiology:")
for b in [
"Autoimmune: RA (most common systemic association), Wegener's granulomatosis, SLE, PAN, relapsing polychondritis",
"Infections: TB, syphilis, herpes zoster",
"Idiopathic (most common cause)",
]:
add_bullet(doc, b)
add_h3(doc, "Classification:")
for b in [
"Anterior scleritis (90%): Diffuse, Nodular, Necrotising (with/without inflammation)",
" - Scleromalacia perforans: necrotising scleritis without inflammation; associated with RA",
"Posterior scleritis: deep boring pain; posterior segment complications (proptosis, choroidal detachment, disc oedema); diagnosed by B-scan (T-sign)",
]:
add_bullet(doc, b)
add_h3(doc, "Clinical features:")
for b in [
"Severe, boring, deep ocular pain (worse at night, radiating to temple/jaw)",
"10% phenylephrine does NOT blanch (differentiates from episcleritis)",
"Violaceous (bluish-red) discolouration of sclera",
"Scleral nodule (tender) in nodular type",
"Necrosis, thinning → scleromalacia in severe cases",
]:
add_bullet(doc, b)
add_h3(doc, "Complications: Uveitis, keratitis (sclerosing), cataract, glaucoma, scleral thinning/perforation")
add_h3(doc, "Treatment:")
for b in [
"Systemic NSAIDs: indomethacin/flurbiprofen (first line)",
"Oral steroids (prednisolone) for non-necrotising not responding to NSAIDs",
"Immunosuppressants (methotrexate, azathioprine, cyclophosphamide) for necrotising",
"Biologics (infliximab, rituximab) for refractory",
"Treat underlying systemic disease",
]:
add_bullet(doc, b)
add_h2(doc, "Staphyloma")
add_para(doc, "Definition: Outward bulging of cornea or sclera lined by uveal tissue (iris, ciliary body, or choroid).")
add_h3(doc, "Types:")
for b in [
"Anterior corneal staphyloma: corneal ectasia with adherent iris at site of old perforated ulcer",
"Ciliary staphyloma: at ciliary region (3-7 mm from limbus)",
"Equatorial staphyloma: at equator; associated with high myopia, buphthalmos",
"Posterior staphyloma: posterior bulging of sclera at posterior pole; associated with pathological myopia; seen on fundus exam or B-scan",
"Intercalary staphyloma: between limbus and ciliary body (rare)",
]:
add_bullet(doc, b)
add_h3(doc, "Treatment: Optical iridectomy/keratoplasty for anterior; scleral reinforcement for posterior")
doc.save('/tmp/workspace/ophthal-answers/ophthalmology_answers_part1.docx')
print("Part 2 (conjunctiva, cornea, sclera) saved successfully")
cd /tmp/workspace/ophthal-answers && python3 answers_part2.py
cd /tmp/workspace/ophthal-answers && sed -i 's/for i, (a, b_) in enumerate(data):/# removed broken loop/' answers_part2.py && sed -i '/row = table\.rows\[i+1\]\.cells/d' answers_part2.py && python3 -c " from docx import Document from docx.shared import Pt, RGBColor doc = Document('ophthalmology_answers_part1.docx') # just check it opens and pages work print('Pages OK, paragraphs:', len(doc.paragraphs)) "
I want answers for all questions in pdf
Answer pls