MBW management study notes in docx format

Asking for Preferences
What does MBW stand for? Please go ahead and specify!

Biomedical waste management

Asking for Preferences
Reading File
Reading File
Searching the Web

biomedical waste management classification color coding disposal methods

Finding Sources
Reading File
Finding Sources
Reading File
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null && ls /home/daytona/skills/docx/scripts/ 2>/dev/null || echo "no scripts dir"

Running Command

mkdir -p /home/daytona/workspace/bmw-notes && ls /home/daytona/skills/docx/

Writing File

~/bmw-notes/generate.js

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

// ---- Numbering config ----
const numberingConfig = [
  {
    reference: "bullets",
    levels: [
      {
        level: 0,
        format: LevelFormat.BULLET,
        text: "\u2022",
        alignment: AlignmentType.LEFT,
        style: { paragraph: { indent: { left: 720, hanging: 360 } } }
      },
      {
        level: 1,
        format: LevelFormat.BULLET,
        text: "\u25E6",
        alignment: AlignmentType.LEFT,
        style: { paragraph: { indent: { left: 1080, hanging: 360 } } }
      }
    ]
  },
  {
    reference: "numbers",
    levels: [
      {
        level: 0,
        format: LevelFormat.DECIMAL,
        text: "%1.",
        alignment: AlignmentType.LEFT,
        style: { paragraph: { indent: { left: 720, hanging: 360 } } }
      }
    ]
  }
];

// ---- Helper functions ----
function h1(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_1,
    children: [new TextRun({ text, bold: true, size: 32, font: "Arial", color: "1F3864" })]
  });
}

function h2(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_2,
    children: [new TextRun({ text, bold: true, size: 26, font: "Arial", color: "2E74B5" })]
  });
}

function h3(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_3,
    children: [new TextRun({ text, bold: true, size: 24, font: "Arial", color: "203864" })]
  });
}

function bullet(text, level = 0) {
  const parts = text.split(/\*\*(.*?)\*\*/g);
  const children = parts.map((p, i) =>
    i % 2 === 1
      ? new TextRun({ text: p, bold: true, size: 22, font: "Arial" })
      : new TextRun({ text: p, size: 22, font: "Arial" })
  );
  return new Paragraph({
    numbering: { reference: "bullets", level },
    children
  });
}

function para(text) {
  const parts = text.split(/\*\*(.*?)\*\*/g);
  const children = parts.map((p, i) =>
    i % 2 === 1
      ? new TextRun({ text: p, bold: true, size: 22, font: "Arial" })
      : new TextRun({ text: p, size: 22, font: "Arial" })
  );
  return new Paragraph({ children, spacing: { after: 100 } });
}

function space() {
  return new Paragraph({ children: [new TextRun("")], spacing: { after: 80 } });
}

function pageBreak() {
  return new Paragraph({ children: [new PageBreak()] });
}

function noteBox(text) {
  return new Table({
    width: { size: 9026, type: WidthType.DXA },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { fill: "FFF2CC", type: ShadingType.CLEAR },
            margins: { top: 100, bottom: 100, left: 200, right: 200 },
            borders: {
              top: { style: BorderStyle.SINGLE, size: 4, color: "F0A500" },
              bottom: { style: BorderStyle.SINGLE, size: 4, color: "F0A500" },
              left: { style: BorderStyle.THICK, size: 12, color: "F0A500" },
              right: { style: BorderStyle.SINGLE, size: 4, color: "F0A500" }
            },
            children: [
              new Paragraph({
                children: [new TextRun({ text: "\uD83D\uDCCC  " + text, size: 20, font: "Arial", italics: true })]
              })
            ]
          })
        ]
      })
    ]
  });
}

