Medicine all use simple

Asking for Preferences

Yes all

Asking for Preferences
Here is a simple guide to all the most common medicines people use, explained in plain language:

Common Medicines Explained Simply


💊 PAIN & FEVER

Paracetamol (Acetaminophen / Tylenol / Crocin)

  • What it does: Reduces pain and fever
  • How it works: Tells your brain to lower the body's pain and temperature signals
  • Used for: Headache, fever, mild body pain
  • Important: Do NOT take too much - it can harm your liver

Ibuprofen (Advil / Brufen / Nurofen)

  • What it does: Reduces pain, fever, AND swelling
  • How it works: Blocks chemicals in your body (called prostaglandins) that cause pain and inflammation
  • Used for: Headache, toothache, period pain, swollen joints
  • Important: Take with food; not good for stomach ulcers or kidney problems

Aspirin

  • What it does: Reduces pain, fever, swelling; also thins the blood
  • How it works: Blocks the same pain chemicals as ibuprofen, AND stops blood from clotting easily
  • Used for: Mild pain; small daily dose used to prevent heart attacks
  • Important: Do NOT give to children under 16

🤧 COLD & ALLERGY

Antihistamines (Cetirizine / Loratadine / Benadryl)

  • What it does: Stops allergic reactions
  • How it works: Blocks "histamine" - the chemical your body releases when it thinks something (pollen, dust, food) is an enemy
  • Used for: Runny nose, sneezing, itchy eyes, skin rashes, hives
  • Types:
    • Older ones (Benadryl/Chlorphenamine) - make you sleepy
    • Newer ones (Cetirizine, Loratadine) - less sleepy

Decongestants (Pseudoephedrine / Xylometazoline nasal spray)

  • What it does: Unblocks a stuffy nose
  • How it works: Shrinks the swollen blood vessels inside your nose
  • Used for: Blocked nose from colds or allergies
  • Important: Don't use nasal sprays for more than 3-5 days or your nose becomes MORE blocked

🫁 BREATHING / ASTHMA

Salbutamol (Ventolin / blue inhaler)

  • What it does: Opens up the airways quickly
  • How it works: Relaxes the muscles around your airways so they widen and air can pass through
  • Used for: Asthma attack, wheezing, shortness of breath
  • Think of it as: A "rescue" inhaler - use when needed

Steroid Inhaler (Beclometasone / Budesonide / brown or orange inhaler)

  • What it does: Reduces swelling inside the airways every day
  • How it works: Calms down the inflammation that makes airways tight and sensitive
  • Used for: Preventing asthma attacks (taken daily, even when feeling fine)
  • Think of it as: A "preventer" inhaler

❤️ HEART & BLOOD PRESSURE

Beta-Blockers (Atenolol / Metoprolol / Bisoprolol)

  • What it does: Slows the heart down and lowers blood pressure
  • How it works: Blocks adrenaline signals that tell the heart to beat fast and hard
  • Used for: High blood pressure, fast heart rate, after heart attacks, anxiety

ACE Inhibitors (Ramipril / Lisinopril / Enalapril - names ending in "-pril")

  • What it does: Lowers blood pressure and protects the heart and kidneys
  • How it works: Blocks a hormone (angiotensin) that squeezes blood vessels tight
  • Used for: High blood pressure, heart failure, diabetes kidney protection
  • Side effect: Can cause a dry, annoying cough

Statins (Atorvastatin / Simvastatin / names ending in "-statin")

  • What it does: Lowers bad cholesterol (LDL)
  • How it works: Blocks the liver from making too much cholesterol
  • Used for: Preventing heart attacks and strokes in people with high cholesterol
  • Important: Take at night; muscle aches can be a side effect

Aspirin (low dose - 75 mg daily)

  • What it does: Prevents blood clots inside arteries
  • Used for: After a heart attack or stroke, to prevent another one

🩸 DIABETES

Metformin

  • What it does: Lowers blood sugar
  • How it works: Stops the liver from dumping too much sugar into the blood; also helps the body use insulin better
  • Used for: Type 2 diabetes (first-choice medicine)
  • Good news: Rarely causes low blood sugar (hypoglycemia)

Insulin (injected)

  • What it does: Acts like the insulin your pancreas can't make enough of
  • How it works: "Opens the door" on your cells so sugar from the blood can enter and be used as energy
  • Used for: Type 1 diabetes (always needed); severe Type 2 diabetes

🦠 INFECTION

Antibiotics (Amoxicillin / Azithromycin / Ciprofloxacin)

  • What they do: Kill bacteria
  • How they work: Each type attacks bacteria differently - some break the bacteria's wall, some stop it making proteins
  • Used for: Bacterial infections (throat, ear, urine, chest, skin)
  • VERY IMPORTANT:
    • Do NOT use for viral infections (colds, flu) - antibiotics don't work on viruses
    • Always finish the full course
    • Overusing them creates "superbugs" that can't be killed

Antifungals (Fluconazole / Clotrimazole cream)

  • What they do: Kill fungal infections
  • Used for: Thrush (yeast infection), athlete's foot, ringworm

Antivirals (Acyclovir / Oseltamivir/Tamiflu)

  • What they do: Stop viruses from multiplying
  • Used for: Herpes/cold sores (Acyclovir), Influenza/flu (Tamiflu)

🧠 MENTAL HEALTH

Antidepressants - SSRIs (Fluoxetine / Sertraline / Escitalopram)

  • What they do: Improve mood and reduce anxiety
  • How they work: Keep more "serotonin" (happy chemical) available in the brain
  • Used for: Depression, anxiety, OCD, panic attacks
  • Important: Take 2-4 weeks before you feel the full effect; don't stop suddenly

