Mam, the topic for the guest lecture will be "Essential Nutrients from Food" for Grade 1and 2 , explain how different coloured foods help different organs in our body (e.g., orange foods for the eyes, green foods for overall health, red foods for the heart, etc.) in a simple and age-appropriate manner. In oncology setup doctors notes

Asking for Preferences
Reading File
Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or not found"

Running Command

mkdir -p /home/daytona/workspace/essential-nutrients-lecture

Writing File

~/essential-nutrients-lecture/create_doc.js

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

// ── Colour palette for section shading ──
const COLOURS = {
  orange:  'FFF3E0',
  green:   'E8F5E9',
  red:     'FFEBEE',
  yellow:  'FFFDE7',
  blue:    'E3F2FD',
  purple:  'F3E5F5',
  white:   'FFFFFF',
  header:  '1A237E',   // dark navy for doc header
  accent:  'E8EAF6',   // light indigo for title row bg
};

function heading1(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_1,
    spacing: { before: 320, after: 160 },
    children: [new TextRun({ text, font: 'Arial', size: 32, bold: true, color: '1A237E' })],
  });
}

function heading2(text, colour) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_2,
    spacing: { before: 240, after: 120 },
    shading: { type: ShadingType.CLEAR, fill: colour || 'FFFFFF' },
    children: [new TextRun({ text, font: 'Arial', size: 26, bold: true, color: '000000' })],
  });
}

function heading3(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_3,
    spacing: { before: 180, after: 80 },
    children: [new TextRun({ text, font: 'Arial', size: 24, bold: true, color: '37474F' })],
  });
}

function para(text, options = {}) {
  return new Paragraph({
    spacing: { before: 80, after: 80 },
    shading: options.shade ? { type: ShadingType.CLEAR, fill: options.shade } : undefined,
    children: [new TextRun({ text, font: 'Arial', size: 22, bold: options.bold || false, italics: options.italic || false })],
  });
}

function bullet(text, ref, shade) {
  return new Paragraph({
    numbering: { reference: ref, level: 0 },
    spacing: { before: 60, after: 60 },
    shading: shade ? { type: ShadingType.CLEAR, fill: shade } : undefined,
    children: [new TextRun({ text, font: 'Arial', size: 22 })],
  });
}

function spacer() {
  return new Paragraph({ children: [new TextRun('')], spacing: { before: 80, after: 80 } });
}

function colourTableRow(emoji, colour, foodExamples, bodyPart, benefit, nutrient) {
  const cellPad = { top: 80, bottom: 80, left: 100, right: 100 };
  const cellOpts = (text, w, bold, shade) => new TableCell({
    width: { size: w, type: WidthType.DXA },
    shading: { type: ShadingType.CLEAR, fill: shade || 'FFFFFF' },
    margins: cellPad,
    verticalAlign: VerticalAlign.CENTER,
    children: [new Paragraph({
      alignment: AlignmentType.LEFT,
      children: [new TextRun({ text, font: 'Arial', size: 20, bold: bold || false })],
    })],
  });
  return new TableRow({
    children: [
      cellOpts(`${emoji} ${colour}`, 1400, true, COLOURS[colour.toLowerCase()] || 'FFFFFF'),
      cellOpts(foodExamples, 2200, false, COLOURS[colour.toLowerCase()] || 'FFFFFF'),
      cellOpts(bodyPart, 1600, false, COLOURS[colour.toLowerCase()] || 'FFFFFF'),
      cellOpts(benefit, 2400, false, COLOURS[colour.toLowerCase()] || 'FFFFFF'),
      cellOpts(nutrient, 2000, false, COLOURS[colour.toLowerCase()] || 'FFFFFF'),
    ],
  });
}

function tableHeaderRow() {
  const cellPad = { top: 80, bottom: 80, left: 100, right: 100 };
  const hCell = (text, w) => new TableCell({
    width: { size: w, type: WidthType.DXA },
    shading: { type: ShadingType.CLEAR, fill: '1A237E' },
    margins: cellPad,
    verticalAlign: VerticalAlign.CENTER,
    children: [new Paragraph({
      alignment: AlignmentType.CENTER,
      children: [new TextRun({ text, font: 'Arial', size: 22, bold: true, color: 'FFFFFF' })],
    })],
  });
  return new TableRow({
    tableHeader: true,
    children: [
      hCell('Colour', 1400),
      hCell('Foods', 2200),
      hCell('Body Part', 1600),
      hCell('Benefit', 2400),
      hCell('Key Nutrient', 2000),
    ],
  });
}