function colorTable(rows) {
  const headerColor = "1F3864";
  const headerTextColor = "FFFFFF";
  const colWidths = [2000, 2800, 2400, 1826];
  const headers = ["Color", "Container Type", "Waste Category", "Disposal Method"];

  return new Table({
    width: { size: 9026, type: WidthType.DXA },
    columnWidths: colWidths,
    rows: [
      new TableRow({
        tableHeader: true,
        children: headers.map((h, i) => new TableCell({
          width: { size: colWidths[i], type: WidthType.DXA },
          shading: { fill: headerColor, type: ShadingType.CLEAR },
          margins: { top: 80, bottom: 80, left: 120, right: 120 },
          children: [new Paragraph({
            alignment: AlignmentType.CENTER,
            children: [new TextRun({ text: h, bold: true, size: 20, font: "Arial", color: headerTextColor })]
          })]
        }))
      }),
      ...rows.map((row, idx) => new TableRow({
        children: row.map((cell, i) => new TableCell({
          width: { size: colWidths[i], type: WidthType.DXA },
          shading: { fill: idx % 2 === 0 ? "F2F2F2" : "FFFFFF", type: ShadingType.CLEAR },
          margins: { top: 60, bottom: 60, left: 120, right: 120 },
          children: [new Paragraph({
            children: [new TextRun({ text: cell, size: 20, font: "Arial" })]
          })]
        }))
      }))
    ]
  });
}

function simpleTable(headers, rows, colWidths) {
  const total = colWidths.reduce((a, b) => a + b, 0);
  return new Table({
    width: { size: total, type: WidthType.DXA },
    columnWidths: colWidths,
    rows: [
      new TableRow({
        tableHeader: true,
        children: headers.map((h, i) => new TableCell({
          width: { size: colWidths[i], type: WidthType.DXA },
          shading: { fill: "2E74B5", type: ShadingType.CLEAR },
          margins: { top: 80, bottom: 80, left: 120, right: 120 },
          children: [new Paragraph({
            alignment: AlignmentType.CENTER,
            children: [new TextRun({ text: h, bold: true, size: 20, font: "Arial", color: "FFFFFF" })]
          })]
        }))
      }),
      ...rows.map((row, idx) => new TableRow({
        children: row.map((cell, i) => new TableCell({
          width: { size: colWidths[i], type: WidthType.DXA },
          shading: { fill: idx % 2 === 0 ? "EBF3FB" : "FFFFFF", type: ShadingType.CLEAR },
          margins: { top: 60, bottom: 60, left: 120, right: 120 },
          children: [new Paragraph({
            children: [new TextRun({ text: cell, size: 20, font: "Arial" })]
          })]
        }))
      }))
    ]
  });
}

// ---- TITLE PAGE ----
const titlePage = [
  space(), space(), space(),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    children: [new TextRun({ text: "BIOMEDICAL WASTE MANAGEMENT", bold: true, size: 52, font: "Arial", color: "1F3864" })]
  }),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    children: [new TextRun({ text: "Study Notes for Medical & Nursing Students", size: 28, font: "Arial", color: "2E74B5", italics: true })]
  }),
  space(),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    children: [new TextRun({ text: "\u2015\u2015\u2015\u2015\u2015\u2015\u2015\u2015\u2015\u2015\u2015\u2015\u2015\u2015\u2015\u2015\u2015\u2015\u2015\u2015", size: 24, color: "2E74B5" })]
  }),
  space(),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    children: [new TextRun({ text: "Topics Covered:", bold: true, size: 24, font: "Arial", color: "1F3864" })]
  }),
  new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: "Definition & Importance  |  Classification  |  Color Coding", size: 22, font: "Arial" })] }),
  new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: "Segregation  |  Storage & Transport  |  Treatment & Disposal", size: 22, font: "Arial" })] }),
  new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: "Legal Framework  |  Infection Control  |  Key Facts for Exams", size: 22, font: "Arial" })] }),
  space(), space(), space(),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    children: [new TextRun({ text: "June 2026", size: 20, font: "Arial", color: "888888" })]
  }),
  pageBreak()
];