Benzodiazepines (Diazepam / Lorazepam / Alprazolam / Xanax)

  • What they do: Calm the brain and body quickly
  • How they work: Increase a calming chemical in the brain (GABA)
  • Used for: Severe anxiety, panic attacks, seizures, muscle spasms
  • Important: Can be habit-forming; only for short-term use

🤢 STOMACH & DIGESTION

Antacids (Gaviscon / Maalox / Milk of Magnesia)

  • What they do: Neutralize stomach acid immediately
  • Used for: Heartburn, indigestion after eating

Proton Pump Inhibitors / PPIs (Omeprazole / Pantoprazole - names ending in "-prazole")

  • What they do: Reduce how much acid the stomach makes
  • How they work: Block the "pump" in stomach cells that produces acid
  • Used for: Acid reflux (GERD), stomach ulcers, long-term heartburn

Antidiarrheal (Loperamide / Imodium)

  • What it does: Slows down the gut so you go to the toilet less
  • Used for: Diarrhea
  • Important: Do NOT use if diarrhea is from a serious infection - you need the bad stuff to come OUT

Laxatives (Lactulose / Senna / Movicol)

  • What they do: Help you go to the toilet when constipated
  • Types:
    • Osmotic (Lactulose/Movicol) - draw water into the bowel to soften stool
    • Stimulant (Senna) - push the bowel to move

🦴 BONE & JOINT

Bisphosphonates (Alendronate / Risedronate)

  • What they do: Strengthen bones
  • How they work: Slow down the cells that break down bone (osteoclasts)
  • Used for: Osteoporosis (weak, brittle bones)

Colchicine

  • What it does: Reduces pain and swelling in gout attacks
  • How it works: Stops white blood cells from rushing to uric acid crystals in joints

🔑 Simple Rules to Remember

RuleWhy
Always read the labelDoses matter a lot
Tell your doctor ALL medicines you takeSome medicines clash badly
Antibiotics ≠ virus treatmentThey only work on bacteria
Never share prescription medicinesThey are prescribed for your specific problem
Don't stop suddenly without askingSome medicines (steroids, antidepressants, blood pressure pills) need to be tapered

This covers the most common categories of medicines in everyday use. If you want a deeper explanation of any specific medicine or group, just ask!

निम्बू वाली बनाकर, short में PDF बनाकर दो, अच्छे से। Disease, medication use, side effect, all important common disease जो रही है use आजकल medicine, common medicine. इसी-

Reading File
Running Command

mkdir -p /home/daytona/workspace/medicine-pdf && ls /home/daytona/workspace/medi…

Writing File

~/medicine-pdf/create_medicine_pdf.py

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

# ── Lemon color palette ──────────────────────────────────────────────────────
LEMON        = colors.HexColor("#F5E642")   # bright lemon yellow
LEMON_LIGHT  = colors.HexColor("#FFFDE7")   # pale lemon background
LEMON_MID    = colors.HexColor("#FFF176")   # mid lemon
LEMON_DARK   = colors.HexColor("#F9A825")   # dark amber / lemon skin
TEXT_DARK    = colors.HexColor("#212121")   # near-black text
ACCENT_GREEN = colors.HexColor("#33691E")   # leaf green for headings
WHITE        = colors.white
RED_SOFT     = colors.HexColor("#C62828")   # soft red for side effects
BLUE_SOFT    = colors.HexColor("#1565C0")   # for medicine names

OUTPUT = "/home/daytona/workspace/medicine-pdf/Common_Medicines_Guide.pdf"

# ── Styles ───────────────────────────────────────────────────────────────────
def make_styles():
    base = getSampleStyleSheet()

    title_style = ParagraphStyle(
        "Title2",
        parent=base["Title"],
        fontSize=26,
        textColor=ACCENT_GREEN,
        alignment=TA_CENTER,
        spaceAfter=4,
        fontName="Helvetica-Bold",
    )
    subtitle_style = ParagraphStyle(
        "Subtitle",
        parent=base["Normal"],
        fontSize=11,
        textColor=LEMON_DARK,
        alignment=TA_CENTER,
        spaceAfter=2,
        fontName="Helvetica-Oblique",
    )
    section_style = ParagraphStyle(
        "Section",
        parent=base["Heading1"],
        fontSize=13,
        textColor=WHITE,
        backColor=ACCENT_GREEN,
        spaceBefore=10,
        spaceAfter=4,
        leftIndent=8,
        fontName="Helvetica-Bold",
        borderPad=4,
    )
    disease_style = ParagraphStyle(
        "Disease",
        parent=base["Normal"],
        fontSize=11,
        textColor=ACCENT_GREEN,
        fontName="Helvetica-Bold",
        spaceBefore=4,
        spaceAfter=2,
    )
    body_style = ParagraphStyle(
        "Body2",
        parent=base["Normal"],
        fontSize=9,
        textColor=TEXT_DARK,
        fontName="Helvetica",
        spaceAfter=2,
        leftIndent=6,
    )
    note_style = ParagraphStyle(
        "Note",
        parent=base["Normal"],
        fontSize=8,
        textColor=LEMON_DARK,
        fontName="Helvetica-Oblique",
        spaceAfter=2,
        leftIndent=6,
    )
    footer_style = ParagraphStyle(
        "Footer",
        parent=base["Normal"],
        fontSize=8,
        textColor=colors.grey,
        alignment=TA_CENTER,
    )
    return {
        "title": title_style,
        "subtitle": subtitle_style,
        "section": section_style,
        "disease": disease_style,
        "body": body_style,
        "note": note_style,
        "footer": footer_style,
    }