// ── Document ──
const doc = new Document({
  styles: {
    default: { document: { run: { font: 'Arial', size: 22 } } },
    paragraphStyles: [
      { id: 'Heading1', name: 'Heading 1', basedOn: 'Normal', next: 'Normal', quickFormat: true,
        run: { size: 32, bold: true, font: 'Arial', color: '1A237E' },
        paragraph: { spacing: { before: 320, after: 160 }, outlineLevel: 0 } },
      { id: 'Heading2', name: 'Heading 2', basedOn: 'Normal', next: 'Normal', quickFormat: true,
        run: { size: 26, bold: true, font: 'Arial' },
        paragraph: { spacing: { before: 240, after: 120 }, outlineLevel: 1 } },
      { id: 'Heading3', name: 'Heading 3', basedOn: 'Normal', next: 'Normal', quickFormat: true,
        run: { size: 24, bold: true, font: 'Arial', color: '37474F' },
        paragraph: { spacing: { before: 180, after: 80 }, outlineLevel: 2 } },
    ],
  },
  numbering: {
    config: [
      { reference: 'bullets', levels: [{ level: 0, format: LevelFormat.BULLET, text: '\u2022', alignment: AlignmentType.LEFT,
          style: { paragraph: { indent: { left: 720, hanging: 360 } } } }] },
      { reference: 'check',   levels: [{ level: 0, format: LevelFormat.BULLET, text: '\u2713', alignment: AlignmentType.LEFT,
          style: { paragraph: { indent: { left: 720, hanging: 360 } } } }] },
      { reference: 'numbers', levels: [{ level: 0, format: LevelFormat.DECIMAL, text: '%1.', alignment: AlignmentType.LEFT,
          style: { paragraph: { indent: { left: 720, hanging: 360 } } } }] },
    ],
  },
  sections: [{
    properties: {
      page: {
        margin: { top: convertInchesToTwip(1), bottom: convertInchesToTwip(1),
                  left: convertInchesToTwip(1.2), right: convertInchesToTwip(1.2) },
      },
    },
    headers: {
      default: new Header({
        children: [
          new Paragraph({
            alignment: AlignmentType.CENTER,
            shading: { type: ShadingType.CLEAR, fill: '1A237E' },
            spacing: { before: 80, after: 80 },
            children: [
              new TextRun({ text: 'ONCOLOGY DEPARTMENT  |  GUEST LECTURE DOCTOR\'S NOTES', font: 'Arial', size: 20, bold: true, color: 'FFFFFF' }),
            ],
          }),
        ],
      }),
    },
    footers: {
      default: new Footer({
        children: [
          new Paragraph({
            alignment: AlignmentType.CENTER,
            children: [
              new TextRun({ text: 'Page ', font: 'Arial', size: 18, color: '757575' }),
              new TextRun({ children: [PageNumber.CURRENT], font: 'Arial', size: 18, color: '757575' }),
              new TextRun({ text: ' of ', font: 'Arial', size: 18, color: '757575' }),
              new TextRun({ children: [PageNumber.TOTAL_PAGES], font: 'Arial', size: 18, color: '757575' }),
              new TextRun({ text: '  |  Confidential – For Presenter Use Only', font: 'Arial', size: 18, color: '757575' }),
            ],
          }),
        ],
      }),
    },

    children: [

      // ── TITLE BLOCK ──
      new Paragraph({
        alignment: AlignmentType.CENTER,
        spacing: { before: 200, after: 80 },
        shading: { type: ShadingType.CLEAR, fill: 'E8EAF6' },
        children: [new TextRun({ text: 'ESSENTIAL NUTRIENTS FROM FOOD', font: 'Arial', size: 44, bold: true, color: '1A237E' })],
      }),
      new Paragraph({
        alignment: AlignmentType.CENTER,
        spacing: { before: 0, after: 80 },
        shading: { type: ShadingType.CLEAR, fill: 'E8EAF6' },
        children: [new TextRun({ text: 'Colours of Health: How Food Feeds Our Body', font: 'Arial', size: 28, bold: false, color: '37474F', italics: true })],
      }),
      new Paragraph({
        alignment: AlignmentType.CENTER,
        spacing: { before: 0, after: 200 },
        shading: { type: ShadingType.CLEAR, fill: 'E8EAF6' },
        children: [
          new TextRun({ text: 'Guest Lecture  |  Grade 1 & 2  |  Oncology Department', font: 'Arial', size: 22, color: '757575' }),
        ],
      }),

      spacer(),

      // ── SECTION 1: OVERVIEW ──
      heading1('1. Lecture Overview'),
      para('Purpose: Introduce young learners (ages 6-8) to the concept that the colour of food gives us a clue about what it does inside our body. This aligns with early cancer-prevention messaging by encouraging diverse, plant-based eating from childhood.'),
      spacer(),
      para('Target Audience: Grade 1 & 2 students (ages 6-8)', { bold: true }),
      para('Duration: 30-40 minutes (lecture 20 min + activity 10-15 min + Q&A 5 min)'),
      para('Setting: Oncology department awareness programme / school visit'),
      spacer(),

      // ── SECTION 2: LEARNING OBJECTIVES ──
      heading1('2. Learning Objectives'),
      para('By the end of this session, children will be able to:'),
      bullet('Name at least 2 foods from each colour group', 'numbers', null),
      bullet('Match a food colour to the body part it helps', 'numbers', null),
      bullet('Say "Eating many colours keeps me healthy!"', 'numbers', null),
      bullet('Understand (simply) why we eat vegetables and fruits every day', 'numbers', null),
      spacer(),

      // ── SECTION 3: COLOUR-BY-COLOUR GUIDE ──
      heading1('3. The Rainbow of Health – Colour-by-Colour Guide'),
      para('PRESENTER TIP: Hold up a picture or real food item for each colour. Ask children: "What colour is this? Can you name another food this colour?" Keep energy high with call-and-response.', { italic: true }),
      spacer(),

      // ORANGE
      heading2('🟠 ORANGE Foods – For Happy, Bright Eyes!', COLOURS.orange),
      para('Story for kids: "Carrots and mangoes are orange. They have a special magic called beta-carotene that turns into Vitamin A inside your tummy. Vitamin A is like sunglasses for your eyes from the inside – it helps you see clearly, especially when it is dark!"', { shade: COLOURS.orange }),
      spacer(),
      para('Key foods: Carrots, mangoes, papaya, sweet potato, pumpkin, orange', { bold: true }),
      bullet('Beta-carotene → Vitamin A – essential for vision and night sight', 'bullets', COLOURS.orange),
      bullet('Supports immune defence – the body\'s army against germs', 'bullets', COLOURS.orange),
      bullet('Vitamin C (papaya, orange) – heals cuts and keeps skin strong', 'bullets', COLOURS.orange),
      bullet('In oncology: Beta-carotene and antioxidants reduce oxidative damage to cells', 'bullets', COLOURS.orange),
      spacer(),
      para('Fun fact for class: "Rabbits eat lots of carrots and they have super sharp eyes! You can too!"', { italic: true, shade: COLOURS.orange }),
      spacer(),

      // GREEN
      heading2('🟢 GREEN Foods – For a Strong Body All Over!', COLOURS.green),
      para('Story for kids: "Spinach, broccoli and peas are green – just like a superhero\'s outfit! They have special powers called vitamins and fibre that make your whole body strong, keep your tummy happy and help you grow tall."', { shade: COLOURS.green }),
      spacer(),
      para('Key foods: Spinach, broccoli, peas, cucumber, lettuce, green apple, kiwi, bottle gourd', { bold: true }),
      bullet('Folate (Vitamin B9) – helps build new healthy cells; very important for growing children', 'bullets', COLOURS.green),
      bullet('Vitamin K – helps blood clot when you get a cut', 'bullets', COLOURS.green),
      bullet('Fibre – keeps the tummy working well and feeds good gut bacteria', 'bullets', COLOURS.green),
      bullet('Iron (dark greens) – carries oxygen in the blood to give energy', 'bullets', COLOURS.green),
      bullet('In oncology: Cruciferous vegetables (broccoli, cabbage) contain sulforaphane – a natural compound that activates cancer-protective enzymes in cells', 'bullets', COLOURS.green),
      spacer(),
      para('Fun fact: "Popeye the Sailor ate spinach to become super strong. Try it!"', { italic: true, shade: COLOURS.green }),
      spacer(),

      // RED
      heading2('🔴 RED Foods – For a Strong, Happy Heart!', COLOURS.red),
      para('Story for kids: "Tomatoes, strawberries and watermelon are red – just like your heart! They have something called lycopene and Vitamin C that keeps your heart beating strong and your blood healthy."', { shade: COLOURS.red }),
      spacer(),
      para('Key foods: Tomatoes, watermelon, strawberries, red apples, cherries, red capsicum, beetroot', { bold: true }),
      bullet('Lycopene – powerful antioxidant; protects heart cells and reduces inflammation', 'bullets', COLOURS.red),
      bullet('Vitamin C – boosts immunity and helps absorb iron', 'bullets', COLOURS.red),
      bullet('Anthocyanins (berries) – keep blood vessels flexible and healthy', 'bullets', COLOURS.red),
      bullet('Potassium (tomato, watermelon) – regulates heart rhythm and blood pressure', 'bullets', COLOURS.red),
      bullet('In oncology: Lycopene has been studied for protective roles in prostate and breast health; anthocyanins inhibit tumour cell proliferation in lab studies', 'bullets', COLOURS.red),
      spacer(),
      para('Fun fact: "Watermelon is 92% water AND red AND sweet – perfect on a hot day AND good for your heart!"', { italic: true, shade: COLOURS.red }),
      spacer(),

      // YELLOW
      heading2('🟡 YELLOW Foods – For a Bright, Healthy Smile and Bones!', COLOURS.yellow),
      para('Story for kids: "Bananas and corn are yellow and cheerful! Bananas give you energy to run and play. The colour yellow also means Vitamin C and special helpers that keep your bones strong and your skin glowing."', { shade: COLOURS.yellow }),
      spacer(),
      para('Key foods: Banana, corn, yellow bell pepper, lemon, pineapple, yellow lentils (moong dal)', { bold: true }),
      bullet('Potassium (banana) – muscles and nerves work properly; prevents cramps', 'bullets', COLOURS.yellow),
      bullet('Vitamin C (lemon, pineapple) – builds collagen for healthy skin, gums and wound healing', 'bullets', COLOURS.yellow),
      bullet('B-vitamins (corn, lentils) – convert food into energy', 'bullets', COLOURS.yellow),
      bullet('Bromelain (pineapple) – natural anti-inflammatory enzyme', 'bullets', COLOURS.yellow),
      bullet('In oncology: Yellow-orange carotenoids and lutein protect cell membranes from free radical damage', 'bullets', COLOURS.yellow),
      spacer(),
      para('Fun fact: "When astronauts go to space, they take bananas for energy. You can be an energy astronaut too!"', { italic: true, shade: COLOURS.yellow }),
      spacer(),

      // BLUE / PURPLE
      heading2('🟣 BLUE / PURPLE Foods – For a Smart, Sharp Brain!', COLOURS.purple),
      para('Story for kids: "Grapes, jamun (Indian blackberry) and purple cabbage are this beautiful dark colour. They are full of brain-boosting magic called anthocyanins. Think of them as food for your brain so you can remember things, learn faster and feel happy!"', { shade: COLOURS.purple }),
      spacer(),
      para('Key foods: Grapes, blueberries, jamun, purple cabbage, brinjal (eggplant), plum, blackberry', { bold: true }),
      bullet('Anthocyanins – powerful antioxidants; protect brain cells from damage', 'bullets', COLOURS.purple),
      bullet('Resveratrol (grapes) – supports healthy blood vessels and heart', 'bullets', COLOURS.purple),
      bullet('Fibre (cabbage, brinjal) – feeds healthy gut bacteria', 'bullets', COLOURS.purple),
      bullet('Vitamin C and K – immune support and bone health', 'bullets', COLOURS.purple),
      bullet('In oncology: Anthocyanins have demonstrated anti-proliferative and pro-apoptotic effects in multiple cancer cell lines in preclinical studies', 'bullets', COLOURS.purple),
      spacer(),
      para('Fun fact: "Blue and purple foods are so special they look like royalty. Eat them and your brain will feel like a king or queen!"', { italic: true, shade: COLOURS.purple }),
      spacer(),

      // WHITE / BEIGE
      heading2('⚪ WHITE Foods – For Fighting Germs!', COLOURS.white),
      para('Story for kids: "Garlic, onion and mushrooms may not be a bright colour but they are germ fighters! They have special powers called allicin and selenium that help your body fight off colds, fevers and bad bacteria."', { shade: 'F5F5F5' }),
      spacer(),
      para('Key foods: Garlic, onion, mushroom, cauliflower, banana (also yellow), white sesame seeds', { bold: true }),
      bullet('Allicin (garlic, onion) – natural antimicrobial and immune booster', 'bullets', COLOURS.white),
      bullet('Selenium (mushroom, sesame) – antioxidant; supports thyroid and immune function', 'bullets', COLOURS.white),
      bullet('Quercetin (onion) – anti-inflammatory flavonoid', 'bullets', COLOURS.white),
      bullet('Calcium and Phosphorus (cauliflower) – strong bones and teeth', 'bullets', COLOURS.white),
      bullet('In oncology: Allium vegetables (garlic, onion) are associated with reduced risk of gastric and colorectal cancers in epidemiological studies', 'bullets', COLOURS.white),
      spacer(),

      // ── SECTION 4: QUICK REFERENCE TABLE ──
      heading1('4. Quick Reference Table – Rainbow of Health'),
      spacer(),
      new Table({
        width: { size: 100, type: WidthType.PERCENTAGE },
        borders: {
          top:    { style: BorderStyle.SINGLE, size: 4, color: 'BDBDBD' },
          bottom: { style: BorderStyle.SINGLE, size: 4, color: 'BDBDBD' },
          left:   { style: BorderStyle.SINGLE, size: 4, color: 'BDBDBD' },
          right:  { style: BorderStyle.SINGLE, size: 4, color: 'BDBDBD' },
          insideH:{ style: BorderStyle.SINGLE, size: 2, color: 'E0E0E0' },
          insideV:{ style: BorderStyle.SINGLE, size: 2, color: 'E0E0E0' },
        },
        rows: [
          tableHeaderRow(),
          colourTableRow('🟠', 'Orange', 'Carrot, Mango, Papaya, Sweet Potato', 'Eyes', 'Improves vision, night-sight', 'Beta-carotene / Vit A'),
          colourTableRow('🟢', 'Green',  'Spinach, Broccoli, Peas, Kiwi', 'Whole Body', 'Cell growth, energy, gut health', 'Folate, Iron, Vit K'),
          colourTableRow('🔴', 'Red',    'Tomato, Watermelon, Strawberry, Beetroot', 'Heart', 'Protects heart & blood vessels', 'Lycopene, Anthocyanins'),
          colourTableRow('🟡', 'Yellow', 'Banana, Corn, Lemon, Pineapple', 'Bones & Muscles', 'Energy, collagen, bone strength', 'Potassium, Vit C, B-vits'),
          colourTableRow('🟣', 'Purple', 'Grapes, Jamun, Blueberry, Brinjal', 'Brain', 'Memory, learning, mood', 'Anthocyanins, Resveratrol'),
          colourTableRow('⚪', 'White',  'Garlic, Onion, Mushroom, Cauliflower', 'Immune System', 'Fights germs and infection', 'Allicin, Selenium, Quercetin'),
        ],
      }),
      spacer(),

      // ── SECTION 5: KEY MESSAGES FOR CHILDREN ──
      heading1('5. Key Messages to Deliver (Child-Friendly)'),
      bullet('"Eat a rainbow every day to keep your body strong!"', 'numbers', null),
      bullet('"No single colour is the best – we need ALL the colours."', 'numbers', null),
      bullet('"Your plate should look like a painting – many colours, many vitamins!"', 'numbers', null),
      bullet('"Fruits and vegetables are nature\'s medicine."', 'numbers', null),
      bullet('"Every time you choose a colourful food, you are giving your body a superpower!"', 'numbers', null),
      spacer(),

      // ── SECTION 6: CLASSROOM ACTIVITY ──
      heading1('6. Suggested Classroom Activity'),
      heading3('Activity: "Build Your Rainbow Plate" (10–15 minutes)'),
      para('Materials needed: Paper plates, crayons/coloured pencils, printed food pictures or magazines', { bold: false }),
      spacer(),
      para('Instructions:', { bold: true }),
      bullet('Divide the paper plate into 6 sections', 'numbers', null),
      bullet('Label each section with a colour (or draw a colour swatch)', 'numbers', null),
      bullet('Children draw or paste one food from each colour group', 'numbers', null),
      bullet('Share with the class: "Which colour did you choose? What does it do?"', 'numbers', null),
      bullet('Award a sticker to every child who fills all 6 colours', 'numbers', null),
      spacer(),
      para('Optional song/chant:', { bold: true }),
      para('"Red for heart, orange for eyes,'),
      para('Yellow for muscles reaching for the skies,'),
      para('Green for body, purple for brain,'),
      para('White fights germs in sun and rain!"', { italic: true }),
      spacer(),

      // ── SECTION 7: DOCTOR'S NOTES – ONCOLOGY CONTEXT ──
      heading1('7. Doctor\'s Notes – Oncology Context'),
      para('FOR PRESENTER (DO NOT READ ALOUD TO CHILDREN)', { bold: true, italic: true }),
      spacer(),
      heading3('Why Oncology Teams Deliver This Message'),
      para('Cancer prevention through dietary habits is most effective when started early. The World Cancer Research Fund estimates that up to 30–40% of cancer cases are preventable through diet, physical activity and healthy weight. Teaching children to eat a rainbow establishes lifelong habits that reduce cancer risk decades later.'),
      spacer(),
      heading3('Evidence Summary (Brief)'),
      bullet('Cruciferous vegetables (broccoli, cabbage): sulforaphane activates Nrf2-mediated detoxification pathways; associated with reduced colorectal and lung cancer risk', 'check', null),
      bullet('Lycopene (tomato, watermelon): inversely associated with prostate cancer risk; potent singlet-oxygen quencher', 'check', null),
      bullet('Anthocyanins (red/blue/purple berries): pro-apoptotic and anti-angiogenic effects in in vitro cancer models', 'check', null),
      bullet('Allium vegetables (garlic, onion): epidemiological data link high consumption with lower gastric cancer incidence (EPIC cohort)', 'check', null),
      bullet('Carotenoids (orange/yellow foods): high dietary intake associated with reduced breast cancer risk (meta-analyses)', 'check', null),
      bullet('Fibre (all plant foods): protective against colorectal cancer; modulates gut microbiome and bile acid metabolism', 'check', null),
      spacer(),
      heading3('Talking Points if Parents / Teachers Ask'),
      bullet('Q: "Should we avoid all sugar?" A: Focus on whole fruits – their fibre slows sugar absorption. Processed/added sugar is what to limit.', 'bullets', null),
      bullet('Q: "What about meat?" A: Lean meat in moderation is fine. The emphasis for cancer prevention is ADDING more plants, not necessarily eliminating meat for children.', 'bullets', null),
      bullet('Q: "Are supplements better?" A: Whole foods contain thousands of phytochemicals working together; isolated supplements do not replicate this synergy. Whole food first.', 'bullets', null),
      bullet('Q: "My child is a picky eater." A: Encourage gradual exposure. Repeated presentation (8-10 times) increases acceptance. Making food fun and colourful helps.', 'bullets', null),
      spacer(),
      heading3('Oncology-Specific Sensitivity Notes'),
      bullet('Do NOT mention cancer or death explicitly to the children – frame everything positively around strength, energy and happiness', 'bullets', null),
      bullet('If a child\'s parent is undergoing treatment, staff should be sensitised in advance and provide emotional support as needed', 'bullets', null),
      bullet('Reinforce that food is one tool among many – not a cure or a guarantee, but a powerful daily choice', 'bullets', null),
      spacer(),

      // ── SECTION 8: DAILY SERVING RECOMMENDATIONS ──
      heading1('8. Simple Daily Guide for Grade 1 & 2 Children (Age 6–8)'),
      para('Share these simple guidelines with parents/teachers at the end of the session:', { italic: true }),
      spacer(),
      new Table({
        width: { size: 100, type: WidthType.PERCENTAGE },
        borders: {
          top:    { style: BorderStyle.SINGLE, size: 4, color: 'BDBDBD' },
          bottom: { style: BorderStyle.SINGLE, size: 4, color: 'BDBDBD' },
          left:   { style: BorderStyle.SINGLE, size: 4, color: 'BDBDBD' },
          right:  { style: BorderStyle.SINGLE, size: 4, color: 'BDBDBD' },
          insideH:{ style: BorderStyle.SINGLE, size: 2, color: 'E0E0E0' },
          insideV:{ style: BorderStyle.SINGLE, size: 2, color: 'E0E0E0' },
        },
        rows: [
          new TableRow({
            tableHeader: true,
            children: [
              new TableCell({ shading: { type: ShadingType.CLEAR, fill: '1A237E' }, margins: { top: 80, bottom: 80, left: 100, right: 100 },
                children: [new Paragraph({ children: [new TextRun({ text: 'Food Group', font: 'Arial', size: 22, bold: true, color: 'FFFFFF' })] })] }),
              new TableCell({ shading: { type: ShadingType.CLEAR, fill: '1A237E' }, margins: { top: 80, bottom: 80, left: 100, right: 100 },
                children: [new Paragraph({ children: [new TextRun({ text: 'Daily Serving (Age 6-8)', font: 'Arial', size: 22, bold: true, color: 'FFFFFF' })] })] }),
              new TableCell({ shading: { type: ShadingType.CLEAR, fill: '1A237E' }, margins: { top: 80, bottom: 80, left: 100, right: 100 },
                children: [new Paragraph({ children: [new TextRun({ text: 'Easy Example', font: 'Arial', size: 22, bold: true, color: 'FFFFFF' })] })] }),
            ],
          }),
          new TableRow({ children: [
            new TableCell({ margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: 'Vegetables', font: 'Arial', size: 20 })] })] }),
            new TableCell({ margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: '2-3 servings (1 serving = ½ cup)', font: 'Arial', size: 20 })] })] }),
            new TableCell({ shading: { type: ShadingType.CLEAR, fill: 'E8F5E9' }, margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: 'Carrots at lunch + spinach at dinner', font: 'Arial', size: 20 })] })] }),
          ]}),
          new TableRow({ children: [
            new TableCell({ margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: 'Fruits', font: 'Arial', size: 20 })] })] }),
            new TableCell({ margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: '1-2 servings (1 serving = 1 small fruit)', font: 'Arial', size: 20 })] })] }),
            new TableCell({ shading: { type: ShadingType.CLEAR, fill: 'FFF3E0' }, margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: '1 banana + small bowl of mango', font: 'Arial', size: 20 })] })] }),
          ]}),
          new TableRow({ children: [
            new TableCell({ margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: 'Whole Grains', font: 'Arial', size: 20 })] })] }),
            new TableCell({ margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: '3-4 servings (1 serving = 1 chapati/slice)', font: 'Arial', size: 20 })] })] }),
            new TableCell({ shading: { type: ShadingType.CLEAR, fill: 'FFF9C4' }, margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: 'Whole wheat roti, brown rice, oats', font: 'Arial', size: 20 })] })] }),
          ]}),
          new TableRow({ children: [
            new TableCell({ margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: 'Protein (Lentils, Eggs, Milk)', font: 'Arial', size: 20 })] })] }),
            new TableCell({ margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: '2 servings', font: 'Arial', size: 20 })] })] }),
            new TableCell({ shading: { type: ShadingType.CLEAR, fill: 'E3F2FD' }, margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: 'Dal + 1 glass milk or curd', font: 'Arial', size: 20 })] })] }),
          ]}),
        ],
      }),
      spacer(),

      // ── SECTION 9: CLOSING ──
      heading1('9. Closing the Session'),
      para('End the class by leading the children in this chant together (repeat 3 times):'),
      spacer(),
      new Paragraph({
        alignment: AlignmentType.CENTER,
        spacing: { before: 120, after: 120 },
        shading: { type: ShadingType.CLEAR, fill: 'E8EAF6' },
        children: [new TextRun({ text: '"EAT THE RAINBOW, GROW UP STRONG!"', font: 'Arial', size: 28, bold: true, color: '1A237E' })],
      }),
      spacer(),
      para('Hand out a printed "My Rainbow Plate" colouring sheet for children to take home and complete with parents.'),
      spacer(),
      para('Remind teachers: You may display this rainbow food chart in the classroom for ongoing reinforcement.'),
      spacer(),

      // ── SECTION 10: REFERENCES ──
      heading1('10. References & Further Reading'),
      bullet('World Cancer Research Fund / American Institute for Cancer Research. Diet, Nutrition, Physical Activity and Cancer: a Global Perspective. Continuous Update Project Expert Report 2018.', 'numbers', null),
      bullet('UNICEF. Improving Young Children\'s Diets During the First Five Years of Life. 2023.', 'numbers', null),
      bullet('Steinmetz KA, Potter JD. Vegetables, fruit and cancer prevention: a review. J Am Diet Assoc. 1996;96(10):1027-1039.', 'numbers', null),
      bullet('Bhupathiraju SN, Tucker KL. Coronary heart disease prevention: nutrients, foods, and dietary patterns. Clin Chim Acta. 2011;412(17-18):1493-1514.', 'numbers', null),
      bullet('Liu RH. Health-promoting components of fruits and vegetables in the diet. Adv Nutr. 2013;4(3):384S-392S.', 'numbers', null),
      bullet('Indian Council of Medical Research (ICMR). Dietary Guidelines for Indians – A Manual. 2nd ed. NIN, Hyderabad.', 'numbers', null),
      spacer(),

      new Paragraph({
        alignment: AlignmentType.CENTER,
        spacing: { before: 240, after: 80 },
        shading: { type: ShadingType.CLEAR, fill: '1A237E' },
        children: [new TextRun({ text: 'Prepared by Oncology Department  |  Nutrition & Wellness Programme  |  Confidential', font: 'Arial', size: 18, color: 'FFFFFF' })],
      }),

    ],
  }],
});

