Make a PDF of that non-clinical subject also for previous year NEET PG, USMLE, INSAT questions that you have made for the clinical subjects. It's like, make the MBBS first and second year with the ENT, Ophth and Forensic. Make that PDF of previous year topic with the one-liner you have made it before for clinical subjects. In that same pattern, make it for these subjects also.

Browsing Directory

/home/daytona/workspace

Browsing Directory

~/neet-pg-2026

Reading File
Reading File
Reading File
Reading File
Reading File
Writing File

~/neet-pg-2026/generate_paraclinical_pdf.py

from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import inch, cm
from reportlab.lib import colors
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    PageBreak, HRFlowable, KeepTogether
)
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
import datetime

OUTPUT_PATH = "/home/daytona/workspace/neet-pg-2026/NEET_PG_2026_ENT_Ophth_Forensic_OneLiners.pdf"

# ── colour palette ────────────────────────────────────────────────
C_DARK_BLUE    = colors.HexColor("#1A237E")
C_TEAL         = colors.HexColor("#00838F")
C_CRIMSON      = colors.HexColor("#880E4F")
C_FOREST       = colors.HexColor("#1B5E20")
C_INDIGO       = colors.HexColor("#283593")
C_BROWN        = colors.HexColor("#4E342E")
C_DEEP_PURPLE  = colors.HexColor("#4A148C")
C_DEEP_ORANGE  = colors.HexColor("#BF360C")
C_DEEP_TEAL    = colors.HexColor("#004D40")
C_AMBER        = colors.HexColor("#FF6F00")
C_NAVY         = colors.HexColor("#0D47A1")

C_LIGHT_BLUE   = colors.HexColor("#E3F2FD")
C_LIGHT_ROSE   = colors.HexColor("#FCE4EC")
C_LIGHT_GREEN  = colors.HexColor("#E8F5E9")
C_LIGHT_INDIGO = colors.HexColor("#E8EAF6")
C_LIGHT_PURPLE = colors.HexColor("#F3E5F5")
C_LIGHT_ORANGE = colors.HexColor("#FFF3E0")
C_LIGHT_TEAL   = colors.HexColor("#E0F2F1")
C_LIGHT_AMBER  = colors.HexColor("#FFF8E1")
C_LIGHT_BROWN  = colors.HexColor("#EFEBE9")

C_DARK_GREY    = colors.HexColor("#424242")
C_YELLOW       = colors.HexColor("#F9A825")
C_WHITE        = colors.white

styles = getSampleStyleSheet()

def make_styles():
    s = {}
    s["cover_title"] = ParagraphStyle(
        "cover_title", fontName="Helvetica-Bold", fontSize=26,
        textColor=C_DARK_BLUE, alignment=TA_CENTER, spaceAfter=8, leading=32)
    s["cover_sub"] = ParagraphStyle(
        "cover_sub", fontName="Helvetica", fontSize=13,
        textColor=C_TEAL, alignment=TA_CENTER, spaceAfter=4)
    s["cover_note"] = ParagraphStyle(
        "cover_note", fontName="Helvetica-Oblique", fontSize=10,
        textColor=C_DARK_GREY, alignment=TA_CENTER, spaceAfter=4)
    s["toc_header"] = ParagraphStyle(
        "toc_header", fontName="Helvetica-Bold", fontSize=16,
        textColor=C_DARK_BLUE, alignment=TA_CENTER, spaceAfter=12)
    s["toc_entry"] = ParagraphStyle(
        "toc_entry", fontName="Helvetica", fontSize=11,
        textColor=C_DARK_GREY, leftIndent=20, spaceAfter=4)
    s["section_heading"] = ParagraphStyle(
        "section_heading", fontName="Helvetica-Bold", fontSize=15,
        textColor=C_WHITE, alignment=TA_LEFT, spaceAfter=0,
        leftIndent=8, leading=20)
    s["subsection"] = ParagraphStyle(
        "subsection", fontName="Helvetica-Bold", fontSize=11,
        textColor=C_DARK_BLUE, spaceAfter=4, spaceBefore=8, leading=14)
    s["oneliner"] = ParagraphStyle(
        "oneliner", fontName="Helvetica", fontSize=9.5,
        textColor=C_DARK_GREY, spaceAfter=3, leading=13,
        leftIndent=8, rightIndent=4)
    s["hook"] = ParagraphStyle(
        "hook", fontName="Helvetica-Oblique", fontSize=9,
        textColor=C_DEEP_TEAL, spaceAfter=5, leading=12,
        leftIndent=16, rightIndent=4)
    s["footer"] = ParagraphStyle(
        "footer", fontName="Helvetica", fontSize=8,
        textColor=C_DARK_GREY, alignment=TA_CENTER)
    return s

def section_header_table(title, bg_color, S):
    cell = Paragraph(title, S["section_heading"])
    t = Table([[cell]], colWidths=[7.0*inch])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), bg_color),
        ("TOPPADDING",    (0,0), (-1,-1), 8),
        ("BOTTOMPADDING", (0,0), (-1,-1), 8),
        ("LEFTPADDING",   (0,0), (-1,-1), 10),
        ("RIGHTPADDING",  (0,0), (-1,-1), 10),
        ("ROUNDEDCORNERS", [6, 6, 6, 6]),
    ]))
    return t

def oneliner_block(fact, hook, S, bg):
    bullet = Table(
        [[Paragraph(u"\u2022 " + fact, S["oneliner"]),
          Paragraph(u"\u2605 " + hook, S["hook"])]],
        colWidths=[3.8*inch, 3.2*inch]
    )
    bullet.setStyle(TableStyle([
        ("BACKGROUND",    (0,0), (-1,-1), bg),
        ("VALIGN",        (0,0), (-1,-1), "TOP"),
        ("TOPPADDING",    (0,0), (-1,-1), 5),
        ("BOTTOMPADDING", (0,0), (-1,-1), 5),
        ("LEFTPADDING",   (0,0), (-1,-1), 6),
        ("RIGHTPADDING",  (0,0), (-1,-1), 6),
        ("ROUNDEDCORNERS",[4,4,4,4]),
        ("LINEBELOW", (0,0), (-1,-1), 0.3, colors.HexColor("#DDDDDD")),
    ]))
    return [bullet, Spacer(1, 0.03*inch)]

def add_section(story, title, bg_color, light_bg, data, S):
    story.append(PageBreak())
    story.append(section_header_table(title, bg_color, S))
    story.append(Spacer(1, 0.12*inch))
    _ = light_bg
    for subsec, entries in data:
        story.append(Paragraph(subsec, S["subsection"]))
        for fact, hook in entries:
            for elem in oneliner_block(fact, hook, S, _):
                story.append(elem)
        story.append(Spacer(1, 0.04*inch))

# ════════════════════════════════════════════════════════════════════
# DATA SECTIONS
# ════════════════════════════════════════════════════════════════════