# ── Data ─────────────────────────────────────────────────────────────────────
DISEASES = [
    {
        "section": "🤒  बुखार, दर्द & सूजन (Fever, Pain & Inflammation)",
        "entries": [
            {
                "disease": "बुखार / सिरदर्द / हल्का दर्द (Fever / Headache / Mild Pain)",
                "medicine": "Paracetamol (Crocin, Calpol, Dolo 650)",
                "use": "बुखार कम करे, दर्द घटाए",
                "dose": "500–1000 mg हर 6 घंटे में (max 4g/day)",
                "side_effects": "अधिक मात्रा में Liver damage; सामान्य dose में बहुत safe",
                "tip": "खाली पेट ले सकते हैं",
            },
            {
                "disease": "दर्द + सूजन (Pain + Swelling / Inflammation)",
                "medicine": "Ibuprofen (Brufen, Combiflam)",
                "use": "दर्द, बुखार, सूजन तीनों कम करे",
                "dose": "400 mg हर 8 घंटे (खाने के साथ)",
                "side_effects": "पेट दर्द, Acidity, Kidney पर असर (लंबे समय)",
                "tip": "Ulcer हो तो avoid करें",
            },
            {
                "disease": "जोड़ों का दर्द / गठिया (Joint Pain / Arthritis)",
                "medicine": "Diclofenac (Voveran), Naproxen",
                "use": "सूजन और दर्द घटाए",
                "dose": "50 mg दिन में 2-3 बार",
                "side_effects": "पेट में जलन, BP बढ़ना, Kidney",
                "tip": "PPI (Omeprazole) साथ लें",
            },
        ],
    },
    {
        "section": "🤧  सर्दी, खांसी & एलर्जी (Cold, Cough & Allergy)",
        "entries": [
            {
                "disease": "एलर्जी / बहती नाक / खुजली (Allergy / Runny Nose / Itching)",
                "medicine": "Cetirizine (Zyrtec, Alerid), Loratadine",
                "use": "Histamine block करे – एलर्जी रोके",
                "dose": "10 mg रात को एक बार",
                "side_effects": "नींद आना (Cetirizine में ज़्यादा), मुँह सूखना",
                "tip": "रात को लेना बेहतर",
            },
            {
                "disease": "बंद नाक (Blocked Nose)",
                "medicine": "Xylometazoline Nasal Spray (Otrivin)",
                "use": "नाक की सूजी नसें सिकोड़े",
                "dose": "1-2 drops/spray, दिन में 2-3 बार",
                "side_effects": "3-5 दिन से ज़्यादा use = और बंद नाक (Rebound)",
                "tip": "Max 5 दिन ही use करें",
            },
            {
                "disease": "सूखी खांसी (Dry Cough)",
                "medicine": "Dextromethorphan (Benadryl Cough), Codeine",
                "use": "खांसी का reflex दबाए",
                "dose": "Syrup – label देखें",
                "side_effects": "नींद, चक्कर, कब्ज़",
                "tip": "Productive cough में use न करें",
            },
            {
                "disease": "बलगम वाली खांसी (Wet Cough)",
                "medicine": "Ambroxol (Mucinac), Bromhexine",
                "use": "बलगम पतला करे, निकलने में मदद",
                "dose": "30 mg दिन में 3 बार",
                "side_effects": "मतली, पेट में हल्की तकलीफ",
                "tip": "ढेर सारा पानी पिएं",
            },
        ],
    },
    {
        "section": "🫁  दमा & सांस (Asthma & Breathing)",
        "entries": [
            {
                "disease": "अस्थमा अटैक / घबराहट वाली सांस (Asthma Attack)",
                "medicine": "Salbutamol Inhaler (Asthalin, Ventolin) – BLUE",
                "use": "Airways खोले – तुरंत राहत",
                "dose": "1-2 puffs जब ज़रूरत हो",
                "side_effects": "हाथ काँपना, दिल तेज़ धड़कना",
                "tip": "Rescue inhaler – रोज़ नहीं, ज़रूरत पर",
            },
            {
                "disease": "दमे की रोकथाम (Asthma Prevention)",
                "medicine": "Budesonide Inhaler (Budecort) – BROWN/ORANGE",
                "use": "Airways की सूजन रोज़ कम करे",
                "dose": "1-2 puffs सुबह-शाम रोज़",
                "side_effects": "मुँह में Fungus (Candida) – use के बाद कुल्ला करें",
                "tip": "Preventer है – बंद न करें जब ठीक लगे",
            },
        ],
    },
    {
        "section": "❤️  BP, दिल & Cholesterol",
        "entries": [
            {
                "disease": "High Blood Pressure (उच्च रक्तचाप)",
                "medicine": "Amlodipine (Amlod), Telmisartan, Ramipril",
                "use": "Blood vessels को relax करे, BP कम करे",
                "dose": "Doctor के अनुसार – रोज़ एक बार",
                "side_effects": "Amlodipine: पैरों में सूजन | Ramipril: सूखी खांसी",
                "tip": "कभी अचानक बंद न करें",
            },
            {
                "disease": "High Cholesterol (LDL बढ़ा)",
                "medicine": "Atorvastatin (Lipitor, Atorva), Rosuvastatin",
                "use": "Liver से bad cholesterol (LDL) कम करे",
                "dose": "10-40 mg रात को",
                "side_effects": "Muscle pain/weakness, Liver enzyme बढ़ना",
                "tip": "रात को लें; Grapefruit juice avoid",
            },
            {
                "disease": "Heart Attack Prevention / Blood Clot",
                "medicine": "Aspirin 75 mg (Ecosprin)",
                "use": "Blood thinning – clot नहीं बनने देता",
                "dose": "75 mg रोज़ एक बार (खाने के साथ)",
                "side_effects": "Stomach bleeding, Acidity",
                "tip": "PPI साथ लें",
            },
        ],
    },
    {
        "section": "🩸  Diabetes (मधुमेह)",
        "entries": [
            {
                "disease": "Type 2 Diabetes",
                "medicine": "Metformin (Glucophage, Glycomet)",
                "use": "Liver का sugar कम करे, Insulin sensitivity बढ़ाए",
                "dose": "500-1000 mg खाने के साथ",
                "side_effects": "पेट फूलना, दस्त (शुरुआत में), B12 कमी",
                "tip": "धीरे-धीरे dose बढ़ाएं",
            },
            {
                "disease": "Type 2 – Extra Sugar Control",
                "medicine": "Glimepiride, Glipizide (Sulphonylureas)",
                "use": "Pancreas से Insulin निकलवाए",
                "dose": "1-4 mg सुबह खाने से पहले",
                "side_effects": "Hypoglycemia (sugar गिरना), वज़न बढ़ना",
                "tip": "खाना न खाएं तो यह गोली न लें",
            },
            {
                "disease": "Type 1 / Severe Type 2",
                "medicine": "Insulin (Injection – Regular, NPH, Glargine)",
                "use": "Body की insulin replace करे",
                "dose": "Doctor-prescribed units",
                "side_effects": "Hypoglycemia, injection site पर सूजन",
                "tip": "Glucose candy हमेशा साथ रखें",
            },
        ],
    },
    {
        "section": "🦠  Infection (संक्रमण)",
        "entries": [
            {
                "disease": "Bacterial Infection (throat, urine, skin, chest)",
                "medicine": "Amoxicillin, Azithromycin (Zithromax), Ciprofloxacin",
                "use": "Bacteria की cell wall / protein तोड़े",
                "dose": "Doctor के अनुसार – 5-7 दिन",
                "side_effects": "Diarrhea, Allergy rash, Gut bacteria नष्ट",
                "tip": "पूरा course लें – बीच में बंद न करें",
            },
            {
                "disease": "Fungal Infection (थ्रश, Ringworm, Athlete's foot)",
                "medicine": "Fluconazole (oral), Clotrimazole cream",
                "use": "Fungal cell membrane तोड़े",
                "dose": "Fluconazole 150 mg single dose (thrush)",
                "side_effects": "Nausea, Liver (rare)",
                "tip": "Cream कम से कम 2 हफ्ते लगाएं",
            },
            {
                "disease": "Viral (Herpes, Cold Sore, Flu)",
                "medicine": "Acyclovir (Herpes), Oseltamivir/Tamiflu (Flu)",
                "use": "Virus की copying रोके",
                "dose": "Acyclovir: 400 mg 3x/day 5 days",
                "side_effects": "Nausea, headache, Kidney (Acyclovir)",
                "tip": "जल्दी शुरू करें – ज़्यादा असरदार",
            },
        ],
    },
    {
        "section": "🧠  Mental Health (मानसिक स्वास्थ्य)",
        "entries": [
            {
                "disease": "Depression / Anxiety (अवसाद / चिंता)",
                "medicine": "Sertraline, Fluoxetine, Escitalopram (SSRIs)",
                "use": "Brain में Serotonin बढ़ाए",
                "dose": "Doctor के अनुसार – 20-50 mg/day",
                "side_effects": "पहले 2 हफ्ते: मतली, नींद न आना; Sexual side effects",
                "tip": "4-6 हफ्ते में असर – धैर्य रखें",
            },
            {
                "disease": "Severe Anxiety / Panic Attack",
                "medicine": "Alprazolam (Xanax), Clonazepam (Benzodiazepines)",
                "use": "Brain को तुरंत शांत करे (GABA बढ़ाए)",
                "dose": "0.25-0.5 mg जब ज़रूरत",
                "side_effects": "Addiction, नींद, memory कमज़ोर",
                "tip": "सिर्फ short-term; अचानक बंद न करें",
            },
        ],
    },
    {
        "section": "🤢  पेट & पाचन (Stomach & Digestion)",
        "entries": [
            {
                "disease": "Acidity / Heartburn (एसिडिटी)",
                "medicine": "Omeprazole, Pantoprazole (PPIs)",
                "use": "Stomach में acid बनना कम करे",
                "dose": "20-40 mg सुबह खाने से 30 min पहले",
                "side_effects": "B12, Magnesium, Calcium कमी (लंबे समय में)",
                "tip": "8 हफ्ते से ज़्यादा doctor की सलाह से",
            },
            {
                "disease": "Diarrhea (दस्त)",
                "medicine": "ORS + Loperamide (Imodium)",
                "use": "Gut movement slow करे; पानी-नमक replace",
                "dose": "ORS: हर loose stool के बाद",
                "side_effects": "Loperamide: Constipation, Bloating",
                "tip": "Severe infection में Loperamide avoid",
            },
            {
                "disease": "Constipation (कब्ज़)",
                "medicine": "Lactulose, Bisacodyl (Dulcolax), Isabgol",
                "use": "Stool को नरम/push करे",
                "dose": "Isabgol: 1 tsp रात पानी के साथ",
                "side_effects": "Bloating, Cramps",
                "tip": "ढेर सारा पानी ज़रूरी",
            },
            {
                "disease": "Nausea / Vomiting (मतली / उल्टी)",
                "medicine": "Ondansetron (Emeset), Domperidone (Domstal)",
                "use": "Vomiting centre block करे",
                "dose": "4-8 mg; Domperidone 10 mg खाने से पहले",
                "side_effects": "Headache, Constipation",
                "tip": "Pregnancy में doctor की सलाह लें",
            },
        ],
    },
    {
        "section": "🦴  हड्डी & जोड़ (Bone & Joint)",
        "entries": [
            {
                "disease": "Osteoporosis (कमज़ोर हड्डियाँ)",
                "medicine": "Alendronate (Fosamax), Calcium + Vit D3",
                "use": "Bone breakdown slow करे",
                "dose": "Alendronate: 70 mg हफ्ते में एक बार",
                "side_effects": "Esophagus में जलन, Jaw problem (rare)",
                "tip": "खाली पेट + पूरे गिलास पानी के साथ; 30 min तक लेट न जाएं",
            },
            {
                "disease": "Gout (गाउट – Uric Acid बढ़ना)",
                "medicine": "Allopurinol (लंबे समय), Colchicine (attack में)",
                "use": "Uric acid कम करे / जोड़ों की सूजन घटाए",
                "dose": "Allopurinol: 100-300 mg/day",
                "side_effects": "Colchicine: Diarrhea, Nausea",
                "tip": "ज़्यादा पानी पिएं; Red meat, Beer कम करें",
            },
        ],
    },
    {
        "section": "🩺  Thyroid & Hormones",
        "entries": [
            {
                "disease": "Hypothyroidism (थायरॉइड कम)",
                "medicine": "Levothyroxine (Eltroxin, Thyronorm)",
                "use": "Missing thyroid hormone replace करे",
                "dose": "Doctor-prescribed – सुबह खाली पेट",
                "side_effects": "अधिक dose: Heart palpitations, Weight loss",
                "tip": "Coffee/milk से 30 min पहले लें",
            },
        ],
    },
]

