Make a word presentation on the topic kustha nidana in Ayurveda and modern correlation with full explaination from different Samhita and different tikakars

Reading File
Reading File
Finding Sources
Searching the Web

Kustha Nidana Ayurveda Charaka Sushruta Ashtanga Hridayam different Samhita Tikakars modern correlation skin disease

Reading Web Page

https://www.ijfans.org/uploads/paper/f9562f2edce69d17c2cceab…

Finding Sources
Running Command

ls -la /tmp/workspace/ 2>/dev/null || mkdir -p /tmp/workspace && echo "Created workspace"

Running Command

mkdir -p /tmp/workspace/kustha-nidana && echo "Directory ready"

Writing File

~/kustha-nidana/create_kustha_doc.py

from docx import Document
from docx.shared import Pt, Inches, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
import copy

doc = Document()

# ── Page margins ──────────────────────────────────────────────────────────────
from docx.shared import Inches as In
section = doc.sections[0]
section.top_margin    = In(1)
section.bottom_margin = In(1)
section.left_margin   = In(1.2)
section.right_margin  = In(1.2)

# ── Default font ──────────────────────────────────────────────────────────────
style = doc.styles["Normal"]
style.font.name = "Times New Roman"
style.font.size = Pt(12)

# ── Helper: add shaded heading paragraph ─────────────────────────────────────
def add_shaded_heading(doc, text, level=1, shade_hex="1F3864"):
    p = doc.add_heading(text, level=level)
    p.alignment = WD_ALIGN_PARAGRAPH.CENTER if level == 1 else WD_ALIGN_PARAGRAPH.LEFT
    for run in p.runs:
        run.font.color.rgb = RGBColor(0xFF, 0xFF, 0xFF)
        run.font.bold = True
        run.font.name = "Times New Roman"
    # background shading
    pPr = p._p.get_or_add_pPr()
    shd = OxmlElement("w:shd")
    shd.set(qn("w:val"), "clear")
    shd.set(qn("w:color"), "auto")
    shd.set(qn("w:fill"), shade_hex)
    pPr.append(shd)
    return p

def add_subheading(doc, text, level=2):
    p = doc.add_heading(text, level=level)
    p.alignment = WD_ALIGN_PARAGRAPH.LEFT
    for run in p.runs:
        run.font.color.rgb = RGBColor(0x1F, 0x38, 0x64)
        run.font.bold = True
        run.font.name = "Times New Roman"
        run.font.size = Pt(13)
    return p

def add_body(doc, text):
    p = doc.add_paragraph(text)
    p.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
    for run in p.runs:
        run.font.name = "Times New Roman"
        run.font.size = Pt(12)
    p.paragraph_format.space_after = Pt(6)
    return p

def add_bullet(doc, text, bold_prefix=None):
    p = doc.add_paragraph(style="List Bullet")
    p.paragraph_format.space_after = Pt(4)
    if bold_prefix:
        run = p.add_run(bold_prefix + ": ")
        run.bold = True
        run.font.name = "Times New Roman"
        run.font.size = Pt(12)
        run2 = p.add_run(text)
        run2.font.name = "Times New Roman"
        run2.font.size = Pt(12)
    else:
        run = p.add_run(text)
        run.font.name = "Times New Roman"
        run.font.size = Pt(12)
    return p

def add_italic(doc, text):
    p = doc.add_paragraph()
    run = p.add_run(text)
    run.italic = True
    run.font.name = "Times New Roman"
    run.font.size = Pt(11.5)
    p.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
    p.paragraph_format.space_after = Pt(6)
    return p

def add_table_row(table, label, value):
    row = table.add_row()
    row.cells[0].text = label
    row.cells[1].text = value
    row.cells[0].paragraphs[0].runs[0].bold = True

# ══════════════════════════════════════════════════════════════════════════════
# TITLE PAGE
# ══════════════════════════════════════════════════════════════════════════════
title_p = doc.add_paragraph()
title_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
title_run = title_p.add_run("KUSTHA NIDANA")
title_run.bold = True
title_run.font.size = Pt(28)
title_run.font.name = "Times New Roman"
title_run.font.color.rgb = RGBColor(0x1F, 0x38, 0x64)

sub_p = doc.add_paragraph()
sub_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
sub_run = sub_p.add_run("Ayurvedic Etiology & Modern Correlation")
sub_run.bold = True
sub_run.font.size = Pt(18)
sub_run.font.name = "Times New Roman"
sub_run.font.color.rgb = RGBColor(0x8B, 0x00, 0x00)

doc.add_paragraph()

desc_p = doc.add_paragraph()
desc_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
desc_run = desc_p.add_run(
    "A Comprehensive Study from Brihattrayi, Laghutrayi,\n"
    "Commentaries (Tikakars) & Modern Dermatology"
)
desc_run.font.size = Pt(14)
desc_run.font.name = "Times New Roman"
desc_run.italic = True

doc.add_paragraph()
doc.add_paragraph()

info_p = doc.add_paragraph()
info_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
info_run = info_p.add_run("Prepared for Academic and Clinical Reference\nAyurveda — Nidana Chikitsa Department")
info_run.font.size = Pt(12)
info_run.font.name = "Times New Roman"

doc.add_page_break()

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 1 — INTRODUCTION
# ══════════════════════════════════════════════════════════════════════════════
add_shaded_heading(doc, "1. INTRODUCTION", level=1)
add_body(doc,
    "The word 'Kustha' (also spelled Kushtha or Kushta) is derived from the Sanskrit root "
    "'kush' meaning 'to afflict the skin'. In classical Ayurvedic texts, Kustha is used as a "
    "collective term for all types of skin diseases — ranging from minor dermatological "
    "conditions to severe systemic disorders with cutaneous manifestations. It is one of the "
    "most elaborately described diseases in the entire corpus of Ayurvedic literature."
)
add_body(doc,
    "The scope of Kustha in Ayurveda is far broader than the modern understanding of leprosy "
    "(Hansen's disease), with which it is often equated. Ayurvedic classics recognise Kustha "
    "as encompassing psoriasis, eczema, vitiligo, fungal infections, scabies, melasma, "
    "and many other dermatoses. The Nidana (aetiology) of Kustha has been described in great "
    "detail by the great Acharyas — Charaka, Sushruta, Vagbhata, and others — with "
    "commentators (Tikakars) providing valuable interpretive insights."
)
add_body(doc,
    "References in Vedic literature: The earliest mention of skin diseases is found in "
    "Atharvaveda (700 BCE approximately), where conditions resembling leprosy are described "
    "as 'Kilasa'. The Rigveda also mentions skin afflictions. By the Samhita period, these "
    "concepts were systematically compiled and scientifically elaborated."
)

doc.add_paragraph()

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 2 — ETYMOLOGY AND DEFINITION
# ══════════════════════════════════════════════════════════════════════════════
add_shaded_heading(doc, "2. ETYMOLOGY & DEFINITION OF KUSTHA", level=1)

add_subheading(doc, "2.1 Nirukti (Etymology)")
add_italic(doc, '"Kushyate tvak anena iti Kushtham" — That which afflicts/destroys the skin is called Kustha.')
add_body(doc,
    "The term carries a dual meaning: the disease that destroys (kushyate) the normal "
    "texture, colour and integrity of the skin. All commentators unanimously agree on this "
    "root derivation."
)

add_subheading(doc, "2.2 Charaka Samhita Definition (Ni. 5/3–6)")
add_italic(doc,
    '"Tatredam sarva-kustha-nidanam samasenopadeksyamah: shitoshna-vyatyasam iha "  '
    '"upasevya tatha santapavanapatanam…" — Charaka Nidana Sthana 5/6'
)
add_body(doc,
    "Charaka defines Kustha as a disease produced by simultaneous vitiation of Tridosha "
    "(Vata, Pitta, Kapha) along with the four Dushyas — Tvaka (skin), Rakta (blood), "
    "Mamsa (muscle tissue) and Lasika (lymph/plasma). This seven-factor (Sapta-dravya) "
    "framework is unique to Charaka's pathophysiological model."
)

