Ilex paraguariensis homeopathy medicine use

Reading File
Finding Sources
Searching the Web

Ilex paraguariensis homeopathy medicine uses indications materia medica

Searching PubMed

Ilex paraguariensis homeopathy

Reading Web Page

https://baksonhmc.com/wp-content/uploads/2024/03/MM-E-book-B…

Searching the Web

Ilex paraguariensis homeopathic remedy keynotes symptoms mind GI urinary headache

I now have comprehensive information from classical homeopathic materia medica sources. Here is a detailed response:

Ilex paraguariensis (Yerba Mate) in Homeopathy

Source and Preparation

Ilex paraguariensis St. Hilaire, commonly known as Yerba Mate, is a South American tree (family Aquifoliaceae). The homeopathic remedy is prepared from a tincture of the dried leaves. It belongs to the same genus as Ilex aquifolium (Holly) and Ilex vomitoria (Yaupon). The mother tincture (Q) is the most commonly used preparation, though dilutions up to 3x or 6x are also used.

Key Symptoms and Indications

According to classical homeopathic materia medica (Boericke, Clarke, Bakson Lesser Known Remedies):

Mind / Nervous System

  • Nervous depression and neurasthenia - mental and physical exhaustion without obvious cause
  • Somnolence (excessive sleepiness) with incapacity for work
  • Mental dullness, inability to concentrate
  • Used as a prophylactic against sunstroke - stimulant to circulation and perspiration

Head

  • Headache - particularly associated with fatigue and nervous exhaustion
  • Migraine - a notable indication
  • Headaches linked to digestive dysfunction

Mouth / Throat

  • Dryness of the mouth and pharynx - persistent, troublesome dryness
  • Pyrosis (heartburn/acid reflux sensation)
  • Anorexia (loss of appetite)

Gastric / Digestive System (Primary Sphere of Action)

  • Persistent epigastric pain - one of the most characteristic indications
  • Burning sensation in the stomach and chest
  • Pyrosis with dryness extending to the oesophagus
  • Anorexia with nausea

Urinary System

  • Diminution of urinary secretion (oliguria) - reduced urine output
  • Renal colic - pain along the urinary tract
  • Acts as a diuretic stimulant - promotes urinary flow
  • Used in minor urinary complaints, kidney/bladder flushing

Skin

  • Pruritus (generalized itching)

Keynote Summary

From Bakson's Lesser Known Homoeopathic Medicines (based on Boericke's Materia Medica, p. 304):
"Persistent epigastric pain; sense of dryness in the mouth and pharynx, anorexia, pyrosis, nervous depression, neurasthenia. Somnolence; incapacity for work, diminution of urinary secretion, headache and pruritus. Migraine. Renal colic. Is said to be of use as a prophylactic against sunstroke, being a safe stimulant to the circulation, to diaphoresis and diuresis."

Relationship to Crude Drug Actions

The homeopathic indications largely mirror the pharmacological effects of Yerba Mate in crude form (by the Law of Similars):
Crude Drug EffectHomeopathic Indication
CNS stimulant (caffeine, theobromine)Nervous exhaustion, neurasthenia, somnolence
DiureticDiminished urinary output, renal colic
GI stimulant / irritantEpigastric pain, pyrosis, anorexia
Thermogenic / diaphoreticSunstroke prophylaxis
Anti-rheumaticRheumatic pains, headache

Available Preparations

  • Mother Tincture (Q): 3-5 drops, 2-3 times daily (e.g., Dr. Willmar Schwabe India - available commercially in India)
  • Low potencies (1x, 3x, 6x): Used for functional/physiological action
  • Higher potencies (30c, 200c): Used when the mental/constitutional picture is prominent

Differentiation from Related Ilex Remedies

  • Ilex aquifolium (Holly): Intermittent fever, eye affections (rheumatic inflammation of cornea), jaundice, spleen pain, diarrhoea with mucous
  • Ilex vomitoria (Yaupon): Emetic properties, diuretic (used in nephritis and gout), tonic without sleeplessness
  • Ilex cassine (Christmas Berry Tea): Mainly diuretic, tea substitute

Important Note

No peer-reviewed clinical trials specifically on Ilex paraguariensis as a homeopathic remedy were found in PubMed. The evidence base is materia medica (provings, traditional use, and clinical observations). The crude herb itself has documented antioxidant, anti-inflammatory, and metabolic effects (PMC study), and the European Medicines Agency (EMA) has assessed it for traditional herbal use in fatigue and urinary complaints - but homeopathic use is distinct from herbal/phytotherapy and should be guided by a qualified homeopath.

Generate a materia medica reference card for Ilex paraguariensis

Asking for Preferences
Reading File
Running Command

mkdir -p /home/daytona/workspace/ilex-card && ls /home/daytona/workspace/

Writing File

~/ilex-card/generate_card.py

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

# ── Colour palette ──────────────────────────────────────────────────────────
DARK_GREEN   = colors.HexColor("#1B5E20")
MID_GREEN    = colors.HexColor("#2E7D32")
LIGHT_GREEN  = colors.HexColor("#C8E6C9")
ACCENT_GREEN = colors.HexColor("#4CAF50")
GOLD         = colors.HexColor("#F9A825")
CREAM        = colors.HexColor("#FAFDF5")
DARK_GREY    = colors.HexColor("#263238")
MID_GREY     = colors.HexColor("#455A64")
PALE_GREY    = colors.HexColor("#ECEFF1")
WHITE        = colors.white

OUTPUT = "/home/daytona/workspace/ilex-card/Ilex_paraguariensis_Materia_Medica.pdf"

# ── Document setup ───────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    rightMargin=1.8*cm,
    leftMargin=1.8*cm,
    topMargin=2*cm,
    bottomMargin=1.8*cm,
    title="Ilex paraguariensis - Materia Medica Reference Card",
    author="Orris AI"
)

styles = getSampleStyleSheet()

# Custom styles
def S(name, **kw):
    return ParagraphStyle(name, **kw)

title_style = S("CardTitle",
    fontName="Helvetica-Bold", fontSize=22,
    textColor=WHITE, alignment=TA_CENTER, spaceAfter=2)

subtitle_style = S("Subtitle",
    fontName="Helvetica-Oblique", fontSize=12,
    textColor=LIGHT_GREEN, alignment=TA_CENTER, spaceAfter=4)

common_name_style = S("CommonName",
    fontName="Helvetica", fontSize=10,
    textColor=GOLD, alignment=TA_CENTER, spaceAfter=0)

section_header = S("SectionHeader",
    fontName="Helvetica-Bold", fontSize=11,
    textColor=WHITE, spaceBefore=6, spaceAfter=3,
    leftIndent=0, leading=14)

body_style = S("Body",
    fontName="Helvetica", fontSize=9.5,
    textColor=DARK_GREY, leading=14,
    spaceAfter=2, leftIndent=6)

bullet_style = S("Bullet",
    fontName="Helvetica", fontSize=9.5,
    textColor=DARK_GREY, leading=13,
    spaceAfter=1, leftIndent=10, bulletIndent=2,
    bulletText=u"\u2022")

keynote_style = S("Keynote",
    fontName="Helvetica-BoldOblique", fontSize=9.5,
    textColor=MID_GREEN, leading=13,
    spaceAfter=1, leftIndent=10, bulletIndent=2,
    bulletText=u"\u2605")

label_style = S("Label",
    fontName="Helvetica-Bold", fontSize=9,
    textColor=MID_GREY, spaceAfter=1)

footer_style = S("Footer",
    fontName="Helvetica-Oblique", fontSize=7.5,
    textColor=MID_GREY, alignment=TA_CENTER)

quote_style = S("Quote",
    fontName="Helvetica-Oblique", fontSize=9,
    textColor=MID_GREY, leading=13,
    leftIndent=12, rightIndent=12,
    spaceAfter=4, spaceBefore=4)