Packer.toBuffer(doc).then(buffer => {
  fs.writeFileSync('/home/daytona/workspace/essential-nutrients-lecture/Essential_Nutrients_Doctors_Notes.docx', buffer);
  console.log('Done: Essential_Nutrients_Doctors_Notes.docx');
});
Running Command

cd /home/daytona/workspace/essential-nutrients-lecture && node create_doc.js 2>&…

Running Command

python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/works…

Running Command

python3 -c " import zipfile, os path = '/home/daytona/workspace/essential-nutrie…

Your Word document is ready for download:

Essential Nutrients Doctors Notes

Word Document · DOCX


Here is a full summary of what is inside the document:

What the Document Contains

Header/Footer: Branded "Oncology Department | Guest Lecture Doctor's Notes" header in dark navy; page numbers + "Confidential – For Presenter Use Only" footer.

Section 1 - Lecture Overview

  • Purpose, target audience (Grade 1 & 2, ages 6-8), duration (30-40 min), and setting.

Section 2 - Learning Objectives

Children will name foods by colour, match colour to body part, and understand why eating variety matters.

Section 3 - The Rainbow of Health (colour-by-colour, with colour-shaded blocks)

ColourBody PartKey Story for ChildrenKey Nutrients
🟠 OrangeEyes"Beta-carotene is like sunglasses from the inside"Beta-carotene, Vit A
🟢 GreenWhole body"Superhero outfit foods - grow tall and strong"Folate, Iron, Vit K
🔴 RedHeart"Lycopene keeps your heart beating strong"Lycopene, Anthocyanins
🟡 YellowBones & Muscles"Astronaut energy food"Potassium, Vit C, B-vits
🟣 PurpleBrain"Royal brain-boost food"Anthocyanins, Resveratrol
⚪ WhiteImmune system"Germ fighter foods"Allicin, Selenium
Each colour section includes: a child-friendly story, key foods, bullet-point nutrients, and an oncology-specific note for the presenter.