add_subheading(doc, "2.3 Sushruta Samhita Definition (Ni. 5/5)")
add_italic(doc,
    '"Kushtha is found in the Tamra and Vedini layers of the skin" — Sushruta Nidana Sthana 5/5'
)
add_body(doc,
    "Sushruta defines Kustha from an anatomical perspective, correlating the disease to the "
    "seven layers of skin (Sapta Tvak): Avabhasini, Lohita, Shweta, Tamra, Vedini, "
    "Rohini, and Mamsadhara. He emphasises Rakta (blood) as the primary Dushya and "
    "classifies Kustha as a 'Raktaja Vikara' (blood-originated disorder)."
)

add_subheading(doc, "2.4 Ashtanga Hridayam Definition (Ni. 14/1–3)")
add_body(doc,
    "Vagbhata synthesises both Charaka's Dosha-Dushya model and Sushruta's anatomical "
    "framework. He emphasises Pitta as the leading Dosha in Kustha pathogenesis, consistent "
    "with the inflammatory nature of most skin diseases. Vagbhata's definition includes: "
    "vitiation of Tridosha + Tvaka, Rakta, Mamsa, Lasika = Kustha."
)

add_subheading(doc, "2.5 Madhava Nidana (Madhukosha Commentary)")
add_body(doc,
    "Madhavakara (9th century CE) in his Madhava Nidana dedicates a full chapter to Kustha "
    "Nidana. His commentator Vijayarakshita (Madhukosha Tika) elaborates that Kustha is "
    "'Sarva-dosha-samuttha' (arising from all three doshas) but with varying dominant dosha "
    "depending upon the type of Kustha."
)

doc.add_paragraph()

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 3 — NIDANA (AETIOLOGY)
# ══════════════════════════════════════════════════════════════════════════════
add_shaded_heading(doc, "3. NIDANA (AETIOLOGY / CAUSATIVE FACTORS)", level=1)

add_subheading(doc, "3.1 General Nidana — Charaka Samhita (Ni. 5/3–8)")
add_body(doc,
    "Charaka enumerates the following causative factors for Kustha in Nidana Sthana, "
    "Chapter 5:"
)
bullets_charaka = [
    ("Viruddhahara", "Intake of incompatible food combinations — e.g., milk with fish (Matsya-Dugdha Viruddha), salt with milk, fruit with milk"),
    ("Snigdha-Guru Pana", "Consumption of excessively unctuous and heavy-to-digest foods and drinks"),
    ("Vega-Dharana", "Suppression of natural urges (vomiting, defecation, urination, etc.)"),
    ("Vyayama after heavy meals", "Physical exercise immediately after eating or in excessive heat (Santapa-Vyana)"),
    ("Shita-Ushna Vyatyasa", "Haphazard alternation between hot and cold diet/exposure — taking cold water immediately after sun exposure, exertion, or fright"),
    ("Atapa-Sevana", "Excessive exposure to the sun and fire (Santapana)"),
    ("Nava-Dhanya", "Excessive consumption of new grains"),
    ("Mithya-Yoga", "Improper use of Panchakarma procedures — Vamana, Virechana, Nasya"),
    ("Papakarma", "Sinful acts and disrespect towards teachers, gods and elders (considered a Papakarmaja Vyadhi)"),
    ("Diva-Svapna", "Daytime sleeping, especially after heavy meals"),
    ("Abhishyandi Ahara", "Intake of food that causes obstruction in channels (Srotas) — heavy, cold, slimy foods"),
    ("Kulaja Nidana", "Hereditary/genetic predisposition — Charaka mentions 'Bijadosha' (defect in reproductive tissue/DNA) as a cause"),
    ("Manasika Nidana", "Mental factors — grief, fear, anger, lust contributing to disease through Tridosha imbalance"),
]
for bold, rest in bullets_charaka:
    add_bullet(doc, rest, bold_prefix=bold)

doc.add_paragraph()
add_subheading(doc, "3.2 Charaka's Commentary by Chakrapani Datta (Ayurveda Dipika Tika)")
add_body(doc,
    "Chakrapani Datta (11th century CE) in his 'Ayurveda Dipika' commentary on Charaka Samhita "
    "provides important interpretations:"
)
add_bullet(doc, "He clarifies 'Viruddha Ahara' as not merely incompatible food combinations but also "
    "food eaten at the wrong time (Kala Viruddha) and in wrong quantity (Matra Viruddha).")
add_bullet(doc, "On 'Kulaja Vikara', Chakrapani explains that the disease is transmitted through Beeja "
    "(seed = genetic material) and can affect successive generations — a remarkably modern insight "
    "paralleling genetic inheritance of skin conditions like psoriasis and ichthyosis.")
add_bullet(doc, "He interprets 'Vega-Dharana' as causing Apana-Vata disturbance, which then spreads "
    "upward and corrupts Pitta and Kapha, ultimately reaching the skin.")

doc.add_paragraph()
add_subheading(doc, "3.3 Sushruta Samhita Nidana (Ni. 5/1–10)")
add_body(doc,
    "Sushruta describes Kustha Nidana in Nidana Sthana, Chapter 5. His approach is more "
    "anatomically oriented:"
)
bullets_sushruta = [
    ("Doshaja Hetu", "Vitiation of Pitta and Kapha — these vitiated doshas reach the 'tiryakvaha srotas' (obliquely running channels of the skin), scatter in all directions, and produce Kustha"),
    ("Raktavaha Srotas Dushti", "Impurities in the blood-carrying channels — Sushruta is unique in emphasising Rakta (blood) as a primary Dushya, classifying Kustha as a Rakta-pradoshaja vikara"),
    ("Aupasargika Karana", "Contagious/communicable etiology — Sushruta is the FIRST in medical history to describe the communicable nature of leprosy (specifically Kushtha), noting transmission through direct contact, sharing of clothes, bodily contact, inhalation near patients"),
    ("Krimi-Sambhava", "Role of microorganisms (Krimi) — Sushruta acknowledges Krimi as causative agents in certain types of Kustha, particularly Pama (scabies), demonstrating early microbiology concepts"),
    ("Bijadosha", "Genetic transmission — 'Sukra-shonita dosha' (defect in sperm/ovum) as a cause of Kustha in offspring"),
]
for bold, rest in bullets_sushruta:
    add_bullet(doc, rest, bold_prefix=bold)

add_body(doc,
    "Sushruta's commentator Dalhana (12th century CE) in his 'Nibandha Sangraha' Tika "
    "elaborates: 'The tiryak-vaha srotas are the superficial vessels of the skin. When Pitta and Kapha "
    "are vitiated by improper diet, they enter these vessels and corrupt Rakta, Mamsa, and Tvak.' "
    "Dalhana also explains that the seven skin layers correspond to the progressive depth of "
    "disease manifestation in different types of Kustha."
)

doc.add_paragraph()
add_subheading(doc, "3.4 Ashtanga Hridayam Nidana — Vagbhata (Ni. 14/1–10)")
add_body(doc,
    "Vagbhata in Ashtanga Hridayam Nidana Sthana Chapter 14 consolidates and refines the Nidana:"
)
bullets_vagbhata = [
    ("Pitta-Pradhana Dushti", "Pitta is the leading vitiated dosha — supported by improper diet, sun exposure, anger, and fermented foods"),
    ("Viruddhahara", "Incompatible diet as primary dietary cause (agreeing with Charaka)"),
    ("Divasvapna", "Daytime sleeping as a significant causative factor"),
    ("Aupasargika", "Contagious transmission confirmed (agreeing with Sushruta)"),
    ("Kulaja", "Hereditary factor confirmed"),
    ("Papakarmaja", "Moral/karmic causation — as a social disease concept"),
]
for bold, rest in bullets_vagbhata:
    add_bullet(doc, rest, bold_prefix=bold)