# ── Header banner ────────────────────────────────────────────────────────────
class HeaderBanner(Flowable):
    def __init__(self, width, height=70):
        Flowable.__init__(self)
        self.width = width
        self.height = height

    def draw(self):
        c = self.canv
        # Background gradient effect via layered rects
        c.setFillColor(DARK_GREEN)
        c.rect(0, 0, self.width, self.height, fill=1, stroke=0)
        c.setFillColor(MID_GREEN)
        c.rect(0, 0, self.width * 0.6, self.height, fill=1, stroke=0)
        # Decorative bar
        c.setFillColor(GOLD)
        c.rect(0, self.height - 4, self.width, 4, fill=1, stroke=0)
        c.rect(0, 0, self.width, 3, fill=1, stroke=0)

        # Latin name
        c.setFillColor(WHITE)
        c.setFont("Helvetica-BoldOblique", 22)
        c.drawCentredString(self.width / 2, self.height - 30, "Ilex paraguariensis")

        # Common name
        c.setFillColor(GOLD)
        c.setFont("Helvetica-Bold", 11)
        c.drawCentredString(self.width / 2, self.height - 46, "YERBA MATE  |  PARAGUAY TEA")

        # Subtitle
        c.setFillColor(LIGHT_GREEN)
        c.setFont("Helvetica-Oblique", 9)
        c.drawCentredString(self.width / 2, self.height - 60,
            "Homoeopathic Materia Medica Reference Card")


class SectionBox(Flowable):
    """Coloured label bar for section titles."""
    def __init__(self, text, width, bg=MID_GREEN, fg=WHITE):
        Flowable.__init__(self)
        self.text = text
        self.width = width
        self.bg = bg
        self.fg = fg
        self.height = 18

    def draw(self):
        c = self.canv
        c.setFillColor(self.bg)
        c.roundRect(0, 0, self.width, self.height, 3, fill=1, stroke=0)
        c.setFillColor(self.fg)
        c.setFont("Helvetica-Bold", 10)
        c.drawString(8, 5, self.text.upper())


# ── Helper to build a two-column section table ───────────────────────────────
def two_col_table(left_content, right_content, col_widths, bg=CREAM):
    data = [[left_content, right_content]]
    t = Table(data, colWidths=col_widths)
    t.setStyle(TableStyle([
        ("VALIGN",      (0, 0), (-1, -1), "TOP"),
        ("LEFTPADDING",  (0, 0), (-1, -1), 6),
        ("RIGHTPADDING", (0, 0), (-1, -1), 6),
        ("TOPPADDING",   (0, 0), (-1, -1), 6),
        ("BOTTOMPADDING",(0, 0), (-1, -1), 6),
        ("BACKGROUND",   (0, 0), (-1, -1), bg),
        ("ROUNDEDCORNERS", [4]),
    ]))
    return t


def section_table(rows, col_widths, header_row=None, row_bg1=CREAM, row_bg2=PALE_GREY):
    """Build a styled table with alternating row colours."""
    style_cmds = [
        ("FONTNAME",     (0, 0), (-1, -1), "Helvetica"),
        ("FONTSIZE",     (0, 0), (-1, -1), 9),
        ("TEXTCOLOR",    (0, 0), (-1, -1), DARK_GREY),
        ("VALIGN",       (0, 0), (-1, -1), "TOP"),
        ("LEFTPADDING",  (0, 0), (-1, -1), 7),
        ("RIGHTPADDING", (0, 0), (-1, -1), 7),
        ("TOPPADDING",   (0, 0), (-1, -1), 5),
        ("BOTTOMPADDING",(0, 0), (-1, -1), 5),
        ("GRID",         (0, 0), (-1, -1), 0.3, colors.HexColor("#B0BEC5")),
    ]
    if header_row is not None:
        style_cmds += [
            ("BACKGROUND",   (0, 0), (-1, 0), MID_GREEN),
            ("TEXTCOLOR",    (0, 0), (-1, 0), WHITE),
            ("FONTNAME",     (0, 0), (-1, 0), "Helvetica-Bold"),
            ("FONTSIZE",     (0, 0), (-1, 0), 9.5),
        ]
        data = [header_row] + rows
        for i, _ in enumerate(rows):
            bg = row_bg1 if i % 2 == 0 else row_bg2
            style_cmds.append(("BACKGROUND", (0, i+1), (-1, i+1), bg))
    else:
        data = rows
        for i, _ in enumerate(rows):
            bg = row_bg1 if i % 2 == 0 else row_bg2
            style_cmds.append(("BACKGROUND", (0, i), (-1, i), bg))

    t = Table(data, colWidths=col_widths)
    t.setStyle(TableStyle(style_cmds))
    return t


# ── Build story ──────────────────────────────────────────────────────────────
story = []
PAGE_W = A4[0] - 3.6*cm   # usable width

# Header
story.append(HeaderBanner(PAGE_W))
story.append(Spacer(1, 8))

# ── DRUG IDENTITY ─────────────────────────────────────────────────────────────
story.append(SectionBox("Drug Identity & Source", PAGE_W, MID_GREEN))
story.append(Spacer(1, 4))

identity_rows = [
    [Paragraph("<b>Latin Name</b>", label_style),
     Paragraph("Ilex paraguariensis St. Hilaire", body_style)],
    [Paragraph("<b>Abbreviation</b>", label_style),
     Paragraph("Ilex-p.", body_style)],
    [Paragraph("<b>Common Names</b>", label_style),
     Paragraph("Yerba Mate, Paraguay Tea, Mate, Ka'a (Guarani)", body_style)],
    [Paragraph("<b>Family</b>", label_style),
     Paragraph("Aquifoliaceae (Holly family)", body_style)],
    [Paragraph("<b>Origin</b>", label_style),
     Paragraph("South America - S. Brazil, NE Argentina, E. Paraguay, Uruguay", body_style)],
    [Paragraph("<b>Drug Source</b>", label_style),
     Paragraph("Dried leaves (folium); prepared as mother tincture (Q)", body_style)],
    [Paragraph("<b>Active Constituents</b>", label_style),
     Paragraph("Caffeine, theobromine, theophylline (xanthines); chlorogenic acid; tannins; saponins; vitamins B1, B2, C", body_style)],
    [Paragraph("<b>Related Remedies</b>", label_style),
     Paragraph("Ilex aquifolium (Holly), Ilex vomitoria (Yaupon), Ilex cassine", body_style)],
]
id_t = Table(identity_rows, colWidths=[4.2*cm, PAGE_W - 4.2*cm])
id_t.setStyle(TableStyle([
    ("VALIGN",       (0, 0), (-1, -1), "TOP"),
    ("LEFTPADDING",  (0, 0), (-1, -1), 6),
    ("RIGHTPADDING", (0, 0), (-1, -1), 6),
    ("TOPPADDING",   (0, 0), (-1, -1), 4),
    ("BOTTOMPADDING",(0, 0), (-1, -1), 4),
    ("BACKGROUND",   (0, 0), (0, -1), LIGHT_GREEN),
    ("BACKGROUND",   (1, 0), (1, -1), CREAM),
    ("ROWBACKGROUNDS", (0, 0), (-1, -1), [CREAM, PALE_GREY]),
    ("GRID",         (0, 0), (-1, -1), 0.3, colors.HexColor("#B0BEC5")),
]))
story.append(id_t)
story.append(Spacer(1, 8))

# ── MIASMATIC / CONSTITUTION ──────────────────────────────────────────────────
story.append(SectionBox("Constitutional Profile", PAGE_W, colors.HexColor("#37474F")))
story.append(Spacer(1, 4))

const_data = [
    ["Miasm", "Predominant Psoric; Sycotic tendency"],
    ["Constitution", "Nervous, exhausted, debilitated individuals; intellectual workers; those prone to fatigue after mental strain"],
    ["Temperament", "Melancholic-phlegmatic; listless, drowsy, mentally dull"],
    ["Thermal", "No confirmed modality (crude drug is thermogenic; homeopathic thermal state not well established)"],
]
const_t = section_table(
    [[Paragraph(f"<b>{r[0]}</b>", label_style), Paragraph(r[1], body_style)] for r in const_data],
    col_widths=[3.5*cm, PAGE_W - 3.5*cm]
)
story.append(const_t)
story.append(Spacer(1, 8))

# ── KEYNOTES BOX ─────────────────────────────────────────────────────────────
story.append(SectionBox("Keynotes  (Boericke / Bakson)", PAGE_W, DARK_GREEN))
story.append(Spacer(1, 4))