// ---- SECTION 1: INTRODUCTION ----
const section1 = [
  h1("1. Introduction to Biomedical Waste"),
  space(),
  h2("1.1 Definition"),
  bullet("**Biomedical waste (BMW):** Any waste generated during diagnosis, treatment, immunization, research, or production/testing of biological products"),
  bullet("Also called **hospital waste**, **healthcare waste**, or **clinical waste**"),
  bullet("Governed by the **Biomedical Waste (Management & Handling) Rules, 1998** (India) - amended in 2016 and 2018"),
  space(),
  h2("1.2 Sources of BMW"),
  bullet("Hospitals, nursing homes, clinics, dispensaries"),
  bullet("Pathological and research laboratories"),
  bullet("Blood banks, veterinary hospitals"),
  bullet("Mortuaries and autopsy centers"),
  bullet("Research and teaching institutions"),
  bullet("Home care settings (insulin syringes, wound dressings)"),
  space(),
  h2("1.3 Why It Matters"),
  bullet("Only **10-25% of healthcare waste is hazardous** - but improper segregation contaminates the rest"),
  bullet("Risk of **needle-stick injuries** and **blood-borne pathogen transmission** (HIV, HBV, HCV)"),
  bullet("Environmental contamination of soil and groundwater"),
  bullet("Illegal sale of used syringes is a serious public health threat"),
  space(),
  noteBox("Exam Tip: ~75-90% of hospital waste is non-hazardous (like general municipal waste). Only 10-25% is actually hazardous/infectious."),
  pageBreak()
];

// ---- SECTION 2: CLASSIFICATION ----
const section2 = [
  h1("2. Classification of Biomedical Waste"),
  space(),
  para("Under the **BMW Rules 2016 (India)**, waste is classified into **4 categories** (previously 10 categories):"),
  space(),
  simpleTable(
    ["Category", "Type", "Examples"],
    [
      ["Yellow", "Infectious & anatomical", "Human anatomical waste, soiled items (dressings, bandages), expired medicines, discarded medicines, chemical waste, microbiological waste"],
      ["Red", "Contaminated recyclable waste", "Waste generated from disposable items (tubing, IV sets, syringes without needles, gloves, catheters, urine bags)"],
      ["White (Translucent)", "Sharps waste", "Needles, syringes with fixed needles, scalpel blades, lancets, broken glass contaminated with blood"],
      ["Blue", "Glassware & metallic implants", "Broken glass, metallic body implants, discarded medicines (non-hazardous)"]
    ],
    [1500, 2500, 5026]
  ),
  space(),
  h2("2.1 WHO Classification (Global)"),
  bullet("**Infectious waste** - cultures, swabs, blood-soaked materials"),
  bullet("**Sharps** - needles, scalpels, broken glass"),
  bullet("**Pathological waste** - tissues, organs, body parts, blood"),
  bullet("**Pharmaceutical waste** - expired/unused drugs, vaccines"),
  bullet("**Chemical waste** - solvents, disinfectants, reagents"),
  bullet("**Radioactive waste** - from radiotherapy, nuclear medicine"),
  bullet("**General/Non-hazardous waste** - paper, packaging, food"),
  space(),
  noteBox("Exam Tip: The 2016 amendment reduced categories from 10 to 4 (Yellow, Red, White, Blue) to simplify segregation in Indian hospitals."),
  pageBreak()
];

// ---- SECTION 3: COLOR CODING ----
const section3 = [
  h1("3. Color Coding System"),
  space(),
  para("Color coding ensures correct segregation at the source. Each color = specific container type + waste type + disposal method."),
  space(),
  colorTable([
    ["Yellow\n(Non-chlorinated)", "Yellow plastic bag or container", "Anatomical waste, soiled dressings, cytotoxic waste, expired medicines, chemical waste", "Incineration / Deep burial"],
    ["Red\n(Non-chlorinated)", "Red plastic bag or container", "Recyclable contaminated plastic waste (IV tubing, syringes w/o needles, gloves, catheters)", "Autoclaving \u2192 shredding \u2192 recycling"],
    ["White (Translucent)", "Puncture-proof container", "Sharps: needles, syringes with fixed needles, scalpels, lancets", "Autoclaving / dry heat + shredding / encapsulation"],
    ["Blue", "Cardboard box with blue markings", "Broken glass, metallic implants, non-contaminated glassware", "Disinfection + disposal in secure landfill"]
  ]),
  space(),
  h2("3.1 Container Requirements"),
  bullet("Bags/containers must be **leak-proof, puncture-resistant**"),
  bullet("Must be **labeled** with biohazard symbol + category + date"),
  bullet("Never fill containers more than **3/4 full**"),
  bullet("Sharps containers must be **rigid and closable**"),
  bullet("Color coding must be **visible even after sealing**"),
  space(),
  noteBox("Memory Aid: Yellow = Burn it (incinerate) | Red = Recycle it (autoclave + recycle) | White = Sharp it (puncture-proof) | Blue = Glass & Metal"),
  pageBreak()
];