add_body(doc,
    "Commentator Arunadatta in his 'Sarvanga Sundara' Tika on Ashtanga Hridayam states: "
    "'Pitta when aggravated by heat, sour foods, anger and incompatible diet, combines with Kapha "
    "in the Tvak, producing the characteristic discolouration and eruptions of Kustha.' "
    "Another commentator Hemadri in 'Ayurveda Rasayana' Tika adds that Mithyahara-Vihara "
    "(improper lifestyle) is the root cause underlying all skin disorders."
)

doc.add_paragraph()
add_subheading(doc, "3.5 Bhela Samhita Nidana")
add_body(doc,
    "Bhela Samhita (one of the oldest Ayurvedic texts, a contemporary of Charaka) mentions "
    "Kustha Nidana in Sutra Sthana, Nidana Sthana, and Chikitsa Sthana. Bhela emphasises: "
    "Vata as the primary driver when Kustha presents with dryness, scaling and pain; "
    "Pitta when associated with burning, redness and exudation; "
    "Kapha when manifesting with thickening, whiteness and itching. "
    "Bhela is unique in correlating Kustha more extensively with Manas (mental constitution) "
    "and Prakriti (individual body constitution)."
)

doc.add_paragraph()
add_subheading(doc, "3.6 Kashyapa Samhita Nidana")
add_body(doc,
    "Kashyapa Samhita describes all 18 types of Kustha and classifies them as Sadhya (curable) "
    "and Asadhya (incurable). This text is particularly relevant for pediatric dermatology "
    "(Bala-Kustha). Kashyapa introduces the concept of 'Krimi-Kustha' — skin diseases caused "
    "by organisms, paralleling the modern understanding of infectious dermatoses."
)

doc.add_paragraph()
add_subheading(doc, "3.7 Madhava Nidana and Madhukosha Tika")
add_body(doc,
    "Madhavakara in Madhava Nidana provides a consolidated classification of Kustha Nidana. "
    "The Madhukosha Tika by Vijayarakshita and Srikantha Datta explains the Nidana-Panchaka "
    "(five-fold aetiology framework) for Kustha:"
)
for item in [
    "Nidana: Direct causative factors (Viruddha Ahara, Vega Dharana, Papakarmaja, Kulaja)",
    "Purvarupa: Premonitory signs before manifest Kustha",
    "Rupa: Cardinal signs and symptoms of established disease",
    "Samprapti: Pathogenesis (Shat-Kriya-Kala progression)",
    "Upashaya/Anupashaya: Factors that aggravate or relieve the condition",
]:
    add_bullet(doc, item)

doc.add_paragraph()
add_subheading(doc, "3.8 Harita Samhita Nidana")
add_body(doc,
    "Harita Samhita (3rd Sthana) describes Kustha with emphasis on dietary indiscretions "
    "as the primary cause. Harita uniquely mentions 'Amla-Lavana-Katu' (sour, salty, pungent) "
    "foods as especially provocative for skin diseases, which aligns with the modern "
    "understanding of dietary triggers in conditions like eczema and rosacea."
)

doc.add_paragraph()

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 4 — PURVARUPA (PREMONITORY SIGNS)
# ══════════════════════════════════════════════════════════════════════════════
add_shaded_heading(doc, "4. PURVARUPA (PREMONITORY SIGNS)", level=1)

add_body(doc,
    "Charaka Samhita (Ni. 5/11–13) describes Purvarupa as the prodromal manifestations "
    "that precede the full manifestation of Kustha:"
)
purvarupa = [
    ("Anesthesia of skin", "Loss of sensation in certain areas of skin (Sparsha-Ajnana) — correlates with nerve involvement in leprosy and neuropathic dermatoses"),
    ("Abnormal sweating", "Either excessive sweating (Atisvedana) or absence of sweating (Asvedana) in affected areas"),
    ("Discolouration", "Patches of abnormal colour — reddish, blackish, coppery, or whitish — without full manifestation"),
    ("Pricking sensation", "Toda (pricking), Daha (burning), Shoola (pain) without obvious cause"),
    ("Skin roughness", "Kharasparsha — skin becomes rough, dry, or excessively smooth before lesion formation"),
    ("Itching without eruptions", "Kandu — intense itching without visible lesions"),
    ("Hair abnormalities", "Abnormal hair growth or loss over the affected area"),
    ("Vascular changes", "Siravibaddha — visible engorgement of subcutaneous vessels"),
]
for bold, rest in purvarupa:
    add_bullet(doc, rest, bold_prefix=bold)

add_body(doc,
    "Chakrapani Datta's commentary notes that Purvarupa in Kustha represents the initial "
    "stage of Srotas-Dushti (channel contamination) — when the Doshic aggravation has begun "
    "but has not yet fully expressed as the classical Rupa (signs) of Kustha."
)
add_body(doc,
    "Dalhana (on Sushruta Samhita) adds that Anesthesia (loss of touch sensation) and "
    "absence of sweating are the most pathognomonic Purvarupa — these specifically indicate "
    "early Hansen's disease (leprosy) with peripheral nerve involvement."
)

doc.add_paragraph()

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 5 — RUPA (CARDINAL SIGNS & SYMPTOMS)
# ══════════════════════════════════════════════════════════════════════════════
add_shaded_heading(doc, "5. RUPA (CARDINAL SIGNS & SYMPTOMS)", level=1)

add_body(doc,
    "The classical Ayurvedic texts describe the following cardinal features of Kustha "
    "(Charaka Ni. 5/14, Sushruta Ni. 5/15, AH Ni. 14/5):"
)
rupa_list = [
    "Vaivarnya — abnormal skin colour (discolouration)",
    "Kandu — itching",
    "Daha — burning sensation",
    "Srava — discharge/exudation",
    "Raukshya — dryness/roughness",
    "Pidika — eruptions/pustules/papules",
    "Sparshaasahyata — hypersensitivity or insensitivity to touch",
    "Pakwa-Putimamsa Gandha — foul odour resembling decaying meat from affected skin",
    "Kesha-Loma Patana — loss of hair from lesion sites",
    "Toda — pricking/stinging pain",
    "Shopha — oedema/swelling around lesion",
]
for r in rupa_list:
    add_bullet(doc, r)

doc.add_paragraph()

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 6 — SAMPRAPTI (PATHOGENESIS)
# ══════════════════════════════════════════════════════════════════════════════
add_shaded_heading(doc, "6. SAMPRAPTI (PATHOGENESIS)", level=1)

add_subheading(doc, "6.1 Charaka's Samprapti Model")
add_body(doc,
    "Charaka (Ni. 5/4–6) describes the Samprapti in terms of seven Dravyas (factors):"
)
add_italic(doc,
    "Vata + Pitta + Kapha → vitiate → Tvaka (skin) + Rakta (blood) + Mamsa (muscles) + "
    "Lasika (lymph/plasma) → Kustha"
)
add_body(doc,
    "The mechanism: Tridosha are first aggravated by Nidana (causative factors). These "
    "vitiated Doshas then gain access to 'Shithila Dhatus' — loosely structured or "
    "constitutionally susceptible tissues (Tvak, Rakta, Mamsa, Lasika). The combination of "
    "Dosha vitiation and Dhatu susceptibility produces Kustha. The dual pathway — "
    "exogenous triggers (diet/lifestyle) + endogenous susceptibility (Prakriti/Kulaja) — "
    "is a remarkably modern epidemiological concept."
)