ENT = [
  ("Ear - Anatomy & Physiology", [
    ("Tympanic membrane: cone-shaped; pars tensa (lower 4/5) + pars flaccida (Shrapnell's membrane, upper 1/5); light reflex at anteroinferior quadrant.",
     "TM: Pars flaccida = upper = Shrapnell's; light reflex = antero-inferior = 5 o'clock position"),
    ("Ossicles: malleus (handle attached to TM) → incus (bridge) → stapes (footplate in oval window); amplify sound 22x (lever ratio + areal ratio).",
     "MIS: Malleus-Incus-Stapes; malleus = TM; stapes = oval window; sound amplified 22x"),
    ("Eustachian tube: 36 mm adult; 17 mm child (more horizontal); opens into nasopharynx; equalises middle ear pressure; opens during swallowing/yawning.",
     "ET in children: shorter + horizontal = more prone to middle ear infections"),
    ("Cochlea: 2.5 turns; scala vestibuli (perilymph) + scala media (endolymph) + scala tympani (perilymph); Organ of Corti on basilar membrane; hair cells detect vibration.",
     "Cochlea: endolymph = high K+ (like intracellular); basilar membrane = frequency mapping; base = high freq, apex = low freq"),
    ("Vestibular apparatus: utricle + saccule (linear acceleration, gravity) + 3 semicircular canals (angular acceleration); macula = otolith organ.",
     "Semicircular canals = rotational; utricle/saccule = linear; macula has otoliths"),
    ("Rinne test: BC > AC = Rinne negative = conductive hearing loss; AC > BC = Rinne positive = normal or SNHL.",
     "Rinne negative (BC>AC) = Conductive loss; positive (AC>BC) = normal/SNHL"),
    ("Weber test: lateralises to affected ear in conductive loss; to better ear in SNHL.",
     "Weber: goes TO bad ear in conductive; AWAY from bad ear in SNHL"),
  ]),
  ("Ear - Diseases", [
    ("Acute otitis media: MC organism = Streptococcus pneumoniae (all ages); children also Haemophilus influenzae, Moraxella catarrhalis; treat with amoxicillin.",
     "AOM: MC = S. pneumoniae; amoxicillin first line; penicillin allergy = azithromycin"),
    ("Chronic suppurative otitis media (CSOM): Tubotympanic (safe, central perforation, mucoid discharge, no cholesteatoma) vs Atticoantral (unsafe, marginal/attic perforation, cholesteatoma).",
     "CSOM: Tubotympanic=Safe=Central; Atticoantral=Unsafe=Attic=Cholesteatoma"),
    ("Cholesteatoma: stratified squamous epithelium in middle ear; keratin accumulation; bone erosion; MC complication = facial nerve palsy; 'coffee bean' pearly mass on otoscopy.",
     "Cholesteatoma = skin in wrong place; erodes bone; pearly white = 'dead skin in ear'"),
    ("Otosclerosis: fixation of stapes footplate; autosomal dominant; bilateral; Carhart's notch at 2000 Hz on audiogram; treat with stapedectomy.",
     "Otosclerosis: AD; stapes fixed; Carhart notch 2kHz; treatment = stapedectomy (replace with prosthesis)"),
    ("Meniere's disease: endolymphatic hydrops; triad = episodic vertigo + fluctuating SNHL + tinnitus + aural fullness; low-frequency SNHL first.",
     "Meniere's = VTHS: Vertigo + Tinnitus + Hearing loss + fullneSS; low freq first affected"),
    ("Benign Paroxysmal Positional Vertigo (BPPV): MC cause of vertigo; canalith in posterior semicircular canal; Dix-Hallpike positive; treat with Epley manoeuvre.",
     "BPPV: MC vertigo; Dix-Hallpike test; Epley = canalith repositioning; canaliths = calcium carbonate crystals"),
    ("Acoustic neuroma (vestibular schwannoma): CN VIII tumor; CPA angle; unilateral SNHL + tinnitus + vertigo; bilateral = NF2; MRI = investigation of choice.",
     "Acoustic neuroma: CN VIII; CPA; bilateral = NF2 (chromosome 22); MRI gadolinium = gold standard"),
    ("Presbycusis: age-related SNHL; bilateral; starts at high frequencies; sensory degeneration of Organ of Corti.",
     "Presbycusis: old age; high freq loss first (4-8 kHz); bilateral symmetric; wear hearing aids"),
    ("Otitis externa (Swimmer's ear): MC = Pseudomonas aeruginosa; pain on tragus pressure/pinna movement; treat with topical ciprofloxacin + steroid.",
     "Otitis externa: Pseudomonas; pain on pinna traction = key sign; swimmer's ear"),
    ("Malignant (necrotizing) otitis externa: elderly diabetics; Pseudomonas; skull base osteomyelitis; facial nerve palsy; treat with IV ciprofloxacin + surgery.",
     "Malignant OE: diabetic + Pseudomonas + cranial nerve palsies = emergency"),
  ]),
  ("Nose & Paranasal Sinuses", [
    ("Blood supply of nasal septum: Little's area (Kiesselbach's plexus) = confluence of 5 arteries (anterior ethmoidal, posterior ethmoidal, sphenopalatine, greater palatine, superior labial); MC site of epistaxis.",
     "Little's area = Kiesselbach's plexus = MC epistaxis site = antero-inferior septum"),
    ("Epistaxis: anterior = MC (Little's area); posterior = from sphenopalatine artery (elderly, hypertensives); posterior bleeds more severe.",
     "Anterior epistaxis = Little's area; posterior = sphenopalatine artery = more dangerous, elderly"),
    ("Sinuses in order of development: maxillary (present at birth) → ethmoid (birth) → sphenoid (3rd year) → frontal (last, 6-7 years).",
     "Sinus development: Maxillary first (at birth); Frontal last (6-7 years); 'My Eager Students Follow'"),
    ("Maxillary sinusitis: MC sinus involved; drainage through ostium on medial wall (high up = poor drainage); toothache-like pain; pus drips into nasopharynx.",
     "Maxillary: MC sinus; ostium high up = poor drainage; upper tooth pain = clue"),
    ("Frontal sinusitis: complications = Pott's puffy tumor (osteomyelitis of frontal bone with subperiosteal abscess); meningitis.",
     "Frontal sinusitis complication = Pott's puffy tumor (forehead swelling + osteomyelitis)"),
    ("Allergic rhinitis: IgE mediated; seasonal (pollens) vs perennial (dust mites, mold); pale bluish turbinates; treat with intranasal corticosteroids + antihistamines.",
     "Allergic rhinitis: IgE; pale boggy turbinates; INCS = first line; antihistamines for sneezing/itch"),
    ("Nasal polyps: bilateral = allergic/non-allergic; unilateral = rule out malignancy; ethmoidal MC; Samter's triad = asthma + polyps + aspirin sensitivity.",
     "Nasal polyps: bilateral=benign; unilateral=malignancy till proven; Samter's triad = aspirin + asthma + polyps"),
    ("Angiofibroma (juvenile nasopharyngeal angiofibroma - JNA): adolescent males; epistaxis + nasal obstruction; hypervascular; CT = Holman-Miller sign (anterior bowing of posterior wall of maxillary sinus); biopsy contraindicated.",
     "JNA: teenage boy + epistaxis = JNA; Holman-Miller sign on CT; no biopsy (bleeds); embolize then excise"),
    ("CSF rhinorrhea: halo sign on gauze (blood centre + CSF halo); glucose positive; beta-2 transferrin = confirmatory test.",
     "CSF leak: halo test; beta-2 transferrin = gold standard; glucose present unlike normal mucus"),
  ]),
  ("Throat & Larynx", [
    ("Tonsils (Waldeyer's ring): palatine (tonsils proper) + pharyngeal (adenoids) + lingual + tubal; Waldeyer's ring = lymphoid tissue guarding oropharynx.",
     "Waldeyer's ring: palatine + pharyngeal (adenoids) + lingual + tubal tonsils = immune gateway"),
    ("Tonsillitis: acute = MC Group A beta-hemolytic Streptococcus (S. pyogenes); follicular tonsillitis; treat with penicillin V / amoxicillin.",
     "Acute tonsillitis: GABHS = S. pyogenes; white follicles; penicillin; rheumatic fever prevention"),
    ("Peritonsillar abscess (Quinsy): complication of tonsillitis; unilateral swelling; uvula displaced to opposite side; hot potato voice; treat with drainage + antibiotics.",
     "Quinsy: peritonsillar abscess; uvula pushed away from abscess side; hot potato voice; drain it"),
    ("Adenoid hypertrophy: children; nasal obstruction + mouth breathing + hyponasal voice + conductive hearing loss (Eustachian tube obstruction); adenoid facies.",
     "Adenoids: children; mouth breathing + conductive HL + hyponasal voice = triad; adenoid facies = open mouth + dull expression"),
    ("Obstructive sleep apnea (OSA): AHI >5/hour; MC cause in children = adenotonsillar hypertrophy; adults = obesity; CPAP = treatment.",
     "OSA: AHI>5; children=adenoids; adults=obesity; CPAP = treatment; overnight polysomnography = gold standard"),
    ("Laryngitis: acute = viral (MC); hoarseness; rest voice + steam inhalation; chronic = vocal abuse, GERD, smoking.",
     "Acute laryngitis: viral; hoarse voice; rest = key treatment; chronic = GERD + smoking + vocal abuse"),
    ("Vocal cord polyp: unilateral; due to vocal abuse (singers, teachers); treat with microsurgery (microlaryngoscopy).",
     "Vocal polyp: unilateral; singers/voice abuse; microlaryngoscopy = treatment"),
    ("Reinke's edema: bilateral diffuse swelling of vocal cords; smoker + hypothyroid women; low-pitched voice; treat by smoking cessation + surgery.",
     "Reinke's edema: smoker + bilateral VC edema; low-pitched female voice; bilateral unlike polyp"),
    ("Laryngomalacia: MC cause of stridor in infants; inspiratory stridor; omega-shaped epiglottis; resolves by 18-24 months; treated conservatively.",
     "Laryngomalacia: MC infant stridor; inspiratory; omega epiglottis; resolves spontaneously by 2 years"),
    ("Acute epiglottitis: Haemophilus influenzae type b (Hib); 'cherry red epiglottis'; tripod position; thumb sign on lateral neck X-ray; do NOT examine throat; secure airway first.",
     "Epiglottitis: H. influenzae b; thumb sign on X-ray; tripod posture; do NOT depress tongue = fatal; airway = priority"),
    ("Laryngeal carcinoma: MC = glottic (best prognosis, early hoarseness); supraglottic = late presentation; infraglottic/subglottic = worst prognosis; MC type = squamous cell carcinoma.",
     "Larynx CA: glottic = MC + best prognosis (early hoarseness); supraglottic = late; all = squamous cell CA"),
    ("Cricothyrotomy (emergency): between thyroid + cricoid cartilage; emergency airway; tracheotomy site = between 2nd and 3rd tracheal rings.",
     "Cricothyrotomy: thyroid-cricoid membrane; emergency access; tracheostomy = between 2nd-3rd rings (elective)"),
    ("Foreign body in airway: child; MC site = right main bronchus (more vertical, wider, shorter); Heimlich manoeuvre for >1 year; back blows for <1 year.",
     "FB airway: right bronchus MC (more vertical); Heimlich >1yr; back blows <1yr; rigid bronchoscopy = treatment"),
    ("Parapharyngeal space infections: anterior compartment (medial to pterygoids); bulge on lateral pharyngeal wall; can spread to retropharyngeal space → danger space → mediastinitis.",
     "Parapharyngeal abscess → retropharyngeal → danger space → mediastinitis = descending necrotizing mediastinitis"),
  ]),
  ("Hearing & Audiology", [
    ("Audiogram: X-axis = frequency (250-8000 Hz); Y-axis = intensity (dB HL); air conduction (circles) + bone conduction (brackets); Air-bone gap = conductive loss.",
     "Audiogram: AC-BC gap = conductive; BC normal + AC impaired = conductive; both down = SNHL"),
    ("Hearing loss classification: normal 0-25 dB; mild 26-40 dB; moderate 41-55 dB; moderately severe 56-70 dB; severe 71-90 dB; profound >90 dB.",
     "Hearing loss dB: 0-25=normal; 26-40=mild; 41-55=mod; 56-70=mod-severe; 71-90=severe; >90=profound"),
    ("Tympanometry: Type A = normal; Type As = stiffness (otosclerosis); Type Ad = flaccid/discontinuity (ossicular); Type B = flat = effusion/perforation; Type C = negative pressure = ET dysfunction.",
     "Tympanogram: A=normal; B=flat=effusion; C=negative pressure=ET dysfunction; As=otosclerosis; Ad=ossicular disruption"),
    ("OAE (Otoacoustic emissions): from outer hair cells; present in normal hearing and mild loss; absent in SNHL >30 dB; used for newborn hearing screening.",
     "OAE: outer hair cells; absent in SNHL >30dB; newborn screening tool; easy + non-invasive"),
    ("BERA/ABR: brainstem auditory evoked responses; 5 waves (I-V); Wave I = auditory nerve; Wave V = inferior colliculus; used for threshold estimation + retrocochlear pathology.",
     "BERA waves I-V: I=auditory nerve; V=inferior colliculus; delayed wave V = acoustic neuroma; gold standard for objective threshold in infants"),
  ]),
]

