Be my teacher and teach me the drug calculation from complete zero to hero, I am weak in maths, i don't the percentage like 1/8 like that at, and in stores they are telling the drug is 15 percent offer, 50 percent offer, even i don't know how much cost it is in offer, so help me to learn all these calculations, along with drug calculation, Start

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
I have enough to build a thorough lesson. Let me now write you the complete zero-to-hero guide from scratch, entirely from my own teaching knowledge (since the library is a clinical reference, not a nursing math textbook). This will be long, structured, and beginner-friendly.

πŸŽ“ Drug Calculation: Zero to Hero β€” Your Complete Lesson

Welcome! You are my student. I am your teacher. We go step by step. No rush. No jargon without explanation. By the end of this lesson you will be able to handle shop discounts, percentages, fractions, AND full drug calculations with confidence.

πŸ“š UNIT 1 β€” Numbers and Fractions (Complete Beginner)

What is a Fraction?

A fraction means "a part of something."
It is written as:
  Top number      ← called NUMERATOR   (how many parts you have)
─────────────
  Bottom number   ← called DENOMINATOR (total parts in the whole)
Real example: Imagine a pizza cut into 8 slices. You eat 1 slice.
You ate 1 out of 8 slices = written as 1/8
1 = numerator (you ate 1 slice) 8 = denominator (total 8 slices)

Reading Fractions Out Loud

FractionSay it as
1/2"one half"
1/4"one quarter"
1/8"one eighth"
3/4"three quarters"
2/5"two fifths"

Fractions as Division

Here is the most important thing to know:
A fraction = the top number DIVIDED by the bottom number
1/8  =  1 Γ· 8  =  0.125
1/4  =  1 Γ· 4  =  0.25
1/2  =  1 Γ· 2  =  0.5
3/4  =  3 Γ· 4  =  0.75
Practice yourself:
  • What is 2/5? β†’ 2 Γ· 5 = 0.4
  • What is 3/10? β†’ 3 Γ· 10 = 0.3

Multiplying Fractions (you will need this later!)

Rule: Top Γ— Top, Bottom Γ— Bottom
1/2  Γ—  3/4  =  (1Γ—3) / (2Γ—4)  =  3/8
Dividing Fractions:
Flip the second fraction, then multiply.
1/2  Γ·  1/4  =  1/2  Γ—  4/1  =  4/2  =  2

πŸ“š UNIT 2 β€” Percentages (Zero Knowledge Start)

What does "Percent" mean?

"Per cent" = "Per hundred"
So 15% means 15 out of every 100
Written as a fraction: 15/100
Written as a decimal: 0.15

The Golden Rule of Percentages

% of something = (Percentage Γ· 100) Γ— Total amount
Or even simpler:
% of something = (Percentage Γ— Total) Γ· 100

πŸ›’ Shop Example 1: "15% off" a product

A cream costs β‚Ή200. The shop gives 15% off.
Step 1: Find 15% of β‚Ή200
= (15 Γ— 200) Γ· 100
= 3000 Γ· 100
= β‚Ή30
Step 2: Subtract the discount from the original price
β‚Ή200 - β‚Ή30 = β‚Ή170
You pay β‚Ή170. You saved β‚Ή30. βœ…

πŸ›’ Shop Example 2: "50% off" a product

A medicine costs β‚Ή500. Shop says 50% off.
50% of 500 = (50 Γ— 500) Γ· 100 = 25000 Γ· 100 = β‚Ή250
You pay: β‚Ή500 - β‚Ή250 = β‚Ή250
50% off always means you pay HALF the price. Easy!

πŸ›’ Shop Example 3: "30% off" β‚Ή840

30% of 840 = (30 Γ— 840) Γ· 100 = 25200 Γ· 100 = β‚Ή252
Final price = 840 - 252 = β‚Ή588

Quick Shortcut Table

OfferMeaningYou Pay
10% offPay 90%Price Γ— 0.90
20% offPay 80%Price Γ— 0.80
25% offPay 75%Price Γ— 0.75
50% offPay 50%Price Γ— 0.50
Using the shortcut: β‚Ή800, 25% off β†’ β‚Ή800 Γ— 0.75 = β‚Ή600

πŸ“š UNIT 3 β€” Units of Measurement in Medicine

Before drug calculations, you must know how drugs are measured.

Weight Units

UnitMeaningRelation
kgkilogram1 kg = 1000 g
ggram1 g = 1000 mg
mgmilligram1 mg = 1000 mcg
mcg (Β΅g)microgramsmallest common unit
Memory chain:
1 kg β†’ 1000 g β†’ 1,000,000 mg β†’ 1,000,000,000 mcg
Converting DOWN (bigger β†’ smaller): MULTIPLY by 1000
  • 2 g = 2 Γ— 1000 = 2000 mg
  • 0.5 mg = 0.5 Γ— 1000 = 500 mcg
Converting UP (smaller β†’ bigger): DIVIDE by 1000
  • 500 mg = 500 Γ· 1000 = 0.5 g
  • 250 mcg = 250 Γ· 1000 = 0.25 mg

Volume Units

UnitMeaning
Llitre
mLmillilitre (1 L = 1000 mL)

Concentration: What does "mg/mL" mean?

mg/mL = milligrams PER millilitre
If a drug is "10 mg/mL" it means:
Every 1 mL of the liquid contains 10 mg of drug.
So if you take 2 mL β†’ you get 20 mg of drug.

πŸ“š UNIT 4 β€” The Master Drug Calculation Formula

Now you are ready. Here is THE formula used in nursing and pharmacy for tablets and injections:

πŸ”‘ THE FORMULA (Learn this by heart):

                 What you WANT (dose ordered)
Volume to give = ────────────────────────────── Γ— Volume it comes IN
                 What you HAVE (stock concentration)
Abbreviated as:
           W
Volume  =  ─  Γ—  V
           H
Where:
  • W = What you Want (dose the doctor ordered)
  • H = What you Have (strength of the drug available)
  • V = Volume the drug comes in (usually 1 mL for injections, 1 tablet for tablets)

EXAMPLE 1 β€” Tablet Calculation

Doctor orders: Paracetamol 1000 mg
Drug available: Paracetamol 500 mg tablets
How many tablets to give?
        Want       1000 mg
        ──── Γ— 1 = ──────── Γ— 1 = 2 tablets
        Have       500 mg