Section 4 - Quick Reference Table

A full colour-shaded summary table: Colour | Foods | Body Part | Benefit | Key Nutrient.

Section 5 - Key Messages for Children

Five memorable child-friendly take-away lines (e.g., "Eat a rainbow every day!").

Section 6 - Classroom Activity

"Build Your Rainbow Plate" activity with instructions + a 4-line chant/song children can learn.

Section 7 - Doctor's Notes (Oncology Context) - Presenter use only

  • Why oncology teams deliver this message (WCRF: up to 40% of cancers preventable through diet)
  • Evidence summary: sulforaphane, lycopene, anthocyanins, allium vegetables, carotenoids, fibre
  • Q&A talking points for parents and teachers
  • Sensitivity notes (do NOT mention cancer to children; support for families in treatment)

Section 8 - Daily Serving Guide for Age 6-8

A formatted table: Vegetables / Fruits / Whole Grains / Protein with serving sizes and Indian food examples (roti, dal, mango, curd).

Section 9 - Closing the Session

Chant: "Eat the Rainbow, Grow Up Strong!" + notes on the take-home colouring sheet.

Section 10 - References

Six citations including WCRF 2018, ICMR Dietary Guidelines, and peer-reviewed nutrition journals.

Find images of colourful foods to add visual aids to the document

Running Command

mkdir -p /home/daytona/workspace/essential-nutrients-lecture/images && \ # Orang…

Running Command

# Re-try red foods with a different Unsplash photo (strawberries) curl -sL "http…

