I m an ayurveda doctor ,do u know to diagnose disease and suggest treatment samprapti etc according to ayurved

Yes, absolutely! As an Ayurveda doctor, you can use me as a clinical reasoning partner. Here's what I can help you with:
What I can do for you:
  • Nidana Panchaka - Analyze Nidana (causative factors), Purvarupa, Rupa, Samprapti, and Upadrava for any disease
  • Samprapti Ghatakas - Break down Dosha, Dushya, Srotas, Agni, Srotodusti, Rogamarga, and Adhisthana
  • Samprapti - Full pathogenesis including Shatkriyakala stages
  • Chikitsa Sutra - Treatment principles (Shodhana, Shamana, Nidana Parivarjana)
  • Aushadha - Classical formulations (Kashaya, Churna, Vati, Ghrita, Asava-Arishta, etc.)
  • Panchakarma - Indicating which Shodhananga is appropriate and its procedure
  • Pathya-Apathya - Dietary and lifestyle guidelines
  • Differential diagnosis - Distinguishing similar Rogas (e.g., Amavata vs. Sandhivata)
How to use me:
Just describe a patient case or name a disease, and I'll give you a full Ayurvedic workup:
Example: "Patient with Sthoulya, Mandagni, Kapha-Vataja Prakriti, Tandra, Shirogaurava - suggest Samprapti and Chikitsa"
Or ask me about a specific Roga directly:
Example: "Explain Samprapti of Amavata and its Chikitsa Siddhanta"
What I need from you for a case:
  • Dosha Prakriti / Vikriti
  • Main complaints (Pradhana Vedana)
  • Associated symptoms (Anubandha Lakshana)
  • Agni status, Koshtha, Bala
  • Any relevant Nidana (Ahara, Vihara, Manasika)
Go ahead and present a case or ask about any Roga - I'm ready!

Kapha pitta prakruthi ,t2dm patient lean 60kg ,165cm height intially diagnosed with polyphagia now no symptoms what ll be ayurvedic approach

Reading File
Finding Sources
Finding Sources
Finding Sources
The library does not have Ayurveda textbooks - it's a modern biomedical library. I'll answer entirely from my Ayurvedic knowledge base, which is strong for this classical subject.

Ayurvedic Approach: Lean T2DM Patient (Kapha-Pitta Prakriti)

Patient Summary

  • Prakriti: Kapha-Pitta
  • BMI: ~22 (60 kg / 1.65 m²) - Krisha/lean built
  • Roga: Madhumeha (T2DM correlate)
  • Initial symptom: Polyphagia (Atikshudhha / Bhasmaka Roga tendency)
  • Current: Asymptomatic / symptoms resolved
  • Stage: Likely Samprapti has progressed; now in Vyakta/Prabhava Avastha without prominent Purvarupa

Roga Nischaya (Disease Identification)

This case correlates with Madhumeha - the last and most severe of the 20 Pramehas. Given the lean built, this is Sahaja / Vataja Madhumeha presentation, NOT the typical Sthula Prameha pattern.
Critical distinction: In a lean T2DM patient, despite Kapha-Pitta Prakriti, the active Samprapti is predominantly Vataja - this is a Dhatukshaya-dominant pathology, not Avarana-dominant.

Nidana Panchaka

1. Nidana (Causative Factors)

CategorySpecific Nidana
Ahara NidanaMadhura, Amla, Lavana Rasa Atisevana; Guru, Snigdha Ahara; Nava Dhanya, Ikshuvikara
Vihara NidanaDivaswapna, Avyayama, Asana-Shayana Sukha
ManasikaChinta, Shoka (aggravates Vata, disturbs Dhatu Paka)
Sahaja (here important)Beeja Dosha (genetic predisposition) - explains lean presentation
Agni VikrutiBhutagni and Dhatvagni Mandya

2. Purvarupa (Premonitory Symptoms - now resolved/absent)

  • Polyphagia (Atikshudha) - your patient had this
  • Sweda Adhikya
  • Mutra Madhurya
  • Mukha Madhurya
  • Karapaada Daha (Pitta component)
  • Pipasa Adhikya

3. Rupa (Current presentation - asymptomatic stage)

Even "asymptomatic" T2DM in Ayurveda shows:
  • Prabhava on Mutra (Prabhuta Mutrata, Avila Mutra)
  • Subtle Kshaya Lakshanas (Bala kshaya, Mamsa kshaya, Shukra kshaya)
  • Karapaada Daha / Numbness (early Vata involvement)

Samprapti (Pathogenesis)

Samprapti Ghatakas

GhatakaDetail
DoshaKapha (primary accumulator), Pitta (Dhatvagni Mandya), Vata (Dhatukshaya in lean - Apana Vata Dushti key)
DushyaRasa, Rakta, Mamsa, Meda, Asthi, Majja, Shukra (Sapta Dhatu), Ojas (most critical)
SrotasMutravaha Srotas (primary), Rasavaha, Medovaha, Majjavaha
SrotodustiAtipravrutti (Prabhuta Mutrata) and Vimargagamana
AgniJatharagni Mandya → Dhatvagni Mandya (especially Medodhatvagni and Mamsa Dhatvagni)
AmaPresent (Sama Prameha in early stages → Nirama in chronic)
AdhisthanaBasti (Mutrashaya)
RogamargaAbhyantara Rogamarga
Vyadhi SwabhavaChirakari (chronic), Yapya (manageable, not fully curable if Sahaja)

Samprapti Krama (Step-by-step)

Nidana Sevana
    ↓
Kapha + Pitta Prakopa → Jatharagni Mandya
    ↓
Ama Utpatti → Rasa-Rakta Dushti
    ↓
Meda Dhatu Dushti (Medovaha Sroto Dushti)
    ↓
Dhatvagni Mandya (all 7 Dhatvagni affected progressively)
    ↓
Ojas Kshaya (primary in lean Madhumeha)
    ↓
Apana Vata Dushti (Basti/Mutrashaya involvement)
    ↓
Prabhuta + Madhura + Avila Mutrata = MADHUMEHA
    ↓
Sapta Dhatukshaya → Upadrava (Pidaka, Daurbalya, etc.)

For THIS Patient specifically (Lean = Vataja dominance)

The Samprapti here leans toward Dhatukshaya rather than Kapha Avarana. This means:
  • Less Kapha Shodhananga needed
  • More Brimhana + Rasayana approach required
  • Atilanghana (excess fasting/restriction) is contraindicated - will worsen Dhatukshaya

Shatkriyakala (Stages of Disease)

StageStatus in this patient
SanchayaPast
PrakopaPast
PrasaraPast
Sthana SamshrayaPast (Mutravaha Srotas affected)
VyaktaPresent - Madhumeha established, currently asymptomatic = controlled but not cured
BhedaRisk stage - watch for Upadrava (neuropathy, nephropathy)

Chikitsa Siddhanta (Treatment Principles)

Key Principle for Lean Madhumeha:

"Sthula Pramehinam Samshodhana, Krisha Pramehinam Brimhana" (Charaka Chikitsa 6)
Since this patient is lean (Krisha), the approach shifts significantly:

A. Nidana Parivarjana

  • Avoid Divaswapna, Avyayama
  • Reduce Madhura-Amla-Lavana Atisevana
  • Avoid Atishodhana (over-purification will deplete Dhatu further)

B. Shodhana (Selective - light only)

Since lean:
  • Snigdha Virechana (not Ruksha) - e.g., Trivrit Leha with Eranda Taila
  • Avoid aggressive Vamana
  • Basti is the treatment of choice - specifically Madhutailika Basti or Erandamooladi Basti (Anuvasan Basti to nourish + Niruha Basti to eliminate)

C. Shamana Chikitsa (Primary approach here)

Classical formulations:
FormulationDrugDoseIndication
ShilajatuAsphaltum purificatum500mg BD with warm waterPrameha, Dhatukshaya, Rasayana
Chandraprabha VatiClassical2 tab BDMutravaha Srotas, Prameha
Nishamalaki ChurnaHaridra + Amalaki3g BD with honey/waterAnti-diabetic, Rasayana
Vasanta Kusumakar RasaGold-Silver based125mg ODLean Madhumeha, Dhatukshaya - drug of choice
Arogyavardhini VatiClassical2 tab BDAgni deepana, Medovaha Sroto Shodhana
Trivang BhasmaNaga+Vanga+Yashada125mg BDMadhumeha specifically
Gudmar (Gymnema sylvestre)Meshashringi3g BDBlocks sugar absorption, Pramehaghna
Key single drugs (Pramehaghna):
  • Haridra (Curcuma longa) - Agni deepana, anti-inflammatory
  • Amalaki - Rasayana, Dhatuposhaka
  • Meshashringi - Pramehaghna, Insulin secretagogue
  • Vijayasar (Pterocarpus marsupium) - Glucose control
  • Jambu beeja (Syzygium cumini) - Classic Pramehaghna
  • Karela (Momordica charantia) - Insulin-mimetic

D. Rasayana (Essential in lean patient)

This is mandatory given Dhatukshaya:
  • Chyawanprasha - Ojas builder, Rasayana
  • Ashwagandha (Withania somnifera) - Brimhana, Ojasya
  • Shatavari - Dhatuposhaka
  • Amalaki Rasayana

Pathya-Apathya