Give 2 tablets. βœ…

EXAMPLE 2 β€” Tablet Calculation

Doctor orders: Metformin 500 mg
Drug available: Metformin 250 mg tablets
        500 mg
        ──────── Γ— 1 = 2 tablets
        250 mg

EXAMPLE 3 β€” Injection/Liquid Calculation

Doctor orders: Morphine 8 mg
Available: Morphine 10 mg in 1 mL
        Want        8 mg
        ──── Γ— V =  ──────  Γ— 1 mL  =  0.8 mL
        Have       10 mg
Draw up 0.8 mL. βœ…

EXAMPLE 4 β€” Injection Calculation

Doctor orders: Gentamicin 120 mg
Available: Gentamicin 80 mg in 2 mL
        120 mg
        ──────── Γ— 2 mL = (120 Γ— 2) Γ· 80 = 240 Γ· 80 = 3 mL
        80 mg
Give 3 mL. βœ…

πŸ“š UNIT 5 β€” Weight-Based Drug Dosing (mg/kg)

Many drugs (especially in children) are dosed per kilogram of body weight.
Formula:
Total dose = Dose (mg/kg) Γ— Patient's weight (kg)

EXAMPLE 1

Doctor orders: Amoxicillin 25 mg/kg
Patient weighs: 20 kg
Total dose = 25 Γ— 20 = 500 mg

EXAMPLE 2

Doctor orders: Paracetamol 15 mg/kg
Child weighs: 12 kg
Total dose = 15 Γ— 12 = 180 mg
Now you combine this with the tablet formula to find how many mL to give!

EXAMPLE 3 β€” Combined (weight-based + volume calculation)

Doctor orders: Ampicillin 50 mg/kg
Patient weighs: 8 kg
Drug available: Ampicillin 125 mg in 5 mL
Step 1 - Find total dose:
50 Γ— 8 = 400 mg
Step 2 - Find volume:
(Want Γ· Have) Γ— Volume = (400 Γ· 125) Γ— 5 = 3.2 Γ— 5 = 16 mL

πŸ“š UNIT 6 β€” IV Drip Rate Calculations

When a drug is given through a drip (intravenous infusion), you need to calculate how fast to run it.

Key Terms

TermMeaning
mL/hrmillilitres per hour
drops/mindrops per minute
Drop factorhow many drops = 1 mL (printed on the IV set package)
Common drop factors20 drops/mL (adult set), 60 drops/mL (micro-drip/paediatric)

Formula 1 β€” mL/hr

                 Total volume (mL)
Rate (mL/hr) = ──────────────────────
                 Time (hours)
Example: Give 1000 mL over 8 hours
Rate = 1000 Γ· 8 = 125 mL/hr

Formula 2 β€” Drops per minute

                  Total volume (mL) Γ— Drop factor
Drops/min = ───────────────────────────────────────
                       Time (minutes)
Example: 500 mL over 4 hours, drop factor 20
Time in minutes = 4 Γ— 60 = 240 minutes

Drops/min = (500 Γ— 20) Γ· 240 = 10000 Γ· 240 = 41.6 β‰ˆ 42 drops/min

Formula 3 β€” Drug infusion (mg/hr or mcg/kg/min)

Example: Dopamine 5 mcg/kg/min
Patient weighs 60 kg, drug available as 200 mg in 250 mL
Step 1 - Total mcg/min needed:
5 mcg/kg/min Γ— 60 kg = 300 mcg/min
Step 2 - Convert mcg to mg (Γ· 1000):
300 Γ· 1000 = 0.3 mg/min
Step 3 - Find concentration of drug (mg/mL):
200 mg Γ· 250 mL = 0.8 mg/mL
Step 4 - Find mL/min:
0.3 mg/min Γ· 0.8 mg/mL = 0.375 mL/min
Step 5 - Convert to mL/hr:
0.375 Γ— 60 = 22.5 mL/hr

πŸ“š UNIT 7 β€” Percentage Concentrations in Drug Solutions

You will see on drug labels things like:
  • Normal Saline = 0.9% NaCl
  • Glucose = 5% Dextrose
  • Hydrogen Peroxide = 3%

What does the percentage mean?

%w/v = grams per 100 mL
So:
  • 0.9% NaCl = 0.9 g of salt in every 100 mL
  • 5% Dextrose = 5 g of glucose in every 100 mL
Finding grams in a given volume:
How many grams of glucose in 500 mL of 5% Dextrose?
If 100 mL = 5 g
Then 500 mL = 5 Γ— 5 = 25 g

πŸ“š UNIT 8 β€” Practice Problems (Try Yourself!)

🟒 Easy

  1. A shop sells medicine for β‚Ή360. There is a 25% discount. How much do you pay?
  2. Doctor orders Aspirin 300 mg. Available: 150 mg tablets. How many tablets?
  3. Child weighs 10 kg. Dose ordered: 20 mg/kg. What is the total dose?

🟑 Medium

  1. Doctor orders 60 mg of codeine. Available: 30 mg in 1 mL. How many mL?
  2. Give 500 mL over 5 hours. What is the rate in mL/hr?
  3. Give 1000 mL over 6 hours with drop factor 20. What is drops/min?

πŸ”΄ Hard

  1. Paediatric patient, weight 15 kg. Amoxicillin 40 mg/kg ordered. Available: 250 mg in 5 mL. How many mL to give?
  2. Dopamine 3 mcg/kg/min. Patient = 70 kg. Drug available: 400 mg in 250 mL. Find mL/hr.

βœ… ANSWERS

1. 25% of 360 = 90. You pay 360 - 90 = β‚Ή270
2. 300 Γ· 150 = 2 tablets
3. 20 Γ— 10 = 200 mg
4. (60 Γ· 30) Γ— 1 = 2 mL
5. 500 Γ· 5 = 100 mL/hr
6. (1000 Γ— 20) Γ· (6 Γ— 60) = 20000 Γ· 360 = 55.5 β‰ˆ 56 drops/min
7.
  • Total dose = 40 Γ— 15 = 600 mg
  • Volume = (600 Γ· 250) Γ— 5 = 2.4 Γ— 5 = 12 mL
8.
  • 3 Γ— 70 = 210 mcg/min = 0.21 mg/min
  • Concentration = 400 Γ· 250 = 1.6 mg/mL
  • mL/min = 0.21 Γ· 1.6 = 0.13125 mL/min
  • mL/hr = 0.13125 Γ— 60 = 7.875 β‰ˆ 7.9 mL/hr