// ---- SECTION 4: SEGREGATION ----
const section4 = [
  h1("4. Segregation of Biomedical Waste"),
  space(),
  h2("4.1 Principles"),
  bullet("Segregation must occur **at the point of generation** - at the bedside, OT, lab"),
  bullet("It is the **most important step** in BMW management"),
  bullet("Responsibility lies with the **waste generator** (doctor, nurse, technician)"),
  bullet("Minimizes volume of hazardous waste, reduces cost"),
  space(),
  h2("4.2 General Rules"),
  bullet("Do NOT mix **sharps with other waste**"),
  bullet("Do NOT recap needles after use (one-hand technique if unavoidable)"),
  bullet("Do NOT fill sharps containers more than **3/4 full**"),
  bullet("Do NOT transfer waste from one bag to another"),
  bullet("Segregate **immediately** at the site of generation"),
  bullet("Use **dedicated trolleys** for waste collection - not patient care trolleys"),
  space(),
  h2("4.3 Special Waste Types"),
  bullet("**Cytotoxic (Chemotherapy) waste:** Yellow bag; requires special incineration at >1000°C"),
  bullet("**Radioactive waste:** Handled separately per Atomic Energy Regulatory Board (AERB) rules"),
  bullet("**Mercury waste (thermometers, sphygmomanometers):** Collected in separate sealed containers"),
  bullet("**Placenta/anatomical:** Yellow bag; deep burial in hospital grounds or incineration"),
  space(),
  noteBox("Exam Tip: Segregation at source = most critical step. No segregation = ALL waste treated as infectious = massive cost increase."),
  pageBreak()
];

// ---- SECTION 5: STORAGE & TRANSPORT ----
const section5 = [
  h1("5. Storage and Transport"),
  space(),
  h2("5.1 On-site Storage"),
  bullet("BMW must NOT be stored beyond **48 hours** (India: must be handed to CBWTF within 48 h)"),
  bullet("Storage area must be **separate, secured, labeled** with biohazard symbol"),
  bullet("Must have **impermeable flooring**, adequate lighting, ventilation"),
  bullet("Should NOT be accessible to stray animals or unauthorized persons"),
  bullet("Refrigeration required if storage exceeds 48 hours (max 72 h with refrigeration)"),
  space(),
  h2("5.2 Transport within Facility"),
  bullet("Use **dedicated color-coded trolleys/carts** - not elevators used by patients"),
  bullet("Waste must be **transported in closed containers**"),
  bullet("Transport at **off-peak hours** to avoid contact with patients/visitors"),
  bullet("Trolleys must be disinfected after each use"),
  bullet("Waste must not be left unattended in corridors"),
  space(),
  h2("5.3 Off-site Transport"),
  bullet("Only **authorized vehicles** (covered, locked) for transport to CBWTF"),
  bullet("Driver must carry a **manifest document** (waste tracking form)"),
  bullet("Manifest includes: type, quantity, date, source facility, destination"),
  bullet("**CBWTF** = Common Bio-medical Waste Treatment Facility"),
  space(),
  noteBox("Key Rule: 48-hour limit on storage. Beyond that, waste must reach CBWTF or be refrigerated."),
  pageBreak()
];