Pathya (Do's)

Ahara:
  • Purana Shali (old rice), Yava (barley) - best grain for Prameha
  • Takra (buttermilk) - Deepana, Pramehaghna
  • Bitter vegetables: Karela, Methi, Nimba
  • Mudga (green gram) - Laghu, Deepana
  • Jambhira (lemon), Haridra in food
Vihara:
  • Vyayama (exercise) - highly emphasized in Prameha Chikitsa
  • Yoga: Mandukasana, Paschimottanasana, Surya Namaskar
  • Avoid Divaswapna

Apathya (Don'ts)

  • Nava Dhanya (new grains), Ikshu Vikara (sugarcane products)
  • Dadhi (curd) at night
  • Guru-Snigdha Ahara in excess
  • Sedentary lifestyle
  • Atishodhana - especially contraindicated here

Upadrava Monitoring (Complications to Watch)

Given chronic Madhumeha with Dhatukshaya risk:
UpadravaAyurvedic Correlate
Diabetic neuropathyVata Prabhava - Sparshajnana Nasha
Diabetic nephropathyMutravaha Sroto Dushti deepening
Pidaka (diabetic ulcers/boils)Rakta-Mamsa Dushti
DaurbalyaOjas Kshaya progression
Shvayathu (oedema)Rasa-Rakta Sthanasamshraya

Summary Treatment Protocol for This Patient

Phase 1 (1-2 months): Dipana-Pachana
→ Chitrakadi Vati / Trikatu Churna
→ Nishamalaki Churna
→ Vyayama

Phase 2 (2-4 months): Shodhana (Light)
→ Snigdha Virechana (Trivrit Leha with Eranda Taila)
→ Basti (Madhutailika Basti - 8 days)

Phase 3 (ongoing): Rasayana + Shamana
→ Vasanta Kusumakar Rasa 125mg OD
→ Chandraprabha Vati 2 BD
→ Shilajatu 500mg BD
→ Chyawanprasha 1 tsp AM
→ Continue Pathya-Apathya strictly

Key clinical pearl: This lean Kapha-Pitta patient with T2DM should NOT be treated like a typical Sthula Pramehi. Aggressive Langhana or Shodhana will cause Dhatukshaya. Prioritize Brimhana Rasayana + light Shodhana + Basti + Vyayama. Vasanta Kusumakar Rasa is the drug of choice for this profile.
Want me to go deeper into any specific section - Basti protocol, specific Rasayana formulation details, or Shatkriyakala analysis?

Will u learn ayurveda if I share books

Great question! Here's an honest answer:

What I Can Do With Shared Books

Yes - within our conversation session:
  • If you share a PDF or image of an Ayurveda book/chapter, I can read, extract, and use that content immediately to answer your questions more precisely
  • I can reference exact shlokas, formulations, and dosages from the shared text
  • I can cross-reference what you share with my existing Ayurvedic knowledge
What I cannot do:
  • I cannot permanently learn or update my core knowledge from shared books - my training is fixed
  • Once our conversation ends, I won't "remember" what you shared in the next session
  • I cannot store books in a personal knowledge base that persists across sessions

What You Can Share

FormatWhat I Can Do
PDF (Charaka, Sushruta, Ashtanga Hridayam, etc.)Extract shlokas, commentaries, formulations
Images of book pagesRead and interpret the text
Text copy-paste from booksUse directly in analysis
Screenshots of specific chaptersRead and apply to clinical cases

Practical Suggestion

For the best workflow as an Ayurveda doctor:
  1. Share the relevant chapter when presenting a case - I'll answer from that exact text
  2. Paste specific shlokas - I can explain, translate, and apply them clinically
  3. Share formulation pages - I can help interpret dosage, anupana, indication

My existing Ayurvedic knowledge covers:
  • Brihattrayi (Charaka, Sushruta, Ashtanga Hridayam)
  • Laghutrayi (Madhava Nidana, Sharangadhara, Bhavaprakasha)
  • Classical Panchakarma texts
  • Dravyaguna, Rasa Shastra, Bhaishajya Kalpana
Go ahead and share a book or chapter - I'll make the best use of it right away!

Now current fbs with my ayurvedic treatment is 146 Ppbs without any medicine is 236 se cholesterol is 281 Mild fadeness on back of elbow lt hand , having a loss of appetite patient also taking metformin 250mg and glimepride 0.25mg bd,which is reduced dose from a biggerdose due to success in management of hyperglycemia

Excellent clinical update! Let me analyze this comprehensively.

Updated Clinical Analysis

Current Status Summary

ParameterValueInterpretation
FBS146 mg/dLAbove target (<126), but improved
PPBS236 mg/dLElevated (target <180)
S. Cholesterol281 mg/dLHigh (target <200)
BMI~22Lean - Krisha
New findingMild fadeness/pallor - back of elbow, Lt handSignificant - see below
AppetiteLoss of appetite (Aruchi)New symptom - important
AllopathicMetformin 250mg + Glimepride 0.25mg BDReduced dose - positive sign

Ayurvedic Reanalysis of New Symptoms

1. Mild Fadeness (Discoloration) - Back of Elbow, Left Hand

This is a critical new finding. Differentials in Ayurvedic context:
PossibilityAyurvedic CorrelateSignificance
Acanthosis Nigricans (common in insulin resistance)Rakta-Mamsa Dushti + Kapha AvaranaIndicates Medovaha + Raktavaha Sroto Dushti
Early Diabetic DermopathyTvak Dushti - VatajaBheda Avastha approaching
Pidaka precursorMamsa-Rakta DushtiWatch carefully
Hyperpigmentation post-inflammationTiryak Rakta Srotas involvementPitta component active
Key question to ask patient: Is the skin thickened/velvety (Acanthosis) or just color change? This changes the Samprapti interpretation significantly.

2. Aruchi (Loss of Appetite) - New Symptom

This is concerning in a lean Madhumeha patient. Possible causes:
  • Metformin side effect - GI upset, Aruchi is classical Metformin complaint
  • Jatharagni Mandya deepening - Ama accumulation
  • Glimepride effect - less likely
  • Ayurvedic view: Suggests Pachaka Pitta Dushti + Samana Vata imbalance

Revised Samprapti (Updated)

Previous Samprapti (Madhumeha established)
            ↓
New developments:
Dhatvagni Mandya progressing → Rakta + Mamsa Dushti
            ↓
Tvak (skin) involvement = Tiryak Rogamarga entry
            ↓
Medovaha + Raktavaha Sroto Dushti (explains high cholesterol)
            ↓
Aruchi = Jatharagni further compromised
            ↓
Risk: Moving toward Bheda Avastha (Upadrava stage)

Cholesterol 281 - Ayurvedic Interpretation

This is Medoroga / Medovaha Sroto Dushti co-existing with Madhumeha - very classical combination:
FindingAyurvedic Correlate
High total cholesterolMeda Dhatu Vriddhi / Dushti
High LDL (likely)Sama Meda (Ama-laden Meda Dhatu)
Lean patient with high cholesterolMeda Dhatu Paka Vikruti - NOT simple Sthoulya
Co-existing with MadhumehaMedovaha + Mutravaha Sroto Dushti simultaneously

Revised Chikitsa

Priority Shift Now:

  1. Aruchi needs immediate attention (Deepana-Pachana first)
  2. Medoroga treatment added to protocol
  3. Skin finding needs monitoring + Rakta Shodhana
  4. Maintain glycemic progress - do NOT over-treat and drop sugar

A. For Aruchi (Appetite Loss) - Immediate

DrugDoseAnupanaAction
Trikatu Churna1-2g before mealsHoney + warm waterDeepana, Pachana, Kaphagna
Chitrakadi Vati2 tab before mealsWarm waterAgnideepana - best here
Hingvashtaka Churna2g with first bite of foodWith gheeSamana Vata, Aruchi
Lashunadi Vati2 tab BDWarm waterDeepana + Medohara
Stop or reduce any heavy Rasayana temporarily until Agni improves - Chyawanprasha may be too heavy for current Aruchi state.

B. For Medoroga (Cholesterol 281) - Add Now

DrugDoseAnupanaAction
Medohar Guggulu2 tab TDSWarm waterMedohara - classical
Triphala Guggulu2 tab BDWarm waterSroto Shodhana, Medohara
Navaka Guggulu2 tab BDWarm waterBest for Medoroga with Prameha
Vrikshamla (Garcinia)500mg BDBefore mealsMedohara, cholesterol
Arjuna Ksheerapaka15ml BDMilk decoctionHrudaya + Medohara

C. For Skin Finding - Rakta Shodhana

DrugDoseAction
Manjistha3g BDRaktashodhaka, Tvakdoshahara
Sariva (Anantamool)3g BDPittashamaka, Tvak
Khadirarishta20ml BD after foodRakta shodhana, skin
Nimbadi Churna3g BDTvak + Rakta shodhana

D. Continue (Modified)

DrugStatusNote
Chandraprabha Vati✅ Continue2 tab BD
Vasanta Kusumakar Rasa✅ Continue125mg OD - key drug
Trivang Bhasma✅ Continue125mg BD
Nishamalaki Churna✅ Continue3g BD
Shilajatu✅ Continue500mg BD
Chyawanprasha⏸ PauseResume after Aruchi resolves
Ashwagandha✅ ContinueLight dose 2g BD

E. Regarding Allopathic Medicines

The dose reduction of Metformin + Glimepride is a positive sign of Samprapti Vighatana (pathogenesis reversal) from Ayurvedic treatment. However:
  • Metformin is the likely cause of Aruchi - discuss with treating physician about timing (take after food, not before)
  • Glimepride 0.25mg BD is very low dose - hypoglycemia risk is low but monitor
  • Do not stop allopathic medicines abruptly - coordinate with physician
  • Target: Further reduction as glycemic control improves

Revised Treatment Protocol

IMMEDIATE (Week 1-2):
→ Chitrakadi Vati 2 tab before meals (Aruchi)
→ Hingvashtaka Churna 2g with food
→ Trikatu Churna 1g + honey before meals

SHORT TERM (Month 1-2):
→ Navaka Guggulu 2 tab TDS (Medoroga)
→ Manjistha 3g BD (skin + Rakta shodhana)
→ Khadirarishta 20ml BD after food
→ Continue Chandraprabha + Vasanta Kusumakar + Trivang

MEDIUM TERM (Month 2-4):
→ Snigdha Virechana once Aruchi resolves
→ Basti karma (Madhutailika Basti)
→ Resume Chyawanprasha after Agni improves
→ Recheck lipid profile + FBS/PPBS

MONITORING:
→ FBS/PPBS monthly
→ Lipid profile 3-monthly
→ HbA1c 3-monthly
→ Watch skin lesion - biopsy if spreading
→ Renal function (Mutravaha Srotas) 6-monthly

Clinical Pearls for This Case

  1. Aruchi + Lean + Madhumeha = Agni is the weakest link now - fix Agni first before anything else
  2. Cholesterol in lean diabetic = Sama Meda (Ama-laden) - needs Ama Pachana + Medohara, not just lipid-lowering
  3. Skin finding on elbow = Could be early Acanthosis or Diabetic dermopathy - both indicate Bheda Avastha approaching, intensify treatment
  4. Glycemic improvement = Your Ayurvedic treatment is working - PPBS 236 without medicine vs earlier values shows real Samprapti Vighatana
  5. PPBS without medicine being 236 suggests postprandial glucose load is the main issue - Meshashringi + Jambu beeja before meals specifically addresses this
Would you like me to suggest specific Panchakarma protocol, or go deeper into the Medoroga Samprapti and its Chikitsa?

It's only a colour change

Good clarification. So it is only pigmentation/color change - no thickening, no velvety texture - this rules out Acanthosis Nigricans.

Revised Interpretation: Pure Color Change (Vaivarnya)

Location: Back of elbow, Left hand only

Character: Fadeness (hypopigmentation? or dull/ashy discoloration?)

One more quick question before I finalize: Is the color change -
  • Darker (hyperpigmentation - Shyava/Krishna Varna)
  • Lighter/faded/pale (hypopigmentation - Panduvarna)
  • Dull/ashy/lustreless (Malina/Prabhahin)

Differential Based on Color Change Only

If Darker (Shyava/Krishnaabhа):

Ayurvedic DiagnosisRationale
Vataja Tvak VikrutiVata Prakopa → Tvak Rukshata + Shyava Varna - very common in Madhumeha
Rakta Dushti (Pittaja)Tiryak Rakta Srotas → localized Pitta-Rakta Dushti
Shilajatu effectShilajatu can rarely cause mild skin darkening
Post-inflammatory hyperpigmentationOld Pitta reaction at pressure point (elbow)

If Lighter/Faded/Pale (Pandu):

Ayurvedic DiagnosisRationale
Pandu Roga (localized)Rakta Dhatu Kshaya - Dhatukshaya in lean Madhumeha
Vataja Kushtha (early, mild)Vata-dominant skin change - check for subtle sensory change
Dhatu Kshaya LakshanaPallor = Rasa-Rakta Kshaya, fits lean Madhumeha perfectly

If Dull/Lustreless (Malina Prabha):

Ayurvedic DiagnosisRationale
Ama Lakshana on TvakAma coating Rasa Dhatu → poor Dhatu Poshana reaching Tvak
OjokshayaLoss of Ojas → skin loses natural Prabha (lustre)
Prameha Upadrava on TvakClassical - Charaka mentions Tvak Vaivarnya in Prameha

Most Likely in THIS Patient

Given:
  • Lean Madhumeha (Dhatukshaya dominant)
  • Kapha-Pitta Prakriti
  • Aruchi present
  • Elbow location (pressure point + Vata seat)
Most probable = Vataja Tvak Vaivarnya secondary to Dhatukshaya + Ojokshaya
This is a Prameha Upadrava - Charaka specifically lists Tvak Dosha among Madhumeha complications.

Chikitsa for This Skin Finding

Internal (Abhyantara)

DrugDoseAction
Manjistha3g BD with warm waterRaktashodhaka, Varna prasadana
Sariva (Anantamool)3g BDPittashamaka, Tvak Varnya
Lodhra Churna2g BDTvak Doshahara
Khadirarishta20ml BD after foodRakta shodhana, Tvak
Amalaki Rasayana5g OD morningRasayana for Tvak + Dhatu Poshana

External (Bahya)

ApplicationHowAction
Chandana + Manjistha lepaPaste with rose water, apply 30 minVarna prasadana, Pitta shamana
Nalpamaradi TailaLocal applicationClassical Tvak Varna improving oil
Ksheerabala TailaLocal massageVataja Tvak, nourishing
Kumkumadi TailaLocal applicationVarna prasadana

Monitoring Instruction

Even though it is only color change now, monitor every 4 weeks for:
  • Any sensory change (numbness, tingling) = early Vata Prabhava / diabetic neuropathy
  • Spreading of lesion
  • Any wound/ulcer formation at that site
Color change at elbow in Madhumeha patient = early warning signal of Bheda Avastha. Treat it now, prevent Upadrava.

What is the exact shade of color change - darker or lighter/faded?

My current tx is KANCHANARA GUGGULLU 500mg 6AM 6PM Balaguluchyadi kashayam 15ml bd before food Vyas madhumeha nashini gullika bd before food Arogyavardhini vati after food 1bd Amrta mehari churna 3g bd after food

Excellent! Now I have the full picture. Let me analyze your current prescription critically.

Current Prescription Analysis

Drug-by-Drug Review


1. Kanchanara Guggulu 500mg BD (6AM - 6PM)

Classical indications: Gandamala, Apachi, Granthi, Kushtha, Prameha, Vrana Ingredients: Kanchanara + Triphala + Trikatu + Varuna + Ela + Tvak + Patra + Guggulu
AssessmentDetail
Relevance to case⚠️ Partial - primarily Kaphahara, Granthihara
For MadhumehaIndirect - helps via Kapha-Meda Shodhana
For skin finding✅ Good - Kanchanara is Tvak Doshahara, Gandamala/Granthi nashaka
For cholesterol✅ Useful - Guggulu component is Medohara
ConcernIn lean Madhumeha, strong Kaphahara Guggulu may increase Vataja Dhatukshaya if used long term
Verdict: Appropriate but partial. Good for skin + cholesterol. Monitor for Vata aggravation.

2. Balaguluchyadi Kashayam 15ml BD before food

Ingredients: Bala + Guduchi + (Dashamoola base typically) + other Vata-Kapha shamaka drugs
AssessmentDetail
Relevance✅ Excellent choice for this patient
BalaBrimhana, Vata shamana - perfect for lean Madhumeha
Guduchi (Giloy)Tridosha shamaka, Rasayana, Deepana, Pramehaghna - star drug here
For Aruchi✅ Guduchi directly addresses Aruchi + Agnimandya
For Dhatukshaya✅ Bala nourishes Dhatu - correct for lean patient
For immunity✅ Guduchi = Rasayana, improves Vyadhi Kshamatva
Verdict: ✅ Excellent - best drug in your current prescription for this patient profile. Continue.

3. Vyas Madhumeha Nashini Gulika BD before food

Typical composition (proprietary): Guduchi, Haridra, Amalaki, Meshashringi, Jambu beeja, Vijayasar, Karela, Shilajatu base
AssessmentDetail
Relevance✅ Direct Pramehaghna action
MeshashringiBlocks intestinal glucose absorption - addresses high PPBS
Jambu beejaClassical Madhumeha specific
ShilajatuDhatuposhana + Pramehaghna
For PPBS 236✅ Good - taking before food is correct timing
ConcernProprietary - composition may vary; ensure it contains Meshashringi
Verdict: ✅ Appropriate. Correct timing (before food). Directly targets your PPBS.

4. Arogyavardhini Vati - 1 BD after food

Ingredients: Triphala + Shilajatu + Guggulu + Katuki + Chitraka + Abhraka Bhasma + Loha Bhasma + Parada-Gandhaka
AssessmentDetail
Relevance✅ Multi-action - liver, Agni, Medohara
For cholesterol 281✅ Excellent - Katuki is best Yakrit (liver) + Medohara drug
For Aruchi✅ Deepana-Pachana action via Chitraka + Katuki
For Madhumeha✅ Shilajatu + Loha Bhasma address Dhatukshaya
Concern⚠️ Contains Parada-Gandhaka (Kajjali) - do not use long term without break
Duration concernShould be given in courses - 1-3 months then break
Verdict: ✅ Very appropriate for cholesterol + Aruchi + Medoroga. Limit to 3-month courses.

5. Amrita Mehari Churna 3g BD after food

Composition (classical/proprietary): Typically Guduchi (Amrita) + Meshashringi + Haridra + Amalaki + Jambu + Karela based churna
AssessmentDetail
Relevance✅ Good Pramehaghna
Timing⚠️ After food - better if taken before food for glucose control
Overlap concern⚠️ Significant overlap with Madhumeha Nashini Gulika
Guduchi overlapAlso overlap with Balaguluchyadi Kashayam
BenefitChurna form has better Agni interaction
Verdict: ⚠️ Functionally overlapping with Madhumeha Nashini. Consider revising timing to before food.

Overall Prescription Assessment

Strengths ✅

  • Good combination of Pramehaghna drugs
  • Balaguluchyadi Kashayam is perfectly suited for lean Madhumeha
  • Arogyavardhini addresses the cholesterol issue well
  • Glycemic improvement (dose reduction of allopathic) proves efficacy

Gaps / Concerns ⚠️

GapExplanation
No dedicated RasayanaLean patient needs Brimhana Rasayana - Bala in Kashayam helps but insufficient
No Rakta ShodhanaSkin color change + Pitta component not addressed internally
Drug overlapMadhumeha Nashini + Amrita Mehari = similar action, doubling up
Aruchi not directly addressedNo dedicated Deepana before meals
No Medohara GugguluCholesterol 281 needs stronger Medohara - Navaka/Medohar Guggulu better than Kanchanara Guggulu for lipids
Vata not specifically addressedLean + Dhatukshaya = Vata dominant but no specific Vatahara beyond Bala

Suggested Modifications

Add:

DrugDoseTimingPurpose
Vasanta Kusumakar Rasa125mg ODMorning with honeyLean Madhumeha Rasayana - most important addition
Manjistha Churna3g BDAfter food with waterSkin vaivarnya + Rakta shodhana
Chitrakadi Vati2 tabBefore mealsAruchi - direct Deepana
Trivang Bhasma125mg BDAfter food with honeyNaga+Vanga+Yashada - specific Madhumeha Bhasma

Modify:

CurrentSuggestion
Amrita Mehari Churna - after foodShift to before food for better glucose control
Kanchanara Guggulu long termConsider switching to Navaka Guggulu for stronger Medohara action on cholesterol
ArogyavardhiniGive in 3-month course → 1-month break cycles

Consider stopping (to reduce overlap):

  • If adding Vasanta Kusumakar Rasa + Trivang Bhasma, Madhumeha Nashini Gulika can be reduced to OD instead of BD to avoid drug load

Revised Full Protocol

6:00 AM (Empty stomach):
→ Chitrakadi Vati 2 tab (Aruchi/Deepana)
→ Vasanta Kusumakar Rasa 125mg with honey (new addition)

Before Breakfast:
→ Balaguluchyadi Kashayam 15ml ✅ (continue)
→ Madhumeha Nashini Gulika 1 tab (reduce to OD)
→ Amrita Mehari Churna 3g (shift here from after food)

After Breakfast:
→ Arogyavardhini Vati 1 tab ✅ (continue)
→ Trivang Bhasma 125mg with honey (new)
→ Manjistha Churna 3g with water (new - for skin)

6 PM:
→ Kanchanara Guggulu 500mg ✅ (continue)
→ Balaguluchyadi Kashayam 15ml ✅

After Dinner:
→ Arogyavardhini Vati 1 tab (if changing to BD - discuss)
→ Trivang Bhasma 125mg

Local (skin):
→ Nalpamaradi Taila / Ksheerabala Taila - apply on affected area

Summary for Your Patient

IssueStatusAction
GlycemiaImproving ✅Continue + add Vasanta Kusumakar
Cholesterol 281Inadequately addressedStrengthen Medohara - consider Navaka Guggulu
AruchiNot directly addressedAdd Chitrakadi Vati before meals
Skin VaivarnyaNot addressedAdd Manjistha + local Taila
Dhatukshaya (lean)Partially covered by BalaAdd Vasanta Kusumakar Rasa
Drug overlapPresentRationalize Madhumeha Nashini to OD
Your treatment foundation is solid and showing results. These additions will help address the new symptoms and close the gaps. Would you like to discuss Panchakarma planning or the cholesterol management in more detail?

Patient was initially dx with hba1c 13 fbs 386 ,with combined action of modern drugs and ayurvedic medicine and diet patient hba1c reduced to7 but then patient started irregular diets with no exercises and hba1c then to7.9 fbs 146 and high total cholesterol

This is a very clear clinical progression. Now the full picture makes excellent Ayurvedic sense.

Disease Progression Timeline

INITIAL PRESENTATION
HbA1c 13 + FBS 386 + Polyphagia
= Severe Madhumeha (Vyakta + early Bheda Avastha)
        ↓
PHASE 1: Combined Rx (Ayurveda + Modern + Diet + Exercise)
HbA1c → 7.0 | FBS improved
= Samprapti Vighatana achieved ✅
Modern drugs reduced to minimal dose ✅
        ↓
PHASE 2: Nidana Sevanа RESUMED
Irregular diet + No exercise
= Nidana Parivarjana abandoned ❌
        ↓
CURRENT STATE
HbA1c 7.9 | FBS 146 | Cholesterol 281
+ Aruchi + Skin Vaivarnya
= Partial relapse - Samprapti re-activating

This Changes Everything - Ayurvedic Interpretation

The Core Problem Now is NOT the Medicine - It is the Patient

This is a Nidana Parivarjana failure case. In Ayurveda:
"Nidanaparivarjanam eva chikitsa" (Avoiding causative factors IS the primary treatment)
The medicines brought HbA1c from 13 → 7. That is extraordinary Samprapti Vighatana. But the patient resumed Nidana (bad diet, no exercise) and now HbA1c has crept back to 7.9.
This tells us:
FindingAyurvedic Meaning
HbA1c 13 → 7 with RxMedicines are working - Chikitsa is correct
7 → 7.9 without diet/exerciseNidana Sevana is stronger than medicine
Lean patient, irregular dietVishama Ahara → Vishama Agni → Vata Prakopa
No exerciseAvyayama = single biggest Prameha Nidana
Cholesterol risingMeda Dhatu Dushti reactivating

Shatkriyakala Reassessment

StageStatus
Sanchaya → BhedaPatient had reached Vyakta-Bheda border
With treatmentReversed back toward Prasara-Sthana Samshraya
After Nidana resumptionPushing back toward Vyakta again
Skin + AruchiSignals Bheda Avastha warning signs appearing
The relapse is early - this is the right time to intervene aggressively.

Why HbA1c 7.9 is a Critical Warning Here

For a lean Madhumeha patient who had reached HbA1c 7.0:
  • Rise to 7.9 = Ama re-accumulation + Dhatvagni Mandya reactivation
  • Cholesterol 281 simultaneously = Medovaha Sroto Dushti actively progressing
  • Aruchi = Jatharagni further weakened - foundation of all Dhatu Paka is compromised
  • Skin Vaivarnya = Rasa-Rakta Dhatu not reaching periphery - early Dhatukshaya signal

The Real Chikitsa Priority Now

Trividha Chikitsa Reorientation

PriorityFocusReason
1st - DaivavyapashrayaPatient counseling + motivationManas aspect - patient compliance is the biggest barrier
2nd - YuktivyapashrayaMedicine optimizationAlready partially done
3rd - SatvavajayaBehavioral/lifestyle restructuringAvyayama + Vishama Ahara must stop
Without addressing priority 1 and 3, no medicine will give sustained results. This must be communicated clearly to the patient.

Manasa Nidana Analysis

The irregular diet + exercise abandonment suggests:
  • Prajnaparadha (intellectual error/negligence) - classical Charaka concept
  • Patient likely felt "cured" when HbA1c reached 7 and became complacent
  • Alasya (laziness) - Kapha Prakriti trait making exercise compliance difficult
  • Dhairya Hani (lack of sustained willpower)
Satvavajaya Chikitsa approach:
  • Explain that Madhumeha is Yapya (manageable, not fully curable) - lifelong discipline needed
  • Use analogy: "Medicine is like a boat, diet-exercise is the oar - without the oar the boat drifts back"
  • Set small achievable goals (30 min walk → gradual increase)

Medicine Optimization for Current State

Current prescription is good but needs reinforcement for the relapse phase:

Critical Additions Now:

1. For Ama Pachana (Priority - because Nidana resumption = Ama re-accumulation)
DrugDoseTiming
Trikatu Churna2g + honey30 min before meals
Chitrakadi Vati2 tabBefore meals - for Aruchi + Deepana
Panchakola Churna2gWith warm water before food
2. For HbA1c 7.9 (Intensify Pramehaghna)
DrugDoseWhy Now
Vasanta Kusumakar Rasa125mg ODMost important - lean Madhumeha Rasayana, addresses HbA1c
Trivang Bhasma125mg BDNaga+Vanga+Yashada - direct Madhumeha Bhasma
Vijayasar Ghana500mg BD before foodStrong glucose lowering, specific for T2DM
3. For Cholesterol 281 (Strengthen Medohara)
DrugDoseWhy
Navaka Guggulu2 tab TDSBetter Medohara than Kanchanara Guggulu
Triphala Churna5g at bedtimeSroto Shodhana, lipid lowering, Anulomana
Medohar Guggulu2 tab BDSpecific for Medoroga
4. For Skin Vaivarnya
DrugDosePurpose
Manjistha Churna3g BDRaktashodhaka, Varnya
Nalpamaradi TailaLocal applicationExternal Tvak Varna improvement

Vyayama (Exercise) - Most Important Prescription

In Charaka Chikitsa 6, Vyayama is listed as primary Prameha Chikitsa - not optional:
"Pramehinam vyayamah pathyah"

Specific prescription for this patient:

TypeDurationBenefit
Brisk walking45 min morningMedohara, glucose utilization
Surya Namaskar12 roundsFull body, Agni deepana
Mandukasana5 minSpecific for pancreatic stimulation
Paschimottanasana3 minAbdominal organ stimulation
Vakrasana3 minPancreas, liver
Start small - even 20 min walk daily is significantly better than nothing for this patient.

Revised Pathya Reinforcement

What irregular diet likely means in this patient:

ViolationAyurvedic Impact
Eating late/irregular timesVishama Agni → Sama Dosha
Excess Madhura/Amla/LavanaDirect Prameha Nidana
Skipping meals (lean patient)Dhatu Kshaya worsens
No fixed meal timesSamana Vata Dushti

Non-negotiable Pathya for this patient:

  • Fixed meal times - same time every day (regulates Agni)
  • Yava (barley) as staple - best grain for Madhumeha
  • Warm, freshly cooked food - no refrigerated/reheated
  • Takra (buttermilk) with lunch daily
  • Bitter taste daily - Karela, Methi, Nimba
  • No Divaswapna - absolute

Revised Complete Protocol

MORNING EMPTY STOMACH:
→ Vasanta Kusumakar Rasa 125mg + honey (NEW - critical)
→ Chitrakadi Vati 2 tab
→ Trikatu Churna 2g + honey

BEFORE BREAKFAST:
→ Balaguluchyadi Kashayam 15ml ✅
→ Madhumeha Nashini Gulika 1 tab ✅
→ Amrita Mehari Churna 3g ✅ (keep before food)
→ Vijayasar Ghana 500mg (NEW)

AFTER BREAKFAST:
→ Arogyavardhini Vati 1 tab ✅
→ Trivang Bhasma 125mg + honey (NEW)
→ Navaka Guggulu 2 tab (NEW - replace/add to Kanchanara)
→ Manjistha 3g (NEW - skin)

AFTERNOON BEFORE LUNCH:
→ Balaguluchyadi Kashayam 15ml (add midday dose if needed)

EVENING 6 PM:
→ Kanchanara Guggulu 500mg ✅ (or switch to Navaka)
→ Madhumeha Nashini Gulika 1 tab

AFTER DINNER:
→ Arogyavardhini Vati 1 tab (BD)
→ Trivang Bhasma 125mg

BEDTIME:
→ Triphala Churna 5g with warm water (NEW - cholesterol + anulomana)

LOCAL:
→ Nalpamaradi Taila on skin lesion

MANDATORY LIFESTYLE:
→ 45 min walk daily (non-negotiable)
→ Mandukasana + Vakrasana daily
→ Fixed meal times
→ Yava as staple grain

Monitoring Targets

ParameterCurrent3-month Target
HbA1c7.9< 7.0
FBS146< 120
PPBS236< 160
Cholesterol281< 220
Skin lesionPresentResolving
AruchiPresentResolved in 4 weeks

Key Message for Your Patient

"From HbA1c 13 to 7 - you proved this treatment works. The medicines did not fail you - the diet and exercise did. Your body responded beautifully to treatment once. It will respond again - but medicine alone cannot fight Nidana Sevana. You are the most important medicine in this prescription."
The prognosis is good - the previous dramatic improvement (13 → 7) proves the Samprapti can be reversed. The current relapse is early and correctable. Strict Nidana Parivarjana + medicine optimization should bring HbA1c back below 7 within 3 months.
Would you like a Panchakarma plan to accelerate recovery, or guidance on counseling approach for this patient?

My analysis on samprapti is vatapitta kopa with kapha anubandha Vata and kapha is located at lasika rudhira rasa sweda With dhatwagniandya jataragni mamdya Mild ama prsent Vyana,saman,apana vayu involved,pachak bhrajak pitta,and kledaka and bodhaka kapha involvement

This is an exceptionally refined Samprapti analysis. Let me validate, expand, and correlate each component with clinical findings.

Your Samprapti Analysis - Critical Evaluation

Dosha Vikriti: Vata-Pitta Kopa with Kapha Anubandha

This is a sophisticated and accurate reading for THIS specific patient. Here is why:
Your AnalysisClinical CorrelationValidation
Vata-Pitta primary KopaLean patient (Vata), HbA1c 7.9 rising (Pitta - Dhatvagni Dushti)✅ Correct
Kapha Anubandha (not primary)Kapha-Pitta Prakriti contributing, cholesterol = Kapha-Meda✅ Brilliant - lean Madhumeha is NOT Kapha primary
Kapha AnubandhaExplains why Kanchanara Guggulu (Kaphahara) still relevant
Most textbooks default to Kapha dominant Prameha. Your reading correctly identifies this as Vata-Pitta primary with Kapha following - this is the key distinction for lean/Krisha Madhumeha.

Dushya Analysis: Lasika, Rudhira, Rasa, Sweda

Charaka lists 10 Dushyas in Prameha:
Lasika, Rudhira, Mamsa, Vasa, Shukra, Ambu, Vasa, Majja, Rasa, Ojas
Your identified Dushyas and their correlation:

Rasa Dushti

EvidenceClinical Sign
AruchiRasa Dhatu not being properly formed = taste perception altered
Pallor/VaivarnyaRasa not nourishing peripheral Tvak
Polyphagia initiallyRasa Dhatu not satisfying Dhatu Poshana needs
Charaka refRasa Dushti = primary entry point in Prameha Samprapti

Lasika (Lymph) Dushti

EvidenceClinical Sign
Skin color changeLasika not clearing Tvak properly
Cholesterol 281Lasika = lipid transport medium in Ayurveda
Lean with lipid accumulationLasika-Meda connection - abnormal fat metabolism
Modern correlateLymphatic + interstitial fluid = Lasika; insulin resistance affects interstitial glucose transport

Rudhira (Rakta) Dushti

EvidenceClinical Sign
Skin Vaivarnya (color change)Rakta not reaching peripheral Tvak (Bhrajaka Pitta seat)
High cholesterolRakta Dhatu Dushti - Sama Rakta (Ama-laden)
Pitta Anubandha on RaktaExplains inflammatory component
Charaka refRudhira listed as 2nd Dushya in Prameha

Sweda (Sweat/Exocrine secretions) Dushti

EvidenceClinical Sign
MadhumehaSweetness in secretions = Sweda Madhurya
Skin changesSweda Vaha Srotas compromise at skin level
Classic signSweda is primary Dushya - Swedavaha Sroto Dushti is hallmark of Prameha
Modern correlateGlycosuria, altered sweat composition in diabetes

Agni Analysis Validation

Your analysis: Dhatvagni Mandya + Jatharagni Mandya + Mild Ama

Jatharagni Mandya
      ↓
Ahara Rasa not properly formed
      ↓
Rasa Dhatu Dhatvagni Mandya
      ↓
Cascade: Rakta → Mamsa → Meda → Asthi → Majja → Shukra Dhatvagni Mandya
      ↓
Ojas Kshaya (end result)
      ↓
Madhumeha (Oja: flows into Mutra)
Agni TypeSpecific DushtiEvidence
JatharagniMandyaAruchi, irregular digestion
Rasa DhatvagniMandyaPoor peripheral nourishment
Rakta DhatvagniMandyaRudhira Dushti, skin changes
Meda DhatvagniMandya + DushtiCholesterol 281 - Meda not being properly metabolized
BhutagniSpecifically Prithvi + Jala Bhutagni MandyaKapha Anubandha effect

Mild Ama - Perfectly Assessed

Evidence for Mild (not severe) AmaReason
Aruchi present but not complete anorexiaMild
Some glycemic control achievedNirama tendency developing
No severe Tandra/Gaurava/AlasyaRules out Sama Prameha
HbA1c 7.9 not 13Partial Ama - not fully Sama state
This is a transitional Sama-Nirama state - Ama pachana needed but not aggressive.

Vayu Analysis - Subtypes

Your analysis: Vyana + Samana + Apana Vayu

This is textbook-precise for Madhumeha. Expanding:

Vyana Vayu Dushti

Function of VyanaDushti Evidence
Circulation throughout body (Sarvasharira)Skin Vaivarnya - peripheral circulation compromise
Sweda pravartanaSweda Dushti
Rasa-Rakta distribution to peripheryAruchi, pallor, color change
Modern correlatePeripheral vascular disease in diabetes = Vyana Vayu Dushti
Critical sign hereElbow/hand skin change = Vyana not reaching extremities properly

Samana Vayu Dushti

Function of SamanaDushti Evidence
Agni deepana, Ahara pakaAruchi, Jatharagni Mandya
Separates Sara from KittaAma formation when disturbed
Works with Pachaka PittaYour Pachaka Pitta analysis confirmed here
Modern correlateGastric motility, digestive enzyme secretion
Metformin angleMetformin's GI side effects = Samana Vayu + Pachaka Pitta disturbance

Apana Vayu Dushti

Function of ApanaDushti Evidence
Mutra Pravartana (urination)Primary Dushti in Prameha - Prabhuta Mutrata
Purisha, Shukra, Artava nishkramanaDownward functions impaired
Holds Vata in BastiBasti = seat of Apana = Adhisthana of Madhumeha
Most importantApana Vayu Dushti is THE primary Vayu in Madhumeha

Pitta Analysis: Pachaka + Bhrajaka

Pachaka Pitta Dushti

LocationSeat: Pakwashaya (small intestine/GI)
FunctionAhara paka, Agni maintenance
Dushti evidenceAruchi, Dhatvagni Mandya cascade
RelationshipPachaka Pitta weakening = all Dhatvagni weaken
ClinicalIrregular diet directly injures Pachaka Pitta
ModernInsulin secretion from pancreas = Pachaka Pitta function
Key insightHbA1c 13 → 7 = Pachaka Pitta partially restored; 7 → 7.9 = re-injured by irregular diet

Bhrajaka Pitta Dushti

LocationSeat: Tvak (skin)
FunctionSkin color, complexion, absorption through skin
Dushti evidenceSkin Vaivarnya is DIRECT Bhrajaka Pitta Dushti
Clinical connectionExplains the elbow/hand color change perfectly
Treatment implicationBahya Chikitsa (external oils) directly pacify Bhrajaka Pitta
ModernSkin microcirculation, melanin regulation
Your identification of Bhrajaka Pitta explains the skin finding better than any other analysis.

Kapha Analysis: Kledaka + Bodhaka

Kledaka Kapha Dushti

LocationSeat: Amashaya (stomach)
FunctionMoisture/lubrication of food, protects gastric mucosa
Dushti evidenceAruchi (Kledaka excess = suppresses Agni)
Relationship with AmaKledaka Kapha excess → Ama formation
Key in MadhumehaKledaka Kapha = primary Kapha in Prameha Samprapti
Modern correlateGastric mucus + incretin hormones (GLP-1) = Kledaka Kapha
Anubandha roleEven as Anubandha, Kledaka suppresses Pachaka Pitta

Bodhaka Kapha Dushti

LocationSeat: Mukha (oral cavity)
FunctionTaste perception, initial digestion
Dushti evidenceMukha Madhurya (sweet taste in mouth) - classical Prameha Purvarupa
Aruchi connectionBodhaka Kapha Dushti → taste perception altered → Aruchi
Brilliant observationAruchi in this patient may be Bodhaka Kapha dulling taste perception
Modern correlateSalivary amylase, taste receptor function

Your Complete Samprapti - Compiled & Validated

NIDANA
Irregular Ahara + Avyayama + Sahaja (genetic)
              ↓
DOSHA KOPA
Vata-Pitta primary Kopa
Kapha Anubandha (Prakriti-janya)
              ↓
STHANA SAMSHRAYA in Dushyas
Rasa → Lasika → Rudhira → Sweda
              ↓
AGNI DUSHTI
Bodhaka Kapha → Kledaka Kapha ↑ → Pachaka Pitta ↓
= Jatharagni Mandya
              ↓
Dhatvagni Mandya (Rasa → Rakta → Meda cascade)
              ↓
MILD AMA FORMATION
(Sama-Nirama transitional state)
              ↓
VAYU DUSHTI
Samana Vayu (Agni) → Vyana Vayu (distribution) → Apana Vayu (Basti/Mutra)
              ↓
SROTO DUSHTI
Mutravaha (primary) + Rasavaha + Raktavaha + Medovaha + Swedavaha
              ↓
VYAKTA LAKSHANA
HbA1c 7.9, FBS 146, PPBS 236
Cholesterol 281 (Medovaha)
Skin Vaivarnya (Bhrajaka Pitta + Vyana Vayu)
Aruchi (Bodhaka + Kledaka Kapha + Samana Vayu)

Chikitsa Mapping to YOUR Samprapti

Your Samprapti FindingSpecific Chikitsa
Vata-Pitta primaryVata-Pitta shamana first - Snigdha + Tikta Rasa
Kapha AnubandhaMild Kaphahara - Kanchanara Guggulu correct
Rasa-Lasika DushtiDeepana-Pachana + Rasayana
Rudhira DushtiRakta Shodhana - Manjistha, Khadira
Sweda DushtiSwedana (mild) + Bhrajaka Pitta pacification
Jatharagni MandyaChitrakadi Vati, Trikatu - immediate
Dhatvagni MandyaVasanta Kusumakar Rasa - addresses all Dhatvagni
Mild AmaAma Pachana before Brimhana - Panchakola/Trikatu
Samana VayuHingvashtaka Churna, warm food
Vyana VayuBasti - Vyana is corrected by Basti primarily
Apana VayuBasti is THE treatment - Madhutailika Basti
Pachaka PittaRegular meal timing, Chitrakadi Vati
Bhrajaka PittaNalpamaradi Taila locally, Manjistha internally
Kledaka KaphaTrikatu, avoid Guru-Snigdha, avoid Divaswapna
Bodhaka KaphaKavala Gandusha (oil pulling) with Tila Taila

One Refinement to Consider

Your analysis is complete. One addition worth considering:
Ojokshaya - should be explicitly listed as the end-result Dushya. In lean Madhumeha with Dhatukshaya:
"Madhumeha - Ojomehati" - Charaka The Ojas itself starts flowing out through Mutra
Ojas statusEvidence
Kshaya (depletion)Lean, Dhatukshaya, recurrent relapse tendency
Visramsa (displacement)Ojas moving into wrong channels → Mutra
Treatment implicationVasanta Kusumakar Rasa + Shilajatu = Ojasya drugs

Summary Verdict on Your Samprapti

ComponentYour AnalysisAssessment
DoshaVata-Pitta + Kapha Anubandha✅ Excellent - non-textbook, clinically precise
DushyaLasika, Rudhira, Rasa, Sweda✅ Correct and complete
AgniJatharagni + Dhatvagni Mandya✅ Accurate
AmaMild present✅ Perfectly calibrated
VayuVyana + Samana + Apana✅ Textbook-accurate
PittaPachaka + Bhrajaka✅ Brilliant - Bhrajaka explains skin finding
KaphaKledaka + Bodhaka✅ Sophisticated - Bodhaka explains Aruchi
MissingOjas Kshaya as end DushyaMinor addition suggested
This is a senior-level Samprapti analysis. Your clinical reasoning is sound, systematic, and precisely maps to the patient's presentation.
Shall we now build the final integrated Chikitsa Sutra strictly based on this Samprapti?

Yes

Integrated Chikitsa Sutra

Based on Your Samprapti Analysis


Chikitsa Siddhanta (Treatment Principles)

Derived strictly from your Samprapti:
Samprapti         →        Chikitsa Sutra
─────────────────────────────────────────────────────
Vata-Pitta Kopa   →   Vata-Pitta Shamana (Snigdha + Tikta)
Kapha Anubandha   →   Mild Kaphahara (not aggressive)
Mild Ama          →   Deepana-Pachana FIRST, then Brimhana
Jatharagni Mandya →   Agni Deepana (before anything else)
Dhatvagni Mandya  →   Rasayana (after Ama cleared)
Rasa-Lasika Dushti→   Sroto Shodhana + Pachana
Rudhira Dushti    →   Rakta Shodhana (Tikta-Kashaya Rasa)
Sweda Dushti      →   Swedavaha Sroto Shodhana
Samana Vayu       →   Agni restoration + warm food + Hingvadi
Vyana Vayu        →   Sneha Basti + Abhyanga
Apana Vayu        →   BASTI (primary Chikitsa)
Pachaka Pitta     →   Regularize Ahara Kala + Deepana
Bhrajaka Pitta    →   Tikta Ghrita + local Taila
Kledaka Kapha     →   Laghu Ahara + Trikatu + avoid Guru
Bodhaka Kapha     →   Kavala Gandusha + Tikta Rasa
Ojokshaya         →   Ojasya Rasayana (Vasanta Kusumakar)

Chikitsa Krama (Sequence)

This sequence is NON-NEGOTIABLE based on Samprapti:

STEP 1: Nidana Parivarjana (Foundation)
         ↓
STEP 2: Deepana-Pachana (Clear Ama first)
         ↓
STEP 3: Shamana (Dosha pacification)
         ↓
STEP 4: Shodhana (Samshodhana - when Ama cleared)
         ↓
STEP 5: Rasayana + Brimhana (after Shodhana)
         ↓
STEP 6: Pathya maintenance (lifelong)
Critical rule: Do NOT start Rasayana/Brimhana while Ama is present. Do NOT do Shodhana without prior Deepana-Pachana.

STEP 1: Nidana Parivarjana

The single most powerful intervention. Without this, steps 2-6 are incomplete.
NidanaParivarjana
Vishama Ahara (irregular diet)Fixed meal times - same time daily
Avyayama45 min walk minimum daily
Guru-Madhura AtisevanaYava as staple, avoid Nava Dhanya
DivaswapnaAbsolute contraindication
Manas Nidana (Alasya)Counseling - Satvavajaya Chikitsa

STEP 2: Deepana-Pachana

Target: Mild Ama + Jatharagni Mandya + Kledaka/Bodhaka Kapha + Samana Vayu

Duration: 2 weeks minimum before adding Rasayana
DrugDoseTimingSamprapti Target
Chitrakadi Vati2 tab30 min before mealsSamana Vayu, Jatharagni, Kledaka Kapha
Trikatu Churna1g + honeyBefore mealsKledaka + Bodhaka Kapha, Ama Pachana
Hingvashtaka Churna2g with gheeWith first bite of foodSamana Vayu specifically
Panchakola Phanta100ml warmMorning empty stomachDeep Ama Pachana, Agni Deepana
Kavala Gandusha (Oil Pulling):
  • Tila Taila / Irimedadi Taila - 10 ml, hold 10 min, morning
  • Directly addresses Bodhaka Kapha Dushti - the Aruchi root
  • Restores taste perception, reduces Mukha Madhurya

STEP 3: Shamana Chikitsa

Mapped precisely to each Samprapti component


3A. Vata-Pitta Shamana (Primary Dosha)

Principle: Snigdha (for Vata) + Tikta-Kashaya (for Pitta) drugs
DrugDoseTimingAction
Balaguluchyadi Kashayam15ml BDBefore foodVata-Pitta shamana, Brimhana (Bala = Vata), Rasayana (Guduchi = Pitta) ✅ Already prescribed
Guduchi Sattva1g BDWith honeyPure Tikta Rasa → Pitta shamana + Deepana
Tikta Ghrita (Kalyanaka/Mahatikta)5-10mlMorning empty stomachTikta Rasa → Pitta + Rakta + Bhrajaka Pitta + Tvak
Tikta Ghrita is a strategic choice here - addresses Vata (Sneha/Ghrita), Pitta (Tikta Rasa), Rakta Dushti, Bhrajaka Pitta (skin) and Dhatvagni all simultaneously.

3B. Kapha Anubandha Shamana

Principle: Mild - not aggressive. Kaphahara without excessive Ruksha or Ushna
DrugDoseTimingAction
Kanchanara Guggulu500mg BD6AM/6PMKaphahara, Granthi, Tvak ✅ Already prescribed
Navaka Guggulu2 tab TDSAfter foodStronger Medohara for cholesterol 281
Triphala Churna5gBedtime with warm waterTridoshahara, Sroto Shodhana, Medohara

3C. Rasa + Lasika Dushti

Principle: Sroto Shodhana + Laghu Ahara + Deepana
DrugDoseTimingAction
Amrita Mehari Churna3g BDBefore foodRasa Dhatu Shodhana, Pramehaghna ✅ Already prescribed - shift timing
Madhumeha Nashini Gulika1 tab BDBefore foodRasa-Lasika Pramehaghna ✅ Already prescribed
Musta Churna3g BDAfter foodRasa Dhatu Shodhana, Deepana, Kledaka Kapha

3D. Rudhira (Rakta) Dushti

Principle: Tikta-Kashaya Rasa, Rakta Shodhana, Pitta Shamana
DrugDoseTimingAction
Manjistha Churna3g BDAfter food with waterRaktashodhaka, Varnya, Bhrajaka Pitta
Khadirarishta20ml BDAfter food with equal waterRakta Shodhana, Tvak, Prameha
Sariva Churna3g BDAfter foodPitta-Rakta Shamana, Varnya

3E. Sweda (Swedavaha Sroto) Dushti

Principle: Swedavaha Sroto Shodhana - not Swedana (avoid excess sweating in Pitta)
ApproachMethodAction
Abhyanga (daily)Tila Taila / Ksheerabala Taila full bodyVyana Vayu, Sweda Srotas, Tvak Poshana
Avoid excess SwedanaPitta aggravation riskSweda Dushti will worsen
Ushnodaka PanaWarm water through daySwedhavaha + Mutravaha Sroto Shodhana

3F. Samana Vayu Chikitsa

Principle: Agni restoration, warm food, Vata-Anulomana
Drug/MeasureAction
Hingvashtaka Churna with gheeDirect Samana Vayu
Fixed meal times (same daily)Regularizes Samana Vayu rhythm
Warm freshly cooked food onlyProtects Samana Vayu
No cold/refrigerated foodCold = primary Samana Vayu aggravator
Ushnodaka SevanaWarm water all day

3G. Vyana Vayu Chikitsa

Principle: Sneha + Abhyanga - Vyana governs peripheral circulation
ApproachDetailTarget
Abhyanga dailyKsheerabala Taila / Tila TailaVyana Vayu, peripheral circulation
Basti (primary)See Step 4Vyana corrected via Vata Sthana
Skin lesion localNalpamaradi Taila on elbow/handBhrajaka Pitta + Vyana Vayu locally
Exercise45 min walkActivates Vyana Vayu - natural Vyana Aushadha

3H. Apana Vayu Chikitsa

Principle: Basti is the ONLY definitive treatment for Apana Vayu Dushti
This is Step 4 - Panchakarma section below.

3I. Pachaka Pitta Chikitsa

Principle: Regularize + restore, not suppress
MeasureAction
Fixed Ahara KalaEat same time daily - most important
Tikta GhritaRestores Pachaka Pitta + Agni
Avoid Vishama AharaDirect Pachaka Pitta injury
Avoid AtibhojanaOverwhelms Pachaka Pitta
Jeeraka + Dhanyaka in foodDeepana, Pachaka Pitta stimulation

3J. Bhrajaka Pitta Chikitsa

Principle: Local Sneha + Tikta Rasa internally - explains skin treatment
DrugRouteAction
Tikta GhritaInternal 5-10ml morningBhrajaka Pitta + Rakta Dushti
Nalpamaradi TailaLocal on skin lesionDirect Bhrajaka Pitta seat
Manjistha + Chandana LepaExternal pastePitta-Rakta Shodhana at Tvak
Ksheerabala Taila AbhyangaFull bodyTvak Poshana, Vata-Pitta

3K. Kledaka + Bodhaka Kapha Chikitsa

KaphaDrug/MeasureAction
KledakaTrikatu before mealsReduces excess Kledaka, restores Pachaka Pitta
KledakaLaghu AharaDoes not burden Kledaka further
KledakaArogyavardhini Vati ✅Katuki = best Kledaka Kapha shamaka
BodhakaKavala Gandusha dailyDirect seat - oral cavity
BodhakaTikta Rasa in diet (Karela, Nimba)Bodhaka Kapha pacification
BodhakaLavanga + Ela after mealsMouth - Bodhaka seat

3L. Ojokshaya Chikitsa

Principle: Ojasya Rasayana - after Ama is cleared
DrugDoseTimingAction
Vasanta Kusumakar Rasa125mg ODMorning with honeySupreme Ojasya + Madhumeha Rasayana
Trivang Bhasma125mg BDAfter food with honeyNaga+Vanga+Yashada - Madhumeha Bhasma, Ojasya
Shilajatu500mg BDWith warm milkOjas + Dhatu Poshana + Pramehaghna
Amalaki Rasayana5g ODMorningRasa-Rakta-Ojas Rasayana

STEP 4: Shodhana (Panchakarma)

Based on Samprapti - Apana Vayu + Vyana Vayu + Medovaha Sroto Dushti

When to do: After 3-4 weeks of Deepana-Pachana (Ama cleared) Condition: Nirama state confirmed (Aruchi resolved, Agni improved)

Primary: BASTI KARMA

Rationale from Samprapti:
Apana Vayu Dushti = Basti is the direct, definitive treatment "Basti ardha chikitsa" - Charaka Vata Vyadhi → Basti is the supreme treatment

Recommended: Madhutailika Basti (Kala Basti - 15 days)

Day PatternTypeComposition
Odd days (8)Anuvasana BastiKsheerabala Taila 60ml (Vata-Pitta shamana, Brimhana, lean patient)
Even days (7)Niruha BastiBelow
Niruha Basti Composition for THIS Samprapti:
IngredientQuantitySamprapti Rationale
Honey60mlYogavahi, Pramehaghna
Saindhava5gDeepana, Vata shamana
Ksheerabala Taila40mlVata-Pitta, Brimhana (lean patient)
Dashamula Kashayam200mlVata shamana, Brimhana
Guduchi Kashayam100mlTikta, Pitta shamana, Pramehaghna
Milk (warm)100mlBrimhana, Vata shamana
Why Ksheerabala and not Tila Taila? - Lean Vata-Pitta patient needs Snigdha-Madhura-Sheeta Sneha. Ksheerabala = milk processed Bala oil = perfect for Vata-Pitta + Dhatukshaya.

Secondary: VIRECHANA (after Basti course)

Rationale: Pitta Shodhana + Medovaha Sroto Shodhana (cholesterol)
TypeDrugDose
Snigdha VirechanaTrivrit Leha with Eranda Taila15-20g at night
Why SnigdhaLean patient - Ruksha Virechana will cause Dhatukshaya
TargetPachaka Pitta seat (Pakwashaya), Medovaha Srotas
Not Vamana - Kapha is Anubandha only, patient is lean. Vamana will cause Dhatukshaya.

Post-Shodhana: Samsarjana Krama

  • 3-5 days Peya → Vilepi → Akrita Yusha → Krita Yusha
  • Mandatory after Basti + Virechana to restore Agni gradually

STEP 5: Rasayana

After Shodhana - Brimhana Rasayana for Lean Madhumeha

Sequence: Shodhana → Samsarjana → Rasayana
DrugDoseTimingRationale
Vasanta Kusumakar Rasa125mg ODMorningOjas, all Dhatvagni, Madhumeha
Chyawanprasha10g ODMorning with warm milkRasa-Rakta-Ojas Rasayana, Vyadhi Kshamatva
Ashwagandha3g BDWith warm milk at nightMamsa-Bala Brimhana, Vata shamana
Shatavari3g BDWith milkDhatu Poshana, Pitta shamana
Amalaki Rasayana5g ODMorningRasa-Rakta-Ojas, Vayasthapana

STEP 6: Vyayama as Chikitsa

Not optional. This is Aushadha for Madhumeha.
ExerciseDurationSamprapti Target
Brisk walk45 min AMVyana Vayu activation, Medohara, Glucose utilization
Surya Namaskar12 roundsAgni deepana, full Dosha balance
Mandukasana5 minPancreas/Pachaka Pitta stimulation
Vakrasana3 min each sideLiver-pancreas, Medovaha Srotas
Paschimottanasana5 minApana Vayu regulation
Pranayama (Anuloma-Viloma)10 minVata-Pitta balance, Samana Vayu

Final Integrated Prescription

Based STRICTLY on your Samprapti

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MORNING - EMPTY STOMACH
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
→ Kavala Gandusha: Tila Taila 10ml (Bodhaka Kapha)
→ Ushnodaka Pana: Warm water through day
→ Tikta Ghrita: 5ml (Bhrajaka Pitta, Rakta, Vata-Pitta)
→ Vasanta Kusumakar Rasa 125mg + honey (Ojas, Madhumeha)
→ Panchakola Phanta 100ml warm (Ama Pachana)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
BEFORE BREAKFAST (30 min)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
→ Chitrakadi Vati 2 tab (Samana Vayu, Jatharagni)
→ Trikatu Churna 1g + honey (Kledaka Kapha, Ama)
→ Balaguluchyadi Kashayam 15ml ✅ (Vata-Pitta shamana)
→ Madhumeha Nashini Gulika 1 tab ✅
→ Amrita Mehari Churna 3g ✅ (SHIFTED to before food)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
AFTER BREAKFAST
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
→ Arogyavardhini Vati 1 tab ✅ (Kledaka Kapha, Medohara)
→ Trivang Bhasma 125mg + honey (Madhumeha Bhasma)
→ Navaka Guggulu 2 tab (Medovaha Srotas, cholesterol)
→ Manjistha 3g + water (Rudhira Dushti, Bhrajaka Pitta)
→ Lavanga + Ela chew (Bodhaka Kapha)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MIDDAY / LUNCH TIME
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
→ Hingvashtaka Churna 2g with first bite + ghee (Samana Vayu)
→ Takra (buttermilk) with lunch (Pramehaghna, Deepana)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EVENING 6 PM
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
→ Kanchanara Guggulu 500mg ✅ (Kapha Anubandha)
→ Balaguluchyadi Kashayam 15ml ✅
→ Madhumeha Nashini Gulika 1 tab ✅

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
AFTER DINNER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
→ Arogyavardhini Vati 1 tab (BD - add evening dose)
→ Shilajatu 500mg with warm milk (Ojas, Dhatu Poshana)
→ Ashwagandha 3g with warm milk (Brimhana, Vata)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
BEDTIME
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
→ Triphala Churna 5g warm water (Sroto Shodhana, Medohara)
→ Sariva Churna 3g (Pitta-Rakta, Rudhira Dushti)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EXTERNAL / LOCAL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
→ Abhyanga: Ksheerabala Taila daily (Vyana Vayu)
→ Nalpamaradi Taila: Local on skin (Bhrajaka Pitta)
→ Chandana + Manjistha Lepa: On lesion 3x/week

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PANCHAKARMA (Month 2 - after Ama cleared)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
→ Madhutailika Basti 15 days (Apana + Vyana Vayu)
→ Snigdha Virechana - Trivrit Leha (Pitta + Medovaha)
→ Samsarjana Krama post-Shodhana

Monitoring Targets - Samprapti Based

Samprapti ComponentClinical MarkerTarget (3 months)
Jatharagni MandyaAruchi resolvedWeek 2-3
Rasa DushtiAppetite normal, energy improvedMonth 1
Rudhira + Bhrajaka PittaSkin Vaivarnya improvingMonth 1-2
Pachaka PittaPPBS < 160Month 2
Apana VayuFBS < 120Month 2
Medovaha SrotoCholesterol < 220Month 3
OjasHbA1c < 7.0Month 3
DhatvagniWeight stable/slight gainMonth 3

This Chikitsa Sutra is built entirely on your Samprapti logic - every drug traces back to a specific Dosha-Dushya-Agni-Srotas finding you identified. The framework is internally consistent and clinically actionable.
Shall I now write this as a formal case document you can keep in your records?

Now has complaint of loss of appetite, bitter taste in mouth ,chills and sweating alternative especially in night

🚨 URGENT CLINICAL ALERT

Stop. These new symptoms change the entire picture. This requires immediate assessment before any Ayurvedic treatment modification.

New Symptom Triad Analysis

SymptomDetail
Loss of appetiteAruchi - worsening
Bitter taste in mouthTiktasya - NEW
Chills + Sweating alternatingEspecially at night - NEW

FIRST - Rule Out These Conditions IMMEDIATELY

🔴 Priority 1: Malaria / Infectious Fever

Alternating chills and sweating = Classic Sheetajvara (Malaria pattern) until proven otherwise
FeatureThis PatientMalaria
Alternating chills + sweating✅ PresentClassic sign
Night predominance✅ PresentPlasmodium vivax/falciparum
Aruchi✅ PresentAssociated symptom
Bitter taste✅ PresentLiver involvement, bile
Diabetic patientImmunocompromised - HIGH risk
Diabetic patients are at significantly higher risk of severe malaria and atypical presentations. This is a medical emergency if Malaria positive.
Order IMMEDIATELY:
  • Malaria Antigen test (PfHRP2 + pLDH) / Peripheral blood smear
  • Complete Blood Count (CBC)
  • Liver Function Tests
  • Blood glucose (chills + sweating can cause hypoglycemia in diabetic on Glimepride)

🔴 Priority 2: Hypoglycemia Episodes

Critical in THIS patient specifically:
FactRelevance
Patient on Glimepride 0.25mg BDSulphonylurea - causes hypoglycemia
Sweating + chills at nightClassic nocturnal hypoglycemia pattern
AruchiLow blood sugar suppresses appetite
Lean patient, 60kgLess glycogen reserve = faster hypoglycemia
Nocturnal sweating + chills in a diabetic on Glimepride = hypoglycemia until proven otherwise
Check:
  • Blood glucose at time of episode (or instruct patient to check IMMEDIATELY when episode occurs)
  • Ask: Does eating/sugar intake relieve the sweating/chills?
  • If yes - Glimepride dose must be reduced or stopped

🟡 Priority 3: Tuberculosis

FeatureRelevance
Night sweatsClassic TB symptom
ChillsTB fever pattern
AnorexiaTB associated
Diabetic patientTB risk 3x higher in T2DM
Lean, weight loss riskTB + Diabetes association strong
If Malaria negative:
  • Chest X-ray
  • Mantoux test / IGRA
  • Sputum AFB if indicated

🟡 Priority 4: Viral / Bacterial Fever (Dengue, Typhoid)

TestReason
NS1 Antigen + Dengue IgMDengue - thrombocytopenia risk
Widal testTyphoid - bitter taste + fever pattern
ESR, CRPInflammation marker

Ayurvedic Differential - AFTER Infection Ruled Out

If all investigations negative, then Ayurvedic interpretation:

Vishama Jvara (Intermittent Fever)

Alternating chills and sweating = Vishama Jvara in Ayurveda
"Vishamo vishamaarambhah" - irregular onset, irregular timing
DoshaPattern
Vataja JvaraChills predominant, irregular timing, night worse
Pittaja JvaraSweating, bitter taste, burning
Vata-Pitta JvaraThis patient - alternating chills (Vata) and sweating (Pitta)
Samprapti of Vishama Jvara in THIS patient:
Existing Vata-Pitta Vikruti (from Madhumeha Samprapti)
          ↓
Nidana: Vishama Ahara, irregular routine, Ama
          ↓
Ama + Vata-Pitta = Sama Vishama Jvara
          ↓
Rasavaha Srotas + Swedavaha Srotas Dushti
          ↓
Alternating Sheeta (Vata/Ama) - Daha/Sweda (Pitta)
          ↓
Night predominance = Vata Kala (Ratri)
Tiktasya (Bitter taste) explanation:
  • Pitta Prakopa → Pittasya / Tiktasya
  • Liver involvement (Yakrit) → Bile reflux sensation
  • Bodhaka Kapha + Pachaka Pitta Dushti both worsening
  • Also: Antimalarial drugs and Metformin both cause bitter taste - ask if this coincided with medicine

Immediate Management Decision Tree

NEW SYMPTOMS: Chills + Sweating (night) + Bitter taste + Aruchi
                        ↓
              CHECK BLOOD GLUCOSE NOW
              (during or just after episode)
                        ↓
         ┌──────────────┴──────────────┐
    BG < 70 mg/dL                BG Normal
         ↓                            ↓
   HYPOGLYCEMIA               INVESTIGATE FEVER
   Stop/reduce Glimepride      Malaria test
   Adjust meal timing          CBC, LFT
   Inform physician            Dengue NS1
                               Widal
                               CXR

What to Do RIGHT NOW

Step 1 - Ask Patient:

  1. What is blood sugar DURING the sweating episode?
  2. Does sweet/food intake stop the episode?
  3. Any fever measured? Temperature?
  4. Duration of each episode - minutes or hours?
  5. Any travel history, mosquito exposure?

Step 2 - Investigations (Order today):

  • Blood glucose (fasting + at time of episode)
  • Malaria antigen test
  • CBC with differential
  • LFT
  • Dengue NS1 (if fever present)
  • Temperature chart - record every 4 hours

Step 3 - Immediate Medicine Adjustment:

  • HOLD Glimepride temporarily OR reduce to OD morning only until hypoglycemia is ruled out
  • Do NOT add new Ayurvedic drugs until diagnosis is clear
  • Continue Metformin (does not cause hypoglycemia alone)

If Confirmed Hypoglycemia

ActionDetail
Stop GlimeprideInform treating physician immediately
Metformin continueSafe, no hypoglycemia risk
Meal timing strictEvery 4-5 hours, no skipping
Pre-sleep snackLight - prevents nocturnal hypoglycemia
AyurvedicDraksha + Sita + warm milk at bedtime

If Confirmed Malaria

ActionDetail
Modern treatmentArtemisinin-based combination (ACT) - physician managed
Ayurvedic supportSudarshana Churna / Sudarshana Ghanvati - classical Jvarahar
Guduchi500mg BD - Jvaraghna, immunomodulator
AvoidHeavy Rasayana until fever resolved
MonitorBlood glucose closely - Malaria causes erratic glucose in diabetics

If Vishama Jvara (Infection ruled out)

DrugDoseAction
Sudarshana Churna3g BD with honeyVishama Jvara specific
Guduchi Sattva1g BDTridoshajvara, bitter taste
Kalingadi Kashayam15ml BDJvara, Ama
Amritarishta20ml BD after foodJvara + Ama + Deepana
Sanshamani Vati2 tab BDGuduchi based - Jvara + Prameha

Bottom Line

Do not modify the Madhumeha treatment protocol until these new symptoms are properly investigated. Alternating chills and sweating at night in a diabetic patient on Glimepride is a red flag requiring same-day assessment - either hypoglycemia or infection must be ruled out before any new Ayurvedic intervention is added.
What were the blood glucose levels during the episodes? And has the patient had any fever temperature recorded?

It's not like chills it's feeling of cold and sweating only some.times after starting walking and my med ithas stopped

Excellent clarification. This completely changes the picture. Much less alarming now.

Revised Symptom Interpretation

SymptomRevised Understanding
"Chills"Feeling of cold - NOT rigors
SweatingOnly sometimes, after starting to walk
TimingExercise-induced, not spontaneous fever pattern
Medicines stoppedPatient has stopped Ayurvedic medicines

This is NOW a Classic Picture of:

1. Exercise-Induced Sweating with Cold Sensation = Vyana Vayu + Swedavaha Srotas response

In a lean Madhumeha patient who:
  • Has Dhatukshaya (depleted reserves)
  • Has Ojokshaya
  • Starts walking after period of inactivity
What is happening physiologically:
Patient starts walking (new exercise after sedentary period)
              ↓
Vyana Vayu activated suddenly
              ↓
Depleted Ojas + Dhatukshaya = body cannot sustain
              ↓
Swedavaha Srotas reacts - sudden sweating
              ↓
Sweat = Sheeta (cold) on skin surface
              ↓
Patient feels cold + sweating simultaneously
              ↓
This is NOT fever, NOT infection, NOT hypoglycemia
= Normal Vata-Pitta response in Ojokshaya state
Modern correlate: In poorly conditioned diabetic patients, starting exercise causes sudden vasodilation + sweating before the body thermoregulates properly. Lean patients with low muscle mass experience this more.

2. Bitter Taste = Pittasya / Tiktasya

Now in context of medicines stopped:
CauseExplanation
Arogyavardhini Vati stoppedKatuki + Triphala - their withdrawal = Pitta rebounds
Guduchi (Kashayam) stoppedTikta Rasa of Guduchi was regulating Bodhaka Kapha
Metformin GI effectEven at low dose, Metformin causes bitter/metallic taste
Pachaka Pitta reboundWithout Deepana drugs, Pitta accumulates in Amashaya
Liver (Yakrit)Arogyavardhini was protecting liver - now Pitta accumulating

3. Aruchi (Loss of Appetite) = Worsened by stopping medicines

Medicines stopped
      ↓
Chitrakadi / Deepana drugs absent
      ↓
Kledaka Kapha + Bodhaka Kapha unchecked
      ↓
Pachaka Pitta suppressed further
      ↓
Jatharagni Mandya deepens
      ↓
Aruchi worsens + Bitter taste

The Real Problem Here

Patient has stopped medicines - this is the central issue.
This pattern is extremely common in chronic disease management:
  • Patient feels somewhat better → stops medicines
  • Nidana Sevana continues (irregular diet, reduced exercise)
  • Symptoms return + new symptoms appear
  • Prajnaparadha (intellectual error) repeated

Samprapti Update with New Symptoms

Your existing Samprapti now has these additions:
New FindingSamprapti Addition
Bitter tastePachaka Pitta Prakopa + Bodhaka Kapha Dushti worsening - medicines stopped
Cold + sweat on walkingOjokshaya + Vyana Vayu Dushti - exercise intolerance due to Dhatukshaya
Aruchi worseningJatharagni Mandya deepening - Deepana drugs absent
Medicines stoppedSamprapti re-activation without Chikitsa support

Regarding Exercise (Walking)

The cold + sweating on walking is telling you something important:
This patient's Ojas and Dhatu are too depleted to handle sudden vigorous exercise. The body is reacting.

Correct Vyayama Protocol for THIS state:

PhaseDurationTypeWhy
Week 1-210-15 min onlySlow walk, flat surfaceOjas too low for more
Week 3-420-25 minModerate walkGradual Vyana Vayu conditioning
Month 230-35 minBrisk walkAs Rasayana builds Dhatu
Month 3+45 minBrisk walk + YogaTarget maintenance
Rule: Stop walking the moment sweating + cold feeling starts. Do NOT push through it in current state. This is the body signaling Ojas Kshaya.
Yoga better than walking right now:
  • Mandukasana, Vakrasana, Paschimottanasana
  • No heavy cardiovascular load
  • Directly targets Pachaka Pitta + Apana Vayu
  • Does not trigger Vyana Vayu overload

Immediate Priority: Restart Medicines

Restart Sequence (most important first):

Day 1-3: Deepana-Pachana first (Aruchi + Bitter taste)
DrugDoseTimingWhy First
Chitrakadi Vati2 tabBefore mealsImmediate Agni deepana - Aruchi
Trikatu + honey1gBefore mealsBodhaka + Kledaka Kapha - bitter taste
Kavala GandushaTila Taila 10mlMorningBodhaka Kapha - bitter taste direct
Balaguluchyadi Kashayam15ml BDBefore foodRestart - Vata-Pitta, Aruchi
Day 4 onwards: Add back main protocol
DrugDoseNote
Amrita Mehari Churna3g BD before foodRestart
Madhumeha Nashini Gulika1 tab BDRestart
Arogyavardhini Vati1 tab BD after foodRestart - critical for bitter taste/liver
Kanchanara Guggulu500mg BDRestart
Week 2: Add Ojasya (for exercise intolerance)
DrugDoseTimingPurpose
Vasanta Kusumakar Rasa125mg ODMorning + honeyOjas - exercise tolerance will improve
Ashwagandha3gWarm milk at nightBrimhana, muscle strength, Vata
Shilajatu500mg BDWith warm waterOjas + Dhatu Poshana

For Bitter Taste Specifically

Fastest relief:
MeasureHowWhen
Ela (Cardamom) + LavangaChew 2 Ela pods after mealsAfter every meal
Dhaniya + Jeeraka waterBoil, drink warmMorning
Gulkand1 tsp with milkPitta shamana, bitter taste
Arogyavardhini Vati1 tab BDKatuki directly clears Pitta from liver
Guduchi Sattva1g BDTikta but clears Tiktasya paradoxically
AvoidSpicy, fried, Amla Rasa excessDirect Pitta aggravators

For Cold + Sweating on Exercise

Before walking:
MeasureDetail
Light snackSmall amount Yava/banana 30 min before walk
Warm water200ml before starting
Ashwagandha at nightBuilds stamina gradually over weeks
Start SLOW5 min slow → 10 min moderate → stop
Avoid early morning empty stomach walkVata Kala + empty stomach = Ojas Kshaya

Summary of Revised Assessment

IssueCauseSolution
Bitter tastePachaka Pitta rebound + medicines stoppedRestart Arogyavardhini + Ela-Lavanga
AruchiJatharagni Mandya without Deepana drugsChitrakadi Vati + Trikatu immediately
Cold + sweat on walkingOjokshaya + exercise intoleranceReduce walk intensity + Vasanta Kusumakar
All symptomsMedicines stopped = root causeSystematic restart as above

Key Message for Patient

"Your body showed you exactly what the medicines were doing - the moment you stopped them, the symptoms returned. This is proof the treatment works. But Madhumeha is Yapya - it needs continuous management. Stopping medicines is like stopping the anchor in a current - you drift back immediately."
When medicines are restarted + walking is done correctly (slow build-up) + diet is regular - all three symptoms (Aruchi, Tiktasya, exercise intolerance) should resolve within 2-3 weeks.
Shall we also address patient compliance strategy in Ayurvedic terms - Satvavajaya Chikitsa approach?

Generate a detailed diet plan (Pathya) document for lean Madhumeha with recipes

Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null && ls /home/daytona/skills/docx/scripts/…

Running Command

mkdir -p /home/daytona/workspace/lean-madhumeha-diet && ls /home/daytona/workspa…

Writing File

~/lean-madhumeha-diet/create_diet_doc.js

const {
  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
  HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
  VerticalAlign, PageNumber, Header, Footer, PageBreak,
  TableOfContents, UnderlineType
} = require('docx');
const fs = require('fs');

// ── Color palette ──────────────────────────────────────────────
const DARK_GREEN   = "1B5E20";
const MED_GREEN    = "2E7D32";
const LIGHT_GREEN  = "C8E6C9";
const PALE_GREEN   = "E8F5E9";
const AMBER        = "E65100";
const AMBER_LIGHT  = "FFF3E0";
const TEAL         = "006064";
const TEAL_LIGHT   = "E0F7FA";
const GREY_DARK    = "37474F";
const GREY_LIGHT   = "ECEFF1";
const WHITE        = "FFFFFF";
const SAFFRON      = "FF6F00";

// ── Helper: heading paragraph ──────────────────────────────────
function h1(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_1,
    spacing: { before: 360, after: 120 },
    children: [new TextRun({ text, bold: true, size: 36, color: WHITE, font: "Calibri" })],
    shading: { type: ShadingType.SOLID, color: DARK_GREEN },
    indent: { left: 200, right: 200 },
  });
}