# ── Build PDF ─────────────────────────────────────────────────────────────────
def build_pdf():
    doc = SimpleDocTemplate(
        OUTPUT,
        pagesize=A4,
        topMargin=1.8*cm,
        bottomMargin=2*cm,
        leftMargin=1.5*cm,
        rightMargin=1.5*cm,
        title="Common Medicines Guide",
        author="Orris Health",
    )

    S = make_styles()
    W = A4[0] - 3*cm   # usable width

    story = []

    # ── Cover block ───────────────────────────────────────────────────────────
    cover_data = [[
        Paragraph("🍋 Common Medicines Guide", S["title"]),
    ]]
    cover_table = Table(cover_data, colWidths=[W])
    cover_table.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), LEMON),
        ("ALIGN", (0,0), (-1,-1), "CENTER"),
        ("TOPPADDING", (0,0), (-1,-1), 14),
        ("BOTTOMPADDING", (0,0), (-1,-1), 8),
        ("ROUNDEDCORNERS", [8]),
    ]))
    story.append(cover_table)
    story.append(Spacer(1, 0.3*cm))
    story.append(Paragraph("आम बीमारियाँ • दवाइयाँ • Use • Side Effects — सरल भाषा में", S["subtitle"]))
    story.append(HRFlowable(width=W, color=LEMON_DARK, thickness=2, spaceAfter=8))

    # ── Table header row ──────────────────────────────────────────────────────
    col_widths = [3.8*cm, 3.8*cm, 2.4*cm, 2.6*cm, 3.8*cm, 2.0*cm]

    header_style = ParagraphStyle(
        "TH", fontSize=8, fontName="Helvetica-Bold",
        textColor=WHITE, alignment=TA_CENTER
    )
    cell_style = ParagraphStyle(
        "TD", fontSize=7.5, fontName="Helvetica",
        textColor=TEXT_DARK, leading=10
    )
    med_style = ParagraphStyle(
        "MED", fontSize=7.5, fontName="Helvetica-Bold",
        textColor=BLUE_SOFT, leading=10
    )
    se_style = ParagraphStyle(
        "SE", fontSize=7.5, fontName="Helvetica",
        textColor=RED_SOFT, leading=10
    )
    tip_style = ParagraphStyle(
        "TIP", fontSize=7, fontName="Helvetica-Oblique",
        textColor=ACCENT_GREEN, leading=9
    )

    headers = ["बीमारी", "दवाई (Medicine)", "Use", "Dose", "Side Effects", "Tip"]

    for section_data in DISEASES:
        # Section heading row spanning full width
        sec_para = Paragraph(section_data["section"], S["section"])
        sec_table = Table([[sec_para]], colWidths=[W])
        sec_table.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,-1), ACCENT_GREEN),
            ("LEFTPADDING", (0,0), (-1,-1), 8),
            ("RIGHTPADDING", (0,0), (-1,-1), 4),
            ("TOPPADDING", (0,0), (-1,-1), 5),
            ("BOTTOMPADDING", (0,0), (-1,-1), 5),
        ]))
        story.append(KeepTogether([sec_table, Spacer(1, 2)]))

        # Build table rows for this section
        table_data = [
            [Paragraph(h, header_style) for h in headers]
        ]
        row_styles = [
            ("BACKGROUND", (0,0), (-1,0), LEMON_DARK),
            ("TEXTCOLOR", (0,0), (-1,0), WHITE),
            ("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
            ("FONTSIZE", (0,0), (-1,0), 8),
            ("ALIGN", (0,0), (-1,-1), "LEFT"),
            ("VALIGN", (0,0), (-1,-1), "TOP"),
            ("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#E0E0E0")),
            ("ROWBACKGROUNDS", (0,1), (-1,-1), [LEMON_LIGHT, WHITE]),
            ("TOPPADDING", (0,0), (-1,-1), 4),
            ("BOTTOMPADDING", (0,0), (-1,-1), 4),
            ("LEFTPADDING", (0,0), (-1,-1), 4),
            ("RIGHTPADDING", (0,0), (-1,-1), 4),
        ]

        for i, entry in enumerate(section_data["entries"]):
            row = [
                Paragraph(entry["disease"], cell_style),
                Paragraph(entry["medicine"], med_style),
                Paragraph(entry["use"], cell_style),
                Paragraph(entry["dose"], cell_style),
                Paragraph(entry["side_effects"], se_style),
                Paragraph(entry["tip"], tip_style),
            ]
            table_data.append(row)

        t = Table(table_data, colWidths=col_widths, repeatRows=1)
        t.setStyle(TableStyle(row_styles))
        story.append(KeepTogether([t, Spacer(1, 6)]))

    # ── Golden Rules box ──────────────────────────────────────────────────────
    rules_style = ParagraphStyle(
        "Rules", fontSize=8.5, fontName="Helvetica",
        textColor=TEXT_DARK, leading=13
    )
    rules_title = ParagraphStyle(
        "RulesTitle", fontSize=11, fontName="Helvetica-Bold",
        textColor=ACCENT_GREEN, spaceAfter=4
    )
    rules = [
        Paragraph("⚠️  ज़रूरी नियम (Golden Rules)", rules_title),
        Paragraph("✅  Antibiotic सिर्फ Bacterial infection में – Virus में काम नहीं करता", rules_style),
        Paragraph("✅  Antibiotic का पूरा course लें – बीच में बंद न करें", rules_style),
        Paragraph("✅  Pain killer (NSAID) हमेशा खाने के साथ", rules_style),
        Paragraph("✅  BP / Thyroid / Diabetes की दवाई कभी खुद बंद न करें", rules_style),
        Paragraph("✅  सभी दवाइयाँ doctor को बताएं (Drug interactions होते हैं)", rules_style),
        Paragraph("✅  Paracetamol safe है – लेकिन 4 gram/day से ज़्यादा नहीं", rules_style),
        Paragraph("✅  Nasal spray 5 दिन से ज़्यादा नहीं", rules_style),
        Paragraph("✅  Benzodiazepine (Xanax आदि) habit बनाती है – सिर्फ short-term", rules_style),
    ]
    rules_table = Table([[rules]], colWidths=[W])
    rules_table.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), LEMON_MID),
        ("TOPPADDING", (0,0), (-1,-1), 10),
        ("BOTTOMPADDING", (0,0), (-1,-1), 10),
        ("LEFTPADDING", (0,0), (-1,-1), 12),
        ("RIGHTPADDING", (0,0), (-1,-1), 12),
        ("BOX", (0,0), (-1,-1), 1.5, LEMON_DARK),
        ("ROUNDEDCORNERS", [6]),
    ]))
    story.append(Spacer(1, 0.4*cm))
    story.append(rules_table)

    # ── Footer ────────────────────────────────────────────────────────────────
    story.append(Spacer(1, 0.3*cm))
    story.append(HRFlowable(width=W, color=LEMON_DARK, thickness=1))
    story.append(Paragraph(
        "🍋 यह guide सामान्य जानकारी के लिए है। किसी भी दवाई से पहले Doctor / Pharmacist की सलाह लें।  |  Orris Health 2026",
        S["footer"]
    ))

    doc.build(story)
    print(f"PDF created: {OUTPUT}")

