Modern Understanding and Diagnosis of Diabetes Insipidus
"diabetes insipidus" AND copeptin
2025 diabetes insipidus diagnosis copeptin hypertonic saline guideline
https://www.ncbi.nlm.nih.gov/books/NBK537591
PMID: 39409072
Create an exam-style diagnostic algorithm for AVP disorders
"arginine vasopressin deficiency" AND copeptin
Endotext 2025 diagnostic tests diabetes insipidus copeptin 6.5 pmol algorithm
PATIENT WITH POLYURIA ± POLYDIPSIA
↓
1. CONFIRM TRUE POLYURIA
• 24-h urine volume >50 mL/kg/day
(or approximately >3 L/day in adults)
↓
2. IS THE URINE HYPOTONIC?
• Urine osmolality (Uosm) <300 mOsm/kg
↓
┌──────────┴──────────┐
│ │
Uosm ≥300 mOsm/kg Uosm <300 mOsm/kg
Consider solute HYPOTONIC POLYURIA:
diuresis, e.g.: suspect AVP disorder or PP
• Diabetes mellitus ↓
• Mannitol ↓
• High urea load
• Diuretics
• Recovery from AKI
↓
3. EXCLUDE COMMON REVERSIBLE CAUSES
• Serum glucose and HbA1c
• Urea, creatinine/eGFR
• Sodium, potassium, calcium
• Urinalysis, medication history
• Look for lithium, demeclocycline, cisplatin,
amphotericin B, loop diuretics
↓
4. ASSESS SERUM SODIUM / PLASMA OSMOLALITY
A. Plasma osmolality high or serum Na+ ≥146 mmol/L
+ urine remains inappropriately dilute
→ DIAGNOSIS: AVP DISORDER IS VERY LIKELY
→ Primary polydipsia is unlikely
↓
Differentiate AVP-D from AVP-R
B. Plasma osmolality normal or low-normal
+ hypotonic polyuria
→ AVP-D, partial AVP-R, and primary polydipsia remain possible
↓
Proceed to copeptin-based testing if available
OR supervised water-deprivation test plus desmopressin
CONFIRMED HYPOTONIC POLYURIA
↓
Measure BASELINE PLASMA COPEPTIN
↓
┌─────────────────────────────────────────────────────┐
│ Copeptin ≥21.4 pmol/L │
│ → AVP RESISTANCE (nephrogenic DI) │
│ is strongly supported │
└─────────────────────────────────────────────────────┘
↓
If baseline copeptin is not diagnostic
↓
HYPERTONIC SALINE-STIMULATED COPEPTIN
in a specialist, closely monitored setting
↓
Achieve adequate osmotic stimulation
(commonly serum Na+ ≥150 mmol/L)
↓
┌─────────────────────────────────────────────────────┐
│ Stimulated copeptin low: ≤4.9 pmol/L │
│ → AVP DEFICIENCY │
│ complete or partial │
├─────────────────────────────────────────────────────┤
│ Stimulated copeptin >4.9 pmol/L │
│ → PRIMARY POLYDIPSIA favored │
└─────────────────────────────────────────────────────┘
SUPERVISED WATER-DEPRIVATION TEST
↓
Monitor:
• Weight
• Blood pressure and pulse
• Serum sodium / plasma osmolality
• Urine volume and urine osmolality
↓
STOP if:
• Significant weight loss
• Rising serum sodium / osmolality
• Hypotension, tachycardia, severe symptoms
↓
Give desmopressin
↓
Measure change in urine osmolality
| Result | Likely diagnosis |
|---|---|
| Urine concentrates appropriately during water deprivation, often Uosm >500-800 mOsm/kg | Primary polydipsia or normal physiology |
| Urine remains dilute during deprivation, then Uosm rises >50% after desmopressin | Complete AVP deficiency |
| Urine remains dilute, then rises <10% after desmopressin | AVP resistance |
| Intermediate concentration or desmopressin response, often 10%-50% | Partial AVP deficiency, partial AVP resistance, or chronic primary polydipsia: use stimulated copeptin if possible |
AVP DEFICIENCY
↓
History and examination
↓
• Recent pituitary/hypothalamic surgery?
• Head trauma?
• Postpartum disease?
• Headache, visual field loss, cranial neuropathy?
• Autoimmune/inflammatory or infiltrative disease?
• Childhood onset or family history?
↓
Tests
• MRI hypothalamus-pituitary region with contrast
• Anterior pituitary hormone assessment
• Consider tumor, metastasis, germinoma, craniopharyngioma,
sarcoidosis, Langerhans-cell histiocytosis, hypophysitis,
infection, trauma, genetic AVP disorders
AVP RESISTANCE
↓
Review reversible causes first
↓
• Lithium exposure
• Hypercalcemia
• Hypokalemia
• Chronic kidney disease
• Obstructive uropathy
• Drugs: demeclocycline, amphotericin B, cisplatin, etc.
↓
If early-onset, severe, or family history:
• Consider inherited AVPR2 mutation, often X-linked
• Consider AQP2 mutation
PRIMARY POLYDIPSIA
↓
Assess:
• Psychiatric illness or psychotropic drugs
• Compulsive water drinking
• Hypothalamic/dipsogenic thirst disorder
• “Health” or lifestyle-driven excessive intake
↓
Check for:
• Hyponatremia
• Low plasma osmolality
• Risk from empiric desmopressin
Understanding and Diagnosis of diabetes incipidus
"diabetes insipidus" AND copeptin
2025 Endotext diagnostic tests diabetes insipidus copeptin water deprivation
↑ Plasma osmolality / ↓ effective circulating volume
↓
↑ AVP release
↓
V2 receptor in collecting duct
↓
Aquaporin-2 insertion into membrane
↓
↑ Water reabsorption
↓
Concentrated urine
| Disorder | Basic defect | Important causes |
|---|---|---|
| AVP deficiency | Reduced AVP secretion | Pituitary surgery, head injury, hypothalamic-pituitary tumor, craniopharyngioma, germinoma, metastasis, autoimmune hypophysitis, sarcoidosis, Langerhans-cell histiocytosis, infection, genetic disease, idiopathic disease |
| AVP resistance | Renal unresponsiveness to AVP | Lithium, hypercalcemia, hypokalemia, chronic kidney disease, obstructive uropathy, inherited AVPR2 or AQP2 mutations |
| Gestational DI | Excess AVP degradation by placental vasopressinase | Usually develops in late pregnancy and often resolves after delivery |
| Primary polydipsia | Excess water intake suppresses AVP | Psychiatric illness, compulsive water drinking, hypothalamic thirst disorders, medication-related dry mouth, excessive “healthy” water consumption |
| Finding | Interpretation |
|---|---|
| High serum sodium or high plasma osmolality with dilute urine | DI is strongly likely |
| Normal sodium and normal plasma osmolality | Partial DI or primary polydipsia possible |
| Low-normal sodium or low plasma osmolality | Primary polydipsia more likely |
POLYURIA ± POLYDIPSIA
↓
Confirm increased 24-hour urine volume
↓
Measure urine osmolality
↓
┌─────────────────────────────────────────────┐
│ Urine osmolality ≥300 mOsm/kg │
│ → Consider solute diuresis or renal disease │
└─────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────┐
│ Urine osmolality <300 mOsm/kg │
│ → Hypotonic polyuria │
└─────────────────────────────────────────────┘
↓
Check serum sodium and plasma osmolality
↓
┌─────────────────────────────────────────────┐
│ Hypernatremia / hyperosmolality │
│ + inappropriately dilute urine │
│ → DI strongly suspected │
└─────────────────────────────────────────────┘
↓
Differentiate AVP deficiency from AVP resistance
with copeptin or desmopressin-based testing
↓
Normal or low-normal sodium/osmolality
↓
Differentiate partial AVP deficiency,
partial AVP resistance, and primary polydipsia
with stimulated copeptin or water-deprivation test
| Stimulated copeptin result | Interpretation |
|---|---|
| Low, ≤4.9 pmol/L | AVP deficiency likely |
| >4.9 pmol/L after adequate hyperosmolar stimulation | Primary polydipsia favored |
| Baseline ≥21.4 pmol/L | AVP resistance strongly favored |
| Result | Most likely diagnosis |
|---|---|
| Urine becomes appropriately concentrated with water deprivation, often >500-800 mOsm/kg | Primary polydipsia or normal physiology |
| Urine remains dilute, then rises >50% after desmopressin | Complete AVP deficiency |
| Urine remains dilute, then rises <10% after desmopressin | AVP resistance |
| Intermediate response | Partial AVP deficiency, partial AVP resistance, or chronic primary polydipsia |
| Feature | AVP deficiency | AVP resistance | Primary polydipsia |
|---|---|---|---|
| AVP action | Inadequate secretion | Kidney does not respond | Physiologically suppressed |
| Serum sodium | Often high if unable to drink | Often high if unable to drink | Often low-normal |
| Baseline copeptin | Low or inappropriately normal | High | Usually low-normal |
| Response to desmopressin | Marked rise in Uosm | Little or no rise in Uosm | Usually little additional rise after adequate deprivation |
| MRI pituitary | May show stalk lesion or absent posterior bright spot | Usually normal | Usually normal |
| Main treatment principle | AVP replacement and treat cause | Correct cause, reduce solute load, support water balance | Address excess fluid intake and cause |
Can u give me detail ppt for presentation on this topic with suitable images
diagram hypothalamus posterior pituitary vasopressin synthesis transport release anatomy
kidney collecting duct vasopressin V2 receptor aquaporin 2 diagram
MRI central diabetes insipidus pituitary stalk thickening posterior pituitary bright spot