function h2(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_2,
    spacing: { before: 280, after: 80 },
    children: [new TextRun({ text, bold: true, size: 28, color: WHITE, font: "Calibri" })],
    shading: { type: ShadingType.SOLID, color: MED_GREEN },
    indent: { left: 120 },
  });
}

function h3(text, color = TEAL) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_3,
    spacing: { before: 200, after: 60 },
    children: [new TextRun({ text, bold: true, size: 24, color, font: "Calibri" })],
  });
}

function body(text, { bold = false, italic = false, color = GREY_DARK, size = 22 } = {}) {
  return new Paragraph({
    spacing: { before: 60, after: 60 },
    children: [new TextRun({ text, bold, italic, color, size, font: "Calibri" })],
  });
}

function bullet(text, { bold = false, color = GREY_DARK } = {}) {
  return new Paragraph({
    bullet: { level: 0 },
    spacing: { before: 40, after: 40 },
    children: [new TextRun({ text, bold, color, size: 22, font: "Calibri" })],
  });
}

function subbullet(text) {
  return new Paragraph({
    bullet: { level: 1 },
    spacing: { before: 30, after: 30 },
    children: [new TextRun({ text, size: 20, color: GREY_DARK, font: "Calibri" })],
  });
}

function spacer(lines = 1) {
  return new Paragraph({ spacing: { before: 80 * lines, after: 0 }, children: [] });
}