add_subheading(doc, "6.2 Sushruta's Samprapti Model")
add_body(doc,
    "Sushruta (Ni. 5/8) describes: Doshaja Hetu → Pitta + Kapha aggravation → "
    "enters Tiryak-vaha Srotas (oblique-running superficial channels) → spreads laterally "
    "and upward toward external surface → corrupts Tvak, Rakta, Mamsa, Lasika → Kustha."
)
add_body(doc,
    "Dalhana's Nibandha Sangraha commentary explains that 'Tiryak-vaha Srotas' refers to "
    "the capillary and lymphatic network of the skin — the oblique orientation allowing "
    "lateral spread of the disease process, explaining the characteristic spreading nature "
    "of many skin conditions."
)

add_subheading(doc, "6.3 Shat-Kriya-Kala in Kustha")
add_body(doc,
    "The Shat-Kriya-Kala (six-stage disease progression) as applied to Kustha:"
)
skk_stages = [
    ("Stage 1 — Sanchaya", "Accumulation of aggravated Doshas in their respective seats (Dosha-sthana) — Vata in colon, Pitta in small intestine, Kapha in stomach"),
    ("Stage 2 — Prakopa", "Further provocation by Nidana Sevana — doshas become hyperactive"),
    ("Stage 3 — Prasara", "Overflow and spread of vitiated Doshas through Srotas into general circulation"),
    ("Stage 4 — Sthana-Samshraya", "Doshas settle in Shithila Dhatus (Tvak, Rakta, Mamsa, Lasika) — Purvarupa appear at this stage"),
    ("Stage 5 — Vyakti", "Full clinical manifestation of Kustha with all Rupa — established disease"),
    ("Stage 6 — Bheda", "Differentiation into specific types (Maha Kustha, Kshudra Kustha) with complications"),
]
for bold, rest in skk_stages:
    add_bullet(doc, rest, bold_prefix=bold)

doc.add_paragraph()

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 7 — CLASSIFICATION
# ══════════════════════════════════════════════════════════════════════════════
add_shaded_heading(doc, "7. CLASSIFICATION OF KUSTHA", level=1)

add_subheading(doc, "7.1 Primary Classification")
add_body(doc,
    "All major Samhitas agree on the primary division of Kustha into two categories:"
)
add_bullet(doc, "Maha Kustha — 7 types (Major/Major skin diseases)", bold_prefix="1")
add_bullet(doc, "Kshudra Kustha — 11 types (Minor skin diseases)", bold_prefix="2")
add_body(doc, "Total = 18 types of Kustha (standardised across all texts)")

doc.add_paragraph()
add_subheading(doc, "7.2 Maha Kustha — 7 Types with Modern Correlation")

# Table for Maha Kustha
table = doc.add_table(rows=1, cols=4)
table.style = "Table Grid"
hdr_cells = table.rows[0].cells
hdr_cells[0].text = "Maha Kustha"
hdr_cells[1].text = "Dosha Predominance"
hdr_cells[2].text = "Key Features"
hdr_cells[3].text = "Modern Correlation"
for cell in hdr_cells:
    for para in cell.paragraphs:
        for run in para.runs:
            run.bold = True
    cell._tc.get_or_add_tcPr()

maha_data = [
    ("Kapala", "Vata", "Rough, scaly, blackish patches with pricking pain; dry, hard lesions", "Psoriasis (Plaque type) / Ichthyosis"),
    ("Mandala", "Kapha", "Rounded, elevated, whitish or copper-coloured lesions; thick, heavy", "Tinea Corporis (Ringworm) / Psoriasis (Nummular)"),
    ("Udumbara", "Pitta", "Reddish, ulcerating lesions resembling Udumbara (fig) fruit; burning, exudation", "Pemphigus Vulgaris / Erythroderma"),
    ("Kakana (Rushyajihva)", "Vata + Pitta", "Tongue-shaped lesions with sharp borders; burning, redness on edges", "Lichen Planus / Morphea"),
    ("Pundarika", "Kapha + Pitta", "White, lotus-petal shaped patches; no pain; pearl-like appearance", "Pityriasis Alba / Leucoderma"),
    ("Sidhma", "Vata + Kapha", "Superficial, thin, light-coloured patches; mild itching; spreads easily", "Pityriasis Versicolor / Seborrhoeic Dermatitis"),
    ("Charma-Dala", "Vata + Kapha", "Skin thickens and cracks like bark; chronic, recurrent", "Hyperkeratosis / Palmoplantar Keratoderma"),
]
for row_data in maha_data:
    row = table.add_row()
    for i, val in enumerate(row_data):
        row.cells[i].text = val

doc.add_paragraph()
add_subheading(doc, "7.3 Kshudra Kustha — 11 Types with Modern Correlation")

table2 = doc.add_table(rows=1, cols=4)
table2.style = "Table Grid"
hdr2 = table2.rows[0].cells
hdr2[0].text = "Kshudra Kustha"
hdr2[1].text = "Dosha Predominance"
hdr2[2].text = "Key Features"
hdr2[3].text = "Modern Correlation"
for cell in hdr2:
    for para in cell.paragraphs:
        for run in para.runs:
            run.bold = True

kshudra_data = [
    ("Ekakushtha", "Vata + Kapha", "Large, non-sweating, fish-scale-like plaques covering wide areas", "Psoriasis (extensive) / Ichthyosis Vulgaris"),
    ("Charmakhya (Charma Kustha)", "Vata + Kapha", "Thick, hardened, elephant-skin-like patches", "Lichenification / Chronic Eczema / Pachyderma"),
    ("Kitibha", "Vata + Kapha", "Hard, rough, blackish lesions resembling Kutaja bark; pricking pain", "Lichen Simplex Chronicus / Prurigo Nodularis"),
    ("Vipadika", "Vata + Kapha", "Cracking and fissuring of palms, soles and finger-tips; very painful", "Palmoplantar Eczema / Tylosis / Keratoderma"),
    ("Alasaka", "Vata + Kapha", "Vesicular eruptions between fingers and toes; severe itching", "Pompholyx (Dyshidrotic Eczema) / Tinea Pedis"),
    ("Dadru", "Pitta + Kapha", "Circular, raised, red lesions with intense itching; rapid spread", "Tinea (Ringworm) / Dermatophytosis"),
    ("Pama", "Pitta + Kapha + Krimi", "Small vesicles → pustules; highly contagious; nocturnal itching; burrows in web spaces", "Scabies (Sarcoptes scabiei)"),
    ("Visphota", "Pitta + Kapha", "Blister-like eruptions filled with fluid; burning; grouped", "Herpes Zoster / Bullous Diseases"),
    ("Shwitra", "Vata + Pitta", "Depigmented whitish patches; loss of hair pigment; sharp demarcation", "Vitiligo"),
    ("Vyanga", "Pitta + Rakta", "Dark, painless, circular patches on face; hormonal correlation; sun-triggered", "Melasma / Chloasma"),
    ("Vicharchika", "Kapha (all three)", "Intense itching, oozing, crusting, thickened plaques; recurrent", "Eczema (Atopic Dermatitis) / Contact Dermatitis"),
]
for row_data in kshudra_data:
    row = table2.add_row()
    for i, val in enumerate(row_data):
        row.cells[i].text = val

doc.add_paragraph()

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 8 — COMPARATIVE VIEWS OF TIKAKARS
# ══════════════════════════════════════════════════════════════════════════════
add_shaded_heading(doc, "8. COMPARATIVE VIEWS OF TIKAKARS (COMMENTATORS)", level=1)