This diagnostic image set consists of six magnetic resonance imaging (MRI) panels of the hypothalamic-pituitary region, illustrating the progression of lymphocytic infundibuloneurohypophysitis (LINH). Panels A-C represent the initial presentation: Coronal (A) and sagittal (B) T1-weighted images show significant thickening of the pituitary stalk (arrows) and the pathognomonic absence of the posterior pituitary 'bright spot' (arrowhead in B). Panel C is a contrast-enhanced T1 image showing rapid enhancement of the enlarged stalk. Panels D-F show a one-year follow-up: There is visible spontaneous regression of the pituitary stalk thickening (arrows in D, E, and F), indicating the self-limiting nature of the inflammatory process. However, sagittal T1-weighted images (E) confirm the persistent absence of the posterior pituitary bright spot (arrowhead), which correlates clinically with chronic central diabetes insipidus. This comparison chart serves as a primary educational tool for identifying the radiological hallmarks of infundibulitis and differentiating spontaneous structural resolution from functional recovery in neuroendocrine disorders.

This composite of magnetic resonance imaging (MRI) frames focuses on the sellar and suprasellar regions, specifically the pituitary gland and stalk (infundibulum), over a 15-month progression. Panels (a, d) show sagittal and coronal non-contrast T1-weighted images at baseline, where the bright spot of the posterior pituitary is absent. Panels (b, e) demonstrate homogeneous gadolinium enhancement of the pituitary at initial presentation. By 15 months (c, f), contrast-enhanced images reveal a hypoenhancing area within the thickened pituitary stalk extending toward the posterior lobe. The bottom row (g-j) provides a serial sagittal plain T1-weighted timeline (at 0, 6, 12, and 15 months), illustrating the progressive morphological change from a thin, linear stalk to a significantly thickened, bulbous infundibulum. These imaging features—loss of the posterior bright spot, progressive infundibular thickening, and late-stage hypoenhancement—are indicative of an infiltrative or neoplastic process such as a central nervous system germinoma or lymphocytic infundibuloneurohypophysitis, clinically manifesting as central diabetes insipidus.

Diagnostic Magnetic Resonance Imaging (MRI) of the brain focusing on the sella turcica and pituitary region. Figure (a) is a sagittal T1-weighted image demonstrating a thickened pituitary stalk (infundibulum), indicated by a blue arrow. Notably, there is an absence of the normal T1-weighted hyperintense 'bright spot' of the posterior pituitary gland (neurohypophysis). Figure (b) provides a coronal T1-weighted view with gadolinium contrast enhancement, further highlighting the nodular thickening and pathological enhancement of the pituitary stalk (black arrow). Surrounding anatomical structures including the anterior pituitary, optic chiasm, sphenoid sinus, and cavernous sinuses are visible. These visual findings are characteristic of infundibuloneurohypophysitis, often associated with systemic conditions such as Langerhans cell histiocytosis, and frequently correlate with clinical symptoms of central diabetes insipidus.

This composite diagnostic image features two MRI sequences of the brain in a patient diagnosed with Erdheim-Chester disease. Panel A is an axial Fluid-Attenuated Inversion Recovery (FLAIR) MRI showing a discrete, nodular hyperintensity within the subcortical white matter of the right frontal lobe (indicated by a blue arrow). Panel B is a midline sagittal T1-weighted MRI focusing on the sella turcica and hypothalamo-pituitary axis. The blue arrow in Panel B highlights the pathological loss of the normal physiological hyperintense signal (the posterior pituitary 'bright spot') within the neurohypophysis, a finding often associated with central diabetes insipidus. The pituitary stalk appears normal in morphology without thickening. These neuroimaging findings demonstrate the multi-systemic central nervous system involvement of Erdheim-Chester disease, specifically manifesting as white matter parenchymal lesions and hypothalamic-pituitary infiltration.

This diagnostic imaging composite displays two T1-weighted magnetic resonance imaging (MRI) scans of the brain focusing on the sellar and suprasellar regions. Image A is a coronal view highlighting a diffuse, bulbous thickening of the pituitary infundibulum (indicated by a white arrow), which appears isointense to slightly hyperintense compared to the surrounding brain parenchyma. Image B is a sagittal view demonstrating the absence of the normal physiological 'posterior pituitary bright spot' (indicated by a blue arrow) within the sella turcica. These radiographic findings are characteristic of pituitary stalk lesions and are clinically significant in the diagnostic evaluation of central diabetes insipidus and intracranial germinomas. The visual data is optimized for teaching medical professionals about neuroendocrine anatomy, infundibular pathology, and the interpretation of gadolinium-enhanced or T1-weighted neuroradiological features.

