Please suggest diet for gall stone
"gallstone" AND "diet" AND "prevention"
gallstone diet recommendations foods to eat avoid 2024
"cholelithiasis" AND "dietary"
"gallbladder stones" AND "nutrition"
| Tip | Why it Matters |
|---|---|
| Eat small, frequent meals | Prevents gallbladder stasis from prolonged fasting |
| Never skip meals | Regular eating stimulates CCK release and gallbladder emptying |
| Keep fat portions small per meal | Reduces intensity of gallbladder contraction |
| Cook by steaming, baking, or boiling | Avoids adding saturated fats |
| Read food labels | Watch for hidden trans fats and palm/coconut oil |
Important note: If you already have symptomatic gallstones and are experiencing biliary colic, dietary changes help manage symptoms but do not dissolve existing stones. Consult a gastroenterologist or surgeon regarding whether medical or surgical treatment (laparoscopic cholecystectomy) is needed. A meta-analysis in Clinical Gastroenterology and Hepatology found that diets higher in fat during calorie-restricted weight loss (combined with ursodeoxycholic acid when needed) actually help prevent new gallstone formation - showing fat intake should be moderate, not zero.
Create a printable quick reference guide for gallstone-friendly meal planning
mkdir -p /home/daytona/workspace/gallstone-diet && ls /home/daytona/workspace/
~/gallstone-diet/create_guide.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import BaseDocTemplate, PageTemplate, Frame
OUTPUT = "/home/daytona/workspace/gallstone-diet/Gallstone_Diet_Quick_Reference.pdf"
# ── Colour palette ─────────────────────────────────────────────────────────
TEAL = colors.HexColor("#1A7A7A")
TEAL_LIGHT = colors.HexColor("#E8F5F5")
GREEN = colors.HexColor("#2E7D32")
GREEN_LIGHT= colors.HexColor("#E8F5E9")
RED = colors.HexColor("#C62828")
RED_LIGHT = colors.HexColor("#FFEBEE")
AMBER = colors.HexColor("#E65100")
AMBER_LIGHT= colors.HexColor("#FFF3E0")
GREY_DARK = colors.HexColor("#37474F")
GREY_LIGHT = colors.HexColor("#F5F7F8")
WHITE = colors.white
BLACK = colors.HexColor("#212121")
# ── Document ───────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
leftMargin=1.5*cm, rightMargin=1.5*cm,
topMargin=1.8*cm, bottomMargin=1.8*cm,
title="Gallstone Diet Quick Reference Guide",
author="Orris Medical"
)
W, H = A4
CONTENT_W = W - 3*cm
# ── Styles ─────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()
def style(name, **kw):
s = ParagraphStyle(name, **kw)
return s
TITLE_S = style("Title_S",
fontName="Helvetica-Bold", fontSize=20, textColor=WHITE,
alignment=TA_CENTER, leading=26, spaceAfter=2)
SUB_S = style("Sub_S",
fontName="Helvetica", fontSize=10, textColor=WHITE,
alignment=TA_CENTER, leading=14)
SEC_HDR = style("Sec_Hdr",
fontName="Helvetica-Bold", fontSize=12, textColor=WHITE,
alignment=TA_LEFT, leading=16, leftIndent=6)
BODY = style("Body",
fontName="Helvetica", fontSize=9, textColor=BLACK,
leading=13, spaceAfter=2, leftIndent=4)
BODY_BOLD = style("BodyBold",
fontName="Helvetica-Bold", fontSize=9, textColor=BLACK,
leading=13, spaceAfter=1, leftIndent=4)
BULLET = style("Bullet",
fontName="Helvetica", fontSize=8.5, textColor=BLACK,
leading=12, leftIndent=14, spaceAfter=1,
bulletIndent=5, bulletFontName="Helvetica", bulletFontSize=9)
TIP_S = style("Tip",
fontName="Helvetica-Oblique", fontSize=8, textColor=GREY_DARK,
leading=11, leftIndent=6, spaceAfter=2)
CELL_HDR = style("CellHdr",
fontName="Helvetica-Bold", fontSize=8, textColor=WHITE,
alignment=TA_CENTER, leading=11)
CELL_BODY= style("CellBody",
fontName="Helvetica", fontSize=8, textColor=BLACK,
leading=11, spaceAfter=1)
FOOTER_S = style("Footer",
fontName="Helvetica-Oblique", fontSize=7, textColor=GREY_DARK,
alignment=TA_CENTER, leading=9)
# ── Helper: coloured section header box ───────────────────────────────────
def section_header(text, bg_color):
data = [[Paragraph(text, SEC_HDR)]]
t = Table(data, colWidths=[CONTENT_W])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg_color),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING",(0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 8),
("ROUNDEDCORNERS", [4]),
]))
return t
def bullet(text, color=BLACK):
return Paragraph(f"<bullet>\u2022</bullet> {text}", BULLET)
def sp(h=0.15):
return Spacer(1, h*cm)
# ── Build content ──────────────────────────────────────────────────────────
story = []
# ── HEADER BANNER ──────────────────────────────────────────────────────────
banner_data = [[
Paragraph("Gallstone-Friendly Meal Planning", TITLE_S),
], [
Paragraph("Quick Reference Guide | Evidence-Based Dietary Recommendations", SUB_S),
]]
banner = Table(banner_data, colWidths=[CONTENT_W])
banner.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), TEAL),
("TOPPADDING", (0,0), (-1,-1), 10),
("BOTTOMPADDING", (0,0), (-1,-1), 8),
("LEFTPADDING", (0,0), (-1,-1), 10),
("ROUNDEDCORNERS",[6]),
]))
story.append(banner)
story.append(sp(0.4))
# ── WHY DIET MATTERS ──────────────────────────────────────────────────────
story.append(section_header("Why Diet Matters", TEAL))
story.append(sp(0.1))
story.append(Paragraph(
"Gallstones form when bile contains too much cholesterol or bilirubin, or when the "
"gallbladder does not empty properly. The right diet reduces cholesterol supersaturation "
"in bile, prevents gallbladder stasis, and lowers the risk of painful biliary colic.",
BODY))
story.append(sp(0.3))
# ── TWO COLUMN: EAT MORE / LIMIT & AVOID ──────────────────────────────────
eat_more_items = [
("<b>High-fibre foods</b> — oats, brown rice, whole wheat, lentils, beans", GREEN),
("<b>Vegetables</b> — broccoli, spinach, carrots, cauliflower, peas", GREEN),
("<b>Fruits</b> — apples, pears, berries, oranges, kiwi", GREEN),
("<b>Unsaturated fats</b> — olive oil (small amounts), avocado, nuts", GREEN),
("<b>Fatty fish</b> — salmon, mackerel, sardines (omega-3 rich)", GREEN),
("<b>Low-fat dairy</b> — skim milk, low-fat yogurt, paneer (small portions)", GREEN),
("<b>Coffee / green tea</b> — 1-2 cups/day (protective in studies)", GREEN),
("<b>Vitamin C foods</b> — citrus, bell peppers, tomatoes", GREEN),
("<b>Calcium-rich foods</b> — low-fat milk, fortified plant milk, tofu", GREEN),
("<b>Water</b> — 8-10 glasses per day", GREEN),
]
avoid_items = [
("<b>Fried foods</b> — french fries, fried chicken, pakoras", RED),
("<b>Saturated / trans fats</b> — butter, ghee (excess), cream, palm oil", RED),
("<b>Fatty red meat</b> — beef, lamb with visible fat, processed meats", RED),
("<b>Full-fat dairy</b> — full-cream milk, paneer (large), cheese", RED),
("<b>Refined carbs / sugar</b> — white bread, sweets, sugary drinks", RED),
("<b>Crash diets</b> — rapid weight loss >1.5 kg/week raises stone risk", RED),
("<b>Skipping meals</b> — causes bile stasis; always eat breakfast", RED),
("<b>Very high-cholesterol foods</b> — organ meats, egg yolks in excess", RED),
("<b>Excess alcohol</b> — promotes pigment stone formation", RED),
("<b>Carbonated / sugary drinks</b> — raise triglycerides", RED),
]
def build_food_col(items, bg, hdr_text, hdr_bg, tick):
col_data = [[Paragraph(hdr_text, CELL_HDR)]]
for txt, _ in items:
col_data.append([Paragraph(f"{tick} {txt}", CELL_BODY)])
return col_data, bg, hdr_bg
eat_col, _, _ = build_food_col(eat_more_items, GREEN_LIGHT, "EAT MORE / INCLUDE", GREEN, "✓")
avoid_col, _, _ = build_food_col(avoid_items, RED_LIGHT, "LIMIT / AVOID", RED, "✗")
max_rows = max(len(eat_col), len(avoid_col))
while len(eat_col) < max_rows:
eat_col.append([Paragraph("", CELL_BODY)])
while len(avoid_col) < max_rows:
avoid_col.append([Paragraph("", CELL_BODY)])
combined = [[eat_col[i][0], avoid_col[i][0]] for i in range(max_rows)]
half = (CONTENT_W - 0.3*cm) / 2
food_table = Table(combined, colWidths=[half, half], hAlign="CENTER")
ts = TableStyle([
# Header rows
("BACKGROUND", (0,0), (0,0), GREEN),
("BACKGROUND", (1,0), (1,0), RED),
# Body rows alternating
("BACKGROUND", (0,1), (0,-1), GREEN_LIGHT),
("BACKGROUND", (1,1), (1,-1), RED_LIGHT),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 4),
("LINEAFTER", (0,0), (0,-1), 0.5, colors.white),
("BOX", (0,0), (-1,-1), 0.5, TEAL_LIGHT),
("ROWBACKGROUNDS",(0,1), (0,-1), [GREEN_LIGHT, colors.HexColor("#F1FAF1")]),
("ROWBACKGROUNDS",(1,1), (1,-1), [RED_LIGHT, colors.HexColor("#FFF5F5")]),
])
food_table.setStyle(ts)
story.append(food_table)
story.append(sp(0.35))
# ── MEAL TIMING TIPS ──────────────────────────────────────────────────────
story.append(section_header("Meal Timing & Portion Tips", TEAL))
story.append(sp(0.1))
timing_data = [
[Paragraph("<b>Tip</b>", CELL_HDR), Paragraph("<b>Reason</b>", CELL_HDR)],
[Paragraph("Eat 3 regular meals; do not skip", CELL_BODY),
Paragraph("Regular meals stimulate gallbladder contraction, preventing bile stasis", CELL_BODY)],
[Paragraph("Keep fat portions small per meal", CELL_BODY),
Paragraph("Reduces the intensity of gallbladder contraction and pain risk", CELL_BODY)],
[Paragraph("Lose weight gradually (max 0.5-1 kg/week)", CELL_BODY),
Paragraph("Rapid weight loss >1.5 kg/week increases biliary cholesterol excretion", CELL_BODY)],
[Paragraph("Cook by steaming, baking, or boiling", CELL_BODY),
Paragraph("Avoids adding saturated fats; reduces total fat load per meal", CELL_BODY)],
[Paragraph("Stay well hydrated — 8-10 glasses water/day", CELL_BODY),
Paragraph("Dilutes bile, prevents concentration and gallstone precipitation", CELL_BODY)],
[Paragraph("Add nuts as a snack (small handful)", CELL_BODY),
Paragraph("Nuts are specifically noted as protective in biliary lipid studies", CELL_BODY)],
]
timing_table = Table(timing_data, colWidths=[CONTENT_W*0.38, CONTENT_W*0.62])
timing_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), TEAL),
("ROWBACKGROUNDS",(0,1), (-1,-1), [TEAL_LIGHT, WHITE]),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 6),
("LINEAFTER", (0,0), (0,-1), 0.5, colors.HexColor("#B2DFDB")),
("BOX", (0,0), (-1,-1), 0.5, TEAL_LIGHT),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story.append(timing_table)
story.append(sp(0.35))
# ── SAMPLE DAILY MENU ─────────────────────────────────────────────────────
story.append(section_header("Sample Day Menu", GREEN))
story.append(sp(0.1))
menu_data = [
[Paragraph("<b>Meal</b>", CELL_HDR), Paragraph("<b>Suggested Foods</b>", CELL_HDR)],
[Paragraph("Breakfast", CELL_BODY),
Paragraph("Oatmeal with berries + walnuts; 1 cup green tea or coffee", CELL_BODY)],
[Paragraph("Mid-Morning", CELL_BODY),
Paragraph("Apple or pear; handful of almonds", CELL_BODY)],
[Paragraph("Lunch", CELL_BODY),
Paragraph("Grilled fish or chicken + steamed vegetables + brown rice/chapati; water", CELL_BODY)],
[Paragraph("Afternoon Snack", CELL_BODY),
Paragraph("Low-fat yogurt with banana; 1 glass water", CELL_BODY)],
[Paragraph("Dinner", CELL_BODY),
Paragraph("Lentil soup/dal + whole wheat chapati + vegetable side; water", CELL_BODY)],
[Paragraph("Avoid", CELL_BODY),
Paragraph("Fried snacks, full-fat sweets, sugary drinks at any meal", CELL_BODY)],
]
menu_table = Table(menu_data, colWidths=[CONTENT_W*0.22, CONTENT_W*0.78])
menu_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), GREEN),
("ROWBACKGROUNDS",(0,1), (-1,-1), [GREEN_LIGHT, WHITE]),
("BACKGROUND", (0,-1),(-1,-1), RED_LIGHT),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 6),
("LINEAFTER", (0,0), (0,-1), 0.5, colors.HexColor("#C8E6C9")),
("BOX", (0,0), (-1,-1), 0.5, colors.HexColor("#C8E6C9")),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story.append(menu_table)
story.append(sp(0.35))
# ── WARNING SIGNS ─────────────────────────────────────────────────────────
story.append(section_header("Warning Signs — Seek Medical Attention", RED))
story.append(sp(0.1))
warn_items = [
"Severe right upper abdominal pain (biliary colic) lasting more than 30 minutes",
"Pain radiating to the right shoulder or back",
"Fever with chills and jaundice (yellowing of skin/eyes) — possible cholangitis",
"Nausea and vomiting with severe abdominal pain",
"Dark urine and pale stools — signs of bile duct obstruction",
]
for w in warn_items:
story.append(Paragraph(f"<font color='#C62828'>►</font> {w}", BULLET))
story.append(sp(0.2))
story.append(Paragraph(
"<i>Note: Diet helps manage symptoms and prevent new stones, but does NOT dissolve "
"existing gallstones. Consult a gastroenterologist or surgeon regarding medical or "
"surgical treatment (laparoscopic cholecystectomy) if symptomatic.</i>",
TIP_S))
story.append(sp(0.3))
# ── FOOTER ────────────────────────────────────────────────────────────────
story.append(HRFlowable(width=CONTENT_W, thickness=0.5, color=TEAL_LIGHT))
story.append(sp(0.1))
story.append(Paragraph(
"Sources: Yamada's Textbook of Gastroenterology (7e) | Mulholland & Greenfield's Surgery (7e) | "
"Clin Gastroenterol Hepatol 2014 (PMID 24321208) | This guide is for informational purposes only — "
"always follow your physician's advice.",
FOOTER_S))
# ── BUILD ──────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF created: {OUTPUT}")
python /home/daytona/workspace/gallstone-diet/create_guide.py
ls -lh /home/daytona/workspace/gallstone-diet/
Gallstone Diet Quick Reference
PDF Document · PDF