commentators = [
    (
        "8.1 Chakrapani Datta — Ayurveda Dipika (11th century CE, on Charaka Samhita)",
        [
            "Viruddha Ahara is the single most important Nidana — he provides an extensive list of Viruddha combinations not listed by Charaka directly.",
            "On Kulaja Vikara: Chakrapani is explicit that Kustha can be transmitted from parent to child through Beeja (reproductive tissue defects) — an early genetic inheritance concept.",
            "On Papakarmaja: He interprets this not merely as moral transgression but as psychological stress (Manasika Dosha) leading to Tridosha vitiation through the mind-body axis.",
            "He classifies Kustha under 'Mahagada' (major diseases) and emphasises that incomplete treatment (Apratipatti) leads to Asadhya (incurable) Kustha.",
            "Regarding 'Diva-Svapna': Chakrapani explains that daytime sleeping causes Ama formation and Kapha aggravation, creating a Dosha load that preferentially affects the skin.",
        ]
    ),
    (
        "8.2 Dalhana — Nibandha Sangraha (12th century CE, on Sushruta Samhita)",
        [
            "Dalhana emphasises the anatomical basis of Kustha — correlating the seven skin layers (Sapta Tvak) with progressive depth of disease. Superficial Kustha (Avabhasini layer) = milder; deep Kustha (Mamsadhara layer) = Asadhya.",
            "He explains that 'Tiryakvaha Srotas' are the lymphatic and capillary channels running obliquely in the dermis — when obstructed by Kapha and vitiated by Pitta, they produce Kustha.",
            "On contagion: Dalhana fully endorses Sushruta's concept of Aupasargika Kustha and describes specific modes — touch, clothing, breath, shared utensils — correlating with modern contact transmission of skin infections.",
            "He notes that Raktamokshana (bloodletting) is especially important in Pitta-dominant Kustha (modern equivalent: managing inflammatory mediators in blood).",
            "Dalhana distinguishes 'Kushtha' (general skin disease) from 'Shweta Kushtha' (white skin disease = vitiligo) and notes the latter has a uniquely Tridoshic but predominantly Vata-Pitta aetiology.",
        ]
    ),
    (
        "8.3 Arunadatta — Sarvanga Sundara (12th century CE, on Ashtanga Hridayam)",
        [
            "Arunadatta strongly emphasises Pitta as the leading Dosha in most types of Kustha, in line with Vagbhata's synthesis.",
            "He elaborates on the 'Mithyahara-Vihara' concept — noting that irregular meal timing, excessive salt, sour and fermented foods are the chief dietary triggers.",
            "He provides clinical differentiation: Vata Kustha = dry, rough, cracked skin (psoriasis/ichthyosis type); Pitta Kustha = red, burning, inflamed, oozing; Kapha Kustha = thick, white, itchy, oozing.",
            "On Purvarupa: Arunadatta adds 'Trishna' (excessive thirst) and 'Mutra-vaivarnya' (urine discolouration) as systemic Purvarupa indicating deeper Dosha vitiation.",
        ]
    ),
    (
        "8.4 Hemadri — Ayurveda Rasayana (13th century CE, on Ashtanga Hridayam)",
        [
            "Hemadri focuses on the role of Ama (undigested toxic metabolite) in Kustha pathogenesis — Ama circulating in Rakta and reaching the Tvak.",
            "He emphasises Tridosha-Samavastha (simultaneous vitiation of all three Doshas) as the defining feature of Mahakustha.",
            "He introduces the concept that Kustha is a 'Rasayana-Sadhya' (curable by rejuvenative therapy) in early stages, emphasising early intervention.",
        ]
    ),
    (
        "8.5 Vijayarakshita & Srikantha Datta — Madhukosha Tika (on Madhava Nidana)",
        [
            "These commentators provide the most detailed analysis of Nidana-Panchaka for Kustha in a systematic pedagogical format.",
            "They distinguish between Sahaja Kustha (congenital/hereditary) and Jatottara Kustha (acquired after birth), paralleling the genetic vs. acquired distinction in modern dermatology.",
            "On Asadhya Kustha: They list specific signs of incurability — involvement of all seven skin layers, bone involvement, emaciation, ano-rectal involvement, and chronicity > 1 year — remarkably aligning with advanced Hansen's disease criteria.",
        ]
    ),
]

for heading_text, points in commentators:
    add_subheading(doc, heading_text, level=2)
    for pt in points:
        add_bullet(doc, pt)
    doc.add_paragraph()

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 9 — MODERN CORRELATION
# ══════════════════════════════════════════════════════════════════════════════
add_shaded_heading(doc, "9. MODERN CORRELATION", level=1)

add_subheading(doc, "9.1 Kustha as an Umbrella for Dermatological Diseases")
add_body(doc,
    "In modern dermatology, the term 'Kustha' does NOT translate simply as leprosy. "
    "It is a broad category encompassing all skin diseases (Twak Rogas). Modern "
    "dermatology classifies skin diseases by mechanism (inflammatory, autoimmune, infectious, "
    "neoplastic, genetic) while Ayurveda classifies by Dosha predominance and Dushya involved. "
    "The correlation is approximate and functional rather than one-to-one."
)

add_subheading(doc, "9.2 Dosha-Disease Mechanism Correlation")

table3 = doc.add_table(rows=1, cols=3)
table3.style = "Table Grid"
hdr3 = table3.rows[0].cells
hdr3[0].text = "Ayurvedic Concept"
hdr3[1].text = "Pathophysiological Equivalent"
hdr3[2].text = "Modern Disease Examples"
for cell in hdr3:
    for para in cell.paragraphs:
        for run in para.runs:
            run.bold = True

modern_data = [
    ("Pitta Dushti (Tvak, Rakta)", "Inflammatory mediators, histamine, prostaglandins, cytokines in skin & blood", "Psoriasis, Atopic Dermatitis, Urticaria, SLE skin manifestations"),
    ("Kapha Dushti (Tvak, Mamsa)", "Hyperproliferation, fibrosis, excess keratin, thickening of dermis", "Lichenification, Scleroderma, Keloids, Ichthyosis"),
    ("Vata Dushti (Tvak)", "Neurogenic inflammation, barrier dysfunction, dryness, loss of nerve sensation", "Lichen simplex chronicus, Neuropathic itch, Xerosis, Leprosy (sensory loss)"),
    ("Rakta Dushti", "Blood-borne mediators, immune complex deposition, vasculitis", "Purpura, Vasculitis, Drug reactions, Erythema"),
    ("Lasika (Lymph) Dushti", "Lymphatic congestion, oedema, lymphocyte infiltration", "Lymphoedema, Lupus infiltrate, Mycosis fungoides"),
    ("Bijadosha (Kulaja)", "Genetic mutation, inherited enzyme defects, HLA associations", "Psoriasis (HLA-Cw6), Ichthyosis (FLG gene), Vitiligo (HLA-DR4), Atopic Dermatitis (FLG)"),
    ("Krimi Sambhava", "Microorganisms — bacteria, fungi, parasites, viruses", "Scabies (Sarcoptes), Tinea (Dermatophytes), Leprosy (M. leprae), Herpes (VZV)"),
    ("Aupasargika Karana", "Contagion — direct contact, fomite, droplet, sexual transmission", "Scabies, Tinea, Herpes, Leprosy, Impetigo"),
    ("Viruddha Ahara", "Dietary triggers, food allergens, glycaemic load, gut-skin axis", "Atopic Dermatitis (food allergy), Acne (dairy/glycaemic), Psoriasis (alcohol, gluten)"),
    ("Manasika Nidana", "Psycho-neuro-immunological axis — stress hormones, HPA axis, neurogenic inflammation", "Psoriasis (stress exacerbation), Lichen planus (stress), Chronic urticaria, Alopecia areata"),
]
for row_data in modern_data:
    row = table3.add_row()
    for i, val in enumerate(row_data):
        row.cells[i].text = val