// ---- SECTION 6: TREATMENT & DISPOSAL ----
const section6 = [
  h1("6. Treatment and Disposal Methods"),
  space(),
  simpleTable(
    ["Method", "Waste Type", "Temperature/Process", "Key Points"],
    [
      ["Incineration", "Yellow bag: anatomical, cytotoxic, pharmaceutical", ">850°C (2-chamber), >1000°C for cytotoxics", "Destroys all pathogens; reduces volume by 90%; ash to landfill; produces dioxins if <850°C"],
      ["Autoclaving (Steam Sterilization)", "Red bag: contaminated plastic recyclables", "121°C / 15 psi / 60 min", "Most widely used; not for anatomical/cytotoxic/chemical waste"],
      ["Dry Heat", "White (sharps)", "160°C / 1-2 hours", "Needle destroyer; used in smaller facilities"],
      ["Chemical Disinfection", "Liquid waste, spillage", "Sodium hypochlorite 1%", "Pre-treatment of liquid infectious waste before drain disposal"],
      ["Microwaving", "Infectious waste", "100°C internally", "Effective; not for radioactive or cytotoxic waste"],
      ["Deep Burial", "Yellow: anatomical waste (small facilities)", "2m deep, lime covered", "Only for hospitals in remote areas without CBWTF access"],
      ["Shredding", "After autoclaving (Red, White)", "Mechanical", "Makes waste unrecognizable before recycling/landfill"],
      ["Encapsulation", "Sharps (alternative)", "Cement/plastic fill", "Used when no autoclave available"]
    ],
    [1800, 2000, 2000, 3226]
  ),
  space(),
  h2("6.1 Incineration - Key Details"),
  bullet("**Primary chamber:** 800-900°C - burns the waste"),
  bullet("**Secondary chamber:** >1000°C - burns gases/smoke"),
  bullet("Mandatory for: anatomical waste, cytotoxic waste, pharmaceutical waste"),
  bullet("**Fly ash** from incinerator must be sent to hazardous landfill"),
  bullet("**NOT suitable** for radioactive waste, halogenated plastics (PVC), mercury"),
  space(),
  h2("6.2 Autoclaving - Key Details"),
  bullet("Standard cycle: **121°C, 15 psi, 30-60 minutes**"),
  bullet("Must be **validated** regularly with biological indicators (Bacillus stearothermophilus spores)"),
  bullet("**Pre-vacuum** autoclaves better than gravity displacement for porous loads"),
  bullet("After autoclaving: Red bag waste can be shredded and sent for recycling"),
  space(),
  noteBox("Exam Tip: Autoclave validation uses Bacillus stearothermophilus (also called Geobacillus stearothermophilus) spore strips. Incineration uses chemical indicators."),
  pageBreak()
];

// ---- SECTION 7: LEGAL FRAMEWORK ----
const section7 = [
  h1("7. Legal & Regulatory Framework"),
  space(),
  h2("7.1 Key Legislation (India)"),
  bullet("**Environment (Protection) Act, 1986** - parent act for all pollution control"),
  bullet("**BMW Rules, 1998** - first specific rules for biomedical waste management"),
  bullet("**BMW (Management & Handling) Amendment Rules, 2000, 2003** - progressive updates"),
  bullet("**BMW Rules, 2016** - major revision; reduced categories to 4; introduced bar-coding; CBWTF mandated"),
  bullet("**BMW Amendment Rules, 2018** - further updates on mercury, tetra-packs, gloves"),
  space(),
  h2("7.2 BMW Rules 2016 - Key Provisions"),
  bullet("All healthcare facilities **must** have a **BMW management committee**"),
  bullet("**Bar-coding** of waste bags mandatory for traceability"),
  bullet("**Annual reporting** to State Pollution Control Board (SPCB)"),
  bullet("Phasing out of chlorinated plastic bags (PVC) - replaced by non-chlorinated"),
  bullet("Pre-treatment of laboratory waste with chemical disinfection before disposal"),
  bullet("Hospitals >500 beds must have **on-site BMW management system**"),
  bullet("All staff must receive **training within 60 days of joining**"),
  space(),
  h2("7.3 Regulatory Authorities"),
  bullet("**Central Pollution Control Board (CPCB)** - national oversight"),
  bullet("**State Pollution Control Board (SPCB)** - state-level authorization of facilities"),
  bullet("**Common Bio-Medical Waste Treatment Facility (CBWTF)** - centralized treatment"),
  bullet("**Ministry of Environment, Forest & Climate Change (MoEFCC)** - policy body"),
  space(),
  h2("7.4 Penalties"),
  bullet("Non-compliance: up to **5 years imprisonment** and/or fine up to Rs. 1 lakh (Environment Protection Act)"),
  bullet("Repeated violations: enhanced penalties and facility closure"),
  space(),
  noteBox("Exam Tip: BMW Rules 2016 = 4 categories (not 10). Bar-coding mandatory. CBWTF must be used. Training within 60 days of joining."),
  pageBreak()
];