πŸ—ΊοΈ Your Learning Road Map

UNIT 1: Fractions              ← You start here
UNIT 2: Percentages + Shopping
UNIT 3: Medical units (g, mg, mL)
UNIT 4: Tablet & injection formula  ← Most important!
UNIT 5: Weight-based dosing (mg/kg)
UNIT 6: IV drip rates
UNIT 7: Percentage concentrations
UNIT 8: Practice problems      ← Test yourself here

πŸ’‘ Golden Rules to Never Forget

RuleWhat it means
Always match unitsmg with mg, mL with mL - never mix!
Convert first, calculate secondIf units don't match, convert BEFORE using the formula
Double checkAlways re-read what the doctor ordered vs what you have
Round safelyFor injections, round to 1 decimal place (e.g., 2.4 mL not 2.38 mL)
% = per 10015% = 15/100. Always.

Tell me which unit you want me to explain more deeply, give you more examples on, or quiz you on. I am here as your teacher - we go at your pace! πŸ™‚

Create a PDF quick-reference guide for drug calculations

Reading File
Reading File
Running Command

mkdir -p /tmp/workspace/drug-calc-guide && ls /tmp/workspace/drug-calc-guide/

Writing File

~/drug-calc-guide/build_guide.py

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

# ── Colour palette ────────────────────────────────────────────────────────────
NAVY      = colors.HexColor("#1A3557")
TEAL      = colors.HexColor("#2196A8")
MINT      = colors.HexColor("#E8F6F7")
AMBER     = colors.HexColor("#F59E0B")
AMBER_LT  = colors.HexColor("#FEF3C7")
RED       = colors.HexColor("#DC2626")
RED_LT    = colors.HexColor("#FEE2E2")
GREEN     = colors.HexColor("#16A34A")
GREEN_LT  = colors.HexColor("#DCFCE7")
GREY_LT   = colors.HexColor("#F3F4F6")
GREY_MID  = colors.HexColor("#9CA3AF")
WHITE     = colors.white
BLACK     = colors.HexColor("#111827")

# ── Document setup ─────────────────────────────────────────────────────────────
OUTPUT = "/tmp/workspace/drug-calc-guide/Drug_Calculation_Quick_Reference.pdf"
doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    leftMargin=1.5*cm, rightMargin=1.5*cm,
    topMargin=2*cm,    bottomMargin=2*cm,
    title="Drug Calculation Quick Reference Guide",
    author="Orris Medical Education",
    subject="Drug Calculations – Nursing & Pharmacy Reference",
)

W, H = A4
CONTENT_W = W - 3*cm   # usable width

# ── Styles ─────────────────────────────────────────────────────────────────────
base = getSampleStyleSheet()

def S(name, **kw):
    return ParagraphStyle(name, **kw)

sTitle = S("sTitle",
    fontName="Helvetica-Bold", fontSize=22, textColor=WHITE,
    alignment=TA_CENTER, leading=28)

sSubtitle = S("sSubtitle",
    fontName="Helvetica", fontSize=11, textColor=WHITE,
    alignment=TA_CENTER, leading=16)

sSectionHeader = S("sSectionHeader",
    fontName="Helvetica-Bold", fontSize=13, textColor=WHITE,
    alignment=TA_LEFT, leading=18,
    leftPadding=8, rightPadding=8, topPadding=5, bottomPadding=5)

sBodyBold = S("sBodyBold",
    fontName="Helvetica-Bold", fontSize=9, textColor=BLACK, leading=13)

sBody = S("sBody",
    fontName="Helvetica", fontSize=9, textColor=BLACK, leading=13)

sBodySmall = S("sBodySmall",
    fontName="Helvetica", fontSize=8, textColor=BLACK, leading=12)

sFormulaLabel = S("sFormulaLabel",
    fontName="Helvetica-Bold", fontSize=9, textColor=NAVY, leading=13,
    alignment=TA_CENTER)

sFormula = S("sFormula",
    fontName="Helvetica-Bold", fontSize=11, textColor=NAVY, leading=16,
    alignment=TA_CENTER)

sNote = S("sNote",
    fontName="Helvetica-Oblique", fontSize=8, textColor=GREY_MID, leading=12)

sFooter = S("sFooter",
    fontName="Helvetica", fontSize=7.5, textColor=GREY_MID, alignment=TA_CENTER)

sTableHead = S("sTableHead",
    fontName="Helvetica-Bold", fontSize=8.5, textColor=WHITE, leading=12,
    alignment=TA_CENTER)

sTableCell = S("sTableCell",
    fontName="Helvetica", fontSize=8.5, textColor=BLACK, leading=12,
    alignment=TA_CENTER)

sTableCellL = S("sTableCellL",
    fontName="Helvetica", fontSize=8.5, textColor=BLACK, leading=12,
    alignment=TA_LEFT)

sTableCellBold = S("sTableCellBold",
    fontName="Helvetica-Bold", fontSize=8.5, textColor=NAVY, leading=12,
    alignment=TA_LEFT)

sWarning = S("sWarning",
    fontName="Helvetica-Bold", fontSize=8.5, textColor=RED, leading=13)

sGolden = S("sGolden",
    fontName="Helvetica-Bold", fontSize=9, textColor=colors.HexColor("#92400E"),
    leading=13)

# ── Helper: coloured section header ───────────────────────────────────────────
def section_header(text, bg=NAVY):
    tbl = Table([[Paragraph(text, sSectionHeader)]], colWidths=[CONTENT_W])
    tbl.setStyle(TableStyle([
        ("BACKGROUND",  (0,0), (-1,-1), bg),
        ("TOPPADDING",  (0,0), (-1,-1), 6),
        ("BOTTOMPADDING",(0,0),(-1,-1), 6),
        ("LEFTPADDING", (0,0), (-1,-1), 10),
        ("ROUNDEDCORNERS", [4,4,4,4]),
    ]))
    return tbl

