What happens if a patient takes vitamin D3 60k daily for 10 days
"Vitamin D"[MeSH Terms] AND "Hypercalcemia"[MeSH Terms]
NIH vitamin D toxicity upper limit hypercalcemia symptoms fact sheet
What blood tests and timing are recommended?
"Vitamin D"[MeSH Terms] AND "Hypercalcemia"[MeSH Terms]
vitamin D toxicity evaluation laboratory tests calcium creatinine 25 hydroxyvitamin D PTH timing
| Test | Why it matters |
|---|---|
| Serum calcium with albumin | Screens for hypercalcemia. Albumin is needed to interpret total calcium correctly. |
| Ionized calcium | Useful if total calcium is abnormal/borderline or albumin is abnormal. |
| Creatinine, eGFR, urea/BUN, electrolytes | Checks kidney function and dehydration. Include sodium, potassium, bicarbonate. |
| Phosphate | May be elevated with vitamin D excess. |
| 25-hydroxy-vitamin D [25(OH)D] | The main test for vitamin D body stores and excess. Do not use 1,25-dihydroxy-vitamin D as the routine toxicity test. |
| Intact PTH | In vitamin D-related hypercalcemia, PTH is usually appropriately suppressed. It also helps exclude primary hyperparathyroidism if calcium is elevated. |
| Spot urine calcium/creatinine ratio or 24-hour urine calcium | Consider if calcium or 25(OH)D is high, there is a stone history, or kidney symptoms. Detects excess urinary calcium. |
| Urinalysis | Helpful for hydration status, blood, and possible stone-related findings. |
What symptoms would require emergency evaluation?
"Hypercalcemia"[MeSH Terms] AND emergency
hypercalcemia emergency symptoms confusion vomiting dehydration palpitations authoritative
What calcium level requires hospital treatment?
"Hypercalcemia"[MeSH Terms] AND treatment
hypercalcemia calcium level hospital admission treatment 12 14 mg/dL guidelines
What tests and ECG findings guide hospital admission?
"Hypercalcemia"[MeSH Terms] AND electrocardiography
hypercalcemia evaluation admission ECG shortened QT PR prolongation QRS guidance
| Finding | Why it matters |
|---|---|
| Corrected or ionized calcium ≥14 mg/dL (≥3.5 mmol/L) | Usually requires urgent inpatient treatment, even if symptoms seem mild. |
| Calcium 12 to <14 mg/dL (3.0 to <3.5 mmol/L) plus symptoms | Especially vomiting, dehydration, confusion, severe weakness, or inability to maintain fluids. |
| Acute kidney injury or worsening creatinine/eGFR | May reflect dehydration or calcium-related renal injury and makes outpatient management unsafe. |
| Oliguria, severe dehydration, persistent vomiting | IV fluids and close monitoring may be needed. |
| Any important rhythm or conduction abnormality on ECG | Calls for monitored assessment and correction of electrolytes/calcium. |
| High-risk context | Significant heart or kidney disease, digoxin use, inability to return promptly for repeat testing, unreliable oral intake, or concerning social circumstances. |
Make a lab and ECG monitoring checklist for clinicians
"Hypercalcemia"[MeSH Terms] AND management
Endotext hypercalcemia laboratory evaluation ECG monitoring acute management calcium testing
Create a one-page PDF version of this checklist
~/
mkdir -p "/tmp/workspace/vitamin-d-monitoring-checklist/src" "/tmp/workspace/vitamin-d-monitoring-checklist/output" && python -c "import reportlab; print(reportlab.Version)"
python - <<'PY' from reportlab.lib.pagesizes import A4 from reportlab.pdfgen import canvas from reportlab.lib import colors from reportlab.pdfbase.pdfmetrics import stringWidth from reportlab.lib.units import mm from reportlab.pdfbase.ttfonts import TTFont from reportlab.pdfbase import pdfmetrics from reportlab.pdfbase.pdfmetrics import stringWidth from reportlab.lib.colors import HexColor out='/tmp/workspace/vitamin-d-monitoring-checklist/output/Vitamin_D3_Excess_Lab_ECG_Monitoring_Checklist.pdf' W,H=A4 c=canvas.Canvas(out,pagesize=A4) c.setTitle('Vitamin D3 Excess: Lab and ECG Monitoring Checklist') c.setAuthor('Orris') M=11*mm left=M; right=W-M # fonts font='Helvetica'; bold='Helvetica-Bold' navy=HexColor('#163B63'); blue=HexColor('#EAF3FA'); pale=HexColor('#F6F8FA'); red=HexColor('#9B1C1C'); amber=HexColor('#FFF4D6'); line=HexColor('#C7D2DA'); gray=HexColor('#4B5563') def text(x,y,s,size=7.2,f=font,col=colors.black): c.setFont(f,size); c.setFillColor(col); c.drawString(x,y,s) def wrap(s, maxw, size, f=font): words=s.split(); lines=[]; cur='' for w in words: n=(cur+' '+w).strip() if stringWidth(n,f,size)<=maxw: cur=n else: lines.append(cur); cur=w if cur: lines.append(cur) return lines def paragraph(x,y,s,width,size=7.1,leading=8.4,f=font,col=colors.black,bullet=False): c.setFillColor(col); c.setFont(f,size) indent=8 if bullet else 0 lines=wrap(s,width-indent,size,f) for i,ln in enumerate(lines): if bullet and i==0: c.drawString(x,y,'□') c.drawString(x+indent,y,ln); y-=leading return y def box(x,y_top,w,h,title, fill=colors.white, titlecol=navy): c.setFillColor(fill); c.setStrokeColor(line); c.roundRect(x,y_top-h,w,h,2.5*mm,stroke=1,fill=1) c.setFillColor(titlecol); c.setFont(bold,8.1); c.drawString(x+3*mm,y_top-5*mm,title) c.setStrokeColor(line); c.line(x+2.5*mm,y_top-6.7*mm,x+w-2.5*mm,y_top-6.7*mm) return y_top-10*mm # Header c.setFillColor(navy); c.rect(0,H-27*mm,W,27*mm,stroke=0,fill=1) c.setFillColor(colors.white); c.setFont(bold,16); c.drawString(left,H-13*mm,'Vitamin D3 Excess: Lab and ECG Monitoring Checklist') c.setFont(font,8.1); c.drawString(left,H-19*mm,'For clinician use in suspected supplement excess with possible hypercalcemia') # warning strip Y=H-31*mm c.setFillColor(amber); c.setStrokeColor(HexColor('#E1B84B')); c.roundRect(left,Y-10*mm,right-left,10*mm,2*mm,stroke=1,fill=1) c.setFillColor(red); c.setFont(bold,7.4); c.drawString(left+3*mm,Y-4.1*mm,'URGENT:') c.setFillColor(colors.black); c.setFont(font,7.4); c.drawString(left+17*mm,Y-4.1*mm,'Stop vitamin D and non-essential calcium products. Assess urgently if symptomatic or calcium is markedly elevated.') Y-=14*mm # two column top G=5*mm; col=(right-left-G)/2 x1=left; x2=left+col+G # box initial assessment left h1=47*mm; yy=box(x1,Y,col,h1,'1. Immediate assessment',pale) yy=paragraph(x1+3*mm,yy,'Confirm product, dose, number of doses, last dose, formulation, and co-ingestants.',col-6*mm,6.7,7.8,bullet=True) yy=paragraph(x1+3*mm,yy,'Review calcium, antacids, calcitriol/alfacalcidol, thiazides, lithium, digoxin, vitamin A.',col-6*mm,6.7,7.8,bullet=True) yy=paragraph(x1+3*mm,yy,'Document symptoms, vital signs, volume status, mental status, urine output, and risk factors (CKD, cardiac disease, stones).',col-6*mm,6.7,7.8,bullet=True) # labs right h2=47*mm; yy=box(x2,Y,col,h2,'2. Obtain at first assessment',pale) for s in ['Total calcium + albumin; calculate corrected calcium.','Ionized calcium if albumin abnormal, discordant result, or symptoms.','Urea/BUN, creatinine, eGFR; Na, K, Cl, HCO3, Mg, phosphate.','25-hydroxy-vitamin D [25(OH)D] and intact PTH.','Urinalysis; assess urine output. Consider urine calcium after stabilization.']: yy=paragraph(x2+3*mm,yy,s,col-6*mm,6.45,7.35,bullet=True) Y-=h1+4*mm # Admission full h3=47*mm; yy=box(left,Y,right-left,h3,'3. ED referral / admission triggers',HexColor('#FFF8F8'),red) # two subcolumns inside sub=(right-left-10*mm)/2 itemsA=['Corrected total calcium ≥14 mg/dL (≥3.5 mmol/L), or markedly elevated ionized calcium.','Calcium 12 to <14 mg/dL (3.0 to <3.5 mmol/L) with acute rise, symptoms, or inadequate oral intake/follow-up.','Confusion, somnolence, seizures, severe weakness, persistent vomiting, or inability to maintain fluids.'] itemsB=['Oliguria, significant dehydration, AKI, or worsening creatinine/eGFR.','ECG conduction abnormality, bradycardia, arrhythmia, syncope/presyncope, palpitations, or chest pain.','Significant cardiac/renal disease, digoxin exposure, serious electrolyte disturbance, co-ingestion, or uncertain history.'] for i,s in enumerate(itemsA): yy=paragraph(left+3*mm,yy,s,sub,6.6,7.5,bullet=True) yy2=Y-10*mm for s in itemsB: yy2=paragraph(left+3*mm+sub+4*mm,yy2,s,sub,6.6,7.5,bullet=True) Y-=h3+4*mm # 2 col ECG and inpatient h4=56*mm # ECG p=box(x1,Y,col,h4,'4. ECG and telemetry',blue) p=paragraph(x1+3*mm,p,'Obtain a 12-lead ECG if symptomatic, calcium ≥12 mg/dL (≥3.0 mmol/L), cardiac disease, digoxin use, or renal/electrolyte abnormalities.',col-6*mm,6.45,7.35,bullet=True) c.setFont(bold,6.8); c.setFillColor(navy); c.drawString(x1+3*mm,p-1,'Document and review:'); p-=9 for s in ['Rhythm and rate; PR, QRS, QT/QTc; ST segment and T waves.','Possible hypercalcemia changes: short QT/ST, PR prolongation, QRS widening, bradycardia, AV block, ectopy/arrhythmias, ST changes.','Use telemetry for severe hypercalcemia, ECG change, arrhythmia, digoxin use, or major electrolyte abnormality.']: p=paragraph(x1+3*mm,p,s,col-6*mm,6.25,7.15,bullet=True) # monitoring p=box(x2,Y,col,h4,'5. Inpatient and follow-up monitoring',blue) for s in ['Strict input/output, serial volume status; daily weight when fluid balance is relevant.','Trend calcium, creatinine/eGFR, Na, K, HCO3, Mg, phosphate. Increase frequency during active IV fluid therapy, AKI, symptoms, or rapidly changing calcium.','Repeat ECG for new cardiac symptoms or important calcium/electrolyte change.','Discharge only when symptoms improve, calcium is stable/falling, renal function/hydration are stable, and follow-up is reliable.','Arrange clinician-defined repeat calcium/renal panel soon after discharge; 25(OH)D is a longer-term trend marker.']: p=paragraph(x2+3*mm,p,s,col-6*mm,6.15,7.05,bullet=True) Y-=h4+3*mm # footer c.setStrokeColor(line); c.line(left,Y,right,Y) c.setFillColor(gray); c.setFont(font,5.9) footer='Clinical aid only. Use local hypercalcemia, toxicology, renal, and endocrinology protocols. Thresholds apply to corrected total calcium; assess ionized calcium when indicated.' for i,ln in enumerate(wrap(footer,right-left,5.9,font)): c.drawString(left,Y-8-i*7,ln) c.save() print(out) PY python - <<'PY' from pypdf import PdfReader p='/tmp/workspace/vitamin-d-monitoring-checklist/output/Vitamin_D3_Excess_Lab_ECG_Monitoring_Checklist.pdf' r=PdfReader(p) print('pages',len(r.pages),'size',__import__('os').path.getsize(p)) print(r.pages[0].extract_text()[:500]) PY
Vitamin D3 Excess Lab ECG Monitoring Checklist
PDF Document · PDF
Create a clinician handout on managing vitamin D toxicity
"Vitamin D"[MeSH Terms] AND toxicity
vitamin D toxicity management hypercalcemia guideline clinical review 25 hydroxyvitamin D
~/
mkdir -p "/tmp/workspace/vitamin-d-toxicity-handout/src" "/tmp/workspace/vitamin-d-toxicity-handout/output" && python - <<'PY' from reportlab.lib.pagesizes import A4 from reportlab.pdfgen import canvas from reportlab.lib import colors from reportlab.lib.colors import HexColor from reportlab.pdfbase.pdfmetrics import stringWidth from reportlab.lib.units import mm from reportlab.pdfbase import pdfmetrics from reportlab.pdfbase.ttfonts import TTFont OUT='/tmp/workspace/vitamin-d-toxicity-handout/output/Clinician_Handout_Managing_Vitamin_D_Toxicity.pdf' W,H=A4; M=13*mm navy=HexColor('#123B5D'); teal=HexColor('#0B6E69'); blue=HexColor('#ECF5FA'); pale=HexColor('#F6F8FA'); amber=HexColor('#FFF3D4'); red=HexColor('#9F1D20'); line=HexColor('#C6D1D9'); gray=HexColor('#46525C') font='Helvetica'; bold='Helvetica-Bold'; italic='Helvetica-Oblique' c=canvas.Canvas(OUT,pagesize=A4) c.setTitle('Clinician Handout: Managing Vitamin D Toxicity') c.setAuthor('Orris') def lines(s,w,size,f=font): out=[]; cur='' for wd in s.split(): nxt=(cur+' '+wd).strip() if stringWidth(nxt,f,size)<=w: cur=nxt else: out.append(cur); cur=wd if cur: out.append(cur) return out def paragraph(x,y,s,w,size=8,lead=10,f=font,color=colors.black,box=False): c.setFont(f,size); c.setFillColor(color) for ln in lines(s,w,size,f): c.drawString(x,y,ln); y-=lead return y def bullet(x,y,s,w,size=7.6,lead=9): c.setFont(font,size); c.setFillColor(colors.black) ls=lines(s,w-9,size,font) c.drawString(x,y,'•') for i,ln in enumerate(ls): c.drawString(x+8,y,ln); y-=lead return y def section(x,y,w,title,fill=blue): c.setFillColor(fill); c.setStrokeColor(line); c.roundRect(x,y-8*mm,w,8*mm,2*mm,stroke=1,fill=1) c.setFillColor(navy); c.setFont(bold,9.5); c.drawString(x+3*mm,y-5.1*mm,title) return y-11*mm def header(page,subtitle): c.setFillColor(navy); c.rect(0,H-27*mm,W,27*mm,stroke=0,fill=1) c.setFillColor(colors.white); c.setFont(bold,16); c.drawString(M,H-12.2*mm,'Managing Vitamin D Toxicity') c.setFont(font,8.2); c.drawString(M,H-18.7*mm,subtitle) c.setFont(font,7); c.drawRightString(W-M,H-18.7*mm,f'Clinician handout | Page {page} of 2') def footer(): c.setStrokeColor(line); c.line(M,13*mm,W-M,13*mm) c.setFillColor(gray); c.setFont(font,6.1) c.drawString(M,9.2*mm,'Clinical aid only. Use local emergency, toxicology, nephrology and endocrinology protocols. Individualize management to clinical status and comorbidity.') # page 1 header(1,'Recognition, risk stratification, investigation, and initial stabilisation') y=H-33*mm c.setFillColor(amber); c.setStrokeColor(HexColor('#E6B84E')); c.roundRect(M,y-14*mm,W-2*M,14*mm,2*mm,stroke=1,fill=1) c.setFillColor(red); c.setFont(bold,8.4); c.drawString(M+3*mm,y-5*mm,'Key action') c.setFillColor(colors.black); c.setFont(font,7.7) paragraph(M+3*mm,y-9*mm,'Immediately stop vitamin D preparations and non-essential calcium products. Assess for hypercalcemia, renal injury, volume depletion, and cardiac conduction effects.',W-2*M-6*mm,7.7,9) y-=19*mm # overview x=M; width=W-2*M y=section(x,y,width,'1. Clinical syndrome and risk factors') y=paragraph(x,y,'Vitamin D toxicity is usually supplement-related and causes excessive intestinal calcium absorption, resulting in hypercalcemia and hypercalciuria. Symptoms reflect hypercalcemia: anorexia, nausea/vomiting, constipation or abdominal pain, polyuria/polydipsia, dehydration, weakness, cognitive change, nephrolithiasis and, rarely, coma or arrhythmia.',width,7.65,9.3) y-=2 c.setFont(bold,7.7); c.setFillColor(navy); c.drawString(x,y,'Higher-risk settings:'); y-=10 for s in ['Large or prolonged supplemental exposure; dosing errors; concurrent calcium, active vitamin D analogues, thiazides, lithium, or digoxin.','CKD, reduced oral intake/dehydration, nephrolithiasis, hyperparathyroidism, granulomatous disease, malignancy, children, and frail older adults.']: y=bullet(x,y,s,width,7.55,8.8) y-=3 # triage col=(width-5*mm)/2 p=y p=section(x,p,col,'2. Immediate triage') for s in ['ABC assessment, vital signs, orthostatic features, neurological status, volume status and urine output.','Confirm product, strength, dose schedule, last dose, formulation and all co-ingestants.','ECG promptly if symptomatic, calcium ≥12 mg/dL (3.0 mmol/L), cardiac disease, digoxin use, or significant electrolyte/renal abnormality.']: p=bullet(x,p,s,col,7.3,8.5) q=y q=section(x+col+5*mm,q,col,'3. Urgent referral / admission') for s in ['Corrected total calcium ≥14 mg/dL (≥3.5 mmol/L), or markedly elevated ionized calcium.','Calcium 12 to <14 mg/dL with symptoms, acute/rising level, AKI, significant dehydration, or unreliable oral intake/follow-up.','Confusion, persistent vomiting, oliguria, syncope, chest pain, palpitations, bradycardia, ECG abnormality, or serious comorbidity.']: q=bullet(x+col+5*mm,q,s,col,7.3,8.5) y=min(p,q)-4 # initial workup p=section(x,y,width,'4. Initial investigations') left=(width-5*mm)/2 for idx,s in enumerate(['Total calcium + albumin. Calculate corrected calcium.','Ionized calcium when albumin is abnormal or clinical/laboratory discordance exists.','Urea/BUN, creatinine/eGFR; sodium, potassium, chloride, bicarbonate, magnesium, phosphate.','25-hydroxy-vitamin D [25(OH)D] and intact PTH.','Urinalysis, urine output; consider urine calcium after acute stabilisation.']): xx=x if idx<3 else x+left+5*mm yy=p-(idx if idx<3 else idx-3)*10*mm bullet(xx,yy,s,left,7.35,8.3) y=p-31*mm # interpret p=section(x,y,width,'5. Interpretation and monitoring') y=bullet(x,p,'A high 25(OH)D with hypercalcemia and suppressed PTH supports exogenous vitamin D-mediated hypercalcemia. Use targeted tests for other PTH-independent causes if the history or results are discordant.',width,7.45,8.6) y=bullet(x,y,'Monitor serial corrected or ionized calcium, renal function, electrolytes, symptoms, intake/output, and ECG/telemetry when indicated. 25(OH)D is useful for confirmation and longer-term follow-up, but should not delay acute treatment.',width,7.45,8.6) y-=2 c.setFillColor(pale); c.setStrokeColor(line); c.roundRect(x,y-17*mm,width,17*mm,2*mm,stroke=1,fill=1) c.setFillColor(navy); c.setFont(bold,7.8); c.drawString(x+3*mm,y-4.5*mm,'ECG findings in hypercalcemia') paragraph(x+3*mm,y-9*mm,'Shortened QT interval, often from ST-segment shortening. More severe disease may show PR prolongation, QRS widening, bradycardia, AV block, ectopy or other arrhythmias. A normal ECG does not exclude clinically meaningful hypercalcemia.',width-6*mm,7.25,8.3) footer(); c.showPage() # page 2 header(2,'Treatment principles, disposition, and follow-up') y=H-33*mm; x=M; width=W-2*M p=section(x,y,width,'6. Treatment framework') y=p c.setFillColor(pale); c.setStrokeColor(line); c.roundRect(x,y-31*mm,width,31*mm,2*mm,stroke=1,fill=1) # table rows rows=[('1. Remove drivers','Stop vitamin D, calcium supplements and calcium-containing antacids unless a specific indication is confirmed. Review active vitamin D analogues and contributing drugs.'),('2. Restore euvolemia','Use IV isotonic saline for symptomatic or significant hypercalcemia, tailored to cardiovascular and renal status. Reassess fluid balance, urine output and electrolytes frequently.'),('3. Reduce calcium when indicated','For severe or symptomatic hypercalcemia, use institution-specific acute hypercalcemia treatment pathways. Choice of agents depends on etiology, renal function, expected onset and contraindications.'),('4. Consult early','Involve toxicology/poison service, nephrology, endocrinology or intensive care for severe hypercalcemia, AKI, complex cause, refractory course, pregnancy, children, or dialysis consideration.')] ry=y-5*mm for title,body in rows: c.setFillColor(teal); c.setFont(bold,7.5); c.drawString(x+3*mm,ry,title) ry=paragraph(x+34*mm,ry,body,width-37*mm,7.1,8.2) ry-=2.2 # treatment nuance y-=36*mm p=section(x,y,width,'7. Medication and renal considerations') y=p for s in ['Avoid a one-size-fits-all drug regimen. For severe or symptomatic hypercalcemia, follow local acute hypercalcemia protocol for antiresorptive therapy and other agents. Renal impairment changes both fluid and drug decisions.','Glucocorticoids may be useful for vitamin D-mediated hypercalcemia and other calcitriol-mediated states, but selection and dosing require local protocol and patient-specific assessment.','Do not use loop diuretics simply to lower calcium. Consider them only after adequate volume repletion when clinically needed to manage fluid overload.','Consider dialysis for life-threatening or refractory hypercalcemia, especially where severe renal or heart failure limits hydration and standard treatment.']: y=bullet(x,y,s,width,7.45,8.7) y-=2 # disposition p=section(x,y,width,'8. Disposition and follow-up') y=p col=(width-5*mm)/2 for i,s in enumerate(['Outpatient management can be considered only when the patient is clinically well, able to hydrate, calcium is mild and stable, renal function is acceptable, ECG is reassuring if obtained, and rapid repeat testing/follow-up are dependable.','Discharge planning: give explicit instructions to avoid vitamin D and calcium unless restarted by the treating team; reconcile supplements and OTC products; provide return precautions for vomiting, confusion, severe weakness, reduced urine, palpitations, syncope or chest pain.']): y=bullet(x,y,s,width,7.4,8.7) y-=1 c.setFont(bold,7.8); c.setFillColor(navy); c.drawString(x,y,'Suggested follow-up principle:'); y-=10 y=paragraph(x,y,'Repeat calcium and renal/electrolyte testing on a clinician-defined short interval after a stable outpatient disposition. Repeat 25(OH)D on a longer interval because vitamin D is fat-soluble and elevated concentrations may persist. The schedule must reflect the peak calcium, trajectory, symptoms, comorbidities, and treatment given.',width,7.4,8.7) y-=3 # reference p=section(x,y,width,'Selected references') y=p refs=['Harrison’s Principles of Internal Medicine, 22e (2025), Vitamin D and hypercalcemia sections.','Brenner and Rector’s The Kidney, Vitamin D-mediated hypercalcemia and management of hypercalcemia sections.','Tintinalli’s Emergency Medicine, Vitamin D and hypercalcemia sections.','NIH Office of Dietary Supplements. Vitamin D Fact Sheet for Health Professionals. Updated June 2025.','Goltzman D. Approach to Hypercalcemia. Endotext. Updated 2023.','Cianferotti L, et al. Too much vitamin D? A drug safety review. Rev Endocr Metab Disord. 2026. PMID: 41483069.'] for r in refs: y=bullet(x,y,r,width,6.8,7.8) footer(); c.save() print(OUT) PY python - <<'PY' from pypdf import PdfReader from pathlib import Path p=Path('/tmp/workspace/vitamin-d-toxicity-handout/output/Clinician_Handout_Managing_Vitamin_D_Toxicity.pdf') r=PdfReader(str(p)) print('exists',p.exists(),'bytes',p.stat().st_size,'pages',len(r.pages)) for i,page in enumerate(r.pages): t=page.extract_text() or '' print(i+1,len(t),t[:100].replace('\n',' | ')) PY
Clinician Handout Managing Vitamin D Toxicity
PDF Document · PDF
Add a hypercalcemia treatment algorithm to the handout
~/
"Hypercalcemia"[MeSH Terms] AND treatment
Endotext acute hypercalcemia management hydration calcitonin bisphosphonate glucocorticoid vitamin D toxicity
~/vitamin-d-toxicity-handout/
python - <<'PY' from reportlab.lib.pagesizes import A4 from reportlab.pdfgen import canvas from reportlab.lib import colors from reportlab.lib.colors import HexColor from reportlab.pdfbase.pdfmetrics import stringWidth from reportlab.lib.units import mm from pypdf import PdfReader, PdfWriter from io import BytesIO from pathlib import Path src=Path('/tmp/workspace/vitamin-d-toxicity-handout/output/Clinician_Handout_Managing_Vitamin_D_Toxicity.pdf') out=Path('/tmp/workspace/vitamin-d-toxicity-handout/output/Clinician_Handout_Managing_Vitamin_D_Toxicity_with_Algorithm.pdf') W,H=A4; M=13*mm navy=HexColor('#123B5D'); teal=HexColor('#0B6E69'); blue=HexColor('#ECF5FA'); pale=HexColor('#F6F8FA'); amber=HexColor('#FFF3D4'); red=HexColor('#9F1D20'); line=HexColor('#C6D1D9'); gray=HexColor('#46525C') font='Helvetica'; bold='Helvetica-Bold' buf=BytesIO(); c=canvas.Canvas(buf,pagesize=A4) c.setTitle('Clinician Handout: Managing Vitamin D Toxicity with Hypercalcemia Treatment Algorithm') def wrap(s,w,size,f=font): result=[]; cur='' for word in s.split(): test=(cur+' '+word).strip() if stringWidth(test,f,size)<=w: cur=test else: result.append(cur); cur=word if cur: result.append(cur) return result def ptext(x,y,s,w,size=7.5,lead=9,f=font,colour=colors.black,center=False): c.setFont(f,size); c.setFillColor(colour) for ln in wrap(s,w,size,f): xx=x+(w-stringWidth(ln,f,size))/2 if center else x c.drawString(xx,y,ln); y-=lead return y def box(x,y,w,h,title,body,fill=colors.white,titlecolour=navy, bodysize=7.3): c.setFillColor(fill); c.setStrokeColor(line); c.roundRect(x,y-h,w,h,2.5*mm,stroke=1,fill=1) c.setFillColor(titlecolour); c.setFont(bold,8.5); c.drawCentredString(x+w/2,y-5*mm,title) c.setStrokeColor(line); c.line(x+3*mm,y-7*mm,x+w-3*mm,y-7*mm) ptext(x+3.2*mm,y-11*mm,body,w-6.4*mm,bodysize,bodysize+1.25,center=True) def arrow(x1,y1,x2,y2): c.setStrokeColor(teal); c.setFillColor(teal); c.setLineWidth(1.3) c.line(x1,y1,x2,y2) import math a=math.atan2(y2-y1,x2-x1); l=6 c.line(x2,y2,x2-l*math.cos(a-0.45),y2-l*math.sin(a-0.45)) c.line(x2,y2,x2-l*math.cos(a+0.45),y2-l*math.sin(a+0.45)) # Header c.setFillColor(navy); c.rect(0,H-27*mm,W,27*mm,stroke=0,fill=1) c.setFillColor(colors.white); c.setFont(bold,16); c.drawString(M,H-12.2*mm,'Hypercalcemia Treatment Algorithm') c.setFont(font,8.2); c.drawString(M,H-18.7*mm,'For suspected vitamin D toxicity: use with local emergency, toxicology, renal and endocrinology protocols') c.setFont(font,7); c.drawRightString(W-M,H-18.7*mm,'Addendum to clinician handout | Page 3 of 3') # Algorithm start y=H-35*mm c.setFillColor(amber); c.setStrokeColor(HexColor('#E6B84E')); c.roundRect(M,y-12*mm,W-2*M,12*mm,2*mm,stroke=1,fill=1) c.setFillColor(red); c.setFont(bold,7.9); c.drawString(M+3*mm,y-4.7*mm,'Safety note:') c.setFillColor(colors.black); c.setFont(font,7.3); c.drawString(M+20*mm,y-4.7*mm,'Treat the patient, rate of rise, symptoms, ECG and renal function, not the calcium value alone. Seek senior help early.') y-=18*mm bw=102*mm; bh=23*mm; x=(W-bw)/2 box(x,y,bw,bh,'1. Confirm and assess immediately','Corrected total calcium + albumin; ionized calcium if needed. Assess symptoms, volume status, urine output, creatinine/eGFR, electrolytes and ECG.',blue) arrow(W/2,y-bh,W/2,y-bh-7*mm); y-=bh+10*mm bw=121*mm; x=(W-bw)/2; bh=22*mm box(x,y,bw,bh,'2. Remove contributors and establish monitoring','Stop vitamin D, calcium supplements and calcium-containing antacids. Review active vitamin D analogues, thiazides, lithium and digoxin. Serial calcium/renal panel; telemetry when severe or ECG abnormal.',pale) arrow(W/2,y-bh,W/2,y-bh-7*mm); y-=bh+11*mm # severity split c.setFont(bold,9.5); c.setFillColor(navy); c.drawCentredString(W/2,y,'Risk-stratify by calcium level and clinical status') y-=5*mm # horizontal branching mid=W/2; branch_y=y-8*mm c.setStrokeColor(teal); c.setLineWidth(1.2); c.line(mid,y,mid,branch_y); c.line(44*mm,branch_y,W-44*mm,branch_y) for xx in (44*mm,W/2,W-44*mm): arrow(xx,branch_y,xx,branch_y-5*mm) # branches margin=15*mm; gap=4*mm; cw=(W-2*margin-2*gap)/3; top=branch_y-7*mm box(margin,top,cw,43*mm,'Mild / stable','Calcium <12 mg/dL (<3.0 mmol/L), clinically well, no AKI or concerning ECG.\n\n• Oral hydration if appropriate\n• Stop offending agents\n• Investigate cause: 25(OH)D, PTH and tailored tests\n• Prompt repeat calcium/renal function and reliable follow-up',HexColor('#EFF8F3'),teal,6.55) box(margin+cw+gap,top,cw,43*mm,'Moderate or symptomatic','Calcium 12 to <14 mg/dL (3.0 to <3.5 mmol/L), acute rise, symptoms, dehydration or renal impairment.\n\n• ED/hospital assessment\n• IV 0.9% saline to restore euvolemia, adjusted for heart/renal status\n• Frequent calcium, renal and electrolyte monitoring\n• Escalate if symptoms, AKI or trend worsens',HexColor('#FFF8E7'),HexColor('#9A6700'),6.45) box(margin+2*(cw+gap),top,cw,43*mm,'Severe / emergency','Calcium ≥14 mg/dL (≥3.5 mmol/L), or any serious neurologic, renal or cardiac feature.\n\n• Resuscitation, IV fluids, ECG/telemetry\n• Hospital admission and specialty input\n• Rapid plus sustained calcium-lowering strategy per local protocol\n• Consider ICU and dialysis indications',HexColor('#FFF1F1'),red,6.45) y=top-48*mm # therapy time course c.setFillColor(navy); c.setFont(bold,9.5); c.drawString(M,y,'For significant, symptomatic, or severe hypercalcemia') y-=5*mm c.setFillColor(pale); c.setStrokeColor(line); c.roundRect(M,y-43*mm,W-2*M,43*mm,2.5*mm,stroke=1,fill=1) left=M+4*mm; base=y-5*mm items=[('Restore euvolemia','Use isotonic saline. Tailor rate and endpoints to volume status, urine output, cardiac function and renal function.'),('Rapid bridge','Calcitonin may provide faster temporary calcium reduction while awaiting therapies with longer onset. Use according to local protocol.'),('Sustained therapy','Use an antiresorptive option as indicated by local protocol, etiology and renal function. In vitamin D intoxication requiring admission, IV hydration and aminobisphosphonate therapy are often needed.'),('Cause-directed therapy','For vitamin D-mediated or calcitriol-mediated hypercalcemia, glucocorticoids may be appropriate. Seek endocrine/toxicology guidance for agent selection and dosing.'),('Refractory or fluid-limited disease','Discuss hemodialysis urgently when severe hypercalcemia is refractory or renal/heart failure prevents effective hydration.')] for title,body in items: c.setFillColor(teal); c.setFont(bold,7.2); c.drawString(left,base,title) ptext(left+31*mm,base,body,W-2*M-35*mm,6.8,7.9) base-=7.8*mm # Red flags Y=y-49*mm c.setFillColor(HexColor('#FFF1F1')); c.setStrokeColor(HexColor('#E8B6B8')); c.roundRect(M,Y-25*mm,W-2*M,25*mm,2.5*mm,stroke=1,fill=1) c.setFillColor(red); c.setFont(bold,8.4); c.drawString(M+3*mm,Y-5*mm,'Escalate immediately for') ptext(M+3*mm,Y-10*mm,'Confusion, somnolence, seizures, persistent vomiting, oliguria, rising creatinine, severe dehydration, syncope, chest pain, bradycardia, conduction delay, arrhythmia, or rapidly rising calcium.',W-2*M-6*mm,7.1,8.3) # footer c.setStrokeColor(line); c.line(M,13*mm,W-M,13*mm) c.setFillColor(gray); c.setFont(font,6) c.drawString(M,9.2*mm,'Evidence basis: Harrison’s Principles of Internal Medicine, 22e; Brenner and Rector’s The Kidney; Tintinalli’s Emergency Medicine; Endotext acute hypercalcemia guidance.') c.save(); buf.seek(0) writer=PdfWriter() for page in PdfReader(str(src)).pages: writer.add_page(page) for page in PdfReader(buf).pages: writer.add_page(page) writer.add_metadata({'/Title':'Clinician Handout: Managing Vitamin D Toxicity with Hypercalcemia Treatment Algorithm','/Author':'Orris'}) with open(out,'wb') as f: writer.write(f) print(out) PY python - <<'PY' from pypdf import PdfReader from pathlib import Path p=Path('/tmp/workspace/vitamin-d-toxicity-handout/output/Clinician_Handout_Managing_Vitamin_D_Toxicity_with_Algorithm.pdf') r=PdfReader(str(p)) print('exists:',p.exists(),'bytes:',p.stat().st_size,'pages:',len(r.pages)) t=r.pages[-1].extract_text() or '' print('algorithm heading:', 'Hypercalcemia Treatment Algorithm' in t) print('algorithm text chars:',len(t)) PY
Clinician Handout Managing Vitamin D Toxicity with Algorithm
PDF Document · PDF
Make a clinician presentation from this handout
~/
"Vitamin D"[MeSH Terms] AND toxicity
vitamin D toxicity hypercalcemia management Endotext NIH
mkdir -p "/tmp/workspace/vitamin-d-toxicity-presentation/src" "/tmp/workspace/vitamin-d-toxicity-presentation/output" && python - <<'PY' from pptx import Presentation from pptx.util import Inches, Pt from pptx.enum.shapes import MSO_SHAPE, MSO_CONNECTOR from pptx.enum.text import PP_ALIGN, MSO_ANCHOR from pptx.dml.color import RGBColor from pptx.enum.dml import MSO_THEME_COLOR from pptx.enum.shapes import MSO_AUTO_SHAPE_TYPE from pathlib import Path OUT=Path('/tmp/workspace/vitamin-d-toxicity-presentation/output/Managing_Vitamin_D_Toxicity_Clinician_Presentation.pptx') prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5) blank=prs.slide_layouts[6] # palette NAVY='123B5D'; TEAL='0B6E69'; SKY='EAF4FA'; PALE='F5F8FA'; AMBER='FFF3D4'; RED='9F1D20'; GREEN='EAF7F0'; ORANGE='FFF7E5'; INK='1F2933'; GRAY='5A6872'; LINE='CBD5DC'; WHITE='FFFFFF' def rgb(h): return RGBColor.from_string(h) def set_fill(shape, color): shape.fill.solid(); shape.fill.fore_color.rgb=rgb(color) def set_line(shape,color=LINE,width=1): shape.line.color.rgb=rgb(color); shape.line.width=Pt(width) def textbox(s,x,y,w,h,text,size=18,color=INK,bold=False,align=PP_ALIGN.LEFT, valign=MSO_ANCHOR.TOP, font='Aptos',margin=0.06): sh=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); tf=sh.text_frame; tf.clear(); tf.word_wrap=True; tf.margin_left=Inches(margin); tf.margin_right=Inches(margin); tf.margin_top=Inches(margin); tf.margin_bottom=Inches(margin); tf.vertical_anchor=valign p=tf.paragraphs[0]; p.alignment=align; r=p.add_run(); r.text=text; r.font.name=font; r.font.size=Pt(size); r.font.bold=bold; r.font.color.rgb=rgb(color); return sh def rect(s,x,y,w,h,fill=WHITE,line=LINE,radius=True): sh=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if radius else MSO_SHAPE.RECTANGLE,Inches(x),Inches(y),Inches(w),Inches(h)); set_fill(sh,fill); set_line(sh,line); return sh def line(s,x1,y1,x2,y2,color=TEAL,width=1.5,arrow=False): sh=s.shapes.add_connector(MSO_CONNECTOR.STRAIGHT,Inches(x1), Inches(y1), Inches(x2), Inches(y2)); sh.line.color.rgb=rgb(color); sh.line.width=Pt(width) if arrow: sh.line.end_arrowhead = True return sh def title(s,title,subtitle=None,num=None): textbox(s,.6,.38,12.0,.5,title,27,NAVY,True) if subtitle: textbox(s,.62,.92,11.8,.3,subtitle,10,GRAY) line(s,.62,1.28,12.72,1.28,TEAL,1.5) if num: textbox(s,12.25,7.06,.45,.2,str(num),8,GRAY,False,PP_ALIGN.RIGHT) def footer(s,txt='Clinical education only - use local emergency, toxicology, renal and endocrinology protocols.'): line(s,.62,6.9,12.72,6.9,LINE,.6); textbox(s,.62,7.01,11.4,.18,txt,7,GRAY); def bullet_block(s,x,y,w,h,heading,bullets,accent=TEAL): rect(s,x,y,w,h,WHITE,LINE); textbox(s,x+.2,y+.16,w-.4,.3,heading,12,accent,True) yy=y+.58 for b in bullets: textbox(s,x+.23,yy,.16,.2,'•',11,accent,True) textbox(s,x+.43,yy,w-.62,.46,b,10,INK) yy+=.56 # slides # 1 s=prs.slides.add_slide(blank); set_fill(s.background,NAVY) # colored strip sh=s.shapes.add_shape(MSO_SHAPE.RECTANGLE,0,Inches(5.95),prs.slide_width,Inches(1.55)); set_fill(sh,TEAL); sh.line.fill.background() textbox(s,.78,1.2,10.9,.8,'Managing Vitamin D Toxicity',32,WHITE,True) textbox(s,.8,2.1,10.5,.45,'Recognition, risk stratification, monitoring and treatment of vitamin D-mediated hypercalcemia',16,'DDECF3') textbox(s,.8,3.0,6.5,.25,'Clinician presentation',12,'DDECF3') # mini cards for x,head,sub in [(8.0,'Recognize','supplement-related harm'),(9.65,'Stratify','calcium + clinical risk'),(11.3,'Treat','cause + complications')]: rect(s,x,4.4,1.35,.85,'1A4C70','3A6A8B'); textbox(s,x+.1,4.57,1.15,.2,head,10,WHITE,True,PP_ALIGN.CENTER); textbox(s,x+.1,4.84,1.15,.2,sub,6.5,'DDECF3',False,PP_ALIGN.CENTER) textbox(s,.8,6.45,10,.25,'Based on the accompanying clinician handout and hypercalcemia treatment algorithm',9,WHITE) # 2 goals s=prs.slides.add_slide(blank); title(s,'Learning objectives','At the end of this session, clinicians should be able to:',2) objs=[('Recognize','Identify the supplement exposure, symptoms and risk factors that make vitamin D toxicity clinically relevant.'),('Confirm','Order and interpret calcium, renal, electrolyte, vitamin D and PTH testing.'),('Triage','Use calcium level, symptoms, ECG and renal function to choose outpatient, ED or inpatient care.'),('Treat','Stabilize hypercalcemia and escalate therapy using a cause-directed approach.')] for i,(h,b) in enumerate(objs): x=.8+(i%2)*6.1; y=1.65+(i//2)*2.2; rect(s,x,y,5.65,1.7,SKY,LINE); rect(s,x+.22,y+.24,.72,.72,TEAL,TEAL); textbox(s,x+.22,y+.38,.72,.2,str(i+1),16,WHITE,True,PP_ALIGN.CENTER); textbox(s,x+1.12,y+.23,4.25,.25,h,16,NAVY,True); textbox(s,x+1.12,y+.64,4.2,.68,b,10,INK) footer(s) # 3 syndrome s=prs.slides.add_slide(blank); title(s,'Clinical syndrome: vitamin D excess causes hypercalcemia','Toxicity is almost always due to excessive supplemental exposure rather than sunlight.',3) rect(s,.75,1.65,3.15,3.9,SKY,LINE); textbox(s,1.0,1.95,2.65,.26,'Exposure',18,TEAL,True,PP_ALIGN.CENTER); textbox(s,1.0,2.45,2.65,1.25,'High-dose or prolonged D3/D2\nActive analogues\nDosing/dispensing error\nCalcium co-supplementation',13,INK,False,PP_ALIGN.CENTER) rect(s,5.1,1.65,3.15,3.9,'EAF7F0',LINE); textbox(s,5.35,1.95,2.65,.26,'Mechanism',18,TEAL,True,PP_ALIGN.CENTER); textbox(s,5.35,2.45,2.65,1.25,'Increased intestinal\ncalcium absorption\n± increased bone resorption\n→ hypercalciuria',13,INK,False,PP_ALIGN.CENTER) rect(s,9.45,1.65,3.15,3.9,'FFF1F1',LINE); textbox(s,9.7,1.95,2.65,.26,'Clinical effects',18,RED,True,PP_ALIGN.CENTER); textbox(s,9.7,2.45,2.65,1.3,'GI + neurocognitive symptoms\nVolume depletion / AKI\nStones\nConduction effects / arrhythmia',13,INK,False,PP_ALIGN.CENTER) line(s,3.9,3.6,5.1,3.6,TEAL,2,True); line(s,8.25,3.6,9.45,3.6,TEAL,2,True) textbox(s,.85,5.95,11.7,.45,'Clinical point: symptoms are driven by calcium level, rate of rise, volume status and comorbidity, not 25(OH)D concentration alone.',12,NAVY,True,PP_ALIGN.CENTER) footer(s) #4 recognition s=prs.slides.add_slide(blank); title(s,'Recognition: ask about exposure and look for hypercalcemia','A medication and supplement reconciliation is a diagnostic test.',4) bullet_block(s,.75,1.6,3.9,4.65,'History to obtain',['Exact product, strength, dose, frequency and last dose','D2 vs D3 vs calcitriol/alfacalcidol','Calcium supplements and calcium-containing antacids','Thiazides, lithium, digoxin and vitamin A','Intentional vs inadvertent exposure; co-ingestants']) bullet_block(s,4.82,1.6,3.9,4.65,'Symptoms and signs',['Nausea, vomiting, constipation, abdominal pain','Thirst, polyuria, dehydration or reduced urine','Weakness, fatigue, confusion, somnolence','Flank pain or stone symptoms','Palpitations, syncope, chest pain']) bullet_block(s,8.89,1.6,3.7,4.65,'Risk modifiers',['CKD or reduced renal reserve','Cardiac disease / limited fluid tolerance','Nephrolithiasis','Hyperparathyroidism','Granulomatous disease or malignancy','Older age, childhood, pregnancy']) footer(s) #5 investigations s=prs.slides.add_slide(blank); title(s,'First assessment: confirm severity and define the physiology','Do not wait for 25(OH)D or PTH results before treating significant hypercalcemia.',5) # core labs bullet_block(s,.75,1.58,4.0,4.9,'Core tests',['Total calcium + albumin; calculate corrected calcium','Ionized calcium if albumin abnormal or result is discordant','Urea/BUN, creatinine/eGFR','Na, K, Cl, HCO3, Mg, phosphate','Urinalysis and urine output assessment']) bullet_block(s,4.92,1.58,3.7,4.9,'Etiology tests',['25-hydroxy-vitamin D [25(OH)D]','Intact PTH','Tailored testing if discordant: PTHrP, 1,25(OH)2D, SPEP/UPEP, TSH or imaging','Consider urine calcium after acute stabilization']) bullet_block(s,8.79,1.58,3.8,4.9,'Monitoring tests',['12-lead ECG if symptomatic, Ca ≥12 mg/dL, cardiac disease, digoxin use, or major electrolyte/renal abnormality','Serial corrected or ionized calcium','Repeat renal function and electrolytes','Strict fluid balance when admitted']) footer(s) #6 ECG s=prs.slides.add_slide(blank); title(s,'ECG: a short QT is the classic early clue','ECG findings contribute to risk assessment but a normal tracing does not exclude clinically important hypercalcemia.',6) rect(s,.78,1.6,4.0,4.7,PALE,LINE); textbox(s,1.05,1.93,3.45,.3,'Review systematically',18,NAVY,True); for i,t in enumerate(['Rate and rhythm','PR interval','QRS duration','QT/QTc and ST segment','T-wave morphology','New ectopy / AV block']): textbox(s,1.15,2.55+i*.48,3.0,.25,'□ '+t,12,INK) rect(s,4.98,1.6,3.45,4.7,SKY,LINE); textbox(s,5.25,1.93,2.9,.3,'Possible hypercalcemia changes',15,TEAL,True,PP_ALIGN.CENTER); textbox(s,5.3,2.65,2.8,2.5,'Shortened QT\n(short ST segment)\n\nPR prolongation\nQRS widening\n\nBradycardia / AV block\nEctopy or arrhythmia',15,INK,False,PP_ALIGN.CENTER) rect(s,8.64,1.6,3.95,4.7,'FFF1F1',LINE); textbox(s,8.93,1.93,3.35,.3,'Telemetry / escalation',15,RED,True,PP_ALIGN.CENTER); textbox(s,8.98,2.62,3.22,2.9,'Use telemetry with severe hypercalcemia, ECG abnormalities, arrhythmia, digoxin exposure or substantial electrolyte abnormalities.\n\nRecheck ECG after a major calcium/electrolyte change or new cardiac symptoms.',12,INK,False,PP_ALIGN.CENTER) footer(s) #7 triage thresholds s=prs.slides.add_slide(blank); title(s,'Triage: calcium level plus the clinical picture drives disposition','Use corrected total calcium or ionized calcium when indicated.',7) levels=[('Mild / stable','<12 mg/dL\n<3.0 mmol/L',GREEN,TEAL,['Often outpatient if well hydrated','No AKI or concerning ECG','Stop drivers; investigate cause','Reliable early repeat testing']),('Moderate / concerning','12 to <14 mg/dL\n3.0 to <3.5 mmol/L',ORANGE,'9A6700',['Prompt clinician / ED assessment','Admit if symptoms, AKI or acute rise','IV fluids if hypovolemic','Monitor trajectory closely']),('Severe / emergency','≥14 mg/dL\n≥3.5 mmol/L','FFF1F1',RED,['Emergency treatment and admission','IV fluids + ECG/telemetry','Rapid and sustained calcium lowering','Specialty input; consider ICU/dialysis'])] for i,(head,val,fill,accent,pts) in enumerate(levels): x=.75+i*4.14; rect(s,x,1.6,3.85,4.75,fill,LINE); textbox(s,x+.18,1.87,3.48,.3,head,15,accent,True,PP_ALIGN.CENTER); textbox(s,x+.18,2.35,3.48,.55,val,18,NAVY,True,PP_ALIGN.CENTER) yy=3.15 for p in pts: textbox(s,x+.33,yy,.16,.2,'•',12,accent,True); textbox(s,x+.55,yy,2.95,.4,p,10,INK); yy+=.66 footer(s,'Thresholds are guides. Symptoms, rapid rise, renal injury, fluid intolerance and ECG changes lower the threshold for inpatient management.') #8 algorithm s=prs.slides.add_slide(blank); title(s,'Hypercalcemia treatment algorithm','For clinically significant vitamin D-mediated hypercalcemia. Escalate based on symptoms, trajectory, ECG and renal function.',8) # top boxes rect(s,4.1,1.48,5.1,.72,SKY,LINE); textbox(s,4.25,1.66,4.8,.26,'Confirm calcium + assess symptoms, ECG, renal function and volume status',11,NAVY,True,PP_ALIGN.CENTER) line(s,6.65,2.2,6.65,2.55,TEAL,1.6,True) rect(s,3.3,2.6,6.7,.73,PALE,LINE); textbox(s,3.45,2.78,6.4,.26,'Stop vitamin D / calcium drivers; obtain serial calcium, renal panel and electrolytes',11,NAVY,True,PP_ALIGN.CENTER) line(s,6.65,3.33,6.65,3.65,TEAL,1.6); line(s,2.35,3.65,10.98,3.65,TEAL,1.4) for x in [2.35,6.65,10.98]: line(s,x,3.65,x,3.96,TEAL,1.4,True) branches=[(.75,'Mild / stable','Oral hydration if appropriate\nStop drivers\nEtiologic workup\nEarly repeat testing',GREEN,TEAL),(4.78,'Moderate or symptomatic','ED / hospital assessment\nIV isotonic saline to euvolemia\nFrequent labs and ECG reassessment',ORANGE,'9A6700'),(8.81,'Severe / emergency','Admission, IV fluids, telemetry\nRapid bridge + sustained calcium lowering\nSpecialist input; consider ICU/dialysis','FFF1F1',RED)] for x,h,b,fill,accent in branches: rect(s,x,4.05,3.78,1.63,fill,LINE); textbox(s,x+.18,4.26,3.42,.25,h,14,accent,True,PP_ALIGN.CENTER); textbox(s,x+.28,4.68,3.2,.7,b,10,INK,False,PP_ALIGN.CENTER) textbox(s,.92,6.12,11.5,.4,'For vitamin D-mediated or calcitriol-mediated hypercalcemia: glucocorticoids may be appropriate. Use local protocols and specialist guidance for selection and dosing.',11,NAVY,True,PP_ALIGN.CENTER) footer(s) #9 treatment components s=prs.slides.add_slide(blank); title(s,'Treatment components: match onset of action to severity','Acute measures address complications while cause-directed therapy suppresses ongoing calcium loading.',9) items=[('1. Restore euvolemia','IV isotonic saline for symptomatic or significant hypercalcemia. Tailor to cardiac and renal status; track urine output and electrolyte changes.',SKY,TEAL),('2. Rapid bridge','Calcitonin can provide faster, temporary calcium reduction while longer-acting therapy takes effect. Follow institutional protocol.',GREEN,TEAL),('3. Sustained reduction','Use antiresorptive therapy when indicated. Drug choice depends on cause, expected onset, renal function and local guidance.',ORANGE,'9A6700'),('4. Cause-directed care','Stop vitamin D/calcium. Consider glucocorticoids for vitamin D-mediated or calcitriol-mediated hypercalcemia. Address alternative cause if indicated.',PALE,NAVY),('5. Rescue pathway','Dialysis may be needed for life-threatening or refractory hypercalcemia, particularly when renal or heart failure limits hydration.', 'FFF1F1',RED)] for i,(h,b,fill,accent) in enumerate(items): x=.75+(i%2)*6.15; y=1.55+(i//2)*1.55; w=5.75 if i<4 else 12.05 if i==4: x=.75; y=4.65 rect(s,x,y,w,1.25,fill,LINE); textbox(s,x+.22,y+.16,w-.44,.25,h,13,accent,True); textbox(s,x+.22,y+.54,w-.44,.45,b,9.6,INK) footer(s,'Do not use loop diuretics simply to lower calcium. Consider only after rehydration when clinically needed for fluid overload.') #10 monitoring/discharge s=prs.slides.add_slide(blank); title(s,'Inpatient monitoring and safe transition of care','The calcium trajectory and organ function determine monitoring intensity and discharge readiness.',10) bullet_block(s,.75,1.55,4.0,4.9,'Inpatient monitoring',['Telemetry if severe calcium elevation, ECG abnormality, arrhythmia or digoxin use','Strict intake/output and serial volume assessment','Serial calcium, creatinine/eGFR and electrolytes','Repeat ECG after new cardiac symptoms or major calcium/electrolyte change','Daily weight when fluid balance is clinically relevant']) bullet_block(s,4.92,1.55,3.7,4.9,'Discharge readiness',['Symptoms resolved or improving','Calcium stable and falling','Renal function and hydration stable','Oral intake is reliable','Clear medication/supplement plan','Follow-up testing is arranged']) bullet_block(s,8.79,1.55,3.8,4.9,'Patient instructions',['Avoid vitamin D and calcium products unless restarted by the treating team','Bring all supplements to follow-up','Return urgently for vomiting, confusion, severe weakness, reduced urine, palpitations, syncope or chest pain','Document the exposure and adverse event clearly']) footer(s) #11 key summary s=prs.slides.add_slide(blank); title(s,'Take-home messages','Vitamin D toxicity is treatable when the exposure and hypercalcemia are recognized early.',11) summary=[('Stop the source','Stop vitamin D and non-essential calcium products immediately.'),('Measure the harm','Confirm calcium severity and assess kidney function, hydration, electrolytes and ECG.'),('Escalate early','Ca ≥14 mg/dL, serious symptoms, AKI or ECG changes require emergency-level care.'),('Treat the physiology','Restore euvolemia, provide rapid and sustained calcium lowering when needed, and use cause-directed therapy.'),('Plan the exit','Ensure a falling calcium trend, stable renal function, explicit supplement instructions and dependable follow-up.')] for i,(h,b) in enumerate(summary): y=1.55+i*.92; rect(s,.95,y,11.5,.66,SKY if i%2==0 else PALE,LINE); rect(s,1.13,y+.14,.37,.37,TEAL,TEAL); textbox(s,1.13,y+.19,.37,.14,str(i+1),8,WHITE,True,PP_ALIGN.CENTER); textbox(s,1.75,y+.14,2.15,.2,h,12,NAVY,True); textbox(s,3.9,y+.14,7.2,.28,b,10,INK) footer(s) #12 refs s=prs.slides.add_slide(blank); title(s,'Selected references and protocol note','Core sources used in the clinician handout and this presentation.',12) refs=['Harrison’s Principles of Internal Medicine, 22e (2025): Vitamin D and hypercalcemia sections.','Brenner and Rector’s The Kidney: Vitamin D-mediated hypercalcemia and management of hypercalcemia.','Tintinalli’s Emergency Medicine: Vitamin D and hypercalcemia sections.','NIH Office of Dietary Supplements. Vitamin D Fact Sheet for Health Professionals. Updated June 2025.','Goltzman D. Approach to Hypercalcemia. Endotext. Updated 2023.','Cianferotti L, et al. Too much vitamin D? A drug safety review. Reviews in Endocrine & Metabolic Disorders. 2026. PMID 41483069.'] rect(s,.75,1.55,11.85,4.5,PALE,LINE) y=1.92 for r in refs: textbox(s,1.05,y,.18,.2,'•',12,TEAL,True); textbox(s,1.3,y,10.85,.34,r,11,INK); y+=.58 textbox(s,.95,6.28,11.4,.28,'Use this deck alongside local hypercalcemia pathways. It is a clinical education resource, not a substitute for patient-specific assessment or specialist advice.',10,RED,True,PP_ALIGN.CENTER) footer(s) # meta and save prs.core_properties.title='Managing Vitamin D Toxicity: Clinician Presentation'; prs.core_properties.subject='Recognition and management of vitamin D-mediated hypercalcemia'; prs.core_properties.author='Orris' prs.save(OUT) print(OUT) PY python - <<'PY' from pptx import Presentation from pathlib import Path p=Path('/tmp/workspace/vitamin-d-toxicity-presentation/output/Managing_Vitamin_D_Toxicity_Clinician_Presentation.pptx') prs=Presentation(str(p)) print('exists',p.exists(),'bytes',p.stat().st_size,'slides',len(prs.slides)) for i,slide in enumerate(prs.slides,1): text=' '.join(shape.text for shape in slide.shapes if getattr(shape,'has_text_frame',False)) print(i, len(text), text[:82].replace('\n',' | ')) PY