This diagnostic image is a T1-weighted sagittal MRI of the brain, focused on the sellar and suprasellar regions. The central focus, highlighted by a white circle, demonstrates two primary pathological findings consistent with neurohypophysitis. First, there is a visible thickening of the pituitary stalk (infundibulum), measured at a maximum diameter of 4 mm. Second, the image shows the absence of the normal 'posterior pituitary bright spot,' which typically represents the hyperintense signal of stored vasopressin in the neurohypophysis on T1 sequences. The surrounding anatomical structures, including the optic chiasm, corpus callosum, and sphenoid sinus, are visible for orientation. These neuroradiological features are clinically significant for the diagnosis of central diabetes insipidus (CDI), illustrating the inflammatory involvement of the infundibulo-hypophyseal axis.
"diabetes insipidus" AND copeptin
2025 Endotext diagnostic tests diabetes insipidus copeptin water deprivation
~/
Medical educational diagram illustrating the hypothalamus, posterior pituitary, and kidney collecting duct in vasopressin water-balance physiology, labeled AVP pathway and aquaporin-2 water reabsorption
Medical educational infographic showing a diagnostic pathway for hypotonic polyuria, differentiating AVP deficiency, AVP resistance, and primary polydipsia using urine osmolality, serum sodium, copeptin, and desmopressin response
mkdir -p "/tmp/workspace/diabetes-insipidus-presentation/assets" "/tmp/workspace/diabetes-insipidus-presentation/src" "/tmp/workspace/diabetes-insipidus-presentation/output" && python /tmp/skills/shared/scripts/fetch_images.py "https://cdn.orris.care/image-gen/ffba2cf7e46d4c868d4fd6c0386a1eca.png" "https://cdn.orris.care/image-gen/f5536a3ef25748ef8303ec80e09205f2.png" "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_319acd259e60be6b8ac4f6c76f40da3d21935846d40bafc1f74c9fd285f2106f.jpg" > "/tmp/workspace/diabetes-insipidus-presentation/assets/fetched.json"
python -c "import json,base64,os; d=json.load(open('/tmp/workspace/diabetes-insipidus-presentation/assets/fetched.json')); names=['avp_pathway.png','diagnostic_pathway.png','pituitary_mri.jpg']; [open('/tmp/workspace/diabetes-insipidus-presentation/assets/'+n,'wb').write(base64.b64decode(x['base64'].split(',',1)[1])) for x,n in zip(d,names)]" && ls -la "/tmp/workspace/diabetes-insipidus-presentation/assets"
python - <<'PY' from pathlib import Path p=Path('/tmp/workspace/diabetes-insipidus-presentation/src/create_deck.py') p.write_text(r'''from pptx import Presentation from pptx.util import Inches, Pt from pptx.dml.color import RGBColor from pptx.enum.shapes import MSO_SHAPE, MSO_CONNECTOR from pptx.enum.text import PP_ALIGN, MSO_ANCHOR from pptx.enum.dml import MSO_THEME_COLOR from pptx.enum.text import MSO_AUTO_SIZE from pptx.enum.shapes import MSO_SHAPE_TYPE from pptx.enum.text import MSO_ANCHOR from pptx import Presentation from pptx.util import Inches, Pt from pptx.dml.color import RGBColor from pptx.enum.shapes import MSO_SHAPE from pptx.enum.text import PP_ALIGN, MSO_ANCHOR OUT='/tmp/workspace/diabetes-insipidus-presentation/output/Understanding_and_Diagnosis_of_Diabetes_Insipidus.pptx' AS='/tmp/workspace/diabetes-insipidus-presentation/assets/' prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5) blank=prs.slide_layouts[6] NAVY=RGBColor(10,31,56); BLUE=RGBColor(22,103,158); TEAL=RGBColor(16,148,139); CYAN=RGBColor(49,180,199); PALE=RGBColor(235,246,249); INK=RGBColor(31,50,67); MUTED=RGBColor(84,105,120); WHITE=RGBColor(255,255,255); RED=RGBColor(185,67,61); GOLD=RGBColor(223,159,44) def bg(slide, dark=False): sh=slide.background.fill; sh.solid(); sh.fore_color.rgb=NAVY if dark else RGBColor(250,253,254) # header bar r=slide.shapes.add_shape(MSO_SHAPE.RECTANGLE,0,0,Inches(13.333),Inches(.16)); r.fill.solid(); r.fill.fore_color.rgb=TEAL; r.line.fill.background() def textbox(slide,text,x,y,w,h,size=20,color=INK,bold=False,align=PP_ALIGN.LEFT): tb=slide.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); tf=tb.text_frame; tf.clear(); tf.word_wrap=True; tf.margin_left=0;tf.margin_right=0;tf.margin_top=0;tf.margin_bottom=0; tf.vertical_anchor=MSO_ANCHOR.MIDDLE p=tf.paragraphs[0]; p.alignment=align; r=p.add_run(); r.text=text; r.font.name='Aptos';r.font.size=Pt(size);r.font.bold=bold;r.font.color.rgb=color return tb def title(slide,t,sub=None,dark=False): textbox(slide,t,.65,.38,12,.6,28,WHITE if dark else NAVY,True) if sub: textbox(slide,sub,.67,1.0,12,.35,12,RGBColor(190,220,230) if dark else MUTED) def footer(slide,n): textbox(slide,str(n),12.55,7.05,.35,.2,10,RGBColor(190,210,220),False,PP_ALIGN.RIGHT) def card(slide,x,y,w,h,head,body,accent=TEAL): s=slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(x), Inches(y), Inches(w), Inches(h));s.fill.solid();s.fill.fore_color.rgb=WHITE;s.line.color.rgb=RGBColor(214,228,234) a=slide.shapes.add_shape(MSO_SHAPE.RECTANGLE,Inches(x),Inches(y),Inches(.08),Inches(h));a.fill.solid();a.fill.fore_color.rgb=accent;a.line.fill.background() textbox(slide,head,x+.25,y+.18,w-.45,.32,16,NAVY,True) textbox(slide,body,x+.25,y+.62,w-.42,h-.75,12,INK) def bulletbox(slide,items,x,y,w,h,size=16,color=INK): tb=slide.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h));tf=tb.text_frame;tf.clear();tf.word_wrap=True;tf.margin_left=0;tf.margin_top=0 for i,it in enumerate(items): p=tf.paragraphs[0] if i==0 else tf.add_paragraph();p.text=it;p.level=0;p.font.size=Pt(size);p.font.color.rgb=color;p.space_after=Pt(8) return tb def add_img(slide,path,x,y,w,h): slide.shapes.add_picture(path, Inches(x), Inches(y), width=Inches(w), height=Inches(h)) def flow(slide, labels, x=1.0,y=2.4,w=2.5,gap=.35, colors=None): for i,lab in enumerate(labels): xx=x+i*(w+gap); sh=slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,Inches(xx),Inches(y),Inches(w),Inches(1.0));sh.fill.solid();sh.fill.fore_color.rgb=(colors[i] if colors else PALE);sh.line.color.rgb=TEAL textbox(slide,lab,xx+.12,y+.14,w-.24,.72,15,NAVY,True,PP_ALIGN.CENTER) if i<len(labels)-1: textbox(slide,'›',xx+w+.08,y+.24,.18,.4,28,TEAL,True,PP_ALIGN.CENTER) # 1 s=prs.slides.add_slide(blank);bg(s,True);title(s,'Understanding and Diagnosis\nof Diabetes Insipidus','Modern approach to AVP disorders, hypotonic polyuria, and copeptin-based testing',True);add_img(s,AS+'avp_pathway.png',7.45,1.55,5.25,4.5);textbox(s,'Presentation deck | Medical / endocrine teaching',.7,6.68,5,.25,13,RGBColor(186,220,230));footer(s,1) #2 s=prs.slides.add_slide(blank);bg(s);title(s,'Learning objectives','By the end, the audience should be able to:'); for i,(h,b,a) in enumerate([('Recognize','Recognize hypotonic polyuria and identify clinical red flags.',TEAL),('Classify','Differentiate AVP deficiency, AVP resistance, and primary polydipsia.',BLUE),('Test','Apply a structured laboratory and dynamic-testing algorithm.',GOLD),('Investigate','Plan etiologic evaluation after the physiological diagnosis.',RED)]): card(s,.75+(i%2)*6.1,1.65+(i//2)*2.2,5.55,1.65,h,b,a) footer(s,2) #3 s=prs.slides.add_slide(blank);bg(s);title(s,'Core concept: failure to conserve water');add_img(s,AS+'avp_pathway.png',.65,1.55,6.25,4.9);card(s,7.25,1.55,5.35,1.3,'Normal AVP axis','Rising osmolality stimulates AVP release. AVP activates V2 receptors in the collecting duct and inserts aquaporin-2 water channels.',TEAL);card(s,7.25,3.05,5.35,1.3,'In diabetes insipidus','Either AVP secretion is inadequate or the kidney cannot respond. The result is dilute urine and compensatory thirst.',BLUE);card(s,7.25,4.55,5.35,1.3,'Modern language','AVP deficiency (AVP-D) replaces “central DI”; AVP resistance (AVP-R) replaces “nephrogenic DI”.',GOLD);footer(s,3) #4 s=prs.slides.add_slide(blank);bg(s);title(s,'What is diabetes insipidus?');card(s,.75,1.45,3.9,2.1,'Definition','A water-balance disorder causing large volumes of dilute urine due to impaired AVP secretion, AVP action, or increased AVP metabolism.',TEAL);card(s,4.75,1.45,3.9,2.1,'Physiological threshold','True hypotonic polyuria: 24-hour urine >50 mL/kg body weight with urine osmolality <300 mOsm/kg.',BLUE);card(s,8.75,1.45,3.9,2.1,'Why sodium may be normal','Intact thirst and ready access to water can compensate. Hypernatremia occurs when intake or thirst is impaired.',GOLD);textbox(s,'Key distinction: polyuria means increased volume, not simply urinary frequency.',.85,4.3,11.7,.5,21,NAVY,True,PP_ALIGN.CENTER);footer(s,4) #5 s=prs.slides.add_slide(blank);bg(s);title(s,'Clinical presentation and red flags');card(s,.75,1.4,3.85,3.9,'Typical symptoms','Polyuria\nPolydipsia, often preference for cold water\nNocturia\nFatigue and poor concentration',TEAL);card(s,4.75,1.4,3.85,3.9,'Examination / labs','Dehydration\nHigh-normal or high sodium\nRaised plasma osmolality\nInappropriately dilute urine',BLUE);card(s,8.75,1.4,3.85,3.9,'Urgent setting','Confusion, seizures, severe dehydration, hypernatremia, inability to drink, or new onset after pituitary surgery.',RED);textbox(s,'High sodium + dilute urine is a high-yield clue to DI.',.85,5.75,11.5,.4,19,RED,True,PP_ALIGN.CENTER);footer(s,5) #6 s=prs.slides.add_slide(blank);bg(s);title(s,'Classification and common causes'); card(s,.65,1.35,3.0,4.9,'AVP deficiency','Acquired: pituitary surgery, trauma, tumors, infiltrative or autoimmune disease.\n\nGenetic or idiopathic causes also occur.\n\nGestational form: placental vasopressinase increases AVP degradation.',TEAL) card(s,5.15,1.35,3.0,4.9,'AVP resistance','Acquired: lithium, hypercalcemia, hypokalemia, kidney disease, obstruction.\n\nGenetic: AVPR2 (often X-linked) or AQP2 mutations.',BLUE) card(s,9.65,1.35,3.0,4.9,'Primary polydipsia','Not DI. Excess water intake suppresses AVP.\n\nPsychiatric illness, compulsive drinking, dipsogenic disorders, or “health” water intake are contributors.',GOLD);footer(s,6) #7 s=prs.slides.add_slide(blank);bg(s);title(s,'Step 1: confirm hypotonic polyuria');flow(s,['History & 24-h urine','Urine osmolality','Exclude solute diuresis','Assess serum sodium'],.55,2.0,2.85,.28,[PALE,PALE,PALE,PALE]);card(s,.75,4.05,3.75,1.45,'History','Fluid intake, nocturia, medications, pregnancy, surgery or head injury, family history.',TEAL);card(s,4.8,4.05,3.75,1.45,'Basic laboratory tests','Na+, glucose, creatinine/eGFR, calcium, potassium, plasma osmolality, urinalysis.',BLUE);card(s,8.85,4.05,3.75,1.45,'Do not miss','Glycosuria, mannitol, diuretics, high urea load, recovery from AKI, chronic kidney disease.',GOLD);footer(s,7) #8 s=prs.slides.add_slide(blank);bg(s);title(s,'Step 2: interpret paired serum and urine osmolality'); card(s,.8,1.55,3.75,3.55,'High plasma osmolality / hypernatremia','If urine remains dilute or is submaximally concentrated, DI is strongly likely. Primary polydipsia is unlikely.',RED) card(s,4.8,1.55,3.75,3.55,'Normal plasma osmolality','Common in ambulatory DI because drinking matches urinary water losses. Dynamic testing is often needed.',BLUE) card(s,8.8,1.55,3.75,3.55,'Low or low-normal sodium','Primary polydipsia is more likely, but partial AVP-D can still require formal testing.',TEAL) textbox(s,'Interpret results in clinical context: thirst, access to water, renal function, and recent IV fluids all matter.',.85,5.7,11.5,.35,16,MUTED,False,PP_ALIGN.CENTER);footer(s,8) #9 s=prs.slides.add_slide(blank);bg(s);title(s,'Traditional dynamic test: water deprivation + desmopressin'); flow(s,['Supervised fluid restriction','Serial weight, vital signs, Na+ and Uosm','Give desmopressin','Measure Uosm response'],.45,1.65,3.0,.27,[PALE,PALE,PALE,PALE]); card(s,.75,3.55,3.75,2.0,'Primary polydipsia','Urine concentrates appropriately during deprivation, often to >500 mOsm/kg.',TEAL);card(s,4.8,3.55,3.75,2.0,'AVP deficiency','Persistently dilute urine then substantial rise after desmopressin. A rise >50% supports complete AVP-D.',BLUE);card(s,8.85,3.55,3.75,2.0,'AVP resistance','Little response to desmopressin. A rise <10% supports AVP-R. Values 10-50% are indeterminate.',RED);footer(s,9) #10 s=prs.slides.add_slide(blank);bg(s);title(s,'Why the water-deprivation test can be difficult'); card(s,.75,1.5,3.65,3.8,'Partial disorders','Partial AVP-D and partial AVP-R have overlapping urine osmolality responses.',GOLD);card(s,4.85,1.5,3.65,3.8,'Chronic polydipsia','Long-standing high water intake reduces medullary concentrating capacity and can mimic partial AVP-D.',BLUE);card(s,8.95,1.5,3.65,3.8,'Safety','The test requires supervision. Stop for weight loss, rising sodium, hypotension, tachycardia, or significant symptoms.',RED);footer(s,10) #11 s=prs.slides.add_slide(blank);bg(s);title(s,'Modern approach: copeptin');card(s,.75,1.42,4.0,1.35,'Why copeptin?','Copeptin is co-secreted with AVP in equimolar amounts but is analytically more stable than AVP.',TEAL);card(s,.75,3.0,4.0,1.35,'Baseline copeptin','A high baseline copeptin >21.4 pmol/L strongly identifies AVP resistance.',BLUE);card(s,.75,4.58,4.0,1.35,'Stimulated copeptin','After adequate hypertonic saline stimulation, low copeptin supports AVP deficiency; an appropriate rise supports primary polydipsia.',GOLD);add_img(s,AS+'diagnostic_pathway.png',5.15,1.25,7.2,4.95);footer(s,11) #12 s=prs.slides.add_slide(blank);bg(s);title(s,'Copeptin-based diagnostic interpretation'); flow(s,['Confirmed hypotonic polyuria','Baseline copeptin','If non-diagnostic: stimulated copeptin','Classify'],.45,1.3,3.0,.27,[PALE,PALE,PALE,PALE]); card(s,.75,3.0,3.75,2.25,'AVP resistance','Baseline copeptin >21.4 pmol/L strongly supports AVP-R.',BLUE);card(s,4.8,3.0,3.75,2.25,'AVP deficiency','Stimulated copeptin ≤4.9 pmol/L after adequate osmotic stimulation supports AVP-D.',RED);card(s,8.85,3.0,3.75,2.25,'Primary polydipsia','Stimulated copeptin >4.9 pmol/L at Na+ ≥150 mmol/L favors primary polydipsia.',TEAL);textbox(s,'Thresholds can vary with assay and local protocol. Testing requires specialist monitoring.',.8,5.85,11.7,.3,14,MUTED,False,PP_ALIGN.CENTER);footer(s,12) #13 s=prs.slides.add_slide(blank);bg(s);title(s,'Etiologic evaluation after confirming AVP deficiency');add_img(s,AS+'pituitary_mri.jpg',.65,1.4,5.3,4.55);textbox(s,'Example: stalk thickening and loss of posterior pituitary bright spot',.8,6.1,5.0,.35,12,MUTED,False,PP_ALIGN.CENTER);card(s,6.35,1.4,5.9,1.25,'MRI hypothalamus-pituitary with contrast','Look for pituitary stalk lesions, tumors, infiltrative disease, and postoperative changes.',TEAL);card(s,6.35,2.95,5.9,1.25,'Assess anterior pituitary function','Pituitary hormone deficiencies can coexist and may mask polyuria until glucocorticoid replacement is started.',BLUE);card(s,6.35,4.5,5.9,1.25,'Targeted history and tests','Trauma or surgery, malignancy, inflammatory disease, infection, sarcoidosis, Langerhans-cell histiocytosis, and genetic causes.',GOLD);footer(s,13) #14 s=prs.slides.add_slide(blank);bg(s);title(s,'Special clinical settings'); card(s,.75,1.45,3.75,3.9,'Post-pituitary surgery','Monitor fluid balance, urine output, sodium, and osmolality closely. Early postoperative DI may be transient; delayed hyponatremia can follow.',RED);card(s,4.8,1.45,3.75,3.9,'Pregnancy','Consider gestational AVP-D due to placental vasopressinase. Symptoms often begin in late pregnancy and improve after delivery.',GOLD);card(s,8.85,1.45,3.75,3.9,'Infants / impaired thirst','High risk of severe hypernatremia because they cannot reliably compensate with drinking. Treat as urgent.',BLUE);footer(s,14) #15 s=prs.slides.add_slide(blank);bg(s);title(s,'Exam-style summary algorithm');add_img(s,AS+'diagnostic_pathway.png',.7,1.25,6.1,4.9);card(s,7.25,1.35,5.25,1.05,'1. Confirm hypotonic polyuria','24-h volume + urine osmolality; exclude solute diuresis.',TEAL);card(s,7.25,2.65,5.25,1.05,'2. Check sodium / plasma osmolality','Hypernatremia with dilute urine makes DI highly likely.',BLUE);card(s,7.25,3.95,5.25,1.05,'3. Classify physiology','Use copeptin if available; otherwise supervised water deprivation plus desmopressin.',GOLD);card(s,7.25,5.25,5.25,1.05,'4. Investigate cause','MRI and pituitary assessment for AVP-D; medication and metabolic review for AVP-R.',RED);footer(s,15) #16 s=prs.slides.add_slide(blank);bg(s,True);title(s,'Take-home messages',None,True);bulletbox(s,['Use “AVP deficiency” and “AVP resistance” to describe the physiological defect.','Always confirm hypotonic polyuria and exclude osmotic diuresis before dynamic testing.','Hypernatremia or hyperosmolality with inappropriately dilute urine is strongly suggestive of DI.','Copeptin-based testing has improved differentiation of AVP-D from primary polydipsia.','Dynamic tests require monitoring, and etiologic investigation follows physiological classification.'],.9,1.55,11.4,4.6,21,WHITE);textbox(s,'Questions?',.9,6.5,11.4,.35,24,RGBColor(171,226,226),True,PP_ALIGN.CENTER);footer(s,16) #17 s=prs.slides.add_slide(blank);bg(s);title(s,'References'); refs=['Harrison’s Principles of Internal Medicine, 22nd ed. Chapter: Diabetes Insipidus (AVP Deficiency and AVP Resistance), 2025.','Brenner and Rector’s The Kidney. Differential Diagnosis of Polyuria.','Gubbi S, et al. Diagnostic Tests for Diabetes Insipidus. Endotext, updated 2025.','Refardt J, et al. Arginine- or Hypertonic Saline-Stimulated Copeptin to Diagnose AVP Deficiency. N Engl J Med. 2023;389:1877-1887.','Ciortea DA, et al. Diagnostic Utility of Copeptin in Pediatric Patients with Polyuria-Polydipsia Syndrome: systematic review and meta-analysis. Int J Mol Sci. 2024;25:10743. PMID 39409072.','MRI slide image: medical image library figure demonstrating pituitary stalk thickening and absent posterior pituitary bright spot.'] bulletbox(s,refs,.85,1.35,11.7,5.6,15,INK);footer(s,17) prs.save(OUT) print(OUT) ''') PY python "/tmp/workspace/diabetes-insipidus-presentation/src/create_deck.py" && ls -lh "/tmp/workspace/diabetes-insipidus-presentation/output/Understanding_and_Diagnosis_of_Diabetes_Insipidus.pptx"
python - <<'PY' from pptx import Presentation p='/tmp/workspace/diabetes-insipidus-presentation/output/Understanding_and_Diagnosis_of_Diabetes_Insipidus.pptx' prs=Presentation(p) print('slides',len(prs.slides)) for i,s in enumerate(prs.slides,1): texts=[] for sh in s.shapes: if getattr(sh,'has_text_frame',False) and sh.text_frame.text.strip(): texts.append(sh.text_frame.text.replace('\n',' | ')[:100]) pics=sum(1 for sh in s.shapes if sh.shape_type==13) print(i, 'pics',pics,'text:', ' || '.join(texts[:2])) PY
Understanding and Diagnosis of Diabetes Insipidus
Presentation · PPTX
Pptx should not be done or look like done by AI it should be neat and should look like creative presentation not AI done plz
~/diabetes-insipidus-presentation
python - <<'PY' from pathlib import Path p=Path('/tmp/workspace/diabetes-insipidus-presentation/src/create_creative_deck.py') p.write_text(r'''from pptx import Presentation from pptx.util import Inches, Pt from pptx.dml.color import RGBColor from pptx.enum.shapes import MSO_SHAPE from pptx.enum.text import PP_ALIGN, MSO_ANCHOR from pptx.enum.dml import MSO_LINE_DASH_STYLE OUT='/tmp/workspace/diabetes-insipidus-presentation/output/Diabetes_Insipidus_Creative_Presentation.pptx' MRI='/tmp/workspace/diabetes-insipidus-presentation/assets/pituitary_mri.jpg' prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5); blank=prs.slide_layouts[6] # warm editorial medical palette INK=RGBColor(28,42,53); INK2=RGBColor(56,73,83); SAGE=RGBColor(84,123,119); MINT=RGBColor(215,235,229); PAPER=RGBColor(248,246,240); WHITE=RGBColor(255,255,255); CLAY=RGBColor(196,105,77); SAND=RGBColor(235,222,197); BLUE=RGBColor(65,117,143); PALEBLUE=RGBColor(218,232,239); RED=RGBColor(174,67,61); GREY=RGBColor(126,139,144) def rect(slide,x,y,w,h,fill, line=None, radius=False): sh=slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if radius else MSO_SHAPE.RECTANGLE, Inches(x), Inches(y), Inches(w), Inches(h)) sh.fill.solid(); sh.fill.fore_color.rgb=fill if line: sh.line.color.rgb=line else: sh.line.fill.background() return sh def tx(slide,text,x,y,w,h,sz=18,color=INK,bold=False,align=PP_ALIGN.LEFT,font='Aptos Display'): box=slide.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); tf=box.text_frame;tf.clear();tf.word_wrap=True;tf.margin_left=0;tf.margin_right=0;tf.margin_top=0;tf.margin_bottom=0;tf.vertical_anchor=MSO_ANCHOR.MIDDLE p=tf.paragraphs[0];p.alignment=align;r=p.add_run();r.text=text;r.font.name=font;r.font.size=Pt(sz);r.font.bold=bold;r.font.color.rgb=color return box def lines(slide, items, x,y,w, sz=16, color=INK2, gap=9): box=slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(5.3)); tf=box.text_frame;tf.clear();tf.word_wrap=True;tf.margin_left=0;tf.margin_top=0 for i,item in enumerate(items): p=tf.paragraphs[0] if i==0 else tf.add_paragraph();p.text=item;p.font.name='Aptos';p.font.size=Pt(sz);p.font.color.rgb=color;p.space_after=Pt(gap) return box def base(slide,no,section='UNDERSTANDING & DIAGNOSIS'): slide.background.fill.solid();slide.background.fill.fore_color.rgb=PAPER rect(slide,.56,.42,.13,.13,SAGE) tx(slide,section,.78,.35,4,.28,9,SAGE,True,font='Aptos') tx(slide,f'{no:02d}',12.25,6.88,.45,.23,10,GREY,False,PP_ALIGN.RIGHT,font='Aptos') def h(slide,title,kicker=None): if kicker: tx(slide,kicker,.78,1.12,11.4,.25,10,CLAY,True,font='Aptos') tx(slide,title,.75,1.38,11.7,.68,29,INK,True) def dot(slide,x,y,color=SAGE,scale=.12): rect(slide,x,y,scale,scale,color, radius=True) def rule(slide,x,y,w,color=RGBColor(207,211,205)): rect(slide,x,y,w,.015,color) #1 Cover s=prs.slides.add_slide(blank);s.background.fill.solid();s.background.fill.fore_color.rgb=INK rect(s,0,0,13.333,7.5,INK);rect(s,.72,.82,.18,.18,CLAY,True) tx(s,'DIABETES\nINSIPIDUS',.73,1.35,6.3,1.65,37,WHITE,True) tx(s,'Understanding the AVP axis\nand making the diagnosis with confidence',.78,3.42,5.4,.7,17,RGBColor(211,226,220),False,font='Aptos') rule(s,.78,4.55,4.65,RGBColor(102,135,131));tx(s,'A focused clinical presentation',.78,4.75,4,.28,12,RGBColor(194,213,207),False,font='Aptos') # minimalist kidney/pituitary motif for i,(x,y,r,c) in enumerate([(9.0,1.45,1.2,SAGE),(10.15,2.65,.58,CLAY),(9.0,4.3,.45,RGBColor(119,168,163)),(11.0,4.25,.86,BLUE)]): sh=s.shapes.add_shape(MSO_SHAPE.OVAL,Inches(x), Inches(y), Inches(r), Inches(r));sh.fill.solid();sh.fill.fore_color.rgb=c;sh.line.fill.background() tx(s,'AVP',9.02,1.75,1.15,.35,19,WHITE,True,PP_ALIGN.CENTER);tx(s,'H₂O',10.18,2.82,.5,.22,11,WHITE,True,PP_ALIGN.CENTER);tx(s,'kidney',10.95,4.57,.96,.2,11,WHITE,True,PP_ALIGN.CENTER) #2 s=prs.slides.add_slide(blank);base(s,2,'THE CLINICAL QUESTION');h(s,'When does polyuria mean “DI”?','START WITH THE PHENOTYPE') tx(s,'Polyuria is a volume problem, not a frequency problem.',.78,2.33,7.5,.38,20,SAGE,True) lines(s,['Measure 24-hour urine output before ordering dynamic tests.','Confirm hypotonic urine, then determine whether AVP secretion or renal response is impaired.','Think of DI as a disorder of water conservation.'],.83,3.05,6.3,18) rect(s,8.1,2.18,3.85,2.85,MINT,None,True);tx(s,'TRUE HYPOTONIC\nPOLYURIA',8.43,2.62,3.15,.55,17,INK,True,PP_ALIGN.CENTER);tx(s,'Urine volume >50 mL/kg/day\n+ urine osmolality <300 mOsm/kg',8.43,3.48,3.15,.65,18,SAGE,True,PP_ALIGN.CENTER);tx(s,'The starting point for diagnosis',8.43,4.45,3.15,.24,11,INK2,False,PP_ALIGN.CENTER,font='Aptos') #3 s=prs.slides.add_slide(blank);base(s,3,'PHYSIOLOGY');h(s,'The AVP pathway in one slide','WHY URINE CONCENTRATES') # editorial horizontal story stages=[('1','Osmoreceptors','Rising plasma osmolality'),('2','Posterior pituitary','AVP is released'),('3','Collecting duct','V2 receptor activation'),('4','Aquaporin-2','Water is reabsorbed')] for i,(n,hd,bd) in enumerate(stages): x=.75+i*3.13 rect(s,x,2.55,2.48,2.15,WHITE,RGBColor(220,219,213),True);tx(s,n,x+.2,2.76,.35,.3,14,CLAY,True);tx(s,hd,x+.2,3.17,2.04,.3,16,INK,True);tx(s,bd,x+.2,3.72,2.0,.5,13,INK2,False,font='Aptos') if i<3: tx(s,'→',x+2.58,3.33,.35,.3,22,SAGE,True,PP_ALIGN.CENTER) rect(s,.75,5.42,11.8,.55,INK,None,True);tx(s,'Failure at the pituitary = AVP deficiency | Failure at the kidney = AVP resistance',.98,5.55,11.3,.22,14,WHITE,True,PP_ALIGN.CENTER,font='Aptos') #4 s=prs.slides.add_slide(blank);base(s,4,'LANGUAGE & CLASSIFICATION');h(s,'Three mechanisms. One shared phenotype.','CLASSIFY BEFORE YOU TEST') cols=[('AVP deficiency','Inadequate synthesis or release of AVP.\nFormerly “central DI”.',SAGE),('AVP resistance','The collecting duct does not respond to AVP.\nFormerly “nephrogenic DI”.',BLUE),('Primary polydipsia','Excess water intake suppresses AVP.\nA mimic, not DI.',CLAY)] for i,(a,b,c) in enumerate(cols): x=.75+i*4.1;rect(s,x,2.1,3.6,2.9,WHITE,None,True);rect(s,x,2.1,3.6,.12,c);tx(s,a,x+.3,2.62,3,.35,20,INK,True);tx(s,b,x+.3,3.35,2.95,.9,15,INK2,False,font='Aptos');tx(s,'Clinical question →',x+.3,4.47,1.5,.2,10,c,True,font='Aptos') tx(s,'Can the body make AVP? Can the kidney answer it? Or is water intake driving the picture?',.78,5.72,11.7,.35,18,SAGE,True,PP_ALIGN.CENTER) #5 s=prs.slides.add_slide(blank);base(s,5,'CLINICAL RECOGNITION');h(s,'Read the bedside clues first','THE PATTERN MATTERS') rect(s,.75,2.05,5.1,3.55,WHITE,None,True);tx(s,'Typical history',1.12,2.42,2.5,.35,19,INK,True);lines(s,['Polyuria and nocturia','Persistent thirst, often cold water preference','Recent pituitary surgery, trauma, pregnancy or lithium exposure'],1.12,3.05,4.2,16) rect(s,6.22,2.05,5.1,3.55,INK,None,True);tx(s,'Red flags',6.6,2.42,2.5,.35,19,WHITE,True);lines(s,['Hypernatremia or rising osmolality','Confusion, weakness or dehydration','Unable to drink, reduced consciousness, infants or frail patients'],6.6,3.05,4.2,16,RGBColor(220,235,230)) rect(s,1.1,5.95,10.6,.06,CLAY);tx(s,'A normal sodium does not exclude DI when thirst and water access are intact.',1.1,6.2,10.7,.25,15,INK2,True,PP_ALIGN.CENTER,font='Aptos') #6 s=prs.slides.add_slide(blank);base(s,6,'FIRST-LINE WORK-UP');h(s,'Before dynamic testing: confirm, pair, exclude','A SIMPLE FOUR-PART PANEL') items=[('01','Confirm volume','24-hour urine output'),('02','Pair osmolality','Serum Na+/plasma osmolality + Uosm'),('03','Exclude solute diuresis','Glucose, urinalysis, renal function'),('04','Correct reversible drivers','K+, Ca2+, medications, obstruction')] for i,(n,a,b) in enumerate(items): y=2.1+i*1.0;tx(s,n,.85,y,.5,.25,12,CLAY,True);tx(s,a,1.55,y,3.2,.28,17,INK,True);tx(s,b,5.0,y,5.8,.28,15,INK2,False,font='Aptos');rule(s,1.55,y+.56,9.25) #7 s=prs.slides.add_slide(blank);base(s,7,'INTERPRETATION');h(s,'Pair serum sodium with urine osmolality','THE FIRST FORK IN THE ROAD') rect(s,.75,2.1,3.75,3.15,PALEBLUE,None,True);tx(s,'High Na+ / high plasma osmolality',1.08,2.5,3.1,.6,18,INK,True,PP_ALIGN.CENTER);tx(s,'+ dilute urine\n\nDI is strongly likely',1.08,3.45,3.1,.9,17,BLUE,True,PP_ALIGN.CENTER) rect(s,4.8,2.1,3.75,3.15,MINT,None,True);tx(s,'Normal Na+ / normal osmolality',5.13,2.5,3.1,.6,18,INK,True,PP_ALIGN.CENTER);tx(s,'Thirst may be compensating\n\nProceed to formal testing',5.13,3.45,3.1,.9,17,SAGE,True,PP_ALIGN.CENTER) rect(s,8.85,2.1,3.75,3.15,SAND,None,True);tx(s,'Low or low-normal Na+',9.18,2.5,3.1,.6,18,INK,True,PP_ALIGN.CENTER);tx(s,'Primary polydipsia more likely\n\nbut partial DI may overlap',9.18,3.45,3.1,.9,17,CLAY,True,PP_ALIGN.CENTER) #8 s=prs.slides.add_slide(blank);base(s,8,'CLASSIC TEST');h(s,'Water deprivation plus desmopressin','THE ESTABLISHED PATHWAY') # timeline for i,(a,b,c) in enumerate([('Restrict','Supervised fluid restriction',SAGE),('Monitor','Weight, vitals, Na+ and Uosm',BLUE),('Administer','Desmopressin',CLAY),('Interpret','Change in Uosm',INK)]): x=.75+i*3.05;dot(s,x+1.05,2.43,c,.23);tx(s,a,x,2.85,2.35,.28,17,INK,True,PP_ALIGN.CENTER);tx(s,b,x+.1,3.3,2.15,.45,13,INK2,False,PP_ALIGN.CENTER,font='Aptos') if i<3: rect(s,x+2.2,2.52,.85,.035,RGBColor(184,198,194)) rect(s,.75,4.47,11.8,1.18,WHITE,None,True);tx(s,'Interpretation',1.05,4.76,1.5,.28,16,CLAY,True);tx(s,'>50% rise in Uosm → AVP deficiency | <10% rise → AVP resistance | intermediate results → overlap',2.55,4.76,9.5,.3,15,INK,True,PP_ALIGN.CENTER,font='Aptos') tx(s,'Perform only with clinical supervision and predefined stop criteria.',.8,6.15,11.6,.25,13,RED,True,PP_ALIGN.CENTER,font='Aptos') #9 s=prs.slides.add_slide(blank);base(s,9,'MODERN TESTING');h(s,'Copeptin changes the diagnostic conversation','A STABLE SURROGATE FOR AVP') rect(s,.75,2.08,4.2,3.65,INK,None,True);tx(s,'Why copeptin?',1.1,2.55,3.2,.35,21,WHITE,True);lines(s,['Released in equimolar amounts with AVP.','More stable and easier to measure than AVP.','Useful when traditional testing is equivocal.'],1.1,3.22,3.25,16,RGBColor(221,235,231),10) rect(s,5.35,2.08,6.65,1.42,WHITE,None,True);tx(s,'Baseline copeptin >21.4 pmol/L',5.72,2.47,3.3,.32,18,BLUE,True);tx(s,'Strongly supports AVP resistance.',9.02,2.47,2.5,.32,14,INK2,False,font='Aptos') rect(s,5.35,3.9,6.65,1.42,WHITE,None,True);tx(s,'Stimulated copeptin',5.72,4.26,2.4,.32,18,SAGE,True);tx(s,'Low after osmotic stimulation supports AVP-D; an appropriate rise supports primary polydipsia.',8.15,4.12,3.25,.62,13,INK2,False,font='Aptos') #10 s=prs.slides.add_slide(blank);base(s,10,'COPEPTIN ALGORITHM');h(s,'Use the result to classify the physiology','PREFERRED WHEN AVAILABLE') # decision tree native rect(s,.75,2.0,2.5,.78,INK,None,True);tx(s,'Confirmed hypotonic\npolyuria',.9,2.17,2.2,.36,16,WHITE,True,PP_ALIGN.CENTER) tx(s,'→',3.35,2.18,.4,.3,24,SAGE,True,PP_ALIGN.CENTER) rect(s,3.85,2.0,2.45,.78,MINT,None,True);tx(s,'Baseline copeptin',4.05,2.22,2.05,.26,16,INK,True,PP_ALIGN.CENTER) tx(s,'→',6.42,2.18,.4,.3,24,SAGE,True,PP_ALIGN.CENTER) rect(s,6.92,2.0,2.6,.78,PALEBLUE,None,True);tx(s,'Stimulate if needed',7.16,2.22,2.1,.26,16,INK,True,PP_ALIGN.CENTER) rect(s,1.05,4.18,3.25,1.35,WHITE,None,True);tx(s,'>21.4 pmol/L',1.35,4.5,2.65,.28,18,BLUE,True,PP_ALIGN.CENTER);tx(s,'AVP resistance',1.35,4.94,2.65,.23,14,INK2,False,PP_ALIGN.CENTER,font='Aptos') rect(s,5.05,4.18,3.25,1.35,WHITE,None,True);tx(s,'≤4.9 pmol/L after stimulation',5.27,4.5,2.8,.28,16,RED,True,PP_ALIGN.CENTER);tx(s,'AVP deficiency',5.35,4.94,2.65,.23,14,INK2,False,PP_ALIGN.CENTER,font='Aptos') rect(s,9.05,4.18,3.25,1.35,WHITE,None,True);tx(s,'>4.9 pmol/L after stimulation',9.27,4.5,2.8,.28,16,SAGE,True,PP_ALIGN.CENTER);tx(s,'Primary polydipsia favored',9.35,4.94,2.65,.23,14,INK2,False,PP_ALIGN.CENTER,font='Aptos') for x in [2.6,6.6,10.6]: rect(s,x,3.05,.035,1.1,RGBColor(183,195,190)) tx(s,'Hypertonic saline stimulation needs specialist supervision and serial sodium measurement.',.8,6.18,11.5,.25,13,RED,True,PP_ALIGN.CENTER,font='Aptos') #11 s=prs.slides.add_slide(blank);base(s,11,'AFTER AVP DEFICIENCY');h(s,'Then ask: what is affecting the hypothalamic-pituitary axis?','ETIOLOGIC WORK-UP') s.shapes.add_picture(MRI, Inches(.75), Inches(2.05), width=Inches(4.75), height=Inches(3.85));tx(s,'MRI example: stalk thickening with absent posterior “bright spot”',.78,6.08,4.8,.32,10,GREY,False,font='Aptos') rect(s,6.05,2.05,5.75,1.0,WHITE,None,True);tx(s,'MRI with contrast',6.4,2.36,2.2,.28,17,SAGE,True);tx(s,'Sellar / suprasellar mass, stalk lesion, infiltrative disease',8.45,2.36,2.9,.3,13,INK2,False,font='Aptos') rect(s,6.05,3.43,5.75,1.0,WHITE,None,True);tx(s,'Anterior pituitary profile',6.4,3.74,2.55,.28,17,BLUE,True);tx(s,'Coexisting hormone deficits can mask DI',9.05,3.74,2.25,.3,13,INK2,False,font='Aptos') rect(s,6.05,4.81,5.75,1.0,WHITE,None,True);tx(s,'Targeted history',6.4,5.12,2.0,.28,17,CLAY,True);tx(s,'Surgery, trauma, tumor, autoimmune or infiltrative disease',8.45,5.12,2.9,.3,13,INK2,False,font='Aptos') #12 s=prs.slides.add_slide(blank);base(s,12,'SPECIAL SETTINGS');h(s,'Some patients cannot compensate with thirst','WHERE DI BECOMES DANGEROUS') for i,(a,b,c) in enumerate([('After pituitary surgery','Track input/output and sodium. DI may be transient; later hyponatremia can occur.',RED),('Pregnancy','Placental vasopressinase can cause gestational AVP deficiency, often resolving postpartum.',CLAY),('Infants & impaired thirst','Limited access to water or absent thirst makes hypernatremia a medical emergency.',BLUE)]): x=.75+i*4.1;rect(s,x,2.25,3.55,3.15,WHITE,None,True);rect(s,x,2.25,3.55,.11,c);tx(s,a,x+.28,2.8,2.9,.55,19,INK,True);tx(s,b,x+.28,3.8,2.85,.85,14,INK2,False,font='Aptos') #13 s=prs.slides.add_slide(blank);base(s,13,'FINAL SLIDE');h(s,'Five lines to remember','TAKE-HOME MESSAGE') notes=['Confirm hypotonic polyuria before naming DI.','Hypernatremia plus dilute urine makes DI very likely.','Use copeptin to clarify AVP deficiency versus primary polydipsia when available.','Use water deprivation and desmopressin only under supervision.','Once physiology is classified, investigate the cause.'] for i,n in enumerate(notes): y=2.05+i*.77;dot(s,.93,y+.13,CLAY,.16);tx(s,n,1.3,y,10.5,.32,18,INK,True) tx(s,'Thank you',.78,6.48,11.5,.34,22,SAGE,True,PP_ALIGN.CENTER) #14 References s=prs.slides.add_slide(blank);base(s,14,'REFERENCES');h(s,'Selected sources','FOR FURTHER READING') refs=['Harrison’s Principles of Internal Medicine, 22nd ed. Diabetes Insipidus (AVP Deficiency and AVP Resistance). 2025.','Brenner and Rector’s The Kidney. Differential Diagnosis of Polyuria.','Gubbi S, et al. Diagnostic Tests for Diabetes Insipidus. Endotext, updated 2025.','Refardt J, et al. Arginine- or Hypertonic Saline-Stimulated Copeptin to Diagnose AVP Deficiency. N Engl J Med. 2023;389:1877-1887.','Ciortea DA, et al. Diagnostic Utility of Copeptin in Pediatric Polyuria-Polydipsia Syndrome. Int J Mol Sci. 2024;25:10743. PMID 39409072.'] lines(s,refs,.85,2.15,11.35,16,INK2,14) tx(s,'Design note: visual structure is intentionally restrained to keep the slides presenter-led and clinically credible.',.85,6.15,11.2,.25,11,GREY,False,PP_ALIGN.CENTER,font='Aptos') prs.save(OUT);print(OUT) ''') PY python "/tmp/workspace/diabetes-insipidus-presentation/src/create_creative_deck.py" && ls -lh "/tmp/workspace/diabetes-insipidus-presentation/output/Diabetes_Insipidus_Creative_Presentation.pptx"
python - <<'PY' p='/tmp/workspace/diabetes-insipidus-presentation/src/create_creative_deck.py' s=open(p).read() s=s.replace("rect(s,.72,.82,.18,.18,CLAY,True)","rect(s,.72,.82,.18,.18,CLAY,None,True)") open(p,'w').write(s) PY python "/tmp/workspace/diabetes-insipidus-presentation/src/create_creative_deck.py" && ls -lh "/tmp/workspace/diabetes-insipidus-presentation/output/Diabetes_Insipidus_Creative_Presentation.pptx"
python - <<'PY' from pptx import Presentation p='/tmp/workspace/diabetes-insipidus-presentation/output/Diabetes_Insipidus_Creative_Presentation.pptx' prs=Presentation(p) print('slides:', len(prs.slides)) for i,s in enumerate(prs.slides,1): texts=[sh.text_frame.text.replace('\n',' | ') for sh in s.shapes if getattr(sh,'has_text_frame',False) and sh.text_frame.text.strip()] pics=sum(sh.shape_type==13 for sh in s.shapes) print(i, 'pictures=',pics,'shapes=',len(s.shapes),'title=',texts[1][:75] if len(texts)>1 else texts[0][:75]) PY
Diabetes Insipidus Creative Presentation
Presentation · PPTX