# ── Helper: coloured box ───────────────────────────────────────────────────────
def coloured_box(paragraphs, bg=MINT, radius=4):
    rows = [[p] for p in paragraphs]
    t = Table(rows, colWidths=[CONTENT_W])
    t.setStyle(TableStyle([
        ("BACKGROUND",   (0,0), (-1,-1), bg),
        ("TOPPADDING",   (0,0), (-1,-1), 5),
        ("BOTTOMPADDING",(0,0), (-1,-1), 5),
        ("LEFTPADDING",  (0,0), (-1,-1), 10),
        ("RIGHTPADDING", (0,0), (-1,-1), 10),
    ]))
    return t

# ── Helper: two-column layout ─────────────────────────────────────────────────
def two_col(left_items, right_items, lw=None, rw=None):
    lw = lw or CONTENT_W * 0.49
    rw = rw or CONTENT_W * 0.49
    gap = CONTENT_W - lw - rw

    def wrap(items):
        rows = []
        for item in items:
            if isinstance(item, str):
                rows.append([Paragraph(item, sBody)])
            else:
                rows.append([item])
        t = Table(rows, colWidths=[lw])
        t.setStyle(TableStyle([
            ("TOPPADDING",   (0,0),(-1,-1), 2),
            ("BOTTOMPADDING",(0,0),(-1,-1), 2),
            ("LEFTPADDING",  (0,0),(-1,-1), 0),
            ("RIGHTPADDING", (0,0),(-1,-1), 0),
        ]))
        return t

    outer = Table([[wrap(left_items), Spacer(gap, 1), wrap(right_items)]],
                  colWidths=[lw, gap, rw])
    outer.setStyle(TableStyle([
        ("VALIGN",       (0,0),(-1,-1), "TOP"),
        ("TOPPADDING",   (0,0),(-1,-1), 0),
        ("BOTTOMPADDING",(0,0),(-1,-1), 0),
        ("LEFTPADDING",  (0,0),(-1,-1), 0),
        ("RIGHTPADDING", (0,0),(-1,-1), 0),
    ]))
    return outer

# ══════════════════════════════════════════════════════════════════════════════
# CONTENT BUILD
# ══════════════════════════════════════════════════════════════════════════════
story = []

# ── COVER BANNER ──────────────────────────────────────────────────────────────
banner_data = [[
    Paragraph("πŸ’Š  Drug Calculation", sTitle),
    Paragraph("Quick Reference Guide", sTitle),
    Paragraph("Fractions β€’ Percentages β€’ Tablets β€’ Injections β€’ IV Drips β€’ Weight-Based Dosing", sSubtitle),
]]
# flatten into rows
banner = Table(
    [
        [Paragraph("πŸ’Š  Drug Calculation Quick Reference Guide", sTitle)],
        [Paragraph("Fractions  β€’  Percentages  β€’  Tablets  β€’  Injections  β€’  IV Drips  β€’  Weight-Based Dosing", sSubtitle)],
        [Paragraph("For Nurses, Pharmacists & Healthcare Students", sNote)],
    ],
    colWidths=[CONTENT_W]
)
banner.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,-1), NAVY),
    ("TOPPADDING",   (0,0),(-1,-1), 10),
    ("BOTTOMPADDING",(0,0),(-1,-1), 10),
    ("LEFTPADDING",  (0,0),(-1,-1), 10),
    ("ROUNDEDCORNERS",[6,6,6,6]),
]))
story.append(banner)
story.append(Spacer(1, 8*mm))

# ── SECTION 1: FRACTIONS ──────────────────────────────────────────────────────
story.append(KeepTogether([
    section_header("SECTION 1 β€” Fractions"),
    Spacer(1, 3*mm),
]))

frac_box = coloured_box([
    Paragraph("<b>What is a fraction?</b>  A fraction shows a PART of a whole thing.", sBody),
    Paragraph("Written as:  <b>Numerator (top)</b>  Γ·  <b>Denominator (bottom)</b>", sBody),
    Paragraph("Example: 1/8 means 1 out of 8 equal parts  β†’  1 Γ· 8 = <b>0.125</b>", sBody),
], bg=MINT)
story.append(frac_box)
story.append(Spacer(1, 3*mm))

frac_table_data = [
    [Paragraph("Fraction", sTableHead), Paragraph("Say it as", sTableHead),
     Paragraph("Decimal value", sTableHead), Paragraph("Quick meaning", sTableHead)],
    ["1/2", "One half",      "0.5",   "Half of something"],
    ["1/4", "One quarter",   "0.25",  "Quarter of something"],
    ["1/8", "One eighth",    "0.125", "An eighth of something"],
    ["3/4", "Three quarters","0.75",  "Three parts out of four"],
    ["2/5", "Two fifths",    "0.4",   "Two parts out of five"],
    ["1/3", "One third",     "0.333", "One part out of three"],
]
ft = Table(frac_table_data, colWidths=[CONTENT_W*0.13, CONTENT_W*0.22, CONTENT_W*0.2, CONTENT_W*0.45])
ft.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,0),  TEAL),
    ("TEXTCOLOR",    (0,0),(-1,0),  WHITE),
    ("FONTNAME",     (0,0),(-1,0),  "Helvetica-Bold"),
    ("FONTSIZE",     (0,0),(-1,-1), 8.5),
    ("ALIGN",        (0,0),(-1,-1), "CENTER"),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, GREY_LT]),
    ("GRID",         (0,0),(-1,-1), 0.3, GREY_MID),
    ("TOPPADDING",   (0,0),(-1,-1), 4),
    ("BOTTOMPADDING",(0,0),(-1,-1), 4),
]))
story.append(ft)
story.append(Spacer(1, 6*mm))

# ── SECTION 2: PERCENTAGES ────────────────────────────────────────────────────
story.append(KeepTogether([
    section_header("SECTION 2 β€” Percentages"),
    Spacer(1, 3*mm),
]))

pct_box = coloured_box([
    Paragraph("<b>Per cent = Per hundred.</b>  So 15% means 15 out of every 100.", sBody),
    Paragraph("<b>Golden rule:</b>  % of an amount  =  (Percentage Γ— Amount) Γ· 100", sBodyBold),
    Paragraph("<b>Shortcut decimal:</b>  Multiply amount by the decimal form of the %", sBody),
], bg=AMBER_LT)
story.append(pct_box)
story.append(Spacer(1, 3*mm))