keynotes = [
    "Persistent, dull or cramping epigastric pain",
    "Marked dryness of mouth and pharynx with no thirst",
    "Pyrosis (heartburn) and anorexia",
    "Nervous depression and neurasthenia - mental fatigue out of proportion",
    "Somnolence and incapacity for work",
    "Headache and migraine - linked to nervous exhaustion or GI disturbance",
    "Diminished urinary secretion (oliguria) tending to renal colic",
    "Generalised pruritus (itching without eruption)",
    "Prophylactic for sunstroke - stimulates circulation and diaphoresis",
]
kn_items = [[Paragraph(f"\u2605  {k}", keynote_style)] for k in keynotes]
kn_t = Table(kn_items, colWidths=[PAGE_W])
kn_t.setStyle(TableStyle([
    ("BACKGROUND",   (0, 0), (-1, -1), colors.HexColor("#F1F8E9")),
    ("LEFTPADDING",  (0, 0), (-1, -1), 10),
    ("TOPPADDING",   (0, 0), (-1, -1), 3),
    ("BOTTOMPADDING",(0, 0), (-1, -1), 3),
    ("GRID",         (0, 0), (-1, -1), 0.2, colors.HexColor("#C5E1A5")),
]))
story.append(kn_t)
story.append(Spacer(1, 8))

# ── SYMPTOM PICTURE (two columns) ────────────────────────────────────────────
story.append(SectionBox("Symptom Picture by System", PAGE_W, MID_GREEN))
story.append(Spacer(1, 4))

col_half = (PAGE_W - 4) / 2

left_systems = [
    ("Mind / Nervous", [
        "Nervous depression; neurasthenia",
        "Mental dullness, inability to concentrate",
        "Somnolence; excessive drowsiness",
        "Incapacity for work",
        "Restlessness at night; disturbed sleep",
    ]),
    ("Head", [
        "Persistent headache esp. from fatigue",
        "Migraine (notable indication)",
        "Headache linked to GI dysfunction",
    ]),
    ("Mouth / Throat", [
        "Persistent dryness of mouth & pharynx",
        "Pyrosis / acid reflux sensation",
        "Anorexia (complete loss of appetite)",
        "Burning in oesophagus extending upward",
    ]),
    ("Gastric / Digestive", [
        "Persistent, dull epigastric pain",
        "Burning sensation in stomach & chest",
        "Heartburn; sense of fullness",
        "Nausea; sense of epigastric pressure",
    ]),
]

right_systems = [
    ("Urinary", [
        "Diminished urine output (oliguria)",
        "Renal colic - pain along urinary tract",
        "Diuretic action in crude form (suppressed in proving)",
        "Minor urinary complaints, bladder irritation",
    ]),
    ("Skin", [
        "Generalised pruritus without visible eruption",
    ]),
    ("Circulatory / General", [
        "Sunstroke prophylactic",
        "Stimulates diaphoresis (sweating)",
        "Safe circulatory stimulant",
        "Physical fatigue and weakness",
    ]),
    ("Female", [
        "Pregnancy-related discomfort (dryness, epigastric complaints)",
        "Mental wellness support during gestation",
    ]),
]

def system_block(systems):
    items = []
    for sys_name, syms in systems:
        items.append(Paragraph(f"<b>{sys_name}</b>", ParagraphStyle(
            "SH", fontName="Helvetica-Bold", fontSize=9, textColor=MID_GREEN,
            spaceBefore=5, spaceAfter=1, leftIndent=0)))
        for s in syms:
            items.append(Paragraph(f"\u2022  {s}", bullet_style))
    return items

left_block  = system_block(left_systems)
right_block = system_block(right_systems)

sym_t = Table([[left_block, right_block]], colWidths=[col_half, col_half])
sym_t.setStyle(TableStyle([
    ("VALIGN",       (0, 0), (-1, -1), "TOP"),
    ("LEFTPADDING",  (0, 0), (-1, -1), 8),
    ("RIGHTPADDING", (0, 0), (-1, -1), 8),
    ("TOPPADDING",   (0, 0), (-1, -1), 6),
    ("BOTTOMPADDING",(0, 0), (-1, -1), 6),
    ("BACKGROUND",   (0, 0), (0, 0), CREAM),
    ("BACKGROUND",   (1, 0), (1, 0), colors.HexColor("#F9FBF6")),
    ("LINEAFTER",    (0, 0), (0, 0), 0.5, colors.HexColor("#A5D6A7")),
]))
story.append(sym_t)
story.append(Spacer(1, 8))

# ── MODALITIES ────────────────────────────────────────────────────────────────
story.append(SectionBox("Modalities", PAGE_W, colors.HexColor("#33691E")))
story.append(Spacer(1, 4))

mod_rows = [
    [Paragraph("<b>Aggravation (\u2190)</b>", label_style),
     Paragraph("Mental exertion; fatigue; hot weather; suppression of perspiration; overeating", body_style)],
    [Paragraph("<b>Amelioration (\u2192)</b>", label_style),
     Paragraph("Rest; diaphoresis (sweating); adequate fluid intake; cool environment", body_style)],
    [Paragraph("<b>Time</b>", label_style),
     Paragraph("No well-established time modality in provings (crude drug has diurnal caffeine rhythm)", body_style)],
]
mod_t = Table(mod_rows, colWidths=[4.2*cm, PAGE_W - 4.2*cm])
mod_t.setStyle(TableStyle([
    ("VALIGN",       (0, 0), (-1, -1), "TOP"),
    ("LEFTPADDING",  (0, 0), (-1, -1), 6),
    ("RIGHTPADDING", (0, 0), (-1, -1), 6),
    ("TOPPADDING",   (0, 0), (-1, -1), 4),
    ("BOTTOMPADDING",(0, 0), (-1, -1), 4),
    ("BACKGROUND",   (0, 0), (0, -1), colors.HexColor("#DCEDC8")),
    ("BACKGROUND",   (1, 0), (1, -1), CREAM),
    ("ROWBACKGROUNDS", (0, 0), (-1, -1), [CREAM, PALE_GREY]),
    ("GRID",         (0, 0), (-1, -1), 0.3, colors.HexColor("#B0BEC5")),
]))
story.append(mod_t)
story.append(Spacer(1, 8))

# ── POSOLOGY ─────────────────────────────────────────────────────────────────
story.append(SectionBox("Posology & Potency Guide", PAGE_W, colors.HexColor("#1565C0")))
story.append(Spacer(1, 4))

potency_rows = [
    ["Mother Tincture (Q)", "3-5 drops in water, 2-3x/day", "Functional GI, urinary, fatigue complaints\nMost commonly available form"],
    ["1x - 3x (Low decimal)", "Tablet or drops, 3x/day", "Physiological action; diuretic support;\nrenal colic (acute)"],
    ["6c - 30c", "3-5 pills, 2-3x/day", "Nervous depression, neurasthenia, migraine"],
    ["200c", "Single dose; repeat as needed", "Constitutional / deep mental-emotional picture"],
]
pot_t = section_table(
    [[Paragraph(r[0], ParagraphStyle("pc", fontName="Helvetica-Bold", fontSize=9, textColor=DARK_GREY)),
      Paragraph(r[1], body_style),
      Paragraph(r[2], body_style)] for r in potency_rows],
    col_widths=[4.5*cm, 4.5*cm, PAGE_W - 9*cm],
    header_row=[
        Paragraph("Potency", ParagraphStyle("ph", fontName="Helvetica-Bold", fontSize=9, textColor=WHITE)),
        Paragraph("Dosage", ParagraphStyle("ph", fontName="Helvetica-Bold", fontSize=9, textColor=WHITE)),
        Paragraph("Indication", ParagraphStyle("ph", fontName="Helvetica-Bold", fontSize=9, textColor=WHITE)),
    ]
)
story.append(pot_t)
story.append(Spacer(1, 8))

# ── RELATIONSHIPS ─────────────────────────────────────────────────────────────
story.append(SectionBox("Relationships", PAGE_W, colors.HexColor("#4A148C")))
story.append(Spacer(1, 4))

rel_rows = [
    ["Complementary", "Nux vomica, Lycopodium (hepatic / GI sphere);\nKali phos (nervous exhaustion)"],
    ["Inimicals", "Not well established in materia medica"],
    ["Compare", "Coffea cruda (CNS stimulant, sleeplessness);\nCola (coca; fatigue, nervous exhaustion);\nIlex aquifolium (same genus; fever, spleen);\nThea sinensis (xanthine alkaloids, similar sphere);\nAconitum (heat stroke, circulatory stimulation)"],
    ["Antidote", "Not specifically documented"],
]
rel_t = section_table(
    [[Paragraph(f"<b>{r[0]}</b>", label_style), Paragraph(r[1], body_style)] for r in rel_rows],
    col_widths=[3.8*cm, PAGE_W - 3.8*cm]
)
story.append(rel_t)
story.append(Spacer(1, 8))

