attachment
attachment

Homeopathic medicine pdf for university exam surgery paper

analyse_media
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Searching the Web

homeopathic medicine ophthalmology surgery paper university exam remedies conjunctivitis glaucoma cataract trachoma stye

Reading File
Running Command

mkdir -p /tmp/workspace/homeopathy-ophthalmology && ls /tmp/workspace/

Writing File

~/homeopathy-ophthalmology/generate_pdf.py

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

output_path = "/tmp/workspace/homeopathy-ophthalmology/Homeopathic_Ophthalmology_Surgery_Paper.pdf"

doc = SimpleDocTemplate(
    output_path,
    pagesize=A4,
    rightMargin=2*cm, leftMargin=2*cm,
    topMargin=2.2*cm, bottomMargin=2.2*cm,
    title="Homeopathic Medicine - Ophthalmology (Surgery Paper)",
    author="University Exam Notes"
)

styles = getSampleStyleSheet()

# Custom styles
title_style = ParagraphStyle(
    'CustomTitle',
    parent=styles['Title'],
    fontSize=18,
    textColor=colors.HexColor('#1a3a5c'),
    spaceAfter=6,
    spaceBefore=4,
    alignment=TA_CENTER,
    fontName='Helvetica-Bold'
)

subtitle_style = ParagraphStyle(
    'Subtitle',
    parent=styles['Normal'],
    fontSize=11,
    textColor=colors.HexColor('#2e6da4'),
    spaceAfter=4,
    alignment=TA_CENTER,
    fontName='Helvetica'
)

section_heading = ParagraphStyle(
    'SectionHeading',
    parent=styles['Heading1'],
    fontSize=13,
    textColor=colors.white,
    spaceBefore=14,
    spaceAfter=4,
    fontName='Helvetica-Bold',
    backColor=colors.HexColor('#1a3a5c'),
    leftIndent=-10,
    rightIndent=-10,
    borderPad=5
)

sub_heading = ParagraphStyle(
    'SubHeading',
    parent=styles['Heading2'],
    fontSize=11,
    textColor=colors.HexColor('#1a3a5c'),
    spaceBefore=8,
    spaceAfter=3,
    fontName='Helvetica-Bold',
    borderWidth=0,
    borderColor=colors.HexColor('#2e6da4'),
    borderPad=2
)

body_style = ParagraphStyle(
    'BodyText',
    parent=styles['Normal'],
    fontSize=9.5,
    spaceAfter=3,
    spaceBefore=1,
    leading=14,
    alignment=TA_JUSTIFY,
    fontName='Helvetica'
)

bullet_style = ParagraphStyle(
    'Bullet',
    parent=styles['Normal'],
    fontSize=9.5,
    spaceAfter=2,
    spaceBefore=1,
    leading=13,
    leftIndent=12,
    fontName='Helvetica'
)

remedy_style = ParagraphStyle(
    'Remedy',
    parent=styles['Normal'],
    fontSize=9.5,
    spaceAfter=2,
    spaceBefore=1,
    leading=13,
    leftIndent=6,
    fontName='Helvetica-Bold',
    textColor=colors.HexColor('#8B0000')
)

note_style = ParagraphStyle(
    'NoteStyle',
    parent=styles['Normal'],
    fontSize=8.5,
    spaceAfter=2,
    spaceBefore=2,
    leading=12,
    leftIndent=6,
    fontName='Helvetica-Oblique',
    textColor=colors.HexColor('#555555')
)

story = []

# ─── COVER ───────────────────────────────────────────────────────────────────
story.append(Spacer(1, 1.2*cm))
story.append(Paragraph("HOMOEOPATHIC MEDICINE", title_style))
story.append(Paragraph("Ophthalmology — Surgery Paper", subtitle_style))
story.append(Paragraph("University Examination Notes (15 Marks)", subtitle_style))
story.append(Spacer(1, 0.3*cm))
story.append(HRFlowable(width="100%", thickness=2, color=colors.HexColor('#1a3a5c')))
story.append(Spacer(1, 0.2*cm))

intro_text = (
    "This booklet covers all major ophthalmological conditions with their indicated homoeopathic remedies "
    "based on classical materia medica (Boericke, Kent, Allen, Clarke). Each section includes: "
    "<b>Key Symptoms → Leading Remedies → Remedy Characteristics</b>. "
    "Topics covered: Nystagmus | Corneal Ulcer | Trachoma | Uveitis | Ophthalmia Neonatorum | Stye | "
    "Chalazion | Refractive Error | Conjunctivitis | Glaucoma | D/D of Red Eye | Cataract | Iritis | "
    "Dacryocystitis | Keratitis | Scleritis"
)
story.append(Paragraph(intro_text, body_style))
story.append(Spacer(1, 0.4*cm))
story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor('#aaaaaa')))
story.append(Spacer(1, 0.3*cm))