function divider() {
  return new Paragraph({
    spacing: { before: 120, after: 120 },
    border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: LIGHT_GREEN } },
    children: [],
  });
}

function note(text) {
  return new Paragraph({
    spacing: { before: 80, after: 80 },
    shading: { type: ShadingType.SOLID, color: AMBER_LIGHT },
    indent: { left: 200, right: 200 },
    children: [
      new TextRun({ text: "📌 Note: ", bold: true, size: 20, color: AMBER, font: "Calibri" }),
      new TextRun({ text, size: 20, color: GREY_DARK, font: "Calibri" }),
    ],
  });
}

function highlight(text) {
  return new Paragraph({
    spacing: { before: 80, after: 80 },
    shading: { type: ShadingType.SOLID, color: TEAL_LIGHT },
    indent: { left: 200, right: 200 },
    children: [new TextRun({ text, bold: true, size: 22, color: TEAL, font: "Calibri" })],
  });
}

// ── Helper: simple 2-column table ─────────────────────────────
function twoColTable(rows, headerCols, headerBg = MED_GREEN) {
  const tableRows = [];

  // header
  tableRows.push(new TableRow({
    tableHeader: true,
    children: headerCols.map(h => new TableCell({
      shading: { type: ShadingType.SOLID, color: headerBg },
      verticalAlign: VerticalAlign.CENTER,
      margins: { top: 80, bottom: 80, left: 120, right: 120 },
      children: [new Paragraph({
        children: [new TextRun({ text: h, bold: true, color: WHITE, size: 22, font: "Calibri" })],
        alignment: AlignmentType.CENTER,
      })],
    })),
  }));

  rows.forEach((row, i) => {
    tableRows.push(new TableRow({
      children: row.map((cell, ci) => new TableCell({
        shading: { type: ShadingType.SOLID, color: i % 2 === 0 ? WHITE : PALE_GREEN },
        verticalAlign: VerticalAlign.CENTER,
        margins: { top: 60, bottom: 60, left: 120, right: 120 },
        children: [new Paragraph({
          children: [new TextRun({ text: cell, size: 20, color: GREY_DARK, font: "Calibri", bold: ci === 0 })],
        })],
      })),
    }));
  });

  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: tableRows,
    margins: { top: 60, bottom: 60 },
  });
}

// ── Helper: 3-column table ─────────────────────────────────────
function threeColTable(rows, headerCols, headerBg = DARK_GREEN) {
  const tableRows = [];
  tableRows.push(new TableRow({
    tableHeader: true,
    children: headerCols.map(h => new TableCell({
      shading: { type: ShadingType.SOLID, color: headerBg },
      verticalAlign: VerticalAlign.CENTER,
      margins: { top: 80, bottom: 80, left: 100, right: 100 },
      children: [new Paragraph({
        children: [new TextRun({ text: h, bold: true, color: WHITE, size: 20, font: "Calibri" })],
        alignment: AlignmentType.CENTER,
      })],
    })),
  }));
  rows.forEach((row, i) => {
    tableRows.push(new TableRow({
      children: row.map((cell, ci) => new TableCell({
        shading: { type: ShadingType.SOLID, color: i % 2 === 0 ? WHITE : PALE_GREEN },
        margins: { top: 60, bottom: 60, left: 100, right: 100 },
        children: [new Paragraph({
          children: [new TextRun({ text: cell, size: 20, color: GREY_DARK, font: "Calibri", bold: ci === 0 })],
        })],
      })),
    }));
  });
  return new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, rows: tableRows });
}

// ── Recipe box ─────────────────────────────────────────────────
function recipeTitle(name) {
  return new Paragraph({
    spacing: { before: 200, after: 60 },
    shading: { type: ShadingType.SOLID, color: SAFFRON },
    indent: { left: 100, right: 100 },
    children: [new TextRun({ text: `🍽  ${name}`, bold: true, size: 26, color: WHITE, font: "Calibri" })],
  });
}

function recipeSection(label, lines) {
  return [
    new Paragraph({
      spacing: { before: 80, after: 20 },
      children: [new TextRun({ text: label, bold: true, size: 22, color: TEAL, font: "Calibri", underline: { type: UnderlineType.SINGLE } })],
    }),
    ...lines.map(l => bullet(l)),
  ];
}

// ── Cover page ─────────────────────────────────────────────────
function coverPage() {
  return [
    spacer(4),
    new Paragraph({
      alignment: AlignmentType.CENTER,
      spacing: { before: 0, after: 80 },
      children: [new TextRun({ text: "AYURVEDIC PATHYA GUIDE", bold: true, size: 56, color: DARK_GREEN, font: "Calibri" })],
    }),
    new Paragraph({
      alignment: AlignmentType.CENTER,
      spacing: { before: 0, after: 40 },
      children: [new TextRun({ text: "Dietary Plan for Lean Madhumeha (Type 2 Diabetes)", size: 32, color: TEAL, font: "Calibri", italic: true })],
    }),
    divider(),
    new Paragraph({
      alignment: AlignmentType.CENTER,
      spacing: { before: 60, after: 60 },
      children: [new TextRun({ text: "Based on Charaka Samhita Chikitsa Sthana, Ashtanga Hridayam & Classical Ayurvedic Principles", size: 22, color: GREY_DARK, font: "Calibri", italic: true })],
    }),
    new Paragraph({
      alignment: AlignmentType.CENTER,
      spacing: { before: 60, after: 60 },
      children: [new TextRun({ text: "Prepared for: Kapha-Pitta Prakriti | Krisha Pramehi | Vata-Pitta Vikriti", size: 22, color: AMBER, font: "Calibri", bold: true })],
    }),
    spacer(2),
    new Paragraph({
      alignment: AlignmentType.CENTER,
      spacing: { before: 0, after: 0 },
      children: [new TextRun({ text: "Prepared by: Ayurvedic Physician", size: 20, color: GREY_DARK, font: "Calibri" })],
    }),
    new Paragraph({
      alignment: AlignmentType.CENTER,
      children: [new TextRun({ text: "Date: July 2026", size: 20, color: GREY_DARK, font: "Calibri" })],
    }),
    new Paragraph({ children: [new PageBreak()] }),
  ];
}

// ═══════════════════════════════════════════════════════════════
//  DOCUMENT SECTIONS
// ═══════════════════════════════════════════════════════════════