// ---- SECTION 8: INFECTION CONTROL ----
const section8 = [
  h1("8. Infection Control & Occupational Safety"),
  space(),
  h2("8.1 Standard Precautions"),
  bullet("Treat ALL blood and body fluids as potentially infectious"),
  bullet("**Hand hygiene** - most important measure; before and after every patient contact"),
  bullet("Use **Personal Protective Equipment (PPE):** gloves, mask, apron, goggles as appropriate"),
  bullet("**Safe injection practices:** no needle recapping; use sharps containers"),
  bullet("Respiratory hygiene / cough etiquette in waiting areas"),
  space(),
  h2("8.2 PPE for Waste Handlers"),
  bullet("Heavy-duty rubber gloves (not examination gloves)"),
  bullet("Closed-toe shoes / rubber boots"),
  bullet("Thick apron / coverall"),
  bullet("Face mask (surgical or N95 when handling fine particles/aerosols)"),
  bullet("Eye protection (goggles) when risk of splashing"),
  space(),
  h2("8.3 Needle-Stick Injury (NSI) Protocol"),
  bullet("**Immediate action:** bleed wound, wash with soap and water for 5 minutes, DO NOT squeeze"),
  bullet("Report to supervisor and occupational health within 2 hours"),
  bullet("**Assess source patient** for HIV, HBV, HCV status"),
  bullet("**Post-exposure prophylaxis (PEP):**"),
  bullet("HIV PEP: start within 72 hours (ideally <2 hours), 28-day course of antiretrovirals", 1),
  bullet("HBV: give HBIG if unvaccinated/non-immune; check anti-HBs", 1),
  bullet("HCV: no PEP available; monitor LFTs and HCV RNA at 6 weeks", 1),
  bullet("Document: date/time, type of injury, source patient, PEP given"),
  bullet("Follow-up serology at 6 weeks, 3 months, 6 months"),
  space(),
  h2("8.4 Spill Management"),
  bullet("**Small spill (<30 ml):** gloves + paper towels + 1% hypochlorite; leave 10 min; clean"),
  bullet("**Large spill (>30 ml):** full PPE + absorb with dry powder/granules first + 1% hypochlorite"),
  bullet("Decontaminate the area + dispose of all materials in yellow bag"),
  bullet("Document the spill and report"),
  space(),
  noteBox("Exam Tip: For NSI - immediately bleed, wash, report, assess source, and start HIV PEP within 72 hours if indicated. Never delay PEP."),
  pageBreak()
];

