Make a 17 pages ppt presentation for endocrinology class on "Metabolic diseases. Obesity"
"obesity"[MeSH Terms] AND "anti-obesity agents"[MeSH Terms]
obesity classification body mass index waist circumference visceral fat
bariatric surgery Roux-en-Y gastric bypass sleeve gastrectomy diagram

Summary : This figure presents a comprehensive overview of current surgical and endoscopic (non-surgical) bariatric procedures, as endorsed by the American Society of Metabolic and Bariatric Surgery. It visually categorizes and names each procedure, showing their anatomical targets and device types.

Summary : This figure illustrates four common types of bariatric (weight-loss) surgeries, showing simplified anatomical diagrams of the stomach and intestines for each procedure, with their respective names and abbreviations.

Summary : This figure presents schematic illustrations of various bariatric surgical procedures, each labeled from A to H, showing anatomical modifications to the stomach and intestines for weight loss surgery.

Summary : This figure presents an overview of currently-evaluated treatment options for non-alcoholic fatty liver disease (NAFLD), visually mapping them along a spectrum of efficacy (vertical axis) and risk (horizontal axis), and categorizing interventions by invasiveness and therapeutic class.
Lancet Commission clinical obesity definition 2025 preclinical clinical obesity; tirzepatide semaglutide weight loss percent SURMOUNT STEP
metabolic syndrome insulin resistance visceral obesity complications
GLP-1 receptor agonist mechanism weight loss appetite
mkdir -p /tmp/workspace/obesity-ppt/assets /tmp/workspace/obesity-ppt/output && cd /tmp/workspace/obesity-ppt && python /tmp/skills/shared/scripts/fetch_images.py "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_049b7bc24075104e496d0a4f91e82ea37eabf871565dd019f3c77eee70bbcdf7.jpg" "https://cdn.orris.care/cdss_images/GLGCA_308847_1763327946960_d89e3042-a15f-415f-b0c9-968535cb2b77.png" > assets/imgs.json; python -c " import json,base64 from PIL import Image from io import BytesIO d=json.load(open('assets/imgs.json')) for i,x in enumerate(d): print(x['error'], x['base64'][:30] if x['base64'] else None) if x['base64']: raw=base64.b64decode(x['base64'].split(',',1)[1]); open(f'assets/img{i}.'+('jpg' if 'jpeg' in x['base64'][:15] else 'png'),'wb').write(raw); print(Image.open(BytesIO(raw)).size) "; ls assets
cd /tmp/workspace/obesity-ppt && cat > build.py <<'EOF' from pptx import Presentation from pptx.util import Inches, Pt from pptx.dml.color import RGBColor from pptx.enum.text import PP_ALIGN, MSO_ANCHOR from pptx.enum.shapes import MSO_SHAPE from pptx.chart.data import CategoryChartData from pptx.enum.chart import XL_CHART_TYPE, XL_LABEL_POSITION from PIL import Image NAVY=RGBColor(0x0B,0x25,0x45); TEAL=RGBColor(0x13,0x7C,0x8B); ORANGE=RGBColor(0xE8,0x7A,0x2B) LIGHT=RGBColor(0xEE,0xF5,0xF7); GREY=RGBColor(0x44,0x4F,0x5A); WHITE=RGBColor(255,255,255) FONT="Calibri" prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5) blank=prs.slide_layouts[6] count=[0] def rect(s,x,y,w,h,fill,line=None,shape=MSO_SHAPE.RECTANGLE): r=s.shapes.add_shape(shape,Inches(x),Inches(y),Inches(w),Inches(h)) r.fill.solid(); r.fill.fore_color.rgb=fill if line: r.line.color.rgb=line else: r.line.fill.background() r.shadow.inherit=False return r def text(s,x,y,w,h,t,size=16,bold=False,color=GREY,align=PP_ALIGN.LEFT,anchor=MSO_ANCHOR.TOP): tb=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); tf=tb.text_frame; tf.word_wrap=True tf.vertical_anchor=anchor tf.margin_left=tf.margin_right=Inches(0.05); tf.margin_top=tf.margin_bottom=Inches(0.03) p=tf.paragraphs[0]; p.alignment=align; r=p.add_run(); r.text=t r.font.size=Pt(size); r.font.bold=bold; r.font.color.rgb=color; r.font.name=FONT return tb def bullets(s,x,y,w,h,items,size=17,color=GREY,gap=7): tb=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); tf=tb.text_frame; tf.word_wrap=True tf.margin_left=Inches(0.05) first=True for it in items: sub=it.startswith("-") t=it[1:].strip() if sub else it p=tf.paragraphs[0] if first else tf.add_paragraph(); first=False p.space_after=Pt(gap) r=p.add_run(); r.text=(" – " if sub else "• ")+t if False else ((" ◦ " if sub else "▪ ")+t) r.font.size=Pt(size-2 if sub else size); r.font.color.rgb=color; r.font.name=FONT return tb def slide(title,sub=None): s=prs.slides.add_slide(blank); count[0]+=1 rect(s,0,0,13.333,1.05,NAVY); rect(s,0,1.05,13.333,0.06,ORANGE) text(s,0.6,0.12,11.6,0.85,title,30,True,WHITE,anchor=MSO_ANCHOR.MIDDLE) text(s,12.2,0.12,0.9,0.85,str(count[0]),16,False,RGBColor(0xA9,0xC7,0xD0),PP_ALIGN.RIGHT,MSO_ANCHOR.MIDDLE) if sub: text(s,0.6,1.25,12,0.5,sub,15,False,TEAL) return s def card(s,x,y,w,h,head,items,size=15,hc=TEAL): rect(s,x,y,w,h,LIGHT); rect(s,x,y,w,0.5,hc) text(s,x+0.1,y,w-0.2,0.5,head,17,True,WHITE,anchor=MSO_ANCHOR.MIDDLE) bullets(s,x+0.1,y+0.6,w-0.25,h-0.7,items,size,gap=5) def table(s,x,y,w,rows,colw,size=14,rowh=0.5): nr,nc=len(rows),len(rows[0]) t=s.shapes.add_table(nr,nc,Inches(x),Inches(y),Inches(w),Inches(rowh*nr)).table for j,cw in enumerate(colw): t.columns[j].width=Inches(cw) for i,row in enumerate(rows): t.rows[i].height=Inches(rowh) for j,v in enumerate(row): c=t.cell(i,j); c.text=""; p=c.text_frame.paragraphs[0]; r=p.add_run(); r.text=v r.font.size=Pt(size); r.font.name=FONT; r.font.bold=(i==0 or j==0) c.vertical_anchor=MSO_ANCHOR.MIDDLE c.margin_left=c.margin_right=Inches(0.08) c.fill.solid() if i==0: c.fill.fore_color.rgb=TEAL; r.font.color.rgb=WHITE else: c.fill.fore_color.rgb=LIGHT if i%2 else WHITE; r.font.color.rgb=NAVY if j==0 else GREY return t def picture(s,path,x,y,w,h): iw,ih=Image.open(path).size; sc=min(w/iw,h/ih); pw,ph=iw*sc,ih*sc s.shapes.add_picture(path,Inches(x+(w-pw)/2),Inches(y+(h-ph)/2),Inches(pw),Inches(ph)) def footer(s,t): text(s,0.6,7.05,12.2,0.35,t,11,False,RGBColor(0x7A,0x86,0x90)) # 1 Title s=prs.slides.add_slide(blank); count[0]+=1 rect(s,0,0,13.333,7.5,NAVY); rect(s,0.8,3.55,2.2,0.08,ORANGE) text(s,0.8,1.5,11.5,0.5,"ENDOCRINOLOGY | CLASS PRESENTATION",16,True,RGBColor(0x7F,0xC8,0xD3)) text(s,0.8,2.0,11.8,1.5,"Metabolic Diseases: Obesity",52,True,WHITE) text(s,0.8,3.85,11.5,1.0,"Definition, pathophysiology, metabolic consequences and modern management",22,False,RGBColor(0xD6,0xE6,0xEA)) text(s,0.8,6.3,11.5,0.5,"Sources: Harrison's 22E, Mulholland & Greenfield's Surgery 7E, Textbook of Family Medicine 9E, recent literature (2025-2026)",13,False,RGBColor(0x9F,0xB8,0xC2)) # 2 Objectives s=slide("Learning objectives and outline") card(s,0.6,1.5,6.0,5.2,"By the end of this class you can",[ "Define obesity and classify it by BMI, waist and the 2025 clinical/preclinical model", "Explain how appetite and energy balance are regulated", "Describe adipose tissue as an endocrine organ", "List endocrine, genetic and drug-induced causes", "Link obesity to metabolic syndrome, T2DM and other complications", "Select lifestyle, drug and surgical treatment"],16) card(s,6.9,1.5,5.8,5.2,"Outline",[ "1. Epidemiology and definitions (slides 3-5)", "2. Causes and pathophysiology (6-9)", "3. Complications (10)", "4. Evaluation (11)", "5. Treatment: lifestyle, drugs, surgery (12-16)", "6. Key messages (17)"],16,ORANGE) # 3 Epidemiology s=slide("Obesity: a chronic disease with a large global burden") for i,(big,lab) in enumerate([("42%","US adults with obesity, 2017-2018 (CDC)"),("18.5%","US children aged 2-19 with obesity"),("-10 y","Life expectancy at BMI 40-50")]): x=0.6+i*4.15 rect(s,x,1.5,3.9,1.7,LIGHT); rect(s,x,1.5,0.1,1.7,ORANGE) text(s,x+0.25,1.55,3.5,0.9,big,44,True,TEAL) text(s,x+0.25,2.45,3.55,0.7,lab,15) bullets(s,0.6,3.5,12.2,3.4,[ "Excess adipose tissue is the defining feature; metabolic disease arises in adipose tissue", "Mean US BMI rose from 25.5 (1970s) to 28.5 (2005); obesity prevalence more than doubled in that period", "Visceral fat carries more risk than subcutaneous fat, which explains why BMI and metabolic disease correlate imperfectly", "Weight loss improves nearly every metabolic disease, regardless of starting weight", "Overweight (BMI 25-29.9) is also linked to more cardiovascular disease and diabetes, and to progression to obesity"],18) footer(s,"Mulholland & Greenfield's Surgery 7E, p. 2277-2278; CDC data cited therein") # 4 BMI classification s=slide("Diagnosis: BMI classification (WHO)") table(s,0.6,1.5,7.2,[ ["Category","BMI (kg/m²)","Relative risk"], ["Underweight","< 18.5","Increased (J-shaped curve)"], ["Normal","18.5 - 24.9","Reference"], ["Overweight","25 - 29.9","Mildly increased"], ["Obesity class 1","30 - 34.9","Moderate"], ["Obesity class 2","35 - 39.9","High"], ["Obesity class 3","≥ 40","Very high"]],[2.4,2.0,2.8],15,0.62) card(s,8.2,1.5,4.5,2.55,"Asian populations",[ "WHO 2004 proposal: overweight ≥ 23, obesity ≥ 27.5", "Metabolic disease appears at lower BMI"],15,ORANGE) card(s,8.2,4.2,4.5,2.55,"BMI limitations",[ "Muscular athletes: high BMI, low fat", "Elderly with low muscle: normal BMI, high fat", "'Obesity paradox' in HF and renal failure"],15) footer(s,"Mulholland & Greenfield's Surgery 7E, p. 2277. BMI = weight (kg) / height (m)²") # 5 beyond BMI s=slide("Beyond BMI: measuring adiposity and the 2025 redefinition") card(s,0.6,1.5,6.0,5.3,"Measuring fat and its distribution",[ "Waist circumference and waist-hip ratio: simple, often predict metabolic disease better than BMI (visceral fat)", "DXA, bioelectrical impedance, MRI, water displacement: more accurate, limited by cost", "CT 'analytic morphomics' for research", "Clinical use: BMI first, then waist, then comorbidity screen"],16) card(s,6.9,1.5,5.8,5.3,"Lancet Diabetes & Endocrinology Commission, Jan 2025",[ "Obesity = excess adiposity; BMI alone is insufficient to guide treatment", "Preclinical obesity: excess adiposity with normal organ function and low immediate risk", "Clinical obesity: chronic systemic illness, excess adiposity with functional impairment of tissues, organs or whole-body health", "Treatment intensity should follow clinical status, not BMI alone"],16,ORANGE) footer(s,"Mulholland & Greenfield's Surgery 7E; Lancet Diabetes Endocrinol 2025 Commission (via J Cardiovasc Pharmacol Ther review)") # 6 Etiology s=slide("Why does obesity develop? Multifactorial causes") card(s,0.6,1.5,3.95,5.3,"Genetic and biological",[ "Polygenic susceptibility (most cases)", "Monogenic: LEP, LEPR, POMC, PCSK1, MC4R", "Syndromic: Prader-Willi, Bardet-Biedl", "Gut hormone and microbiome differences", "Sleep loss, stress"],15) card(s,4.7,1.5,3.95,5.3,"Environment and behavior",[ "Energy-dense, ultra-processed food", "Sedentary work and screen time", "Built environment and socioeconomic factors", "Short sleep, shift work", "Smoking cessation, pregnancy"],15,ORANGE) card(s,8.8,1.5,3.95,5.3,"Secondary causes",[ "Hypothyroidism, Cushing syndrome", "Hypothalamic injury (tumor, surgery, radiation)", "PCOS, hypogonadism, GH deficiency", "Insulinoma", "Drugs: insulin, sulfonylureas, glucocorticoids, antipsychotics, antidepressants, antiepileptics"],15,NAVY) # 7 Appetite regulation s=slide("Pathophysiology: central control of appetite") picture(s,'assets/img0.jpg',0.5,1.35,6.6,5.3) bullets(s,7.3,1.5,5.5,5.3,[ "Hypothalamus (arcuate nucleus) and brainstem integrate peripheral signals", "POMC/CART neurons: anorexigenic, activate MC4R neurons in the PVN (satiety)", "NPY/AgRP neurons: orexigenic, inhibit MC4R neurons (hunger)", "Leptin (adipose) and insulin: long-term adiposity signals", "GLP-1, PYY: satiety after meals. Ghrelin (stomach): hunger", "Obesity: leptin resistance and a higher defended body-weight set point"],16) footer(s,"Gut-brain axis and hypothalamic melanocortin system (image library)") # 8 Adipose endocrine organ s=slide("Adipose tissue as an endocrine organ") table(s,0.6,1.5,12.1,[ ["Feature","Subcutaneous fat","Visceral fat"], ["Metabolic risk","Lower","Higher; drains to portal circulation"], ["Inflammation","Modest","Pro-inflammatory: IL-6, TNF-α, CRP"], ["Adipokines","Leptin predominates","Less adiponectin, more free fatty acids"], ["Effect of liposuction","Mass reduced","No change; metabolic risk not lowered"]],[3.0,4.3,4.8],16,0.65) bullets(s,0.6,5.0,12.1,2.0,[ "Adiponectin falls and leptin rises as fat mass expands, with insulin resistance as the consequence", "Chronic low-grade inflammation links visceral adiposity to atherosclerosis (Textbook of Family Medicine 9E)", "Ectopic fat in liver and muscle drives lipotoxicity"],16) # 9 Endocrine workup of secondary causes s=slide("Endocrine causes to exclude: clues and tests") table(s,0.6,1.5,12.1,[ ["Condition","Clues","First-line test"], ["Hypothyroidism","Fatigue, cold intolerance, constipation","TSH, free T4"], ["Cushing syndrome","Central fat, striae, proximal weakness, hypertension","Late-night salivary cortisol, 1 mg dexamethasone test, 24 h urinary cortisol"], ["PCOS","Oligomenorrhea, hirsutism, acne","Total/free testosterone, exclude other causes"], ["Hypothalamic obesity","Prior CNS tumor or surgery, hyperphagia","Pituitary hormones, MRI"], ["Monogenic obesity","Severe early-onset (<5 y), hyperphagia","Genetic panel (MC4R, POMC, LEPR)"], ["Insulinoma","Hypoglycemia, defensive eating","Supervised 72 h fast: insulin, C-peptide"]],[2.7,4.5,4.9],14,0.7) footer(s,"Most patients have no identifiable endocrine cause; test on clinical suspicion rather than universally") # 10 Complications s=slide("Metabolic and systemic complications") card(s,0.6,1.5,4.0,5.3,"Metabolic",[ "Insulin resistance, prediabetes, T2DM", "Atherogenic dyslipidemia: high TG, low HDL", "Metabolic syndrome: central obesity + 2 of high BP, TG, glucose, low HDL", "MASLD / steatohepatitis", "Gout"],15) card(s,4.75,1.5,4.0,5.3,"Cardiovascular and renal",[ "Hypertension", "Coronary and peripheral artery disease", "Heart failure (HFpEF), atrial fibrillation", "Stroke, venous thromboembolism", "Obesity-related glomerulopathy, CKD"],15,ORANGE) card(s,8.9,1.5,3.8,5.3,"Other",[ "Obstructive sleep apnea", "Osteoarthritis", "PCOS, infertility, hypogonadism", "GERD", "Cancers (e.g. endometrial, breast, colorectal)", "Depression, stigma"],15,NAVY) # 11 Evaluation s=slide("Clinical evaluation of a patient with obesity") card(s,0.6,1.5,6.0,5.3,"History and examination",[ "Weight trajectory, prior attempts, diet, activity, sleep, mood, eating disorders", "Drug review: weight-promoting agents", "Family history of obesity, diabetes, CVD", "BMI, waist circumference, blood pressure", "Signs: striae, acanthosis nigricans, goiter, hirsutism"],16) card(s,6.9,1.5,5.8,5.3,"Investigations",[ "Fasting glucose / HbA1c, lipid profile", "ALT/AST; liver fibrosis scoring (FIB-4)", "TSH when clinically suggested", "Targeted tests for Cushing, PCOS, hypothalamic disease", "Sleep apnea screening (STOP-BANG)", "Assess readiness and goals"],16,ORANGE) # 12 Lifestyle s=slide("Management step 1: lifestyle and behavioral therapy") bullets(s,0.6,1.5,7.2,5.2,[ "Foundation for every patient, at any BMI", "Diet: sustained energy deficit (about 500-750 kcal/day), Mediterranean-style or low-carbohydrate patterns, protein adequate", "Activity: 150-300 min/week moderate aerobic plus resistance training", "Behavioral therapy: self-monitoring, goal setting, sleep and stress", "Expected result: about 2-5% weight loss at 12 months, which improves BP, glucose and lipids", "Textbook note: lifestyle alone has limited efficacy and weight is often regained"],17) rect(s,8.2,1.6,4.5,4.6,LIGHT); rect(s,8.2,1.6,4.5,0.1,ORANGE) text(s,8.4,1.8,4.1,0.9,"2-5%",54,True,TEAL,PP_ALIGN.CENTER) text(s,8.4,2.9,4.1,1.0,"typical weight loss from lifestyle alone at 12 months",16,False,GREY,PP_ALIGN.CENTER) text(s,8.4,4.2,4.1,0.9,"5-10%",44,True,ORANGE,PP_ALIGN.CENTER) text(s,8.4,5.1,4.1,0.9,"loss gives clinically meaningful metabolic benefit",16,False,GREY,PP_ALIGN.CENTER) footer(s,"Mulholland & Greenfield's Surgery 7E; NICE 2025 guidance summary (Medscape)") # 13 Pharmacotherapy s=slide("Management step 2: pharmacotherapy") table(s,0.6,1.5,12.1,[ ["Drug","Mechanism","Main cautions"], ["Semaglutide 2.4 mg weekly","GLP-1 receptor agonist","Nausea, vomiting, gallstones, pancreatitis; avoid in MTC/MEN2"], ["Tirzepatide weekly","Dual GIP/GLP-1 agonist","Same class cautions; GI effects at titration"], ["Liraglutide 3 mg daily","GLP-1 receptor agonist","Same class cautions; daily injection"], ["Phentermine-topiramate ER","Sympathomimetic + anticonvulsant","Teratogenic, tachycardia, paresthesia, mood"], ["Naltrexone-bupropion","Opioid antagonist + dopamine/NE reuptake inhibitor","BP rise, seizures, avoid with opioids"], ["Orlistat","Pancreatic lipase inhibitor","Steatorrhea, fat-soluble vitamin loss"], ["Setmelanotide","MC4R agonist","Only POMC/PCSK1/LEPR deficiency, Bardet-Biedl"]],[3.3,3.9,4.9],14,0.62) footer(s,"Indication generally BMI ≥ 30, or ≥ 27 with a weight-related comorbidity, alongside lifestyle therapy. Check local labelling.") # 14 Chart s=slide("Incretin-based therapy: how much weight loss?") cd=CategoryChartData(); cd.categories=["Lifestyle alone (12 mo, midpoint of 2-5%)","Semaglutide 2.4 mg (72 wk)","Tirzepatide (72 wk)"] cd.add_series("Mean weight loss (%)",(3.5,13.7,20.2)) gf=s.shapes.add_chart(XL_CHART_TYPE.COLUMN_CLUSTERED,Inches(0.6),Inches(1.5),Inches(7.0),Inches(5.2),cd); ch=gf.chart ch.has_legend=False; ch.has_title=False pl=ch.plots[0]; pl.gap_width=60; pl.has_data_labels=True dl=pl.data_labels; dl.font.size=Pt(16); dl.font.bold=True; dl.number_format='0.0"%"'; dl.number_format_is_linked=False; dl.position=XL_LABEL_POSITION.OUTSIDE_END ser=pl.series[0] for i,c in enumerate([RGBColor(0x9A,0xA7,0xB0),TEAL,ORANGE]): pt=ser.points[i]; pt.format.fill.solid(); pt.format.fill.fore_color.rgb=c ch.category_axis.tick_labels.font.size=Pt(12); ch.value_axis.tick_labels.font.size=Pt(12) ch.value_axis.maximum_scale=25; ch.value_axis.has_major_gridlines=False bullets(s,7.9,1.5,4.9,5.3,[ "SURMOUNT-5 (NEJM 2025, n=751, no diabetes): tirzepatide -20.2% vs semaglutide -13.7%; waist -18.4 vs -13.0 cm", "Weight regain after stopping: STEP-1 extension regained 11.6 of 17.3 points; SURMOUNT-4 placebo switch regained 14.0%", "Treat as chronic disease; long-term therapy is usually required", "A 2026 BMJ network meta-analysis compared drugs in adults with overweight or obesity (PMID 42419792)"],15) footer(s,"Sources: SURMOUNT-5 report; NICE 2025 expert insight (Medscape). Bar for lifestyle is an illustrative midpoint.") # 15 Surgery s=slide("Management step 3: bariatric and metabolic surgery") picture(s,'assets/img1.jpg',0.5,1.5,5.8,3.4) text(s,0.5,4.95,5.8,0.7,"Common bariatric procedures: simplified diagrams (image library)",12,False,RGBColor(0x7A,0x86,0x90),PP_ALIGN.CENTER) bullets(s,6.6,1.5,6.2,5.4,[ "Dominant operations: Roux-en-Y gastric bypass and sleeve gastrectomy", "Indications (ASMBS/IFSO 2022): BMI ≥ 35 regardless of comorbidity; consider at BMI 30-34.9 with metabolic disease", "Mechanisms go beyond restriction and malabsorption: gut and satiety hormones, bile acids, enteroenteric and gut-brain signaling", "Highly efficacious for weight loss and remission of T2DM", "Lifelong follow-up: iron, B12, folate, calcium, vitamin D; dumping, marginal ulcer, leak, hernia"],16) footer(s,"Mulholland & Greenfield's Surgery 7E, Key Points; Tietz Textbook of Laboratory Medicine 7E (post-bariatric monitoring)") # 16 Algorithm s=slide("Putting it together: a stepwise approach") steps=[("1","Assess","BMI, waist, comorbidities, secondary causes, drugs"), ("2","Lifestyle","Diet, activity, behavioral therapy for all"), ("3","Add drug","BMI ≥ 30, or ≥ 27 with comorbidity; incretin therapy preferred when available"), ("4","Surgery","BMI ≥ 35, or 30-34.9 with metabolic disease, or drug failure"), ("5","Maintain","Long-term follow-up; expect regain if therapy stops")] for i,(n,h,d) in enumerate(steps): x=0.6+i*2.47 rect(s,x,1.7,2.3,4.4,LIGHT); rect(s,x,1.7,2.3,0.12,ORANGE if i%2 else TEAL) c=rect(s,x+0.75,2.05,0.8,0.8,NAVY,shape=MSO_SHAPE.OVAL) text(s,x+0.75,2.05,0.8,0.8,n,26,True,WHITE,PP_ALIGN.CENTER,MSO_ANCHOR.MIDDLE) text(s,x+0.1,3.05,2.1,0.5,h,20,True,NAVY,PP_ALIGN.CENTER) text(s,x+0.12,3.65,2.06,2.4,d,14,False,GREY,PP_ALIGN.CENTER) text(s,0.6,6.3,12.1,0.6,"Special groups: pregnancy (avoid weight-loss drugs), children (family-based therapy first), adults with T2DM (prefer agents that also lower glucose).",14,False,TEAL) # 17 Takeaways s=slide("Key takeaways") card(s,0.6,1.5,7.3,5.3,"Remember",[ "Obesity is a chronic, relapsing disease of excess and dysfunctional adipose tissue", "BMI ≥ 30 defines it; waist and the 2025 clinical/preclinical model refine risk", "Visceral fat and adipokine imbalance drive insulin resistance and inflammation", "Exclude endocrine, genetic and drug causes when suggested", "Incretin drugs now give 14-20% weight loss; surgery remains the most durable option", "Stopping treatment usually leads to regain"],16) card(s,8.2,1.5,4.5,5.3,"Key references",[ "Mulholland & Greenfield's Surgery, 7E", "Harrison's Principles of Internal Medicine, 22E", "Textbook of Family Medicine, 9E", "Aronne L, et al. NEJM 2025 (SURMOUNT-5)", "Nong K, et al. BMJ 2026; PMID 42419792", "Kokkorakis M, et al. Pharmacol Rev 2025; PMID 39952695"],14,ORANGE) prs.save("output/Metabolic_Diseases_Obesity.pptx") print(len(prs.slides)) EOF python build.py
cd /tmp/workspace/obesity-ppt && python - <<'EOF' from pptx import Presentation from pptx.util import Emu import math prs=Presentation("output/Metabolic_Diseases_Obesity.pptx") for n,s in enumerate(prs.slides,1): for sh in s.shapes: if sh.has_text_frame and sh.text_frame.text.strip(): w=sh.width/914400-0.15; tot=0 for p in sh.text_frame.paragraphs: if not p.runs: continue sz=p.runs[0].font.size.pt cpl=max(1,w*72/(sz*0.5)) lines=math.ceil(len(p.text)/cpl) tot+=lines*sz*1.2/72+(p.space_after.pt/72 if p.space_after else 0) h=sh.height/914400 if tot>h+0.05: print(n,round(tot,2),round(h,2),sh.text_frame.text[:40].replace("\n"," ")) if sh.has_table: t=sh.table tot=0 for r in t.rows: mx=0 for j,c in enumerate(r.cells): sz=c.text_frame.paragraphs[0].runs[0].font.size.pt cpl=(t.columns[j].width/914400-0.16)*72/(sz*0.5) mx=max(mx,math.ceil(len(c.text_frame.text)/cpl)) tot+=max(r.height/914400, mx*sz*1.2/72+0.1) print("table",n,round(sh.top/914400+tot,2)) EOF
cd /tmp/workspace/obesity-ppt && sed -i 's/Beyond BMI: measuring adiposity and the 2025 redefinition/Beyond BMI and the 2025 redefinition/; s/Lancet Diabetes \& Endocrinology Commission, Jan 2025/Lancet Commission, Jan 2025/' build.py && python build.py && ls -la output
Metabolic Diseases Obesity
Presentation · PPTX