const sections_content = [

  // ── COVER ────────────────────────────────────────────────────
  ...coverPage(),

  // ── SECTION 1: Introduction ──────────────────────────────────
  h1("1. Understanding Lean Madhumeha - Why Diet is Different"),
  spacer(),
  highlight("\"Krisha Pramehinam Brimhana\" - Charaka Chikitsa 6: For lean Prameha patients, nourishment (Brimhana) is the primary treatment."),
  spacer(),
  body("This dietary plan is specifically designed for a LEAN (Krisha) Madhumeha patient. Most conventional diabetic diets focus on calorie restriction, which is WRONG for this patient type. The Ayurvedic approach here prioritizes:"),
  spacer(),
  threeColTable([
    ["Lean Diabetic (This Patient)", "Needs Brimhana (nourishment)", "NOT calorie restriction"],
    ["Dhatukshaya present", "Needs Dhatu-building foods", "NOT fat-free diet"],
    ["Ojokshaya", "Needs Ojasya foods", "NOT raw/cold diet"],
    ["Vata-Pitta Vikriti", "Needs Snigdha + Tikta balance", "NOT dry/heavy foods"],
    ["Kapha Anubandha", "Mild Kaphahara in diet", "NOT aggressive Langhana"],
    ["Jatharagni Mandya", "Needs Deepana foods", "NOT heavy late meals"],
  ], ["Patient Status", "Dietary Need", "Avoid"]),
  spacer(),
  note("This plan differs from standard diabetic diet charts. Do NOT follow generic 'diabetes diet' advice that recommends aggressive calorie cutting for this patient."),
  divider(),

  // ── SECTION 2: Rasa (Tastes) ─────────────────────────────────
  h1("2. Pathya Rasa (Recommended Tastes) & Apathya Rasa"),
  spacer(),
  h2("2.1 Pathya (Beneficial) Tastes"),
  spacer(),
  twoColTable([
    ["Tikta (Bitter)", "MOST IMPORTANT - pacifies Pitta, Kapha Anubandha, Medohara, Pramehaghna. Karela, Methi, Nimba, Guduchi."],
    ["Kashaya (Astringent)", "Reduces Meda, tones Mamsa Dhatu, Mutrala. Jambu, Vijayasar, Haritaki."],
    ["Madhura (Sweet - limited)", "Only in Snigdha form for Brimhana - milk, ghee, old rice. Avoids Dhatukshaya. NOT sugar/sweets."],
    ["Katu (Pungent - mild)", "Deepana, Pachana, Kledaka Kapha reduction. Ginger, black pepper, cumin. Use moderately."],
  ], ["Rasa", "Benefit & Examples"]),
  spacer(),
  h2("2.2 Apathya (Harmful) Tastes"),
  spacer(),
  twoColTable([
    ["Ati Madhura (Excess Sweet)", "Direct Prameha Nidana - sugar, jaggery, honey in excess, sweet fruits"],
    ["Ati Amla (Excess Sour)", "Rakta Dushti, Pitta aggravation - excess tamarind, fermented foods"],
    ["Ati Lavana (Excess Salt)", "Kapha-Pitta aggravation, Medovaha Sroto Dushti"],
  ], ["Taste", "Reason to Avoid"]),
  divider(),

  // ── SECTION 3: Food Groups ───────────────────────────────────
  h1("3. Pathya Dravya (Recommended Foods)"),
  spacer(),

  h2("3.1 Dhanya (Grains) - Foundation of Diet"),
  spacer(),
  note("Yava (Barley) is the single most important grain for Madhumeha. Charaka specifically names it as Pramehaghna Sreshtha."),
  spacer(),
  threeColTable([
    ["Yava (Barley)", "Pramehaghna, Laghu, Deepana, Medohara", "DAILY - make it staple"],
    ["Purana Shali (Old Rice - 1yr+)", "Laghu, Tridoshahara, easy digestion", "Daily in small quantity"],
    ["Mudga (Green Gram)", "Laghu, Deepana, Vata-Pitta shamana", "3-4 times per week"],
    ["Jowar (Sorghum)", "Low GI, Laghu, Pramehaghna", "Can replace rice"],
    ["Bajra (Pearl Millet)", "Brimhana, Vatahara, good for lean patient", "2-3 times per week"],
    ["Ragi (Finger Millet)", "Calcium-rich, low GI, Brimhana", "Good for Dhatukshaya"],
    ["Kulatha (Horse Gram)", "Medohara, Pramehaghna", "2 times per week"],
  ], ["Grain", "Ayurvedic Property", "Frequency"]),
  spacer(),

  h2("3.2 Shaaka (Vegetables) - Daily Essentials"),
  spacer(),
  threeColTable([
    ["Karela (Bitter Gourd)", "Best Pramehaghna vegetable, Tikta, Deepana", "Daily if possible"],
    ["Methi (Fenugreek)", "Seed + leaves both Pramehaghna, Deepana, lowers postprandial glucose", "Daily - seeds as spice"],
    ["Nimba (Neem leaves)", "Tikta Rasa, Pitta-Kapha shamana, Pramehaghna", "3x week - in cooking"],
    ["Patola (Pointed Gourd)", "Tridoshashamaka, Deepana, Yakrituttejaka", "Daily"],
    ["Karvellaka", "Bitter gourd varieties - all Pramehaghna", "Daily"],
    ["Vaastuka (Bathua)", "Deepana, Medohara, high iron", "2-3x week"],
    ["Tanduliyaka (Amaranth)", "Brimhana, Raktavardhaka, good for lean patient", "2-3x week"],
    ["Drumstick (Shigru)", "Medohara, Deepana, anti-diabetic", "2-3x week"],
    ["Brinjal (Vrintaka)", "Deepana, Vatahara - good for Vata component", "2x week"],
    ["Ash Gourd (Kushmanda)", "Mutravaha Sroto Shodhana, cooling", "2x week"],
  ], ["Vegetable", "Property", "Frequency"]),
  spacer(),

  h2("3.3 Phala (Fruits) - Use Carefully"),
  spacer(),
  note("Most sweet fruits are Apathya. Only the following are permitted for lean Madhumeha."),
  spacer(),
  threeColTable([
    ["Jambu (Indian Blackberry)", "BEST fruit - Pramehaghna, Kashaya-Madhura, seed powder specific for Madhumeha", "Daily in season"],
    ["Amalaki (Indian Gooseberry)", "Rasayana, Vayasthapana, low GI, Tridoshahara", "1-2 daily or juice"],
    ["Kapittha (Wood Apple)", "Pramehaghna, Deepana, Kashaya Rasa", "In season"],
    ["Bilva (Bael)", "Deepana, Pachana, Mutravaha Shodhana", "Bael sharbat - cooling"],
    ["Lemon/Lime (Jambhira)", "Deepana, Agni stimulant, Vitamin C", "Daily with meals"],
    ["Pomegranate (Dadima)", "Rakta Vardhaka - good for Rakta Dushti in lean patient", "Small quantity"],
    ["Guava (Amrud)", "Low GI, Kashaya Rasa, Deepana", "1 per day"],
  ], ["Fruit", "Property", "Usage"]),
  spacer(),

  h2("3.4 Dugdha-Vikara (Milk Products)"),
  spacer(),
  highlight("Takra (Buttermilk) is specifically listed as Pathya for Madhumeha in Charaka Samhita."),
  spacer(),
  threeColTable([
    ["Takra (Buttermilk)", "BEST - Deepana, Pramehaghna, Laghu, Pachana. Specific Madhumeha Pathya.", "Daily with lunch"],
    ["Cow's Milk (Godugdha)", "Brimhana, Ojas vardhaka, Vata-Pitta shamana. Good for lean patient.", "1 glass warm at night"],
    ["Ghee (Cow ghee)", "Agni deepana, Vata-Pitta shamana, Ojasya. Small quantity essential.", "1 tsp with meals"],
    ["Dadhi (Curd)", "AVOID at night - Kapha increase. Daytime in small quantity only.", "Small qty at lunch only"],
  ], ["Item", "Property", "Usage"]),
  spacer(),
  note("Avoid full-fat cheese, cream, paneer in large quantities. Cow ghee in small amounts is BENEFICIAL, not harmful."),
  spacer(),

  h2("3.5 Mamsa (Non-vegetarian - if applicable)"),
  spacer(),
  twoColTable([
    ["Jangala Mamsa (lean wild animal/poultry)", "Brimhana, Vata shamana - beneficial for Dhatukshaya in lean patient"],
    ["Fish (Rohita - Rohu)", "Pathya, Brimhana, Snigdha - good for lean Madhumeha"],
    ["Avoid", "Heavy red meat, processed meats, fried preparations"],
  ], ["Item", "Recommendation"]),
  spacer(),

  h2("3.6 Pathya Spices & Herbs in Kitchen"),
  spacer(),
  threeColTable([
    ["Haridra (Turmeric)", "Deepana, Pramehaghna, anti-inflammatory, Pachaka Pitta support", "Daily in cooking"],
    ["Jeeraka (Cumin)", "Deepana, Pachana, Samana Vayu", "Daily in tadka"],
    ["Dhanyaka (Coriander)", "Pitta shamana, Deepana, Mutravaha", "Daily"],
    ["Methi seeds", "Soaked overnight - Pramehaghna, lowers PPBS", "1 tsp soaked - morning"],
    ["Tejpata (Bay leaf)", "Deepana, Medohara", "In dal/curry"],
    ["Lavanga (Clove)", "Bodhaka Kapha, Deepana, aromatic", "After meals"],
    ["Ela (Cardamom)", "Bodhaka Kapha, Deepana, bitter taste remedy", "After meals + in milk"],
    ["Dalchini (Cinnamon)", "Insulin sensitizer, Deepana, Medohara", "1/4 tsp daily"],
    ["Kali Mirch (Black Pepper)", "Deepana, Agni, Kledaka Kapha", "Daily"],
    ["Saunf (Fennel)", "Samana Vayu, digestive, cooling", "After meals"],
  ], ["Spice/Herb", "Benefit", "Usage"]),
  divider(),

  // ── SECTION 4: Daily Meal Plan ───────────────────────────────
  h1("4. Daily Meal Plan - Full Day Schedule"),
  spacer(),
  highlight("FIXED MEAL TIMES are mandatory. Vishama Ahara Kala (irregular meal times) is itself a Nidana for Madhumeha."),
  spacer(),

  h2("4.1 Morning Routine (6:00 - 7:00 AM)"),
  spacer(),
  twoColTable([
    ["6:00 AM - Wake up", "Ushnodaka (warm water) 2 glasses - Sroto Shodhana, Agni deepana"],
    ["6:15 AM - Medicines", "Ayurvedic medicines as prescribed (empty stomach)"],
    ["6:30 AM - Methi water", "1 tsp methi seeds soaked overnight in water - drink water + chew seeds"],
    ["6:45 AM - Kavala Gandusha", "Tila Taila oil pulling 10 min - Bodhaka Kapha, bitter taste"],
    ["7:00 AM - Light yoga", "Mandukasana + Vakrasana + Pranayama (before eating)"],
  ], ["Time", "Action & Benefit"]),
  spacer(),

  h2("4.2 Breakfast (8:00 - 8:30 AM)"),
  spacer(),
  note("Never skip breakfast. Lean patient needs morning nourishment to prevent Dhatukshaya through the day."),
  spacer(),
  twoColTable([
    ["Option A (Mon/Wed/Fri)", "Yava Upma (Barley upma) + Warm cow milk with pinch of turmeric and cardamom"],
    ["Option B (Tue/Thu)", "Ragi Dosa (2 small) + Sambar with drumstick + Takra 1 glass"],
    ["Option C (Sat/Sun)", "Mudga Khichdi (moong dal + old rice, light) + Warm ghee 1 tsp on top"],
    ["Drink with breakfast", "Methi-Dalchini tea OR Karela juice 30ml OR Warm water with lemon"],
    ["After breakfast", "Chew: 2 Ela pods + 1 Lavanga (Bodhaka Kapha, bitter taste)"],
  ], ["Day/Item", "Recommendation"]),
  spacer(),

  h2("4.3 Mid-Morning (10:30 - 11:00 AM)"),
  spacer(),
  twoColTable([
    ["If hungry", "1 Guava OR 1 small Amalaki OR handful soaked almonds (5-6)"],
    ["Drink", "Warm water or Coriander-Cumin-Fennel (CCF) tea"],
    ["If not hungry", "Only warm water - do not force eat"],
  ], ["Situation", "Recommendation"]),
  spacer(),

  h2("4.4 Lunch (1:00 - 1:30 PM) - Main Meal"),
  spacer(),
  highlight("Lunch = LARGEST meal of the day. Agni is strongest at midday (Pitta Kala). This is when Brimhana foods are best absorbed."),
  spacer(),
  twoColTable([
    ["Grain", "1 cup Yava (barley) chapati (2 rotis) OR 1/2 cup old Shali rice"],
    ["Dal", "Mudga dal (moong) OR Masoor dal - well cooked, not watery"],
    ["Vegetable 1", "Karela sabzi OR Patola sabzi OR Methi sabzi (Tikta Rasa)"],
    ["Vegetable 2", "Any seasonal vegetable cooked with Haridra + Jeeraka"],
    ["Salad", "Cucumber + raw coriander + lemon + rock salt (small portion)"],
    ["Takra (Buttermilk)", "1 glass with Jeeraka + Saindhava + coriander - MANDATORY"],
    ["Ghee", "1 tsp cow ghee on roti/rice - do NOT skip (Brimhana for lean)"],
    ["Pickle", "Amalaki pickle (small qty) - NOT mango/lime in excess"],
  ], ["Component", "Recommendation"]),
  spacer(),

  h2("4.5 Afternoon (3:30 - 4:00 PM)"),
  spacer(),
  twoColTable([
    ["Drink", "Jambu juice / Bael sharbat / Amalaki juice / CCF tea - NOT tea/coffee"],
    ["Snack if needed", "Roasted chana (horse gram/chickpea) small handful OR Murmura (puffed rice)"],
    ["Avoid", "Biscuits, namkeen, chips, tea with sugar, cold beverages"],
    ["Strict rule", "NO DAY SLEEP (Divaswapna) - absolute Apathya for Madhumeha"],
  ], ["Time/Item", "Recommendation"]),
  spacer(),

  h2("4.6 Evening (5:30 - 6:30 PM)"),
  spacer(),
  twoColTable([
    ["Evening walk", "30 min slow walk (build to 45 min gradually) - Vyayama is Aushadha"],
    ["Post-walk drink", "Warm water with 1/4 tsp Dalchini + pinch Ela"],
    ["Evening medicines", "Ayurvedic medicines as prescribed"],
  ], ["Activity", "Detail"]),
  spacer(),

  h2("4.7 Dinner (7:30 - 8:00 PM)"),
  spacer(),
  highlight("Dinner = LIGHTER than lunch. Agni is weaker at night. Lean patient still needs nourishment but not heavy foods."),
  spacer(),
  twoColTable([
    ["Option A (Most nights)", "Yava Roti (1-2) + Mudga Dal + Sauteed vegetable with ghee"],
    ["Option B (Light nights)", "Yava Khichdi (barley + moong) - easy digest, nourishing"],
    ["Option C (Alternate)", "Ragi Mudde (1 small) + Sambar + Ghee"],
    ["Soup option", "Mudga Yusha (moong soup) with Haridra + Jeeraka + Ghee tadka"],
    ["Drink", "Warm water only - NO cold water, NO fruit juice at night"],
    ["After dinner", "Short 10-15 min slow walk - Vagbhata's Shatapadi (100 steps after meal)"],
  ], ["Option", "Detail"]),
  spacer(),

  h2("4.8 Bedtime (9:30 - 10:00 PM)"),
  spacer(),
  twoColTable([
    ["Bedtime drink", "Warm cow milk (1/2 glass) + pinch Turmeric + Ela + Ashwagandha 3g (with medicines)"],
    ["Purpose", "Vata shamana, Brimhana, prevents nocturnal Dhatukshaya, supports Rasayana"],
    ["Medicine", "Triphala Churna 5g with warm water (Sroto Shodhana)"],
    ["Sleep time", "By 10:00-10:30 PM - Ratricharya for Madhumeha"],
  ], ["Item", "Detail"]),
  divider(),

  // ── SECTION 5: Weekly Meal Plan ──────────────────────────────
  h1("5. Seven-Day Weekly Meal Plan"),
  spacer(),
  threeColTable([
    ["Monday", "B: Yava Upma + Turmeric milk | L: Barley roti + Karela sabzi + Moong dal + Takra | D: Yava Khichdi + Ghee"],
    ["Tuesday", "B: Ragi Dosa + Sambar | L: Old rice + Patola sabzi + Masoor dal + Takra | D: Mudga Yusha + Yava Roti"],
    ["Wednesday", "B: Methi Thepla (1) + Curd (small) | L: Yava Roti + Methi sabzi + Moong dal + Takra | D: Ragi Mudde + Sambar"],
    ["Thursday", "B: Moong Chilla (2) + Amalaki chutney | L: Jowar Roti + Drumstick sabzi + Dal + Takra | D: Yava Khichdi + Ghee"],
    ["Friday", "B: Bajra Roti (1) + Ghee + Warm milk | L: Barley roti + Karela + Mudga + Takra | D: Mudga Soup + Yava Roti"],
    ["Saturday", "B: Mudga Khichdi (light) | L: Old rice + Palak-Methi sabzi + Dal + Takra | D: Ragi Dosa + Sambar"],
    ["Sunday", "B: Yava Porridge + Amalaki juice | L: Barley Khichdi (festival meal) + Ghee + Papad | D: Moong dal + Yava Roti"],
  ], ["Day", "Meals (Breakfast | Lunch | Dinner)"]),
  divider(),

  // ── SECTION 6: RECIPES ───────────────────────────────────────
  h1("6. Classical Pathya Recipes"),
  spacer(),
  body("All recipes are designed to be: Pramehaghna, suitable for Krisha (lean) Madhumeha, easy to prepare daily, and aligned with Ayurvedic Ahara principles.", { italic: true }),
  spacer(),

  // Recipe 1
  recipeTitle("Recipe 1: Yava Upma (Barley Semolina Breakfast)"),
  ...recipeSection("Ingredients:", [
    "Roasted barley semolina (Yava rava) - 1/2 cup",
    "Ghee - 1 tsp",
    "Mustard seeds - 1/2 tsp",
    "Cumin (Jeeraka) - 1/2 tsp",
    "Curry leaves - 8-10",
    "Green chili - 1 (optional)",
    "Grated ginger - 1/2 tsp",
    "Onion - small, finely chopped (Pathya in moderation)",
    "Vegetables: carrot, beans, peas - 1/4 cup mixed",
    "Turmeric (Haridra) - 1/4 tsp",
    "Rock salt (Saindhava) - to taste",
    "Fresh coriander (Dhanyaka) - for garnish",
    "Warm water - 1.5 cups",
    "Lemon juice - 1 tsp",
  ]),
  ...recipeSection("Method:", [
    "Heat ghee in pan. Add mustard, cumin - let splutter.",
    "Add curry leaves, ginger, green chili. Saute 30 sec.",
    "Add onion and vegetables. Cook 3-4 min.",
    "Add Haridra, Saindhava. Mix well.",
    "Add roasted Yava rava. Mix and roast 2 min.",
    "Add warm water slowly, stirring continuously.",
    "Cover and cook on low flame 5-7 min until done.",
    "Add lemon juice and fresh coriander. Serve warm.",
  ]),
  ...recipeSection("Ayurvedic Significance:", [
    "Yava = Pramehaghna Sreshtha (Charaka)",
    "Ghee = Brimhana, Agni deepana - essential for lean patient",
    "Haridra = Deepana, anti-inflammatory, Pramehaghna",
    "Jeeraka = Samana Vayu, Pachana",
    "Warm serving = preserves Agni, prevents Kledaka Kapha increase",
  ]),
  spacer(),

  // Recipe 2
  recipeTitle("Recipe 2: Takra (Therapeutic Buttermilk) - Daily Mandatory"),
  ...recipeSection("Ingredients:", [
    "Fresh curd (from cow's milk) - 1/2 cup",
    "Warm water - 1 cup",
    "Cumin powder (roasted) - 1/2 tsp",
    "Rock salt (Saindhava) - pinch",
    "Fresh coriander leaves - 1 tsp chopped",
    "Curry leaves - 4-5 (optional)",
    "Dry ginger powder (Shunti) - tiny pinch",
  ]),
  ...recipeSection("Method:", [
    "Take fresh curd in a vessel.",
    "Add warm (not hot) water.",
    "Churn well using churner or blender until frothy.",
    "Remove excess fat/cream layer if visible.",
    "Add Jeeraka powder, Saindhava, coriander.",
    "Add Shunti (very small pinch - Deepana).",
    "Serve immediately at room temperature (not cold).",
  ]),
  ...recipeSection("Ayurvedic Significance:", [
    "Charaka: 'Takrasya na hi kim chit syat doshaya' - Takra has no fault",
    "Pramehaghna, Deepana, Agni vardhaka",
    "Kledaka Kapha reducing - important for this patient",
    "Jeeraka in Takra = Samana Vayu regulation",
    "Must be freshly made - NOT stored/packed buttermilk",
    "Consume at lunch - NOT at night (increases Kapha)",
  ]),
  spacer(),

  // Recipe 3
  recipeTitle("Recipe 3: Karela Sabzi (Bitter Gourd - Primary Pramehaghna Vegetable)"),
  ...recipeSection("Ingredients:", [
    "Karela (bitter gourd) - 250g, thinly sliced",
    "Onion - 1 medium, sliced",
    "Ghee/sesame oil - 2 tsp",
    "Cumin (Jeeraka) - 1 tsp",
    "Turmeric (Haridra) - 1/4 tsp",
    "Coriander powder - 1 tsp",
    "Amchur (dry mango powder) - 1/2 tsp (reduces bitterness)",
    "Rock salt - to taste",
    "Methi seeds - 1/4 tsp",
    "Fresh coriander - garnish",
  ]),
  ...recipeSection("Method:", [
    "Slice Karela, rub with salt, rest 20 min, squeeze and wash (reduces excess bitterness while retaining medicine).",
    "Heat ghee. Add Methi seeds - let darken slightly (removes Vata-aggravating property).",
    "Add Jeeraka, then onion. Saute until golden.",
    "Add Karela slices. Cook on medium flame.",
    "Add Haridra, coriander powder. Mix well.",
    "Cook uncovered 10-12 min until slightly crisp.",
    "Add Amchur and Saindhava. Toss and serve.",
    "Garnish with fresh coriander.",
  ]),
  ...recipeSection("Ayurvedic Significance:", [
    "Karela = Tikta Rasa = directly pacifies Pitta + Kledaka Kapha",
    "Pramehaghna - mentioned in all classical texts for Madhumeha",
    "Ghee base = Brimhana + carries Tikta Rasa deeper (Anupana effect)",
    "Methi seeds add additional Pramehaghna action",
    "Eat this sabzi DAILY - even small portion is therapeutic",
  ]),
  spacer(),

  // Recipe 4
  recipeTitle("Recipe 4: Mudga Yusha (Moong Dal Therapeutic Soup)"),
  ...recipeSection("Ingredients:", [
    "Split moong dal (Mudga) - 1/2 cup",
    "Warm water - 3 cups",
    "Ghee - 1.5 tsp",
    "Cumin (Jeeraka) - 1 tsp",
    "Dry ginger (Shunti) - 1/4 tsp powder",
    "Turmeric (Haridra) - 1/4 tsp",
    "Asafoetida (Hingu) - tiny pinch (Samana Vayu)",
    "Rock salt - to taste",
    "Fresh coriander + lemon - to finish",
    "Curry leaves - 6-8",
  ]),
  ...recipeSection("Method:", [
    "Wash moong dal, soak 30 min.",
    "Cook in water with Haridra until very soft (pressure cooker - 3 whistles).",
    "Blend lightly or mash - consistency between dal and soup.",
    "Heat ghee separately. Add Hingu, Jeeraka, Shunti, curry leaves.",
    "Pour tadka into dal. Mix well.",
    "Add Saindhava. Simmer 5 min.",
    "Finish with lemon juice and coriander. Serve warm.",
  ]),
  ...recipeSection("Ayurvedic Significance:", [
    "Mudga = Pathya for all Rogis (best therapeutic dal in Ayurveda)",
    "Laghu (light) + Deepana - perfect for Jatharagni Mandya / Aruchi",
    "Hingu = direct Samana Vayu drug - addresses this patient's Vayu Dushti",
    "Shunti = Deepana, Agni vardhaka, Kledaka Kapha reduction",
    "Ideal for Aruchi days when patient cannot eat solid food",
    "Also use as Samsarjana Krama food post-Panchakarma",
  ]),
  spacer(),

  // Recipe 5
  recipeTitle("Recipe 5: Yava Roti (Barley Flatbread - Daily Bread)"),
  ...recipeSection("Ingredients:", [
    "Yava (barley) flour - 1 cup",
    "Whole wheat flour - 1/4 cup (for binding, can omit)",
    "Methi leaves (fresh or dried) - 2 tbsp",
    "Ajwain (carom seeds) - 1/4 tsp",
    "Haridra - 1/4 tsp",
    "Rock salt - pinch",
    "Warm water - as needed to knead",
    "Ghee - to apply on roti",
  ]),
  ...recipeSection("Method:", [
    "Mix Yava flour, Haridra, Ajwain, Saindhava.",
    "Add Methi leaves. Mix dry ingredients well.",
    "Add warm water slowly, knead to soft dough.",
    "Rest dough 10 min covered.",
    "Roll into medium thick rotis (thicker than wheat roti - Yava is heavier).",
    "Cook on hot tawa - both sides until golden spots appear.",
    "Apply 1/2 tsp ghee immediately when hot.",
    "Serve immediately - do not store.",
  ]),
  ...recipeSection("Ayurvedic Significance:", [
    "Yava flour = Pramehaghna Sreshtha - most important food grain",
    "Methi in roti = adds Pramehaghna action to every meal",
    "Ajwain = Deepana, Samana Vayu, prevents flatulence from Yava",
    "Ghee on hot roti = Snigdha quality for lean patient, carries nutrients",
    "Eating warm roti = preserves Agni (cold roti = Agni dampening)",
  ]),
  spacer(),

  // Recipe 6
  recipeTitle("Recipe 6: Haridra Ksheera (Turmeric Milk - Nighttime Rasayana)"),
  ...recipeSection("Ingredients:", [
    "Cow's milk - 200ml (A2/desi cow preferred)",
    "Haridra (turmeric) - 1/4 tsp",
    "Ela (cardamom) - 1/4 tsp powder",
    "Dry ginger (Shunti) - tiny pinch (optional)",
    "Black pepper - tiny pinch (increases Haridra bioavailability)",
    "Ashwagandha powder - 3g (with evening medicines)",
    "NO sugar/honey - avoid sweeteners",
  ]),
  ...recipeSection("Method:", [
    "Heat milk gently until warm (not boiling).",
    "Add Haridra, Ela, black pepper. Stir well.",
    "Add Shunti if digestion is weak.",
    "Mix Ashwagandha powder separately in small warm water first, then add to milk.",
    "Drink warm, slowly, at bedtime.",
  ]),
  ...recipeSection("Ayurvedic Significance:", [
    "Cow milk = Brimhana, Ojasya, Vata-Pitta shamana - essential for lean patient",
    "Haridra = Deepana, Pramehaghna, anti-inflammatory at night",
    "Ashwagandha = Brimhana, Vata shamana - addresses Dhatukshaya",
    "Ela = Bodhaka Kapha - addresses bitter taste complaint",
    "Black pepper = Yogavahi - carries Haridra deeper into Dhatu",
    "Bedtime = Vata Kala - Snigdha milk directly counteracts Vata",
  ]),
  spacer(),

  // Recipe 7
  recipeTitle("Recipe 7: Methi-Karela Juice (Morning Anti-Diabetic Drink)"),
  ...recipeSection("Ingredients:", [
    "Fresh Karela (bitter gourd) - 1 small",
    "Methi seeds soaked overnight - 1 tsp",
    "Amalaki (fresh/dried) - 1 small OR 1 tsp powder",
    "Fresh ginger - small piece",
    "Warm water - 100ml",
    "Rock salt - tiny pinch",
    "Lemon juice - few drops",
  ]),
  ...recipeSection("Method:", [
    "Wash Karela, remove seeds, chop roughly.",
    "Blend Karela + soaked Methi + Amalaki + ginger + warm water.",
    "Strain through muslin cloth.",
    "Add Saindhava and lemon drops.",
    "Drink 30-60ml on empty stomach (start with 30ml if Aruchi is present).",
    "Do NOT make in advance - prepare fresh each morning.",
  ]),
  ...recipeSection("Ayurvedic Significance:", [
    "Karela + Methi + Amalaki = three most potent Pramehaghna dravyas combined",
    "Addresses PPBS specifically - take before breakfast",
    "Amalaki = Rasayana component - not just diabetic, builds Dhatu",
    "Ginger = Samana Vayu, Deepana - prevents nausea from bitter taste",
    "This single drink addresses: Prameha, Aruchi, Tikta Rasa, Dhatvagni Mandya",
    "Do not take if Aruchi is severe - wait for Agni to improve first",
  ]),
  spacer(),

  // Recipe 8
  recipeTitle("Recipe 8: Mudga-Yava Khichdi (Therapeutic One-Pot Meal)"),
  ...recipeSection("Ingredients:", [
    "Yava (barley) - 1/3 cup",
    "Mudga (split moong) - 1/3 cup",
    "Old Shali rice - 1/4 cup (optional, only if lean patient needs more Brimhana)",
    "Ghee - 2 tsp",
    "Cumin (Jeeraka) - 1 tsp",
    "Hingu (asafoetida) - pinch",
    "Haridra - 1/4 tsp",
    "Shunti - 1/4 tsp",
    "Curry leaves - 8-10",
    "Rock salt - to taste",
    "Water - 4 cups warm",
  ]),
  ...recipeSection("Method:", [
    "Wash and soak Yava + Mudga separately for 1 hour.",
    "Heat ghee in heavy bottom vessel.",
    "Add Hingu, Jeeraka, curry leaves - splutter.",
    "Add drained Yava and Mudga. Roast lightly 2 min.",
    "Add Haridra, Shunti. Stir.",
    "Add warm water. Bring to boil.",
    "Reduce flame, cover, cook until Yava and Mudga are very soft (20-25 min).",
    "Add Saindhava. Stir well - consistency should be between khichdi and porridge.",
    "Add extra ghee 1 tsp on top before serving.",
    "Serve warm. Never eat cold.",
  ]),
  ...recipeSection("Ayurvedic Significance:", [
    "Charaka recommends Mudga-Yusha and Khichdi variants for Samsarjana Krama",
    "Best meal for Aruchi days - easy to eat, highly nourishing",
    "Yava + Mudga combination = Pramehaghna + Deepana + Brimhana simultaneously",
    "Ghee on top = Brimhana for lean patient - mandatory addition",
    "Hingu = Samana + Apana Vayu - addresses both Vata components",
    "This dish alone addresses: Aruchi, Jatharagni Mandya, Dhatukshaya, Prameha",
  ]),
  divider(),

  // ── SECTION 7: Apathya (What to Avoid) ──────────────────────
  h1("7. Apathya - What to Strictly Avoid"),
  spacer(),

  h2("7.1 Apathya Ahara (Foods to Avoid)"),
  spacer(),
  threeColTable([
    ["Sugar & Jaggery", "Direct Prameha Nidana - Madhura Rasa excess", "Complete avoidance"],
    ["Nava Dhanya (new grains)", "Heavy, Kapha-increasing, Ama-forming", "Use only old grains (1yr+)"],
    ["Ikshu Vikara", "Sugarcane products - juice, jaggery, raw cane", "Complete avoidance"],
    ["Maida products", "White flour - Guru, Vishtimdhi, raises glucose sharply", "Complete avoidance"],
    ["Cold food/drink", "Samana Vayu Dushti, Agni dampening", "Nothing cold ever"],
    ["Refrigerated food", "Stale Veerya, Ama-forming, Agni damage", "Always freshly cooked"],
    ["Dadhi at night", "Kapha increase, Ama formation, Sroto Avrodha", "Never at night"],
    ["Excess sweet fruits", "Mango, banana, grapes, litchi, chikoo", "Avoid entirely"],
    ["Fried foods", "Guru, Abhishyandi, Medohara Sroto Dushti", "Complete avoidance"],
    ["Processed foods", "Preservatives, hidden sugars, trans fats", "Complete avoidance"],
    ["Cold drinks/soda", "Sheeta + Madhura = double Prameha aggravation", "Complete avoidance"],
    ["Excess salt", "Pitta-Kapha aggravation, Medovaha Dushti", "Use only Saindhava, sparingly"],
    ["Red meat (heavy)", "Guru, Abhishyandi, increases Meda", "Avoid"],
    ["Alcohol", "Directly aggravates Pitta + Vata, Yakrit Dushti", "Strictly contraindicated"],
  ], ["Food/Item", "Ayurvedic Reason", "Instruction"]),
  spacer(),

  h2("7.2 Apathya Vihara (Lifestyle to Avoid)"),
  spacer(),
  twoColTable([
    ["Divaswapna (Day sleep)", "Single most important Apathya - Kapha + Meda increase, Agni Dushti"],
    ["Avyayama (No exercise)", "Primary Prameha Nidana - Vyayama is Aushadha for Madhumeha"],
    ["Atishodhana (over-purification)", "Lean patient - aggressive fasting/purging causes Dhatukshaya"],
    ["Vishama Ahara Kala", "Irregular meals - Samana Vayu Dushti, Agni irregularity"],
    ["Ratri Jagarana (late nights)", "Vata Kopa, Dhatukshaya, Ojas Kshaya"],
    ["Vegadharana (suppressing urges)", "Especially Mutra - Apana Vayu Dushti worsens"],
    ["Manas Hetu (mental stress)", "Vata-Pitta aggravation, Agni Dushti, Cortisol → glucose rise"],
    ["Cold water bathing", "Agni dampening, Kapha increase"],
  ], ["Apathya Vihara", "Reason"]),
  divider(),

  // ── SECTION 8: Special Situations ───────────────────────────
  h1("8. Special Situation Dietary Guidelines"),
  spacer(),

  h2("8.1 When Aruchi (Loss of Appetite) is Present"),
  spacer(),
  twoColTable([
    ["Morning", "Only warm water + methi water. No solid food until Aruchi resolves."],
    ["When some hunger", "Start with Mudga Yusha (soup only) - small portion"],
    ["First solid meal", "Mudga-Yava Khichdi - semi-liquid consistency with extra ghee"],
    ["Chew after meals", "Ela + Lavanga + Saunf - restores Bodhaka Kapha, improves appetite"],
    ["Absolute avoid", "Heavy foods, milk products, fried items until Aruchi resolves"],
    ["Kavala Gandusha", "Tila Taila oil pulling daily - directly treats Aruchi at Bodhaka Kapha level"],
  ], ["Situation", "Recommendation"]),
  spacer(),

  h2("8.2 When Bitter Taste (Tiktasya) is Present"),
  spacer(),
  twoColTable([
    ["Immediate relief", "Chew 2 Ela pods + drink warm water with honey (small)"],
    ["Breakfast", "Avoid Tikta foods on that day - have Mudga Khichdi with ghee"],
    ["Drink", "Dhaniya-Jeeraka water - boil 1 tsp each in 2 cups water, sip warm"],
    ["After meals", "Gulkand (rose petal jam) 1 tsp - Pitta shamana in oral cavity"],
    ["Avoid", "All sour, spicy, fried foods - aggravate Pitta and worsen Tiktasya"],
    ["Long-term", "Arogyavardhini Vati + regular Kavala Gandusha eliminate root cause"],
  ], ["Situation", "Recommendation"]),
  spacer(),

  h2("8.3 On Days of Exercise Intolerance (Cold + Sweat)"),
  spacer(),
  twoColTable([
    ["Pre-walk snack", "Small banana (half) OR soaked dates (2) - 30 min before walk"],
    ["Avoid empty stomach walk", "Vata Kala + empty stomach = Ojas Kshaya"],
    ["Post-walk", "Warm water immediately. Rest 15 min before eating."],
    ["Recovery drink", "Warm milk with Ela + Ashwagandha - within 30 min of exercise"],
    ["If episode occurs", "Stop immediately, sit, drink warm water + small jaggery piece"],
    ["Long-term", "Vasanta Kusumakar + Ashwagandha at night builds exercise tolerance in 4-6 weeks"],
  ], ["Situation", "Recommendation"]),
  spacer(),

  h2("8.4 Fasting Guidelines (Upavasa)"),
  spacer(),
  note("Aggressive fasting is CONTRAINDICATED for lean Madhumeha (Dhatukshaya risk). Partial fasting only."),
  spacer(),
  twoColTable([
    ["Permitted fast", "Eat only 2 meals (no snacks) - NOT complete fasting"],
    ["If social pressure to fast", "Mudga Yusha + warm milk + fruits (Jambu, Amalaki) - not complete Nirahara"],
    ["Ekadashi/religious fasts", "Patient should NOT do complete Nirjala or Nirahara fasting"],
    ["Reason", "Lean patient - Dhatukshaya worsens rapidly with fasting, glucose becomes erratic"],
    ["If glucose drops", "Always carry: small piece jaggery OR dates OR banana"],
  ], ["Situation", "Recommendation"]),
  divider(),

  // ── SECTION 9: Seasonal Guidelines ──────────────────────────
  h1("9. Ritucharya - Seasonal Dietary Adjustments"),
  spacer(),
  threeColTable([
    ["Greeshma (Summer)", "More Sheeta-Madhura (cooling). Coconut water, Bael sharbat, Amalaki juice. Reduce Trikatu. Increase coriander, fennel.", "Increase Pitta-shamana foods"],
    ["Varsha (Monsoon)", "Agni very weak. Only warm freshly cooked food. Honey, Saindhava. Add Panchakola. Avoid raw vegetables. Takra mandatory.", "Deepana priority"],
    ["Sharad (Autumn)", "Pitta Prakopa season. Increase Tikta-Madhura. Amalaki, Patola, old rice, ghee. Virechana best in this season.", "Best for Panchakarma"],
    ["Hemanta/Shishira (Winter)", "Agni strong. Best for Brimhana foods. Increase Yava, ghee, warm milk, Ashwagandha, sesame. Best for Rasayana.", "Brimhana maximum"],
    ["Vasanta (Spring)", "Kapha Anubandha season. Reduce heavy foods. Increase Tikta-Katu. Methi, Karela, ginger, light meals.", "Kapha-Meda careful"],
  ], ["Season", "Dietary Adjustment", "Priority"]),
  divider(),

  // ── SECTION 10: Sample Shopping List ────────────────────────
  h1("10. Monthly Pathya Shopping List"),
  spacer(),
  h2("Grains & Dals"),
  spacer(),
  twoColTable([
    ["Yava (Barley) flour + whole barley", "2 kg each - primary staple"],
    ["Split Moong dal (Mudga)", "1 kg"],
    ["Old Shali/Sona Masoori rice (1yr+)", "2 kg"],
    ["Ragi flour", "1 kg"],
    ["Bajra flour", "500g"],
    ["Jowar flour", "500g"],
    ["Kulatha (horse gram)", "500g"],
  ], ["Item", "Quantity & Note"]),
  spacer(),
  h2("Vegetables (Weekly Fresh)"),
  spacer(),
  twoColTable([
    ["Karela (bitter gourd)", "500g weekly - MANDATORY"],
    ["Methi (fenugreek) - leaves + seeds", "Leaves 250g + seeds 100g"],
    ["Patola (pointed gourd)", "250g"],
    ["Drumstick (Shigru)", "2-3 sticks"],
    ["Seasonal bitter/astringent vegetables", "As available"],
  ], ["Item", "Quantity"]),
  spacer(),
  h2("Spices & Kitchen Medicines"),
  spacer(),
  twoColTable([
    ["Haridra (turmeric)", "100g - fresh + powder"],
    ["Jeeraka (cumin)", "100g"],
    ["Methi seeds", "100g"],
    ["Dalchini (cinnamon)", "50g"],
    ["Ela (cardamom)", "50g"],
    ["Lavanga (clove)", "25g"],
    ["Shunti (dry ginger)", "50g"],
    ["Hingu (asafoetida)", "25g"],
    ["Saunf (fennel)", "100g"],
    ["Kali Mirch (black pepper)", "50g"],
  ], ["Item", "Quantity"]),
  spacer(),
  h2("Fruits (Weekly Fresh)"),
  spacer(),
  twoColTable([
    ["Amalaki (Indian gooseberry)", "6-8 weekly or juice"],
    ["Jambu (blackberry, seasonal)", "As available"],
    ["Guava", "3-4 weekly"],
    ["Lemon/lime", "6-8 weekly"],
  ], ["Item", "Quantity"]),
  spacer(),
  h2("Dairy"),
  spacer(),
  twoColTable([
    ["A2/Desi cow milk", "500ml daily"],
    ["Cow Ghee", "250ml monthly minimum"],
    ["Tila Taila (sesame oil)", "For oil pulling + cooking"],
  ], ["Item", "Quantity"]),
  divider(),

  // ── SECTION 11: Important Rules ─────────────────────────────
  h1("11. Ten Golden Rules of Pathya for Lean Madhumeha"),
  spacer(),
  new Paragraph({
    spacing: { before: 80, after: 80 },
    shading: { type: ShadingType.SOLID, color: PALE_GREEN },
    indent: { left: 200, right: 200 },
    children: [new TextRun({ text: "These 10 rules are non-negotiable. Medicines work only if these rules are followed.", bold: true, size: 22, color: DARK_GREEN, font: "Calibri" })],
  }),
  spacer(),
  ...["1. EAT AT THE SAME TIME EVERY DAY - Fixed Ahara Kala is medicine itself.",
    "2. NEVER SKIP MEALS - You are lean. Skipping meals causes Dhatukshaya and worsens diabetes.",
    "3. YAVA (BARLEY) DAILY - Make it your primary grain. This is not optional.",
    "4. TAKRA (BUTTERMILK) WITH LUNCH - Every day without exception.",
    "5. WALK 30-45 MINUTES DAILY - Vyayama is the most powerful medicine for Madhumeha.",
    "6. NO DAY SLEEP - Not even 10 minutes. Divaswapna reverses all treatment.",
    "7. NOTHING COLD - All food and drink must be warm. Cold water is poison for your Agni.",
    "8. SMALL AMOUNT OF GHEE DAILY - You are lean. Ghee in small amounts is therapeutic, not harmful.",
    "9. KARELA OR METHI EVERY DAY - At least one bitter vegetable or bitter herb daily.",
    "10. MEDICINE + DIET + EXERCISE = ONE UNIT - Stopping any one undoes the other two."
  ].map((rule, i) => new Paragraph({
    spacing: { before: 80, after: 60 },
    shading: { type: ShadingType.SOLID, color: i % 2 === 0 ? WHITE : PALE_GREEN },
    indent: { left: 200, right: 200 },
    children: [new TextRun({ text: rule, bold: i === 0 || true, size: 22, color: i < 5 ? DARK_GREEN : TEAL, font: "Calibri" })],
  })),
  divider(),

  // ── FOOTER NOTE ──────────────────────────────────────────────
  spacer(2),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    shading: { type: ShadingType.SOLID, color: DARK_GREEN },
    indent: { left: 200, right: 200 },
    spacing: { before: 120, after: 120 },
    children: [
      new TextRun({ text: "This document is prepared under Ayurvedic clinical guidance. ", size: 18, color: WHITE, font: "Calibri" }),
      new TextRun({ text: "Do not self-medicate. Follow under the supervision of your Ayurvedic physician.", size: 18, color: LIGHT_GREEN, font: "Calibri", bold: true }),
    ],
  }),
];