OPHTHALMOLOGY = [
  ("Anatomy of the Eye", [
    ("Layers of the eye: outer fibrous (cornea + sclera) + middle vascular/uveal (iris + ciliary body + choroid) + inner neural (retina).",
     "Eye layers: Fibrous outer (cornea+sclera); Uveal middle (iris+CB+choroid); Neural inner (retina)"),
    ("Cornea: avascular; 5 layers: epithelium → Bowman's layer → stroma (90% thickness) → Descemet's membrane → endothelium; nourished by aqueous humor + tears.",
     "Cornea: avascular; 5 layers (EDSBS); endothelium = pump; stroma = 90%; Bowman's = barrier"),
    ("Lens: biconvex; crystalline; held by zonule of Zinn (ciliary zonule); accommodation = ciliary muscle contracts → zonules relax → lens rounds up = near vision.",
     "Accommodation: ciliary contracts → zonules relax → lens rounds → near vision; presbyopia = loss of accommodation with age"),
    ("Aqueous humor: produced by ciliary processes; flows posterior chamber → pupil → anterior chamber → trabecular meshwork (Canal of Schlemm) → episcleral veins.",
     "Aqueous: ciliary body → posterior chamber → pupil → anterior chamber → trabecular meshwork → Schlemm's canal → venous system"),
    ("Macula: 5.5 mm from optic disc; fovea centralis (1.5 mm) has only cones; no blood vessels; pit = foveola; highest visual acuity.",
     "Macula: temporal to disc; fovea = only cones = highest acuity; avascular = depends on choroid"),
    ("Optic disc: 1.5 mm diameter; nasal to macula; physiological cup (C/D ratio <0.4 normal); no photoreceptors = blind spot.",
     "Optic disc: nasal to macula; blind spot (no photoreceptors); C/D ratio >0.6 = glaucoma suspect"),
    ("Extraocular muscles: LR6(SO4)3 - lateral rectus = CN VI; superior oblique = CN IV; rest = CN III; superior oblique = depresses adducted eye (tested by asking to look down-in).",
     "LR6SO4AO3: Lateral Rectus CN VI; Superior Oblique CN IV; All Others CN III"),
    ("Visual acuity: Snellen chart; 6/6 normal; 6/60 = can read at 6m what normal reads at 60m; less than 6/60 = legal blindness (India: <6/60 or visual field <20 degrees).",
     "Snellen 6/6=normal; <6/60=legal blindness in India; count fingers/hand movements/light perception for worse VA"),
  ]),
  ("Refractive Errors & Cornea", [
    ("Myopia (short-sightedness): parallel rays focus in front of retina; concave (diverging) lens corrects; increased axial length; progressive in childhood.",
     "Myopia: focus in front of retina; concave lens corrects; axial length increased; night myopia = large pupil"),
    ("Hypermetropia (long-sightedness): parallel rays focus behind retina; convex (converging) lens corrects; small eye; accommodative esotropia in children.",
     "Hypermetropia: focus behind retina; convex lens; small eye; convergent squint in children (accommodative esotropia)"),
    ("Astigmatism: unequal curvature of cornea/lens in different meridians; cylindrical lens corrects; regular vs irregular (KC); 'rugby ball' cornea.",
     "Astigmatism: corneal curvature unequal; cylindrical lens; keratoconus = irregular astigmatism; Fleischer ring + Munson's sign"),
    ("Keratoconus: progressive corneal ectasia; bilateral; cone-shaped; Fleischer ring (iron deposits); Munson's sign (V-shaped bulge of lower lid on downgaze); treat with cross-linking early, transplant late.",
     "KC: progressive corneal thinning + cone shape; Fleischer ring + Munson's sign; Rigid CLs + crosslinking + PKP"),
    ("Corneal ulcer: bacterial (Pseudomonas, S. aureus, Strep) = hypopyon; fungal (Aspergillus) = feathery edges; acanthamoeba = contact lens users + ring infiltrate.",
     "Corneal ulcer: Pseudomonas = contact lens; Acanthamoeba = contact lens + ring; fungal = vegetable trauma + feathery edges"),
    ("Pterygium: wing-shaped fibrovascular tissue growing from conjunctiva onto cornea (nasal side MC); due to UV exposure; treatment = surgical excision + conjunctival autograft.",
     "Pterygium: nasal conjunctiva onto cornea; UV exposure; excise + autograft to prevent recurrence"),
    ("Trachoma: Chlamydia trachomatis (serotypes A-C); MC cause of preventable blindness worldwide; SAFE strategy (Surgery, Antibiotics, Face wash, Environmental); Herbert's pits = follicular scars at limbus.",
     "Trachoma: C. trachomatis A-C; MC preventable blindness; SAFE strategy; Herbert's pits = pathognomonic"),
  ]),
  ("Glaucoma", [
    ("Primary open-angle glaucoma (POAG): MC type; asymptomatic until late; IOP>21 mmHg; optic disc cupping (C/D >0.6); arcuate scotoma → nasal step; treat with prostaglandin analogues (latanoprost) first line.",
     "POAG: silent + slow; IOP>21; C/D>0.6; arcuate scotoma; prostaglandin analogues = first line"),
    ("Acute angle-closure glaucoma (AACG): emergency; sudden severe eye pain + headache + vomiting + halos + fixed mid-dilated pupil + rock-hard eye; precipitated by dark/mydriatics; treat with IV acetazolamide + pilocarpine + laser iridotomy.",
     "AACG: emergency; pain + vomiting + halos + mid-dilated fixed pupil; IV acetazolamide + pilocarpine; laser PI = definitive"),
    ("Normal tension glaucoma: optic disc damage with normal IOP (<21 mmHg); disc haemorrhages; treat to lower IOP by 30%; associated with vasospasm, low BP.",
     "NTG: glaucoma damage at normal IOP; disc haemorrhage common; lower IOP by 30%; Raynaud's/migraine association"),
    ("Secondary glaucoma: pigmentary (Krukenberg spindle); pseudoexfoliation (MC secondary OAG worldwide); neovascular (rubeosis from DM/CRVO); steroid-induced.",
     "Secondary glaucoma: Pseudoexfoliation = MC worldwide; Neovascular = DM/CRVO rubeosis; Steroid = 6 weeks after topical steroid"),
    ("Glaucoma drugs: Prostaglandin analogues (latanoprost) = increase uveoscleral outflow; Beta-blockers (timolol) = decrease production; CAIs (dorzolamide/acetazolamide) = decrease production; Pilocarpine = increase trabecular outflow.",
     "Glaucoma Rx: PGA=first line (increase outflow); Timolol=decrease production; Acetazolamide=systemic CAI; Pilocarpine=AACG"),
    ("Optic disc changes in glaucoma: increased C/D ratio; vertical elongation of cup; bayoneting of vessels; disc haemorrhage; nasal displacement of vessels; RNFL loss.",
     "Glaucoma disc: C/D>0.6; vertical cup; bayoneting; disc haemorrhage; baring of circumlinear vessels"),
  ]),
  ("Cataract & Lens", [
    ("Cataract: opacification of lens; MC cause worldwide = age-related (senile); in India = MC cause of blindness = cataract; nuclear (brown/brunescent), cortical (spoke-wheel), posterior subcapsular (PSC - worst vision, steroids/DM).",
     "Cataract: MC blindness India = cataract; PSC = worst for reading/bright light; nuclear = myopic shift; cortical = spoke-wheel"),
    ("Senile cataract types: immature (partially opaque, iris shadow +); mature (fully opaque, iris shadow absent); hypermature (Morgagnian - liquefied cortex, nucleus sinks).",
     "Cataract maturity: immature=iris shadow+; mature=no iris shadow; hypermature=Morgagnian (nucleus sinks)"),
    ("Surgical treatment: ECCE (extracapsular) + IOL insertion = standard; phacoemulsification = gold standard; Femtosecond laser LASIK for refractive errors.",
     "Phacoemulsification = gold standard for cataract; IOL = posterior chamber; posterior capsule opacification = most common post-op complication"),
    ("Congenital cataract: bilateral = rule out metabolic (galactosemia, Lowe's, Wilson's) + systemic (Down's, rubella); unilateral = sporadic; treat before 6-8 weeks to prevent amblyopia.",
     "Congenital cataract: TORC infections (rubella); galactosemia; treat before 6-8 weeks or amblyopia develops"),
    ("Subluxated lens: Marfan's (upward dislocation, superotemporal) vs Homocystinuria (downward, inferonasal); also in syphilis, Weill-Marchesani.",
     "Lens dislocation: Marfan=upward (superotemporal); Homocystinuria=downward (inferonasal); 'Marfan=UP; Homocystinuria=DOWN'"),
  ]),
  ("Retina", [
    ("Retinal detachment: rhegmatogenous (hole/tear, MC, myopes/trauma) vs tractional (DM/sickle cell) vs exudative (HTN, malignancy); Shafer's sign = tobacco dust in vitreous; laser + surgery.",
     "RD: rhegmatogenous=MC; Shafer's sign=tobacco dust; myopes at risk; treat: laser/cryo + scleral buckle/vitrectomy"),
    ("Diabetic retinopathy: NPDR (microaneurysms, dot-blot haemorrhages, CWS, IRMA) → PDR (neovascularisation = NVD/NVE); macular oedema = MC cause of visual loss in DM.",
     "DR: NPDR→PDR; NVD/NVE=new vessels=PDR; Macular oedema=MC visual loss; VEGF drives neovascularisation"),
    ("Hypertensive retinopathy (Keith-Wagener-Barker): Grade 1 = arteriolar narrowing; Grade 2 = AV nipping; Grade 3 = flame haemorrhages + CWS; Grade 4 = papilloedema.",
     "HTN retinopathy: Grade 1-4; Grade 3=haemorrhages+CWS; Grade 4=papilloedema = malignant HTN"),
    ("CRVO (Central Retinal Vein Occlusion): 'Stormy sunset' fundus; disc oedema; all 4 quadrants flame haemorrhages; associated with HTN + glaucoma; treat with anti-VEGF.",
     "CRVO: stormy sunset fundus; all 4 quadrant haemorrhages; HTN+glaucoma association; anti-VEGF for macular oedema"),
    ("CRAO (Central Retinal Artery Occlusion): sudden painless visual loss; cherry red spot at macula (choroid shows through thin infarcted retina); treat within 90 min (ocular stroke).",
     "CRAO: sudden painless vision loss; cherry red spot (macula surrounded by pale retina); emergency = 90 min window"),
    ("Age-related macular degeneration (AMD): MC cause of irreversible vision loss in developed countries (>50 yrs); drusen = hallmark; dry (atrophic, 90%) vs wet (exudative/neovascular, 10%, severe).",
     "AMD: drusen=dry; wet=neovascular=anti-VEGF; MC irreversible blindness developed world; Amsler grid for monitoring"),
    ("Retinitis pigmentosa: genetic; rod photoreceptor dystrophy; night blindness (nyctalopia) first; bone-spicule pigmentation; tunnel vision; ERG reduced.",
     "RP: rods affected first; night blindness → tunnel vision → blindness; bone-spicule pigment; ERG = most sensitive test"),
    ("Retinoblastoma: MC intraocular malignancy in children; leukocoria (white pupil) + strabismus; bilateral = germline (RB1 mutation, Ch13q14); trilateral = pinealoma; treat with chemoreduction + laser/cryo/enucleation.",
     "Retinoblastoma: MC child eye tumour; leukocoria + cat's eye reflex; RB1 gene Ch13q14; bilateral=hereditary; trilateral=pinealoma"),
  ]),
  ("Strabismus & Paediatric Ophthalmology", [
    ("Amblyopia: reduced visual acuity in structurally normal eye; causes = strabismus, anisometropia, deprivation (cataract); treat with occlusion therapy of fellow eye; critical period = up to 7-8 years.",
     "Amblyopia: lazy eye; squint + anisometropia + deprivation; occlusion of good eye = treatment; critical period 7-8 yrs"),
    ("Esotropia (convergent squint): eyes turn inward; accommodative esotropia in hypermetropes; surgical if non-accommodative.",
     "Esotropia=eyes in; accommodative=hypermetropia; treat hypermetropia first; surgery if non-accommodative"),
    ("Exotropia (divergent squint): eyes turn outward; intermittent exotropia MC; worsens in bright light (eye closes to suppress diplopia).",
     "Exotropia=eyes out; intermittent=MC; worsens in bright light; surgery when deviation >20 PD"),
    ("CN VI palsy: lateral rectus palsy; esotropia; diplopia on lateral gaze; MC cause = vascular (DM, HTN); also raised ICP (false localizing sign).",
     "CN VI palsy: LR palsy; can't abduct; esotropia; false localizing sign in raised ICP"),
    ("CN III palsy: 'down-and-out' eye; ptosis + mydriasis; surgical = posterior communicating artery aneurysm (pupil-involving); medical = DM (pupil-sparing).",
     "CN III palsy: down and out + ptosis + dilated pupil; PComm aneurysm = surgical emergency (pupil involved); DM = pupil spared"),
  ]),
  ("Eyelids, Orbit & Lacrimal", [
    ("Chalazion vs Hordeolum: chalazion = lipogranuloma of meibomian gland, painless, treat with hot compress → incision + curettage; hordeolum (stye) = S. aureus infection of Zeis/Moll gland, painful, treat with hot compress + antibiotics.",
     "Chalazion=painless meibomian cyst; Stye (hordeolum)=painful S. aureus infection; both: warm compress first"),
    ("Entropion: inward turning of eyelid; lower lid; causes = age-related (involutional), cicatricial (trachoma, SJS); corneal abrasion/ulcer complication; treat with surgery.",
     "Entropion=lid turns IN; lashes touch cornea; involutional (elderly) or trachoma; corrective surgery"),
    ("Ectropion: outward turning of eyelid; lower lid; causes = involutional, cicatricial, paralytic (CN VII palsy); epiphora (tearing) + exposure keratitis; treat with surgery.",
     "Ectropion=lid turns OUT; epiphora + exposure; CN VII palsy = paralytic ectropion; corrective surgery"),
    ("Ptosis: drooping of upper eyelid (normal = 1-2 mm above pupil); Marcus Gunn jaw-winking = congenital; Horner's = partial ptosis + miosis + anhidrosis; CN III palsy = complete ptosis + mydriasis.",
     "Ptosis: complete+mydriasis=CN3; partial+miosis=Horner's; Marcus Gunn=synkinesis with pterygoid"),
    ("Proptosis/exophthalmos: bilateral = Graves' disease (thyroid eye disease = MC cause); unilateral = orbital cellulitis, tumour; Hertel exophthalmometer measures proptosis.",
     "Proptosis: bilateral=Graves (thyroid); unilateral=orbital cellulitis/tumour; Hertel exophthalmometer; >18mm = abnormal"),
    ("Dacryocystitis: infection of lacrimal sac; MC organism = Streptococcus (adults), H. influenzae (infants); medial canthal swelling; regurgitation on pressure; treat with DCR (dacryocystorhinostomy).",
     "Dacryocystitis: lacrimal sac infection; regurgitation on pressure = key sign; DCR = definitive treatment"),
  ]),
]