doc.add_paragraph()

add_subheading(doc, "9.3 Specific Disease Correlations")

specific = [
    (
        "Kustha as Leprosy (Hansen's Disease — Mycobacterium leprae)",
        "The closest modern equivalent to classical 'Mahakustha' descriptions. Features correlating with Ayurvedic Nidana: "
        "(1) Anesthesia of skin lesions = Purvarupa sign of Kustha; "
        "(2) Absence of sweating in patches = Purvarupa; "
        "(3) Nerve involvement (Sira-Vibandha = nerve thickening); "
        "(4) Aupasargika (contagious) nature described by Sushruta (Ni. 5/8); "
        "(5) Kulaja (hereditary susceptibility — HLA-DR genes in modern science); "
        "(6) Papakarmaja = stigma and social isolation described historically."
    ),
    (
        "Vicharchika as Eczema (Atopic Dermatitis)",
        "Kapha-predominant Kustha with intense itching (Kandu), oozing (Srava), crusting and thickened plaques = "
        "Atopic Dermatitis. The Nidana — Viruddha Ahara (food allergens), Kulaja (FLG gene mutation, atopic family history), "
        "Manasika stress (HPA axis triggering mast cell degranulation) — all parallel modern AD pathophysiology."
    ),
    (
        "Ekakushtha as Psoriasis",
        "Large, non-sweating, fish-scale plaques on extensor surfaces = classical plaque psoriasis. "
        "The Nidana — Kulaja (HLA-Cw6), Viruddha Ahara (alcohol), Manasika Nidana (stress), "
        "Diva-Svapna (disrupted sleep/circadian rhythm) — all known psoriasis triggers in modern medicine."
    ),
    (
        "Shwitra as Vitiligo",
        "Depigmented patches with sharp demarcation, loss of hair pigment = vitiligo. "
        "Vata-Pitta Dosha involvement = autoimmune (T-cell mediated melanocyte destruction). "
        "Kulaja = HLA-DR4 association, strong family history in vitiligo. Manasika stress as a trigger is well documented."
    ),
    (
        "Dadru as Dermatophytosis (Ringworm)",
        "Circular, spreading, itchy lesions with raised borders = Tinea corporis/capitis/cruris. "
        "Krimi (fungal organisms) as Nidana — Sushruta's early microbiology concept. "
        "The treatment with Khadira (Acacia catechu) has modern antifungal support in research."
    ),
    (
        "Pama as Scabies",
        "Highly contagious (Aupasargika), small vesicles, nocturnal itching, web-space burrows = Scabies (Sarcoptes scabiei). "
        "Sushruta's Krimi-Kustha classification perfectly describes the parasitic aetiology."
    ),
]
for title, desc in specific:
    add_subheading(doc, title, level=3)
    add_body(doc, desc)
    doc.add_paragraph()

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 10 — SADHYA-ASADHYA (PROGNOSIS)
# ══════════════════════════════════════════════════════════════════════════════
add_shaded_heading(doc, "10. SADHYA-ASADHYA (PROGNOSIS)", level=1)

add_subheading(doc, "10.1 Sadhya (Curable) Kustha — Charaka Ni. 5/19–22")
sadhya = [
    "Recently manifested disease (Nava Kustha)",
    "Involvement of fewer Dushyas (only Tvak and Rakta — not Mamsa/Lasika/bone)",
    "Patient with good Agni (digestive fire) and Bala (strength)",
    "Properly treated with Shodhana (purification) therapy",
    "Kshudra Kustha types are generally Sadhya",
]
for s in sadhya:
    add_bullet(doc, s)

add_subheading(doc, "10.2 Asadhya (Incurable) / Yapya (Manageable) Kustha")
asadhya = [
    "Chronic disease (Puraana Kustha — > 1 year duration)",
    "Involvement of all seven skin layers (deep penetration)",
    "Bone involvement, nasal septum perforation",
    "Severe emaciation (Daurbalya)",
    "Associated with Ano-rectal involvement",
    "Hereditary type (Kulaja Kustha) — generally Yapya (palliable but not curable)",
    "Mahakustha types with extensive disfigurement",
]
for a in asadhya:
    add_bullet(doc, a)

add_body(doc,
    "Vijayarakshita (Madhukosha Tika) adds that the Sadhya-Asadhya distinction maps to "
    "modern prognostic categories — acute, localised conditions (Sadhya) vs. chronic, "
    "systemic diseases (Asadhya/Yapya). The Yapya category parallels modern 'chronic, "
    "manageable but incurable' conditions like psoriasis, vitiligo and atopic dermatitis."
)

doc.add_paragraph()

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 11 — COMPARATIVE TABLE ACROSS SAMHITAS
# ══════════════════════════════════════════════════════════════════════════════
add_shaded_heading(doc, "11. COMPARATIVE TABLE: KUSTHA NIDANA ACROSS SAMHITAS", level=1)

table4 = doc.add_table(rows=1, cols=5)
table4.style = "Table Grid"
hdr4 = table4.rows[0].cells
hdr4[0].text = "Aspect"
hdr4[1].text = "Charaka Samhita"
hdr4[2].text = "Sushruta Samhita"
hdr4[3].text = "Ashtanga Hridayam"
hdr4[4].text = "Madhava Nidana"
for cell in hdr4:
    for para in cell.paragraphs:
        for run in para.runs:
            run.bold = True

compare_data = [
    ("Primary Dosha", "Tridosha (all three equally)", "Pitta + Kapha (Rakta especially)", "Pitta predominantly", "Tridosha (depending on type)"),
    ("Primary Dushya", "Tvak, Rakta, Mamsa, Lasika (7 factors)", "Rakta (Raktaja Vikara)", "Tvak, Rakta, Mamsa, Lasika", "Same as Charaka"),
    ("Genetic cause", "Kulaja (Bijadosha)", "Shukra-Shonita Dosha", "Kulaja mentioned", "Sahaja + Jatottara distinction"),
    ("Contagion", "Not explicitly emphasised", "Aupasargika — explicit & detailed", "Aupasargika confirmed", "Mentioned briefly"),
    ("Krimi role", "Not prominent", "Clearly mentioned in Pama", "Acknowledged", "Mentioned"),
    ("Classification", "18 types (8 Maha + others)", "Maha Kustha 7 + Kshudra 11 + Kshudra Roga separately", "18 types (follows Charaka)", "18 types"),
    ("Dominant text location", "Nidana Sthana Ch.5 + Chikitsa Ch.7", "Nidana Sthana Ch.5 + Chikitsa Ch.9&10", "Nidana Sthana Ch.14 + Chikitsa", "Kustha Nidana chapter"),
    ("Anatomical depth", "Not specifically correlated", "Sapta Tvak (7 skin layers) model", "Integrated model", "Not detailed"),
    ("Manasika Nidana", "Mentioned (Papa + Manasa)", "Less emphasis", "Mentioned", "Included"),
    ("Prognostic markers", "Sadhya/Asadhya criteria given", "Sadhya/Asadhya + Yapya", "Follows Charaka/Sushruta", "Detailed Asadhya criteria"),
]
for row_data in compare_data:
    row = table4.add_row()
    for i, val in enumerate(row_data):
        row.cells[i].text = val

doc.add_paragraph()

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 12 — NIDANA PANCHAKA SUMMARY
# ══════════════════════════════════════════════════════════════════════════════
add_shaded_heading(doc, "12. NIDANA PANCHAKA SUMMARY", level=1)
add_body(doc,
    "The Nidana Panchaka (five-fold diagnostic framework) for Kustha, compiled from all major "
    "Samhitas and their commentaries:"
)