// ── BUILD DOCUMENT ─────────────────────────────────────────────
const doc = new Document({
  styles: {
    default: {
      document: {
        run: { font: "Calibri", size: 22, color: GREY_DARK },
      },
    },
  },
  sections: [{
    properties: {
      page: {
        margin: { top: 900, bottom: 900, left: 1000, right: 1000 },
      },
    },
    headers: {
      default: new Header({
        children: [
          new Paragraph({
            alignment: AlignmentType.RIGHT,
            shading: { type: ShadingType.SOLID, color: PALE_GREEN },
            children: [
              new TextRun({ text: "Ayurvedic Pathya Guide - Lean Madhumeha  |  ", size: 18, color: MED_GREEN, font: "Calibri" }),
              new TextRun({ text: "Confidential Patient Document", size: 18, color: GREY_DARK, font: "Calibri", italic: true }),
            ],
          }),
        ],
      }),
    },
    footers: {
      default: new Footer({
        children: [
          new Paragraph({
            alignment: AlignmentType.CENTER,
            children: [
              new TextRun({ text: "Page ", size: 18, color: GREY_DARK, font: "Calibri" }),
              new TextRun({ children: [PageNumber.CURRENT], size: 18, color: GREY_DARK, font: "Calibri" }),
              new TextRun({ text: " | Charaka Chikitsa 6 - Prameha Chikitsa | Prepared July 2026", size: 18, color: GREY_DARK, font: "Calibri", italic: true }),
            ],
          }),
        ],
      }),
    },
    children: sections_content,
  }],
});

Packer.toBuffer(doc).then(buf => {
  fs.writeFileSync("/home/daytona/workspace/lean-madhumeha-diet/Lean_Madhumeha_Pathya_Guide.docx", buf);
  console.log("SUCCESS: Document created.");
});
Running Command

cd /home/daytona/workspace/lean-madhumeha-diet && node create_diet_doc.js 2>&1

Running Command

python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/worksp…

Running Command

cd /home/daytona/workspace/lean-madhumeha-diet && python3 -c " import zipfile, o…

Your document is ready. Download it here:

Lean Madhumeha Pathya Guide

Word Document · DOCX


Document Contents (11 Sections)

SectionContent
1. IntroductionWhy lean Madhumeha diet differs from standard diabetic diet; Brimhana principle
2. Pathya RasaTikta, Kashaya, Madhura (limited), Katu - with Apathya Rasa table
3. Food Groups6 tables - grains, vegetables, fruits, dairy, spices with Ayurvedic properties and frequency
4. Daily Meal PlanFull day schedule 6AM to 10PM with fixed timings, options for each meal
5. Weekly Plan7-day meal plan table (Monday to Sunday)
6. Recipes (8 recipes)Yava Upma, Takra, Karela Sabzi, Mudga Yusha, Yava Roti, Haridra Ksheera, Methi-Karela Juice, Mudga-Yava Khichdi - each with ingredients, method, and Ayurvedic significance
7. ApathyaComplete list of foods and lifestyle practices to avoid with reasons
8. Special SituationsAruchi, Tiktasya, Exercise intolerance, Fasting guidelines
9. RitucharyaSeasonal dietary adjustments (5 seasons)
10. Shopping ListMonthly Pathya shopping list by category
11. Ten Golden RulesNon-negotiable rules for patient compliance

Formatting: Professional colored Word document - green/teal theme, color-coded section headers, alternating-row tables, recipe boxes in saffron, advisory notes in amber, suitable for printing and giving to patient.

Present prescription

Reading File
Writing File

~/lean-madhumeha-diet/create_prescription.js

const {
  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
  HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
  VerticalAlign, PageNumber, Header, Footer, PageBreak, UnderlineType
} = require('docx');
const fs = require('fs');

// ── Palette ────────────────────────────────────────────────────
const DARK_GREEN  = "1B5E20";
const MED_GREEN   = "2E7D32";
const LIGHT_GREEN = "C8E6C9";
const PALE_GREEN  = "E8F5E9";
const AMBER       = "E65100";
const AMBER_LIGHT = "FFF3E0";
const TEAL        = "006064";
const TEAL_LIGHT  = "E0F7FA";
const GREY_DARK   = "37474F";
const GREY_LIGHT  = "ECEFF1";
const WHITE       = "FFFFFF";
const MAROON      = "B71C1C";
const MAROON_LIGHT= "FFEBEE";
const BLUE_DARK   = "0D47A1";
const BLUE_LIGHT  = "E3F2FD";

// ── Helpers ────────────────────────────────────────────────────
const sp = (n=1) => new Paragraph({ spacing:{ before:80*n, after:0 }, children:[] });

function para(text, { bold=false, italic=false, color=GREY_DARK, size=22, align=AlignmentType.LEFT, bg=null }={}) {
  const p = new Paragraph({
    alignment: align,
    spacing: { before:40, after:40 },
    children: [new TextRun({ text, bold, italic, color, size, font:"Calibri" })],
  });
  if (bg) p.properties = { shading:{ type:ShadingType.SOLID, color:bg } };
  return p;
}

function shadedPara(text, bg, textColor=WHITE, bold=true, size=22) {
  return new Paragraph({
    spacing: { before:60, after:60 },
    shading: { type:ShadingType.SOLID, color:bg },
    indent: { left:100, right:100 },
    children: [new TextRun({ text, bold, color:textColor, size, font:"Calibri" })],
  });
}

function bullet(text, color=GREY_DARK, bold=false) {
  return new Paragraph({
    bullet: { level:0 },
    spacing: { before:40, after:40 },
    children: [new TextRun({ text, bold, color, size:22, font:"Calibri" })],
  });
}

function divider(color=LIGHT_GREEN) {
  return new Paragraph({
    spacing: { before:100, after:100 },
    border: { bottom:{ style:BorderStyle.SINGLE, size:8, color } },
    children:[],
  });
}

function noteBox(text) {
  return new Paragraph({
    spacing:{ before:80, after:80 },
    shading:{ type:ShadingType.SOLID, color:AMBER_LIGHT },
    indent:{ left:160, right:160 },
    children:[
      new TextRun({ text:"⚠  ", bold:true, size:20, color:AMBER, font:"Calibri" }),
      new TextRun({ text, size:20, color:GREY_DARK, font:"Calibri" }),
    ],
  });
}

// Prescription row table (medicine table)
function rxTable(rows) {
  // header
  const hdr = ["#", "Medicine", "Dose", "Timing", "Anupana", "Action / Target"];
  const colW = [4, 22, 8, 18, 14, 34]; // percentages

  const headerRow = new TableRow({
    tableHeader: true,
    children: hdr.map((h, i) => new TableCell({
      width: { size: colW[i], type: WidthType.PERCENTAGE },
      shading: { type:ShadingType.SOLID, color:DARK_GREEN },
      verticalAlign: VerticalAlign.CENTER,
      margins: { top:80, bottom:80, left:100, right:100 },
      children: [new Paragraph({
        alignment: AlignmentType.CENTER,
        children: [new TextRun({ text:h, bold:true, color:WHITE, size:19, font:"Calibri" })],
      })],
    })),
  });

  const dataRows = rows.map((row, i) =>
    new TableRow({
      children: row.map((cell, ci) => new TableCell({
        width: { size: colW[ci], type: WidthType.PERCENTAGE },
        shading: { type:ShadingType.SOLID, color: i%2===0 ? WHITE : PALE_GREEN },
        verticalAlign: VerticalAlign.CENTER,
        margins: { top:60, bottom:60, left:100, right:100 },
        children: [new Paragraph({
          children: [new TextRun({
            text: cell,
            size: 19,
            color: ci===0 ? TEAL : GREY_DARK,
            bold: ci===0 || ci===1,
            font:"Calibri",
          })],
        })],
      })),
    })
  );

  return new Table({
    width: { size:100, type:WidthType.PERCENTAGE },
    rows: [headerRow, ...dataRows],
  });
}

// Simple 2-col table
function twoCol(rows, h1, h2, hBg=MED_GREEN) {
  const headerRow = new TableRow({
    tableHeader:true,
    children: [h1,h2].map(h => new TableCell({
      shading:{type:ShadingType.SOLID, color:hBg},
      verticalAlign:VerticalAlign.CENTER,
      margins:{top:80,bottom:80,left:120,right:120},
      children:[new Paragraph({ alignment:AlignmentType.CENTER, children:[new TextRun({text:h,bold:true,color:WHITE,size:20,font:"Calibri"})] })],
    })),
  });
  const dataRows = rows.map((row,i)=>new TableRow({
    children: row.map((cell,ci)=>new TableCell({
      shading:{type:ShadingType.SOLID, color:i%2===0?WHITE:PALE_GREEN},
      margins:{top:60,bottom:60,left:120,right:120},
      children:[new Paragraph({children:[new TextRun({text:cell,size:20,color:GREY_DARK,bold:ci===0,font:"Calibri"})]})],
    })),
  }));
  return new Table({ width:{size:100,type:WidthType.PERCENTAGE}, rows:[headerRow,...dataRows] });
}

// Timing section header (colored band)
function timeBand(time, bg=TEAL) {
  return new Paragraph({
    spacing:{ before:180, after:60 },
    shading:{ type:ShadingType.SOLID, color:bg },
    indent:{ left:0, right:0 },
    children:[
      new TextRun({ text:`  ${time}`, bold:true, size:26, color:WHITE, font:"Calibri" }),
    ],
  });
}

// ══════════════════════════════════════════════════════════════
//  PATIENT INFO BLOCK
// ══════════════════════════════════════════════════════════════
function patientBlock() {
  const labelStyle = { bold:true, size:20, color:TEAL, font:"Calibri" };
  const valueStyle = { size:20, color:GREY_DARK, font:"Calibri" };

  const makeRow = (label, value) => new TableRow({
    children: [
      new TableCell({
        width:{size:30,type:WidthType.PERCENTAGE},
        shading:{type:ShadingType.SOLID,color:TEAL_LIGHT},
        margins:{top:60,bottom:60,left:120,right:60},
        children:[new Paragraph({children:[new TextRun({text:label,...labelStyle})]})],
      }),
      new TableCell({
        width:{size:70,type:WidthType.PERCENTAGE},
        shading:{type:ShadingType.SOLID,color:WHITE},
        margins:{top:60,bottom:60,left:120,right:120},
        children:[new Paragraph({children:[new TextRun({text:value,...valueStyle})]})],
      }),
    ],
  });

  return new Table({
    width:{size:100,type:WidthType.PERCENTAGE},
    rows:[
      makeRow("Prakriti","Kapha-Pitta"),
      makeRow("Vikriti","Vata-Pitta Kopa | Kapha Anubandha"),
      makeRow("Roga","Madhumeha (Type 2 Diabetes Mellitus)"),
      makeRow("Age / Weight / Height","Adult | 60 kg | 165 cm (BMI ~22 - Krisha)"),
      makeRow("Dosha Involvement","Vata (primary) + Pitta | Kapha Anubandha"),
      makeRow("Vayu Dushti","Vyana + Samana + Apana"),
      makeRow("Pitta Dushti","Pachaka + Bhrajaka"),
      makeRow("Kapha Dushti","Kledaka + Bodhaka"),
      makeRow("Dushya","Rasa, Lasika, Rudhira, Sweda, Ojas"),
      makeRow("Agni","Jatharagni Mandya + Dhatvagni Mandya | Mild Ama"),
      makeRow("Key Investigations","HbA1c 7.9 | FBS 146 | PPBS 236 | S.Chol 281"),
      makeRow("Active Complaints","Aruchi | Tiktasya | Skin Vaivarnya (Lt elbow)"),
      makeRow("Allopathic Rx","Metformin 250mg BD + Glimepride 0.25mg BD (reduced)"),
      makeRow("Date","July 2026"),
    ],
  });
}