Loading Image
Loading Image
Loading Image
Loading Image
Loading Image
Loading Image
Loading Image
Running Command

# Swap: the bowl shot (green_foods.jpg) becomes the hero, rainbow_plate becomes …

Running Command

python3 -c " from PIL import Image import os base = '/home/daytona/workspace/es…

Writing File

~/essential-nutrients-lecture/create_doc_with_images.js

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

const IMGDIR = '/home/daytona/workspace/essential-nutrients-lecture/images/';

function loadImg(name) {
  return fs.readFileSync(IMGDIR + name);
}

// Get pixel dimensions from saved files (pre-computed)
const IMG_META = {
  'hero_image.jpg':  { w: 480, h: 320 },
  'orange_foods.jpg':{ w: 500, h: 290 },
  'green_foods.jpg': { w: 198, h: 300 },
  'red_foods.jpg':   { w: 450, h: 300 },
  'yellow_foods.jpg':{ w: 300, h: 300 },
  'purple_foods.jpg':{ w: 450, h: 300 },
  'white_foods.jpg': { w: 450, h: 300 },
};

// Scale image to target width in EMU (English Metric Units; 1 inch = 914400 EMU, 72 DPI → 12700 EMU/pt)
// docx ImageRun uses width/height in EMU
function imgEMU(fname, targetWidthInches) {
  const meta = IMG_META[fname];
  const targetW = Math.round(targetWidthInches * 914400);
  const targetH = Math.round((meta.h / meta.w) * targetW);
  return { width: targetW, height: targetH };
}

// ── Colour palette ──
const COLOURS = {
  orange:  'FFF3E0',
  green:   'E8F5E9',
  red:     'FFEBEE',
  yellow:  'FFFDE7',
  purple:  'F3E5F5',
  white:   'F5F5F5',
  header:  '1A237E',
  accent:  'E8EAF6',
};

function heading1(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_1,
    spacing: { before: 320, after: 160 },
    children: [new TextRun({ text, font: 'Arial', size: 32, bold: true, color: '1A237E' })],
  });
}

function heading2(text, fillColour) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_2,
    spacing: { before: 240, after: 120 },
    shading: { type: ShadingType.CLEAR, fill: fillColour || 'FFFFFF' },
    children: [new TextRun({ text, font: 'Arial', size: 26, bold: true, color: '000000' })],
  });
}

function heading3(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_3,
    spacing: { before: 180, after: 80 },
    children: [new TextRun({ text, font: 'Arial', size: 24, bold: true, color: '37474F' })],
  });
}

function para(text, options = {}) {
  return new Paragraph({
    spacing: { before: 80, after: 80 },
    shading: options.shade ? { type: ShadingType.CLEAR, fill: options.shade } : undefined,
    children: [new TextRun({ text, font: 'Arial', size: 22, bold: options.bold || false, italics: options.italic || false })],
  });
}

function bullet(text, ref, shade) {
  return new Paragraph({
    numbering: { reference: ref, level: 0 },
    spacing: { before: 60, after: 60 },
    shading: shade ? { type: ShadingType.CLEAR, fill: shade } : undefined,
    children: [new TextRun({ text, font: 'Arial', size: 22 })],
  });
}

function spacer() {
  return new Paragraph({ children: [new TextRun('')], spacing: { before: 60, after: 60 } });
}

// Image paragraph - centered with caption
function imgPara(fname, captionText, targetWidthInches) {
  const emu = imgEMU(fname, targetWidthInches);
  const imgData = loadImg(fname);
  const parts = [
    new ImageRun({
      data: imgData,
      transformation: { width: Math.round(emu.width / 9144), height: Math.round(emu.height / 9144) },
      // width/height in points (1pt = 9144 EMU... actually 1pt = 12700 EMU)
      // docx ImageRun expects pixels at 96dpi - use a helper
      type: 'jpg',
    }),
  ];
  return [
    new Paragraph({
      alignment: AlignmentType.CENTER,
      spacing: { before: 120, after: 40 },
      children: parts,
    }),
    new Paragraph({
      alignment: AlignmentType.CENTER,
      spacing: { before: 0, after: 120 },
      children: [new TextRun({ text: captionText, font: 'Arial', size: 18, italics: true, color: '757575' })],
    }),
  ];
}

function colourTableRow(emoji, colour, foodExamples, bodyPart, benefit, nutrient) {
  const cellPad = { top: 80, bottom: 80, left: 100, right: 100 };
  const cellOpts = (text, w, bold, shade) => new TableCell({
    width: { size: w, type: WidthType.DXA },
    shading: { type: ShadingType.CLEAR, fill: shade || 'FFFFFF' },
    margins: cellPad,
    verticalAlign: VerticalAlign.CENTER,
    children: [new Paragraph({
      alignment: AlignmentType.LEFT,
      children: [new TextRun({ text, font: 'Arial', size: 20, bold: bold || false })],
    })],
  });
  const bgKey = colour.toLowerCase();
  const bg = COLOURS[bgKey] || 'FFFFFF';
  return new TableRow({ children: [
    cellOpts(`${emoji} ${colour}`, 1400, true, bg),
    cellOpts(foodExamples, 2200, false, bg),
    cellOpts(bodyPart, 1600, false, bg),
    cellOpts(benefit, 2400, false, bg),
    cellOpts(nutrient, 2000, false, bg),
  ]});
}

function tableHeaderRow() {
  const cellPad = { top: 80, bottom: 80, left: 100, right: 100 };
  const hCell = (text, w) => new TableCell({
    width: { size: w, type: WidthType.DXA },
    shading: { type: ShadingType.CLEAR, fill: '1A237E' },
    margins: cellPad,
    verticalAlign: VerticalAlign.CENTER,
    children: [new Paragraph({ alignment: AlignmentType.CENTER,
      children: [new TextRun({ text, font: 'Arial', size: 22, bold: true, color: 'FFFFFF' })] })],
  });
  return new TableRow({ tableHeader: true, children: [
    hCell('Colour', 1400), hCell('Foods', 2200), hCell('Body Part', 1600),
    hCell('Benefit', 2400), hCell('Key Nutrient', 2000),
  ]});
}

// ─────────────────────────────────────────────
// Helper: image + text in a 2-column table
// ─────────────────────────────────────────────
function imgTextRow(fname, widthIn, textChildren, shade) {
  const emu = imgEMU(fname, widthIn);
  // Convert EMU to px at 96dpi: px = EMU / 9525
  const pxW = Math.round(emu.width / 9525);
  const pxH = Math.round(emu.height / 9525);
  const imgData = loadImg(fname);
  const imgCell = new TableCell({
    width: { size: Math.round(widthIn * 1440), type: WidthType.DXA },
    shading: { type: ShadingType.CLEAR, fill: shade || 'FFFFFF' },
    margins: { top: 80, bottom: 80, left: 80, right: 120 },
    verticalAlign: VerticalAlign.TOP,
    children: [
      new Paragraph({
        alignment: AlignmentType.CENTER,
        children: [new ImageRun({ data: imgData, transformation: { width: pxW, height: pxH }, type: 'jpg' })],
      }),
    ],
  });
  const textCell = new TableCell({
    shading: { type: ShadingType.CLEAR, fill: shade || 'FFFFFF' },
    margins: { top: 80, bottom: 80, left: 120, right: 80 },
    verticalAlign: VerticalAlign.TOP,
    children: textChildren,
  });
  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    borders: {
      top:     { style: BorderStyle.NONE },
      bottom:  { style: BorderStyle.NONE },
      left:    { style: BorderStyle.NONE },
      right:   { style: BorderStyle.NONE },
      insideH: { style: BorderStyle.NONE },
      insideV: { style: BorderStyle.NONE },
    },
    rows: [new TableRow({ children: [imgCell, textCell] })],
  });
}

// ─────────────────────────────────────────────
// Build Document
// ─────────────────────────────────────────────
const heroEMU = imgEMU('hero_image.jpg', 4.5);
const heroPxW = Math.round(heroEMU.width / 9525);
const heroPxH = Math.round(heroEMU.height / 9525);

