Please give a diet plan what to eat or what to not eat after radical nephrectomy in a known case of DM and hypertension please give in a printable format pdf
mkdir -p /tmp/workspace/nephrectomy-diet && ls /tmp/workspace/
cat << 'PYEOF' > /tmp/workspace/nephrectomy-diet/generate_diet_pdf.py from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.units import cm from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable, KeepTogether) from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY from reportlab.pdfbase import pdfmetrics doc = SimpleDocTemplate( "/tmp/workspace/nephrectomy-diet/Post_Nephrectomy_Diet_Plan.pdf", pagesize=A4, rightMargin=1.8*cm, leftMargin=1.8*cm, topMargin=2*cm, bottomMargin=2*cm ) WIDTH, HEIGHT = A4 styles = getSampleStyleSheet() # ── Custom styles ────────────────────────────────────────────────────────────── TEAL = colors.HexColor("#006666") DARK = colors.HexColor("#1a1a2e") ORANGE = colors.HexColor("#cc4400") GREEN = colors.HexColor("#1a5c1a") LIGHT_TEAL = colors.HexColor("#e0f2f2") LIGHT_GREEN = colors.HexColor("#e8f5e8") LIGHT_RED = colors.HexColor("#fdecea") LIGHT_ORANGE = colors.HexColor("#fff3e0") LIGHT_YELLOW = colors.HexColor("#fffde7") GREY = colors.HexColor("#f5f5f5") MID_GREY = colors.HexColor("#cccccc") title_style = ParagraphStyle( 'TitleStyle', parent=styles['Title'], fontSize=20, textColor=TEAL, spaceAfter=4, fontName='Helvetica-Bold', alignment=TA_CENTER, leading=26 ) subtitle_style = ParagraphStyle( 'SubtitleStyle', parent=styles['Normal'], fontSize=11, textColor=DARK, spaceAfter=2, fontName='Helvetica', alignment=TA_CENTER ) section_style = ParagraphStyle( 'SectionStyle', parent=styles['Heading2'], fontSize=13, textColor=colors.white, spaceBefore=10, spaceAfter=4, fontName='Helvetica-Bold', leading=16 ) body_style = ParagraphStyle( 'BodyStyle', parent=styles['Normal'], fontSize=9, textColor=DARK, spaceBefore=2, spaceAfter=2, fontName='Helvetica', leading=13 ) bold_body = ParagraphStyle( 'BoldBody', parent=body_style, fontName='Helvetica-Bold' ) small_style = ParagraphStyle( 'SmallStyle', parent=styles['Normal'], fontSize=8, textColor=colors.HexColor("#555555"), fontName='Helvetica-Oblique', leading=11 ) bullet_style = ParagraphStyle( 'BulletStyle', parent=body_style, leftIndent=12, bulletIndent=2, spaceBefore=1 ) warning_style = ParagraphStyle( 'WarningStyle', parent=body_style, textColor=ORANGE, fontName='Helvetica-Bold' ) note_style = ParagraphStyle( 'NoteStyle', parent=body_style, fontSize=8.5, textColor=colors.HexColor("#333333"), fontName='Helvetica-Oblique', leading=12 ) def section_header(text, bg_color=TEAL): data = [[Paragraph(text, section_style)]] t = Table(data, colWidths=[doc.width]) t.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), bg_color), ('TOPPADDING', (0,0), (-1,-1), 6), ('BOTTOMPADDING', (0,0), (-1,-1), 6), ('LEFTPADDING', (0,0), (-1,-1), 10), ('RIGHTPADDING', (0,0), (-1,-1), 10), ('ROUNDEDCORNERS', [4,4,4,4]), ])) return t def colored_table(headers, rows, col_widths, header_bg=TEAL, alt_bg=LIGHT_TEAL): header_style = ParagraphStyle('TH', parent=body_style, fontName='Helvetica-Bold', textColor=colors.white, fontSize=9, leading=12) cell_style = ParagraphStyle('TD', parent=body_style, fontSize=8.5, leading=11) header_row = [Paragraph(h, header_style) for h in headers] data = [header_row] for i, row in enumerate(rows): data.append([Paragraph(str(cell), cell_style) for cell in row]) t = Table(data, colWidths=col_widths, repeatRows=1) ts = TableStyle([ ('BACKGROUND', (0,0), (-1,0), header_bg), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, alt_bg]), ('GRID', (0,0), (-1,-1), 0.5, MID_GREY), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 6), ('RIGHTPADDING', (0,0), (-1,-1), 6), ('VALIGN', (0,0), (-1,-1), 'TOP'), ]) t.setStyle(ts) return t # ══════════════════════════════════════════════════════════════════════════════ story = [] # ── HEADER ───────────────────────────────────────────────────────────────────── story.append(Paragraph("Post-Radical Nephrectomy Diet Plan", title_style)) story.append(Paragraph("For Patients with Diabetes Mellitus & Hypertension", subtitle_style)) story.append(Paragraph("Evidence-based guidance • Comprehensive Clinical Nephrology 7th Ed, KDIGO 2020, WHO guidelines", small_style)) story.append(HRFlowable(width="100%", thickness=2, color=TEAL, spaceAfter=8)) # ── WHY DIET MATTERS ────────────────────────────────────────────────────────── story.append(section_header("Why Diet Matters After Nephrectomy")) story.append(Spacer(1, 6)) story.append(Paragraph( "After radical nephrectomy, your single remaining kidney must perform all filtration work. " "Combined with diabetes and high blood pressure, this significantly raises the risk of chronic " "kidney disease (CKD) progression. A tailored diet helps preserve kidney function, control blood " "glucose, manage blood pressure, and protect the heart — the three most important goals in your recovery.", body_style )) story.append(Spacer(1, 8)) # ── KEY NUTRIENT TARGETS ────────────────────────────────────────────────────── story.append(section_header("Daily Nutrient Targets (Summary)")) story.append(Spacer(1, 6)) targets_rows = [ ["Protein", "0.8 g/kg ideal body weight/day", "Prevents hyperfiltration in solitary kidney. Avoid high intake >1.0 g/kg/day."], ["Sodium (Salt)", "< 2,300 mg/day (ideally < 1,500 mg/day)", "Controls blood pressure. Avoid added salt, processed foods, pickles."], ["Potassium", "Monitor levels; often 2,000–3,000 mg/day", "Avoid if serum K⁺ is high (>5.0 mEq/L). Review with nephrologist."], ["Phosphorus", "800–1,000 mg/day", "Protects bones and kidneys. Avoid phosphate additives in processed foods."], ["Carbohydrates", "45–60% of calories; prefer low glycaemic index (GI)", "Controls blood glucose. Choose whole grains, legumes over refined sugars."], ["Fats", "Unsaturated fats preferred; limit saturated & trans fats", "Reduces cardiovascular risk. Use olive oil, avoid ghee/butter in excess."], ["Fluid", "1.5–2.0 litres/day (unless advised otherwise)", "Prevents kidney stones and supports remaining kidney. Avoid sugary drinks."], ["Calories", "Maintain healthy BMI (18.5–24.9 kg/m²)", "Prevents protein-energy wasting. Do not restrict total calories severely."], ] t = colored_table( ["Nutrient", "Target", "Clinical Reason"], targets_rows, [3.2*cm, 5.2*cm, 8.4*cm] ) story.append(t) story.append(Spacer(1, 10)) # ── FOODS TO EAT ────────────────────────────────────────────────────────────── story.append(section_header("✔ Foods to EAT Freely / Prefer", bg_color=GREEN)) story.append(Spacer(1, 6)) eat_rows = [ ["Grains / Cereals", "White rice (small portion), wheat chapati (1–2), oats, barley, quinoa, daliya (broken wheat)", "Low phosphorus grains; oats improves glycaemic control"], ["Vegetables (Low K⁺)", "Cauliflower, cabbage, green beans, capsicum, cucumber, bottle gourd (lauki), ridge gourd (turai), pumpkin, onion, garlic", "Low potassium; antioxidants protect kidney"], ["Fruits (Low K⁺)", "Apple (without skin), berries (small amounts), grapes, pears, pineapple (limited), guava (small)", "Low potassium options; limit quantity for glucose control"], ["Protein (Lean)", "Egg white (2–3 nos/day), grilled fish (rohu, catla – moderate portions), low-fat chicken breast (once daily, small serving)", "High biological value protein in controlled amount"], ["Dairy (Limited)", "Low-fat milk (½ cup/day), low-fat curd/yoghurt (½ cup/day)", "Limit to 1 serving/day for phosphorus control; provides calcium"], ["Fats / Oils", "Olive oil, mustard oil, flaxseed oil (small amounts); walnuts, almonds (soaked, 4–5 nos)", "Omega-3 and unsaturated fats reduce inflammation and cardiovascular risk"], ["Legumes / Lentils", "Small portions of moong dal, masoor dal (well-cooked; change soaking water)", "Good protein and fibre; soaking reduces potassium content"], ["Herbs & Spices", "Turmeric, ginger, garlic, coriander, cumin – use freely", "Anti-inflammatory; no added sodium"], ["Beverages", "Plain water, coconut water (small amounts if K⁺ normal), herbal tea (unsweetened), lemon water (unsweetened)", "Hydration supports kidney; avoid sugary/caffeinated drinks"], ] t = colored_table( ["Food Group", "Recommended Items", "Why It Helps"], eat_rows, [3.5*cm, 7.0*cm, 6.3*cm], header_bg=GREEN, alt_bg=LIGHT_GREEN ) story.append(t) story.append(Spacer(1, 10)) # ── FOODS TO AVOID ──────────────────────────────────────────────────────────── story.append(section_header("✘ Foods to AVOID / Strictly Limit", bg_color=ORANGE)) story.append(Spacer(1, 6)) avoid_rows = [ ["High-Potassium Foods", "Banana, orange, mango, papaya, avocado, kiwi, potato, tomato, spinach, drumstick, coconut water (large amounts)", "Elevates serum potassium → dangerous cardiac arrhythmias"], ["High-Phosphorus Foods", "Red meat (mutton, pork, beef), organ meats (liver, kidney, brain), cola/dark sodas, processed cheese, whole milk, nuts in excess", "Excess phosphorus damages residual kidney and bones"], ["High-Protein Foods (Excess)", "Large portions of meat, double egg (whole), protein powders, whey supplements", "Hyperfiltration injures the solitary kidney"], ["High-Sodium Foods", "Table salt, pickles (achaar), papad, chips, namkeen, processed/canned foods, sauces, soya sauce, instant noodles, bread (commercial)", "Raises blood pressure; worsens kidney disease"], ["Refined Sugars / High GI", "Sugar, jaggery, sweets (mithai), white bread, maida products, biscuits (glucose), fruit juices, cold drinks", "Spikes blood glucose; worsens diabetic nephropathy"], ["Saturated / Trans Fats", "Ghee (excess), butter, dalda (vanaspati), fried snacks (samosa, pakora, poori), fast food", "Increases cardiovascular risk; promotes inflammation"], ["Alcohol", "All forms – beer, wine, spirits", "Damages kidneys, raises blood pressure, disrupts glucose control"], ["NSAIDs / Herbal Supplements", "Ibuprofen, diclofenac, aspirin (unless prescribed); herbal kidney tonics", "Nephrotoxic in solitary kidney; can cause acute kidney injury"], ["Excessive Fluids (if restricted)", "If nephrologist advises fluid restriction – limit sodas, juices, soups, milkshakes", "Prevents fluid overload if kidney function is reduced"], ] t = colored_table( ["Avoid / Limit", "Examples", "Reason"], avoid_rows, [3.5*cm, 7.0*cm, 6.3*cm], header_bg=ORANGE, alt_bg=LIGHT_RED ) story.append(t) story.append(Spacer(1, 10)) # ── SAMPLE MEAL PLAN ────────────────────────────────────────────────────────── story.append(section_header("Sample One-Day Meal Plan")) story.append(Spacer(1, 6)) meal_rows = [ ["Early Morning\n(6:00 – 7:00 AM)", "• 1 glass lukewarm water with lemon (no sugar)\n• 4–5 soaked almonds", "Hydration; healthy fats; anti-inflammatory"], ["Breakfast\n(8:00 – 9:00 AM)", "• Oats upma / daliya (½ cup cooked, no salt)\n• 2 egg whites (boiled/scrambled without butter)\n• 1 cup low-fat milk tea (no sugar / stevia)", "Low GI, controlled protein, low phosphorus"], ["Mid-Morning\n(11:00 AM)", "• 1 small apple OR ½ cup berries\n• Plain water / herbal tea", "Low-potassium fruit; controlled glucose"], ["Lunch\n(1:00 – 2:00 PM)", "• 1–2 wheat chapati\n• ½ cup moong dal (low sodium)\n• Sabzi: bottle gourd / cauliflower (no salt in cooking; add cumin, turmeric)\n• 1 small bowl curd (low fat)\n• Fresh salad: cucumber, capsicum", "Balanced macros; low sodium; low potassium vegetables"], ["Evening Snack\n(4:00 – 5:00 PM)", "• Roasted makhana (fox nuts) – 1 small handful\n• Herbal tea (unsweetened)\nOR\n• 1 slice plain toast (low sodium bread) + cucumber", "Low sodium snack; stable blood sugar"], ["Dinner\n(7:00 – 8:00 PM)", "• 1 wheat chapati\n• Grilled fish (rohu / katla) 60–80 g OR 1 egg white omelette\n• Stir-fried vegetables (cabbage, capsicum, beans – minimal oil)\n• ½ cup white rice (if needed)", "Lean protein; controlled carbs; low phosphorus"], ["Bedtime\n(9:00 – 10:00 PM)", "• ½ cup warm low-fat milk (if blood glucose allows)\nOR\n• Plain water", "Optional; prevents nocturnal hypoglycaemia"], ] t = colored_table( ["Time / Meal", "What to Eat", "Benefit"], meal_rows, [3.5*cm, 8.0*cm, 5.3*cm], header_bg=colors.HexColor("#004d66"), alt_bg=LIGHT_YELLOW ) story.append(t) story.append(Spacer(1, 10)) # ── COOKING TIPS ────────────────────────────────────────────────────────────── story.append(section_header("Practical Cooking Tips")) story.append(Spacer(1, 6)) tips_data = [ ["Leaching vegetables", "Peel, cut and soak high-potassium vegetables in water for 2–4 hours, then boil and discard the water. This reduces potassium content by 30–50%."], ["Salt substitutes", "Avoid KCl-based salt substitutes (e.g. 'Lo-Salt') — they contain potassium which is harmful if serum K⁺ is elevated."], ["Cooking method", "Prefer boiling, steaming, grilling, baking. Avoid deep-frying, stir-frying in excess oil."], ["Phosphorus additives", "Read food labels. Avoid items listing 'phosphate', 'disodium phosphate', 'sodium tripolyphosphate' — these are absorbed more than natural phosphorus."], ["Portion control", "Use smaller plates. Aim for half-plate vegetables, quarter-plate grain, quarter-plate lean protein."], ["Blood glucose monitoring", "Eat meals at regular intervals (every 3–4 hours). Never skip meals to avoid hypoglycaemia."], ] for tip, desc in tips_data: row_data = [[Paragraph(f"<b>{tip}:</b>", body_style), Paragraph(desc, body_style)]] t = Table(row_data, colWidths=[3.8*cm, 13.0*cm]) t.setStyle(TableStyle([ ('VALIGN', (0,0), (-1,-1), 'TOP'), ('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4), ('LEFTPADDING', (0,0), (-1,-1), 6), ('RIGHTPADDING', (0,0), (-1,-1), 6), ('LINEBELOW', (0,0), (-1,-1), 0.3, MID_GREY), ])) story.append(t) story.append(Spacer(1, 10)) # ── SPECIAL CONSIDERATIONS ──────────────────────────────────────────────────── story.append(section_header("Special Considerations: DM + Hypertension + Solitary Kidney")) story.append(Spacer(1, 6)) special_rows = [ ["Blood Pressure Target", "< 130/80 mmHg (KDIGO 2020). A low-sodium DASH-style diet (rich in fruits, vegetables, low-fat dairy) is recommended alongside antihypertensive medications.", "Comprehensive Clinical Nephrology 7th Ed"], ["Blood Glucose (HbA1c)", "Target HbA1c < 7% (or 7.5% in elderly). Avoid high-GI carbohydrates. Space carbohydrates evenly across the day.", "KDIGO 2020 DM in CKD Guidelines"], ["Protein Intake", "0.8–1.0 g/kg/day for solitary kidney (post-nephrectomy). Do NOT exceed 1.0 g/kg/day as hyperfiltration accelerates kidney decline. For dialysis patients: 1.0–1.2 g/kg/day.", "ISRNM Commentary; Comprehensive Clinical Nephrology 7th Ed"], ["Potassium Monitoring", "Check serum potassium at every nephrology visit (every 3–6 months). Restrict high-potassium foods only if K⁺ > 5.0 mEq/L. Adequate potassium (not excessive) is actually beneficial for blood pressure.", "KDIGO CKD Guidelines"], ["Phosphorus & PTH", "Excess phosphorus causes secondary hyperparathyroidism. Avoid processed meats, cola drinks, and phosphate additives. Regular monitoring of serum phosphorus and PTH.", "Brenner & Rector The Kidney 2-Vol Set"], ["Vitamin D", "Patients with CKD and post-nephrectomy often have Vitamin D deficiency. Supplement as advised by your doctor; get 15–20 min sunlight daily.", "Comprehensive Clinical Nephrology 7th Ed"], ["Weight Management", "Maintain BMI 18.5–24.9 kg/m². Obesity worsens hypertension, DM and kidney function. A moderate calorie-restricted diet (not crash dieting) is recommended.", "WHO Guidelines"], ] t = colored_table( ["Parameter", "Recommendation", "Source"], special_rows, [3.5*cm, 9.5*cm, 3.8*cm], header_bg=colors.HexColor("#4a235a"), alt_bg=colors.HexColor("#f9f0ff") ) story.append(t) story.append(Spacer(1, 10)) # ── WARNING BOX ─────────────────────────────────────────────────────────────── warn_data = [[ Paragraph( "⚠ IMPORTANT WARNING: This diet plan is general guidance only. " "Nutrient targets (especially potassium, phosphorus, protein, fluid) must be " "individualised by your nephrologist and renal dietician based on your current blood " "test results (GFR, serum creatinine, K⁺, phosphorus, HbA1c). " "Do not self-medicate or use herbal remedies without consulting your doctor. " "NSAID painkillers (e.g. ibuprofen, diclofenac) are harmful to a solitary kidney.", ParagraphStyle('WarnBody', parent=body_style, textColor=DARK, fontSize=9, leading=13) ) ]] warn_table = Table(warn_data, colWidths=[doc.width]) warn_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), colors.HexColor("#fff3cd")), ('LEFTPADDING', (0,0), (-1,-1), 12), ('RIGHTPADDING', (0,0), (-1,-1), 12), ('TOPPADDING', (0,0), (-1,-1), 10), ('BOTTOMPADDING', (0,0), (-1,-1), 10), ('BOX', (0,0), (-1,-1), 1.5, colors.HexColor("#e6a817")), ('ROUNDEDCORNERS', [6,6,6,6]), ])) story.append(warn_table) story.append(Spacer(1, 6)) # ── FOOTER ──────────────────────────────────────────────────────────────────── story.append(HRFlowable(width="100%", thickness=1, color=MID_GREY, spaceAfter=4)) story.append(Paragraph( "References: Comprehensive Clinical Nephrology, 7th Ed (ISBN 9780323825924) • " "Brenner & Rector's The Kidney, 2-Vol Set (ISBN 9780323532655) • " "KDIGO 2020 Clinical Practice Guideline for DM in CKD • " "WHO Healthy Diet Guidelines • Goldman-Cecil Medicine 2-Vol Set (ISBN 9780323930345)", note_style )) story.append(Paragraph( "Prepared by Orris Health Assistant | Date: August 2026 | " "This document is for educational purposes. Please consult your nephrologist and dietician.", note_style )) # ── BUILD ───────────────────────────────────────────────────────────────────── doc.build(story) print("PDF generated successfully.") PYEOF python3 /tmp/workspace/nephrectomy-diet/generate_diet_pdf.py
ls -lh /tmp/workspace/nephrectomy-diet/
Post Nephrectomy Diet Plan
PDF Document · PDF
| Nutrient | Target |
|---|---|
| Protein | 0.8 g/kg/day (do NOT exceed 1.0 g/kg/day) |
| Sodium | < 2,300 mg/day (< 1,500 mg/day preferred) |
| Potassium | Monitor serum K+; restrict high-K foods if K+ > 5.0 mEq/L |
| Phosphorus | 800-1,000 mg/day; avoid phosphate food additives |
| Carbohydrates | 45-60% of calories; prefer low-GI whole grains |
| Fluids | 1.5-2.0 L/day unless restricted by nephrologist |
Important: Potassium and phosphorus targets must be individualised based on actual blood test results. Always consult your nephrologist and a renal dietician - the plan in the PDF is a starting framework, not a fixed prescription.