FORENSIC = [
  ("Legal & Medical Jurisprudence", [
    ("IPC Section 302: murder (punishment = death or life imprisonment); IPC 304: culpable homicide not amounting to murder; IPC 304A: death by rash/negligent act.",
     "IPC 302=murder; 304=culpable homicide; 304A=negligent death (doctor's liability); 307=attempt to murder"),
    ("IPC Section 375 & 376: rape = sexual intercourse without consent or with minor <18 years (POSCO); age of consent = 18 years in India; medical examination (FSST).",
     "Rape: IPC 376; consent age = 18 yrs; POCSO for minors; medical examination = within 24-72 hrs; hymen findings NOT diagnostic"),
    ("Dying declaration: statement made by dying person regarding cause of death; admissible even if person dies; must be made voluntarily + in sound mind; magistrate preferred but doctor can record.",
     "Dying declaration: admissible; made in expectation of death; magistrate preferred; doctor can certify mental state; thumb impression accepted"),
    ("Inquest: inquiry into cause of death; police inquest (Sec 174 CrPC) = most common; magistrate inquest (Sec 176 CrPC) = custodial death, dowry death; coroner inquest = some cities.",
     "Inquest: Sec 174 CrPC = police; Sec 176 = magistrate (custodial/dowry death); coroner = Bombay/Madras; doctor called as witness"),
    ("Exhumation: disinterment of buried body; ordered by magistrate; in presence of magistrate + police; doctor submits separate report; no statute of limitations.",
     "Exhumation: magistrate order + presence; doctor submits separate report; any time after burial; body may be preserved with lime"),
    ("Medical negligence (Bolam test): doctor not negligent if acted in accordance with practice accepted by responsible body of medical opinion; 4 D's = Duty, Dereliction, Damage, Direct causation.",
     "Negligence: Bolam test; 4 D's = Duty + Dereliction + Damage + Direct link; criminal negligence = higher threshold (gross/reckless)"),
    ("Consent in medicine: valid consent = informed + voluntary + competent; age of majority = 18 years; minors = guardian consent; emergency = no consent needed; triage = implied consent.",
     "Consent: informed + voluntary + competent; age 18 = adult; emergency = implied consent; written consent for surgery/procedures"),
  ]),
  ("Thanatology - Changes After Death", [
    ("Pallor mortis: first sign of death; occurs within minutes; due to cessation of circulation; skin becomes pale/ashy.",
     "Pallor mortis: first postmortem change; within minutes; pale skin due to blood pooling"),
    ("Algor mortis: cooling of body after death; body cools at ~1°C per hour (Henssge's nomogram); delayed by obesity/warm environment; used to estimate time of death (TOD).",
     "Algor mortis: 1°C/hour cooling; affected by body weight, clothing, environment; Henssge nomogram for TOD"),
    ("Rigor mortis: muscle stiffening due to ATP depletion + actin-myosin cross-linking; begins 2-6 hrs; complete 12 hrs; passes off 24-48 hrs; follows Nysten's rule (jaw→neck→trunk→extremities).",
     "Rigor mortis: ATP gone → actin-myosin locked; Nysten's rule = jaw first; complete 12h; gone 24-48h; hot = faster"),
    ("Livor mortis (hypostasis): purple-red discolouration at dependent parts due to blood pooling; appears 30 min - 2 hours; becomes fixed (not blanchable) after 6-12 hours.",
     "Livor mortis: gravity + RBC pool; fixed after 6-12h (no blanching); shifted if body moved before fixing"),
    ("Putrefaction: bacterial decomposition; green discolouration starts at right iliac fossa (cecum = most bacteria); marbling of skin; bloating; skin slippage.",
     "Putrefaction: starts RIF (cecum); marbling; green→black; skin slippage; warm+moist = faster decomposition"),
    ("Adipocere: grave wax; saponification of body fat into soap-like material; in moist/water environments; preserves body outline; takes weeks-months.",
     "Adipocere: soap formation from fat; moist environment; preserves body; can indicate time of submersion"),
    ("Mummification: desiccation/drying of body; dry hot environments; skin becomes dry and leathery; may preserve body indefinitely; Egypt mummies.",
     "Mummification: dry + hot environment; body desiccates; preserves tissue; opposite of adipocere (dry vs wet)"),
    ("Cadaveric spasm (instantaneous rigor): immediate rigor at time of death; extreme emotion/violent death; object clutched in hand = sign of suicidal drowning (grass in hand).",
     "Cadaveric spasm: immediate; violent/emotional death; grass/weapon in fist = suicidal drowning; cannot be simulated postmortem"),
  ]),
  ("Wounds & Injuries", [
    ("Abrasion: superficial injury to epidermis; scratch/graze/pressure; direction of force can be determined; imprint abrasion = object pattern.",
     "Abrasion: superficial skin scraping; direction of force = tail end deeper; imprint = object pattern; scratches = fingernails"),
    ("Contusion (bruise): bleeding into soft tissues; size not proportional to force; moves to dependent areas; colour changes: red→blue→green→yellow→brown (haemosiderin); periorbital = raccoon eyes (basal skull fracture).",
     "Bruise colours: red(fresh)→blue/black→green→yellow→brown; raccoon eyes = base of skull # or blunt eye trauma"),
    ("Laceration: torn wound from blunt force; irregular margins; hair bridges; tags of tissue; crushing + tearing; NOT from sharp objects (incised wounds have clean margins).",
     "Laceration=blunt; irregular margins + hair bridges + tissue tags; sharp=incised=clean margins; key distinction"),
    ("Incised wound: sharp-edged weapon (knife, glass); clean-cut margins; length > depth; heals well; gaping in direction perpendicular to Langer's lines.",
     "Incised wound: length>depth; clean margins; no bridges; suicidal = wrists/neck; hesitation cuts parallel"),
    ("Stab wound: depth > surface dimensions; can be fatal without large surface wound; direction of stabbing determined by examining track; double-edged knife = spindle-shaped wound.",
     "Stab wound: depth>width; single-edged=one sharp angle, one blunt; double-edged=both sharp; direction determined from track"),
    ("Defence wounds: on palmar surface of hands/forearms; indicate victim tried to ward off blows; seen in homicide (victim was conscious and mobile).",
     "Defence wounds: palms/forearms; only in conscious victims; help distinguish homicide from suicide"),
    ("Firearm wounds: entry wound = smaller, inverted, abraded collar; exit wound = larger, everted, no abrasion collar; blackening + tattooing at close range; sing of wound from contact firing.",
     "GSW: entry=small+inverted+abraded collar; exit=large+everted; contact shot=stellate wound+muzzle contusion"),
  ]),
  ("Asphyxia", [
    ("Asphyxia: lack of O2 + accumulation of CO2; types = mechanical (hanging, strangulation, suffocation, drowning) + non-mechanical (CO poisoning, overlying).",
     "Asphyxia: O2 lack + CO2 excess; mechanical = external force on airway; stages = dyspnea→convulsions→coma→death"),
    ("General signs of asphyxia (postmortem): cyanosis; congestion of face; petechial haemorrhages (Tardieu spots) on sclera/conjunctiva/pleural/pericardial surfaces; visceral congestion.",
     "Asphyxia PM signs: cyanosis + Tardieu spots (subconjunctival/pleural petechiae) + congestion + right heart dilated with dark blood"),
    ("Hanging: ligature around neck compresses carotid/jugular + vertebral arteries; constricting force = weight of body; ligature mark = oblique + incomplete below angle of jaw.",
     "Hanging: ligature mark oblique + incomplete (gap at ligature knot); above thyroid cartilage; complete hanging = most suicides"),
    ("Strangulation by ligature: external force applied; ligature mark = horizontal + complete (at level of larynx); homicide common; ligature crosses each other.",
     "Ligature strangulation: horizontal + complete ligature mark; homicide (someone else applies force); vs hanging=oblique+incomplete"),
    ("Manual strangulation (throttling): done by hands; fingernail marks; finger-tip bruises on neck; only homicide (cannot do to oneself); fracture of hyoid bone common.",
     "Throttling=manual strangulation=only homicide; fingernail marks + fingertip bruises; hyoid # common; can't strangle yourself"),
    ("Drowning: wet drowning (water enters lungs) vs dry drowning (laryngospasm, no water in lungs); signs = fine frothy foam from mouth/nose; diatoms in bone marrow = diagnostic of drowning.",
     "Drowning: foam at mouth/nose; washerwoman hands; Paltauf's haemorrhages in lungs; diatoms in bone marrow = best PM diagnosis"),
    ("CO poisoning: cherry-red discolouration of skin/mucosa/organs; COHb >50% = fatal; treated with 100% O2; hyperbaric O2 for severe; sources = faulty heaters, car exhaust.",
     "CO poisoning: cherry red = carboxyhaemoglobin; 100% O2 = treatment; COHb >50% fatal; no smell + no irritant = silent killer"),
  ]),
  ("Forensic Toxicology", [
    ("Strychnine poisoning: Nux vomica seeds; opisthotonus (spastic hyperextension); 'risus sardonicus' (fixed grin); convulsions triggered by stimuli; antidote = diazepam/muscle relaxants.",
     "Strychnine: Nux vomica; opisthotonus + risus sardonicus; stimulus-induced convulsions; diazepam = antidote"),
    ("Arsenic poisoning: chronic = Mees' lines (transverse white bands on nails) + Aldrich-Mees lines; rain-drop pigmentation; Blackfoot disease (peripheral vascular disease); Marsh test = detection.",
     "Arsenic: Mees' lines + rain-drop pigmentation + peripheral neuropathy; Marsh test = detection; chronic exposure from groundwater"),
    ("Organophosphate (OP) poisoning: inhibit acetylcholinesterase; SLUDGE (Salivation, Lacrimation, Urination, Defaecation, GI cramps, Emesis) + miosis; antidote = atropine + pralidoxime (2-PAM).",
     "OP poisoning: AChE inhibitor; SLUDGE + miosis; atropine = muscarinic antidote; 2-PAM = reactivates AChE (before aging)"),
    ("Alcohol (ethanol): MC poisoning agent; Widmark's formula for BAC calculation; drunk driving >80 mg/dL (India); fatal level = 400-500 mg/dL; Antabuse (disulfiram) = treatment of alcoholism.",
     "Alcohol: Widmark formula; >80mg/dL India = drunk driving; 400-500 fatal; metabolism 7 kcal/g; disulfiram=aversion therapy"),
    ("Morphine/Opioid poisoning: pin-point pupils (miosis) + unconsciousness + respiratory depression (triad); Cheyne-Stokes respiration; antidote = naloxone; withdrawal = yawning + lacrimation + piloerection.",
     "Opioid OD: miosis + coma + respiratory depression; naloxone reversal; withdrawal = YAWN (Yawning, Anorexia, Watering eyes, Nausea/piloerection)"),
    ("Cyanide poisoning: smell of bitter almonds; histotoxic hypoxia (cells can't use O2); bright red venous blood; antidote = amyl nitrite → sodium nitrite → sodium thiosulfate (or hydroxycobalamin).",
     "Cyanide: bitter almonds smell; histotoxic hypoxia; venous blood = bright red (oxygenated); antidote = nitrites then thiosulfate"),
    ("Dhatura (Belladonna alkaloids - Atropine): anticholinergic toxidrome: 'Dry as a bone, Blind as a bat, Mad as a hatter, Red as a beet, Hot as a hare'; antidote = physostigmine.",
     "Anticholinergic: Dhatura/Belladonna; 5 clues: Dry bones + Blind bat + Mad hatter + Red beet + Hot hare; physostigmine = antidote"),
    ("Oleander poisoning: digoxin-like glycosides; yellow vision + cardiac arrhythmias; treat like digoxin toxicity (digoxin immune Fab); 'rosy yellow vision + heart block'.",
     "Oleander: cardiac glycoside plant; digoxin-like toxicity; bradycardia + heart block + yellow vision; digoxin immune Fab = antidote"),
  ]),
  ("Sexual Offences & Identification", [
    ("Examination in rape: within 72 hours ideally; DNA evidence degrades rapidly; 'Two-doctor examination' (male doctor + female doctor/nurse); collect swabs from vagina, anus, oral cavity.",
     "Rape examination: within 72h; two-doctor rule; collect swabs; note injuries; no finding does not exclude rape; hymen not definitive"),
    ("Virginity: intact hymen does NOT prove virginity; ruptured hymen does NOT prove sexual intercourse; medical opinion on sexual history is NOT part of rape medical report.",
     "Hymen: not diagnostic of virginity or rape; annular/fimbriated/cribriform = normal variants; old hymenal lacerations at 3,6,9 o'clock positions"),
    ("Age estimation from teeth: eruption times; Gustafson's method (6 features: attrition, secondary dentine, cementum apposition, root resorption, root transparency, periodontosis); Demirjian method (8 teeth scoring).",
     "Age from teeth: Gustafson 6 features; Demirjian 8-teeth scoring; wisdom tooth = 17-25yrs; root closure = best indicator in adults"),
    ("Age estimation from X-ray (bones): epiphyseal fusion; medial clavicle fusion = last to fuse (25-30 yrs); iliac crest (14-18 yrs); useful in legal age determination (<18, >21).",
     "Bone age: medial clavicle last to fuse (25-30); iliac crest 14-18; wrist X-ray = child age; epiphyseal fusion = timeline"),
    ("Putrefaction & identification: fingerprints (best method if preserved); dental records (most reliable for mass disasters); DNA (gold standard); facial reconstruction.",
     "ID methods: fingerprints = best (gloves of hands in putrefaction); dental = mass disaster; DNA = gold standard; skull-photo superimposition = Galton method"),
    ("Medico-legal importance of hair: bulb shape (scalp hair = club-shaped); medullary index (human <1/3; animal >1/2); racial characteristics; DNA from hair root.",
     "Hair: medullary index <1/3 human; >1/2 animal; club-shaped bulb = telogen; ABO antigens in hair (secretors)"),
  ]),
  ("Forensic Pathology - Special Topics", [
    ("Sudden natural death: MC cause = IHD (coronary artery disease); most occur at rest or mild exertion; acute MI may have NO gross findings in first 4-6 hours (rely on CK-MB, Troponin).",
     "Sudden death: MC = IHD; gross findings absent in first 4-6h of MI; CK-MB rises 4-6h; Troponin = most sensitive/specific"),
    ("Child abuse (Battered baby syndrome - Caffey's syndrome): multiple fractures at different stages of healing; subdural haematoma (shaken baby); retinal haemorrhages; bruises in unusual sites; spiral fractures.",
     "Battered child: multiple fractures in various stages; shaken baby = subdural + retinal haemorrhages; unusual bruise sites; spiral # extremities"),
    ("Road traffic accident (RTA) injuries: primary (direct impact) vs secondary (fall on road) vs tertiary (hitting stationary object); pedestrian = Waddell's triad (bumper # tibia/fibula + contralateral hip + head injury).",
     "RTA: Waddell's triad = pedestrian + bumper # leg + opposite hip fracture + head injury; primary=direct; secondary=fall; tertiary=thrown"),
    ("Burns: Rule of Nines (Wallace): head+neck=9%, each arm=9%, anterior trunk=18%, posterior trunk=18%, each leg=18%, perineum=1%; >15% adults/10% children = major burn.",
     "Rule of Nines: head=9; arm=9; each half trunk=18; leg=18; perineum=1%; Lund-Browder = more accurate for children"),
    ("Lightning injury: characteristic features = arborescent (Lichtenberg figure) burns = ferning pattern on skin; clothing torn; metallic objects magnetised; thunder struck = Keraunoparalysis.",
     "Lightning: Lichtenberg figures (ferning/arborescent burns) = pathognomonic; Keraunoparalysis = temporary paralysis; magnetised metal objects"),
  ]),
]