# ─── HELPER FUNCTION ─────────────────────────────────────────────────────────
def section(title, content_blocks):
    """content_blocks = list of (type, text) where type is 'body','remedy','bullet','note','subhead'"""
    items = [Paragraph(title, section_heading), Spacer(1, 0.15*cm)]
    for t, txt in content_blocks:
        if t == 'body':
            items.append(Paragraph(txt, body_style))
        elif t == 'remedy':
            items.append(Paragraph(f"• {txt}", remedy_style))
        elif t == 'bullet':
            items.append(Paragraph(f"◦ {txt}", bullet_style))
        elif t == 'note':
            items.append(Paragraph(txt, note_style))
        elif t == 'subhead':
            items.append(Paragraph(txt, sub_heading))
    items.append(Spacer(1, 0.3*cm))
    story.extend(items)

def remedy_table(data, col_widths=None):
    """data = list of rows; first row = header"""
    if col_widths is None:
        col_widths = [4.5*cm, 12.5*cm]
    t = Table(data, colWidths=col_widths, repeatRows=1)
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a3a5c')),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 9),
        ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#cccccc')),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f0f5fb'), colors.white]),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
        ('LEFTPADDING', (0,0), (-1,-1), 5),
        ('RIGHTPADDING', (0,0), (-1,-1), 5),
        ('TOPPADDING', (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
        ('FONTNAME', (0,1), (0,-1), 'Helvetica-Bold'),
        ('TEXTCOLOR', (0,1), (0,-1), colors.HexColor('#8B0000')),
    ]))
    story.append(t)
    story.append(Spacer(1, 0.2*cm))

# ═══════════════════════════════════════════════════════════════════════════════
#  1. CONJUNCTIVITIS
# ═══════════════════════════════════════════════════════════════════════════════
section("1. CONJUNCTIVITIS", [
    ('body', "Inflammation of the conjunctiva — may be acute/chronic, bacterial, viral, allergic or trachomatous."),
    ('subhead', "Leading Remedies"),
])
remedy_table([
    ['Remedy', 'Key Indications'],
    ['Euphrasia off.', 'Acrid lachrymation + bland nasal discharge. Eyes water constantly; photophobia; redness. The "eye remedy" of homoeopathy. Worse in open air, wind.'],
    ['Arg. nit.', 'Purulent discharge; thick, yellow-green. Corners of eyes red. Chemosis. Newborns (ophthalmia neonatorum). Worse warmth.'],
    ['Pulsatilla', 'Thick, bland, yellow-green discharge. Worse warm room, better open air. Itching, burning. Mild temperament.'],
    ['Aconite nap.', 'Acute onset after exposure to cold dry wind. Eyes red, dry, burning, photophobic. Very early stage.'],
    ['Belladonna', 'Intense redness, throbbing, congestion. Pupils dilated. Hot, dry, burning. Sudden onset.'],
    ['Merc. sol.', 'Purulent, acrid discharge, worse at night. Greenish-yellow pus. Lids swollen. With salivation.'],
    ['Rhus tox.', 'Oedematous swelling of lids; profuse lachrymation. After getting wet. Photophobia; pustular conjunctivitis.'],
    ['Nat. mur.', 'Allergic/chronic conjunctivitis. Watery eyes; worse in open air. Dry, burning sensation. Hay fever type.'],
])
section("", [
    ('note', "Memory Tip: Euphrasia = acrid tears + bland nose | Allium cepa = bland tears + acrid nose (opposite)"),
])

# ═══════════════════════════════════════════════════════════════════════════════
#  2. TRACHOMA
# ═══════════════════════════════════════════════════════════════════════════════
section("2. TRACHOMA", [
    ('body', "Chronic keratoconjunctivitis caused by Chlamydia trachomatis. Leads to follicles on upper tarsal conjunctiva → pannus → scarring → trichiasis → blindness (WHO Grade I–IV/Herbert's pits)."),
    ('subhead', "Leading Remedies"),
])
remedy_table([
    ['Remedy', 'Key Indications'],
    ['Euphrasia off.', 'Follicular conjunctivitis with acrid lachrymation; photophobia; corneal involvement (pannus).'],
    ['Arg. nit.', 'Granular lids; purulent discharge; chemosis. Chronic trachoma with corneal ulceration.'],
    ['Thuja occ.', 'Tarsal thickening; follicles; condylomata-like growths on lids. Chronic indurated cases. Sycotic miasm.'],
    ['Calc. fluor.', 'Hardening and scarring of conjunctiva and cornea; calcareous deposits; chronic trachoma sequelae.'],
    ['Sulphur', 'Chronic trachoma with redness, burning, photophobia; aggravated by heat; offensive discharges.'],
    ['Kali bich.', 'Stringy, tenacious, ropy discharge from eyes; trachoma with pannus formation.'],
    ['Merc. sol.', 'Acrid, purulent discharge; night aggravation; all mucous membranes affected.'],
])

