50 female came with BP 200/110 diagoned as hypertensive urgency now on Amlodipine 5 and losartan 50 mg came for follow up now her BP is 100/70 how to manage this case
hypertensive urgency outpatient management blood pressure
| Symptom | Significance |
|---|---|
| Dizziness, lightheadedness, especially on standing | Orthostatic hypotension - clinically significant |
| Fatigue, weakness | Possible hypoperfusion |
| Syncope or near-syncope | Requires immediate dose reduction |
| Headache, visual changes | Rule out rebound |
| Palpitations | Reflex tachycardia from CCB vasodilation |
"Hypertensive urgency is far more common than hypertensive emergency and should be treated with institution, reinstitution, or intensification of oral antihypertensive agents in an outpatient setting."
Current: Amlodipine 5 mg + Losartan 50 mg → BP 100/70
Option A (asymptomatic): Amlodipine 2.5 mg + Losartan 50 mg
Option B (symptomatic): Stop Amlodipine temporarily; Losartan 25 mg
Option C (mild symptoms): Amlodipine 5 mg alternate days + Losartan 25 mg
| Visit timing | Goal |
|---|---|
| Now | Adjust medications, check for symptoms, labs |
| 2 weeks | Repeat BP measurement, reassess |
| 6-8 weeks | Confirm stable BP in 120-130/80 mmHg range |
| Ongoing | Annual monitoring, reassess need for both agents |
Comprehensive Clinical Nephrology (7th Ed.) specifically warns against sublingual short-acting nifedipine (causes precipitous hypotension/stroke/MI), and emphasizes that long-acting agents like amlodipine do not have a role in rapidly reducing BP in acute settings - but are the ideal agents for long-term BP control. The problem here is that two effective long-acting agents together have now overshot the target.
50 female came with BP 200/110 diagoned as hypertensive urgency now on Amlodipine 5 and losartan 50 mg came for follow up after 3 months now her BP is 100/70 how to manage this case
| Symptom | Clinical Significance |
|---|---|
| Dizziness, lightheadedness | Cerebral hypoperfusion, orthostatic hypotension |
| Fatigue, weakness | Reduced cardiac output |
| Syncope or near-syncope | Urgent dose reduction needed |
| Ankle edema | Amlodipine-related (not hypotension per se) |
| Headache, blurred vision | Could be rebound or unrelated |
| Investigation | Purpose |
|---|---|
| Repeat BP both arms, 3 readings | Confirm true BP; rule out measurement artifact |
| Home BP log review (if available) | Assess if 100/70 is consistent or a one-off low reading |
| Serum creatinine + eGFR | Losartan at lower BP may reduce renal perfusion - check for AKI |
| Serum potassium | Losartan causes potassium retention; hypotension + ARB = hyperkalemia risk |
| Fasting glucose + lipids | Complete cardiovascular risk assessment at 3 months |
| ECG | Rule out LVH regression (a positive sign), arrhythmia |
| ABPM or 7-day home BP monitoring | Distinguish true hypotension from white-coat effect in reverse (now under-reading in office?) |
| TSH | Hypothyroidism can cause rebound BP changes; common in 50-year-old women |
| Urinalysis + uACR | Assess for proteinuria - guides whether ARB must be continued regardless of BP |
BP 100/70 at 3 months on Amlodipine 5 mg + Losartan 50 mg
Is she symptomatic? (dizziness, orthostasis, syncope)
│
YES ─┴─ NO
│ │
Reduce Confirm with home readings / ABPM
both agents │
immediately Still consistently 100-110/60-75?
│
YES → Reduce one agent (see below)
The Comprehensive Clinical Nephrology (7th Ed.) and Harrison's Principles of Internal Medicine 22E both emphasize that the BP treatment goal for uncomplicated hypertension is <130/80 mmHg (ACC/AHA 2017) or <140/90 mmHg (ESC/ESH 2018). A BP of 100/70 is significantly below both targets.
| Factor | Implication |
|---|---|
| Perimenopausal status | Estrogen fluctuations cause BP variability; consider hormonal evaluation |
| Bone health | Not directly relevant here, but thiazides are preferred over Losartan if diuretic needed in future for fracture protection |
| Pregnancy | At 50, unlikely but Losartan is teratogenic - confirm contraception status |
| Falls risk | Orthostatic hypotension at this age significantly increases falls and fracture risk - must be addressed |
| Cardiovascular risk recalculation | At 3 months, recalculate 10-year ASCVD risk; if low, less aggressive BP target acceptable |
Key teaching point: A BP of 100/70 after 3 months of treatment in a patient diagnosed with hypertensive urgency should prompt you to ask - "Did she truly have sustained hypertension, or was the urgency reading a one-time extreme?" The answer determines whether this patient needs lifelong therapy at all. - Comprehensive Clinical Nephrology, 7th Ed.; Harrison's Principles 22E
How to do diatery counselling for a patient of diabetes in opd
"diabetes mellitus"[MeSH Terms] AND "diet therapy"[MeSH Terms]
"Clinicians should be viewed as coaches who direct diabetes care, although patients are ultimately responsible for carrying out the complex daily self-management regimen." - Textbook of Family Medicine 9e
| Question | What you are assessing |
|---|---|
| "What do you typically eat in a day?" | Current diet baseline |
| "How many meals do you eat? At what times?" | Meal frequency and timing |
| "Do you eat rice/roti/bread? How much?" | Carbohydrate load per meal |
| "Do you drink tea/coffee with sugar?" | Hidden sugar intake |
| "Do you eat fruits? Which ones?" | Fruit sugar awareness needed |
| "Do you fast for religious reasons?" | Hypoglycemia risk during fasts |
| "Are you vegetarian/vegan?" | Protein source planning |
| "Who cooks at home? Can they be involved?" | Family engagement |
| "What is your budget for food?" | Practical feasibility |
"Your blood sugar rises because of carbohydrates - rice, roti, bread, sugar, fruits. Your body cannot process these fast enough. The goal is not to stop eating these, but to eat less of them at one time, eat more frequently in smaller portions, and choose slower-digesting forms."
"Monitor carbohydrate intake in regard to calories and set limits for meals to reduce postprandial glycemia... Avoid fructose- and sucrose-containing beverages and minimize consumption of foods with added sugar." - Harrison's Principles of Internal Medicine 22E
| High GI (avoid/limit) | Low GI (prefer) |
|---|---|
| White rice, white bread, maida | Brown rice, whole wheat, oats |
| Sugar, jaggery, honey | Dals, legumes, barley |
| Fruit juice, cold drinks | Whole fruits (in moderation) |
| Potato (especially mashed) | Sweet potato, yam |
| Cornflakes, puffed rice | Oatmeal, daliya |
"Use of the glycemic index may reduce postprandial glucose excursions and improve glycemic control." - Harrison's 22E
"Optimal percentage of protein in diet is not known; should be individualized." - Harrison's 22E
"Encourage Mediterranean-style diet rich in monounsaturated and polyunsaturated fatty acids. Minimal or no trans fat consumption." - Harrison's 22E
| Avoid completely | Allowed |
|---|---|
| Cold drinks, packaged juices | Water, buttermilk (chaas), plain lassi |
| Energy drinks, packed flavoured milk | Green tea, herbal teas (no sugar) |
| Sweet tea/coffee (4+ cups/day) | 1-2 cups tea/coffee with no sugar or stevia |
| Packaged soups, instant noodles | Homemade thin soups |
| Alcohol (or strict limits if unavoidable) | Coconut water (in moderation - contains sugar) |
"Sodium intake as advised for general population: <2300 mg/d." - Harrison's 22E
┌─────────────────────────────────────────────┐
│ YOUR DIABETIC MEAL PLATE │
│ │
│ ½ plate = NON-STARCHY VEGETABLES │
│ (salad, sabzi, soup) │
│ │
│ ¼ plate = WHOLE GRAINS / CARBS │
│ (1-2 rotis OR ½ cup rice) │
│ │
│ ¼ plate = PROTEIN │
│ (dal, curd, egg, chicken, paneer) │
│ │
│ + 1 small fruit OR glass of buttermilk │
└─────────────────────────────────────────────┘
| Time | Meal |
|---|---|
| 7:00-8:00 AM | Breakfast (must not skip) |
| 10:30-11:00 AM | Mid-morning snack (handful of nuts or 1 fruit) |
| 1:00-1:30 PM | Lunch |
| 4:00-4:30 PM | Evening snack (roasted chana, sprouts, handful nuts) |
| 7:30-8:30 PM | Dinner (lighter than lunch; early preferred) |
"Note risk of hypoglycemia associated with religious fasting." - Harrison's 22E
"Encourage modest weight reduction of 5%-10% from baseline." - Textbook of Family Medicine 9e
| Parameter | Target |
|---|---|
| HbA1c | ≤7.0% |
| Fasting blood glucose | 70-130 mg/dL |
| 2-hour post-meal glucose | <180 mg/dL |
| Blood pressure | <140/80 mmHg |
| LDL cholesterol | <100 mg/dL |
| Triglycerides | <150 mg/dL |
"Dietary advice should be individualized, acknowledging personal preferences, cultural, and religious traditions." - Harrison's Principles of Internal Medicine 22E (2025, McGraw Hill)
Create a diabetes nutrition handout or visual guide for OPD
ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or missing"
python3 -c "import reportlab; print('reportlab ok')" && python3 -c "from reportlab.lib.pagesizes import A4; print('A4 ok')"
~/diabetes-handout/create_handout.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm, cm
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, KeepTogether
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import Flowable
import os
os.makedirs("/home/daytona/workspace/diabetes-handout", exist_ok=True)
OUTPUT = "/home/daytona/workspace/diabetes-handout/Diabetes_Nutrition_Handout.pdf"
# ── Colour palette ──────────────────────────────────────────────────────────
GREEN = colors.HexColor("#2E7D32") # dark green
LIGHT_GRN = colors.HexColor("#E8F5E9") # mint background
MED_GRN = colors.HexColor("#66BB6A") # medium green
RED = colors.HexColor("#C62828") # danger red
LIGHT_RED = colors.HexColor("#FFEBEE") # light red
ORANGE = colors.HexColor("#E65100") # orange accent
LIGHT_ORG = colors.HexColor("#FFF3E0") # light orange
BLUE = colors.HexColor("#1565C0") # blue accent
LIGHT_BLUE = colors.HexColor("#E3F2FD") # light blue
TEAL = colors.HexColor("#00695C") # teal
LIGHT_TEAL = colors.HexColor("#E0F2F1") # light teal
GREY_DARK = colors.HexColor("#37474F")
GREY_LIGHT = colors.HexColor("#ECEFF1")
WHITE = colors.white
YELLOW = colors.HexColor("#F9A825")
LIGHT_YEL = colors.HexColor("#FFFDE7")
# ── Styles ───────────────────────────────────────────────────────────────────
base = getSampleStyleSheet()
def make_style(name, parent="Normal", **kw):
s = ParagraphStyle(name, parent=base[parent], **kw)
return s
title_style = make_style("Title2", "Normal",
fontSize=22, leading=26, textColor=WHITE, alignment=TA_CENTER,
fontName="Helvetica-Bold")
subtitle_style = make_style("Sub", "Normal",
fontSize=11, leading=14, textColor=WHITE, alignment=TA_CENTER,
fontName="Helvetica")
section_title = make_style("SecTitle", "Normal",
fontSize=12, leading=15, textColor=WHITE,
fontName="Helvetica-Bold", alignment=TA_LEFT)
body = make_style("Body2", "Normal",
fontSize=9.5, leading=13, textColor=GREY_DARK,
fontName="Helvetica")
body_bold = make_style("BodyBold", "Normal",
fontSize=9.5, leading=13, textColor=GREY_DARK,
fontName="Helvetica-Bold")
bullet_style = make_style("Bullet", "Normal",
fontSize=9, leading=12.5, textColor=GREY_DARK,
fontName="Helvetica", leftIndent=8)
small_style = make_style("Small", "Normal",
fontSize=8, leading=11, textColor=GREY_DARK,
fontName="Helvetica")
footer_style = make_style("Footer", "Normal",
fontSize=7.5, leading=10, textColor=colors.HexColor("#78909C"),
fontName="Helvetica-Oblique", alignment=TA_CENTER)
tip_style = make_style("Tip", "Normal",
fontSize=9, leading=12, textColor=ORANGE,
fontName="Helvetica-Bold", alignment=TA_CENTER)
# ── Custom Flowable: Coloured Box Header ─────────────────────────────────────
class BoxHeader(Flowable):
def __init__(self, text, subtext=None, bg=GREEN, width=None, height=None):
Flowable.__init__(self)
self.text = text
self.subtext = subtext
self.bg = bg
self._width = width or (A4[0] - 2*cm)
self._height = height or (subtext and 30*mm or 20*mm)
def draw(self):
c = self.canv
c.setFillColor(self.bg)
c.roundRect(0, 0, self._width, self._height, 6, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 18 if not self.subtext else 20)
y_title = self._height/2 + (5 if self.subtext else 0)
c.drawCentredString(self._width/2, y_title, self.text)
if self.subtext:
c.setFont("Helvetica", 10)
c.drawCentredString(self._width/2, self._height/2 - 8, self.subtext)
def wrap(self, availW, availH):
return self._width, self._height
class SectionHeader(Flowable):
def __init__(self, emoji, title, bg=GREEN, width=None):
Flowable.__init__(self)
self.emoji = emoji
self.title = title
self.bg = bg
self._width = width or (A4[0] - 2*cm)
self._height = 10*mm
def draw(self):
c = self.canv
c.setFillColor(self.bg)
c.roundRect(0, 0, self._width, self._height, 4, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 11)
c.drawString(8, 3, f" {self.emoji} {self.title}")
def wrap(self, availW, availH):
return self._width, self._height
class PlateVisual(Flowable):
"""Draws the diabetes meal plate graphic."""
def __init__(self, width=110*mm, height=110*mm):
Flowable.__init__(self)
self._width = width
self._height = height
def wrap(self, availW, availH):
return self._width, self._height
def draw(self):
import math
c = self.canv
cx = self._width / 2
cy = self._height / 2
r = 46*mm
# Outer plate shadow
c.setFillColor(colors.HexColor("#B0BEC5"))
c.circle(cx+1.5, cy-1.5, r+3*mm, fill=1, stroke=0)
# Plate rim
c.setFillColor(colors.HexColor("#FAFAFA"))
c.circle(cx, cy, r+3*mm, fill=1, stroke=0)
# ── Segment 1: Vegetables (bottom half = 180°) ────────────────────
c.setFillColor(colors.HexColor("#A5D6A7"))
p = c.beginPath()
p.moveTo(cx, cy)
p.arcTo(cx-r, cy-r, cx+r, cy+r, startAng=0, extent=180)
p.close()
c.drawPath(p, fill=1, stroke=0)
# ── Segment 2: Grains (top-left = 90°) ───────────────────────────
c.setFillColor(colors.HexColor("#FFCC80"))
p = c.beginPath()
p.moveTo(cx, cy)
p.arcTo(cx-r, cy-r, cx+r, cy+r, startAng=180, extent=90)
p.close()
c.drawPath(p, fill=1, stroke=0)
# ── Segment 3: Protein (top-right = 90°) ─────────────────────────
c.setFillColor(colors.HexColor("#EF9A9A"))
p = c.beginPath()
p.moveTo(cx, cy)
p.arcTo(cx-r, cy-r, cx+r, cy+r, startAng=270, extent=90)
p.close()
c.drawPath(p, fill=1, stroke=0)
# Dividers
c.setStrokeColor(WHITE)
c.setLineWidth(2)
c.line(cx, cy, cx, cy+r) # vertical top
c.line(cx, cy, cx-r, cy) # horizontal left
c.line(cx, cy, cx+r, cy) # horizontal right
# Centre circle
c.setFillColor(WHITE)
c.circle(cx, cy, 7*mm, fill=1, stroke=0)
# Labels inside segments
c.setFillColor(colors.HexColor("#1B5E20"))
c.setFont("Helvetica-Bold", 8)
c.drawCentredString(cx, cy - 28*mm, "1/2 PLATE")
c.setFont("Helvetica", 7)
c.drawCentredString(cx, cy - 35*mm, "Vegetables")
c.drawCentredString(cx, cy - 41*mm, "(sabzi, salad)")
c.setFillColor(colors.HexColor("#E65100"))
c.setFont("Helvetica-Bold", 8)
c.drawCentredString(cx - 23*mm, cy + 22*mm, "1/4 PLATE")
c.setFont("Helvetica", 7)
c.drawCentredString(cx - 23*mm, cy + 15*mm, "Grains")
c.drawCentredString(cx - 23*mm, cy + 9*mm, "(roti/rice)")
c.setFillColor(colors.HexColor("#B71C1C"))
c.setFont("Helvetica-Bold", 8)
c.drawCentredString(cx + 23*mm, cy + 22*mm, "1/4 PLATE")
c.setFont("Helvetica", 7)
c.drawCentredString(cx + 23*mm, cy + 15*mm, "Protein")
c.drawCentredString(cx + 23*mm, cy + 9*mm, "(dal/curd/egg)")
# Title below
c.setFillColor(GREEN)
c.setFont("Helvetica-Bold", 9.5)
c.drawCentredString(cx, 4*mm, "The Diabetes Meal Plate")
# ── Document ─────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
rightMargin=1.8*cm, leftMargin=1.8*cm,
topMargin=1.5*cm, bottomMargin=1.5*cm
)
W = A4[0] - 3.6*cm # usable width
story = []
# ════════════════════════════════════════════════════════════════════════════
# TITLE BANNER
# ════════════════════════════════════════════════════════════════════════════
story.append(BoxHeader(
"DIABETES DIET GUIDE",
subtext="Your Daily Nutrition Plan for Better Blood Sugar Control",
bg=GREEN, width=W, height=28*mm
))
story.append(Spacer(1, 5*mm))
# ════════════════════════════════════════════════════════════════════════════
# TARGETS ROW
# ════════════════════════════════════════════════════════════════════════════
story.append(SectionHeader("🎯", "YOUR GLUCOSE TARGETS", bg=TEAL, width=W))
story.append(Spacer(1, 2*mm))
targets = [
["HbA1c", "Fasting Glucose", "Post-meal (2 hr)", "Blood Pressure"],
["≤ 7.0%", "70–130 mg/dL", "< 180 mg/dL", "< 140/80 mmHg"],
]
t = Table(targets, colWidths=[W/4]*4)
t.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,0), 9),
("BACKGROUND", (0,1), (-1,1), LIGHT_TEAL),
("FONTNAME", (0,1), (-1,1), "Helvetica-Bold"),
("FONTSIZE", (0,1), (-1,1), 11),
("TEXTCOLOR", (0,1), (-1,1), TEAL),
("ALIGN", (0,0), (-1,-1), "CENTER"),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("ROWBACKGROUNDS",(0,0),(-1,-1),[TEAL, LIGHT_TEAL]),
("GRID", (0,0), (-1,-1), 0.5, WHITE),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING",(0,0), (-1,-1), 5),
("ROUNDEDCORNERS", [4]),
]))
story.append(t)
story.append(Spacer(1, 4*mm))
# ════════════════════════════════════════════════════════════════════════════
# TWO-COLUMN LAYOUT: Plate visual + Meal timing
# ════════════════════════════════════════════════════════════════════════════
plate = PlateVisual(width=95*mm, height=100*mm)
timing_data = [
["Time", "Meal / Snack"],
["7:00 – 8:00 AM", "Breakfast (DO NOT skip)"],
["10:30 – 11:00 AM","Mid-morning snack"],
["1:00 – 1:30 PM", "Lunch"],
["4:00 – 4:30 PM", "Evening snack"],
["7:30 – 8:30 PM", "Dinner (light & early)"],
["Bedtime\n(if on insulin)","Small snack: curd / nuts"],
]
tw = Table(timing_data, colWidths=[38*mm, 52*mm])
tw.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), BLUE),
("TEXTCOLOR", (0,0), (-1,0), WHITE),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,-1), 8.5),
("ROWBACKGROUNDS",(0,1),(-1,-1),[LIGHT_BLUE, WHITE]),
("ALIGN", (0,0), (-1,-1), "LEFT"),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#B0BEC5")),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING",(0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 5),
("FONTNAME", (0,1), (-1,-1), "Helvetica"),
("FONTNAME", (0,2), (0,2), "Helvetica-Bold"),
("BACKGROUND", (0,2), (-1,2), LIGHT_BLUE),
("BACKGROUND", (0,4), (-1,4), LIGHT_BLUE),
("BACKGROUND", (0,6), (-1,6), LIGHT_BLUE),
]))
timing_section = Table(
[[
plate,
Table([
[Paragraph("<b>MEAL TIMING</b>", make_style("BH","Normal",
fontSize=10, fontName="Helvetica-Bold",
textColor=BLUE, alignment=TA_CENTER))],
[tw],
[Spacer(1,2*mm)],
[Paragraph(
"<i>Never skip meals. Eat every 3-4 hours.\nConsistency = better sugar control.</i>",
make_style("tip2","Normal", fontSize=8, fontName="Helvetica-Oblique",
textColor=ORANGE, alignment=TA_CENTER)
)],
], colWidths=[90*mm]),
]],
colWidths=[95*mm, 90*mm]
)
timing_section.setStyle(TableStyle([
("VALIGN", (0,0),(-1,-1), "TOP"),
("LEFTPADDING", (0,0),(-1,-1), 0),
("RIGHTPADDING", (0,0),(-1,-1), 0),
]))
story.append(timing_section)
story.append(Spacer(1, 4*mm))
# ════════════════════════════════════════════════════════════════════════════
# FOODS: CHOOSE vs LIMIT vs AVOID
# ════════════════════════════════════════════════════════════════════════════
story.append(SectionHeader("🥗", "FOOD GUIDE — CHOOSE / LIMIT / AVOID", bg=GREEN, width=W))
story.append(Spacer(1, 2*mm))
food_headers = [
Paragraph("✅ CHOOSE FREELY", make_style("fh","Normal",
fontSize=10, fontName="Helvetica-Bold", textColor=GREEN, alignment=TA_CENTER)),
Paragraph("⚠️ EAT IN MODERATION", make_style("fh2","Normal",
fontSize=10, fontName="Helvetica-Bold", textColor=ORANGE, alignment=TA_CENTER)),
Paragraph("🚫 AVOID / LIMIT", make_style("fh3","Normal",
fontSize=10, fontName="Helvetica-Bold", textColor=RED, alignment=TA_CENTER)),
]
def bullets(items, color=GREY_DARK):
return Paragraph(
"".join(f"• {i}<br/>" for i in items),
make_style(f"bl{id(items)}", "Normal",
fontSize=8.5, leading=13, textColor=color,
fontName="Helvetica", leftIndent=4)
)
choose_items = [
"All non-starchy vegetables",
"Spinach, bhindi, karela",
"Cucumber, tomato, cabbage",
"Dal, legumes, chana",
"Whole wheat roti",
"Oats, daliya (broken wheat)",
"Brown rice (small portion)",
"Low-fat curd, buttermilk",
"Eggs, fish, chicken (no skin)",
"Nuts: 5–6 almonds / walnuts",
"Water, green tea (no sugar)",
"Guava, papaya, jamun, apple",
]
limit_items = [
"White rice (½ cup cooked)",
"Potato (boiled, not fried)",
"Fruits: 1 serving/day",
"(banana, mango: limit)",
"Low-fat paneer",
"1–2 tsp ghee/day",
"Coconut (high sat. fat)",
"Tea/coffee (no sugar)",
"Sweet potato, peas",
"Whole milk → prefer skim",
"Lean red meat (once/week)",
"Whole fruits (not juice)",
]
avoid_items = [
"SUGAR — in any form",
"Cold drinks, packaged juice",
"White bread, maida products",
"Biscuits, cakes, sweets",
"Deep-fried foods",
"Vanaspati / trans fats",
"Packaged / instant noodles",
"Alcohol",
"Pickles, papads (high salt)",
"Fruit juice — even 'natural'",
"Energy drinks",
"Processed meats",
]
food_table = Table(
[[food_headers[0], food_headers[1], food_headers[2]],
[bullets(choose_items, GREEN), bullets(limit_items, ORANGE), bullets(avoid_items, RED)]],
colWidths=[W/3]*3
)
food_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (0,-1), LIGHT_GRN),
("BACKGROUND", (1,0), (1,-1), LIGHT_ORG),
("BACKGROUND", (2,0), (2,-1), LIGHT_RED),
("ALIGN", (0,0), (-1,-1), "LEFT"),
("VALIGN", (0,0), (-1,-1), "TOP"),
("GRID", (0,0), (-1,-1), 0.5, WHITE),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING",(0,0), (-1,-1), 6),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 4),
("LINEBELOW", (0,0), (-1,0), 1, WHITE),
]))
story.append(food_table)
story.append(Spacer(1, 4*mm))
# ════════════════════════════════════════════════════════════════════════════
# CARBS & GLYCEMIC INDEX TABLE
# ════════════════════════════════════════════════════════════════════════════
story.append(SectionHeader("📊", "GLYCEMIC INDEX (GI) — Choose LOW GI Foods", bg=BLUE, width=W))
story.append(Spacer(1, 2*mm))
gi_data = [
[Paragraph("<b>HIGH GI — Spike Sugar Fast (AVOID)</b>",
make_style("gih","Normal",fontSize=9,fontName="Helvetica-Bold",textColor=RED,alignment=TA_CENTER)),
Paragraph("<b>MEDIUM GI — OK in Small Amounts</b>",
make_style("gim","Normal",fontSize=9,fontName="Helvetica-Bold",textColor=ORANGE,alignment=TA_CENTER)),
Paragraph("<b>LOW GI — Slow Release (PREFER)</b>",
make_style("gil","Normal",fontSize=9,fontName="Helvetica-Bold",textColor=GREEN,alignment=TA_CENTER))],
[bullets(["White rice, white bread","Cornflakes, puffed rice",
"Mashed potato","Sugar, jaggery, honey",
"Fruit juice, cold drinks","Instant oats"], RED),
bullets(["White roti (limit qty)","Boiled potato","Banana, grapes",
"Basmati rice (small)","Whole milk","Pineapple"], ORANGE),
bullets(["Whole wheat roti","Brown rice, oats","Dal, rajma, chana",
"Most vegetables","Apple, guava, pear",
"Low-fat curd / buttermilk"], GREEN)],
]
gi_table = Table(gi_data, colWidths=[W/3]*3)
gi_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (0,-1), LIGHT_RED),
("BACKGROUND", (1,0), (1,-1), LIGHT_ORG),
("BACKGROUND", (2,0), (2,-1), LIGHT_GRN),
("ALIGN", (0,0), (-1,-1), "LEFT"),
("VALIGN", (0,0), (-1,-1), "TOP"),
("GRID", (0,0), (-1,-1), 0.5, WHITE),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING",(0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
]))
story.append(gi_table)
story.append(Spacer(1, 4*mm))
# ════════════════════════════════════════════════════════════════════════════
# SPECIAL TIPS BOX
# ════════════════════════════════════════════════════════════════════════════
story.append(SectionHeader("💡", "IMPORTANT TIPS", bg=ORANGE, width=W))
story.append(Spacer(1, 2*mm))
tips = [
("🥣 Breakfast", "NEVER skip. Have within 1 hour of waking. Include protein (egg / curd / dal)."),
("🍽️ Portion Size", "Use a smaller plate. Fill ½ vegetables, ¼ grains, ¼ protein."),
("🧃 No Juice", "Even 'natural' fruit juice spikes sugar fast. Eat whole fruit instead."),
("🧂 Limit Salt", "Less than 5 g/day (1 teaspoon). Avoid pickles, papads, packaged food."),
("💧 Stay Hydrated", "Drink 8–10 glasses of water/day. Avoid sweet drinks completely."),
("🏃 Exercise Daily", "30 min walk/day reduces blood sugar by 10–20 mg/dL."),
("🌙 Eat Early", "Have dinner before 8:30 PM. Avoid eating late at night."),
("💊 If on Insulin", "Never skip a meal after taking insulin — always eat on time."),
]
tips_data = [[
Paragraph(f"<b>{t[0]}</b><br/><font size='8'>{t[1]}</font>",
make_style(f"tip{i}","Normal",fontSize=9,leading=13,
textColor=GREY_DARK,fontName="Helvetica",leftIndent=3))
for t in tips[i*4:(i+1)*4]
] for i in range(2)]
tips_table = Table(tips_data, colWidths=[W/4]*4)
tips_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), LIGHT_YEL),
("GRID", (0,0), (-1,-1), 0.5, WHITE),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING",(0,0), (-1,-1), 6),
("LEFTPADDING", (0,0), (-1,-1), 6),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story.append(tips_table)
story.append(Spacer(1, 4*mm))
# ════════════════════════════════════════════════════════════════════════════
# SAMPLE MEAL PLAN
# ════════════════════════════════════════════════════════════════════════════
story.append(SectionHeader("📋", "SAMPLE DAY MEAL PLAN", bg=TEAL, width=W))
story.append(Spacer(1, 2*mm))
meal_plan = [
["Meal", "Vegetarian Option", "Non-Vegetarian Option"],
["Breakfast\n7:00–8:00 AM",
"2 whole wheat rotis + 1 cup vegetable sabzi + 1 cup low-fat curd",
"2 egg whites omelette + 1 whole wheat toast + green tea (no sugar)"],
["Mid-Morning\n10:30–11:00 AM",
"6 almonds + 1 small guava or apple",
"6 walnuts + 1 small orange"],
["Lunch\n1:00–1:30 PM",
"½ cup brown rice + 1 cup dal + large salad + 1 small bowl sabzi",
"½ cup rice + grilled fish/chicken (100g) + salad + sabzi"],
["Evening Snack\n4:00–4:30 PM",
"Roasted chana (30g) OR cucumber slices with hummus",
"Boiled egg (1) OR handful of mixed nuts"],
["Dinner\n7:30–8:00 PM",
"2 whole wheat rotis + paneer bhurji (100g) + soup",
"2 rotis + chicken curry (lean, no skin, 100g) + sabzi"],
]
mp = Table(meal_plan, colWidths=[28*mm, (W-28*mm)/2, (W-28*mm)/2])
mp.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),
("ROWBACKGROUNDS",(0,1),(-1,-1),[LIGHT_TEAL, WHITE]),
("ALIGN", (0,0), (0,-1), "CENTER"),
("ALIGN", (1,0), (-1,-1), "LEFT"),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#B0BEC5")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 5),
("FONTNAME", (0,1), (0,-1), "Helvetica-Bold"),
("TEXTCOLOR", (0,1), (0,-1), TEAL),
]))
story.append(mp)
story.append(Spacer(1, 5*mm))
# ════════════════════════════════════════════════════════════════════════════
# 10 COMMANDMENTS BOTTOM STRIP
# ════════════════════════════════════════════════════════════════════════════
commandments = [
"Eat on time",
"Less rice/roti",
"Half plate = vegetables",
"Choose whole grains",
"No sugar / sweet drinks",
"Fruits — not juice",
"Protein at every meal",
"Reduce oil; no trans fats",
"Drink 8 glasses of water",
"Walk 30 minutes daily",
]
nums = [[Paragraph(
f"<b>{i+1}.</b> {commandments[i]}",
make_style(f"cmd{i}","Normal",fontSize=8.5,leading=12,
textColor=GREY_DARK,fontName="Helvetica")
) for i in range(5)], [Paragraph(
f"<b>{i+6}.</b> {commandments[i+5]}",
make_style(f"cmd2{i}","Normal",fontSize=8.5,leading=12,
textColor=GREY_DARK,fontName="Helvetica")
) for i in range(5)]]
cmd_hdr = Table(
[[Paragraph("10 RULES FOR DIABETES DIET SUCCESS",
make_style("cmdhdr","Normal",fontSize=11,fontName="Helvetica-Bold",
textColor=WHITE,alignment=TA_CENTER))]],
colWidths=[W])
cmd_hdr.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), GREEN),
("TOPPADDING", (0,0),(-1,-1), 5),
("BOTTOMPADDING",(0,0),(-1,-1),5),
]))
story.append(cmd_hdr)
cmd_table = Table(nums, colWidths=[W/5]*5)
cmd_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), LIGHT_GRN),
("GRID", (0,0), (-1,-1), 0.5, WHITE),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING",(0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
story.append(cmd_table)
story.append(Spacer(1, 3*mm))
# ════════════════════════════════════════════════════════════════════════════
# FOOTER
# ════════════════════════════════════════════════════════════════════════════
story.append(HRFlowable(width=W, color=colors.HexColor("#B0BEC5"), thickness=0.5))
story.append(Spacer(1, 2*mm))
story.append(Paragraph(
"This handout is for educational purposes only. Please follow your doctor's specific instructions. "
"Consult a certified diabetes educator or registered dietician for a personalised meal plan.\n"
"Based on ADA Standards of Care | Harrison's Principles of Internal Medicine 22E | Textbook of Family Medicine 9e",
footer_style
))
# ── Build ───────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF created: {OUTPUT}")
cd /home/daytona/workspace/diabetes-handout && python3 create_handout.py 2>&1
ls -lh /home/daytona/workspace/diabetes-handout/Diabetes_Nutrition_Handout.pdf
cd /home/daytona/workspace/diabetes-handout && python3 -c " from pypdf import PdfReader r = PdfReader('Diabetes_Nutrition_Handout.pdf') print('Pages:', len(r.pages)) print('Page size:', r.pages[0].mediabox) "
cd /home/daytona/workspace/diabetes-handout && python3 -c " import pdfplumber with pdfplumber.open('Diabetes_Nutrition_Handout.pdf') as pdf: for i, page in enumerate(pdf.pages): print(f'--- PAGE {i+1} ---') print(page.extract_text()[:800]) print() "
Diabetes Nutrition Handout
PDF Document · PDF
| Section | Content |
|---|---|
| Title banner | Colour-coded header with purpose statement |
| Glucose Targets | HbA1c, fasting, post-meal, BP targets in a table |
| Diabetes Meal Plate | Visual pie-chart plate (½ vegetables / ¼ grains / ¼ protein) |
| Meal Timing | 5-meal schedule from breakfast to bedtime snack |
| Food Guide | 3-column green/orange/red: Choose / Limit / Avoid |
| Glycemic Index Table | High GI vs Medium GI vs Low GI foods |
| 8 Important Tips | Breakfast, portion size, juice warning, salt, hydration, exercise, meal timing, insulin precaution |
| Sample Day Meal Plan | Veg + Non-veg options for all 5 meals |
| 10 Rules for Success | Quick takeaway strip for patients |
| Footer | Evidence source + referral note |