build_pdf()
Running Command

cd /home/daytona/workspace/medicine-pdf && python create_medicine_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/medicine-pdf/Common_Medicines_Guide.pdf

आपका PDF तैयार है! 🍋 यहाँ से download करें:

Common Medicines Guide

PDF Document · PDF


PDF में क्या है:
Sectionबीमारियाँ
🤒 बुखार / दर्दParacetamol, Ibuprofen, Diclofenac
🤧 सर्दी / एलर्जीCetirizine, Nasal Spray, Cough Syrup
🫁 दमा / सांसSalbutamol (Blue), Budesonide (Brown)
❤️ BP / Heart / CholesterolAmlodipine, Statins, Aspirin 75mg
🩸 DiabetesMetformin, Glimepiride, Insulin
🦠 InfectionAntibiotics, Antifungals, Antivirals
🧠 Mental HealthSSRIs, Benzodiazepines
🤢 पेट / पाचनOmeprazole, ORS, Loperamide, Ondansetron
🦴 हड्डी / जोड़Alendronate, Allopurinol, Colchicine
🩺 ThyroidLevothyroxine
Theme: नींबू पीला (Lemon Yellow) + हरा - हर section में 6 columns: बीमारी, दवाई, Use, Dose, Side Effects, Tip। अंत में Golden Rules box भी है।