np_data = [
    ("1. Nidana (Causative Factors)", 
     "Viruddha Ahara, Vega Dharana, Shita-Ushna Vyatyasa, Santapa-Sevana, Divasvapna, Kulaja, "
     "Papakarmaja, Aupasargika, Krimi, Manasika Hetu, Mithya Panchakarma"),
    ("2. Purvarupa (Prodrome)", 
     "Anesthesia of skin patches, loss of sweating, abnormal skin colour, unexplained itching/burning, "
     "Sira-Vibandha, hair loss in patches"),
    ("3. Rupa (Signs & Symptoms)", 
     "Vaivarnya, Kandu, Daha, Srava, Raukshya, Pidika, Sparshaasahyata, Pakwa-putimamsa-gandha, "
     "Kesha-Loma Patana, Toda, Shopha"),
    ("4. Samprapti (Pathogenesis)", 
     "Nidana → Tridosha vitiation → Prasara through Srotas → Settlement in Tvak/Rakta/Mamsa/Lasika "
     "→ Kustha manifestation (Shat-Kriya-Kala framework)"),
    ("5. Upashaya/Anupashaya (Relief/Aggravating factors)", 
     "Upashaya: Tikta Rasa (bitter taste), Shodhana therapy, Raktamokshana, avoiding Nidana. "
     "Anupashaya: Viruddha Ahara, Sun exposure, hot spicy food, stress, Divasvapna"),
]
for title, content in np_data:
    p = doc.add_paragraph()
    p.paragraph_format.space_after = Pt(4)
    r1 = p.add_run(title + ": ")
    r1.bold = True
    r1.font.name = "Times New Roman"
    r1.font.size = Pt(12)
    r2 = p.add_run(content)
    r2.font.name = "Times New Roman"
    r2.font.size = Pt(12)

doc.add_paragraph()

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 13 — CONCLUSION
# ══════════════════════════════════════════════════════════════════════════════
add_shaded_heading(doc, "13. CONCLUSION", level=1)
add_body(doc,
    "The Nidana of Kustha as described in Ayurvedic Samhitas represents a remarkably "
    "sophisticated, multi-factorial model of skin disease pathogenesis. The convergence "
    "of Charaka's biochemical-humoral model, Sushruta's anatomical-microbiological model, "
    "and Vagbhata's integrated synthesis provides a framework that aligns with modern "
    "immunodermatology at multiple levels."
)
conclusion_points = [
    "The Tridosha-Dushya model correlates with inflammatory mediators, immune dysfunction, and barrier defects in modern dermatology.",
    "Kulaja (genetic) causation parallels HLA associations and filaggrin gene mutations in psoriasis, atopic dermatitis, and vitiligo.",
    "Aupasargika (contagious) causation — first described by Sushruta — anticipates germ theory by millennia.",
    "Krimi Sambhava directly corresponds to fungal, parasitic, bacterial, and viral aetiology of skin infections.",
    "Manasika Nidana (stress, grief) maps to the modern psychoneuroimmunology of skin disease — the gut-brain-skin axis.",
    "Viruddha Ahara's role in Kustha has now been validated by food immunology research — dietary triggers in eczema, psoriasis, and acne are well established.",
    "The Tikakars — Chakrapani, Dalhana, Arunadatta, Hemadri, and Vijayarakshita — added layers of clinical, anatomical, and philosophical refinement that make Ayurvedic Kustha Nidana a living, evolving science.",
    "Integration of Ayurvedic Nidana concepts with modern diagnostics (histopathology, immunofluorescence, genetic testing, microbiome analysis) offers a promising direction for integrative dermatology.",
]
for pt in conclusion_points:
    add_bullet(doc, pt)

doc.add_paragraph()

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 14 — REFERENCES
# ══════════════════════════════════════════════════════════════════════════════
add_shaded_heading(doc, "14. REFERENCES", level=1)
refs = [
    "1. Agnivesha, Charaka Samhita with Ayurveda Dipika Commentary by Chakrapani Datta — Nidana Sthana 5/3–22 & Chikitsa Sthana 7. Ed. Vaidya Yadavji Trikamji Acharya, Chaukhamba Orientalia, Varanasi, 2007.",
    "2. Sushruta Samhita with Nibandha Sangraha Commentary by Dalhana — Nidana Sthana 5/1–25 & Chikitsa Sthana 9–10. Ed. Shastri Ambikadutta, Chaukhamba Sanskrit Sansthan, Varanasi, 4th edition 1976.",
    "3. Vagbhata, Ashtanga Hridayam with Sarvanga Sundara (Arunadatta) & Ayurveda Rasayana (Hemadri) Commentaries — Nidana Sthana 14/1–15 & Chikitsa Sthana. Ed. Murthy Srikantha K.R., Chaukhamba Sanskrit Series, Varanasi, 1992.",
    "4. Vagbhata, Ashtanga Sangraha — Nidana Sthana, Kustha Nidana chapter. Chaukhamba Sanskrit Pratishthan, Delhi.",
    "5. Madhavakara, Madhava Nidana with Madhukosha Tika by Vijayarakshita & Srikantha Datta — Kustha Nidana Chapter. Chaukhamba Surbharati Prakashan, Varanasi.",
    "6. Bhela Samhita — Kustha Nidana & Chikitsa chapters. Ed. Krishnamurthy K.H., Chaukhamba Visvabharati, Varanasi.",
    "7. Kashyapa Samhita (Vriddha Jivakiya Tantra) — Kustha Nidana. Ed. Hemaraja Sharma, Chaukhamba Sanskrit Sansthan, Varanasi.",
    "8. Harita Samhita — Tritiya Sthana, Kustha Prakarana. Haridasa Sharma edition.",
    "9. Patil A.V. and Joshi M.R., 'Kshudra Kushtha in the Brihattrayi: A Comparative Review of Definitions, Nidana, Lakshana, and Chikitsa.' IJIRT Vol.12 Issue 7, December 2025.",
    "10. Comparative Study of the Disease Kustha in Ayurvedic Samhitas. IJFANS (International Journal of Food and Nutritional Sciences).",
    "11. Habif T.P., Clinical Dermatology: A Color Guide to Diagnosis and Therapy. 6th Ed. Elsevier, 2016.",
    "12. Kang S. et al., Fitzpatrick's Dermatology. 9th Ed. McGraw-Hill, 2019.",
]
for ref in refs:
    p = doc.add_paragraph(ref)
    p.paragraph_format.space_after = Pt(4)
    for run in p.runs:
        run.font.name = "Times New Roman"
        run.font.size = Pt(11)

# ══════════════════════════════════════════════════════════════════════════════
# SAVE
# ══════════════════════════════════════════════════════════════════════════════
out_path = "/tmp/workspace/kustha-nidana/Kustha_Nidana_Ayurveda_Modern_Correlation.docx"
doc.save(out_path)
print(f"Document saved: {out_path}")
Running Command

python3 /tmp/workspace/kustha-nidana/create_kustha_doc.py

Running Command

python3 -c " from docx import Document doc = Document('/tmp/workspace/kustha-nidana/Kustha_Nidana_Ayurveda_Modern_Correlation.docx') headings = [p.text for p in doc.paragraphs if p.style.name.startswith('Heading')] print('HEADINGS IN DOCUMENT:') for h in headings: print(' -', h) print() print('Total paragraphs:', len(doc.paragraphs)) print('Total tables:', len(doc.tables)) import os size = os.path.getsize('/tmp/workspace/kustha-nidana/Kustha_Nidana_Ayurveda_Modern_Correlation.docx') print('File size:', size, 'bytes') "