# ═══════════════════════════════════════════════════════════════════════════════
#  3. CORNEAL ULCER
# ═══════════════════════════════════════════════════════════════════════════════
section("3. CORNEAL ULCER", [
    ('body', "Ulceration of corneal epithelium +/- stroma. Causes: bacterial (Pseudomonas, Staph), viral (HSV), fungal, Acanthamoeba. Features: pain, photophobia, lachrymation, haziness, hypopyon."),
    ('subhead', "Leading Remedies"),
])
remedy_table([
    ['Remedy', 'Key Indications'],
    ['Merc. sol.', 'Deep, penetrating ulcers; acrid discharge; worse at night and in damp weather; tendency to perforation.'],
    ['Merc. corr.', 'Very acrid, excoriating discharge; intense burning; ulcers with tendency to spread quickly.'],
    ['Kali bich.', 'Round, punched-out ulcers (= "serpent ulcer"); ropy discharge; tongue shows imprint of teeth.'],
    ['Hepar sulph.', 'Infected ulcers with pus; extreme sensitivity; better warmth; abscess tendency; early stage corneal abscess.'],
    ['Silicea', 'Chronic, slow-healing corneal ulcers; corneal opacities; want of vital heat; constitutional action.'],
    ['Nitric acid', 'Splinter-like pains; edges of ulcer irregular; associated with notched teeth, warts.'],
    ['Arg. nit.', 'Corneal ulcer with thick purulent discharge; pannus; photophobia; hypopyon.'],
    ['Rhus tox.', 'After exposure to damp cold; pustular/serpiginous ulcer; oedematous lids; better warmth.'],
    ['Calc. sulph.', 'Suppurative stage — pus established; corneal abscess; yellowish discharge, one-sided.'],
])
section("", [
    ('note', "Kali bich. is classic for round punched-out ulcer. Hepar sulph. → early abscess/suppuration. Silicea → chronic/scarring stage."),
])

# ═══════════════════════════════════════════════════════════════════════════════
#  4. UVEITIS (IRITIS / IRIDOCYCLITIS)
# ═══════════════════════════════════════════════════════════════════════════════
section("4. UVEITIS / IRITIS", [
    ('body', "Inflammation of the uveal tract (iris, ciliary body, choroid). Symptoms: deep aching pain, photophobia, lachrymation, ciliary flush, irregular pupil, KPs, cells/flare in AC. Iritis = anterior uveitis."),
    ('subhead', "Leading Remedies"),
])
remedy_table([
    ['Remedy', 'Key Indications'],
    ['Aconite nap.', 'Sudden, violent onset after chill/fright. Intense pain, redness, photophobia, anxiety. Very early stage.'],
    ['Belladonna', 'Throbbing, pulsating pain; bright red eye; dilated pupil; hot, dry; sudden onset.'],
    ['Merc. sol.', 'Iritis with hypopyon; photophobia; acrid tears; worse at night; profuse perspiration.'],
    ['Rhus tox.', 'Rheumatic/traumatic iritis; after exposure to cold/damp; photophobia; chemosis; better movement.'],
    ['Apis mel.', 'Stinging, burning pains; oedematous lids and conjunctiva; worse heat; better cold applications.'],
    ['Hepar sulph.', 'Suppurative iridocyclitis; hypopyon; extreme sensitivity to touch and cold air; better warmth.'],
    ['Syphilinum', 'Specific for syphilitic iritis; nocturnal aggravation; bone pains; worse at night.'],
    ['Spigelia', 'Ciliary neuralgia; severe stabbing pain around eye; periodic; worse touch, motion.'],
    ['Nux vom.', 'Iritis with dyspepsia; morning aggravation; irritable patient; from alcoholic excess.'],
])
section("", [
    ('note', "Rhus tox. = rheumatic/traumatic iritis (most common exam answer). Syphilinum = syphilitic iritis."),
])