Add this PDF to Word document with notes section

Reading File
Running Command

cd /home/daytona/workspace/medicine-pdf && pdftoppm -jpeg -r 180 Common_Medicine…

Writing File

~/medicine-pdf/create_docx.js

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

const DIR = '/home/daytona/workspace/medicine-pdf/';
const OUT = DIR + 'Common_Medicines_Guide_with_Notes.docx';

// ── Colors ──────────────────────────────────────────────────────────────────
const LEMON_BG   = "FFFDE7";   // pale lemon
const LEMON_YEL  = "F5E642";   // bright lemon
const AMBER      = "F9A825";   // amber / lemon skin
const GREEN_DARK = "33691E";   // leaf green
const WHITE      = "FFFFFF";
const LIGHT_GREY = "F5F5F5";
const GREY_BDR   = "BDBDBD";

// ── Helper: make a horizontal line paragraph ────────────────────────────────
function hrLine(color = AMBER) {
  return new Paragraph({
    border: { bottom: { color, size: 12, style: BorderStyle.SINGLE } },
    spacing: { after: 80 },
  });
}

// ── Helper: shaded heading paragraph ────────────────────────────────────────
function sectionHeading(text) {
  return new Paragraph({
    children: [
      new TextRun({
        text,
        bold: true,
        color: WHITE,
        size: 24,
        font: "Calibri",
      }),
    ],
    shading: { type: ShadingType.CLEAR, fill: GREEN_DARK },
    spacing: { before: 200, after: 80 },
    indent: { left: convertInchesToTwip(0.1) },
  });
}