# ════════════════════════════════════════════════════════════════════
# Section colour assignments
# ════════════════════════════════════════════════════════════════════

SECTIONS = [
    ("ENT - Otorhinolaryngology",      ENT,         C_NAVY,       C_LIGHT_BLUE),
    ("Ophthalmology",                  OPHTHALMOLOGY, C_DEEP_TEAL,  C_LIGHT_TEAL),
    ("Forensic Medicine & Toxicology", FORENSIC,    C_CRIMSON,    C_LIGHT_ROSE),
]

# ════════════════════════════════════════════════════════════════════
# PAGE CALLBACKS
# ════════════════════════════════════════════════════════════════════

def on_page(canvas, doc):
    canvas.saveState()
    w, h = A4
    canvas.setFont("Helvetica", 7.5)
    canvas.setFillColor(C_DARK_GREY)
    canvas.drawString(1.0*inch, 0.5*inch,
        f"NEET PG / USMLE / INSAT  |  ENT, Ophthalmology & Forensic Medicine One-Liners")
    canvas.drawRightString(w - 1.0*inch, 0.5*inch, f"Page {doc.page}")
    canvas.setStrokeColor(colors.HexColor("#CCCCCC"))
    canvas.setLineWidth(0.5)
    canvas.line(1.0*inch, 0.62*inch, w - 1.0*inch, 0.62*inch)
    canvas.restoreState()