// ---- SECTION 9: KEY FACTS FOR EXAMS ----
const section9 = [
  h1("9. High-Yield Exam Points"),
  space(),
  h2("9.1 Must-Know Numbers"),
  bullet("Storage limit: **48 hours** (72 h with refrigeration)"),
  bullet("Autoclaving: **121°C, 15 psi, 30-60 min**"),
  bullet("Incineration: primary chamber **>850°C**; secondary **>1000°C**"),
  bullet("Cytotoxic incineration: **>1000°C**"),
  bullet("Sharps container fill limit: **3/4 full (75%)**"),
  bullet("HIV PEP window: **72 hours** (ideally <2 hours)"),
  bullet("Staff training deadline: **60 days** of joining"),
  bullet("Hazardous waste proportion: **10-25%** of all hospital waste"),
  space(),
  h2("9.2 Quick Associations"),
  simpleTable(
    ["Color", "Key Waste", "Key Disposal"],
    [
      ["Yellow", "Anatomical, cytotoxic, pharmaceutical", "Incineration"],
      ["Red", "Contaminated recyclable plastic", "Autoclave + Shred + Recycle"],
      ["White", "Sharps (needles, blades)", "Autoclave/Dry heat + Shred"],
      ["Blue", "Broken glass, metallic implants", "Disinfect + Secure landfill"]
    ],
    [2000, 3500, 3526]
  ),
  space(),
  h2("9.3 Common Exam Questions"),
  bullet("Q: Most important step in BMW management? **A: Segregation at source**"),
  bullet("Q: Color of sharps container? **A: White (translucent/puncture-proof)**"),
  bullet("Q: Autoclave validation organism? **A: Geobacillus (Bacillus) stearothermophilus**"),
  bullet("Q: BMW categories under 2016 rules? **A: 4 (Yellow, Red, White, Blue)**"),
  bullet("Q: BMW categories under 1998 rules? **A: 10 categories**"),
  bullet("Q: Which waste NOT for autoclaving? **A: Anatomical, cytotoxic, chemical, radioactive**"),
  bullet("Q: PEP start time for HIV? **A: Ideally <2 hours, up to 72 hours**"),
  bullet("Q: Incineration temp for cytotoxics? **A: >1000°C**"),
  bullet("Q: Body that authorizes CBWTF? **A: State Pollution Control Board (SPCB)**"),
  space(),
  h2("9.4 Mnemonics"),
  bullet("**SCAT** = Segregate, Contain, Accumulate, Transport (basic BMW flow)"),
  bullet("**YELLOW is for BURNING** (Yellow = incinerate)"),
  bullet("**RED is for RECYCLING** (Red = autoclave + recycle plastics)"),
  bullet("**WHITE is for STABBING** (White = sharps)"),
  bullet("**BLUE is for GLASS** (Blue = glass & metal)"),
  space(),
  noteBox("Most Frequently Tested: Color coding (Yellow/Red/White/Blue), BMW Rules 2016 (4 categories), Needle-stick injury protocol (72-hour PEP window), Autoclaving (121°C/15psi), Segregation as the most important step."),
  pageBreak()
];

// ---- SECTION 10: QUICK REFERENCE SUMMARY ----
const section10 = [
  h1("10. Quick Reference Summary"),
  space(),
  simpleTable(
    ["Topic", "Key Point"],
    [
      ["Definition", "Waste from diagnosis, treatment, immunization, research"],
      ["BMW Rules", "India: 1998 (10 categories) → 2016 (4 categories)"],
      ["Categories (2016)", "Yellow, Red, White (Translucent), Blue"],
      ["Most critical step", "Segregation at source (point of generation)"],
      ["Storage limit", "48 hours (72 h if refrigerated)"],
      ["Incineration temp", ">850°C primary; >1000°C secondary/cytotoxic"],
      ["Autoclave", "121°C, 15 psi, 30-60 min; validated by B. stearothermophilus"],
      ["Sharps fill limit", "3/4 full (75%)"],
      ["NSI - first step", "Bleed wound + wash soap & water 5 min"],
      ["HIV PEP window", "72 hours (ideally <2 hours); 28-day course"],
      ["Hazardous fraction", "10-25% of total hospital waste"],
      ["Regulatory body", "CPCB (national); SPCB (state); CBWTF (treatment)"],
      ["Staff training", "Within 60 days of joining"],
      ["Validation of autoclave", "Geobacillus (Bacillus) stearothermophilus spore strips"]
    ],
    [3500, 5526]
  ),
  space()
];