# ═══════════════════════════════════════════════════════════════════════════════
#  5. GLAUCOMA
# ═══════════════════════════════════════════════════════════════════════════════
section("5. GLAUCOMA", [
    ('body', "Raised IOP with optic nerve damage and visual field loss. Two main types: POAG (insidious, bilateral) and PACG (acute red painful eye with haloes around lights, nausea/vomiting)."),
    ('subhead', "Leading Remedies"),
])
remedy_table([
    ['Remedy', 'Key Indications'],
    ['Physostigma', 'Spasm of accommodation; myopia; contracted field of vision; twitching of muscles; glaucomatous pain. Important remedy.'],
    ['Osmium met.', 'Increased IOP; iridescent vision (rainbow halo); green vision. Specific for raised tension.'],
    ['Gelsemium', 'Dim vision; diplopia; drooping lids (ptosis); weak extraocular muscles; headache → eye pain.'],
    ['Belladonna', 'Acute angle-closure attack: intense throbbing pain, dilated fixed pupil, red eye, nausea.'],
    ['Merc. sol.', 'Glaucoma with iritis; nocturnal aggravation; ciliary neuralgia.'],
    ['Phosphorus', 'Open-angle glaucoma; green halos; weak eyes; atrophy of optic nerve; tall, lean person.'],
    ['Spigelia', 'Glaucomatous pain; ciliary neuralgia; pain shoots to back of eye; periodically returning.'],
    ['Prunus spin.', 'Bursting, shooting pain in eye (right-sided); sudden violent pain; feels as if eye would burst.'],
    ['Comocladia', 'Right eye; feeling of fullness; pain in eye socket; pain with redness of conjunctiva.'],
])
section("", [
    ('note', "Physostigma = #1 glaucoma remedy in homoeopathy. Osmium = iridescent/rainbow vision. Phosphorus = optic atrophy."),
])

# ═══════════════════════════════════════════════════════════════════════════════
#  6. D/D OF RED EYE
# ═══════════════════════════════════════════════════════════════════════════════
section("6. DIFFERENTIAL DIAGNOSIS OF RED EYE", [
    ('subhead', "Important Differentials"),
])
dd_data = [
    ['Condition', 'Vision', 'Pain', 'Pupil', 'Discharge', 'IOP', 'Key Homoeopathic Rx'],
    ['Conjunctivitis', 'Normal', 'Gritty', 'Normal', 'Profuse', 'Normal', 'Euphrasia, Arg. nit.'],
    ['Corneal Ulcer', 'Reduced', 'Severe', 'Normal', 'Watery/Pus', 'Normal', 'Merc. sol., Kali bich.'],
    ['Iritis/Uveitis', 'Reduced', 'Deep ache', 'Constricted', 'Watery', 'Low/normal', 'Rhus tox., Aconite'],
    ['Acute PACG', 'Very reduced', 'Severe', 'Dilated, fixed', 'Nil', 'Very high', 'Belladonna, Physostigma'],
    ['Episcleritis', 'Normal', 'Mild', 'Normal', 'Nil', 'Normal', 'Apis, Belladonna'],
    ['Scleritis', 'Normal', 'Severe, boring', 'Normal', 'Nil', 'Normal', 'Merc. sol., Hepar sulph.'],
    ['Subconjunctival haemorrhage', 'Normal', 'Nil', 'Normal', 'Nil', 'Normal', 'Arnica, Hamamelis'],
]
dd_table = Table(dd_data, colWidths=[3.5*cm, 2*cm, 2.5*cm, 2*cm, 2.5*cm, 2*cm, 3.5*cm], repeatRows=1)
dd_table.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a3a5c')),
    ('TEXTCOLOR', (0,0), (-1,0), colors.white),
    ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTSIZE', (0,0), (-1,-1), 8),
    ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#cccccc')),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f0f5fb'), colors.white]),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
    ('LEFTPADDING', (0,0), (-1,-1), 4),
    ('RIGHTPADDING', (0,0), (-1,-1), 4),
    ('TOPPADDING', (0,0), (-1,-1), 3),
    ('BOTTOMPADDING', (0,0), (-1,-1), 3),
]))
story.append(dd_table)
story.append(Spacer(1, 0.3*cm))

# ═══════════════════════════════════════════════════════════════════════════════
#  7. CATARACT
# ═══════════════════════════════════════════════════════════════════════════════
section("7. CATARACT", [
    ('body', "Opacification of the crystalline lens. Types: nuclear, cortical, posterior subcapsular, congenital. Painless progressive visual loss. Definitive treatment: surgical (ECCE/SICS/phacoemulsification with IOL)."),
    ('subhead', "Leading Remedies (to arrest progression / constitutional)"),
])
remedy_table([
    ['Remedy', 'Key Indications'],
    ['Calc. carb.', 'Cataract in obese, chilly, perspiring patients. Slow onset; white vision; constitutional remedy.'],
    ['Cineraria mar.', 'Most commonly indicated for cataract in homoeopathy. Used as eye drops. Stimulates absorption of crystalline opacity. Traumatic cataract.'],
    ['Causticum', 'Cataract with paralysis; right-sided; burning pains; emaciated patients.'],
    ['Phosphorus', 'Cataract with green halo around lights; tall thin patient; optic neuritis association.'],
    ['Silicea', 'Opacity of lens; corneal opacities; cataract from constitutional weakness.'],
    ['Nat. mur.', 'Cataract with dry eyes; craving salt; constipation; history of grief.'],
    ['Secale cor.', 'Senile cataract in thin, emaciated, elderly patients; burning sensation.'],
    ['Euphrasia', 'Cataract with excessive lachrymation; acrid tears; photophobia.'],
    ['Conium mac.', 'Senile cataract; photophobia; tearing; vertigo; associated prostate enlargement in males.'],
])
section("", [
    ('note', "Cineraria maritima eye drops = classic homoeopathic cataract treatment (Boericke). Calc. carb. = best constitutional remedy."),
])