const children = [

  // ── TITLE BLOCK ──
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { before: 160, after: 80 },
    shading: { type: ShadingType.CLEAR, fill: 'E8EAF6' },
    children: [new TextRun({ text: 'ESSENTIAL NUTRIENTS FROM FOOD', font: 'Arial', size: 44, bold: true, color: '1A237E' })],
  }),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { before: 0, after: 80 },
    shading: { type: ShadingType.CLEAR, fill: 'E8EAF6' },
    children: [new TextRun({ text: 'Colours of Health: How Food Feeds Our Body', font: 'Arial', size: 28, italics: true, color: '37474F' })],
  }),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { before: 0, after: 160 },
    shading: { type: ShadingType.CLEAR, fill: 'E8EAF6' },
    children: [new TextRun({ text: 'Guest Lecture  |  Grade 1 & 2  |  Oncology Department', font: 'Arial', size: 22, color: '757575' })],
  }),

  // Hero image
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { before: 100, after: 40 },
    children: [new ImageRun({ data: loadImg('hero_image.jpg'), transformation: { width: heroPxW, height: heroPxH }, type: 'jpg' })],
  }),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { before: 0, after: 200 },
    children: [new TextRun({ text: 'A rainbow of foods keeps the whole body healthy!', font: 'Arial', size: 18, italics: true, color: '757575' })],
  }),

  spacer(),

  // ── SECTION 1 ──
  heading1('1. Lecture Overview'),
  para('Purpose: Introduce young learners (ages 6-8) to the concept that the colour of food gives us a clue about what it does inside our body. This aligns with early cancer-prevention messaging by encouraging diverse, plant-based eating from childhood.'),
  spacer(),
  para('Target Audience: Grade 1 & 2 students (ages 6-8)', { bold: true }),
  para('Duration: 30-40 minutes (lecture 20 min + activity 10-15 min + Q&A 5 min)'),
  para('Setting: Oncology department awareness programme / school visit'),
  spacer(),

  // ── SECTION 2 ──
  heading1('2. Learning Objectives'),
  para('By the end of this session, children will be able to:'),
  bullet('Name at least 2 foods from each colour group', 'numbers', null),
  bullet('Match a food colour to the body part it helps', 'numbers', null),
  bullet('Say "Eating many colours keeps me healthy!"', 'numbers', null),
  bullet('Understand (simply) why we eat vegetables and fruits every day', 'numbers', null),
  spacer(),

  // ── SECTION 3 ──
  heading1('3. The Rainbow of Health – Colour-by-Colour Guide'),
  para('PRESENTER TIP: Hold up a picture or real food item for each colour. Ask children: "What colour is this? Can you name another food this colour?" Keep energy high with call-and-response.', { italic: true }),
  spacer(),

  // ── ORANGE ──
  heading2('🟠 ORANGE Foods – For Happy, Bright Eyes!', COLOURS.orange),
  imgTextRow('orange_foods.jpg', 2.2, [
    para('Key foods: Carrots, mangoes, papaya, sweet potato, pumpkin, orange', { bold: true }),
    bullet('Beta-carotene → Vitamin A – essential for vision and night sight', 'bullets', COLOURS.orange),
    bullet('Supports immune defence – the body\'s army against germs', 'bullets', COLOURS.orange),
    bullet('Vitamin C (papaya, orange) – heals cuts and keeps skin strong', 'bullets', COLOURS.orange),
    bullet('In oncology: Beta-carotene and antioxidants reduce oxidative damage to cells', 'bullets', COLOURS.orange),
    spacer(),
    para('Story for kids: "Carrots and mangoes have a special magic called beta-carotene that turns into Vitamin A inside your tummy – like sunglasses for your eyes from the inside!"', { shade: COLOURS.orange, italic: true }),
    para('Fun fact: "Rabbits eat lots of carrots and they have super sharp eyes! You can too!"', { italic: true }),
  ], COLOURS.orange),
  spacer(),

  // ── GREEN ──
  heading2('🟢 GREEN Foods – For a Strong Body All Over!', COLOURS.green),
  imgTextRow('green_foods.jpg', 2.2, [
    para('Key foods: Spinach, broccoli, peas, cucumber, lettuce, green apple, kiwi', { bold: true }),
    bullet('Folate (Vit B9) – builds new healthy cells; vital for growing children', 'bullets', COLOURS.green),
    bullet('Vitamin K – helps blood clot when you get a cut', 'bullets', COLOURS.green),
    bullet('Fibre – keeps the tummy working well and feeds good gut bacteria', 'bullets', COLOURS.green),
    bullet('Iron (dark greens) – carries oxygen in blood to give energy', 'bullets', COLOURS.green),
    bullet('In oncology: Cruciferous vegetables (broccoli, cabbage) contain sulforaphane – activates cancer-protective enzymes', 'bullets', COLOURS.green),
    spacer(),
    para('Fun fact: "Popeye the Sailor ate spinach to become super strong. Try it!"', { italic: true }),
  ], COLOURS.green),
  spacer(),

  // ── RED ──
  heading2('🔴 RED Foods – For a Strong, Happy Heart!', COLOURS.red),
  imgTextRow('red_foods.jpg', 2.2, [
    para('Key foods: Tomatoes, watermelon, strawberries, red apples, cherries, red capsicum, beetroot', { bold: true }),
    bullet('Lycopene – powerful antioxidant; protects heart cells and reduces inflammation', 'bullets', COLOURS.red),
    bullet('Vitamin C – boosts immunity and helps absorb iron', 'bullets', COLOURS.red),
    bullet('Anthocyanins (berries) – keep blood vessels flexible and healthy', 'bullets', COLOURS.red),
    bullet('Potassium (tomato, watermelon) – regulates heart rhythm and blood pressure', 'bullets', COLOURS.red),
    bullet('In oncology: Lycopene studied for protective roles; anthocyanins inhibit tumour cell proliferation in lab studies', 'bullets', COLOURS.red),
    spacer(),
    para('Fun fact: "Watermelon is 92% water AND red AND sweet – perfect on a hot day AND good for your heart!"', { italic: true }),
  ], COLOURS.red),
  spacer(),

  // ── YELLOW ──
  heading2('🟡 YELLOW Foods – For Bright Bones and Muscles!', COLOURS.yellow),
  imgTextRow('yellow_foods.jpg', 2.2, [
    para('Key foods: Banana, corn, yellow bell pepper, lemon, pineapple, yellow lentils (moong dal)', { bold: true }),
    bullet('Potassium (banana) – muscles and nerves work properly; prevents cramps', 'bullets', COLOURS.yellow),
    bullet('Vitamin C (lemon, pineapple) – builds collagen for skin, gums and wound healing', 'bullets', COLOURS.yellow),
    bullet('B-vitamins (corn, lentils) – convert food into energy', 'bullets', COLOURS.yellow),
    bullet('Bromelain (pineapple) – natural anti-inflammatory enzyme', 'bullets', COLOURS.yellow),
    bullet('In oncology: Yellow-orange carotenoids and lutein protect cell membranes from free radical damage', 'bullets', COLOURS.yellow),
    spacer(),
    para('Fun fact: "Astronauts take bananas to space for energy. Be an energy astronaut!"', { italic: true }),
  ], COLOURS.yellow),
  spacer(),

  // ── PURPLE ──
  heading2('🟣 BLUE / PURPLE Foods – For a Smart, Sharp Brain!', COLOURS.purple),
  imgTextRow('purple_foods.jpg', 2.2, [
    para('Key foods: Grapes, blueberries, jamun, purple cabbage, brinjal (eggplant), plum, blackberry', { bold: true }),
    bullet('Anthocyanins – powerful antioxidants; protect brain cells from damage', 'bullets', COLOURS.purple),
    bullet('Resveratrol (grapes) – supports healthy blood vessels and heart', 'bullets', COLOURS.purple),
    bullet('Fibre (cabbage, brinjal) – feeds healthy gut bacteria', 'bullets', COLOURS.purple),
    bullet('Vitamin C and K – immune support and bone health', 'bullets', COLOURS.purple),
    bullet('In oncology: Anthocyanins show anti-proliferative and pro-apoptotic effects in preclinical studies', 'bullets', COLOURS.purple),
    spacer(),
    para('Fun fact: "Blue and purple foods are so special they look like royalty. Eat them and your brain will feel like a king or queen!"', { italic: true }),
  ], COLOURS.purple),
  spacer(),

  // ── WHITE ──
  heading2('⚪ WHITE Foods – For Fighting Germs!', COLOURS.white),
  imgTextRow('white_foods.jpg', 2.2, [
    para('Key foods: Garlic, onion, mushroom, cauliflower, potato, white sesame seeds', { bold: true }),
    bullet('Allicin (garlic, onion) – natural antimicrobial and immune booster', 'bullets', null),
    bullet('Selenium (mushroom, sesame) – antioxidant; supports thyroid and immune function', 'bullets', null),
    bullet('Quercetin (onion) – anti-inflammatory flavonoid', 'bullets', null),
    bullet('Calcium and Phosphorus (cauliflower) – strong bones and teeth', 'bullets', null),
    bullet('In oncology: Allium vegetables (garlic, onion) associated with reduced gastric and colorectal cancer risk', 'bullets', null),
    spacer(),
    para('Fun fact: "Even white foods are warriors! Garlic has been used as medicine for over 5,000 years!"', { italic: true }),
  ], COLOURS.white),
  spacer(),

  // ── SECTION 4: QUICK REFERENCE TABLE ──
  heading1('4. Quick Reference Table – Rainbow of Health'),
  spacer(),
  new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    borders: {
      top:    { style: BorderStyle.SINGLE, size: 4, color: 'BDBDBD' },
      bottom: { style: BorderStyle.SINGLE, size: 4, color: 'BDBDBD' },
      left:   { style: BorderStyle.SINGLE, size: 4, color: 'BDBDBD' },
      right:  { style: BorderStyle.SINGLE, size: 4, color: 'BDBDBD' },
      insideH:{ style: BorderStyle.SINGLE, size: 2, color: 'E0E0E0' },
      insideV:{ style: BorderStyle.SINGLE, size: 2, color: 'E0E0E0' },
    },
    rows: [
      tableHeaderRow(),
      colourTableRow('🟠','Orange','Carrot, Mango, Papaya, Sweet Potato','Eyes','Improves vision, night-sight','Beta-carotene / Vit A'),
      colourTableRow('🟢','Green','Spinach, Broccoli, Peas, Kiwi','Whole Body','Cell growth, energy, gut health','Folate, Iron, Vit K'),
      colourTableRow('🔴','Red','Tomato, Watermelon, Strawberry, Beetroot','Heart','Protects heart & blood vessels','Lycopene, Anthocyanins'),
      colourTableRow('🟡','Yellow','Banana, Corn, Lemon, Pineapple','Bones & Muscles','Energy, collagen, bone strength','Potassium, Vit C, B-vits'),
      colourTableRow('🟣','Purple','Grapes, Jamun, Blueberry, Brinjal','Brain','Memory, learning, mood','Anthocyanins, Resveratrol'),
      colourTableRow('⚪','White','Garlic, Onion, Mushroom, Cauliflower','Immune System','Fights germs and infection','Allicin, Selenium, Quercetin'),
    ],
  }),
  spacer(),

  // ── SECTION 5 ──
  heading1('5. Key Messages to Deliver (Child-Friendly)'),
  bullet('"Eat a rainbow every day to keep your body strong!"', 'numbers', null),
  bullet('"No single colour is the best – we need ALL the colours."', 'numbers', null),
  bullet('"Your plate should look like a painting – many colours, many vitamins!"', 'numbers', null),
  bullet('"Fruits and vegetables are nature\'s medicine."', 'numbers', null),
  bullet('"Every time you choose a colourful food, you are giving your body a superpower!"', 'numbers', null),
  spacer(),

  // ── SECTION 6 ──
  heading1('6. Suggested Classroom Activity'),
  heading3('Activity: "Build Your Rainbow Plate" (10-15 minutes)'),
  para('Materials needed: Paper plates, crayons/coloured pencils, printed food pictures or magazines', { bold: false }),
  spacer(),
  para('Instructions:', { bold: true }),
  bullet('Divide the paper plate into 6 sections', 'numbers', null),
  bullet('Label each section with a colour (or draw a colour swatch)', 'numbers', null),
  bullet('Children draw or paste one food from each colour group', 'numbers', null),
  bullet('Share with the class: "Which colour did you choose? What does it do?"', 'numbers', null),
  bullet('Award a sticker to every child who fills all 6 colours', 'numbers', null),
  spacer(),
  para('Optional chant (repeat 3x):', { bold: true }),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { before: 120, after: 120 },
    shading: { type: ShadingType.CLEAR, fill: 'E8EAF6' },
    children: [new TextRun({ text: '"Red for heart, orange for eyes, Yellow for muscles reaching for the skies, Green for body, purple for brain, White fights germs in sun and rain!"', font: 'Arial', size: 22, italics: true, color: '1A237E' })],
  }),
  spacer(),

  // ── SECTION 7 – DOCTOR'S NOTES ──
  heading1("7. Doctor's Notes – Oncology Context"),
  para('FOR PRESENTER (DO NOT READ ALOUD TO CHILDREN)', { bold: true, italic: true }),
  spacer(),
  heading3('Why Oncology Teams Deliver This Message'),
  para('Cancer prevention through dietary habits is most effective when started early. The World Cancer Research Fund estimates that up to 30-40% of cancer cases are preventable through diet, physical activity and healthy weight. Teaching children to eat a rainbow establishes lifelong habits that reduce cancer risk decades later.'),
  spacer(),
  heading3('Evidence Summary (Brief)'),
  bullet('Cruciferous vegetables (broccoli, cabbage): sulforaphane activates Nrf2-mediated detoxification pathways; associated with reduced colorectal and lung cancer risk', 'check', null),
  bullet('Lycopene (tomato, watermelon): inversely associated with prostate cancer risk; potent singlet-oxygen quencher', 'check', null),
  bullet('Anthocyanins (red/blue/purple berries): pro-apoptotic and anti-angiogenic effects in in vitro cancer models', 'check', null),
  bullet('Allium vegetables (garlic, onion): epidemiological data link high consumption with lower gastric cancer incidence (EPIC cohort)', 'check', null),
  bullet('Carotenoids (orange/yellow foods): high dietary intake associated with reduced breast cancer risk (meta-analyses)', 'check', null),
  bullet('Fibre (all plant foods): protective against colorectal cancer; modulates gut microbiome and bile acid metabolism', 'check', null),
  spacer(),
  heading3('Talking Points if Parents / Teachers Ask'),
  bullet('Q: "Should we avoid all sugar?" A: Focus on whole fruits – their fibre slows sugar absorption. Processed/added sugar is what to limit.', 'bullets', null),
  bullet('Q: "What about meat?" A: Lean meat in moderation is fine. The emphasis for cancer prevention is ADDING more plants, not necessarily eliminating meat for children.', 'bullets', null),
  bullet('Q: "Are supplements better?" A: Whole foods contain thousands of phytochemicals working together; isolated supplements do not replicate this.', 'bullets', null),
  bullet('Q: "My child is a picky eater." A: Encourage gradual exposure. Repeated presentation (8-10 times) increases acceptance. Making food fun and colourful helps.', 'bullets', null),
  spacer(),
  heading3('Oncology-Specific Sensitivity Notes'),
  bullet('Do NOT mention cancer or death explicitly to the children – frame everything positively around strength, energy and happiness', 'bullets', null),
  bullet('If a child\'s parent is undergoing treatment, staff should be sensitised in advance and provide emotional support as needed', 'bullets', null),
  bullet('Reinforce that food is one tool among many – not a cure or a guarantee, but a powerful daily choice', 'bullets', null),
  spacer(),

  // ── SECTION 8 ──
  heading1('8. Simple Daily Guide for Grade 1 & 2 Children (Age 6-8)'),
  para('Share these simple guidelines with parents/teachers at the end of the session:', { italic: true }),
  spacer(),
  new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    borders: {
      top:    { style: BorderStyle.SINGLE, size: 4, color: 'BDBDBD' },
      bottom: { style: BorderStyle.SINGLE, size: 4, color: 'BDBDBD' },
      left:   { style: BorderStyle.SINGLE, size: 4, color: 'BDBDBD' },
      right:  { style: BorderStyle.SINGLE, size: 4, color: 'BDBDBD' },
      insideH:{ style: BorderStyle.SINGLE, size: 2, color: 'E0E0E0' },
      insideV:{ style: BorderStyle.SINGLE, size: 2, color: 'E0E0E0' },
    },
    rows: [
      new TableRow({ tableHeader: true, children: [
        new TableCell({ shading: { type: ShadingType.CLEAR, fill: '1A237E' }, margins: { top: 80, bottom: 80, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: 'Food Group', font: 'Arial', size: 22, bold: true, color: 'FFFFFF' })] })] }),
        new TableCell({ shading: { type: ShadingType.CLEAR, fill: '1A237E' }, margins: { top: 80, bottom: 80, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: 'Daily Serving (Age 6-8)', font: 'Arial', size: 22, bold: true, color: 'FFFFFF' })] })] }),
        new TableCell({ shading: { type: ShadingType.CLEAR, fill: '1A237E' }, margins: { top: 80, bottom: 80, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: 'Easy Example', font: 'Arial', size: 22, bold: true, color: 'FFFFFF' })] })] }),
      ]}),
      new TableRow({ children: [
        new TableCell({ margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: 'Vegetables', font: 'Arial', size: 20 })] })] }),
        new TableCell({ margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: '2-3 servings (1 serving = 1/2 cup)', font: 'Arial', size: 20 })] })] }),
        new TableCell({ shading: { type: ShadingType.CLEAR, fill: 'E8F5E9' }, margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: 'Carrots at lunch + spinach at dinner', font: 'Arial', size: 20 })] })] }),
      ]}),
      new TableRow({ children: [
        new TableCell({ margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: 'Fruits', font: 'Arial', size: 20 })] })] }),
        new TableCell({ margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: '1-2 servings (1 serving = 1 small fruit)', font: 'Arial', size: 20 })] })] }),
        new TableCell({ shading: { type: ShadingType.CLEAR, fill: 'FFF3E0' }, margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: '1 banana + small bowl of mango', font: 'Arial', size: 20 })] })] }),
      ]}),
      new TableRow({ children: [
        new TableCell({ margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: 'Whole Grains', font: 'Arial', size: 20 })] })] }),
        new TableCell({ margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: '3-4 servings (1 serving = 1 chapati/slice)', font: 'Arial', size: 20 })] })] }),
        new TableCell({ shading: { type: ShadingType.CLEAR, fill: 'FFF9C4' }, margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: 'Whole wheat roti, brown rice, oats', font: 'Arial', size: 20 })] })] }),
      ]}),
      new TableRow({ children: [
        new TableCell({ margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: 'Protein (Lentils, Eggs, Milk)', font: 'Arial', size: 20 })] })] }),
        new TableCell({ margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: '2 servings', font: 'Arial', size: 20 })] })] }),
        new TableCell({ shading: { type: ShadingType.CLEAR, fill: 'E3F2FD' }, margins: { top: 60, bottom: 60, left: 100, right: 100 }, children: [new Paragraph({ children: [new TextRun({ text: 'Dal + 1 glass milk or curd', font: 'Arial', size: 20 })] })] }),
      ]}),
    ],
  }),
  spacer(),

  // ── SECTION 9 ──
  heading1('9. Closing the Session'),
  para('End the class by leading the children in this chant together (repeat 3 times):'),
  spacer(),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { before: 120, after: 120 },
    shading: { type: ShadingType.CLEAR, fill: 'E8EAF6' },
    children: [new TextRun({ text: '"EAT THE RAINBOW, GROW UP STRONG!"', font: 'Arial', size: 28, bold: true, color: '1A237E' })],
  }),
  spacer(),
  para('Hand out a printed "My Rainbow Plate" colouring sheet for children to take home and complete with parents.'),
  para('Remind teachers: Display this rainbow food chart in the classroom for ongoing reinforcement.'),
  spacer(),

  // ── SECTION 10 ──
  heading1('10. References & Further Reading'),
  bullet('World Cancer Research Fund / AICR. Diet, Nutrition, Physical Activity and Cancer: a Global Perspective. Continuous Update Project Expert Report 2018.', 'numbers', null),
  bullet('UNICEF. Improving Young Children\'s Diets During the First Five Years of Life. 2023.', 'numbers', null),
  bullet('Steinmetz KA, Potter JD. Vegetables, fruit and cancer prevention: a review. J Am Diet Assoc. 1996;96(10):1027-1039.', 'numbers', null),
  bullet('Liu RH. Health-promoting components of fruits and vegetables in the diet. Adv Nutr. 2013;4(3):384S-392S.', 'numbers', null),
  bullet('Indian Council of Medical Research (ICMR). Dietary Guidelines for Indians – A Manual. 2nd ed. NIN, Hyderabad.', 'numbers', null),
  bullet('Images sourced from Unsplash.com (free for use under the Unsplash License).', 'numbers', null),
  spacer(),

  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { before: 240, after: 80 },
    shading: { type: ShadingType.CLEAR, fill: '1A237E' },
    children: [new TextRun({ text: 'Prepared by Oncology Department  |  Nutrition & Wellness Programme  |  Confidential', font: 'Arial', size: 18, color: 'FFFFFF' })],
  }),
];