pct_data = [
    [Paragraph("Offer", sTableHead), Paragraph("Formula", sTableHead),
     Paragraph("Example (β‚Ή500 item)", sTableHead), Paragraph("You Pay", sTableHead)],
    ["10% off", "Price Γ— 0.90", "500 Γ— 0.90", "β‚Ή450"],
    ["15% off", "Price Γ— 0.85", "500 Γ— 0.85", "β‚Ή425"],
    ["20% off", "Price Γ— 0.80", "500 Γ— 0.80", "β‚Ή400"],
    ["25% off", "Price Γ— 0.75", "500 Γ— 0.75", "β‚Ή375"],
    ["30% off", "Price Γ— 0.70", "500 Γ— 0.70", "β‚Ή350"],
    ["50% off", "Price Γ— 0.50", "500 Γ— 0.50", "β‚Ή250"],
]
pt = Table(pct_data, colWidths=[CONTENT_W*0.15, CONTENT_W*0.25, CONTENT_W*0.3, CONTENT_W*0.3])
pt.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,0),  AMBER),
    ("TEXTCOLOR",    (0,0),(-1,0),  WHITE),
    ("FONTNAME",     (0,0),(-1,0),  "Helvetica-Bold"),
    ("FONTSIZE",     (0,0),(-1,-1), 8.5),
    ("ALIGN",        (0,0),(-1,-1), "CENTER"),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, AMBER_LT]),
    ("GRID",         (0,0),(-1,-1), 0.3, GREY_MID),
    ("TOPPADDING",   (0,0),(-1,-1), 4),
    ("BOTTOMPADDING",(0,0),(-1,-1), 4),
    ("FONTNAME",     (0,-1),(-1,-1),"Helvetica"),
]))
story.append(pt)
story.append(Spacer(1, 6*mm))

# ── SECTION 3: UNITS OF MEASUREMENT ──────────────────────────────────────────
story.append(section_header("SECTION 3 β€” Units of Measurement"))
story.append(Spacer(1, 3*mm))

left_units = [
    coloured_box([
        Paragraph("<b>WEIGHT UNITS</b>", sBodyBold),
        Paragraph("kg  β†’  g  β†’  mg  β†’  mcg", sBody),
        Paragraph("1 kg = 1,000 g", sBodySmall),
        Paragraph("1 g  = 1,000 mg", sBodySmall),
        Paragraph("1 mg = 1,000 mcg", sBodySmall),
        Paragraph("<b>Convert DOWN (bigger→smaller):</b>  × 1000", sBodyBold),
        Paragraph("<b>Convert UP (smaller→bigger):</b>  ÷ 1000", sBodyBold),
    ], bg=GREEN_LT),
]

right_units = [
    coloured_box([
        Paragraph("<b>VOLUME UNITS</b>", sBodyBold),
        Paragraph("1 L = 1,000 mL", sBodySmall),
        Spacer(1, 5),
        Paragraph("<b>CONCENTRATION (mg/mL)</b>", sBodyBold),
        Paragraph("= milligrams PER millilitre", sBodySmall),
        Paragraph("If drug is 10 mg/mL:", sBodySmall),
        Paragraph("   2 mL contains 20 mg", sBodySmall),
        Paragraph("   5 mL contains 50 mg", sBodySmall),
    ], bg=GREEN_LT),
]

story.append(two_col(left_units, right_units))
story.append(Spacer(1, 3*mm))

conv_data = [
    [Paragraph("Convert FROM", sTableHead), Paragraph("Convert TO", sTableHead),
     Paragraph("Operation", sTableHead), Paragraph("Example", sTableHead)],
    ["g",   "mg",  "Γ— 1000",   "2 g β†’ 2000 mg"],
    ["mg",  "mcg", "Γ— 1000",   "0.5 mg β†’ 500 mcg"],
    ["mg",  "g",   "Γ· 1000",   "500 mg β†’ 0.5 g"],
    ["mcg", "mg",  "Γ· 1000",   "250 mcg β†’ 0.25 mg"],
    ["L",   "mL",  "Γ— 1000",   "1.5 L β†’ 1500 mL"],
    ["mL",  "L",   "Γ· 1000",   "750 mL β†’ 0.75 L"],
]
ct = Table(conv_data, colWidths=[CONTENT_W*0.18, CONTENT_W*0.18, CONTENT_W*0.22, CONTENT_W*0.42])
ct.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,0), colors.HexColor("#16A34A")),
    ("TEXTCOLOR",    (0,0),(-1,0), WHITE),
    ("FONTNAME",     (0,0),(-1,0), "Helvetica-Bold"),
    ("FONTSIZE",     (0,0),(-1,-1),8.5),
    ("ALIGN",        (0,0),(-1,-1),"CENTER"),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, GREEN_LT]),
    ("GRID",         (0,0),(-1,-1),0.3, GREY_MID),
    ("TOPPADDING",   (0,0),(-1,-1),4),
    ("BOTTOMPADDING",(0,0),(-1,-1),4),
]))
story.append(ct)
story.append(Spacer(1, 6*mm))

# ── SECTION 4: MASTER FORMULA ─────────────────────────────────────────────────
story.append(section_header("SECTION 4 β€” The Master Drug Formula (Tablets & Injections)"))
story.append(Spacer(1, 3*mm))

formula_box = Table(
    [
        [Paragraph("THE FORMULA", sFormulaLabel)],
        [Paragraph("Volume / Tablets to Give  =  (Want Γ· Have)  Γ—  Volume it comes in", sFormula)],
        [Paragraph("W = What you Want (dose ordered by doctor)", sBody)],
        [Paragraph("H = What you Have (strength on the drug label)", sBody)],
        [Paragraph("V = Volume the drug comes in (usually 1 tablet or 1 mL)", sBody)],
    ],
    colWidths=[CONTENT_W]
)
formula_box.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,-1), MINT),
    ("TOPPADDING",   (0,0),(-1,-1), 5),
    ("BOTTOMPADDING",(0,0),(-1,-1), 5),
    ("LEFTPADDING",  (0,0),(-1,-1), 14),
    ("RIGHTPADDING", (0,0),(-1,-1), 14),
    ("LINEABOVE",    (0,0),(-1,0),  2, TEAL),
    ("LINEBELOW",    (0,-1),(-1,-1),2, TEAL),
]))
story.append(formula_box)
story.append(Spacer(1, 3*mm))