# ═══════════════════════════════════════════════════════════════════════════════
#  8. STYE (HORDEOLUM)
# ═══════════════════════════════════════════════════════════════════════════════
section("8. STYE (HORDEOLUM)", [
    ('body', "Acute suppurative inflammation of a gland of the eyelid. External (Zeis/Moll glands) = Hordeolum externum. Internal (Meibomian) = Hordeolum internum. Caused by Staphylococcus aureus."),
    ('subhead', "Leading Remedies"),
])
remedy_table([
    ['Remedy', 'Key Indications'],
    ['Staphysagria', 'Styes occurring repeatedly, one after another; especially upper lid. Suppressed anger/indignation. Best remedy for recurrent styes.'],
    ['Pulsatilla', 'Stye with thick, bland, yellowish discharge; better in open air; in mild, weeping patients.'],
    ['Hepar sulph.', 'Suppurating stye; pus formation; extreme sensitivity; better warmth; promotes resolution.'],
    ['Merc. sol.', 'Stye with purulent discharge; worse at night; sweating; salivation.'],
    ['Lycopodium', 'Styes on lower lid; right-sided; associated liver complaints; 4–8 PM aggravation.'],
    ['Ferrum phos.', 'Early stage, before pus forms; congestion; redness; throbbing.'],
    ['Silicea', 'Chronic or slow-healing styes; promotes expulsion of foreign body/pus.'],
    ['Sulphur', 'Recurrent styes; burning itching; worse heat and bathing; in dirty, lean patients.'],
])
section("", [
    ('note', "Staphysagria = #1 for recurrent stye. Hepar sulph. → if stye pointing/suppurating. Silicea → chronic/indolent."),
])

# ═══════════════════════════════════════════════════════════════════════════════
#  9. CHALAZION
# ═══════════════════════════════════════════════════════════════════════════════
section("9. CHALAZION (MEIBOMIAN CYST)", [
    ('body', "Chronic lipogranuloma of a Meibomian gland from retained secretions. Painless, non-tender firm swelling on the lid margin. Differentiates from stye by: painless + chronic + not acute suppurative."),
    ('subhead', "Leading Remedies"),
])
remedy_table([
    ['Remedy', 'Key Indications'],
    ['Staphysagria', 'Recurrent chalazia; nodes in lids; especially in those with suppressed emotions.'],
    ['Calc. carb.', 'Tarsal cysts in fat, chilly, slow patients; glandular swellings generally.'],
    ['Baryta carb.', 'Hardened glandular swellings in elderly or children; nodes in lids; slow metabolism.'],
    ['Thuja occ.', 'Tarsal tumours/cysts; wart-like growths; sycotic miasm; greasy skin.'],
    ['Silicea', 'Promotes absorption of tarsal cysts; encourages expulsion; slow-healing.'],
    ['Conium mac.', 'Hard nodular swellings in elderly; induration of glands; photophobia.'],
    ['Platina', 'Chalazion with numbness; indurated lid glands.'],
])
section("", [
    ('note', "Chalazion = Lipogranuloma → hard, chronic, painless. Thuja + Silicea + Calc. carb. are the trio. Staphysagria if recurrent."),
])

# ═══════════════════════════════════════════════════════════════════════════════
#  10. OPHTHALMIA NEONATORUM
# ═══════════════════════════════════════════════════════════════════════════════
section("10. OPHTHALMIA NEONATORUM", [
    ('body', "Purulent conjunctivitis in newborn within first 28 days of life. Causes: Chemical (day 1) → Gonococci (day 2-5) → Chlamydia (day 5-14) → Other bacteria (variable)."),
    ('subhead', "Leading Remedies"),
])
remedy_table([
    ['Remedy', 'Key Indications'],
    ['Arg. nit.', 'Most important remedy for gonococcal ophthalmia neonatorum. Thick, purulent, profuse greenish-yellow discharge. Photophobia. Corneal ulceration risk.'],
    ['Pulsatilla', 'Thick, bland, yellowish discharge in newborn; mild temperament (constitutional).'],
    ['Merc. sol.', 'Profuse, acrid, purulent discharge; swollen lids; worse night; with fever.'],
    ['Hepar sulph.', 'Hypersensitive, suppurating stage; promotes safe suppuration without spread.'],
    ['Apis mel.', 'Oedematous swelling of lids and conjunctiva; burning, stinging pain; watery discharge.'],
    ['Borax', 'Infants startle easily; mouth problems with eye involvement; worse downward motion.'],
])
section("", [
    ('note', "Arg. nit. = classical remedy for ophthalmia neonatorum (gonorrheal). Prophylaxis: Crede's method (1% AgNO3 drops) — not homoeopathic."),
])