// ── Helper: notes line (lined blank row) ────────────────────────────────────
function notesLine(label = "") {
  return new TableRow({
    children: [
      new TableCell({
        children: [
          new Paragraph({
            children: label
              ? [new TextRun({ text: label, bold: true, color: GREEN_DARK, size: 18, font: "Calibri" })]
              : [new TextRun({ text: "" })],
            spacing: { after: 0 },
          }),
        ],
        width: { size: 25, type: WidthType.PERCENTAGE },
        shading: { type: ShadingType.CLEAR, fill: LEMON_BG },
        borders: {
          bottom: { style: BorderStyle.SINGLE, size: 4, color: AMBER },
          top:    { style: BorderStyle.NONE },
          left:   { style: BorderStyle.NONE },
          right:  { style: BorderStyle.NONE },
        },
        margins: { top: 60, bottom: 60, left: 80, right: 80 },
      }),
      new TableCell({
        children: [new Paragraph({ children: [new TextRun({ text: "" })] })],
        width: { size: 75, type: WidthType.PERCENTAGE },
        borders: {
          bottom: { style: BorderStyle.SINGLE, size: 4, color: AMBER },
          top:    { style: BorderStyle.NONE },
          left:   { style: BorderStyle.NONE },
          right:  { style: BorderStyle.NONE },
        },
        margins: { top: 60, bottom: 60, left: 80, right: 80 },
      }),
    ],
    height: { value: 400, rule: "atLeast" },
  });
}

// ── Load page images ─────────────────────────────────────────────────────────
const pages = ['page-1.jpg', 'page-2.jpg', 'page-3.jpg']
  .filter(f => fs.existsSync(DIR + f))
  .map(f => fs.readFileSync(DIR + f));

// ── Build page-image paragraphs ──────────────────────────────────────────────
function makePageImage(imgBuffer, pageNum) {
  return [
    new Paragraph({
      children: [
        new TextRun({
          text: `Page ${pageNum}`,
          bold: true, color: AMBER, size: 18, font: "Calibri",
        }),
      ],
      spacing: { before: 100, after: 60 },
    }),
    new Paragraph({
      children: [
        new ImageRun({
          data: imgBuffer,
          transformation: { width: 620, height: 878 },
          type: "jpg",
        }),
      ],
      alignment: AlignmentType.CENTER,
      spacing: { after: 200 },
    }),
  ];
}

// ── Notes section topics ─────────────────────────────────────────────────────
const NOTE_TOPICS = [
  "बुखार / दर्द",
  "सर्दी / एलर्जी",
  "दमा / सांस",
  "BP / Heart / Cholesterol",
  "Diabetes",
  "Infection / Antibiotics",
  "Mental Health",
  "पेट / पाचन",
  "हड्डी / जोड़",
  "Thyroid",
  "Important Reminders",
  "My Medicines (Personal)",
  "Doctor Notes",
  "Allergies / Reactions",
  "Other Notes",
];

// ── Assemble document ────────────────────────────────────────────────────────
const pdfPageChildren = [];
pages.forEach((buf, i) => {
  pdfPageChildren.push(...makePageImage(buf, i + 1));
});

// Notes section children
const notesChildren = [
  new Paragraph({
    children: [
      new TextRun({ text: "📝  Notes Section", bold: true, size: 36, color: GREEN_DARK, font: "Calibri" }),
    ],
    alignment: AlignmentType.CENTER,
    spacing: { before: 200, after: 100 },
    shading: { type: ShadingType.CLEAR, fill: LEMON_YEL },
  }),
  new Paragraph({
    children: [
      new TextRun({
        text: "अपनी दवाइयाँ, Doctor के notes, और ज़रूरी जानकारी यहाँ लिखें",
        italics: true, color: GREEN_DARK, size: 20, font: "Calibri",
      }),
    ],
    alignment: AlignmentType.CENTER,
    spacing: { after: 200 },
  }),
  hrLine(),
];

NOTE_TOPICS.forEach(topic => {
  notesChildren.push(sectionHeading(topic));
  notesChildren.push(
    new Table({
      rows: [
        notesLine("दवाई:"),
        notesLine("Dose:"),
        notesLine("Side Effect:"),
        notesLine("मेरी Note:"),
      ],
      width: { size: 100, type: WidthType.PERCENTAGE },
      margins: { top: 40, bottom: 40, left: 40, right: 40 },
    })
  );
  notesChildren.push(new Paragraph({ spacing: { after: 120 } }));
});

// Extra blank writing lines
notesChildren.push(sectionHeading("✏️  Free Notes (अपने notes यहाँ लिखें)"));
for (let i = 0; i < 18; i++) {
  notesChildren.push(
    new Paragraph({
      border: { bottom: { color: AMBER, size: 6, style: BorderStyle.SINGLE } },
      spacing: { after: 320 },
    })
  );
}