# ── CLINICAL USES (quick reference box) ──────────────────────────────────────
story.append(SectionBox("Quick Clinical Reference", PAGE_W, DARK_GREEN))
story.append(Spacer(1, 4))

clinical_data = [
    ["Condition", "Key Guiding Symptoms", "Potency"],
    ["Epigastric Pain", "Persistent, dull; with dryness of mouth; anorexia; pyrosis", "Q / 6c"],
    ["Migraine / Headache", "From nervous exhaustion; with digestive symptoms", "30c / 200c"],
    ["Neurasthenia", "Somnolence; incapacity for work; mental dullness; depression", "30c / 200c"],
    ["Renal Colic", "Diminished urine; cramping renal pain; no infection signs", "Q / 3x"],
    ["Pruritus", "Generalised itching without skin eruption; nervous origin", "30c"],
    ["Sunstroke Prevention", "Hot weather; physical exertion; history of heat intolerance", "Q (prophylactic)"],
    ["Pregnancy Discomfort", "Dryness of mouth; epigastric distress; mental fatigue", "6c / 30c"],
]
clin_rows = [[Paragraph(c, ParagraphStyle(
    "ct", fontName="Helvetica-Bold" if i == 0 else "Helvetica-Bold" if j == 0 else "Helvetica",
    fontSize=9, textColor=WHITE if i == 0 else DARK_GREY)) for j, c in enumerate(r)]
    for i, r in enumerate(clinical_data)]

clin_t = Table(clin_rows, colWidths=[4.2*cm, PAGE_W - 7.5*cm, 3.3*cm])
clin_t.setStyle(TableStyle([
    ("BACKGROUND",   (0, 0), (-1, 0), MID_GREEN),
    ("TEXTCOLOR",    (0, 0), (-1, 0), WHITE),
    ("FONTNAME",     (0, 0), (-1, 0), "Helvetica-Bold"),
    ("ROWBACKGROUNDS", (0, 1), (-1, -1), [CREAM, PALE_GREY]),
    ("FONTNAME",     (0, 1), (0, -1), "Helvetica-Bold"),
    ("TEXTCOLOR",    (0, 1), (0, -1), MID_GREEN),
    ("VALIGN",       (0, 0), (-1, -1), "MIDDLE"),
    ("LEFTPADDING",  (0, 0), (-1, -1), 7),
    ("RIGHTPADDING", (0, 0), (-1, -1), 7),
    ("TOPPADDING",   (0, 0), (-1, -1), 5),
    ("BOTTOMPADDING",(0, 0), (-1, -1), 5),
    ("GRID",         (0, 0), (-1, -1), 0.3, colors.HexColor("#B0BEC5")),
    ("FONTSIZE",     (0, 0), (-1, -1), 9),
]))
story.append(clin_t)
story.append(Spacer(1, 8))

# ── CONTRAINDICATIONS ─────────────────────────────────────────────────────────
story.append(SectionBox("Cautions & Contraindications", PAGE_W, colors.HexColor("#B71C1C")))
story.append(Spacer(1, 4))

warn_items = [
    "Cardiac disorders or hypertension - xanthines stimulate heart rate and blood pressure at crude drug doses",
    "Anxiety disorders / insomnia - may aggravate in sensitive patients (especially at lower potencies / mother tincture)",
    "Renal insufficiency - exercise caution; monitor urinary function",
    "Pregnancy: Q / low potencies generally considered safe in homeopathic dilution; consult a qualified practitioner",
    "Drug interactions (crude herb): potentiates sympathomimetics, MAOIs; anticoagulants (vitamin K content). Homeopathic dilutions do not carry these pharmacological risks above 12c (Avogadro threshold).",
]
warn_t = Table([[Paragraph(f"\u26a0  {w}", ParagraphStyle("warn", fontName="Helvetica", fontSize=9,
    textColor=colors.HexColor("#B71C1C"), leading=12, spaceAfter=1, leftIndent=4))
    ] for w in warn_items], colWidths=[PAGE_W])
warn_t.setStyle(TableStyle([
    ("BACKGROUND",   (0, 0), (-1, -1), colors.HexColor("#FFEBEE")),
    ("LEFTPADDING",  (0, 0), (-1, -1), 10),
    ("TOPPADDING",   (0, 0), (-1, -1), 4),
    ("BOTTOMPADDING",(0, 0), (-1, -1), 4),
    ("GRID",         (0, 0), (-1, -1), 0.2, colors.HexColor("#EF9A9A")),
]))
story.append(warn_t)
story.append(Spacer(1, 8))

# ── MATERIA MEDICA QUOTE ───────────────────────────────────────────────────────
story.append(HRFlowable(width=PAGE_W, thickness=0.5, color=ACCENT_GREEN))
story.append(Spacer(1, 4))
story.append(Paragraph(
    "<i>\"Persistent epigastric pain; sense of dryness in the mouth and pharynx, anorexia, pyrosis, "
    "nervous depression, neurasthenia. Somnolence; incapacity for work, diminution of urinary secretion, "
    "headache and pruritus. Migraine. Renal colic. Is said to be of use as a prophylactic against sunstroke, "
    "being a safe stimulant to the circulation, to diaphoresis and diuresis.\"</i>",
    quote_style))
story.append(Paragraph(
    "\u2014 Boericke's Materia Medica (via Bakson's Lesser Known Homoeopathic Medicines, p. 304)",
    ParagraphStyle("src", fontName="Helvetica-Oblique", fontSize=8, textColor=MID_GREY,
                   leftIndent=14, spaceAfter=6)))

# ── FOOTER ────────────────────────────────────────────────────────────────────
story.append(HRFlowable(width=PAGE_W, thickness=0.5, color=ACCENT_GREEN))
story.append(Spacer(1, 3))
story.append(Paragraph(
    "Sources: Boericke's Materia Medica | Clarke's Dictionary of Practical Materia Medica | "
    "Bakson's Lesser Known Homoeopathic Medicines | Dr. Willmar Schwabe India | EMA HMPC Assessment Report",
    footer_style))
story.append(Paragraph(
    "For educational purposes only. Always consult a qualified homoeopathic practitioner for clinical use.",
    ParagraphStyle("disc", fontName="Helvetica-BoldOblique", fontSize=7.5,
                   textColor=colors.HexColor("#B71C1C"), alignment=TA_CENTER, spaceBefore=2)))

# ── Build ─────────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF generated: {OUTPUT}")
Running Command

cd /home/daytona/workspace/ilex-card && python generate_card.py 2>&1

Running Command

ls -lh /home/daytona/workspace/ilex-card/

Your reference card is ready:

Ilex paraguariensis Materia Medica

PDF Document · PDF


The card covers 8 sections on a single A4 page:
SectionContents
Drug Identity & SourceLatin name, family, origin, drug source, active constituents, related remedies
Constitutional ProfileMiasm, constitution type, temperament, thermal state
Keynotes9 star-marked keynote symptoms (Boericke / Bakson)
Symptom Picture by SystemTwo-column layout across Mind, Head, Mouth, GI, Urinary, Skin, Circulatory, Female
ModalitiesAggravation, Amelioration, Time
Posology & Potency GuideQ through 200c with dosage and indication for each
RelationshipsComplementaries, Comparisons (Coffea, Cola, Thea, Ilex aq.)
Quick Clinical Reference7 conditions with guiding symptoms and suggested potency
CautionsCardiac, renal, pregnancy, drug-interaction notes
The footer includes the classical source references (Boericke, Clarke, Bakson, Schwabe) and a standard clinical disclaimer.

Generate a materia medica reference card for symptom medicine

Asking for Preferences
Writing File

~/ilex-card/generate_symptom_card.py

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