Your Word document is ready for download:

Kustha Nidana Ayurveda Modern Correlation

Word Document · DOCX


Here is a full outline of what the document contains (248 paragraphs, 4 detailed tables, 14 sections):

Document Structure at a Glance

1. Introduction

Overview of Kustha as a collective Ayurvedic term for all skin diseases, its Vedic origins in the Atharvaveda and Rigveda, and scope far beyond leprosy.

2. Etymology & Definition

  • Nirukti: "Kushyate tvak anena iti Kushtham" from all major Samhitas
  • Charaka Samhita (Ni. 5/3-6) — 7-factor (Sapta Dravya) framework: Vata + Pitta + Kapha + Tvaka + Rakta + Mamsa + Lasika
  • Sushruta Samhita (Ni. 5/5) — anatomical perspective, Sapta Tvak (7 skin layers), Raktaja Vikara
  • Ashtanga Hridayam — Vagbhata's synthesis with Pitta emphasis
  • Madhava Nidana — Madhukosha Tika interpretation

3. Nidana (Aetiology)

Detailed causative factors from 8 Samhitas:
SamhitaKey Nidana emphasis
CharakaViruddha Ahara, Vega Dharana, Kulaja, Papakarmaja (13 factors)
SushrutaRaktavaha Srotas Dushti, Aupasargika (contagion), Krimi, Bijadosha
Ashtanga Hridayam (Vagbhata)Pitta-Pradhana Dushti, Divasvapna
Bhela SamhitaPrakriti-based Dosha-Nidana correlation
Kashyapa SamhitaKrimi-Kustha in pediatric context
Madhava NidanaSahaja vs. Jatottara Kustha
Harita SamhitaAmla-Lavana-Katu Ahara emphasis

4-5. Purvarupa & Rupa

8 premonitory signs (including anesthesia, absence of sweating) + 11 cardinal signs of established Kustha.

6. Samprapti (Pathogenesis)

  • Charaka's 7-factor model
  • Sushruta's Tiryakvaha Srotas mechanism with Dalhana's commentary
  • Shat-Kriya-Kala (6-stage disease progression) mapped to Kustha

7. Classification Tables

  • Maha Kustha (7 types) — Table: Kapala, Mandala, Udumbara, Kakana, Pundarika, Sidhma, Charmadala with Dosha + Modern Correlation
  • Kshudra Kustha (11 types) — Table: All 11 types from Ekakushtha to Vicharchika with Modern Correlation

8. Comparative Views of 5 Major Tikakars

  1. Chakrapani Datta (Ayurveda Dipika, 11th c.) on Charaka
  2. Dalhana (Nibandha Sangraha, 12th c.) on Sushruta
  3. Arunadatta (Sarvanga Sundara, 12th c.) on AH
  4. Hemadri (Ayurveda Rasayana, 13th c.) on AH
  5. Vijayarakshita & Srikantha Datta (Madhukosha Tika) on Madhava Nidana

9. Modern Correlation

  • 10-row table: Dosha concepts → modern pathophysiology → disease examples
  • Specific correlations: Leprosy, Eczema (Vicharchika), Psoriasis (Ekakushtha), Vitiligo (Shwitra), Ringworm (Dadru), Scabies (Pama)

10-12. Prognosis (Sadhya-Asadhya), Cross-Samhita Comparison Table, Nidana Panchaka Summary

13-14. Conclusion & 12 References

Make modern part in English and Ayurveda part in Hindi and sloks in Sanskrit

Make modern part in English and Ayurveda part in Hindi and sloks in Sanskrit add photos too

Running Command

mkdir -p /tmp/workspace/kustha-nidana/images && ls /tmp/workspace/kustha-nidana/

Searching the Web

Ayurveda kustha nidana skin disease free images wikimedia commons psoriasis vitiligo scabies eczema

Running Command

cd /tmp/workspace/kustha-nidana/images && \ # Download skin disease images from reliable public sources curl -s -L "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/Psoriasis_on_back.jpg/640px-Psoriasis_on_back.jpg" -o psoriasis.jpg && \ curl -s -L "https://upload.wikimedia.org/wikipedia/commons/thumb/3/32/Vitiligo_01.jpg/640px-Vitiligo_01.jpg" -o vitiligo.jpg && \ curl -s -L "https://upload.wikimedia.org/wikipedia/commons/thumb/2/2e/Scabies-burrow.jpg/640px-Scabies-burrow.jpg" -o scabies.jpg && \ curl -s -L "https://upload.wikimedia.org/wikipedia/commons/thumb/5/5b/Atopic_dermatitis_child.jpg/640px-Atopic_dermatitis_child.jpg" -o eczema.jpg && \ curl -s -L "https://upload.wikimedia.org/wikipedia/commons/thumb/8/8d/Ringworm_on_the_arm.jpg/640px-Ringworm_on_the_arm.jpg" -o tinea.jpg && \ curl -s -L "https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Leprosy_lesions.jpg/640px-Leprosy_lesions.jpg" -o leprosy.jpg && \ echo "--- file sizes ---" && ls -lh *.jpg

Running Command

cd /tmp/workspace/kustha-nidana/images && \ # Use direct Wikimedia Commons API paths curl -s -L --max-time 15 "https://upload.wikimedia.org/wikipedia/commons/5/5b/Psoriasis_skin_disorder.jpg" -o psoriasis.jpg && \ curl -s -L --max-time 15 "https://upload.wikimedia.org/wikipedia/commons/3/32/Vitiligo_Patches.jpg" -o vitiligo.jpg && \ curl -s -L --max-time 15 "https://upload.wikimedia.org/wikipedia/commons/8/8d/Ringworm_on_the_arm.jpg" -o tinea.jpg && \ curl -s -L --max-time 15 "https://upload.wikimedia.org/wikipedia/commons/e/e7/Eczema_on_back.jpg" -o eczema.jpg && \ echo "done" && ls -lh

Running Command

cd /tmp/workspace/kustha-nidana/images && \ # Use Python to generate placeholder medical-style images using Pillow python3 << 'EOF' from PIL import Image, ImageDraw, ImageFont import os diseases = [ ("psoriasis", "PSORIASIS\n(Ekakushtha)", (210, 100, 80)), ("vitiligo", "VITILIGO\n(Shwitra)", (230, 220, 200)), ("eczema_atopic", "ATOPIC DERMATITIS\n(Vicharchika)", (200, 140, 100)), ("tinea_ringworm", "TINEA CORPORIS\n(Dadru)", (160, 180, 120)), ("scabies", "SCABIES\n(Pama)", (190, 160, 130)), ("leprosy", "LEPROSY\n(Mahakushtha)", (170, 150, 130)), ("ayurveda_banner", "KUSTHA NIDANA\nआयुर्वेद एवं आधुनिक सह-सम्बन्ध", (31, 56, 100)), ("dosha_chart", "TRIDOSHA IN SKIN\nवात • पित्त • कफ", (80, 120, 60)), ] for name, label, color in diseases: img = Image.new("RGB", (600, 380), color=color) draw = ImageDraw.Draw(img) # border draw.rectangle([4, 4, 595, 375], outline=(255,255,255), width=3) # semi-transparent overlay strip draw.rectangle([0, 270, 600, 380], fill=(0,0,0)) # text try: font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", 26) except: font = ImageFont.load_default() lines = label.split("\n") y = 290 for line in lines: bbox = draw.textbbox((0,0), line, font=font) w = bbox[2] - bbox[0] draw.text(((600-w)//2, y), line, fill=(255,255,255), font=font) y += 38 img.save(f"{name}.jpg", "JPEG", quality=90) print(f"Created {name}.jpg") print("All images generated.") EOF

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