// ══════════════════════════════════════════════════════════════
//  MAIN CONTENT
// ══════════════════════════════════════════════════════════════
const content = [

  // ── LETTERHEAD ───────────────────────────────────────────────
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing:{ before:0, after:20 },
    children:[new TextRun({ text:"AYURVEDIC PRESCRIPTION", bold:true, size:52, color:DARK_GREEN, font:"Calibri" })],
  }),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    shading:{ type:ShadingType.SOLID, color:DARK_GREEN },
    spacing:{ before:0, after:0 },
    children:[new TextRun({ text:"Lean Madhumeha (Krisha Pramehi)  |  Vata-Pitta Vikriti with Kapha Anubandha", bold:true, size:22, color:LIGHT_GREEN, font:"Calibri" })],
  }),
  sp(),

  // ── PATIENT INFO ─────────────────────────────────────────────
  shadedPara("PATIENT PROFILE", MED_GREEN, WHITE, true, 24),
  sp(0.5),
  patientBlock(),
  sp(),
  divider(),

  // ── CHIKITSA SUTRA ───────────────────────────────────────────
  shadedPara("CHIKITSA SUTRA (Treatment Principles)", TEAL, WHITE, true, 24),
  sp(0.5),
  twoCol([
    ["Vata-Pitta Shamana (primary)","Snigdha + Tikta Rasa Aushadha"],
    ["Kapha Anubandha Shamana","Mild Kaphahara - NOT aggressive Langhana"],
    ["Deepana-Pachana (immediate)","Agni restoration first - Aruchi must resolve before Rasayana"],
    ["Rakta Shodhana","For Rudhira Dushti + Bhrajaka Pitta (skin vaivarnya)"],
    ["Medohara","For Cholesterol 281 - Medovaha Sroto Dushti"],
    ["Brimhana Rasayana","Lean patient - Dhatukshaya + Ojokshaya must be addressed"],
    ["Basti (Phase 2)","Apana + Vyana Vayu Chikitsa - after Ama clears"],
  ], "Chikitsa Principle", "Drug Strategy"),
  sp(),
  divider(),

  // ══════════════════════════════════════════════════════════════
  //  PRESCRIPTION TABLE
  // ══════════════════════════════════════════════════════════════
  shadedPara("AUSHADHA YOJANA (Medicines)", DARK_GREEN, WHITE, true, 26),
  sp(0.5),

  // ── TIMING BAND 1: EMPTY STOMACH ─────────────────────────────
  timeBand("6:00 AM  —  Empty Stomach (Before Medicines)", DARK_GREEN),
  sp(0.3),
  rxTable([
    ["1","Kavala Gandusha","Tila Taila 10ml","Hold 10 min, spit","None","Bodhaka Kapha Dushti - Tiktasya (bitter taste) + Aruchi"],
    ["2","Ushnodaka Pana","2 glasses warm water","Sip slowly","None","Sroto Shodhana, Agni deepana, Samana Vayu"],
    ["3","Methi Seed Water","1 tsp soaked seeds","Drink water + chew seeds","None","Pramehaghna - PPBS 236 control, Jatharagni deepana"],
  ]),
  sp(),

  // ── TIMING BAND 2: BEFORE BREAKFAST ──────────────────────────
  timeBand("7:30 AM  —  Before Breakfast (30 min prior)", MED_GREEN),
  sp(0.3),
  rxTable([
    ["4","Chitrakadi Vati","2 tab","30 min before food","Warm water","Jatharagni Mandya + Samana Vayu + Kledaka Kapha - primary Aruchi drug"],
    ["5","Trikatu Churna","1g","With medicine","Honey + warm water","Kledaka + Bodhaka Kapha, Ama Pachana, Agni deepana"],
    ["6","Balaguluchyadi Kashayam ✓","15 ml","Before food","As is, warm","Vata-Pitta shamana, Brimhana (Bala), Rasayana (Guduchi) - CONTINUE"],
    ["7","Madhumeha Nashini Gulika ✓","1 tab","Before food","Warm water","Pramehaghna - glucose control, addresses PPBS"],
    ["8","Amrita Mehari Churna ✓","3g","Before food (SHIFTED)","Warm water","Rasa-Lasika Dushti, Pramehaghna - TIMING CHANGED from after to before food"],
  ]),
  sp(),

  // ── TIMING BAND 3: AFTER BREAKFAST ───────────────────────────
  timeBand("8:30 AM  —  After Breakfast", TEAL),
  sp(0.3),
  rxTable([
    ["9","Vasanta Kusumakar Rasa","125 mg","After food","Honey","OJASYA - lean Madhumeha Rasayana, all Dhatvagni, HbA1c. KEY ADDITION."],
    ["10","Trivang Bhasma","125 mg","After food","Honey","Naga+Vanga+Yashada - specific Madhumeha Bhasma, Dhatukshaya"],
    ["11","Arogyavardhini Vati ✓","1 tab","After food","Warm water","Kledaka Kapha, Medohara, Yakrit - Tiktasya (Katuki). CONTINUE"],
    ["12","Navaka Guggulu","2 tab","After food","Warm water","Medovaha Sroto Dushti - Cholesterol 281. Stronger than Kanchanara for lipids."],
    ["13","Manjistha Churna","3g","After food","Warm water","Rudhira Dushti + Bhrajaka Pitta - skin Vaivarnya, Rakta Shodhana"],
  ]),
  sp(),
  noteBox("After breakfast: chew 2 Ela (cardamom) pods + 1 Lavanga (clove) - direct Bodhaka Kapha treatment for bitter taste."),
  sp(),

  // ── TIMING BAND 4: LUNCH ──────────────────────────────────────
  timeBand("1:00 PM  —  Lunch", BLUE_DARK),
  sp(0.3),
  rxTable([
    ["14","Hingvashtaka Churna","2g","With 1st bite of food","Cow ghee (1/2 tsp)","Samana Vayu - specific for this Vayu Dushti component"],
    ["15","Takra (Buttermilk)","1 glass","With/after lunch","Jeeraka + Saindhava","MANDATORY - Pramehaghna, Deepana, Kledaka Kapha shamana"],
  ]),
  sp(),

  // ── TIMING BAND 5: EVENING ───────────────────────────────────
  timeBand("6:00 PM  —  Evening (Before Dinner)", MED_GREEN),
  sp(0.3),
  rxTable([
    ["16","Kanchanara Guggulu ✓","500 mg","6 PM","Warm water","Kapha Anubandha + Tvak Doshahara (skin). CONTINUE"],
    ["17","Balaguluchyadi Kashayam ✓","15 ml","Before food","As is, warm","Evening dose - CONTINUE"],
    ["18","Madhumeha Nashini Gulika ✓","1 tab","Before food","Warm water","Evening dose - CONTINUE"],
  ]),
  sp(),

  // ── TIMING BAND 6: AFTER DINNER ──────────────────────────────
  timeBand("8:00 PM  —  After Dinner", TEAL),
  sp(0.3),
  rxTable([
    ["19","Arogyavardhini Vati","1 tab","After dinner","Warm water","BD dose - add evening dose for better Medohara + Tiktasya control"],
    ["20","Trivang Bhasma","125 mg","After dinner","Honey","Evening dose for continuous Madhumeha action"],
    ["21","Shilajatu","500 mg","After dinner","Warm milk","Ojas + Dhatu Poshana + Pramehaghna - Dhatukshaya in lean patient"],
    ["22","Ashwagandha Churna","3g","After dinner","Warm milk","Brimhana, Vatahara, Mamsa Dhatu Poshana, exercise tolerance"],
  ]),
  sp(),

  // ── TIMING BAND 7: BEDTIME ────────────────────────────────────
  timeBand("9:30 PM  —  Bedtime", DARK_GREEN),
  sp(0.3),
  rxTable([
    ["23","Triphala Churna","5g","Bedtime","Warm water","Sroto Shodhana, Medohara (cholesterol), Anulomana - nightly cleanse"],
    ["24","Sariva Churna","3g","Bedtime","Warm water","Pitta-Rakta shamana, Rudhira Dushti, skin Vaivarnya"],
  ]),
  sp(),

  // ── EXTERNAL ──────────────────────────────────────────────────
  shadedPara("BAHYA CHIKITSA (External Applications)", MAROON, WHITE, true, 22),
  sp(0.5),
  rxTable([
    ["E1","Nalpamaradi Taila","Adequate qty","Morning daily","None","Local application on skin Vaivarnya (Lt elbow) - Bhrajaka Pitta"],
    ["E2","Ksheerabala Taila","Full body","Before bath daily","None","Abhyanga - Vyana Vayu, Tvak Poshana, peripheral circulation"],
    ["E3","Chandana + Manjistha Lepa","Paste form","3x per week","Rose water","On skin lesion - Pitta-Rakta Shodhana externally, Varnya"],
  ]),
  sp(),
  divider(),

  // ══════════════════════════════════════════════════════════════
  //  EXISTING Rx STATUS
  // ══════════════════════════════════════════════════════════════
  shadedPara("STATUS OF EXISTING PRESCRIPTION", BLUE_DARK, WHITE, true, 22),
  sp(0.5),
  twoCol([
    ["Kanchanara Guggulu 500mg BD ✓","CONTINUE - Kapha Anubandha, Tvak Doshahara, skin finding"],
    ["Balaguluchyadi Kashayam 15ml BD ✓","CONTINUE - best drug for this patient (Bala+Guduchi), Vata-Pitta"],
    ["Madhumeha Nashini Gulika BD ✓","CONTINUE - direct Pramehaghna, glucose control"],
    ["Arogyavardhini Vati 1 tab OD → BD","INCREASE to BD - cholesterol 281 needs stronger Medohara"],
    ["Amrita Mehari Churna 3g BD","CHANGE TIMING - shift from after food to BEFORE food for PPBS"],
  ], "Medicine", "Status & Reason"),
  sp(),
  divider(),

  // ══════════════════════════════════════════════════════════════
  //  PANCHAKARMA PLAN
  // ══════════════════════════════════════════════════════════════
  shadedPara("PANCHAKARMA PLAN (Phase 2 - after 3-4 weeks)", TEAL, WHITE, true, 22),
  sp(0.5),
  noteBox("Panchakarma to be initiated ONLY after Aruchi resolves and Agni improves (Nirama state confirmed). Do not start while Ama is present."),
  sp(0.5),
  twoCol([
    ["Poorvakarma","Abhyanga (Ksheerabala Taila) + mild Swedana - 3-5 days"],
    ["Primary: Madhutailika Basti","15 days Kala Basti - Apana Vayu + Vyana Vayu Chikitsa"],
    ["Anuvasana Basti (8 days)","Ksheerabala Taila 60ml - Vata-Pitta, Brimhana (lean patient)"],
    ["Niruha Basti (7 days)","Honey + Saindhava + Dashamula Kashayam + Guduchi Kashayam + Milk"],
    ["Secondary: Snigdha Virechana","Trivrit Leha 15-20g with Eranda Taila - Pitta + Medovaha Sroto Shodhana"],
    ["NOT recommended","Vamana - Kapha is Anubandha only; lean patient - will cause Dhatukshaya"],
    ["Samsarjana Krama","3-5 days Peya → Vilepi → Yusha after Shodhana - mandatory"],
  ], "Procedure", "Detail"),
  sp(),
  divider(),

  // ══════════════════════════════════════════════════════════════
  //  PATHYA-APATHYA SUMMARY
  // ══════════════════════════════════════════════════════════════
  shadedPara("PATHYA - APATHYA (Diet & Lifestyle)", MED_GREEN, WHITE, true, 22),
  sp(0.5),

  new Paragraph({ spacing:{before:60,after:20}, children:[new TextRun({text:"KEY PATHYA (Non-negotiable):", bold:true, size:22, color:DARK_GREEN, font:"Calibri"})] }),
  bullet("Yava (barley) as primary daily grain - Pramehaghna Sreshtha", DARK_GREEN, true),
  bullet("Takra (buttermilk with Jeeraka) - mandatory with lunch daily"),
  bullet("Karela / Methi / Nimba - at least one bitter vegetable every day"),
  bullet("Small quantity cow ghee daily - Brimhana for lean patient, do not skip"),
  bullet("Fixed meal times - same time every day (Samana Vayu)"),
  bullet("Warm freshly cooked food only - no cold or refrigerated food"),
  bullet("Amalaki daily - Rasayana, low GI, Tridoshahara"),
  sp(0.5),

  new Paragraph({ spacing:{before:60,after:20}, children:[new TextRun({text:"KEY APATHYA (Strict avoidance):", bold:true, size:22, color:MAROON, font:"Calibri"})] }),
  bullet("Divaswapna (day sleep) - absolute contraindication in Madhumeha", MAROON, true),
  bullet("Avyayama (no exercise) - Vyayama is Aushadha, not optional", MAROON),
  bullet("Sugar, jaggery, sweet drinks - direct Prameha Nidana", MAROON),
  bullet("Cold food and drinks - Agni dampening, Samana Vayu Dushti", MAROON),
  bullet("Refrigerated/reheated food - Ama formation", MAROON),
  bullet("Irregular meal times - Vishama Ahara = Madhumeha Nidana", MAROON),
  bullet("Excess Amla-Lavana Rasa - Pitta + Rakta Dushti aggravation", MAROON),
  sp(),
  divider(),

  // ══════════════════════════════════════════════════════════════
  //  VYAYAMA
  // ══════════════════════════════════════════════════════════════
  shadedPara("VYAYAMA PRESCRIPTION (Exercise as Medicine)", AMBER, WHITE, true, 22),
  sp(0.5),
  noteBox("Patient currently experiencing cold + sweating during exercise due to Ojokshaya. Start SLOW. Build gradually. Vasanta Kusumakar + Ashwagandha will improve exercise tolerance within 4-6 weeks."),
  sp(0.5),
  twoCol([
    ["Week 1-2","Slow walk 10-15 min only. Stop at first sign of sweating/cold feeling."],
    ["Week 3-4","Moderate walk 20-25 min. Mandukasana + Vakrasana (5 min each)."],
    ["Month 2","Brisk walk 30-35 min + Yoga 15 min (Surya Namaskar 6 rounds)."],
    ["Month 3+","Brisk walk 45 min + Surya Namaskar 12 rounds + Pranayama 10 min."],
    ["Pre-walk rule","Small snack 30 min before (half banana or 2 soaked dates). Never empty stomach."],
    ["Post-walk","Warm water immediately. Warm milk + Ashwagandha within 30 min."],
    ["Yoga: Mandukasana","Daily - stimulates Pachaka Pitta (pancreas), Apana Vayu regulation"],
    ["Yoga: Vakrasana","Daily - Medovaha Srotas, Yakrit stimulation, lipid balance"],
    ["Yoga: Anuloma-Viloma","10 min daily - Vata-Pitta balance, Samana Vayu"],
  ], "Phase / Activity", "Detail"),
  sp(),
  divider(),

  // ══════════════════════════════════════════════════════════════
  //  MONITORING TARGETS
  // ══════════════════════════════════════════════════════════════
  shadedPara("MONITORING TARGETS", DARK_GREEN, WHITE, true, 22),
  sp(0.5),
  twoCol([
    ["Aruchi (appetite)","Should resolve within 2-3 weeks of Chitrakadi Vati + Trikatu"],
    ["Tiktasya (bitter taste)","Should reduce in 1-2 weeks with Kavala Gandusha + Arogyavardhini BD"],
    ["Skin Vaivarnya","Monitor monthly - should fade within 6-8 weeks of Manjistha + Nalpamaradi Taila"],
    ["FBS (currently 146)","Target: < 120 mg/dL by Month 2"],
    ["PPBS (currently 236)","Target: < 160 mg/dL by Month 2"],
    ["HbA1c (currently 7.9)","Target: < 7.0 by Month 3"],
    ["S. Cholesterol (currently 281)","Target: < 220 mg/dL by Month 3"],
    ["Exercise tolerance","Should improve significantly by Week 4-6 with Rasayana"],
    ["Allopathic medicines","Monitor for further dose reduction as glycemia improves - liaise with physician"],
  ], "Parameter", "Target / Timeline"),
  sp(),
  divider(),

  // ══════════════════════════════════════════════════════════════
  //  SPECIAL INSTRUCTIONS
  // ══════════════════════════════════════════════════════════════
  shadedPara("SPECIAL INSTRUCTIONS FOR PATIENT", MAROON, WHITE, true, 22),
  sp(0.5),
  new Paragraph({
    spacing:{before:80,after:80},
    shading:{type:ShadingType.SOLID, color:MAROON_LIGHT},
    indent:{left:160,right:160},
    children:[new TextRun({text:"1.  Do NOT stop medicines again without consulting your doctor. Stopping medicines is the primary reason for relapse.", bold:true, size:21, color:MAROON, font:"Calibri"})],
  }),
  new Paragraph({
    spacing:{before:60,after:80},
    shading:{type:ShadingType.SOLID, color:MAROON_LIGHT},
    indent:{left:160,right:160},
    children:[new TextRun({text:"2.  Check blood glucose DURING sweating/cold episodes. Report readings immediately.", size:21, color:GREY_DARK, font:"Calibri"})],
  }),
  new Paragraph({
    spacing:{before:60,after:80},
    shading:{type:ShadingType.SOLID, color:BLUE_LIGHT},
    indent:{left:160,right:160},
    children:[new TextRun({text:"3.  Continue Metformin and Glimepride as prescribed by allopathic physician. Do NOT stop without medical advice. Ayurvedic medicines are additive.", size:21, color:BLUE_DARK, font:"Calibri"})],
  }),
  new Paragraph({
    spacing:{before:60,after:80},
    shading:{type:ShadingType.SOLID, color:BLUE_LIGHT},
    indent:{left:160,right:160},
    children:[new TextRun({text:"4.  Vasanta Kusumakar Rasa contains gold (Swarna Bhasma). Take only as prescribed. Do not increase dose.", size:21, color:BLUE_DARK, font:"Calibri"})],
  }),
  new Paragraph({
    spacing:{before:60,after:80},
    shading:{type:ShadingType.SOLID, color:PALE_GREEN},
    indent:{left:160,right:160},
    children:[new TextRun({text:"5.  Arogyavardhini Vati contains Parada-Gandhaka (Kajjali). Use only in 3-month courses with 1-month break. Do not use continuously beyond 3 months.", size:21, color:DARK_GREEN, font:"Calibri"})],
  }),
  sp(),

  // ── FOLLOW UP ─────────────────────────────────────────────────
  shadedPara("FOLLOW-UP SCHEDULE", TEAL, WHITE, true, 20),
  sp(0.5),
  twoCol([
    ["2 weeks","Review Aruchi + Tiktasya resolution. Assess Agni. Adjust Deepana drugs."],
    ["1 month","FBS + PPBS check. Assess skin lesion. Decide Panchakarma readiness."],
    ["3 months","Full labs: HbA1c + Lipid profile + Renal function + LFT. Review all medicines."],
    ["6 months","Reassess Samprapti. Consider Arogyavardhini break (if 3-month course complete)."],
  ], "Follow-up Time", "Assessment Required"),
  sp(2),

  // ── SIGNATURE BLOCK ───────────────────────────────────────────
  divider(),
  new Paragraph({
    alignment:AlignmentType.RIGHT,
    spacing:{before:60,after:40},
    children:[new TextRun({text:"Ayurvedic Physician's Signature: _______________________", size:20, color:GREY_DARK, font:"Calibri"})],
  }),
  new Paragraph({
    alignment:AlignmentType.RIGHT,
    spacing:{before:20,after:40},
    children:[new TextRun({text:"Registration No.: ___________________", size:20, color:GREY_DARK, font:"Calibri"})],
  }),
  new Paragraph({
    alignment:AlignmentType.RIGHT,
    spacing:{before:20,after:40},
    children:[new TextRun({text:"Date: July 2026", size:20, color:GREY_DARK, font:"Calibri"})],
  }),
  new Paragraph({
    alignment:AlignmentType.RIGHT,
    spacing:{before:20,after:40},
    children:[new TextRun({text:"Stamp:", size:20, color:GREY_DARK, font:"Calibri"})],
  }),
  sp(2),

  // ── DISCLAIMER ────────────────────────────────────────────────
  new Paragraph({
    alignment:AlignmentType.CENTER,
    shading:{type:ShadingType.SOLID, color:DARK_GREEN},
    spacing:{before:80,after:80},
    indent:{left:160,right:160},
    children:[
      new TextRun({text:"This prescription is issued under classical Ayurvedic guidelines. To be dispensed and administered under Ayurvedic physician supervision only. ", size:17, color:LIGHT_GREEN, font:"Calibri"}),
      new TextRun({text:"Nidana Parivarjanam eva Chikitsa - Charaka Samhita", size:17, color:WHITE, bold:true, font:"Calibri", italic:true}),
    ],
  }),
];

// ── DOCUMENT ───────────────────────────────────────────────────
const doc = new Document({
  sections: [{
    properties:{
      page:{
        margin:{ top:800, bottom:800, left:900, right:900 },
      },
    },
    headers:{
      default: new Header({
        children:[
          new Paragraph({
            alignment:AlignmentType.CENTER,
            shading:{type:ShadingType.SOLID, color:PALE_GREEN},
            children:[
              new TextRun({text:"AYURVEDIC PRESCRIPTION  |  Lean Madhumeha (Krisha Pramehi)  |  Vata-Pitta + Kapha Anubandha", size:17, color:MED_GREEN, bold:true, font:"Calibri"}),
            ],
          }),
        ],
      }),
    },
    footers:{
      default: new Footer({
        children:[
          new Paragraph({
            alignment:AlignmentType.CENTER,
            children:[
              new TextRun({text:"Confidential Medical Document  |  Page ", size:17, color:GREY_DARK, font:"Calibri"}),
              new TextRun({children:[PageNumber.CURRENT], size:17, color:GREY_DARK, font:"Calibri"}),
              new TextRun({text:"  |  Prepared July 2026", size:17, color:GREY_DARK, font:"Calibri"}),
            ],
          }),
        ],
      }),
    },
    children: content,
  }],
});

Packer.toBuffer(doc).then(buf => {
  fs.writeFileSync("/home/daytona/workspace/lean-madhumeha-diet/Lean_Madhumeha_Prescription.docx", buf);
  console.log("SUCCESS");
});
Running Command

cd /home/daytona/workspace/lean-madhumeha-diet && node create_prescription.js 2>…

Running Command

python3 -c " import zipfile, os f = '/home/daytona/workspace/lean-madhumeha-diet…

Your prescription document is ready. Download it here:

Lean Madhumeha Prescription

Word Document · DOCX


What the Prescription Document Contains

Structure (Single professional document)

SectionContent
Patient ProfileFull Samprapti summary - Prakriti, Vikriti, Dosha-Dushya-Agni, investigations, active complaints
Chikitsa Sutra7 treatment principles mapped to drug strategy
Aushadha Yojana24 medicines organized by TIMING BANDS (6AM → 9:30PM) with dose, timing, Anupana, and Samprapti target for each
Existing Rx StatusClear Continue / Change / Add status for all 5 current medicines
Panchakarma PlanPhase 2 plan - Madhutailika Basti + Snigdha Virechana with rationale
Pathya-ApathyaKey rules in green (do) and red (avoid)
Vyayama PrescriptionPhased exercise plan from 15 min to 45 min with pre/post guidelines
Monitoring TargetsParameter-wise targets with timelines
Special Instructions5 patient-specific warnings (Vasanta Kusumakar, Arogyavardhini course limit, allopathic medicines)
Follow-up Schedule2-week, 1-month, 3-month, 6-month review plan
Signature blockDoctor signature + stamp space
Color coding: Green = Ayurvedic Rx | Teal = timings | Red = warnings | Blue = allopathic notes | Amber = cautions

The prescription I ve given to the patient also with modernedici e

Asking for Preferences

All

Kanchanar guggullu 500mg 6AM 6PM MADHUMEHA NASHINI GULLIKKA 1TAB BAD BEFORE FOOD Balaguluchyadi kashayam 15ml with 45ml water BD BEFORE FOOD METFORMIN 250MG +GLIMEPRIDE 0.25MG BD AFTER FOOD Amrtamehari churna 3g bd after food Arogyavardhini vati 1 tab BD

Writing File

~/lean-madhumeha-diet/create_combined_rx.js

const {
  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
  HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
  VerticalAlign, PageNumber, Header, Footer, PageBreak, UnderlineType
} = require('docx');
const fs = require('fs');

// ── Palette ────────────────────────────────────────────────────
const DARK_GREEN  = "1B5E20";
const MED_GREEN   = "2E7D32";
const LIGHT_GREEN = "C8E6C9";
const PALE_GREEN  = "E8F5E9";
const AMBER       = "E65100";
const AMBER_LIGHT = "FFF3E0";
const TEAL        = "006064";
const TEAL_LIGHT  = "E0F7FA";
const GREY_DARK   = "37474F";
const WHITE       = "FFFFFF";
const MAROON      = "B71C1C";
const MAROON_LIGHT= "FFEBEE";
const BLUE_DARK   = "0D47A1";
const BLUE_LIGHT  = "E3F2FD";
const PURPLE      = "4A148C";
const PURPLE_LIGHT= "F3E5F5";

// ── Helpers ────────────────────────────────────────────────────
const sp = (n=1) => new Paragraph({ spacing:{before:80*n,after:0}, children:[] });

function shadedPara(text, bg, textColor=WHITE, size=24) {
  return new Paragraph({
    spacing:{ before:120, after:60 },
    shading:{ type:ShadingType.SOLID, color:bg },
    indent:{ left:80, right:80 },
    children:[new TextRun({ text, bold:true, color:textColor, size, font:"Calibri" })],
  });
}

function divider(color=LIGHT_GREEN) {
  return new Paragraph({
    spacing:{ before:100, after:100 },
    border:{ bottom:{ style:BorderStyle.SINGLE, size:8, color } },
    children:[],
  });
}

function noteBox(text, bg=AMBER_LIGHT, iconColor=AMBER) {
  return new Paragraph({
    spacing:{ before:80, after:80 },
    shading:{ type:ShadingType.SOLID, color:bg },
    indent:{ left:160, right:160 },
    children:[
      new TextRun({ text:"⚠  Note: ", bold:true, size:20, color:iconColor, font:"Calibri" }),
      new TextRun({ text, size:20, color:GREY_DARK, font:"Calibri" }),
    ],
  });
}

function infoBox(text, bg=BLUE_LIGHT, textColor=BLUE_DARK) {
  return new Paragraph({
    spacing:{ before:80, after:80 },
    shading:{ type:ShadingType.SOLID, color:bg },
    indent:{ left:160, right:160 },
    children:[new TextRun({ text, size:20, color:textColor, font:"Calibri", bold:true })],
  });
}

function bullet(text, color=GREY_DARK, bold=false) {
  return new Paragraph({
    bullet:{ level:0 },
    spacing:{ before:40, after:40 },
    children:[new TextRun({ text, bold, color, size:21, font:"Calibri" })],
  });
}

// ── Timing band ────────────────────────────────────────────────
function timeBand(label, bg) {
  return new Paragraph({
    spacing:{ before:200, after:60 },
    shading:{ type:ShadingType.SOLID, color:bg },
    children:[new TextRun({ text:`  ${label}`, bold:true, size:26, color:WHITE, font:"Calibri" })],
  });
}

// ── Prescription row builder ───────────────────────────────────
// cols: #, Medicine, Type, Dose, Timing, Anupana, Notes
function rxTable(rows, colWidths=[4,24,10,8,16,14,24]) {
  const headers = ["#","Medicine","Type","Dose","Timing","Anupana","Notes / Interaction"];
  const hdrRow = new TableRow({
    tableHeader:true,
    children: headers.map((h,i) => new TableCell({
      width:{ size:colWidths[i], type:WidthType.PERCENTAGE },
      shading:{ type:ShadingType.SOLID, color:DARK_GREEN },
      verticalAlign:VerticalAlign.CENTER,
      margins:{ top:70, bottom:70, left:80, right:80 },
      children:[new Paragraph({
        alignment:AlignmentType.CENTER,
        children:[new TextRun({ text:h, bold:true, color:WHITE, size:18, font:"Calibri" })],
      })],
    })),
  });

  const dataRows = rows.map((row,i) => new TableRow({
    children: row.map((cell,ci) => {
      // Color the "Type" column by category
      let cellBg = i%2===0 ? WHITE : PALE_GREEN;
      let cellColor = GREY_DARK;
      let cellBold = ci===1;
      if (ci===2) {
        if (cell==="Ayurvedic") { cellBg = PALE_GREEN; cellColor = DARK_GREEN; cellBold=true; }
        if (cell==="Modern") { cellBg = BLUE_LIGHT; cellColor = BLUE_DARK; cellBold=true; }
        if (cell==="Both") { cellBg = PURPLE_LIGHT; cellColor = PURPLE; cellBold=true; }
      }
      return new TableCell({
        width:{ size:colWidths[ci], type:WidthType.PERCENTAGE },
        shading:{ type:ShadingType.SOLID, color:ci===2?cellBg:(i%2===0?WHITE:PALE_GREEN) },
        verticalAlign:VerticalAlign.CENTER,
        margins:{ top:55, bottom:55, left:80, right:80 },
        children:[new Paragraph({
          children:[new TextRun({
            text:cell,
            size:18,
            color:ci===2?cellColor:GREY_DARK,
            bold:cellBold,
            font:"Calibri",
          })],
        })],
      });
    }),
  }));

  return new Table({
    width:{ size:100, type:WidthType.PERCENTAGE },
    rows:[hdrRow,...dataRows],
  });
}

// ── 2-col table ────────────────────────────────────────────────
function twoCol(rows, h1, h2, hBg=MED_GREEN) {
  const hRow = new TableRow({
    tableHeader:true,
    children:[h1,h2].map(h=>new TableCell({
      shading:{type:ShadingType.SOLID,color:hBg},
      verticalAlign:VerticalAlign.CENTER,
      margins:{top:70,bottom:70,left:100,right:100},
      children:[new Paragraph({alignment:AlignmentType.CENTER,children:[new TextRun({text:h,bold:true,color:WHITE,size:20,font:"Calibri"})]})]
    })),
  });
  const dRows = rows.map((row,i)=>new TableRow({
    children:row.map((cell,ci)=>new TableCell({
      shading:{type:ShadingType.SOLID,color:i%2===0?WHITE:PALE_GREEN},
      margins:{top:55,bottom:55,left:100,right:100},
      children:[new Paragraph({children:[new TextRun({text:cell,size:19,color:GREY_DARK,bold:ci===0,font:"Calibri"})]})],
    })),
  }));
  return new Table({width:{size:100,type:WidthType.PERCENTAGE},rows:[hRow,...dRows]});
}

// ── Interaction table ──────────────────────────────────────────
function interactionTable(rows) {
  const headers = ["Ayurvedic Drug","Modern Drug","Interaction","Risk Level","Clinical Action"];
  const colW = [20,18,28,12,22];
  const hRow = new TableRow({
    tableHeader:true,
    children:headers.map((h,i)=>new TableCell({
      width:{size:colW[i],type:WidthType.PERCENTAGE},
      shading:{type:ShadingType.SOLID,color:DARK_GREEN},
      verticalAlign:VerticalAlign.CENTER,
      margins:{top:70,bottom:70,left:80,right:80},
      children:[new Paragraph({alignment:AlignmentType.CENTER,children:[new TextRun({text:h,bold:true,color:WHITE,size:18,font:"Calibri"})]})],
    })),
  });
  const dRows = rows.map((row,i)=>new TableRow({
    children:row.map((cell,ci)=>{
      let bg = i%2===0?WHITE:PALE_GREEN;
      let color = GREY_DARK;
      if(ci===3){
        if(cell==="✅ Safe"){ bg=PALE_GREEN; color=DARK_GREEN; }
        if(cell==="⚠️ Monitor"){ bg=AMBER_LIGHT; color=AMBER; }
        if(cell==="🔴 Caution"){ bg=MAROON_LIGHT; color=MAROON; }
      }
      return new TableCell({
        width:{size:colW[ci],type:WidthType.PERCENTAGE},
        shading:{type:ShadingType.SOLID,color:bg},
        verticalAlign:VerticalAlign.CENTER,
        margins:{top:55,bottom:55,left:80,right:80},
        children:[new Paragraph({children:[new TextRun({text:cell,size:18,bold:ci===3,color:ci===3?color:GREY_DARK,font:"Calibri"})]})],
      });
    }),
  }));
  return new Table({width:{size:100,type:WidthType.PERCENTAGE},rows:[hRow,...dRows]});
}

