Are u paid or free
Can u teach me basic to advance mbbs level as a child specialist doctor bcz i am pharmacist and writes its medicine for their disease as pediatric, by your preparation with notes chapter wise
Create a comprehensive Word (.docx) file for a pediatrics curriculum for a pharmacist. The file should be saved at /home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx Use the docx skill at /home/daytona/skills/docx/SKILL.md to create the file properly. The document should contain: TITLE: Pediatrics for Pharmacists - Complete MBBS-Level Course SUBTITLE: Chapter 1: Introduction to Pediatrics & Child Growth/Development FULL CONTENT TO INCLUDE: --- # FULL CURRICULUM OVERVIEW (All Chapters) Chapter 1: Introduction to Pediatrics & Age Groups Chapter 2: Growth & Development (Milestones) Chapter 3: Nutrition in Children (Breastfeeding, Weaning, Malnutrition) Chapter 4: Immunization & Vaccines Chapter 5: Neonatal Medicine (Newborn Care, Jaundice, Sepsis) Chapter 6: Respiratory Diseases (ARI, Pneumonia, Asthma, Croup) Chapter 7: Gastrointestinal Diseases (Diarrhea, Vomiting, GERD, Worm Infestations) Chapter 8: Fever & Febrile Illnesses (Malaria, Typhoid, Dengue) Chapter 9: Infectious Diseases (Measles, Chickenpox, Meningitis, TB) Chapter 10: Cardiovascular Diseases in Children (Congenital Heart Disease) Chapter 11: Hematological Disorders (Anemia, Thalassemia, Sickle Cell) Chapter 12: Neurological Disorders (Seizures, Cerebral Palsy, Meningitis) Chapter 13: Renal Diseases (UTI, Nephrotic Syndrome, Nephritic Syndrome) Chapter 14: Endocrine & Metabolic Disorders (Diabetes, Hypothyroidism) Chapter 15: Dermatological Conditions in Children Chapter 16: Pediatric Emergencies (Shock, Anaphylaxis, Status Asthmaticus) Chapter 17: Pediatric Pharmacology & Drug Dosing --- # CHAPTER 1: INTRODUCTION TO PEDIATRICS ## 1.1 What is Pediatrics? Pediatrics is the branch of medicine concerned with the health, development, diseases, and care of children from birth to 18 years of age. The word comes from Greek: "paidos" (child) + "iatros" (physician). As a pharmacist working in pediatrics, you must understand: - Differences between children and adults (NOT just small adults) - Age-based drug dosing - Special physiological considerations - Growth and developmental milestones --- ## 1.2 Age Groups in Pediatrics | Age Group | Age Range | Key Features | |-----------|-----------|--------------| | Neonate / Newborn | 0–28 days | Most vulnerable; immature organ systems | | Infant | 1–12 months | Rapid growth; breastfeeding period | | Toddler | 1–3 years | Motor development; weaning | | Preschool Child | 3–6 years | Language development; vaccine boosters | | School-age Child | 6–12 years | Cognitive development | | Adolescent | 12–18 years | Puberty; adult-like physiology begins | Important note: Neonatal period (first 28 days) is the highest-risk period for mortality. --- ## 1.3 Why Children Are NOT Small Adults - Key Physiological Differences ### A. Body Composition - Higher percentage of total body water (TBW) in neonates (~75%) vs adults (~60%) - This affects VOLUME OF DISTRIBUTION of water-soluble drugs - Less body fat in neonates → affects fat-soluble drug distribution ### B. Liver & Drug Metabolism - Liver enzymes (CYP450 system) are immature at birth - CYP3A4 reaches adult levels by age 6 months - CYP1A2 reaches adult levels by age 1 year - RESULT: Some drugs have prolonged half-lives in neonates (e.g., morphine, phenobarbital) - EXCEPTION: Some drugs are metabolized FASTER in children ages 2-6 (e.g., theophylline) ### C. Renal Function - GFR at birth = ~20 mL/min/1.73m² (adult = 120 mL/min/1.73m²) - Reaches adult levels by age 1-2 years - RESULT: Renally cleared drugs (aminoglycosides, vancomycin) need dose adjustment in neonates ### D. Protein Binding - Lower albumin levels in neonates - Higher free fraction of highly protein-bound drugs (e.g., phenytoin, warfarin) - Risk of toxicity even at "normal" doses ### E. Gastric Absorption - Gastric pH in neonates is HIGH (alkaline, ~6-8) → affects oral drug absorption - Gastric emptying is slower in neonates - Penicillin G has better absorption in neonates due to high gastric pH --- ## 1.4 Vital Signs by Age Group | Age | Heart Rate (bpm) | Respiratory Rate (/min) | Systolic BP (mmHg) | |-----|-----------------|------------------------|-------------------| | Neonate (0-28d) | 100-160 | 40-60 | 60-90 | | Infant (1-12m) | 100-150 | 30-50 | 70-100 | | Toddler (1-3y) | 90-140 | 24-40 | 80-110 | | Preschool (3-6y) | 80-120 | 22-34 | 85-115 | | School-age (6-12y) | 70-110 | 18-30 | 90-120 | | Adolescent (12-18y) | 60-100 | 12-16 | 100-130 | MEMORY TIP: Heart rate and respiratory rate DECREASE with age; blood pressure INCREASES with age. --- ## 1.5 Pediatric Drug Dosing Formulas (Pharmacist Essential) ### Weight-Based Dosing (Most Common) Dose = mg/kg/day (or mg/kg/dose) Example: Amoxicillin 40 mg/kg/day in 3 divided doses for a 15 kg child = 600 mg/day = 200 mg per dose (TID) ### Clark's Rule (Weight-based) Child dose = (Weight in kg / 70) × Adult dose ### Young's Rule (Age-based, for children >2 years) Child dose = [Age / (Age + 12)] × Adult dose ### Fried's Rule (for infants <1 year) Child dose = [Age in months / 150] × Adult dose ### Body Surface Area (BSA) Method (Most accurate - used for chemotherapy) Child dose = (BSA of child / 1.73 m²) × Adult dose BSA (m²) = √[(Height in cm × Weight in kg) / 3600] --- ## 1.6 Common Routes of Drug Administration in Pediatrics | Route | Considerations | |-------|---------------| | Oral (PO) | Preferred; syrups/suspensions for young children; check if food affects absorption | | IV (Intravenous) | For emergencies; fast-acting; dilution critical | | IM (Intramuscular) | Vaccines; painful; limited sites in infants | | Rectal (PR) | For vomiting children; diazepam rectal for seizures; paracetamol suppositories | | Inhalation | Asthma drugs (salbutamol, budesonide); spacer device needed in young children | | Topical | Limited use; absorption higher in children due to thinner skin | | Nasogastric (NG) | For critically ill; neonates who cannot feed orally | --- ## 1.7 Normal Weight & Height for Age (Reference Values) ### Weight Estimation Formulas: - Neonate at birth: ~3.0–3.5 kg (doubles by 5 months, triples by 1 year) - Age 1 year: ~10 kg - Age 1-6 years: Weight (kg) = Age (years) × 2 + 8 - Age 7-12 years: Weight (kg) = Age (years) × 3 + 3 ### Height Estimation: - Birth: ~50 cm - 1 year: ~75 cm - 2 years: ~87 cm - After 2 years: +6 cm per year ### Head Circumference (Brain growth indicator): - Birth: ~34 cm - 6 months: ~43 cm - 1 year: ~46 cm - 2 years: ~48 cm - Adult: ~54-57 cm --- ## 1.8 Pediatric Emergencies - First Response (Introduction) The C-A-B approach (Compressions → Airway → Breathing) is used in pediatric resuscitation: - Pulseless or HR <60 bpm with poor perfusion → Start CPR immediately - Chest compression rate: 100-120/min - Compression depth: At least 1/3 of anteroposterior chest diameter - Infant: 2 fingers or 2-thumb encircling technique - Child: 1 or 2 hands ### Key Emergency Drugs (memorize these): | Drug | Dose | Indication | |------|------|-----------| | Epinephrine (Adrenaline) | 0.01 mg/kg IV/IO (1:10,000) | Cardiac arrest, anaphylaxis | | Atropine | 0.02 mg/kg IV (min 0.1 mg) | Bradycardia | | Adenosine | 0.1 mg/kg IV rapid push | SVT (supraventricular tachycardia) | | Glucose (Dextrose 10%) | 2 mL/kg IV | Hypoglycemia | | Normal Saline (NS) | 20 mL/kg IV bolus | Shock/hypovolemia | --- ## 1.9 Summary & Key Points for Pharmacists 1. Pediatrics covers newborn (0 days) to adolescent (18 years) 2. Neonates have immature liver, kidney, and enzyme systems → drug doses must be LOWER per kg 3. Children ages 2-6 may metabolize some drugs FASTER than adults 4. Always use WEIGHT-BASED dosing; confirm weight before dispensing 5. Know common formulas: Clark's, Young's, Fried's, BSA 6. Age-appropriate formulations matter (no aspirin in children <12 years due to Reye's syndrome!) 7. Monitor vital signs vs. age-appropriate normals 8. Reconstitution of oral suspensions: always follow manufacturer instructions; check expiry after reconstitution --- ## 1.10 Important Drug Safety Alerts in Pediatrics | Drug | Why Avoided in Children | Age Limit | |------|------------------------|-----------| | Aspirin | Reye's syndrome (fatal liver+brain damage) | Avoid <12 years | | Fluoroquinolones (Ciprofloxacin) | Cartilage damage (arthropathy) | Avoid <18 years (except specific infections) | | Tetracyclines (Doxycycline) | Tooth discoloration, bone growth inhibition | Avoid <8 years | | Codeine | Fatal respiratory depression (ultra-rapid metabolizers) | Avoid <12 years | | Chloramphenicol | Gray baby syndrome (cardiovascular collapse) | Avoid in neonates | | Metoclopramide | Extrapyramidal side effects | Use with caution <1 year | | Benzyl alcohol (preservative) | Gasping syndrome in neonates | Avoid in neonates | --- ## Practice Questions (Self-Assessment) Q1. A 20 kg child needs amoxicillin 40 mg/kg/day in 3 divided doses. What is the dose per administration? Answer: 40 × 20 = 800 mg/day ÷ 3 = ~267 mg per dose (round to 250 mg or 500 mg available tablet) Q2. Which drug is absolutely contraindicated in children under 12 years due to Reye's syndrome? Answer: Aspirin (Acetylsalicylic acid) Q3. Why does chloramphenicol cause "Gray baby syndrome" in neonates? Answer: Neonates lack glucuronyl transferase enzyme → cannot conjugate chloramphenicol → toxic accumulation Q4. A neonate has bradycardia (HR 50 bpm) with poor perfusion. What is the immediate action? Answer: Start CPR immediately (compressions at 100-120/min) Q5. What is the estimated weight of a 4-year-old child using the formula? Answer: (4 × 2) + 8 = 16 kg --- ## References - The Harriet Lane Handbook, 23rd Edition, Johns Hopkins Hospital - Red Book 2021, AAP Committee on Infectious Diseases - WHO Child Growth Standards - Nelson Textbook of Pediatrics NEXT: Chapter 2 - Growth & Development (Developmental Milestones) --- Please create a well-formatted Word document with: - Cover page with title - Table of contents - All chapters/sections properly formatted with headings (Heading 1, 2, 3) - Tables formatted properly - Professional medical document styling - Save to: /home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx Return the full file path of the created file.
/home/daytona/skills/docx
/home/daytona/workspace
mkdir -p /home/daytona/workspace/pediatrics-notes
~/pediatrics-notes/generate_chapter1.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
Header, Footer, AlignmentType, LevelFormat, HeadingLevel,
BorderStyle, WidthType, ShadingType, VerticalAlign,
PageNumber, PageBreak, TableOfContents
} = require('docx');
const fs = require('fs');
// ─── Color palette ────────────────────────────────────────────────────────────
const COLOR = {
DARK_BLUE: "1F3864",
MED_BLUE: "2E75B6",
LIGHT_BLUE: "D6E4F0",
HEADER_BG: "2E75B6",
HEADER_FG: "FFFFFF",
ALT_ROW: "EBF3FB",
WHITE: "FFFFFF",
ALERT_RED: "C0392B",
ALERT_BG: "FDEDEC",
TIP_GREEN: "1E8449",
TIP_BG: "EAFAF1",
GRAY_TEXT: "555555",
BORDER: "BBBBBB",
};
// ─── Reusable border helpers ─────────────────────────────────────────────────
const thinBorder = (color = COLOR.BORDER) => ({
style: BorderStyle.SINGLE, size: 4, color
});
const cellBorders = (color = COLOR.BORDER) => ({
top: thinBorder(color),
bottom: thinBorder(color),
left: thinBorder(color),
right: thinBorder(color),
});
const headerCellBorders = () => ({
top: thinBorder(COLOR.MED_BLUE),
bottom: thinBorder(COLOR.MED_BLUE),
left: thinBorder(COLOR.MED_BLUE),
right: thinBorder(COLOR.MED_BLUE),
});
// ─── Cell factory ─────────────────────────────────────────────────────────────
function makeCell(text, width, opts = {}) {
const {
bold = false,
isHeader = false,
color = isHeader ? COLOR.HEADER_BG : COLOR.WHITE,
textColor = isHeader ? COLOR.HEADER_FG : "000000",
fontSize = 20,
borders = isHeader ? headerCellBorders() : cellBorders(),
vAlign = VerticalAlign.CENTER,
} = opts;
return new TableCell({
borders,
width: { size: width, type: WidthType.DXA },
shading: { fill: color, type: ShadingType.CLEAR },
margins: { top: 80, bottom: 80, left: 150, right: 150 },
verticalAlign: vAlign,
children: [new Paragraph({
alignment: AlignmentType.LEFT,
children: [new TextRun({
text,
bold: bold || isHeader,
font: "Arial",
size: fontSize,
color: textColor,
})]
})]
});
}
// ─── Paragraph helpers ────────────────────────────────────────────────────────
function para(text, opts = {}) {
const { bold = false, italic = false, color = "000000", size = 22,
spacing = { before: 80, after: 80 }, align = AlignmentType.LEFT } = opts;
return new Paragraph({
alignment: align,
spacing,
children: [new TextRun({ text, bold, italic, color, font: "Arial", size })]
});
}
function heading1(text) {
return new Paragraph({
heading: HeadingLevel.HEADING_1,
children: [new TextRun({ text, font: "Arial", bold: true, size: 36, color: COLOR.DARK_BLUE })]
});
}
function heading2(text) {
return new Paragraph({
heading: HeadingLevel.HEADING_2,
children: [new TextRun({ text, font: "Arial", bold: true, size: 28, color: COLOR.MED_BLUE })]
});
}
function heading3(text) {
return new Paragraph({
heading: HeadingLevel.HEADING_3,
children: [new TextRun({ text, font: "Arial", bold: true, size: 24, color: COLOR.DARK_BLUE })]
});
}
function spacer(lines = 1) {
return Array.from({ length: lines }, () => new Paragraph({
children: [new TextRun("")],
spacing: { before: 0, after: 0 }
}));
}
function bullet(text, opts = {}) {
return new Paragraph({
numbering: { reference: "bullets", level: 0 },
spacing: { before: 40, after: 40 },
children: [new TextRun({ text, font: "Arial", size: 22, ...opts })]
});
}
function numbered(text, opts = {}) {
return new Paragraph({
numbering: { reference: "numbers", level: 0 },
spacing: { before: 40, after: 40 },
children: [new TextRun({ text, font: "Arial", size: 22, ...opts })]
});
}
function mixedPara(runs, opts = {}) {
const { spacing = { before: 80, after: 80 }, align = AlignmentType.LEFT } = opts;
return new Paragraph({ alignment: align, spacing, children: runs });
}
function tr(run, txt) {
return new TextRun({ text: txt, font: "Arial", size: 22, ...run });
}
// ─── Note/alert box using a border paragraph ─────────────────────────────────
function noteParagraph(text, type = "tip") {
const bgColor = type === "alert" ? COLOR.ALERT_BG : COLOR.TIP_BG;
const textColor = type === "alert" ? COLOR.ALERT_RED : COLOR.TIP_GREEN;
const prefix = type === "alert" ? "ALERT: " : "TIP: ";
return new Paragraph({
spacing: { before: 120, after: 120 },
border: {
top: { style: BorderStyle.SINGLE, size: 6, color: textColor },
bottom: { style: BorderStyle.SINGLE, size: 6, color: textColor },
left: { style: BorderStyle.THICK, size: 18, color: textColor },
right: { style: BorderStyle.SINGLE, size: 6, color: textColor },
},
shading: { fill: bgColor, type: ShadingType.CLEAR },
indent: { left: 240, right: 240 },
children: [
new TextRun({ text: prefix, bold: true, font: "Arial", size: 22, color: textColor }),
new TextRun({ text, font: "Arial", size: 22, color: "000000" })
]
});
}
// ─── Divider line ─────────────────────────────────────────────────────────────
function divider() {
return new Paragraph({
spacing: { before: 120, after: 120 },
border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: COLOR.MED_BLUE, space: 1 } },
children: [new TextRun("")]
});
}
// ─── Page break ──────────────────────────────────────────────────────────────
function pageBreak() {
return new Paragraph({ children: [new PageBreak()] });
}
// ─────────────────────────────────────────────────────────────────────────────
// COVER PAGE
// ─────────────────────────────────────────────────────────────────────────────
function buildCoverPage() {
return [
...spacer(4),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 200 },
children: [new TextRun({
text: "PEDIATRICS FOR PHARMACISTS",
font: "Arial", size: 56, bold: true, color: COLOR.DARK_BLUE
})]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 160 },
children: [new TextRun({
text: "Complete MBBS-Level Course",
font: "Arial", size: 36, bold: false, color: COLOR.MED_BLUE
})]
}),
divider(),
...spacer(1),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 120, after: 120 },
children: [new TextRun({
text: "CHAPTER 1",
font: "Arial", size: 32, bold: true, color: COLOR.MED_BLUE
})]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 200 },
children: [new TextRun({
text: "Introduction to Pediatrics & Child Growth / Development",
font: "Arial", size: 28, bold: false, color: COLOR.DARK_BLUE
})]
}),
...spacer(3),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 80, after: 80 },
children: [new TextRun({
text: "Pharmacist Training Series | MBBS-Level Curriculum",
font: "Arial", size: 22, italic: true, color: COLOR.GRAY_TEXT
})]
}),
...spacer(2),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 80, after: 80 },
children: [new TextRun({
text: "Reference Sources: The Harriet Lane Handbook 23rd Ed | Nelson Textbook of Pediatrics | WHO Child Growth Standards",
font: "Arial", size: 18, italic: true, color: COLOR.GRAY_TEXT
})]
}),
pageBreak()
];
}
// ─────────────────────────────────────────────────────────────────────────────
// CURRICULUM OVERVIEW
// ─────────────────────────────────────────────────────────────────────────────
function buildCurriculumOverview() {
const chapters = [
["1", "Introduction to Pediatrics & Age Groups"],
["2", "Growth & Development (Milestones)"],
["3", "Nutrition in Children (Breastfeeding, Weaning, Malnutrition)"],
["4", "Immunization & Vaccines"],
["5", "Neonatal Medicine (Newborn Care, Jaundice, Sepsis)"],
["6", "Respiratory Diseases (ARI, Pneumonia, Asthma, Croup)"],
["7", "Gastrointestinal Diseases (Diarrhea, Vomiting, GERD, Worm Infestations)"],
["8", "Fever & Febrile Illnesses (Malaria, Typhoid, Dengue)"],
["9", "Infectious Diseases (Measles, Chickenpox, Meningitis, TB)"],
["10", "Cardiovascular Diseases in Children (Congenital Heart Disease)"],
["11", "Hematological Disorders (Anemia, Thalassemia, Sickle Cell)"],
["12", "Neurological Disorders (Seizures, Cerebral Palsy, Meningitis)"],
["13", "Renal Diseases (UTI, Nephrotic Syndrome, Nephritic Syndrome)"],
["14", "Endocrine & Metabolic Disorders (Diabetes, Hypothyroidism)"],
["15", "Dermatological Conditions in Children"],
["16", "Pediatric Emergencies (Shock, Anaphylaxis, Status Asthmaticus)"],
["17", "Pediatric Pharmacology & Drug Dosing"],
];
const tableWidth = 9360;
const col1 = 900, col2 = 8460;
const headerRow = new TableRow({
tableHeader: true,
children: [
makeCell("Ch.", col1, { isHeader: true }),
makeCell("Chapter Title", col2, { isHeader: true }),
]
});
const dataRows = chapters.map(([ch, title], i) => new TableRow({
children: [
makeCell(ch, col1, {
color: i % 2 === 0 ? COLOR.WHITE : COLOR.ALT_ROW,
bold: true,
textColor: COLOR.MED_BLUE
}),
makeCell(title, col2, {
color: i % 2 === 0 ? COLOR.WHITE : COLOR.ALT_ROW,
bold: ch === "1"
}),
]
}));
return [
heading1("Full Curriculum Overview – All 17 Chapters"),
...spacer(1),
para("This course covers the complete spectrum of pediatric medicine as applicable to pharmacists. Each chapter builds on the previous, progressing from foundational concepts to complex disease management.", { spacing: { before: 80, after: 160 } }),
new Table({
width: { size: tableWidth, type: WidthType.DXA },
columnWidths: [col1, col2],
rows: [headerRow, ...dataRows]
}),
...spacer(1),
pageBreak()
];
}
// ─────────────────────────────────────────────────────────────────────────────
// CHAPTER 1 BODY
// ─────────────────────────────────────────────────────────────────────────────
// 1.1 What is Pediatrics?
function section1_1() {
return [
heading2("1.1 What Is Pediatrics?"),
para("Pediatrics is the branch of medicine concerned with the health, development, diseases, and care of children from birth to 18 years of age. The word comes from Greek: \"paidos\" (child) + \"iatros\" (physician).", { spacing: { before: 80, after: 120 } }),
para("As a pharmacist working in pediatrics, you must understand:", { bold: true, spacing: { before: 80, after: 80 } }),
bullet("Differences between children and adults (children are NOT just small adults)"),
bullet("Age-based drug dosing"),
bullet("Special physiological considerations"),
bullet("Growth and developmental milestones"),
...spacer(1),
];
}
// 1.2 Age Groups
function section1_2() {
const tableWidth = 9360;
const cols = [2100, 2100, 5160];
const header = new TableRow({
tableHeader: true,
children: [
makeCell("Age Group", cols[0], { isHeader: true }),
makeCell("Age Range", cols[1], { isHeader: true }),
makeCell("Key Features", cols[2], { isHeader: true }),
]
});
const data = [
["Neonate / Newborn", "0–28 days", "Most vulnerable; immature organ systems"],
["Infant", "1–12 months", "Rapid growth; breastfeeding period"],
["Toddler", "1–3 years", "Motor development; weaning period"],
["Preschool Child", "3–6 years", "Language development; vaccine boosters"],
["School-age Child", "6–12 years", "Cognitive development; increasing independence"],
["Adolescent", "12–18 years", "Puberty; adult-like physiology begins"],
];
const rows = data.map(([grp, range, feat], i) => new TableRow({
children: [
makeCell(grp, cols[0], { color: i % 2 === 0 ? COLOR.WHITE : COLOR.ALT_ROW, bold: true }),
makeCell(range, cols[1], { color: i % 2 === 0 ? COLOR.WHITE : COLOR.ALT_ROW }),
makeCell(feat, cols[2], { color: i % 2 === 0 ? COLOR.WHITE : COLOR.ALT_ROW }),
]
}));
return [
heading2("1.2 Age Groups in Pediatrics"),
...spacer(1),
new Table({ width: { size: tableWidth, type: WidthType.DXA }, columnWidths: cols, rows: [header, ...rows] }),
...spacer(1),
noteParagraph("Neonatal period (first 28 days) is the highest-risk period for childhood mortality. Particular care is required for drug dosing in neonates.", "alert"),
...spacer(1),
];
}
// 1.3 Why Children Are NOT Small Adults
function section1_3() {
return [
heading2("1.3 Why Children Are NOT Small Adults – Key Physiological Differences"),
para("Children differ from adults in every pharmacokinetic parameter. Understanding these differences is essential for safe drug prescribing and dispensing.", { spacing: { before: 80, after: 120 } }),
heading3("A. Body Composition"),
bullet("Higher percentage of total body water (TBW) in neonates (~75%) vs. adults (~60%)"),
bullet("This affects the VOLUME OF DISTRIBUTION (Vd) of water-soluble drugs"),
bullet("Less body fat in neonates → affects fat-soluble drug distribution"),
...spacer(1),
heading3("B. Liver & Drug Metabolism"),
bullet("Liver enzymes (CYP450 system) are immature at birth"),
bullet("CYP3A4 reaches adult levels by approximately 6 months of age"),
bullet("CYP1A2 reaches adult levels by approximately 1 year of age"),
mixedPara([
tr({ bold: true }, "RESULT: "),
tr({}, "Some drugs have prolonged half-lives in neonates (e.g., morphine, phenobarbital)"),
], { spacing: { before: 60, after: 60 } }),
mixedPara([
tr({ bold: true }, "EXCEPTION: "),
tr({}, "Some drugs are metabolized FASTER in children aged 2–6 years (e.g., theophylline)"),
], { spacing: { before: 60, after: 80 } }),
...spacer(1),
heading3("C. Renal Function"),
bullet("GFR at birth = ~20 mL/min/1.73 m\u00B2 (adult value = 120 mL/min/1.73 m\u00B2)"),
bullet("Reaches adult levels by age 1–2 years"),
mixedPara([
tr({ bold: true }, "RESULT: "),
tr({}, "Renally cleared drugs (aminoglycosides, vancomycin) require dose adjustment in neonates"),
], { spacing: { before: 60, after: 80 } }),
...spacer(1),
heading3("D. Protein Binding"),
bullet("Lower albumin levels in neonates → higher free (unbound) fraction of highly protein-bound drugs"),
bullet("Examples: phenytoin, warfarin – risk of toxicity even at \"normal\" doses"),
...spacer(1),
heading3("E. Gastric Absorption"),
bullet("Gastric pH in neonates is HIGH (alkaline, ~6–8), which affects oral drug absorption"),
bullet("Gastric emptying is slower in neonates"),
bullet("Penicillin G has better bioavailability in neonates due to high gastric pH"),
...spacer(1),
];
}
// 1.4 Vital Signs
function section1_4() {
const tableWidth = 9360;
const cols = [1600, 1600, 2160, 2160, 1840];
const header = new TableRow({
tableHeader: true,
children: [
makeCell("Age Group", cols[0], { isHeader: true }),
makeCell("Heart Rate (bpm)", cols[1], { isHeader: true }),
makeCell("Respiratory Rate (/min)",cols[2], { isHeader: true }),
makeCell("Systolic BP (mmHg)", cols[3], { isHeader: true }),
makeCell("", cols[4], { isHeader: true }), // spacer for even col distribution
]
});
// re-define cols to 4 since we'll drop the last
const cols4 = [1800, 1800, 2800, 2960];
const header4 = new TableRow({
tableHeader: true,
children: [
makeCell("Age Group", cols4[0], { isHeader: true }),
makeCell("Heart Rate (bpm)", cols4[1], { isHeader: true }),
makeCell("Resp. Rate (/min)", cols4[2], { isHeader: true }),
makeCell("Systolic BP (mmHg)", cols4[3], { isHeader: true }),
]
});
const vitalData = [
["Neonate (0–28 d)", "100–160", "40–60", "60–90"],
["Infant (1–12 m)", "100–150", "30–50", "70–100"],
["Toddler (1–3 y)", "90–140", "24–40", "80–110"],
["Preschool (3–6 y)", "80–120", "22–34", "85–115"],
["School-age (6–12 y)","70–110", "18–30", "90–120"],
["Adolescent (12–18 y)","60–100", "12–16", "100–130"],
];
const vitalRows = vitalData.map(([age, hr, rr, bp], i) => new TableRow({
children: cols4.map((w, ci) => makeCell([age, hr, rr, bp][ci], w, {
color: i % 2 === 0 ? COLOR.WHITE : COLOR.ALT_ROW,
bold: ci === 0
}))
}));
return [
heading2("1.4 Vital Signs by Age Group"),
...spacer(1),
new Table({ width: { size: 9360, type: WidthType.DXA }, columnWidths: cols4, rows: [header4, ...vitalRows] }),
...spacer(1),
noteParagraph("MEMORY TIP: Heart rate and respiratory rate DECREASE with age; blood pressure INCREASES with age.", "tip"),
...spacer(1),
];
}
// 1.5 Drug Dosing Formulas
function section1_5() {
return [
heading2("1.5 Pediatric Drug Dosing Formulas (Pharmacist Essential)"),
...spacer(1),
heading3("Weight-Based Dosing (Most Common)"),
para("Dose = mg/kg/day OR mg/kg/dose", { bold: true }),
para("Example: Amoxicillin 40 mg/kg/day in 3 divided doses for a 15 kg child:", { spacing: { before: 60, after: 40 } }),
bullet("Total daily dose = 40 \u00D7 15 = 600 mg/day"),
bullet("Per dose (TID) = 600 \u00F7 3 = 200 mg per dose"),
...spacer(1),
heading3("Clark's Rule (Weight-Based)"),
new Paragraph({
spacing: { before: 60, after: 100 },
children: [new TextRun({ text: "Child dose = (Weight in kg \u00F7 70) \u00D7 Adult dose", font: "Arial", size: 22, bold: true, color: COLOR.DARK_BLUE })]
}),
...spacer(1),
heading3("Young's Rule (Age-Based, for children > 2 years)"),
new Paragraph({
spacing: { before: 60, after: 100 },
children: [new TextRun({ text: "Child dose = [Age \u00F7 (Age + 12)] \u00D7 Adult dose", font: "Arial", size: 22, bold: true, color: COLOR.DARK_BLUE })]
}),
...spacer(1),
heading3("Fried's Rule (for infants < 1 year)"),
new Paragraph({
spacing: { before: 60, after: 100 },
children: [new TextRun({ text: "Child dose = [Age in months \u00F7 150] \u00D7 Adult dose", font: "Arial", size: 22, bold: true, color: COLOR.DARK_BLUE })]
}),
...spacer(1),
heading3("Body Surface Area (BSA) Method – Most Accurate"),
para("Used primarily for chemotherapy agents and drugs with a narrow therapeutic index.", { spacing: { before: 40, after: 80 } }),
new Paragraph({
spacing: { before: 60, after: 60 },
children: [new TextRun({ text: "Child dose = (BSA of child \u00F7 1.73 m\u00B2) \u00D7 Adult dose", font: "Arial", size: 22, bold: true, color: COLOR.DARK_BLUE })]
}),
new Paragraph({
spacing: { before: 40, after: 100 },
children: [new TextRun({ text: "BSA (m\u00B2) = \u221A[(Height in cm \u00D7 Weight in kg) \u00F7 3600]", font: "Arial", size: 22, bold: true, color: COLOR.DARK_BLUE })]
}),
noteParagraph("Weight-based dosing (mg/kg) is the most commonly used method in clinical practice. Always verify the child's current weight before dispensing.", "tip"),
...spacer(1),
];
}
// 1.6 Routes of Administration
function section1_6() {
const tableWidth = 9360;
const cols = [1800, 7560];
const header = new TableRow({
tableHeader: true,
children: [
makeCell("Route", cols[0], { isHeader: true }),
makeCell("Key Considerations", cols[1], { isHeader: true }),
]
});
const routeData = [
["Oral (PO)", "Preferred route; syrups/suspensions for young children; always check if food affects absorption"],
["IV (Intravenous)", "For emergencies; fast-acting; dilution and rate of infusion are critical"],
["IM (Intramuscular)", "Used for vaccines; painful; limited injection sites in infants"],
["Rectal (PR)", "For vomiting children; diazepam rectal gel for acute seizures; paracetamol suppositories"],
["Inhalation", "For asthma drugs (salbutamol, budesonide); spacer device required in young children and infants"],
["Topical", "Limited routine use; absorption is higher in children due to thinner stratum corneum"],
["Nasogastric (NG)", "For critically ill neonates who cannot feed or take oral medication"],
];
const routeRows = routeData.map(([route, note], i) => new TableRow({
children: [
makeCell(route, cols[0], { color: i % 2 === 0 ? COLOR.WHITE : COLOR.ALT_ROW, bold: true }),
makeCell(note, cols[1], { color: i % 2 === 0 ? COLOR.WHITE : COLOR.ALT_ROW }),
]
}));
return [
heading2("1.6 Common Routes of Drug Administration in Pediatrics"),
...spacer(1),
new Table({ width: { size: tableWidth, type: WidthType.DXA }, columnWidths: cols, rows: [header, ...routeRows] }),
...spacer(1),
];
}
// 1.7 Normal Weight & Height
function section1_7() {
return [
heading2("1.7 Normal Weight & Height for Age (Reference Values)"),
...spacer(1),
heading3("Weight Estimation Formulas"),
bullet("Neonate at birth: ~3.0–3.5 kg (doubles by 5 months; triples by 1 year)"),
bullet("Age 1 year: approximately 10 kg"),
mixedPara([
tr({ bold: true }, "Age 1–6 years: "),
tr({ bold: false }, "Weight (kg) = Age (years) \u00D7 2 + 8"),
], { spacing: { before: 40, after: 40 } }),
mixedPara([
tr({ bold: true }, "Age 7–12 years: "),
tr({ bold: false }, "Weight (kg) = Age (years) \u00D7 3 + 3"),
], { spacing: { before: 40, after: 80 } }),
...spacer(1),
heading3("Height Estimation"),
bullet("Birth: ~50 cm"),
bullet("1 year: ~75 cm"),
bullet("2 years: ~87 cm"),
bullet("After 2 years: +6 cm per year"),
...spacer(1),
heading3("Head Circumference (Brain Growth Indicator)"),
bullet("Birth: ~34 cm"),
bullet("6 months: ~43 cm"),
bullet("1 year: ~46 cm"),
bullet("2 years: ~48 cm"),
bullet("Adult: ~54–57 cm"),
noteParagraph("Head circumference is a critical screening tool. Macrocephaly (>2 SD above mean) may indicate hydrocephalus; microcephaly (<2 SD below mean) may indicate brain growth restriction.", "alert"),
...spacer(1),
];
}
// 1.8 Pediatric Emergencies
function section1_8() {
const tableWidth = 9360;
const cols = [2200, 3260, 3900];
const header = new TableRow({
tableHeader: true,
children: [
makeCell("Drug", cols[0], { isHeader: true }),
makeCell("Dose", cols[1], { isHeader: true }),
makeCell("Indication", cols[2], { isHeader: true }),
]
});
const emergencyDrugs = [
["Epinephrine (Adrenaline)", "0.01 mg/kg IV/IO (1:10,000 solution)", "Cardiac arrest, anaphylaxis"],
["Atropine", "0.02 mg/kg IV (minimum 0.1 mg)", "Symptomatic bradycardia"],
["Adenosine", "0.1 mg/kg IV rapid push (max 6 mg)", "SVT (supraventricular tachycardia)"],
["Glucose (Dextrose 10%)", "2 mL/kg IV", "Hypoglycemia"],
["Normal Saline (0.9% NS)", "20 mL/kg IV bolus", "Shock / hypovolemia"],
];
const drugRows = emergencyDrugs.map(([drug, dose, ind], i) => new TableRow({
children: [
makeCell(drug, cols[0], { color: i % 2 === 0 ? COLOR.WHITE : COLOR.ALT_ROW, bold: true }),
makeCell(dose, cols[1], { color: i % 2 === 0 ? COLOR.WHITE : COLOR.ALT_ROW }),
makeCell(ind, cols[2], { color: i % 2 === 0 ? COLOR.WHITE : COLOR.ALT_ROW }),
]
}));
return [
heading2("1.8 Pediatric Emergencies – First Response (Introduction)"),
...spacer(1),
para("The C-A-B approach (Compressions → Airway → Breathing) is used in pediatric basic life support:", { bold: true, spacing: { before: 80, after: 80 } }),
bullet("If pulseless OR HR <60 bpm with poor perfusion → Start CPR immediately"),
bullet("Chest compression rate: 100–120 per minute"),
bullet("Compression depth: At least 1/3 of anteroposterior chest diameter"),
bullet("Infant technique: 2 fingers OR 2-thumb encircling technique"),
bullet("Child technique: 1 or 2 hands"),
...spacer(1),
heading3("Key Emergency Drugs (Memorize These)"),
...spacer(1),
new Table({ width: { size: tableWidth, type: WidthType.DXA }, columnWidths: cols, rows: [header, ...drugRows] }),
...spacer(1),
];
}
// 1.9 Summary
function section1_9() {
return [
heading2("1.9 Summary & Key Points for Pharmacists"),
...spacer(1),
numbered("Pediatrics covers newborns (0 days) through adolescents (18 years)"),
numbered("Neonates have immature liver, kidney, and enzyme systems → drug doses must be carefully calculated"),
numbered("Children aged 2–6 years may metabolize some drugs FASTER than adults (CYP induction)"),
numbered("Always use WEIGHT-BASED dosing; confirm actual weight before dispensing"),
numbered("Know the common dosing formulas: Clark's, Young's, Fried's, and BSA method"),
numbered("Age-appropriate formulations are critical (no aspirin in children <12 years due to Reye's syndrome)"),
numbered("Monitor vital signs against age-appropriate reference ranges"),
numbered("For oral suspensions: follow manufacturer reconstitution instructions; note expiry after reconstitution"),
...spacer(1),
];
}
// 1.10 Drug Safety Alerts
function section1_10() {
const tableWidth = 9360;
const cols = [2200, 4760, 2400];
const header = new TableRow({
tableHeader: true,
children: [
makeCell("Drug", cols[0], { isHeader: true }),
makeCell("Reason Avoided", cols[1], { isHeader: true }),
makeCell("Age Restriction", cols[2], { isHeader: true }),
]
});
const alertData = [
["Aspirin", "Reye's syndrome: fatal liver and brain damage", "Avoid < 12 years"],
["Fluoroquinolones (Ciprofloxacin)","Cartilage damage (arthropathy) in growing joints", "Avoid < 18 years*"],
["Tetracyclines (Doxycycline)", "Tooth discoloration and bone growth inhibition", "Avoid < 8 years"],
["Codeine", "Fatal respiratory depression in ultra-rapid CYP2D6 metabolizers","Avoid < 12 years"],
["Chloramphenicol", "Gray baby syndrome: cardiovascular collapse due to enzyme immaturity","Avoid in neonates"],
["Metoclopramide", "Extrapyramidal side effects (dystonia, tardive dyskinesia)", "Caution < 1 year"],
["Benzyl alcohol (preservative)", "Gasping syndrome in neonates (metabolic acidosis, CNS depression)","Avoid in neonates"],
];
const alertRows = alertData.map(([drug, reason, age], i) => new TableRow({
children: [
makeCell(drug, cols[0], { color: i % 2 === 0 ? COLOR.WHITE : COLOR.ALERT_BG, bold: true, textColor: COLOR.ALERT_RED }),
makeCell(reason, cols[1], { color: i % 2 === 0 ? COLOR.WHITE : COLOR.ALERT_BG }),
makeCell(age, cols[2], { color: i % 2 === 0 ? COLOR.WHITE : COLOR.ALERT_BG, bold: true }),
]
}));
return [
heading2("1.10 Important Drug Safety Alerts in Pediatrics"),
noteParagraph("These contraindications are high-yield exam and clinical practice topics. Memorize each drug and its corresponding risk.", "alert"),
...spacer(1),
new Table({ width: { size: tableWidth, type: WidthType.DXA }, columnWidths: cols, rows: [header, ...alertRows] }),
para("* Fluoroquinolones may be used in children for specific indications (e.g., complicated UTI, anthrax exposure) when no safe alternative exists.", { italic: true, color: COLOR.GRAY_TEXT, spacing: { before: 80, after: 120 } }),
...spacer(1),
];
}
// Practice Questions
function buildPracticeQuestions() {
const qaData = [
{
q: "Q1. A 20 kg child requires amoxicillin 40 mg/kg/day in 3 divided doses. What is the dose per administration?",
a: "Total daily dose = 40 \u00D7 20 = 800 mg/day. Per dose = 800 \u00F7 3 \u2248 267 mg. Round to nearest available strength (250 mg or 500 mg tablet)."
},
{
q: "Q2. Which drug is absolutely contraindicated in children under 12 years due to Reye's syndrome?",
a: "Aspirin (Acetylsalicylic acid) – causes fatal hepatic and cerebral encephalopathy, especially following viral illnesses."
},
{
q: "Q3. Why does chloramphenicol cause 'Gray baby syndrome' in neonates?",
a: "Neonates lack sufficient glucuronyl transferase enzyme and cannot adequately conjugate (glucuronidate) chloramphenicol. This leads to toxic drug accumulation, causing cardiovascular collapse, ashen-grey skin colour, abdominal distension, and respiratory failure."
},
{
q: "Q4. A neonate has bradycardia (HR 50 bpm) with poor perfusion. What is the immediate action?",
a: "Start CPR immediately using the 2-thumb encircling technique at a rate of 100–120 compressions per minute. Call for emergency support."
},
{
q: "Q5. What is the estimated weight of a 4-year-old child using the standard formula?",
a: "Weight = (Age \u00D7 2) + 8 = (4 \u00D7 2) + 8 = 16 kg"
},
];
const items = [];
items.push(heading2("Practice Questions – Self-Assessment"));
items.push(...spacer(1));
qaData.forEach((qa, i) => {
items.push(new Paragraph({
spacing: { before: 120, after: 60 },
children: [new TextRun({ text: qa.q, font: "Arial", size: 22, bold: true, color: COLOR.DARK_BLUE })]
}));
items.push(new Paragraph({
spacing: { before: 40, after: 120 },
indent: { left: 360 },
children: [
new TextRun({ text: "Answer: ", font: "Arial", size: 22, bold: true, color: COLOR.TIP_GREEN }),
new TextRun({ text: qa.a, font: "Arial", size: 22, bold: false })
]
}));
});
items.push(...spacer(1));
return items;
}
// References
function buildReferences() {
const refs = [
"The Harriet Lane Handbook, 23rd Edition, Johns Hopkins Hospital",
"Red Book 2021, AAP Committee on Infectious Diseases",
"WHO Child Growth Standards – WHO Press, Geneva",
"Nelson Textbook of Pediatrics, 21st Edition – Kliegman et al.",
];
return [
heading2("References"),
...refs.map(r => bullet(r)),
...spacer(2),
];
}
// Next Chapter teaser
function buildNextChapter() {
return [
divider(),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 160, after: 80 },
children: [new TextRun({ text: "NEXT: Chapter 2 – Growth & Development (Developmental Milestones)", font: "Arial", size: 24, bold: true, color: COLOR.MED_BLUE })]
}),
];
}
// ─────────────────────────────────────────────────────────────────────────────
// ASSEMBLE DOCUMENT
// ─────────────────────────────────────────────────────────────────────────────
const allContent = [
// Cover
...buildCoverPage(),
// TOC section heading
heading1("Table of Contents"),
new TableOfContents("Table of Contents", { hyperlink: true, headingStyleRange: "1-3" }),
pageBreak(),
// Curriculum overview
...buildCurriculumOverview(),
// Chapter 1 main heading
heading1("Chapter 1: Introduction to Pediatrics"),
...spacer(1),
// Sections
...section1_1(),
divider(),
...section1_2(),
divider(),
...section1_3(),
divider(),
...section1_4(),
divider(),
...section1_5(),
divider(),
...section1_6(),
divider(),
...section1_7(),
divider(),
...section1_8(),
divider(),
...section1_9(),
divider(),
...section1_10(),
divider(),
...buildPracticeQuestions(),
divider(),
...buildReferences(),
...buildNextChapter(),
];
// ─────────────────────────────────────────────────────────────────────────────
// BUILD & SAVE
// ─────────────────────────────────────────────────────────────────────────────
const doc = new Document({
numbering: {
config: [
{
reference: "bullets",
levels: [{
level: 0,
format: LevelFormat.BULLET,
text: "\u2022",
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 } } }
}]
},
]
},
styles: {
default: {
document: { run: { font: "Arial", size: 22 } }
},
paragraphStyles: [
{
id: "Heading1", name: "Heading 1",
basedOn: "Normal", next: "Normal", quickFormat: true,
run: { size: 36, bold: true, font: "Arial", color: COLOR.DARK_BLUE },
paragraph: { spacing: { before: 360, after: 200 }, outlineLevel: 0,
border: { bottom: { style: BorderStyle.SINGLE, size: 8, color: COLOR.MED_BLUE, space: 4 } } }
},
{
id: "Heading2", name: "Heading 2",
basedOn: "Normal", next: "Normal", quickFormat: true,
run: { size: 28, bold: true, font: "Arial", color: COLOR.MED_BLUE },
paragraph: { spacing: { before: 280, after: 140 }, outlineLevel: 1 }
},
{
id: "Heading3", name: "Heading 3",
basedOn: "Normal", next: "Normal", quickFormat: true,
run: { size: 24, bold: true, font: "Arial", color: COLOR.DARK_BLUE },
paragraph: { spacing: { before: 200, after: 100 }, outlineLevel: 2 }
},
]
},
sections: [{
properties: {
page: {
size: { width: 12240, height: 15840 },
margin: { top: 1440, right: 1440, bottom: 1440, left: 1440 }
}
},
headers: {
default: new Header({
children: [new Paragraph({
spacing: { before: 0, after: 0 },
border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: COLOR.MED_BLUE, space: 4 } },
children: [
new TextRun({ text: "Pediatrics for Pharmacists – Complete MBBS-Level Course", font: "Arial", size: 18, color: COLOR.GRAY_TEXT }),
new TextRun({ text: " | Chapter 1: Introduction to Pediatrics", font: "Arial", size: 18, color: COLOR.MED_BLUE }),
]
})]
})
},
footers: {
default: new Footer({
children: [new Paragraph({
spacing: { before: 0, after: 0 },
border: { top: { style: BorderStyle.SINGLE, size: 4, color: COLOR.MED_BLUE, space: 4 } },
children: [
new TextRun({ text: "Pharmacist Pediatrics Training | Page ", font: "Arial", size: 18, color: COLOR.GRAY_TEXT }),
new TextRun({ children: [PageNumber.CURRENT], font: "Arial", size: 18, color: COLOR.MED_BLUE }),
new TextRun({ text: " | For educational use only", font: "Arial", size: 18, color: COLOR.GRAY_TEXT }),
]
})]
})
},
children: allContent
}]
});
const outputPath = "/home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx";
Packer.toBuffer(doc).then(buffer => {
fs.writeFileSync(outputPath, buffer);
console.log("SUCCESS: Document written to " + outputPath);
}).catch(err => {
console.error("ERROR:", err);
process.exit(1);
});
cd /home/daytona/workspace/pediatrics-notes && npm install docx 2>&1 | tail -5
npm list -g docx 2>/dev/null || echo "not installed globally"
node /home/daytona/workspace/pediatrics-notes/generate_chapter1.js
python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx
pip install lxml -q && python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx
~/pediatrics-notes/generate_chapter1.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/pediatrics-notes/generate_chapter1.js'
node /home/daytona/workspace/pediatrics-notes/generate_chapter1.js && python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx
python /home/daytona/skills/docx/scripts/office/unpack.py /home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx /tmp/peds_unpacked/
grep -n "w:left" /tmp/peds_unpacked/word/document.xml | head -20
sed -n '275,295p' /tmp/peds_unpacked/word/document.xml
python3 -c " import lxml.etree as ET import zipfile with zipfile.ZipFile('/home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx') as z: xml = z.read('word/document.xml') tree = ET.fromstring(xml) ns = 'http://schemas.openxmlformats.org/wordprocessingml/2006/main' # Find all w:left elements and their parent for el in tree.iter(f'{{{ns}}}left'): parent = el.getparent() grandparent = parent.getparent() if parent is not None else None print(f'Parent: {parent.tag.split(\"}\")[1] if parent is not None else None}, Grandparent: {grandparent.tag.split(\"}\")[1] if grandparent is not None else None}') " 2>&1 | head -30
python3 -c " import lxml.etree as ET import zipfile with zipfile.ZipFile('/home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx') as z: xml = z.read('word/document.xml') tree = ET.fromstring(xml) ns = 'http://schemas.openxmlformats.org/wordprocessingml/2006/main' # Find all w:left inside w:pBdr (paragraph borders) for el in tree.iter(f'{{{ns}}}left'): parent = el.getparent() if parent is not None and 'pBdr' in parent.tag: print('Found w:left in pBdr!') print(ET.tostring(parent, pretty_print=True).decode()) break # Find all w:pBdr count = sum(1 for _ in tree.iter(f'{{{ns}}}pBdr')) print(f'Total w:pBdr elements: {count}') " 2>&1
python3 -c " import lxml.etree as ET import zipfile, shutil, os ns = 'http://schemas.openxmlformats.org/wordprocessingml/2006/main' with zipfile.ZipFile('/home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx') as z: xml = z.read('word/document.xml') tree = ET.fromstring(xml) # In w:pBdr, rename w:left -> w:start and w:right -> w:end for pBdr in tree.iter(f'{{{ns}}}pBdr'): for child in pBdr: local = child.tag.split('}')[1] if '}' in child.tag else child.tag if local == 'left': child.tag = f'{{{ns}}}start' elif local == 'right': child.tag = f'{{{ns}}}end' # Write back new_xml = ET.tostring(tree, xml_declaration=True, encoding='UTF-8', standalone=True) # Rebuild zip src = '/home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx' tmp = src + '.tmp' with zipfile.ZipFile(src, 'r') as zin: with zipfile.ZipFile(tmp, 'w', compression=zipfile.ZIP_DEFLATED) as zout: for item in zin.infolist(): if item.filename == 'word/document.xml': zout.writestr(item, new_xml) else: zout.writestr(item, zin.read(item.filename)) os.replace(tmp, src) print('Done – pBdr left/right renamed to start/end') "
python3 << 'EOF' import lxml.etree as ET import zipfile, os, io ns = 'http://schemas.openxmlformats.org/wordprocessingml/2006/main' src = '/home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx' # Read docx into memory with open(src, 'rb') as f: docx_bytes = f.read() # Parse document.xml with zipfile.ZipFile(io.BytesIO(docx_bytes)) as z: xml = z.read('word/document.xml') all_files = {name: z.read(name) for name in z.namelist()} tree = ET.fromstring(xml) # In w:pBdr, rename w:left -> w:start and w:right -> w:end count = 0 for pBdr in tree.iter(f'{{{ns}}}pBdr'): for child in list(pBdr): local = child.tag.split('}')[1] if '}' in child.tag else child.tag if local == 'left': child.tag = f'{{{ns}}}start' count += 1 elif local == 'right': child.tag = f'{{{ns}}}end' count += 1 new_xml = ET.tostring(tree, xml_declaration=True, encoding='UTF-8', standalone=True) all_files['word/document.xml'] = new_xml # Write new docx out_buf = io.BytesIO() with zipfile.ZipFile(out_buf, 'w', compression=zipfile.ZIP_DEFLATED) as zout: for name, data in all_files.items(): zout.writestr(name, data) with open(src, 'wb') as f: f.write(out_buf.getvalue()) print(f'Done – renamed {count} elements (left->start, right->end) in pBdr') EOF
python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx
python3 -c " from lxml import etree as ET import zipfile, io ns = 'http://schemas.openxmlformats.org/wordprocessingml/2006/main' src = '/home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx' with open(src, 'rb') as f: docx_bytes = f.read() with zipfile.ZipFile(io.BytesIO(docx_bytes)) as z: xml = z.read('word/document.xml') tree = ET.fromstring(xml) # Find first pBdr and print it for pBdr in tree.iter(f'{{{ns}}}pBdr'): print(ET.tostring(pBdr, pretty_print=True).decode()) break "
python3 << 'EOF' from lxml import etree as ET import zipfile, io ns = 'http://schemas.openxmlformats.org/wordprocessingml/2006/main' src = '/home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx' with open(src, 'rb') as f: docx_bytes = f.read() with zipfile.ZipFile(io.BytesIO(docx_bytes)) as z: xml = z.read('word/document.xml') tree = ET.fromstring(xml) # Find all pBdr elements for i, pBdr in enumerate(tree.iter(f'{{{ns}}}pBdr')): children = [c.tag.split('}')[1] for c in pBdr] print(f"pBdr {i}: {children}") EOF
python3 << 'EOF' from lxml import etree as ET import zipfile, io ns = 'http://schemas.openxmlformats.org/wordprocessingml/2006/main' src = '/home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx' with open(src, 'rb') as f: docx_bytes = f.read() with zipfile.ZipFile(io.BytesIO(docx_bytes)) as z: all_files = {name: z.read(name) for name in z.namelist()} xml = all_files['word/document.xml'] tree = ET.fromstring(xml) # The pBdr order in transitional schema: top, left, bottom, right, between, bar # We need to rename start->left, end->right AND reorder: top, left, bottom, right pBdr_order = ['top', 'left', 'bottom', 'right', 'between', 'bar'] for pBdr in tree.iter(f'{{{ns}}}pBdr'): # First rename start->left, end->right for child in list(pBdr): local = child.tag.split('}')[1] if '}' in child.tag else child.tag if local == 'start': child.tag = f'{{{ns}}}left' elif local == 'end': child.tag = f'{{{ns}}}right' # Then reorder children children = {c.tag.split('}')[1]: c for c in pBdr} # Remove all children for child in list(pBdr): pBdr.remove(child) # Re-add in correct order for name in pBdr_order: if name in children: pBdr.append(children[name]) new_xml = ET.tostring(tree, xml_declaration=True, encoding='UTF-8', standalone=True) all_files['word/document.xml'] = new_xml out_buf = io.BytesIO() with zipfile.ZipFile(out_buf, 'w', compression=zipfile.ZIP_DEFLATED) as zout: for name, data in all_files.items(): zout.writestr(name, data) with open(src, 'wb') as f: f.write(out_buf.getvalue()) print('Done – pBdr children renamed and reordered') # Verify tree2 = ET.fromstring(new_xml) for i, pBdr in enumerate(tree2.iter(f'{{{ns}}}pBdr')): children = [c.tag.split('}')[1] for c in pBdr] if 'start' in children or 'end' in children or len(children) > 1: print(f" pBdr {i}: {children}") EOF
python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx
ls -lh /home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx
python3 << 'EOF' import zipfile, io src = '/home/daytona/workspace/pediatrics-notes/Chapter1_Introduction_to_Pediatrics.docx' with zipfile.ZipFile(src) as z: print("Files in docx:") for name in z.namelist(): print(f" {name}") EOF
Chapter1 Introduction to Pediatrics
Word Document · DOCX
| # | Chapter | Key Drug Focus |
|---|---|---|
| 1 | Introduction to Pediatrics & Age Groups | Drug dosing formulas, contraindicated drugs |
| 2 | Growth & Development (Milestones) | Vitamins, supplements |
| 3 | Nutrition (Breastfeeding, Malnutrition) | ORS, therapeutic feeds |
| 4 | Immunization & Vaccines | Vaccine schedules, cold chain |
| 5 | Neonatal Medicine (Jaundice, Sepsis) | Phototherapy, antibiotics in neonates |
| 6 | Respiratory Diseases (Asthma, Pneumonia) | Salbutamol, steroids, antibiotics |
| 7 | GI Diseases (Diarrhea, GERD, Worms) | ORS, anthelmintics, PPIs |
| 8 | Fever & Febrile Illnesses (Malaria, Typhoid) | Antimalarials, paracetamol |
| 9 | Infectious Diseases (Measles, TB) | Antibiotics, antivirals |
| 10 | Congenital Heart Disease | Digoxin, diuretics |
| 11 | Hematological Disorders (Anemia, Thalassemia) | Iron, chelation therapy |
| 12 | Neurological Disorders (Seizures, CP) | Phenobarbital, valproate |
| 13 | Renal Diseases (UTI, Nephrotic Syndrome) | Antibiotics, steroids, diuretics |
| 14 | Endocrine Disorders (Diabetes, Hypothyroidism) | Insulin, levothyroxine |
| 15 | Dermatological Conditions | Antifungals, emollients, steroids |
| 16 | Pediatric Emergencies (Shock, Anaphylaxis) | Epinephrine, IV fluids |
| 17 | Pediatric Pharmacology & Drug Dosing | Complete dosing reference |
| Age Group | Range | Key Notes |
|---|---|---|
| Neonate | 0-28 days | Most vulnerable; immature organs |
| Infant | 1-12 months | Rapid growth; breastfeeding |
| Toddler | 1-3 years | Motor skills develop |
| Preschool | 3-6 years | Language, vaccine boosters |
| School-age | 6-12 years | Cognitive development |
| Adolescent | 12-18 years | Puberty; near-adult physiology |
Key fact: Neonatal period (first 28 days) = highest risk for infant mortality.
| Age | Heart Rate | Respiratory Rate | Systolic BP |
|---|---|---|---|
| Neonate | 100-160 | 40-60 | 60-90 |
| Infant | 100-150 | 30-50 | 70-100 |
| Toddler | 90-140 | 24-40 | 80-110 |
| Preschool | 80-120 | 22-34 | 85-115 |
| School-age | 70-110 | 18-30 | 90-120 |
| Adolescent | 60-100 | 12-16 | 100-130 |
Memory trick: HR and RR go DOWN with age; BP goes UP with age.
Dose = mg/kg/day ÷ frequency
Child dose = (Weight in kg / 70) × Adult dose
Child dose = [Age / (Age + 12)] × Adult dose
Child dose = [Age in months / 150] × Adult dose
BSA (m²) = √[(Height cm × Weight kg) / 3600] Child dose = (Child BSA / 1.73) × Adult dose
| Route | Notes |
|---|---|
| Oral | Preferred; use syrups/drops for infants |
| IV | Emergencies; watch dilution carefully |
| Rectal | Diazepam (seizures), paracetamol (vomiting child) |
| Inhalation | Asthma - use spacer for children <5 years |
| IM | Vaccines; limited sites in infants |
| Topical | Higher absorption due to thinner skin - avoid strong steroids |
| Drug | Problem | Age Limit |
|---|---|---|
| Aspirin | Reye's syndrome (liver + brain failure) | Avoid <12 years |
| Ciprofloxacin | Cartilage/joint damage | Avoid <18 years (unless no alternative) |
| Tetracycline/Doxycycline | Yellow teeth, bone growth inhibition | Avoid <8 years |
| Codeine | Fatal respiratory depression | Avoid <12 years |
| Chloramphenicol | Gray baby syndrome (cardiovascular collapse) | Avoid in neonates |
| Benzyl alcohol (preservative) | Gasping syndrome in neonates | Avoid in neonates |
| Metoclopramide | Extrapyramidal reactions | Caution <1 year |
| Drug | Dose | Use |
|---|---|---|
| Epinephrine | 0.01 mg/kg IV (1:10,000) | Cardiac arrest, anaphylaxis |
| Atropine | 0.02 mg/kg IV (min 0.1 mg) | Bradycardia |
| Adenosine | 0.1 mg/kg IV rapid push | SVT |
| Glucose (D10W) | 2 mL/kg IV | Hypoglycemia |
| Normal Saline | 20 mL/kg IV bolus | Shock |
But where are diagram
Medical education diagram showing pediatric age groups from birth to 18 years: Neonate (0-28 days), Infant (1-12 months), Toddler (1-3 years), Preschool (3-6 years), School-age (6-12 years), Adolescent (12-18 years). Each group shown as a silhouette of increasing size with key characteristics listed below each. Clean medical textbook style with blue and white color scheme, clear labels and icons.
Medical pharmacology diagram titled "Why Children Are NOT Small Adults" showing 5 key physiological differences in children vs adults: 1) Body Water - neonate 75% vs adult 60% with water droplet icon, 2) Liver Enzymes - immature CYP450 system with liver icon, 3) Kidney GFR - neonate 20 vs adult 120 mL/min with kidney icon, 4) Protein Binding - lower albumin in neonates with protein chain icon, 5) Gastric pH - neonate pH 6-8 vs adult pH 1-3 with stomach icon. Clean medical infographic style, blue and orange colors, clear text boxes.
Pediatric drug dosing formulas chart for pharmacists showing 5 formulas in clear boxes: 1) Weight-Based: Dose = mg/kg/day divided by frequency, 2) Clark's Rule: Child dose = Weight(kg)/70 x Adult dose, 3) Young's Rule: Child dose = Age/(Age+12) x Adult dose, 4) Fried's Rule for infants: Age(months)/150 x Adult dose, 5) BSA Method: BSA = square root of (Height x Weight / 3600). Include a worked example with a 15kg child and amoxicillin 40mg/kg/day. Medical textbook infographic style, clean white background, color-coded boxes in blue green and orange.
Medical danger warning table infographic titled "Drugs DANGEROUS in Children - Pharmacist Alert" showing a red-bordered table with 6 drugs: 1) Aspirin - Reye's Syndrome - avoid under 12 years, 2) Ciprofloxacin - Cartilage damage - avoid under 18 years, 3) Tetracycline - Yellow teeth and bone damage - avoid under 8 years, 4) Codeine - Fatal breathing problems - avoid under 12 years, 5) Chloramphenicol - Gray Baby Syndrome - avoid in neonates, 6) Benzyl Alcohol - Gasping Syndrome - avoid in neonates. Red warning icons, medical education style, white background with red and black text.