# ═══════════════════════════════════════════════════════════════════════════════
#  11. DACRYOCYSTITIS
# ═══════════════════════════════════════════════════════════════════════════════
section("11. DACRYOCYSTITIS", [
    ('body', "Inflammation of the lacrimal sac, usually secondary to obstruction of the nasolacrimal duct. Acute = painful, red, tender swelling at medial canthus with pus. Chronic = epiphora + mucopurulent discharge on pressure."),
    ('subhead', "Leading Remedies"),
])
remedy_table([
    ['Remedy', 'Key Indications'],
    ['Arg. nit.', 'Thick, purulent discharge from lacrimal sac; ulceration of the sac; chemosis.'],
    ['Silicea', 'Chronic dacryocystitis; fistula formation; slow healing; constitutional weakness.'],
    ['Merc. sol.', 'Acute dacryocystitis with acrid, profuse discharge; worse at night.'],
    ['Hepar sulph.', 'Abscess of lacrimal sac; suppuration; extreme sensitivity; better warmth.'],
    ['Calc. carb.', 'Obstruction of nasolacrimal duct in fat, chilly infants; epiphora.'],
    ['Calc. sulph.', 'Pus established stage; yellowish discharge; one-sided.'],
    ['Fluoric acid', 'Fistula of lacrimal sac; chronic suppurative cases; destruction of bone.'],
    ['Nat. mur.', 'Watering of eyes; chronic obstruction; grief history; craving salt.'],
])
section("", [
    ('note', "Fluoric acid = lacrimal fistula. Silicea = after fistula establishes. Hepar sulph. = before pointing/draining."),
])

# ═══════════════════════════════════════════════════════════════════════════════
#  12. KERATITIS
# ═══════════════════════════════════════════════════════════════════════════════
section("12. KERATITIS", [
    ('body', "Inflammation of the cornea. Types: bacterial, viral (HSV — dendritic), fungal, Acanthamoeba, interstitial (syphilitic/TB), neuroparalytic, rosacea. Symptoms: pain, photophobia, watering, reduced vision, ciliary flush."),
    ('subhead', "Leading Remedies"),
])
remedy_table([
    ['Remedy', 'Key Indications'],
    ['Merc. sol.', 'Superficial keratitis; acrid, thin discharge; worse night/damp; hypopyon; ulcerative.'],
    ['Hepar sulph.', 'Suppurative keratitis; corneal abscess; intense sensitivity; better warmth/warmth of hand.'],
    ['Silicea', 'Interstitial/deep keratitis; corneal opacities after healing; to complete resolution.'],
    ['Conium mac.', 'Photophobia with keratitis; streaming lachrymation on exposure to light; old people.'],
    ['Rhus tox.', 'Phlyctenular keratitis; vesicular; worse cold and damp; better motion.'],
    ['Kali bich.', 'Superficial punctate keratitis; ropy, stringy discharge; marginal ulcers.'],
    ['Euphrasia', 'Superficial keratitis with acrid lachrymation; photophobia; bland nasal discharge.'],
    ['Arg. nit.', 'Pannus; corneal vascularization; purulent discharge; induration.'],
    ['Merc. corr.', 'Deep, progressive, spreading keratitis; excoriating discharge; tenesmus.'],
])
section("", [
    ('note', "Phlyctenular keratitis → Rhus tox. (if vesicular) or Euphrasia. Interstitial keratitis → Silicea + Kali iod. (syphilitic)."),
])

# ═══════════════════════════════════════════════════════════════════════════════
#  13. SCLERITIS / EPISCLERITIS
# ═══════════════════════════════════════════════════════════════════════════════
section("13. SCLERITIS & EPISCLERITIS", [
    ('body', "Scleritis = deep, boring pain; scleral tenderness; associated with systemic disease (RA, SLE, gout, syphilis, TB). Episcleritis = mild, self-limiting redness without pain, no vision loss."),
    ('subhead', "Leading Remedies"),
])
remedy_table([
    ['Remedy', 'Key Indications'],
    ['Apis mel.', 'Episcleritis with oedematous, puffy swelling; stinging, burning; better cold applications.'],
    ['Belladonna', 'Acute episcleritis; throbbing; bright red; hot; sudden onset.'],
    ['Merc. sol.', 'Scleritis with acrid discharge; worse at night; associated systemic infection.'],
    ['Hepar sulph.', 'Scleritis with suppurative tendency; very sensitive; better warmth.'],
    ['Rhus tox.', 'Rheumatic scleritis; worse cold, better heat; aggravation at night.'],
    ['Aurum met.', 'Deep boring scleritis; syphilitic base; bone pain; suicidal tendency.'],
    ['Thuja occ.', 'Nodular episcleritis; sycotic miasm; greasy skin; wart-like growths.'],
    ['Kali iod.', 'Syphilitic scleritis; deep pain; periosteal involvement; worse at night.'],
])