# ════════════════════════════════════════════════════════════════════
# BUILD
# ════════════════════════════════════════════════════════════════════

def build_pdf():
    doc = SimpleDocTemplate(
        OUTPUT_PATH,
        pagesize=A4,
        leftMargin=1.0*inch,
        rightMargin=1.0*inch,
        topMargin=0.9*inch,
        bottomMargin=0.85*inch,
    )
    S = make_styles()
    story = []

    # ── Cover page ─────────────────────────────────────────────────
    story.append(Spacer(1, 1.5*inch))

    cover_box_data = [[
        Paragraph("NEET PG / USMLE / INSAT", S["cover_sub"]),
    ]]
    cover_box = Table(cover_box_data, colWidths=[5.5*inch])
    cover_box.setStyle(TableStyle([
        ("BACKGROUND",    (0,0), (-1,-1), C_LIGHT_BLUE),
        ("ALIGN",         (0,0), (-1,-1), "CENTER"),
        ("TOPPADDING",    (0,0), (-1,-1), 10),
        ("BOTTOMPADDING", (0,0), (-1,-1), 10),
        ("ROUNDEDCORNERS",[8,8,8,8]),
    ]))
    story.append(cover_box)
    story.append(Spacer(1, 0.3*inch))

    story.append(Paragraph(
        "High-Yield One-Liners", S["cover_title"]))
    story.append(Spacer(1, 0.1*inch))
    story.append(Paragraph(
        "ENT  |  Ophthalmology  |  Forensic Medicine & Toxicology",
        ParagraphStyle("ct2", fontName="Helvetica-Bold", fontSize=14,
                       textColor=C_DEEP_TEAL, alignment=TA_CENTER, spaceAfter=6)))
    story.append(Spacer(1, 0.15*inch))
    story.append(Paragraph(
        "MBBS 2nd Year Para-Clinical Subjects",
        ParagraphStyle("ct3", fontName="Helvetica", fontSize=11,
                       textColor=C_DARK_GREY, alignment=TA_CENTER, spaceAfter=4)))
    story.append(Spacer(1, 0.15*inch))
    story.append(HRFlowable(width="80%", thickness=1.5, color=C_TEAL, spaceAfter=0.2*inch))
    story.append(Paragraph(
        "Previous Year Topic-Wise  |  Memory Hooks Included",
        ParagraphStyle("ct4", fontName="Helvetica-Oblique", fontSize=10,
                       textColor=C_DARK_GREY, alignment=TA_CENTER, spaceAfter=4)))
    story.append(Spacer(1, 0.2*inch))

    # subject badges
    badges_data = [
        [Paragraph("ENT\nEar, Nose, Throat", ParagraphStyle("badge", fontName="Helvetica-Bold", fontSize=10, textColor=C_WHITE, alignment=TA_CENTER, leading=13)),
         Paragraph("OPHTHALMOLOGY\nEye Sciences", ParagraphStyle("badge2", fontName="Helvetica-Bold", fontSize=10, textColor=C_WHITE, alignment=TA_CENTER, leading=13)),
         Paragraph("FORENSIC MED\n& Toxicology", ParagraphStyle("badge3", fontName="Helvetica-Bold", fontSize=10, textColor=C_WHITE, alignment=TA_CENTER, leading=13))],
    ]
    badges_table = Table(badges_data, colWidths=[1.9*inch, 1.9*inch, 1.9*inch])
    badges_table.setStyle(TableStyle([
        ("BACKGROUND",    (0,0), (0,0), C_NAVY),
        ("BACKGROUND",    (1,0), (1,0), C_DEEP_TEAL),
        ("BACKGROUND",    (2,0), (2,0), C_CRIMSON),
        ("ALIGN",         (0,0), (-1,-1), "CENTER"),
        ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
        ("TOPPADDING",    (0,0), (-1,-1), 10),
        ("BOTTOMPADDING", (0,0), (-1,-1), 10),
        ("LEFTPADDING",   (0,0), (-1,-1), 6),
        ("RIGHTPADDING",  (0,0), (-1,-1), 6),
        ("ROUNDEDCORNERS",[6,6,6,6]),
        ("INNERGRID",     (0,0), (-1,-1), 2, C_WHITE),
    ]))
    story.append(badges_table)
    story.append(Spacer(1, 0.3*inch))
    story.append(Paragraph(
        f"Edition: 2026  |  Generated: {datetime.date.today().strftime('%B %d, %Y')}",
        S["cover_note"]))

    # ── Table of Contents ──────────────────────────────────────────
    story.append(PageBreak())
    story.append(Paragraph("Table of Contents", S["toc_header"]))
    story.append(HRFlowable(width="100%", thickness=1, color=C_TEAL, spaceAfter=0.15*inch))

    toc_items = [
        ("ENT - Otorhinolaryngology", [
            "Ear Anatomy & Physiology",
            "Ear Diseases (CSOM, Cholesteatoma, Meniere's, BPPV, Acoustic Neuroma)",
            "Nose & Paranasal Sinuses",
            "Throat & Larynx",
            "Hearing & Audiology",
        ]),
        ("Ophthalmology", [
            "Anatomy of the Eye",
            "Refractive Errors & Cornea",
            "Glaucoma",
            "Cataract & Lens",
            "Retina (DR, AMD, RD, Retinoblastoma)",
            "Strabismus & Paediatric Ophthalmology",
            "Eyelids, Orbit & Lacrimal",
        ]),
        ("Forensic Medicine & Toxicology", [
            "Legal & Medical Jurisprudence",
            "Thanatology - Changes After Death",
            "Wounds & Injuries",
            "Asphyxia",
            "Forensic Toxicology",
            "Sexual Offences & Identification",
            "Forensic Pathology - Special Topics",
        ]),
    ]

    for sec_title, subsecs in toc_items:
        story.append(Spacer(1, 0.08*inch))
        story.append(Paragraph(f"<b>{sec_title}</b>", S["toc_entry"]))
        for sub in subsecs:
            story.append(Paragraph(f"&nbsp;&nbsp;&nbsp;&nbsp;• {sub}",
                ParagraphStyle("toc_sub", fontName="Helvetica", fontSize=10,
                               textColor=C_DARK_GREY, leftIndent=30, spaceAfter=2)))

    # ── How to use ─────────────────────────────────────────────────
    story.append(Spacer(1, 0.25*inch))
    usage_data = [[
        Paragraph(
            "<b>How to Use:</b>  Each entry has two parts — "
            "<b>bullet (left)</b> = the one-liner fact for NEET PG/USMLE/INSAT; "
            "<b>star (right)</b> = memory hook/mnemonic for rapid recall. "
            "Cover the right column and test yourself!",
            ParagraphStyle("usage", fontName="Helvetica", fontSize=9.5,
                           textColor=C_DARK_GREY, leading=13, leftIndent=4))
    ]]
    usage_table = Table(usage_data, colWidths=[6.5*inch])
    usage_table.setStyle(TableStyle([
        ("BACKGROUND",    (0,0), (-1,-1), C_LIGHT_AMBER),
        ("TOPPADDING",    (0,0), (-1,-1), 8),
        ("BOTTOMPADDING", (0,0), (-1,-1), 8),
        ("LEFTPADDING",   (0,0), (-1,-1), 10),
        ("RIGHTPADDING",  (0,0), (-1,-1), 10),
        ("ROUNDEDCORNERS",[6,6,6,6]),
    ]))
    story.append(usage_table)

    # ── Subject sections ───────────────────────────────────────────
    for title, data, bg, light_bg in SECTIONS:
        add_section(story, title, bg, light_bg, data, S)

    # ── Build ──────────────────────────────────────────────────────
    doc.build(story, onFirstPage=on_page, onLaterPages=on_page)
    print(f"PDF created: {OUTPUT_PATH}")