const doc = new Document({
  styles: {
    default: { document: { run: { font: 'Arial', size: 22 } } },
    paragraphStyles: [
      { id: 'Heading1', name: 'Heading 1', basedOn: 'Normal', next: 'Normal', quickFormat: true,
        run: { size: 32, bold: true, font: 'Arial', color: '1A237E' },
        paragraph: { spacing: { before: 320, after: 160 }, outlineLevel: 0 } },
      { id: 'Heading2', name: 'Heading 2', basedOn: 'Normal', next: 'Normal', quickFormat: true,
        run: { size: 26, bold: true, font: 'Arial' },
        paragraph: { spacing: { before: 240, after: 120 }, outlineLevel: 1 } },
      { id: 'Heading3', name: 'Heading 3', basedOn: 'Normal', next: 'Normal', quickFormat: true,
        run: { size: 24, bold: true, font: 'Arial', color: '37474F' },
        paragraph: { spacing: { before: 180, after: 80 }, outlineLevel: 2 } },
    ],
  },
  numbering: {
    config: [
      { reference: 'bullets', levels: [{ level: 0, format: LevelFormat.BULLET, text: '\u2022', alignment: AlignmentType.LEFT,
          style: { paragraph: { indent: { left: 720, hanging: 360 } } } }] },
      { reference: 'check',   levels: [{ level: 0, format: LevelFormat.BULLET, text: '\u2713', alignment: AlignmentType.LEFT,
          style: { paragraph: { indent: { left: 720, hanging: 360 } } } }] },
      { reference: 'numbers', levels: [{ level: 0, format: LevelFormat.DECIMAL, text: '%1.', alignment: AlignmentType.LEFT,
          style: { paragraph: { indent: { left: 720, hanging: 360 } } } }] },
    ],
  },
  sections: [{
    properties: {
      page: {
        margin: { top: convertInchesToTwip(1), bottom: convertInchesToTwip(1),
                  left: convertInchesToTwip(1.2), right: convertInchesToTwip(1.2) },
      },
    },
    headers: {
      default: new Header({
        children: [new Paragraph({
          alignment: AlignmentType.CENTER,
          shading: { type: ShadingType.CLEAR, fill: '1A237E' },
          spacing: { before: 80, after: 80 },
          children: [new TextRun({ text: "ONCOLOGY DEPARTMENT  |  GUEST LECTURE DOCTOR'S NOTES", font: 'Arial', size: 20, bold: true, color: 'FFFFFF' })],
        })],
      }),
    },
    footers: {
      default: new Footer({
        children: [new Paragraph({
          alignment: AlignmentType.CENTER,
          children: [
            new TextRun({ text: 'Page ', font: 'Arial', size: 18, color: '757575' }),
            new TextRun({ children: [PageNumber.CURRENT], font: 'Arial', size: 18, color: '757575' }),
            new TextRun({ text: ' of ', font: 'Arial', size: 18, color: '757575' }),
            new TextRun({ children: [PageNumber.TOTAL_PAGES], font: 'Arial', size: 18, color: '757575' }),
            new TextRun({ text: '  |  Confidential – For Presenter Use Only', font: 'Arial', size: 18, color: '757575' }),
          ],
        })],
      }),
    },
    children,
  }],
});