# ═══════════════════════════════════════════════════════════════════════════════
#  14. NYSTAGMUS
# ═══════════════════════════════════════════════════════════════════════════════
section("14. NYSTAGMUS", [
    ('body', "Involuntary rhythmic oscillatory movements of the eyes. Types: Pendular (no fast phase) or Jerk (has fast + slow phase). Can be congenital, acquired (CNS, vestibular, drug-induced, coal miners)."),
    ('subhead', "Leading Remedies"),
])
remedy_table([
    ['Remedy', 'Key Indications'],
    ['Gelsemium', 'Nystagmus with drooping lids; diplopia; trembling; vertigo; weakness; chorea-like.'],
    ['Argentum nit.', 'Nystagmus with photophobia; headache; trembling; anxiety; desire for sweets.'],
    ['Conium mac.', 'Nystagmus in elderly; photophobia; vertigo when lying down or turning in bed.'],
    ['Causticum', 'Nystagmus with paralytic weakness of extraocular muscles; ptosis; burning pains.'],
    ['Hyoscyamus', 'Nystagmus with twitching; squinting; dilated pupils; in hysterical/delirious patients.'],
    ['Physostigma', 'Nystagmus; spasm of accommodation; twitching of eyelids.'],
    ['Agaricus', 'Nystagmus from neurological causes; trembling; twitching; ataxia; sensation of cold needles.'],
])

# ═══════════════════════════════════════════════════════════════════════════════
#  15. REFRACTIVE ERRORS
# ═══════════════════════════════════════════════════════════════════════════════
section("15. REFRACTIVE ERRORS", [
    ('body', "Myopia (short-sight), Hypermetropia (long-sight), Astigmatism, Presbyopia. Homoeopathic treatment is adjuvant/constitutional; corrective glasses/surgery remain primary treatment."),
    ('subhead', "Leading Remedies"),
])
remedy_table([
    ['Remedy', 'Key Indications'],
    ['Ruta grav.', 'Eyestrain from fine work; asthenopia; burning, hot eyes; headache from overuse of eyes. Eyestrain remedy #1.'],
    ['Physostigma', 'Progressive myopia; spasm of ciliary muscle; blurred vision; contracted field of vision.'],
    ['Jaborandi', 'Ciliary spasm; myopia; headache from eyestrain; profuse perspiration and salivation.'],
    ['Gelsemium', 'Deficient accommodation; dim vision; diplopia; drooping lids; weakness.'],
    ['Calc. carb.', 'Myopia in fat, chilly, perspiring children; eyes water in cold air.'],
    ['Sanicula', 'Myopia in young people; burning eyes; fine needles in the eyes.'],
    ['Nat. mur.', 'Asthenopia; eyestrain; dry eyes; blurred vision with reading; history of grief.'],
    ['Phosphorus', 'Green/coloured halos; optic neuritis; hyperaesthesia of retina; tall thin patients.'],
    ['Cyclamen', 'Presbyopia; difficulty adjusting to different distances; flickering before eyes.'],
    ['Viola od.', 'Hypermetropia (long sight); eyestrain on near vision; burning, smarting eyes.'],
])
section("", [
    ('note', "Ruta grav. = #1 for eyestrain/asthenopia. Physostigma = progressive myopia/ciliary spasm. Jaborandi = ciliary spasm + profuse sweating."),
])

# ═══════════════════════════════════════════════════════════════════════════════
#  QUICK REFERENCE SUMMARY TABLE
# ═══════════════════════════════════════════════════════════════════════════════
story.append(PageBreak())
story.append(Paragraph("QUICK REFERENCE — TOP REMEDIES PER CONDITION", section_heading))
story.append(Spacer(1, 0.2*cm))