# ── Palette ───────────────────────────────────────────────────────────────────
DARK_BLUE    = colors.HexColor("#0D2137")
MID_BLUE     = colors.HexColor("#1565C0")
LIGHT_BLUE   = colors.HexColor("#BBDEFB")
ACCENT_BLUE  = colors.HexColor("#1E88E5")
TEAL         = colors.HexColor("#00695C")
LIGHT_TEAL   = colors.HexColor("#B2DFDB")
GOLD         = colors.HexColor("#F9A825")
AMBER        = colors.HexColor("#FF8F00")
CREAM        = colors.HexColor("#FAFBFF")
PALE_GREY    = colors.HexColor("#ECEFF1")
MID_GREY     = colors.HexColor("#546E7A")
DARK_GREY    = colors.HexColor("#263238")
WHITE        = colors.white
RED          = colors.HexColor("#C62828")
PURPLE       = colors.HexColor("#4A148C")
LIGHT_PURPLE = colors.HexColor("#E8EAF6")
GREEN        = colors.HexColor("#2E7D32")
LIGHT_GREEN  = colors.HexColor("#C8E6C9")
ORANGE       = colors.HexColor("#E65100")
LIGHT_ORANGE = colors.HexColor("#FFE0B2")

OUTPUT = "/home/daytona/workspace/ilex-card/Homoeopathy_Symptom_Remedy_Reference.pdf"

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    rightMargin=1.4*cm,
    leftMargin=1.4*cm,
    topMargin=1.6*cm,
    bottomMargin=1.4*cm,
    title="Homoeopathic Symptom-to-Remedy Reference Card",
    author="Orris AI"
)

PAGE_W = A4[0] - 2.8*cm

# ── Styles ────────────────────────────────────────────────────────────────────
def S(name, **kw):
    return ParagraphStyle(name, **kw)

body    = S("body",  fontName="Helvetica",      fontSize=8.5, textColor=DARK_GREY, leading=12, spaceAfter=1)
bold    = S("bold",  fontName="Helvetica-Bold", fontSize=8.5, textColor=DARK_GREY, leading=12)
small   = S("small", fontName="Helvetica",      fontSize=7.5, textColor=MID_GREY,  leading=11)
remedy  = S("remedy",fontName="Helvetica-Bold", fontSize=8.5, textColor=MID_BLUE,  leading=12)
keynote = S("kn",    fontName="Helvetica-Oblique", fontSize=8, textColor=DARK_GREY, leading=11)
white_b = S("wb",    fontName="Helvetica-Bold", fontSize=9,   textColor=WHITE,     leading=13)
white_s = S("ws",    fontName="Helvetica",      fontSize=8,   textColor=WHITE,     leading=12)
footer  = S("foot",  fontName="Helvetica-Oblique", fontSize=7, textColor=MID_GREY, alignment=TA_CENTER)
center  = S("ctr",   fontName="Helvetica",      fontSize=8.5, textColor=DARK_GREY, alignment=TA_CENTER)

# ── Flowables ─────────────────────────────────────────────────────────────────
class HeaderBanner(Flowable):
    def __init__(self, width, height=65):
        Flowable.__init__(self)
        self.width = width
        self.height = height

    def draw(self):
        c = self.canv
        c.setFillColor(DARK_BLUE)
        c.rect(0, 0, self.width, self.height, fill=1, stroke=0)
        c.setFillColor(MID_BLUE)
        c.rect(0, 0, self.width * 0.55, self.height, fill=1, stroke=0)
        c.setFillColor(GOLD)
        c.rect(0, self.height - 4, self.width, 4, fill=1, stroke=0)
        c.rect(0, 0, self.width, 3, fill=1, stroke=0)
        # Title
        c.setFillColor(WHITE)
        c.setFont("Helvetica-Bold", 20)
        c.drawCentredString(self.width / 2, self.height - 26, "Homoeopathic Symptom-to-Remedy")
        c.setFont("Helvetica-Bold", 18)
        c.drawCentredString(self.width / 2, self.height - 44, "Reference Card")
        c.setFillColor(GOLD)
        c.setFont("Helvetica-Oblique", 9)
        c.drawCentredString(self.width / 2, self.height - 58,
            "Key remedies, guiding symptoms & potency guide  |  Based on classical materia medica")


class SectionBar(Flowable):
    def __init__(self, text, icon, width, bg=MID_BLUE, fg=WHITE):
        Flowable.__init__(self)
        self.text = text
        self.icon = icon
        self.width = width
        self.bg = bg
        self.fg = fg
        self.height = 20

    def draw(self):
        c = self.canv
        c.setFillColor(self.bg)
        c.roundRect(0, 1, self.width, self.height - 1, 4, fill=1, stroke=0)
        c.setFillColor(self.fg)
        c.setFont("Helvetica-Bold", 10.5)
        c.drawString(10, 6, f"{self.icon}  {self.text.upper()}")