if __name__ == "__main__":
    build_pdf()
Running Command

cd /home/daytona/workspace/neet-pg-2026 && python generate_paraclinical_pdf.py

Running Command

ls -lh /home/daytona/workspace/neet-pg-2026/

Your PDF is ready! Here's the download link:

NEET PG 2026 ENT Ophth Forensic OneLiners

PDF Document · PDF


What's inside (same format as your clinical + preclinical PDFs):
The PDF follows the exact same two-column one-liner pattern - bullet fact on the left, memory hook/mnemonic on the right - organized by subject:

ENT - Otorhinolaryngology

  • Ear anatomy (TM, ossicles, cochlea, vestibular, tuning fork tests)
  • Ear diseases - AOM, CSOM, cholesteatoma, otosclerosis, Meniere's, BPPV, acoustic neuroma, presbycusis, malignant OE
  • Nose & sinuses - epistaxis (Kiesselbach's), sinusitis, allergic rhinitis, nasal polyps, JNA (angiofibroma), CSF rhinorrhea
  • Throat & larynx - tonsillitis, quinsy, adenoids, OSA, epiglottitis, laryngeal tumours, foreign body airway
  • Audiology - audiogram interpretation, tympanometry, OAE, BERA/ABR

Ophthalmology

  • Anatomy - cornea, lens, aqueous flow, macula, optic disc, extraocular muscles (LR6SO4)
  • Refractive errors - myopia, hypermetropia, astigmatism, keratoconus, corneal ulcer, pterygium, trachoma
  • Glaucoma - POAG, AACG, NTG, secondary glaucoma, all drugs
  • Cataract - senile types, phacoemulsification, congenital, subluxated lens (Marfan vs homocystinuria)
  • Retina - RD, diabetic retinopathy, HTN retinopathy, CRVO, CRAO, AMD, RP, retinoblastoma
  • Strabismus - amblyopia, esotropia, exotropia, CN III/VI palsies
  • Eyelids/orbit - chalazion vs stye, entropion, ectropion, ptosis, proptosis, dacryocystitis

Forensic Medicine & Toxicology

  • Legal & jurisprudence - IPC sections (302, 304A, 375/376), dying declaration, inquest, exhumation, Bolam test, consent
  • Thanatology - pallor/algor/rigor/livor mortis, putrefaction, adipocere, mummification, cadaveric spasm
  • Wounds - abrasions, contusions, lacerations, incised wounds, stab wounds, defence wounds, GSW
  • Asphyxia - hanging, strangulation, throttling, drowning, CO poisoning
  • Toxicology - strychnine, arsenic, OP poisoning, alcohol, morphine, cyanide, Dhatura, oleander
  • Sexual offences - rape examination, age estimation (teeth + bones), identification methods
  • Special topics - sudden death, battered baby, RTA/Waddell's triad, Rule of Nines, lightning injuries

I told you to make a PDF of anatomy, physio, biochem, pathology, pharmacology, microbiology, forensic, ENT, and optha, like previously you have made the PDF of clinical subjects associated with INSET examination, NEET previous year, USMLE, all the basis of it in a crux one-liner with a memory hack and to be revised one day before the examination for my NEET PG 2026 examination, the predicted previous year that might repeat or come.

Reading File
Running Command

wc -l /home/daytona/workspace/neet-pg-2026/generate_preclinical_pdf.py /home/daytona/workspace/neet-pg-2026/generate_paraclinical_pdf.py

Reading File
Reading File

Plz fast

Yes

Running Command

ls /home/daytona/workspace/neet-pg-2026/ && wc -l /home/daytona/workspace/neet-pg-2026/generate_preclinical_pdf.py /home/daytona/workspace/neet-pg-2026/generate_paraclinical_pdf.py

Running Command

cd /home/daytona/workspace/neet-pg-2026 && python3 - <<'PYEOF' # Quick extract - print lines 100-648 of preclinical (data section only) to check section names import ast, re with open("generate_preclinical_pdf.py") as f: content = f.read() # find all top-level list variable names vars_found = re.findall(r'^([A-Z_]+)\s*=\s*\[', content, re.MULTILINE) print("Preclinical vars:", vars_found) with open("generate_paraclinical_pdf.py") as f: content2 = f.read() vars_found2 = re.findall(r'^([A-Z_]+)\s*=\s*\[', content2, re.MULTILINE) print("Paraclinical vars:", vars_found2) PYEOF

Running Command

cd /home/daytona/workspace/neet-pg-2026 && grep -n "^PHARMA_MICRO\|^RAPID_PRE\|^PATHOLOGY\|^PHARMACOLOGY\|^MICROBIOLOGY\|^SECTIONS" generate_preclinical_pdf.py | head -30

Reading File
Reading File
This is a shared conversation. Sign in to Orris to start your own chat.