const doc = new Document({
  creator: "Orris Health",
  title: "Common Medicines Guide with Notes",
  description: "आम बीमारियाँ, दवाइयाँ, Side Effects – Notes के साथ",
  styles: {
    default: {
      document: {
        run: { font: "Calibri", size: 22, color: "212121" },
      },
    },
  },
  sections: [
    // ── Section 1: Cover + PDF pages ─────────────────────────────────────
    {
      properties: {
        page: {
          margin: { top: 720, bottom: 720, left: 800, right: 800 },
        },
      },
      headers: {
        default: new Header({
          children: [
            new Paragraph({
              children: [
                new TextRun({ text: "🍋 Common Medicines Guide", bold: true, color: GREEN_DARK, size: 20, font: "Calibri" }),
                new TextRun({ text: "   |   आम बीमारियाँ • दवाइयाँ • Side Effects", color: AMBER, size: 18, font: "Calibri" }),
              ],
              border: { bottom: { color: AMBER, size: 8, style: BorderStyle.SINGLE } },
              spacing: { after: 60 },
            }),
          ],
        }),
      },
      footers: {
        default: new Footer({
          children: [
            new Paragraph({
              children: [
                new TextRun({ text: "Orris Health 2026  |  यह guide सामान्य जानकारी के लिए है। किसी भी दवाई से पहले Doctor की सलाह लें।  |  Page ", color: "888888", size: 16, font: "Calibri" }),
                new TextRun({ children: [PageNumber.CURRENT], color: "888888", size: 16 }),
              ],
              alignment: AlignmentType.CENTER,
              border: { top: { color: AMBER, size: 6, style: BorderStyle.SINGLE } },
              spacing: { before: 60 },
            }),
          ],
        }),
      },
      children: [
        // Title block
        new Paragraph({
          children: [
            new TextRun({ text: "🍋  Common Medicines Guide", bold: true, size: 52, color: GREEN_DARK, font: "Calibri" }),
          ],
          alignment: AlignmentType.CENTER,
          shading: { type: ShadingType.CLEAR, fill: LEMON_YEL },
          spacing: { before: 200, after: 80 },
        }),
        new Paragraph({
          children: [
            new TextRun({
              text: "आम बीमारियाँ • दवाइयाँ • Use • Side Effects — सरल हिंदी में",
              italics: true, size: 22, color: AMBER, font: "Calibri",
            }),
          ],
          alignment: AlignmentType.CENTER,
          spacing: { after: 40 },
        }),
        hrLine(),
        new Paragraph({
          children: [
            new TextRun({ text: "📋  PDF Guide — सभी Pages", bold: true, size: 26, color: GREEN_DARK, font: "Calibri" }),
          ],
          spacing: { before: 120, after: 80 },
        }),
        ...pdfPageChildren,
      ],
    },

    // ── Section 2: Notes ─────────────────────────────────────────────────
    {
      properties: {
        page: {
          margin: { top: 720, bottom: 720, left: 800, right: 800 },
        },
      },
      headers: {
        default: new Header({
          children: [
            new Paragraph({
              children: [
                new TextRun({ text: "📝  Notes Section — अपनी दवाइयाँ और Doctor के Notes", bold: true, color: GREEN_DARK, size: 20, font: "Calibri" }),
              ],
              border: { bottom: { color: AMBER, size: 8, style: BorderStyle.SINGLE } },
              spacing: { after: 60 },
            }),
          ],
        }),
      },
      footers: {
        default: new Footer({
          children: [
            new Paragraph({
              children: [
                new TextRun({ text: "Orris Health 2026  |  Page ", color: "888888", size: 16, font: "Calibri" }),
                new TextRun({ children: [PageNumber.CURRENT], color: "888888", size: 16 }),
              ],
              alignment: AlignmentType.CENTER,
              border: { top: { color: AMBER, size: 6, style: BorderStyle.SINGLE } },
              spacing: { before: 60 },
            }),
          ],
        }),
      },
      children: notesChildren,
    },
  ],
});

Packer.toBuffer(doc).then(buf => {
  fs.writeFileSync(OUT, buf);
  console.log("DOCX created:", OUT);
}).catch(err => {
  console.error("Error:", err);
  process.exit(1);
});
Running Command

cd /home/daytona/workspace/medicine-pdf && node create_docx.js 2>&1

Running Command

cd /home/daytona/workspace/medicine-pdf && python /home/daytona/skills/docx/scri…

Running Command

ls -lh /home/daytona/workspace/medicine-pdf/Common_Medicines_Guide_with_Notes.do…

आपका Word document तैयार है! (594 KB) यहाँ से download करें:

Common Medicines Guide with Notes

Word Document · DOCX


Document में क्या है:
Section 1 - PDF Guide (3 Pages)
  • PDF की तीनों pages full-size images के रूप में embed हैं
  • Lemon yellow + green थीम के साथ header/footer
  • Page numbers
Section 2 - Notes Section (15+ topics)
हर topic के लिए एक structured table:
FieldDescription
दवाईआपकी medicine का नाम
Doseकितनी और कब
Side Effectजो आपने notice किया
मेरी Notepersonal reminder
Topics cover करते हैं: बुखार/दर्द, सर्दी/एलर्जी, दमा, BP/Heart, Diabetes, Infection, Mental Health, पेट/पाचन, हड्डी/जोड़, Thyroid, My Medicines, Doctor Notes, Allergies, और Free Notes (18 blank lines)।
This is a shared conversation. Sign in to Orris to start your own chat.