# ── Remedy block builder ──────────────────────────────────────────────────────
def remedy_table(rows, col_widths):
    """rows = list of [remedy_name, guiding_symptoms, potency, modality_str]"""
    header = [
        Paragraph("Remedy", white_b),
        Paragraph("Guiding Symptoms / Keynotes", white_b),
        Paragraph("Potency", white_b),
        Paragraph("Agg / Amel", white_b),
    ]
    data = [header]
    for i, r in enumerate(rows):
        bg = CREAM if i % 2 == 0 else PALE_GREY
        data.append([
            Paragraph(r[0], remedy),
            Paragraph(r[1], keynote),
            Paragraph(r[2], S("pot", fontName="Helvetica-Bold", fontSize=8, textColor=TEAL)),
            Paragraph(r[3], small),
        ])

    t = Table(data, colWidths=col_widths)
    style = [
        ("BACKGROUND",   (0, 0), (-1, 0), MID_BLUE),
        ("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),
        ("GRID",         (0, 0), (-1, -1), 0.25, colors.HexColor("#B0BEC5")),
        ("FONTSIZE",     (0, 0), (-1, -1), 8.5),
    ]
    for i in range(1, len(data)):
        bg = CREAM if (i-1) % 2 == 0 else PALE_GREY
        style.append(("BACKGROUND", (0, i), (-1, i), bg))

    t.setStyle(TableStyle(style))
    return t


# col widths for 4-column remedy tables
CW = [3.0*cm, PAGE_W - 9.1*cm, 2.3*cm, 3.8*cm]

story = []

# ── HEADER ────────────────────────────────────────────────────────────────────
story.append(HeaderBanner(PAGE_W))
story.append(Spacer(1, 7))

# ── HOW TO USE BOX ────────────────────────────────────────────────────────────
how_text = (
    "<b>How to use this card:</b>  Identify the patient's <b>dominant symptom</b>, locate the section, "
    "then select the remedy whose <b>guiding symptoms and modalities</b> best match the totality of the case.  "
    "Potencies shown are general guides — always individualise.  "
    "<b>Q</b> = Mother Tincture &nbsp;|&nbsp; <b>c</b> = centesimal &nbsp;|&nbsp; "
    "<b>Agg</b> = worse &nbsp;|&nbsp; <b>Amel</b> = better"
)
how_t = Table([[Paragraph(how_text, S("how", fontName="Helvetica", fontSize=8.5,
    textColor=DARK_GREY, leading=12))]], colWidths=[PAGE_W])
how_t.setStyle(TableStyle([
    ("BACKGROUND",   (0, 0), (-1, -1), colors.HexColor("#E3F2FD")),
    ("LEFTPADDING",  (0, 0), (-1, -1), 10),
    ("RIGHTPADDING", (0, 0), (-1, -1), 10),
    ("TOPPADDING",   (0, 0), (-1, -1), 6),
    ("BOTTOMPADDING",(0, 0), (-1, -1), 6),
    ("BOX",          (0, 0), (-1, -1), 0.5, ACCENT_BLUE),
    ("ROUNDEDCORNERS", [4]),
]))
story.append(how_t)
story.append(Spacer(1, 8))

# ═══════════════════════════════════════════════════════════════════════════════
# 1. FEVER
# ═══════════════════════════════════════════════════════════════════════════════
story.append(KeepTogether([
    SectionBar("1. Fever & High Temperature", "🌡", PAGE_W, bg=RED),
    Spacer(1, 3),
    remedy_table([
        ["Aconitum nap.", "Sudden high fever; dry burning heat; after cold wind/fright; restlessness; great fear",
         "30c / 200c", "Agg: night, cold wind\nAmel: open air, rest"],
        ["Belladonna", "Intense burning heat; flushed face; throbbing headache; dilated pupils; delirium",
         "30c / 200c", "Agg: touch, light, noise\nAmel: semi-erect posture"],
        ["Ferrum phos.", "Early stage fever; no clear exciting cause; slow onset; mild; anaemic patient",
         "6x / 30c", "Agg: night, right side\nAmel: cold applications"],
        ["Bryonia alba", "Slow onset; intense thirst for cold water; bursting headache; lies still",
         "30c", "Agg: motion, warmth\nAmel: pressure, rest, cold"],
        ["Nux vomica", "Chilly fever; can't uncover; shivering even near heat; gastric origin",
         "30c", "Agg: cold, morning\nAmel: warmth, wrapping up"],
        ["Rhus tox.", "Restlessness; better moving; typhoid-like; tongue: red-tipped triangle",
         "30c", "Agg: rest, cold-wet\nAmel: motion, warmth"],
        ["Arsenicum alb.", "Burning fever; midnight aggravation; restlessness; great anxiety; thirst for sips",
         "30c / 200c", "Agg: 1–3 am, cold\nAmel: warmth, company"],
        ["Gelsemium", "Dull, drowsy, dazed; low-grade fever; no thirst; influenza type; trembling",
         "30c", "Agg: damp heat, fright\nAmel: urination, stimulants"],
    ], CW)
]))
story.append(Spacer(1, 7))

# ═══════════════════════════════════════════════════════════════════════════════
# 2. COUGH
# ═══════════════════════════════════════════════════════════════════════════════
story.append(KeepTogether([
    SectionBar("2. Cough & Respiratory", "🫁", PAGE_W, bg=TEAL),
    Spacer(1, 3),
    remedy_table([
        ["Drosera", "Paroxysmal, spasmodic, whooping cough; retching after cough; hoarse voice",
         "30c / 200c", "Agg: after midnight, lying\nAmel: open air, sitting"],
        ["Spongia tosta", "Croup; dry, barking, saw-like cough; worse before midnight; laryngeal dryness",
         "30c", "Agg: before midnight, excitement\nAmel: eating, bending head forward"],
        ["Hepar sulph.", "Croupy rattling cough; very sensitive to cold air; purulent expectoration",
         "30c", "Agg: cold air, uncovering\nAmel: warmth, wrapping neck"],
        ["Antimonium tart.", "Rattling mucus in chest; too weak to expectorate; drowsy; nausea",
         "30c", "Agg: 3 am, damp cold\nAmel: sitting up, expectoration"],
        ["Ipecacuanha", "Continuous nausea with cough; spasmodic; clean tongue; much mucus",
         "30c", "Agg: eating, motion\nAmel: rest, open air"],
        ["Phosphorus", "Hard, dry, racking cough; tightness in chest; blood-streaked sputum; craves cold water",
         "30c / 200c", "Agg: cold air, lying left\nAmel: cold water, sleep"],
        ["Rumex crispus", "Tickling cough on inspiring cold air; covers mouth to warm air",
         "30c", "Agg: cold air, uncovering\nAmel: warmth, covering mouth"],
        ["Bryonia alba", "Dry, painful cough; holds chest; worse after entering warm room; thirsty",
         "30c", "Agg: motion, warm room\nAmel: rest, cold drinks"],
    ], CW)
]))
story.append(Spacer(1, 7))

# ═══════════════════════════════════════════════════════════════════════════════
# 3. HEADACHE / MIGRAINE
# ═══════════════════════════════════════════════════════════════════════════════
story.append(KeepTogether([
    SectionBar("3. Headache & Migraine", "🧠", PAGE_W, bg=PURPLE),
    Spacer(1, 3),
    remedy_table([
        ["Belladonna", "Throbbing, bursting; sudden onset; congested face; worse light/noise/jar",
         "30c / 200c", "Agg: light, noise, jar\nAmel: pressure, dark, rest"],
        ["Nux vomica", "Morning headache from overwork, alcohol, coffee; vertex or occiput; constipation",
         "30c", "Agg: morning, stimulants\nAmel: lying down, warmth"],
        ["Gelsemium", "Dull, heavy band around head; starts occiput → forehead; blurred vision preceding",
         "30c", "Agg: damp, excitement\nAmel: profuse urination"],
        ["Iris versicolor", "Migraine with visual aura; burning vomiting; right side; periodic",
         "30c / 200c", "Agg: rest, weekends\nAmel: motion, open air"],
        ["Sanguinaria", "Right-sided; over eye; periodic; climacteric; preceded by flickering",
         "30c / 200c", "Agg: right side, motion\nAmel: vomiting, sleep"],
        ["Spigelia", "Left-sided; neuralgic; around eyeball; palpitation with headache",
         "30c", "Agg: motion, noise\nAmel: cold washing, rest"],
        ["Cactus gran.", "Constricting band; as if head in vice; with palpitation",
         "30c", "Agg: 11 am, lying\nAmel: open air"],
        ["Coffea cruda", "Nervous headache from excitement, over-joy, coffee; hypersensitive scalp",
         "30c", "Agg: noise, odours\nAmel: warmth"],
    ], CW)
]))
story.append(Spacer(1, 7))

# ═══════════════════════════════════════════════════════════════════════════════
# 4. DIARRHOEA
# ═══════════════════════════════════════════════════════════════════════════════
story.append(KeepTogether([
    SectionBar("4. Diarrhoea & Gastroenteritis", "🫄", PAGE_W, bg=ORANGE),
    Spacer(1, 3),
    remedy_table([
        ["Arsenicum alb.", "Frequent, offensive, burning stools; great exhaustion; anxiety; thirst for sips; midnight agg.",
         "30c / 200c", "Agg: midnight, cold food\nAmel: warmth, hot drinks"],
        ["Veratrum alb.", "Profuse watery diarrhoea with vomiting; cold sweat on forehead; collapse",
         "30c", "Agg: drinking, motion\nAmel: warmth"],
        ["Podophyllum", "Profuse, gushing, painless, yellow-green; morning (5–10 am); gurgling before",
         "30c", "Agg: morning, teething\nAmel: lying on abdomen"],
        ["Aloe soc.", "Urgency; hurries to toilet; uncertainty; jelly-like stool; sedentary persons",
         "30c", "Agg: morning, hot weather\nAmel: cold application"],
        ["Croton tig.", "Yellowish watery; sudden gush; after eating/drinking anything",
         "30c", "Agg: eating, drinking\nAmel: rest"],
        ["Chamomilla", "Green, slimy, hot, offensive (like rotten eggs); from anger or dentition in children",
         "30c", "Agg: anger, teething\nAmel: being carried"],
        ["Nux vomica", "Frequent, scanty, ineffectual; after rich food or alcohol; worse morning",
         "30c", "Agg: morning, cold\nAmel: warmth, rest"],
        ["Sulphur", "Offensive; drives out of bed at 5 am; prolapsed feeling; burning anus",
         "30c", "Agg: 5 am, warm bed\nAmel: open air"],
    ], CW)
]))
story.append(Spacer(1, 7))

# ═══════════════════════════════════════════════════════════════════════════════
# 5. ANXIETY & MENTAL COMPLAINTS
# ═══════════════════════════════════════════════════════════════════════════════
story.append(KeepTogether([
    SectionBar("5. Anxiety, Fear & Mental Complaints", "🧘", PAGE_W, bg=colors.HexColor("#4527A0")),
    Spacer(1, 3),
    remedy_table([
        ["Arsenicum alb.", "Intense anxiety with restlessness; fear of death; cannot be alone; midnight panic",
         "30c / 200c", "Agg: midnight, alone\nAmel: company, warmth"],
        ["Aconitum nap.", "Sudden panic attack; fear of death; after fright/shock; palpitation; numbness",
         "200c / 1M", "Agg: night, fright\nAmel: open air"],
        ["Argentum nit.", "Anticipatory anxiety; diarrhoea before exams/events; hurried; fears height",
         "30c / 200c", "Agg: heat, crowds\nAmel: cold, open air"],
        ["Ignatia amara", "Grief; suppressed emotions; sighing; hysterical; contradictory symptoms",
         "200c / 1M", "Agg: consolation, coffee\nAmel: eating, alone"],
        ["Natrum mur.", "Introversion; dwells on past grief; weeps alone; craves salt; aversion to consolation",
         "200c / 1M", "Agg: heat, consolation\nAmel: open air, alone"],
        ["Lycopodium", "Lack of confidence; cowardly; bossy at home; fear of public speaking; GI bloating",
         "200c / 1M", "Agg: 4–8 pm, pressure\nAmel: motion, warm drinks"],
        ["Kali phos.", "Nervous exhaustion; brain fatigue; sleeplessness from worry; student's remedy",
         "6x / 30c", "Agg: mental exertion\nAmel: rest, nourishment"],
        ["Phosphorus", "Anxious about others; nervous; sensitive to sensory impressions; craves company",
         "30c / 200c", "Agg: thunderstorm, alone\nAmel: company, cold drinks"],
    ], CW)
]))
story.append(Spacer(1, 7))

# ═══════════════════════════════════════════════════════════════════════════════
# 6. INSOMNIA
# ═══════════════════════════════════════════════════════════════════════════════
story.append(KeepTogether([
    SectionBar("6. Insomnia & Sleep Disturbances", "🌙", PAGE_W, bg=colors.HexColor("#1A237E")),
    Spacer(1, 3),
    remedy_table([
        ["Coffea cruda", "Sleeplessness from mental activity; rush of ideas; over-elation; hyperacuity",
         "30c / 200c", "Agg: joy, noise, coffee\nAmel: warmth"],
        ["Nux vomica", "Falls asleep early; wakes 3–4 am; anxious thoughts; sleepy after meals",
         "30c", "Agg: 3–4 am, cold\nAmel: warmth, later morning"],
        ["Arsenicum alb.", "Restless, anxious; midnight waking; changes position constantly",
         "30c / 200c", "Agg: midnight–2 am\nAmel: warmth, company"],
        ["Ignatia amara", "Sleeplessness from grief or emotional shock; yawning without sleep",
         "200c", "Agg: after grief, coffee\nAmel: eating"],
        ["Passiflora inc.", "Restless, wakeful; overworked mind; nervous exhaustion; good for infants",
         "Q / 3x", "Agg: mental exertion\nAmel: rest"],
        ["Kali phos.", "From nervous exhaustion; brain-fag; exam stress; over-study",
         "6x / 30c", "Agg: worry, exertion\nAmel: rest, food"],
        ["Chamomilla", "Sleeplessness in children; extreme irritability; demands to be carried",
         "30c", "Agg: anger, teething\nAmel: being carried"],
        ["Hyoscyamus", "Starts from sleep; twitching; loquacious delirium; suspicious",
         "30c / 200c", "Agg: jealousy, night\nAmel: stooping"],
    ], CW)
]))
story.append(Spacer(1, 7))

# ═══════════════════════════════════════════════════════════════════════════════
# 7. SKIN COMPLAINTS
# ═══════════════════════════════════════════════════════════════════════════════
story.append(KeepTogether([
    SectionBar("7. Skin Complaints & Eruptions", "🩹", PAGE_W, bg=colors.HexColor("#BF360C")),
    Spacer(1, 3),
    remedy_table([
        ["Sulphur", "Itching; burning; worse heat/washing; unhealthy skin; all eruptions suppressed",
         "30c / 200c", "Agg: heat, washing, night\nAmel: open air, dry"],
        ["Graphites", "Thick, honey-like exudate; cracks in folds; oozing behind ears; obese patient",
         "30c / 200c", "Agg: warmth, night\nAmel: open air, dark"],
        ["Mezereum", "Intense itching; thick leather-like crusts; pus beneath; worse at night in bed",
         "30c", "Agg: cold air, night\nAmel: warmth"],
        ["Rhus tox.", "Vesicular eruption; burning-itching; red, swollen; urticaria; worse cold/wet",
         "30c", "Agg: cold, rest\nAmel: warmth, motion"],
        ["Urtica urens", "Urticaria; burning-stinging; after shellfish; blotchy; prickly heat",
         "Q / 30c", "Agg: cold bathing, snow air\nAmel: warmth"],
        ["Arsenicum alb.", "Dry, rough, scaly; burning but > warmth; psoriasis type; anxiety with eruptions",
         "30c / 200c", "Agg: cold, midnight\nAmel: warmth"],
        ["Petroleum", "Deep cracks; bleeding fissures in winter; rough dry skin; hands/feet; eczema",
         "30c", "Agg: winter, cold\nAmel: warmth, dry weather"],
        ["Antimonium crud.", "Horny thickened skin; warts; calluses; coated white tongue; irritable child",
         "30c / 200c", "Agg: heat, cold bathing\nAmel: rest"],
    ], CW)
]))
story.append(Spacer(1, 7))

# ═══════════════════════════════════════════════════════════════════════════════
# 8. JOINT & RHEUMATIC PAIN
# ═══════════════════════════════════════════════════════════════════════════════
story.append(KeepTogether([
    SectionBar("8. Joint Pain, Rheumatism & Neuralgia", "🦴", PAGE_W, bg=GREEN),
    Spacer(1, 3),
    remedy_table([
        ["Rhus tox.", "Stiffness worse on first motion, better continued motion; worse damp-cold; tearing pains",
         "30c / 200c", "Agg: rest, cold-wet\nAmel: motion, warmth"],
        ["Bryonia alba", "Opposite of Rhus: worse any motion; better absolute rest and firm pressure",
         "30c", "Agg: least motion\nAmel: rest, pressure, cold"],
        ["Arnica montana", "After injury/overexertion; bruised, sore feeling; refuses to be touched",
         "30c / 200c", "Agg: touch, motion\nAmel: rest, lying"],
        ["Colchicum", "Gout; worse slightest touch; cold joints; cannot bear smell of food; white deposits",
         "30c", "Agg: touch, motion, autumn\nAmel: warmth, rest"],
        ["Causticum", "Tearing, drawing pains; better warmth and wet weather; deformities; contractures",
         "30c / 200c", "Agg: dry cold, clear weather\nAmel: damp, warmth"],
        ["Calcarea fluor.", "Hard nodular joints; cracking; chronic with exostoses; fibrotic changes",
         "6x / 30c", "Agg: rest, damp\nAmel: heat, motion"],
        ["Ledum pal.", "Cold joints but relieved by cold; puncture wounds; upward-spreading joint pains",
         "30c", "Agg: warmth, night\nAmel: cold applications, cold water"],
        ["Hypericum", "Nerve pain after injury; lacerations to nerve-rich areas; shooting pains",
         "30c / 200c", "Agg: cold, damp, touch\nAmel: bending head back"],
    ], CW)
]))
story.append(Spacer(1, 7))

# ═══════════════════════════════════════════════════════════════════════════════
# 9. DIGESTIVE / GASTRIC
# ═══════════════════════════════════════════════════════════════════════════════
story.append(KeepTogether([
    SectionBar("9. Gastric & Digestive Complaints", "🫃", PAGE_W, bg=colors.HexColor("#004D40")),
    Spacer(1, 3),
    remedy_table([
        ["Nux vomica", "Nausea/vomiting from excess; sour taste; constipation with ineffectual urging",
         "30c", "Agg: morning, cold, stimulants\nAmel: warmth, evening"],
        ["Lycopodium", "Bloating; distension after small quantities; 4–8 pm agg.; craves sweets",
         "30c / 200c", "Agg: 4–8 pm, tight clothing\nAmel: warm drinks, belching"],
        ["Carbo veg.", "Simplest food disagrees; flatulence; faint; wants to be fanned; slow digestion",
         "30c", "Agg: fatty food, evening\nAmel: belching, being fanned"],
        ["Pulsatilla", "Nausea; rich food disagrees; no thirst; shifting pains; worse fatty/cold food",
         "30c / 200c", "Agg: fatty food, evening\nAmel: cold, open air"],
        ["Natrum phos.", "Acid dyspepsia; sour eructations; heartburn; golden-yellow tongue coating",
         "6x / 30c", "Agg: sour food, morning\nAmel: cold"],
        ["Argentum nit.", "Gastritis; belching; great distension; craves sugar (disagrees); anticipatory nausea",
         "30c", "Agg: sugar, anxiety\nAmel: cold, belching"],
        ["China off.", "Painless distension; flatulence not better by belching; after loss of fluids",
         "30c", "Agg: touch, alternate days\nAmel: pressure, warmth"],
        ["Ipecacuanha", "Persistent nausea NOT relieved by vomiting; clean tongue; bleeding tendency",
         "30c", "Agg: eating, motion\nAmel: rest, open air"],
    ], CW)
]))
story.append(Spacer(1, 7))

# ═══════════════════════════════════════════════════════════════════════════════
# 10. URINARY
# ═══════════════════════════════════════════════════════════════════════════════
story.append(KeepTogether([
    SectionBar("10. Urinary Complaints", "💧", PAGE_W, bg=colors.HexColor("#006064")),
    Spacer(1, 3),
    remedy_table([
        ["Cantharis", "Intense burning before/during/after urination; intolerable urgency; drop by drop",
         "30c / 200c", "Agg: urinating, cold water\nAmel: warm applications"],
        ["Apis mel.", "Burning, stinging; oedema; no thirst; scanty; last drops burn intensely",
         "30c / 200c", "Agg: heat, pressure\nAmel: cold, open air"],
        ["Sarsaparilla", "Terrible pain at END of urination; white sand in urine; right-sided renal colic",
         "30c", "Agg: end of urination\nAmel: standing posture"],
        ["Berberis vulg.", "Radiating pains from kidney; bubbling sensation left kidney; brick-red sediment",
         "Q / 30c", "Agg: motion, jarring\nAmel: rest"],
        ["Lycopodium", "Right-sided renal colic; red sand (uric acid) in urine; 4–8 pm agg.",
         "30c / 200c", "Agg: 4–8 pm, pressure\nAmel: warmth, motion"],
        ["Equisetum", "Dull pain in bladder not relieved by urination; incontinence during dreams",
         "30c", "Agg: motion\nAmel: firm pressure"],
        ["Causticum", "Involuntary urination on coughing/sneezing; retention from paralysis; older women",
         "30c / 200c", "Agg: coughing, cold\nAmel: warmth"],
        ["Pareira brava", "Prostatic; constant urge; must kneel to urinate; pain to thighs",
         "Q / 30c", "Agg: standing, walking\nAmel: kneeling posture"],
    ], CW)
]))
story.append(Spacer(1, 7))

# ═══════════════════════════════════════════════════════════════════════════════
# POTENCY QUICK-GUIDE
# ═══════════════════════════════════════════════════════════════════════════════
story.append(KeepTogether([
    SectionBar("Potency Quick-Guide", "⚗", PAGE_W, bg=DARK_BLUE),
    Spacer(1, 4),
]))

potency_data = [
    ["Potency", "Sphere of Action", "Typical Use", "Frequency"],
    ["Q (Ø)\nMother Tincture", "Physiological / organ\nsupport", "Drainage, functional\ncomplaints, first-line", "3–5 drops in water\n2–3×/day"],
    ["6x / 12x\n(Tissue salts)", "Biochemic / cellular\nreplenishment", "Mineral deficiency states,\nchronic low-grade issues", "4–6 tablets\n3–4×/day"],
    ["6c / 12c\n(Low centesimal)", "Physical sphere;\nfunctional pathology", "Acute complaints;\npatients new to homeopathy", "3–5 pills\n3×/day acute"],
    ["30c\n(Medium)", "Physical + mental;\nmost common acute/chronic", "Standard prescription;\nfirst prescription in practice", "3–5 pills 2–3×/day acute;\n1×/day chronic"],
    ["200c\n(High)", "Mental-emotional;\nconstitutional layer", "Recurrent / chronic;\nwell-matched constitutional rx", "Single dose;\nrepeat weekly or monthly"],
    ["1M / 10M\n(Very High)", "Deep constitutional;\nmiasmatic clearance", "Long-standing chronic;\nspecialist prescribing only", "Single dose;\nmonthly or as needed"],
]

pg_data = []
for i, row in enumerate(potency_data):
    pg_data.append([Paragraph(c, S("ph", fontName="Helvetica-Bold" if i == 0 else
        ("Helvetica-Bold" if j == 0 else "Helvetica"),
        fontSize=8.5 if i > 0 else 9,
        textColor=WHITE if i == 0 else (TEAL if j == 0 else DARK_GREY),
        leading=12)) for j, c in enumerate(row)])

pg_t = Table(pg_data, colWidths=[2.8*cm, 3.8*cm, PAGE_W - 10.5*cm, 3.9*cm])
pg_style = [
    ("BACKGROUND",   (0, 0), (-1, 0), DARK_BLUE),
    ("TEXTCOLOR",    (0, 0), (-1, 0), WHITE),
    ("VALIGN",       (0, 0), (-1, -1), "MIDDLE"),
    ("LEFTPADDING",  (0, 0), (-1, -1), 6),
    ("RIGHTPADDING", (0, 0), (-1, -1), 6),
    ("TOPPADDING",   (0, 0), (-1, -1), 5),
    ("BOTTOMPADDING",(0, 0), (-1, -1), 5),
    ("GRID",         (0, 0), (-1, -1), 0.3, colors.HexColor("#B0BEC5")),
]
for i in range(1, len(pg_data)):
    bg = CREAM if i % 2 == 1 else PALE_GREY
    pg_style.append(("BACKGROUND", (0, i), (-1, i), bg))
pg_t.setStyle(TableStyle(pg_style))
story.append(pg_t)
story.append(Spacer(1, 8))

# ── FOOTER ────────────────────────────────────────────────────────────────────
story.append(HRFlowable(width=PAGE_W, thickness=0.5, color=ACCENT_BLUE))
story.append(Spacer(1, 3))
story.append(Paragraph(
    "Sources: Boericke's Materia Medica with Repertory | Clarke's Dictionary of Practical Materia Medica | "
    "Kent's Repertory | Allen's Keynotes | Murphy's Lotus Materia Medica | Nash's Leaders",
    footer))
story.append(Paragraph(
    "For educational reference only. All clinical prescriptions must be individualised by a qualified homoeopathic practitioner.",
    S("disc", fontName="Helvetica-BoldOblique", fontSize=7.5,
      textColor=RED, alignment=TA_CENTER, spaceBefore=2)))

doc.build(story)
print(f"PDF generated: {OUTPUT}")
Running Command

cd /home/daytona/workspace/ilex-card && python generate_symptom_card.py 2>&1

Running Command

ls -lh /home/daytona/workspace/ilex-card/Homoeopathy_Symptom_Remedy_Reference.pd…

Your reference card is ready:

Homoeopathy Symptom Remedy Reference

PDF Document · PDF


What's inside - 10 symptom sections, 80 remedies total:
#SectionKey Remedies Covered
1Fever & High TemperatureAconitum, Belladonna, Ferrum phos, Bryonia, Gelsemium, Arsenicum, Rhus tox, Nux vom
2Cough & RespiratoryDrosera, Spongia, Hepar sulph, Antimonium tart, Ipecac, Phosphorus, Rumex, Bryonia
3Headache & MigraineBelladonna, Gelsemium, Iris v., Sanguinaria, Spigelia, Nux vom, Coffea, Cactus
4Diarrhoea & GastroenteritisArsenicum, Veratrum, Podophyllum, Aloe, Chamomilla, Croton tig, Sulphur, Nux vom
5Anxiety, Fear & MentalArsenicum, Aconitum, Argentum nit., Ignatia, Natrum mur., Lycopodium, Kali phos, Phosphorus
6Insomnia & SleepCoffea, Nux vom, Arsenicum, Ignatia, Passiflora, Chamomilla, Hyoscyamus, Kali phos
7Skin ComplaintsSulphur, Graphites, Mezereum, Rhus tox, Urtica, Arsenicum, Petroleum, Antimonium crud
8Joint Pain & RheumatismRhus tox, Bryonia, Arnica, Colchicum, Causticum, Ledum, Hypericum, Calc fluor
9Gastric & DigestiveNux vom, Lycopodium, Carbo veg, Pulsatilla, Nat phos, Argentum nit., China, Ipecac
10Urinary ComplaintsCantharis, Apis, Sarsaparilla, Berberis, Lycopodium, Causticum, Equisetum, Pareira
Each remedy entry includes guiding/keynote symptoms, recommended potency, and aggravation/amelioration modalities. A Potency Quick-Guide table (Q through 1M) is included at the end.
This is a shared conversation. Sign in to Orris to start your own chat.