ex_data = [
    [Paragraph("Example", sTableHead), Paragraph("Ordered", sTableHead),
     Paragraph("Available", sTableHead), Paragraph("Calculation", sTableHead),
     Paragraph("Answer", sTableHead)],
    ["Tablet",     "Paracetamol 1000 mg", "500 mg tablets",      "(1000Γ·500) Γ— 1",       "2 tablets"],
    ["Tablet",     "Metformin 500 mg",    "250 mg tablets",      "(500Γ·250) Γ— 1",        "2 tablets"],
    ["Injection",  "Morphine 8 mg",       "10 mg in 1 mL",       "(8Γ·10) Γ— 1 mL",        "0.8 mL"],
    ["Injection",  "Gentamicin 120 mg",   "80 mg in 2 mL",       "(120Γ·80) Γ— 2 mL",      "3 mL"],
    ["Injection",  "Furosemide 60 mg",    "20 mg in 2 mL",       "(60Γ·20) Γ— 2 mL",       "6 mL"],
    ["Syrup",      "Amoxicillin 375 mg",  "250 mg in 5 mL",      "(375Γ·250) Γ— 5 mL",     "7.5 mL"],
]
et = Table(ex_data, colWidths=[CONTENT_W*0.11,CONTENT_W*0.22,CONTENT_W*0.22,CONTENT_W*0.24,CONTENT_W*0.21])
et.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,0),  TEAL),
    ("TEXTCOLOR",    (0,0),(-1,0),  WHITE),
    ("FONTNAME",     (0,0),(-1,0),  "Helvetica-Bold"),
    ("FONTSIZE",     (0,0),(-1,-1), 8.5),
    ("ALIGN",        (0,0),(-1,-1), "CENTER"),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, MINT]),
    ("GRID",         (0,0),(-1,-1), 0.3, GREY_MID),
    ("TOPPADDING",   (0,0),(-1,-1), 4),
    ("BOTTOMPADDING",(0,0),(-1,-1), 4),
    ("FONTNAME",     (-1,1),(-1,-1),"Helvetica-Bold"),
    ("TEXTCOLOR",    (-1,1),(-1,-1), NAVY),
]))
story.append(et)
story.append(Spacer(1, 6*mm))

# ── SECTION 5: WEIGHT-BASED DOSING ────────────────────────────────────────────
story.append(section_header("SECTION 5 β€” Weight-Based Dosing  (mg/kg)"))
story.append(Spacer(1, 3*mm))

wb_formula = coloured_box([
    Paragraph("<b>Step 1:</b>  Total dose (mg)  =  Dose per kg  Γ—  Patient weight (kg)", sBodyBold),
    Paragraph("<b>Step 2:</b>  Volume  =  (Total dose Γ· Have)  Γ—  Volume it comes in", sBodyBold),
], bg=AMBER_LT)
story.append(wb_formula)
story.append(Spacer(1, 3*mm))

wb_data = [
    [Paragraph("Drug", sTableHead), Paragraph("Ordered", sTableHead),
     Paragraph("Weight", sTableHead), Paragraph("Step 1: Total Dose", sTableHead),
     Paragraph("Available", sTableHead), Paragraph("Step 2: Volume", sTableHead)],
    ["Paracetamol", "15 mg/kg",  "12 kg", "15Γ—12 = 180 mg",  "120 mg/5 mL",  "(180Γ·120)Γ—5 = 7.5 mL"],
    ["Amoxicillin", "25 mg/kg",  "20 kg", "25Γ—20 = 500 mg",  "250 mg/5 mL",  "(500Γ·250)Γ—5 = 10 mL"],
    ["Ampicillin",  "50 mg/kg",  "8 kg",  "50Γ—8 = 400 mg",   "125 mg/5 mL",  "(400Γ·125)Γ—5 = 16 mL"],
    ["Gentamicin",  "7 mg/kg",   "60 kg", "7Γ—60 = 420 mg",   "80 mg/2 mL",   "(420Γ·80)Γ—2 = 10.5 mL"],
]
wt = Table(wb_data, colWidths=[
    CONTENT_W*0.14, CONTENT_W*0.13, CONTENT_W*0.1,
    CONTENT_W*0.2, CONTENT_W*0.17, CONTENT_W*0.26
])
wt.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,0),  AMBER),
    ("TEXTCOLOR",    (0,0),(-1,0),  WHITE),
    ("FONTNAME",     (0,0),(-1,0),  "Helvetica-Bold"),
    ("FONTSIZE",     (0,0),(-1,-1), 8),
    ("ALIGN",        (0,0),(-1,-1), "CENTER"),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, AMBER_LT]),
    ("GRID",         (0,0),(-1,-1), 0.3, GREY_MID),
    ("TOPPADDING",   (0,0),(-1,-1), 4),
    ("BOTTOMPADDING",(0,0),(-1,-1), 4),
    ("FONTNAME",     (-1,1),(-1,-1),"Helvetica-Bold"),
    ("TEXTCOLOR",    (-1,1),(-1,-1), colors.HexColor("#92400E")),
]))
story.append(wt)
story.append(Spacer(1, 6*mm))

# ── SECTION 6: IV DRIP RATES ──────────────────────────────────────────────────
story.append(section_header("SECTION 6 β€” IV Drip Rate Calculations"))
story.append(Spacer(1, 3*mm))

iv_left = [
    coloured_box([
        Paragraph("<b>mL/hr Formula</b>", sBodyBold),
        Paragraph("Rate (mL/hr)  =  Total volume (mL)  Γ·  Time (hrs)", sBody),
        Spacer(1, 3),
        Paragraph("<b>Example:</b>  1000 mL over 8 hrs", sBody),
        Paragraph("= 1000 Γ· 8 = <b>125 mL/hr</b>", sBodyBold),
    ], bg=colors.HexColor("#EDE9FE")),
]

iv_right = [
    coloured_box([
        Paragraph("<b>Drops/min Formula</b>", sBodyBold),
        Paragraph("Drops/min  =  (Vol Γ— Drop factor)  Γ·  Time (min)", sBody),
        Spacer(1, 3),
        Paragraph("<b>Drop factors:</b>  20 drops/mL (adult)  |  60 drops/mL (paediatric)", sBodySmall),
        Paragraph("<b>Example:</b>  500 mL, 4 hrs, df=20", sBody),
        Paragraph("= (500Γ—20)Γ·240 = <b>42 drops/min</b>", sBodyBold),
    ], bg=colors.HexColor("#EDE9FE")),
]

story.append(two_col(iv_left, iv_right))
story.append(Spacer(1, 3*mm))