// ---- ASSEMBLE DOCUMENT ----
const doc = new Document({
  numbering: { config: numberingConfig },
  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: "1F3864" },
        paragraph: { spacing: { before: 300, after: 200 }, outlineLevel: 0 }
      },
      {
        id: "Heading2", name: "Heading 2", basedOn: "Normal", next: "Normal", quickFormat: true,
        run: { size: 26, bold: true, font: "Arial", color: "2E74B5" },
        paragraph: { spacing: { before: 200, after: 120 }, outlineLevel: 1 }
      },
      {
        id: "Heading3", name: "Heading 3", basedOn: "Normal", next: "Normal", quickFormat: true,
        run: { size: 24, bold: true, font: "Arial", color: "203864" },
        paragraph: { spacing: { before: 160, after: 100 }, outlineLevel: 2 }
      }
    ]
  },
  sections: [
    {
      properties: {
        page: {
          margin: { top: 1080, bottom: 1080, left: 1080, right: 1080 }
        }
      },
      headers: {
        default: new Header({
          children: [
            new Paragraph({
              alignment: AlignmentType.RIGHT,
              children: [
                new TextRun({ text: "Biomedical Waste Management - Study Notes", size: 18, font: "Arial", color: "888888", italics: true })
              ],
              border: { bottom: { style: BorderStyle.SINGLE, size: 4, color: "CCCCCC" } }
            })
          ]
        })
      },
      footers: {
        default: new Footer({
          children: [
            new Paragraph({
              alignment: AlignmentType.CENTER,
              border: { top: { style: BorderStyle.SINGLE, size: 4, color: "CCCCCC" } },
              children: [
                new TextRun({ text: "Page ", size: 18, font: "Arial", color: "888888" }),
                new TextRun({ children: [PageNumber.CURRENT], size: 18, font: "Arial", color: "888888" }),
                new TextRun({ text: " of ", size: 18, font: "Arial", color: "888888" }),
                new TextRun({ children: [PageNumber.TOTAL_PAGES], size: 18, font: "Arial", color: "888888" })
              ]
            })
          ]
        })
      },
      children: [
        ...titlePage,
        ...section1,
        ...section2,
        ...section3,
        ...section4,
        ...section5,
        ...section6,
        ...section7,
        ...section8,
        ...section9,
        ...section10
      ]
    }
  ]
});

Packer.toBuffer(doc).then(buffer => {
  fs.writeFileSync("/home/daytona/workspace/bmw-notes/BMW_Management_Study_Notes.docx", buffer);
  console.log("SUCCESS: Document written.");
}).catch(err => {
  console.error("ERROR:", err);
  process.exit(1);
});
Running Command

cd /home/daytona/workspace/bmw-notes && node generate.js 2>&1

Running Command

python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/bmw-notes/BMW_Management_Study_Notes.docx 2>&1

Running Command

ls -lh /home/daytona/workspace/bmw-notes/BMW_Management_Study_Notes.docx && python3 -c "import zipfile; z=zipfile.ZipFile('/home/daytona/workspace/bmw-notes/BMW_Management_Study_Notes.docx'); print('Valid ZIP/DOCX. Files inside:'); print('\n'.join(z.namelist()[:10]))"

The document is valid and ready. Here's your download link:

BMW Management Study Notes

Word Document · DOCX


Here's what's included in the notes (10 sections, ~21 KB):
SectionContent
1. IntroductionDefinition, sources of BMW, why it matters
2. ClassificationIndia BMW Rules 2016 (4 categories) + WHO classification
3. Color CodingFull color-coded table: Yellow / Red / White / Blue
4. SegregationPrinciples, rules, special waste types
5. Storage & Transport48-hour rule, on-site/off-site transport, CBWTF
6. Treatment & DisposalIncineration, autoclaving, chemical, deep burial - with temps
7. Legal FrameworkBMW Rules 1998 vs 2016, CPCB/SPCB/CBWTF, penalties
8. Infection ControlStandard precautions, NSI protocol, spill management
9. Exam High-YieldMust-know numbers, quick associations, MCQ answers, mnemonics
10. Quick SummarySingle-page reference table
Formatting highlights: Color-coded tables, yellow callout boxes for exam tips, header/footer with page numbers, Arial font throughout for clean readability.
This is a shared conversation. Sign in to Orris to start your own chat.