Packer.toBuffer(doc).then(buffer => {
  fs.writeFileSync('/home/daytona/workspace/essential-nutrients-lecture/Essential_Nutrients_Doctors_Notes_WithImages.docx', buffer);
  console.log('Done: Essential_Nutrients_Doctors_Notes_WithImages.docx');
}).catch(err => {
  console.error('Error:', err.message);
  process.exit(1);
});
Running Command

cd /home/daytona/workspace/essential-nutrients-lecture && node create_doc_with_i…

Running Command

python3 -c " import zipfile, os path = '/home/daytona/workspace/essential-nutrie…

Your updated document with all visual aids is ready:

Essential Nutrients Doctors Notes WithImages

Word Document · DOCX


Here is what was added visually:
7 food images embedded (all from Unsplash - free to use):
PositionImageWhat it shows
Title page (hero)Rainbow salad bowlFull colour variety - sets the tone
🟠 Orange sectionFresh carrotsClassic, vibrant orange
🟢 Green sectionRainbow vegetable plateMulti-veg with greens
🔴 Red sectionBright red strawberriesBold, appetising red
🟡 Yellow sectionBananas on yellow backgroundClean, cheerful yellow
🟣 Purple sectionBlueberries close-upDeep blue/purple tones
⚪ White sectionWhite/cream potatoesPale earthy white foods
Layout: Each colour section uses a two-column layout - the photo on the left, bullet-point text on the right - so the document stays compact and easy to read. Each image has a gentle colour-shaded background matching its food group. The hero image sits centered below the title block on page 1.
This is a shared conversation. Sign in to Orris to start your own chat.