iv_data = [
    [Paragraph("Volume", sTableHead), Paragraph("Time", sTableHead),
     Paragraph("Rate (mL/hr)", sTableHead), Paragraph("Drop Factor", sTableHead),
     Paragraph("Drops/min", sTableHead)],
    ["500 mL",  "4 hours",   "125 mL/hr",  "20",  "42 drops/min"],
    ["1000 mL", "6 hours",   "167 mL/hr",  "20",  "56 drops/min"],
    ["1000 mL", "8 hours",   "125 mL/hr",  "20",  "42 drops/min"],
    ["250 mL",  "2 hours",   "125 mL/hr",  "60",  "125 drops/min"],
    ["500 mL",  "12 hours",  "42 mL/hr",   "20",  "14 drops/min"],
]
ivt = Table(iv_data, colWidths=[CONTENT_W*0.16,CONTENT_W*0.16,CONTENT_W*0.22,CONTENT_W*0.2,CONTENT_W*0.26])
ivt.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,0),  colors.HexColor("#7C3AED")),
    ("TEXTCOLOR",    (0,0),(-1,0),  WHITE),
    ("FONTNAME",     (0,0),(-1,0),  "Helvetica-Bold"),
    ("FONTSIZE",     (0,0),(-1,-1), 8.5),
    ("ALIGN",        (0,0),(-1,-1), "CENTER"),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, colors.HexColor("#EDE9FE")]),
    ("GRID",         (0,0),(-1,-1), 0.3, GREY_MID),
    ("TOPPADDING",   (0,0),(-1,-1), 4),
    ("BOTTOMPADDING",(0,0),(-1,-1), 4),
    ("FONTNAME",     (-1,1),(-1,-1),"Helvetica-Bold"),
    ("TEXTCOLOR",    (-1,1),(-1,-1), colors.HexColor("#5B21B6")),
]))
story.append(ivt)
story.append(Spacer(1, 6*mm))

# ── SECTION 7: PERCENTAGE CONCENTRATIONS ─────────────────────────────────────
story.append(section_header("SECTION 7 β€” Percentage Concentrations in Drug Solutions"))
story.append(Spacer(1, 3*mm))

conc_box = coloured_box([
    Paragraph("<b>%w/v</b>  =  grams of drug per 100 mL of solution", sBodyBold),
    Paragraph("So  5%  means  5 g of drug in every 100 mL", sBody),
    Paragraph("<b>Formula:</b>  Amount of drug (g)  =  (% Γ— Volume in mL) Γ· 100", sBodyBold),
], bg=RED_LT)
story.append(conc_box)
story.append(Spacer(1, 3*mm))

conc_data = [
    [Paragraph("Solution", sTableHead), Paragraph("Concentration", sTableHead),
     Paragraph("Meaning", sTableHead), Paragraph("Drug in 500 mL", sTableHead)],
    ["Normal Saline",    "0.9% NaCl",      "0.9 g NaCl per 100 mL",  "4.5 g NaCl"],
    ["5% Dextrose",      "5% Glucose",     "5 g glucose per 100 mL", "25 g glucose"],
    ["Hβ‚‚Oβ‚‚ antiseptic",  "3% Hβ‚‚Oβ‚‚",       "3 g Hβ‚‚Oβ‚‚ per 100 mL",   "15 g Hβ‚‚Oβ‚‚"],
    ["Dextrose saline",  "4% Glucose +\n0.18% NaCl", "4g + 0.18g per 100 mL","20g + 0.9g"],
]
cnct = Table(conc_data, colWidths=[CONTENT_W*0.22,CONTENT_W*0.2,CONTENT_W*0.3,CONTENT_W*0.28])
cnct.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,0),  RED),
    ("TEXTCOLOR",    (0,0),(-1,0),  WHITE),
    ("FONTNAME",     (0,0),(-1,0),  "Helvetica-Bold"),
    ("FONTSIZE",     (0,0),(-1,-1), 8.5),
    ("ALIGN",        (0,0),(-1,-1), "CENTER"),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, RED_LT]),
    ("GRID",         (0,0),(-1,-1), 0.3, GREY_MID),
    ("TOPPADDING",   (0,0),(-1,-1), 4),
    ("BOTTOMPADDING",(0,0),(-1,-1), 4),
]))
story.append(cnct)
story.append(Spacer(1, 6*mm))

# ── SECTION 8: GOLDEN RULES ───────────────────────────────────────────────────
story.append(section_header("SECTION 8 β€” Golden Rules & Safety Tips", bg=colors.HexColor("#92400E")))
story.append(Spacer(1, 3*mm))

rules_data = [
    ["βœ…", "Always check units FIRST", "mg with mg, mL with mL. Never mix different units in the formula."],
    ["βœ…", "Convert BEFORE you calculate", "If units don't match, convert them first, THEN use the formula."],
    ["βœ…", "Double-check your answer", "Does the answer make sense? More than 3 tablets = check again."],
    ["βœ…", "Round safely", "Round injections to 1 decimal place (e.g., 2.4 mL, not 2.38 mL)."],
    ["βœ…", "Re-read the order", "Confirm dose, route, frequency, and patient name before giving."],
    ["⚠️", "Never guess a dose", "If unsure, ask a senior. Never estimate or assume."],
    ["⚠️", "High-alert drugs", "Insulin, heparin, morphine, digoxin β€” always double-check with a colleague."],
    ["⚠️", "Check expiry and label", "Verify drug name, strength, and expiry date before preparation."],
]
rt = Table(rules_data, colWidths=[CONTENT_W*0.06, CONTENT_W*0.28, CONTENT_W*0.66])
rt.setStyle(TableStyle([
    ("FONTSIZE",     (0,0),(-1,-1), 8.5),
    ("VALIGN",       (0,0),(-1,-1), "MIDDLE"),
    ("FONTNAME",     (1,0),(1,-1),  "Helvetica-Bold"),
    ("TEXTCOLOR",    (1,0),(1,4),   GREEN),
    ("TEXTCOLOR",    (1,5),(1,-1),  RED),
    ("ROWBACKGROUNDS",(0,0),(-1,-1),[WHITE, GREY_LT]),
    ("GRID",         (0,0),(-1,-1), 0.3, GREY_MID),
    ("TOPPADDING",   (0,0),(-1,-1), 5),
    ("BOTTOMPADDING",(0,0),(-1,-1), 5),
    ("LEFTPADDING",  (0,0),(0,-1),  8),
    ("LEFTPADDING",  (1,0),(-1,-1), 8),
]))
story.append(rt)
story.append(Spacer(1, 6*mm))