qr_data = [
    ['Condition', 'Top 3 Remedies', 'Key Differentiating Feature'],
    ['Conjunctivitis', 'Euphrasia, Arg. nit., Pulsatilla', 'Euphrasia = acrid tears; Pulsatilla = bland discharge'],
    ['Trachoma', 'Arg. nit., Euphrasia, Thuja', 'Thuja for chronic indurated/scarred cases'],
    ['Corneal Ulcer', 'Merc. sol., Kali bich., Hepar sulph.', 'Kali bich. = round punched-out ulcer'],
    ['Uveitis/Iritis', 'Rhus tox., Aconite, Merc. sol.', 'Rhus tox. = rheumatic/traumatic'],
    ['Glaucoma', 'Physostigma, Osmium, Belladonna', 'Physostigma = myopia + spasm; Osmium = rainbow halo'],
    ['Cataract', 'Cineraria mar., Calc. carb., Phosphorus', 'Cineraria = eye drops; Calc. carb. = constitutional'],
    ['Stye', 'Staphysagria, Hepar sulph., Pulsatilla', 'Staphysagria = recurrent styes'],
    ['Chalazion', 'Staphysagria, Thuja, Silicea', 'Thuja = wart-like, sycotic; Silicea = absorption'],
    ['Ophthalmia Neonatorum', 'Arg. nit., Pulsatilla, Merc. sol.', 'Arg. nit. = gonorrheal; Pulsatilla = chlamydial'],
    ['Dacryocystitis', 'Silicea, Arg. nit., Fluoric acid', 'Fluoric acid = lacrimal fistula'],
    ['Keratitis', 'Merc. sol., Hepar sulph., Euphrasia', 'Euphrasia = superficial with acrid tears'],
    ['Scleritis', 'Aurum met., Merc. sol., Rhus tox.', 'Aurum = syphilitic deep boring pain'],
    ['Nystagmus', 'Gelsemium, Arg. nit., Physostigma', 'Gelsemium = with drooping lids/weakness'],
    ['Refractive Error', 'Ruta grav., Physostigma, Jaborandi', 'Ruta = eyestrain; Physostigma = myopia'],
]
qr_table = Table(qr_data, colWidths=[4.2*cm, 5.8*cm, 7*cm], repeatRows=1)
qr_table.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a3a5c')),
    ('TEXTCOLOR', (0,0), (-1,0), colors.white),
    ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTSIZE', (0,0), (-1,-1), 8.5),
    ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#cccccc')),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f0f5fb'), colors.white]),
    ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ('LEFTPADDING', (0,0), (-1,-1), 5),
    ('RIGHTPADDING', (0,0), (-1,-1), 5),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('FONTNAME', (0,1), (0,-1), 'Helvetica-Bold'),
    ('TEXTCOLOR', (0,1), (0,-1), colors.HexColor('#8B0000')),
]))
story.append(qr_table)
story.append(Spacer(1, 0.5*cm))

# ─── IMPORTANT SINGLE-DRUG FACTS ─────────────────────────────────────────────
story.append(Paragraph("IMPORTANT SINGLE-DRUG ASSOCIATIONS (Exam Favourites)", sub_heading))
facts = [
    "Euphrasia = Eye remedy; acrid lachrymation + bland nasal discharge",
    "Arg. nit. = Ophthalmia neonatorum (gonorrheal); round corneal ulcer",
    "Physostigma = Progressive myopia + spasm of accommodation + glaucoma",
    "Cineraria maritima = Eye drops for cataract",
    "Staphysagria = Recurrent styes (one after another)",
    "Osmium = Iridescent (rainbow) vision in glaucoma",
    "Kali bich. = Round/punched-out corneal ulcer; ropy discharge",
    "Fluoric acid = Lacrimal fistula",
    "Thuja = Tarsal cysts/chalazion; wart-like lid growths; trachoma",
    "Ruta grav. = Eyestrain/asthenopia from overuse",
    "Aurum met. = Deep boring scleritis (syphilitic)",
    "Rhus tox. = Rheumatic/traumatic iritis; phlyctenular keratitis",
    "Gelsemium = Ptosis + diplopia + nystagmus + weakness",
    "Comocladia = Glaucoma: feeling eye will burst out of socket",
    "Prunus spinosa = Sudden violent bursting pain in glaucoma (right side)",
]
for f in facts:
    story.append(Paragraph(f"★ {f}", bullet_style))
story.append(Spacer(1, 0.3*cm))

# ─── FOOTER NOTE ─────────────────────────────────────────────────────────────
story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor('#aaaaaa')))
story.append(Spacer(1, 0.15*cm))
story.append(Paragraph(
    "References: Boericke's Materia Medica (2001) | Kent's Repertory | Allen's Keynotes | "
    "Murphy's Homeopathic Medical Repertory | Clarke's Dictionary of Materia Medica. "
    "This PDF is prepared for university exam preparation. Consult your professor/textbooks for additional details.",
    note_style
))

# ─── BUILD ────────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF saved to: {output_path}")
Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.
This is a shared conversation. Sign in to Orris to start your own chat.