// ══════════════════════════════════════════════════════════════
//  PATIENT INFO TABLE
// ══════════════════════════════════════════════════════════════
function patientTable() {
  const rows = [
    ["Patient Prakriti","Kapha-Pitta"],
    ["Vikriti","Vata-Pitta Kopa | Kapha Anubandha"],
    ["Roga","Madhumeha (Type 2 Diabetes Mellitus) - Lean (Krisha)"],
    ["Weight / Height","60 kg / 165 cm | BMI ~22"],
    ["HbA1c","7.9% (was 13 at diagnosis → improved to 7 → relapsed to 7.9)"],
    ["FBS / PPBS","146 mg/dL / 236 mg/dL (without medicine)"],
    ["S. Cholesterol","281 mg/dL"],
    ["Active Complaints","Aruchi | Tiktasya | Skin Vaivarnya (Lt elbow) | Cold+sweat on exertion"],
    ["Dosha-Dushya","Rasa, Lasika, Rudhira, Sweda, Ojas | Vyana+Samana+Apana Vayu"],
    ["Agni Status","Jatharagni Mandya + Dhatvagni Mandya | Mild Ama present"],
    ["Date","July 2026"],
  ];
  return new Table({
    width:{size:100,type:WidthType.PERCENTAGE},
    rows: rows.map((row,i)=>new TableRow({
      children:[
        new TableCell({
          width:{size:32,type:WidthType.PERCENTAGE},
          shading:{type:ShadingType.SOLID,color:TEAL_LIGHT},
          margins:{top:60,bottom:60,left:120,right:80},
          children:[new Paragraph({children:[new TextRun({text:row[0],bold:true,size:20,color:TEAL,font:"Calibri"})]})],
        }),
        new TableCell({
          width:{size:68,type:WidthType.PERCENTAGE},
          shading:{type:ShadingType.SOLID,color:i%2===0?WHITE:PALE_GREEN},
          margins:{top:60,bottom:60,left:120,right:120},
          children:[new Paragraph({children:[new TextRun({text:row[1],size:20,color:GREY_DARK,font:"Calibri"})]})],
        }),
      ],
    })),
  });
}

// ══════════════════════════════════════════════════════════════
//  CONTENT
// ══════════════════════════════════════════════════════════════
const content = [

  // ── LETTERHEAD ───────────────────────────────────────────────
  new Paragraph({
    alignment:AlignmentType.CENTER,
    spacing:{before:0,after:20},
    children:[new TextRun({text:"INTEGRATED AYURVEDIC + MODERN PRESCRIPTION",bold:true,size:44,color:DARK_GREEN,font:"Calibri"})],
  }),
  new Paragraph({
    alignment:AlignmentType.CENTER,
    shading:{type:ShadingType.SOLID,color:DARK_GREEN},
    spacing:{before:0,after:0},
    children:[new TextRun({text:"Lean Madhumeha (Krisha Pramehi)  |  Kapha-Pitta Prakriti  |  Vata-Pitta Vikriti with Kapha Anubandha",bold:true,size:20,color:LIGHT_GREEN,font:"Calibri"})],
  }),
  sp(0.5),
  new Paragraph({
    alignment:AlignmentType.CENTER,
    children:[
      new TextRun({text:"🟢 Ayurvedic Medicines  ", size:20, color:DARK_GREEN, bold:true, font:"Calibri"}),
      new TextRun({text:"  🔵 Modern Medicines  ", size:20, color:BLUE_DARK, bold:true, font:"Calibri"}),
      new TextRun({text:"  ⚠️ Interaction Notes included", size:20, color:AMBER, bold:true, font:"Calibri"}),
    ],
  }),
  sp(),

  // ── PATIENT INFO ─────────────────────────────────────────────
  shadedPara("PATIENT PROFILE", MED_GREEN),
  sp(0.5),
  patientTable(),
  sp(),
  divider(),

  // ══════════════════════════════════════════════════════════════
  //  MAIN PRESCRIPTION - BY TIMING
  // ══════════════════════════════════════════════════════════════
  shadedPara("COMPLETE PRESCRIPTION  —  Timing-wise", DARK_GREEN, WHITE, 26),
  sp(0.5),
  infoBox("Green rows = Ayurvedic  |  Blue rows = Modern Medicine  |  Take medicines in the order listed at each timing"),
  sp(0.5),

  // ── 6:00 AM ──────────────────────────────────────────────────
  timeBand("6:00 AM  —  Empty Stomach / Before Breakfast", DARK_GREEN),
  sp(0.3),
  rxTable([
    ["1","Kanchanara Guggulu","Ayurvedic","500 mg (1 tab)","6:00 AM empty stomach","Warm water","Kapha Anubandha, Tvak Doshahara (skin Vaivarnya). Guggulu = Medohara. Take 30 min before food."],
    ["2","Madhumeha Nashini Gulika","Ayurvedic","1 tab","Before breakfast","Warm water","Pramehaghna - Meshashringi, Jambu beeja. Take before food for best PPBS control."],
    ["3","Balaguluchyadi Kashayam","Ayurvedic","15 ml + 45 ml water","Before breakfast","As is (warm)","Vata-Pitta shamana. Bala=Brimhana. Guduchi=Rasayana. Best drug in this Rx for lean patient."],
  ]),
  sp(),

  // ── AFTER BREAKFAST ──────────────────────────────────────────
  timeBand("After Breakfast  —  With / Immediately After Food", MED_GREEN),
  sp(0.3),
  rxTable([
    ["4","Metformin 250mg + Glimepride 0.25mg","Modern","1 tab (combined)","Immediately after breakfast","Food (must not be taken on empty stomach)","Take AFTER eating - reduces Aruchi and Tiktasya. Glimepride risk: hypoglycemia if meal skipped."],
    ["5","Arogyavardhini Vati","Ayurvedic","1 tab","After breakfast","Warm water","Katuki = Kledaka Kapha, Medohara, Yakrit. Addresses Tiktasya (bitter taste) + Cholesterol 281."],
  ]),
  sp(),
  noteBox("Gap of at least 30 min between Balaguluchyadi Kashayam (before food) and Metformin (after food) is automatically ensured by meal timing. This is correct."),
  sp(),

  // ── AFTER LUNCH ──────────────────────────────────────────────
  timeBand("After Lunch  —  Midday Dose", TEAL),
  sp(0.3),
  rxTable([
    ["6","Amrtamehari Churna","Ayurvedic","3g","After lunch","Warm water","Rasa-Lasika Dushti, Pramehaghna. Guduchi + Meshashringi base. Note: consider shifting to before lunch for better PPBS action."],
    ["7","Arogyavardhini Vati","Ayurvedic","1 tab","After lunch","Warm water","BD dose - 2nd dose for Medohara (cholesterol 281) and Agni support."],
  ]),
  sp(),

  // ── 6:00 PM ──────────────────────────────────────────────────
  timeBand("6:00 PM  —  Evening / Before Dinner", MED_GREEN),
  sp(0.3),
  rxTable([
    ["8","Kanchanara Guggulu","Ayurvedic","500 mg (1 tab)","6:00 PM","Warm water","2nd dose - evening Kapha-Meda shamana. Guggulu Deepana action supports digestion."],
    ["9","Madhumeha Nashini Gulika","Ayurvedic","1 tab","Before dinner","Warm water","2nd dose - pre-dinner for postprandial glucose control (dinner PPBS)."],
    ["10","Balaguluchyadi Kashayam","Ayurvedic","15 ml + 45 ml water","Before dinner","As is (warm)","Evening dose - continuous Vata-Pitta shamana, Guduchi Rasayana action."],
  ]),
  sp(),

  // ── AFTER DINNER ─────────────────────────────────────────────
  timeBand("After Dinner  —  Night Dose", BLUE_DARK),
  sp(0.3),
  rxTable([
    ["11","Metformin 250mg + Glimepride 0.25mg","Modern","1 tab (combined)","Immediately after dinner","Food (must not be taken on empty stomach)","⚠ CRITICAL: Never skip dinner before this dose. Glimepride at night = hypoglycemia risk especially in lean patient. Ensure adequate dinner."],
    ["12","Amrtamehari Churna","Ayurvedic","3g","After dinner","Warm water","2nd dose - continuous Pramehaghna action overnight."],
  ]),
  sp(),
  new Paragraph({
    spacing:{before:80,after:80},
    shading:{type:ShadingType.SOLID,color:MAROON_LIGHT},
    indent:{left:160,right:160},
    children:[
      new TextRun({text:"🔴  NIGHT HYPOGLYCEMIA WARNING: ", bold:true, size:20, color:MAROON, font:"Calibri"}),
      new TextRun({text:"This patient is lean (60kg), exercises, and takes additive glucose-lowering Ayurvedic herbs. Glimepride 0.25mg BD after dinner in this context carries nocturnal hypoglycemia risk. Symptoms: cold feeling + sweating at night (already reported). If FBS drops below 100 mg/dL, discuss reducing Glimepride to OD (morning only) with prescribing physician.", size:20, color:GREY_DARK, font:"Calibri"}),
    ],
  }),
  sp(),
  divider(),

  // ══════════════════════════════════════════════════════════════
  //  QUICK REFERENCE SCHEDULE
  // ══════════════════════════════════════════════════════════════
  shadedPara("QUICK REFERENCE SCHEDULE (Patient Copy)", TEAL),
  sp(0.5),
  twoCol([
    ["6:00 AM (empty stomach)","Kanchanara Guggulu 500mg + Madhumeha Nashini 1tab + Balaguluchyadi 15ml+45ml water"],
    ["After Breakfast","Metformin 250mg + Glimepride 0.25mg (1 combined tab) + Arogyavardhini Vati 1tab"],
    ["After Lunch","Amrtamehari Churna 3g + Arogyavardhini Vati 1tab"],
    ["6:00 PM (before dinner)","Kanchanara Guggulu 500mg + Madhumeha Nashini 1tab + Balaguluchyadi 15ml+45ml water"],
    ["After Dinner","Metformin 250mg + Glimepride 0.25mg (1 combined tab) + Amrtamehari Churna 3g"],
  ], "Timing", "Medicines"),
  sp(),
  divider(),

  // ══════════════════════════════════════════════════════════════
  //  INTERACTION ANALYSIS
  // ══════════════════════════════════════════════════════════════
  shadedPara("DRUG INTERACTION ANALYSIS", PURPLE, WHITE, 22),
  sp(0.5),
  infoBox("All interactions listed below are clinically relevant for this patient's specific prescription. Review before dispensing."),
  sp(0.5),

  shadedPara("A. Metformin 250mg Interactions", BLUE_DARK, WHITE, 20),
  sp(0.3),
  interactionTable([
    ["Meshashringi (Madhumeha Nashini)","Metformin 250mg","Both reduce intestinal glucose absorption - ADDITIVE","⚠️ Monitor","Monitor FBS monthly. Beneficial synergy but may need Metformin dose reduction if FBS < 100."],
    ["Guduchi / Karela (Amrtamehari)","Metformin 250mg","Both improve insulin sensitivity - ADDITIVE","⚠️ Monitor","Beneficial. If FBS normalizes consistently, discuss Metformin tapering with physician."],
    ["Triphala (in Arogyavardhini)","Metformin 250mg","Both affect gut absorption - may increase GI side effects","⚠️ Monitor","Take Arogyavardhini strictly after food. 30min gap from Metformin ensures separation."],
    ["Shilajatu (if added)","Metformin 250mg","Fulvic acid may alter Metformin absorption","✅ Safe","Maintain 2hr gap if Shilajatu added to prescription later."],
    ["Haridra in food/diet","Metformin 250mg","Curcumin enhances Metformin efficacy, reduces inflammation","✅ Safe","Beneficial. No dose adjustment needed."],
    ["Guggulu (Kanchanara/Navaka)","Metformin 250mg","No direct pharmacokinetic interaction","✅ Safe","Continue as prescribed."],
    ["Long-term Metformin + this Rx","Metformin 250mg","Metformin depletes Vitamin B12 over months-years","⚠️ Monitor","Check B12 at 6-month follow-up. B12 deficiency mimics Vata symptoms (neuropathy)."],
  ]),
  sp(),

  shadedPara("B. Glimepride 0.25mg Interactions", MAROON, WHITE, 20),
  sp(0.3),
  interactionTable([
    ["Meshashringi (Madhumeha Nashini)","Glimepride 0.25mg","ADDITIVE glucose lowering - different mechanisms but cumulative effect","⚠️ Monitor","Primary concern in this Rx. If FBS < 100 or patient reports sweating on exertion = suspect hypoglycemia."],
    ["Karela (in Amrtamehari Churna)","Glimepride 0.25mg","Karela has insulin-like peptides - ADDITIVE with sulphonylurea action","⚠️ Monitor","Do not take Amrtamehari on empty stomach. After food timing (current) is correct."],
    ["Guduchi (Balaguluchyadi)","Glimepride 0.25mg","Mild additive glucose lowering","✅ Safe","At current doses acceptable. Monitor if Guduchi dose is increased."],
    ["Exercise (Vyayama)","Glimepride 0.25mg","Exercise lowers glucose + Glimepride lowers glucose = HYPOGLYCEMIA risk","🔴 Caution","Mandatory pre-exercise snack. Do NOT exercise on empty stomach. Patient's cold+sweat on walking may be exercise hypoglycemia."],
    ["Meal skipping","Glimepride 0.25mg","Glimepride works regardless of food intake - skipping meal after dose = hypoglycemia","🔴 Caution","Patient must NEVER skip meal after taking Glimepride. Educate firmly."],
    ["Night dose (Dinner)","Glimepride 0.25mg","Nocturnal hypoglycemia risk - Glimepride + lean patient + additive herbs","⚠️ Monitor","If cold+sweating at night persists, check glucose at 2-3 AM. Consider switching to morning-only dose."],
    ["Vijayasar (if added later)","Glimepride 0.25mg","Both stimulate pancreatic insulin secretion - SAME mechanism","🔴 Caution","Do NOT add Vijayasar without reducing/stopping Glimepride. Double sulphonylurea-like action."],
  ]),
  sp(),
  divider(),

  // ══════════════════════════════════════════════════════════════
  //  TIKTASYA + ARUCHI - MODERN MEDICINE CONNECTION
  // ══════════════════════════════════════════════════════════════
  shadedPara("SYMPTOM-MEDICINE CONNECTION ANALYSIS", AMBER, WHITE, 22),
  sp(0.5),
  twoCol([
    ["Aruchi (Loss of appetite)","Partly Metformin GI side effect + Jatharagni Mandya + Kledaka Kapha. Taking Metformin AFTER food (current - correct) reduces this. Chitrakadi Vati (add) will help Agni component."],
    ["Tiktasya (Bitter taste)","Metformin causes metallic/bitter taste in 10-20% patients. Also Pachaka Pitta rebound after stopping Arogyavardhini. Kavala Gandusha + Ela + Lavanga + Arogyavardhini BD will address both causes."],
    ["Cold + Sweat on walking","Most likely exercise-induced hypoglycemia from Glimepride + additive Ayurvedic glucose lowering + exercise in lean patient. Check blood glucose DURING episode. Pre-walk snack is mandatory."],
    ["Skin Vaivarnya (Lt elbow)","Not medication-related. Pure Bhrajaka Pitta + Vyana Vayu Dushti from Madhumeha pathology. No modern medicine link."],
    ["B12 Deficiency risk (future)","Long-term Metformin depletes B12. In lean patient this can mimic Vataja Dushti (tingling, fatigue). Monitor at 6 months."],
  ], "Symptom", "Combined Ayurvedic + Modern Explanation"),
  sp(),
  divider(),

  // ══════════════════════════════════════════════════════════════
  //  SUGGESTED ADDITIONS TO CURRENT RX
  // ══════════════════════════════════════════════════════════════
  shadedPara("SUGGESTED ADDITIONS TO CURRENT PRESCRIPTION", MED_GREEN, WHITE, 22),
  sp(0.5),
  noteBox("Current prescription is a good foundation. These additions address the gaps: Aruchi, skin vaivarnya, Ojokshaya (lean patient), and cholesterol 281."),
  sp(0.5),
  twoCol([
    ["Chitrakadi Vati 2 tab - before meals","IMMEDIATE PRIORITY - Addresses Aruchi + Jatharagni Mandya directly. Missing from current Rx."],
    ["Vasanta Kusumakar Rasa 125mg OD - morning + honey","KEY ADDITION for lean Madhumeha - Ojasya Rasayana, all Dhatvagni, addresses Dhatukshaya. Drug of choice for Krisha Pramehi."],
    ["Manjistha Churna 3g BD - after food","For skin Vaivarnya - Rudhira Dushti, Bhrajaka Pitta. Not addressed in current Rx."],
    ["Trivang Bhasma 125mg BD - after food + honey","Naga+Vanga+Yashada - specific Madhumeha Bhasma. Addresses Dhatukshaya in lean patient."],
    ["Kavala Gandusha - Tila Taila 10ml morning","Direct Bodhaka Kapha treatment for Tiktasya. Not a medicine - lifestyle practice. Teach patient."],
    ["Nalpamaradi Taila - local on skin lesion","External Bhrajaka Pitta treatment for Vaivarnya."],
    ["Amrtamehari timing - shift to before food","Current timing (after food) reduces glucose-lowering efficacy. Shift to before food for better PPBS action."],
  ], "Addition / Change", "Rationale"),
  sp(),
  divider(),

  // ══════════════════════════════════════════════════════════════
  //  MONITORING
  // ══════════════════════════════════════════════════════════════
  shadedPara("MONITORING SCHEDULE", DARK_GREEN, WHITE, 22),
  sp(0.5),
  twoCol([
    ["Immediate (This week)","Check blood glucose DURING cold+sweat episodes. Record time, glucose value, recent meal, recent medicine."],
    ["2 weeks","Review Aruchi + Tiktasya. If persisting: shift Glimepride to morning-only (discuss with physician). Add Chitrakadi Vati."],
    ["1 month","FBS + PPBS check. Assess skin lesion improvement. Decide if Glimepride night dose can be stopped."],
    ["3 months","HbA1c + Full Lipid Profile + LFT + Renal Function. Target: HbA1c <7.0, Cholesterol <220."],
    ["6 months","Add Vitamin B12 level (Metformin long-term). Reassess all medicines. Consider Panchakarma."],
    ["Ongoing (monthly)","FBS/PPBS self-monitoring. Record glucose during any sweating episode."],
  ], "Timepoint", "What to Check"),
  sp(),
  divider(),

  // ══════════════════════════════════════════════════════════════
  //  KEY PATIENT INSTRUCTIONS
  // ══════════════════════════════════════════════════════════════
  shadedPara("CRITICAL PATIENT INSTRUCTIONS", MAROON, WHITE, 22),
  sp(0.5),
  new Paragraph({
    spacing:{before:60,after:60},
    shading:{type:ShadingType.SOLID,color:MAROON_LIGHT},
    indent:{left:160,right:160},
    children:[new TextRun({text:"1. NEVER take Metformin or Glimepride on an empty stomach. Always after food. Never skip a meal after taking Glimepride.", bold:true, size:21, color:MAROON, font:"Calibri"})],
  }),
  new Paragraph({
    spacing:{before:40,after:60},
    shading:{type:ShadingType.SOLID,color:AMBER_LIGHT},
    indent:{left:160,right:160},
    children:[new TextRun({text:"2. If you feel cold, sweaty, or shaky - check blood glucose IMMEDIATELY. If below 70 mg/dL, take 2 glucose tablets or half glass fruit juice. Report to doctor.", bold:true, size:21, color:AMBER, font:"Calibri"})],
  }),
  new Paragraph({
    spacing:{before:40,after:60},
    shading:{type:ShadingType.SOLID,color:BLUE_LIGHT},
    indent:{left:160,right:160},
    children:[new TextRun({text:"3. Do NOT exercise on empty stomach. Eat a small snack (banana/dates) 30 min before any physical activity. Walking empty stomach with Glimepride active = dangerous.", bold:true, size:21, color:BLUE_DARK, font:"Calibri"})],
  }),
  new Paragraph({
    spacing:{before:40,after:60},
    shading:{type:ShadingType.SOLID,color:PALE_GREEN},
    indent:{left:160,right:160},
    children:[new TextRun({text:"4. Do NOT stop ANY medicine (Ayurvedic or Modern) without consulting your doctor. Stopping medicines caused the relapse from HbA1c 7.0 to 7.9.", bold:true, size:21, color:DARK_GREEN, font:"Calibri"})],
  }),
  new Paragraph({
    spacing:{before:40,after:60},
    shading:{type:ShadingType.SOLID,color:PALE_GREEN},
    indent:{left:160,right:160},
    children:[new TextRun({text:"5. Take Balaguluchyadi Kashayam BEFORE food and Metformin AFTER food. This is not the same time - wait for your meal in between.", size:21, color:GREY_DARK, font:"Calibri"})],
  }),
  sp(),
  divider(),

  // ══════════════════════════════════════════════════════════════
  //  PATHYA SUMMARY
  // ══════════════════════════════════════════════════════════════
  shadedPara("PATHYA - APATHYA SUMMARY", TEAL, WHITE, 22),
  sp(0.5),
  twoCol([
    ["MUST EAT DAILY","Yava (barley), Karela/Methi, Takra with lunch, cow ghee (small qty), Amalaki"],
    ["MEAL TIMING","Fixed times: Breakfast 8AM, Lunch 1PM, Dinner 7:30PM - same time every day"],
    ["EXERCISE","Walk 15-20 min (build slowly). Mandukasana + Vakrasana daily. AFTER snack only."],
    ["AVOID STRICTLY","Sugar, cold food/drinks, day sleep, skipping meals, refrigerated food"],
    ["BITTER TASTE REMEDY","Chew Ela + Lavanga after each meal. Kavala Gandusha (oil pulling) every morning."],
    ["NEVER","Skip dinner after Glimepride dose. Stop medicines without doctor advice. Exercise on empty stomach."],
  ], "Rule", "Detail"),
  sp(2),

  // ── SIGNATURE ─────────────────────────────────────────────────
  divider(),
  new Paragraph({
    alignment:AlignmentType.LEFT,
    spacing:{before:60,after:40},
    children:[new TextRun({text:"Doctor's Signature: _______________________________    Reg. No.: __________________", size:20, color:GREY_DARK, font:"Calibri"})],
  }),
  new Paragraph({
    alignment:AlignmentType.LEFT,
    spacing:{before:20,after:40},
    children:[new TextRun({text:"Clinic / Hospital: ________________________________________________    Date: July 2026", size:20, color:GREY_DARK, font:"Calibri"})],
  }),
  new Paragraph({
    alignment:AlignmentType.LEFT,
    spacing:{before:20,after:60},
    children:[new TextRun({text:"Stamp:", size:20, color:GREY_DARK, font:"Calibri"})],
  }),
  sp(),

  new Paragraph({
    alignment:AlignmentType.CENTER,
    shading:{type:ShadingType.SOLID,color:DARK_GREEN},
    spacing:{before:80,after:80},
    indent:{left:120,right:120},
    children:[
      new TextRun({text:"This integrated prescription combines Ayurvedic and modern medicine under physician supervision. Do not self-modify doses. ", size:17, color:LIGHT_GREEN, font:"Calibri"}),
      new TextRun({text:" \"Nidana Parivarjanam eva Chikitsa\"", size:17, color:WHITE, bold:true, italic:true, font:"Calibri"}),
    ],
  }),
];

// ── DOCUMENT ───────────────────────────────────────────────────
const doc = new Document({
  sections:[{
    properties:{ page:{ margin:{ top:700, bottom:700, left:800, right:800 } } },
    headers:{
      default: new Header({
        children:[new Paragraph({
          alignment:AlignmentType.CENTER,
          shading:{type:ShadingType.SOLID,color:PALE_GREEN},
          children:[new TextRun({text:"INTEGRATED Rx: Lean Madhumeha (Krisha Pramehi)  |  Kapha-Pitta Prakriti  |  Ayurvedic + Modern  |  July 2026", size:16, color:MED_GREEN, bold:true, font:"Calibri"})],
        })],
      }),
    },
    footers:{
      default: new Footer({
        children:[new Paragraph({
          alignment:AlignmentType.CENTER,
          children:[
            new TextRun({text:"Confidential Prescription  |  Page ", size:16, color:GREY_DARK, font:"Calibri"}),
            new TextRun({children:[PageNumber.CURRENT], size:16, color:GREY_DARK, font:"Calibri"}),
            new TextRun({text:"  |  For authorized use only", size:16, color:GREY_DARK, font:"Calibri"}),
          ],
        })],
      }),
    },
    children: content,
  }],
});

Packer.toBuffer(doc).then(buf=>{
  fs.writeFileSync("/home/daytona/workspace/lean-madhumeha-diet/Integrated_Rx_Lean_Madhumeha.docx", buf);
  console.log("SUCCESS");
});
Running Command

cd /home/daytona/workspace/lean-madhumeha-diet && node create_combined_rx.js 2>&…

Running Command

python3 -c " import zipfile, os f='/home/daytona/workspace/lean-madhumeha-diet/I…

Your integrated prescription document is ready:

Integrated Rx Lean Madhumeha

Word Document · DOCX


Document Contents

SectionWhat's Inside
Patient ProfileFull Samprapti, investigations, active complaints
Complete Prescription by TimingAll 12 medicines (Ayurvedic + Modern) arranged in 5 timing bands - 6AM → After Dinner
Quick Reference ScheduleSingle-page summary table patient can stick on wall/fridge
Drug Interaction Analysis14 interactions across 2 tables - Metformin interactions + Glimepride interactions - each with risk level (Safe / Monitor / Caution) and clinical action
Symptom-Medicine ConnectionExplains Aruchi, Tiktasya, cold+sweat - which modern medicine is contributing
Suggested Additions7 additions/changes to strengthen current Rx
Monitoring ScheduleTimepoint-wise follow-up plan
Critical Patient Instructions5 red/amber/green warning boxes for patient
Pathya-Apathya SummaryKey rules

Top 3 Clinical Points from This Rx

  1. Cold + sweating on walking = likely exercise hypoglycemia from Glimepride + additive Ayurvedic herbs + lean body - check glucose during the episode
  2. Tiktasya (bitter taste) = Metformin + Pachaka Pitta combined - taking Metformin strictly after food + Kavala Gandusha + Arogyavardhini BD will resolve it
  3. Amrtamehari Churna timing - currently after food is less effective for PPBS control; shifting to before food will improve postprandial glucose (236 → target <160)
This is a shared conversation. Sign in to Orris to start your own chat.