# ── SECTION 9: QUICK PRACTICE PROBLEMS ────────────────────────────────────────
story.append(section_header("SECTION 9 β€” Quick Practice Problems"))
story.append(Spacer(1, 3*mm))

qp_data = [
    [Paragraph("Q#", sTableHead), Paragraph("Question", sTableHead),
     Paragraph("Answer", sTableHead)],
    ["Q1", "Aspirin 300 mg ordered. Available: 75 mg tablets. How many?",  "4 tablets"],
    ["Q2", "Codeine 60 mg ordered. Available: 30 mg/mL. How many mL?",     "2 mL"],
    ["Q3", "Child 10 kg. Paracetamol 15 mg/kg. Total dose?",               "150 mg"],
    ["Q4", "1000 mL over 10 hrs. Rate in mL/hr?",                          "100 mL/hr"],
    ["Q5", "500 mL, 5 hrs, drop factor 20. Drops/min?",                    "33 drops/min"],
    ["Q6", "Shop: β‚Ή480 with 25% off. What do you pay?",                    "β‚Ή360"],
    ["Q7", "Gentamicin 80 mg in 2 mL. Order: 120 mg. Volume?",             "3 mL"],
    ["Q8", "Amoxicillin 40 mg/kg, child 15 kg. Available 250 mg/5 mL.",    "12 mL"],
]
qt = Table(qp_data, colWidths=[CONTENT_W*0.07, CONTENT_W*0.65, CONTENT_W*0.28])
qt.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,0),  NAVY),
    ("TEXTCOLOR",    (0,0),(-1,0),  WHITE),
    ("FONTNAME",     (0,0),(-1,0),  "Helvetica-Bold"),
    ("FONTSIZE",     (0,0),(-1,-1), 8.5),
    ("ALIGN",        (0,0),(0,-1),  "CENTER"),
    ("ALIGN",        (1,0),(1,-1),  "LEFT"),
    ("ALIGN",        (2,0),(2,-1),  "CENTER"),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, GREY_LT]),
    ("GRID",         (0,0),(-1,-1), 0.3, GREY_MID),
    ("TOPPADDING",   (0,0),(-1,-1), 5),
    ("BOTTOMPADDING",(0,0),(-1,-1), 5),
    ("LEFTPADDING",  (1,0),(1,-1),  8),
    ("FONTNAME",     (-1,1),(-1,-1),"Helvetica-Bold"),
    ("TEXTCOLOR",    (-1,1),(-1,-1), TEAL),
]))
story.append(qt)
story.append(Spacer(1, 6*mm))

# ── CHEAT-SHEET SUMMARY BOX ───────────────────────────────────────────────────
summary = Table([
    [Paragraph("πŸ“‹  FORMULA CHEAT SHEET", S("ch", fontName="Helvetica-Bold",
        fontSize=10, textColor=NAVY, alignment=TA_CENTER, leading=14))],
    [Table([
        [
            Paragraph("<b>Tablets / Injections</b><br/>(Want Γ· Have) Γ— Volume", sBody),
            Paragraph("<b>Weight-based</b><br/>Dose/kg Γ— Weight (kg)", sBody),
            Paragraph("<b>mL/hr</b><br/>Volume Γ· Time (hrs)", sBody),
            Paragraph("<b>Drops/min</b><br/>(Vol Γ— df) Γ· Time (min)", sBody),
            Paragraph("<b>Discount</b><br/>Price Γ— (1 - %/100)", sBody),
        ]
    ], colWidths=[CONTENT_W/5]*5,
    style=TableStyle([
        ("ALIGN",       (0,0),(-1,-1),"CENTER"),
        ("FONTSIZE",    (0,0),(-1,-1), 8),
        ("TOPPADDING",  (0,0),(-1,-1), 3),
        ("BOTTOMPADDING",(0,0),(-1,-1), 3),
        ("LINEBEFORE",  (1,0),(-1,-1), 0.5, GREY_MID),
    ]))],
], colWidths=[CONTENT_W])
summary.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,-1), MINT),
    ("TOPPADDING",   (0,0),(-1,-1), 6),
    ("BOTTOMPADDING",(0,0),(-1,-1), 6),
    ("LINEABOVE",    (0,0),(-1,0),  2, TEAL),
    ("LINEBELOW",    (0,-1),(-1,-1),2, TEAL),
]))
story.append(summary)
story.append(Spacer(1, 5*mm))

# ── FOOTER NOTE ───────────────────────────────────────────────────────────────
story.append(HRFlowable(width=CONTENT_W, thickness=0.5, color=GREY_MID))
story.append(Spacer(1, 2*mm))
story.append(Paragraph(
    "This guide is for educational purposes only. Always verify drug calculations with a licensed healthcare professional before administration.",
    sFooter
))

# ── BUILD ──────────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF created: {OUTPUT}")
Running Command

cd /tmp/workspace/drug-calc-guide && python build_guide.py 2>&1

Running Command

ls -lh /tmp/workspace/drug-calc-guide/Drug_Calculation_Quick_Reference.pdf

Your PDF quick-reference guide is ready! Here's the download link:

Drug Calculation Quick Reference

PDF Document Β· PDF


Here's what's inside the guide (all on one clean A4 page):
SectionWhat it covers
Section 1Fractions - what they are, decimal values, table of common fractions
Section 2Percentages - golden rule, shop discount table (10% to 50% off)
Section 3Units of measurement - kg/g/mg/mcg conversions, mL/L, concentration
Section 4The master drug formula - tablets & injections, with 6 worked examples
Section 5Weight-based dosing (mg/kg) - 2-step method with 4 examples
Section 6IV drip rates - mL/hr and drops/min formulas with a ready-reference table
Section 7Percentage concentrations - Normal Saline, 5% Dextrose, etc.
Section 8Golden rules & safety tips - 8 rules including high-alert drugs
Section 98 practice problems with answers
Cheat sheetAll 5 formulas in one summary box at the bottom
Print it and stick it at your workstation - it covers everything from zero maths to full clinical drug calculations!
This is a shared conversation. Sign in to Orris to start your own chat.