Make A power point presentation on Pancytopenia: From Clinical Cases to Etiological Diagnosis. Based on Nelson textbook and IAP guidelines 3 clinical case presentation 1) Megaloblastic anemia 2) HLH 3) Scrub Typhus
pancytopenia AND pediatric
IAP pediatric pancytopenia guidelines scrub typhus HLH megaloblastic anemia
pediatric hemophagocytic lymphohistiocytosis AND guidelines
~/
https://www.indianpediatrics.net/mar2017/mar-223-229.htm
peripheral blood smear megaloblastic anemia macro ovalocytes hypersegmented neutrophils
bone marrow hemophagocytosis macrophage blood cells HLH histology
scrub typhus eschar child clinical photograph
Nelson Textbook of Pediatrics 22nd edition pancytopenia megaloblastic anemia hemophagocytic lymphohistiocytosis table contents
~/
mkdir -p "/tmp/workspace/pancytopenia-ppt/src" "/tmp/workspace/pancytopenia-ppt/output"
python - <<'PY' from pathlib import Path p=Path('/tmp/workspace/pancytopenia-ppt/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 OUT='/tmp/workspace/pancytopenia-ppt/output/Pancytopenia_Clinical_Cases_to_Etiological_Diagnosis.pptx' prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5) blank=prs.slide_layouts[6] # Palette NAVY=RGBColor(17,42,70); TEAL=RGBColor(0,137,143); CYAN=RGBColor(69,190,191); INK=RGBColor(32,43,55) MUTED=RGBColor(93,108,122); BG=RGBColor(247,250,252); PALE=RGBColor(232,246,246); RED=RGBColor(191,57,63) ORANGE=RGBColor(224,135,52); GREEN=RGBColor(44,139,105); WHITE=RGBColor(255,255,255); GREY=RGBColor(220,228,233) # helpers def rect(slide,x,y,w,h,fill=WHITE,line=None,r=MSO_SHAPE.ROUNDED_RECTANGLE): s=slide.shapes.add_shape(r, Inches(x), Inches(y), Inches(w), Inches(h)); s.fill.solid(); s.fill.fore_color.rgb=fill s.line.color.rgb=line if line else fill return s def add_text(slide,text,x,y,w,h,size=18,color=INK,bold=False,align=PP_ALIGN.LEFT, font='Aptos', valign=MSO_ANCHOR.TOP): 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=tf.margin_right=Inches(.05); tf.margin_top=tf.margin_bottom=Inches(.02); tf.vertical_anchor=valign for i,line in enumerate(text.split('\n')): p=tf.paragraphs[0] if i==0 else tf.add_paragraph(); p.text=line; p.alignment=align; p.space_after=Pt(3) for run in p.runs: run.font.name=font; run.font.size=Pt(size); run.font.bold=bold; run.font.color.rgb=color return tb def bullet(slide,items,x,y,w,h,size=18,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=Inches(.12); tf.margin_top=Inches(.05) for i,item in enumerate(items): p=tf.paragraphs[0] if i==0 else tf.add_paragraph(); p.text=item; p.level=0; p.font.size=Pt(size); p.font.name='Aptos'; p.font.color.rgb=color; p.space_after=Pt(8); p.bullet=True return tb def title(slide,main,kicker=None): rect(slide,0,0,13.333,.23,TEAL,TEAL,MSO_SHAPE.RECTANGLE) if kicker: add_text(slide,kicker.upper(),.58,.38,12,.25,10,TEAL,True) add_text(slide,main,.55,.66,12.2,.55,27,NAVY,True) rect(slide,.55,1.27,1.05,.05,TEAL,TEAL,MSO_SHAPE.RECTANGLE) def footer(slide,n,source='Nelson Textbook of Pediatrics, 22e | IAP guidance cited in final slides'): add_text(slide,source,.55,7.14,10.8,.18,8,MUTED) add_text(slide,str(n),12.35,7.10,.38,.22,9,TEAL,True,PP_ALIGN.RIGHT) def base(): s=prs.slides.add_slide(blank); bg=rect(s,0,0,13.333,7.5,BG,BG,MSO_SHAPE.RECTANGLE); return s def chip(slide,text,x,y,w,fill=PALE,color=TEAL): rect(slide,x,y,w,.38,fill,fill); add_text(slide,text,x+.08,y+.08,w-.16,.16,10,color,True,PP_ALIGN.CENTER) def connector(slide,x1,y1,x2,y2,color=TEAL,width=2): line=slide.shapes.add_connector(MSO_CONNECTOR.STRAIGHT, Inches(x1), Inches(y1), Inches(x2), Inches(y2)); line.line.color.rgb=color; line.line.width=Pt(width); return line def callout(slide,heading,body,x,y,w,h,accent=TEAL): rect(slide,x,y,w,h,WHITE,GREY); rect(slide,x,y,.09,h,accent,accent,MSO_SHAPE.RECTANGLE); add_text(slide,heading,x+.25,y+.17,w-.38,.3,16,NAVY,True); add_text(slide,body,x+.25,y+.58,w-.42,h-.68,13,INK) #1 s=base(); rect(s,0,0,13.333,7.5,NAVY,NAVY,MSO_SHAPE.RECTANGLE); rect(s,.7,.72,.12,5.9,TEAL,TEAL,MSO_SHAPE.RECTANGLE) add_text(s,'PANCYTOPENIA',1.1,1.28,8.7,.55,34,WHITE,True); add_text(s,'From Clinical Cases to Etiological Diagnosis',1.1,1.93,9.9,.48,25,RGBColor(191,231,231),False) add_text(s,'A practical pediatric approach using diagnostic pivots',1.12,2.67,7.8,.3,16,WHITE) for i,(lab,c) in enumerate([('MEGALOBLASTIC ANEMIA',ORANGE),('HLH',RED),('SCRUB TYPHUS',GREEN)]): rect(s,1.1+i*3.35,4.02,2.9,.8,c,c); add_text(s,lab,1.22+i*3.35,4.26,2.65,.2,13,WHITE,True,PP_ALIGN.CENTER) add_text(s,'Based on Nelson Textbook of Pediatrics and IAP guidance',1.12,6.35,8,.25,12,RGBColor(191,231,231)) #2 s=base(); title(s,'Why pancytopenia demands a structured response','clinical frame') add_text(s,'Pancytopenia = reduction in all three peripheral blood cell lines',.65,1.58,11.8,.35,19,INK,True) # cells for x,lab,sub,c in [(1.05,'Hb / RBC','fatigue · pallor',RED),(4.65,'ANC / WBC','infection risk',TEAL),(8.25,'Platelets','bleeding risk',ORANGE)]: rect(s,x,2.2,2.6,1.25,WHITE,GREY); rect(s,x+.88,2.42,.8,.42,c,c,MSO_SHAPE.OVAL); add_text(s,lab,x+.15,2.95,2.3,.23,16,NAVY,True,PP_ALIGN.CENTER); add_text(s,sub,x+.15,3.2,2.3,.18,11,MUTED,False,PP_ALIGN.CENTER) connector(s,3.7,2.82,4.52,2.82); connector(s,7.3,2.82,8.12,2.82) callout(s,'The bedside question','Is this a marrow-production problem, ineffective hematopoiesis, peripheral destruction/sequestration, infiltration, or an infection-driven inflammatory syndrome?',.92,4.25,11.45,1.38,TEAL) add_text(s,'First priority: identify unstable bleeding, sepsis, shock, or severe symptomatic anemia and resuscitate in parallel with diagnostic work-up.',.92,5.95,11.4,.42,15,RED,True) footer(s,2) #3 s=base(); title(s,'Etiologic map: begin with mechanism','diagnostic framework') cols=[('LOW PRODUCTION','Hypocellular marrow\nAplastic anemia\nInherited marrow failure\nDrug/toxin effect',TEAL),('INEFFECTIVE / DYSPLASTIC','Cellular marrow\nB12 / folate deficiency\nMDS / copper deficiency',ORANGE),('INFILTRATIVE / REPLACEMENT','Blasts / fibrosis / storage\nALL, AML\nMyelofibrosis\nVisceral leishmaniasis',RED),('PERIPHERAL / SYSTEMIC','Sequestration or destruction\nHypersplenism\nSLE / infection\nHLH',GREEN)] for i,(h,b,c) in enumerate(cols): x=.55+i*3.18; rect(s,x,1.7,2.85,3.35,WHITE,GREY); rect(s,x,1.7,2.85,.55,c,c,MSO_SHAPE.ROUNDED_RECTANGLE); add_text(s,h,x+.12,1.88,2.6,.17,12,WHITE,True,PP_ALIGN.CENTER); add_text(s,b,x+.22,2.52,2.42,2.15,15,INK) add_text(s,'Marrow cellularity is a key branch point, not the first test for every stable child. Start with history, examination, CBC indices, reticulocyte count and blood film.',.7,5.68,11.8,.52,16,NAVY,True) chip(s,'IAP pancytopenia differential: hypocellular vs cellular vs infiltrative marrow',.72,6.37,7.5) footer(s,3,'IAP Consensus Statement on Acquired Aplastic Anemia, 2022 - Box II') #4 s=base(); title(s,'The first 24 hours: an actionable algorithm','approach') steps=[('1','Confirm','Repeat CBC if discordant\nReticulocyte count\nPeripheral smear'),('2','Phenotype','MCV, RDW, blasts\nOrganomegaly\nFever / rash / eschar'),('3','Screen','LFT, bilirubin, LDH\nFerritin, TG, fibrinogen\nCultures / infection tests'),('4','Target','B12/folate or marrow\nHLH work-up\nScrub serology/PCR')] for i,(num,h,b) in enumerate(steps): x=.62+i*3.15; rect(s,x,1.85,2.72,2.4,WHITE,GREY); rect(s,x+.18,2.08,.52,.52,TEAL,TEAL,MSO_SHAPE.OVAL); add_text(s,num,x+.18,2.2,.52,.15,14,WHITE,True,PP_ALIGN.CENTER); add_text(s,h,x+.8,2.06,1.6,.22,17,NAVY,True); add_text(s,b,x+.22,2.85,2.25,1.05,14,INK) if i<3: connector(s,x+2.74,3.05,x+3.06,3.05) callout(s,'Red flags that should accelerate referral / marrow evaluation','Blasts or leukoerythroblastic film; severe neutropenia with sepsis; rapidly falling counts; persistent fever with organomegaly and hyperferritinemia; unexplained hypocytopenia; physical features suggesting inherited marrow-failure syndrome.',.68,4.85,11.9,1.24,RED) footer(s,4,'Nelson Textbook of Pediatrics, 22e | IAP Consensus Statement on Acquired Aplastic Anemia, 2022') #5 Case1 s=base(); title(s,'Case 1: “The macrocytic clue”','case presentation - megaloblastic anemia') rect(s,.6,1.58,4.05,4.95,NAVY,NAVY); add_text(s,'8-year-old boy',.95,1.92,3.3,.3,24,WHITE,True); add_text(s,'Vegetarian diet with poor intake\nPallor, easy fatigability\nGlossitis; no organomegaly\nNo fever or bleeding',.95,2.55,3.2,2.0,17,WHITE) add_text(s,'CBC',.95,5.48,1,.2,14,RGBColor(191,231,231),True); add_text(s,'Hb 5.8 g/dL | WBC 2,700/µL\nANC 1,100/µL | Platelets 72,000/µL\nMCV 116 fL | Reticulocytes low',.95,5.77,3.35,.54,13,WHITE) callout(s,'Pause and think','Does this pattern suggest marrow failure? What single low-cost test carries high diagnostic yield?',5.15,1.75,6.95,1.14,ORANGE) add_text(s,'Diagnostic pivot',5.15,3.22,2,.25,18,ORANGE,True); add_text(s,'Macrocytosis + low reticulocytes + characteristic smear',5.15,3.58,6.2,.38,23,NAVY,True) rect(s,5.15,4.28,6.92,1.42,PALE,PALE); add_text(s,'Expected smear: macro-ovalocytes and hypersegmented neutrophils.\nConfirm with serum B12 and folate, while assessing diet, malabsorption, and drug exposure.',5.45,4.59,6.28,.72,15,INK) footer(s,5) #6 s=base(); title(s,'Case 1 resolved: megaloblastic anemia','ineffective hematopoiesis') callout(s,'Mechanism','Deficient DNA synthesis produces nuclear-cytoplasmic asynchrony. The marrow may be hypercellular, yet ineffective hematopoiesis and intramedullary cell breakdown lead to cytopenias.',.62,1.55,5.95,1.55,ORANGE) callout(s,'Expected laboratory pattern','High MCV and RDW, low reticulocytes, indirect bilirubin/LDH may rise. Smear morphology is often diagnostic before confirmatory assays return.',6.78,1.55,5.95,1.55,TEAL) add_text(s,'Management sequence',.68,3.55,3.2,.3,19,NAVY,True) for i,(h,b) in enumerate([('Stabilize','Transfuse only for symptoms / hemodynamic need, not number alone.'),('Treat cause','Replace the demonstrated deficiency. If B12 deficiency is plausible, do not give folate alone.'),('Find why','Dietary history, celiac/malabsorption, medications, inherited causes; assess neurologic findings.')]): x=.68+i*4.05; rect(s,x,4.12,3.65,1.55,WHITE,GREY); add_text(s,h,x+.18,4.35,3.2,.23,16,TEAL,True); add_text(s,b,x+.18,4.77,3.1,.6,13,INK) rect(s,.68,6.0,11.67,.58,RGBColor(255,244,231),RGBColor(255,244,231)); add_text(s,'Teaching pearl: pancytopenia with a cellular marrow is not automatically leukemia or HLH. MCV and smear can redirect the work-up early.',.9,6.18,11.2,.2,14,ORANGE,True) footer(s,6,'Nelson Textbook of Pediatrics, 22e - Macrocytic/megaloblastic anemia; IAP AA guideline, 2022') #7 Case2 s=base(); title(s,'Case 2: “Fever, spleen and ferritin”','case presentation - HLH') rect(s,.6,1.58,3.72,4.9,RED,RED); add_text(s,'3-year-old child',.92,1.9,3,.3,23,WHITE,True); add_text(s,'10 days high fever\nHepatosplenomegaly\nIrritability and edema\nNo response to antibiotics',.92,2.5,2.9,1.7,17,WHITE) add_text(s,'CBC / chemistry',.92,4.65,2,.2,14,RGBColor(255,219,219),True); add_text(s,'Hb 7.1 g/dL | ANC 720/µL\nPlatelets 48,000/µL\nFerritin 18,000 ng/mL\nTG high; fibrinogen low',.92,4.94,3.02,.8,13,WHITE) add_text(s,'Diagnostic pivot',4.8,1.74,2,.25,18,RED,True); add_text(s,'Inflammatory pancytopenia with organomegaly',4.8,2.08,7.4,.4,24,NAVY,True) for i,(h,b) in enumerate([('Do not wait','Send HLH-directed tests and involve pediatric hematology early.'),('Search trigger','Infection, malignancy, rheumatologic disease and primary/genetic HLH.'),('Marrow caveat','Hemophagocytosis supports diagnosis but may be absent early and is not specific.')]): callout(s,h,b,4.8,2.85+i*1.07,7.15,.84,[RED,TEAL,ORANGE][i]) footer(s,7) #8 s=base(); title(s,'HLH: identify the cytokine-storm phenotype','case 2 - diagnostic reasoning') add_text(s,'HLH-2004 framework: 5 of 8 criteria, or a molecular diagnosis consistent with HLH',.67,1.53,11.8,.3,17,NAVY,True) criteria=['Fever','Splenomegaly','Cytopenias ≥2 lines','Triglycerides high and/or fibrinogen low','Hemophagocytosis','Low/absent NK function','Ferritin raised','Soluble CD25 raised'] for i,c in enumerate(criteria): x=.7+(i%4)*3.08; y=2.15+(i//4)*.78; rect(s,x,y,2.73,.54,WHITE,GREY); rect(s,x+.12,y+.11,.3,.3,RED,RED,MSO_SHAPE.OVAL); add_text(s,'✓',x+.12,y+.14,.3,.15,10,WHITE,True,PP_ALIGN.CENTER); add_text(s,c,x+.52,y+.15,2.05,.16,13,INK,False) callout(s,'Marrow is helpful, but not a gatekeeper','Do not defer treatment of an unstable child while waiting to demonstrate hemophagocytosis. Bone marrow also helps exclude leukemia, lymphoma, visceral leishmaniasis and other infiltrative etiologies.',.7,4.1,11.75,1.13,RED) callout(s,'Management principles','Treat the trigger, provide organ support and obtain urgent hematology guidance for immunochemotherapy / HLH-directed protocol. Consider genetic evaluation in young children, recurrent disease or suggestive family history.',.7,5.55,11.75,.94,TEAL) footer(s,8,'Nelson Textbook of Pediatrics, 22e - Hemophagocytic lymphohistiocytosis; HLH-2004 diagnostic framework') #9 Case3 s=base(); title(s,'Case 3: “The hidden eschar”','case presentation - scrub typhus') rect(s,.6,1.58,3.72,4.92,GREEN,GREEN); add_text(s,'10-year-old child',.92,1.9,3,.3,23,WHITE,True); add_text(s,'Fever for 7 days after field exposure\nHeadache, abdominal pain\nHepatosplenomegaly\nSmall painless black eschar in axilla',.92,2.47,3.0,1.95,16,WHITE) add_text(s,'CBC / LFT',.92,4.78,2,.2,14,RGBColor(211,244,228),True); add_text(s,'Hb 8.7 g/dL | WBC 3,200/µL\nPlatelets 55,000/µL\nAST/ALT elevated | Na low',.92,5.06,3.02,.62,13,WHITE) add_text(s,'Diagnostic pivot',4.78,1.75,2.2,.23,18,GREEN,True); add_text(s,'Acute febrile cytopenia + exposure + eschar',4.78,2.12,7.5,.38,24,NAVY,True) callout(s,'Do not anchor on dengue','In endemic settings, a careful full-skin examination and exposure history can uncover the clue. Differential includes dengue, malaria, enteric fever, leptospirosis, sepsis and hematologic disease.',4.78,2.92,7.2,1.25,ORANGE) callout(s,'Tests','Use an appropriate validated serologic test or PCR where available. Start therapy on compatible clinical grounds when illness is significant, without waiting for confirmation.',4.78,4.6,7.2,1.1,TEAL) footer(s,9,'IAP Guidelines on Rickettsial Diseases in Children, 2017') #10 s=base(); title(s,'Case 3 resolved: scrub typhus can mimic marrow disease','infection-associated pancytopenia') add_text(s,'Clinical pattern that should raise suspicion',.66,1.56,5.2,.3,19,NAVY,True) bullet(s,['Acute undifferentiated fever with compatible rural / mite exposure','Eschar may be absent: deliberately inspect axillae, groin, scalp, neck and skin folds','Thrombocytopenia; normal or low WBC early; transaminitis, hyponatremia, hypoalbuminemia','Severe disease: pneumonitis, shock, encephalitis, hepatitis, AKI, myocarditis'],.7,2.0,6.05,3.45,16) callout(s,'IAP recommendation','Doxycycline is the drug of choice. In a compatible child with significant disease, begin treatment promptly and do not wait for confirmatory tests.',7.08,1.7,5.34,1.28,GREEN) callout(s,'Practical pediatric regimen','Doxycycline 2.2 mg/kg/dose orally or IV every 12 hours (maximum 100 mg/dose), generally for 7 days or until afebrile for 48 hours, following local protocol. Consider azithromycin when doxycycline is unsuitable.',7.08,3.35,5.34,1.55,TEAL) rect(s,7.08,5.27,5.34,.75,RGBColor(234,248,239),RGBColor(234,248,239)); add_text(s,'Response can be rapid, but persistent fever/cytopenias should prompt reassessment for complications or alternate diagnoses including HLH.',7.3,5.52,4.9,.22,13,GREEN,True) footer(s,10,'IAP Guidelines on Rickettsial Diseases in Children, Indian Pediatr. 2017;54:223-229') #11 s=base(); title(s,'Comparing the three cases: pattern recognition','synthesis') headers=['Feature','Megaloblastic anemia','HLH','Scrub typhus'] rows=[('Tempo','Subacute','Acute or subacute, progressive','Acute febrile illness'),('Key clue','Macrocytosis + smear','Fever + spleen + ferritin','Exposure / eschar + LFT'),('Reticulocytes','Low','Usually low','Variable'),('Organomegaly','Usually absent','Prominent','May occur'),('Marrow','Cellular, megaloblasts','May show hemophagocytosis','Usually reactive'),('Immediate action','Replace documented deficiency','Urgent hematology + treat trigger','Prompt doxycycline if compatible')] x=[.55,2.25,5.58,8.93]; w=[1.65,3.25,3.25,3.82] for i,h in enumerate(headers): rect(s,x[i],1.55,w[i],.58,NAVY,NAVY); add_text(s,h,x[i]+.08,1.76,w[i]-.16,.18,13,WHITE,True,PP_ALIGN.CENTER) for r,row in enumerate(rows): y=2.17+r*.62 for i,val in enumerate(row): fill=WHITE if r%2==0 else PALE; rect(s,x[i],y,w[i],.6,fill,GREY,MSO_SHAPE.RECTANGLE); add_text(s,val,x[i]+.1,y+.13,w[i]-.2,.3,12,INK, i==0, PP_ALIGN.CENTER if i else PP_ALIGN.LEFT) add_text(s,'A single CBC never diagnoses the cause. The discriminators are timeline, indices, smear, reticulocyte response, organomegaly, inflammatory profile, exposure history and targeted tests.',.64,6.2,11.7,.32,16,TEAL,True,PP_ALIGN.CENTER) footer(s,11) #12 s=base(); title(s,'When should you perform bone marrow examination?','avoid delay, avoid reflex testing') left=['Blasts, leukoerythroblastic film or unexplained abnormal cells','Unexplained persistent pancytopenia after initial noninvasive evaluation','Suspected leukemia, marrow infiltration, aplastic anemia, MDS or storage disease','Need to evaluate for infection / hemophagocytosis in the correct clinical context'] right=['Classic macrocytic smear with confirmed nutritional deficiency and prompt response','A clinically clear, rapidly responding acute infection with recovering counts','As a substitute for history, peripheral smear and reticulocyte count'] rect(s,.65,1.55,5.85,4.85,WHITE,GREY); rect(s,6.82,1.55,5.85,4.85,WHITE,GREY) add_text(s,'Consider / prioritize',.92,1.9,4.8,.3,20,GREEN,True); bullet(s,left,.88,2.42,5.05,3.55,15) add_text(s,'Not routinely first-line when',7.1,1.9,4.9,.3,20,ORANGE,True); bullet(s,right,7.05,2.42,4.95,3.15,15) footer(s,12,'IAP Consensus Statement on Acquired Aplastic Anemia, 2022') #13 s=base(); title(s,'Practical bedside checklist','take-home approach') checks=[('History','Diet, drugs, toxin exposure, recurrent infections, fever duration, travel/vector exposure, family history'),('Examination','Pallor/bleeding, dysmorphism/pigmentation, nodes, liver/spleen, rash and concealed eschar'),('Core tests','CBC with indices, reticulocytes, peripheral smear, LFT/LDH/bilirubin, infection tests guided by setting'),('Escalate selectively','Ferritin/TG/fibrinogen for HLH phenotype; B12/folate; marrow; inherited marrow-failure evaluation')] for i,(h,b) in enumerate(checks): x=.63+(i%2)*6.17; y=1.62+(i//2)*1.8; callout(s,h,b,x,y,5.72,1.28,[TEAL,ORANGE,RED,GREEN][i]) rect(s,.68,5.64,11.6,.7,NAVY,NAVY); add_text(s,'Final rule: Treat instability and time-sensitive infections while you investigate. Diagnose the mechanism before labeling the disease.',.95,5.88,11.05,.22,17,WHITE,True,PP_ALIGN.CENTER) footer(s,13) #14 s=base(); title(s,'References and source notes','core sources') refs=[ 'Nelson Textbook of Pediatrics. 22nd ed. Elsevier; 2025. Core pediatric hematology, nutritional anemia, histiocytoses/HLH and rickettsial disease sections.', 'Rathi N, Kulkarni A, Yewale V, et al. IAP Guidelines on Rickettsial Diseases in Children. Indian Pediatr. 2017;54:223-229.', 'Danewa A, et al. IAP Guidelines on Management of Aplastic Anemia. Indian Pediatr. 2022. Differential diagnosis of pancytopenia and diagnostic evaluation.', 'Henter JI, Horne A, Aricó M, et al. HLH-2004: Diagnostic and therapeutic guidelines for hemophagocytic lymphohistiocytosis. Pediatr Blood Cancer. 2007;48:124-131.' ] for i,r in enumerate(refs): rect(s,.72,1.57+i*1.13,11.85,.84,WHITE,GREY); add_text(s,str(i+1),.95,1.84+i*1.13,.34,.25,15,TEAL,True,PP_ALIGN.CENTER); add_text(s,r,1.42,1.72+i*1.13,10.75,.47,14,INK) add_text(s,'Educational deck. Adapt diagnostic testing and treatment to local availability, antimicrobial policy and pediatric hematology support.',.78,6.42,11.8,.32,13,RED,True,PP_ALIGN.CENTER) footer(s,14,'Source slide') # notes minimal for i,sl in enumerate(prs.slides,1): try: notes=sl.notes_slide.notes_text_frame notes.text=f'Slide {i}. Teaching deck: Pancytopenia from clinical cases to etiological diagnosis. Use cited sources on reference slide.' except Exception: pass prs.save(OUT) print(OUT) ''') PY python "/tmp/workspace/pancytopenia-ppt/src/create_deck.py" python - <<'PY' from pptx import Presentation p='/tmp/workspace/pancytopenia-ppt/output/Pancytopenia_Clinical_Cases_to_Etiological_Diagnosis.pptx' prs=Presentation(p) print('slides',len(prs.slides)) for i,s in enumerate(prs.slides,1): print(i, sum(1 for sh in s.shapes if sh.has_text_frame), 'shapes') PY
python - <<'PY' from pptx import Presentation from pathlib import Path p=Path('/tmp/workspace/pancytopenia-ppt/output/Pancytopenia_Clinical_Cases_to_Etiological_Diagnosis.pptx') assert p.exists() and p.stat().st_size > 30000 prs=Presentation(str(p)) assert len(prs.slides)==14 for n, slide in enumerate(prs.slides, 1): texts=[sh.text.strip() for sh in slide.shapes if getattr(sh,'has_text_frame',False) and sh.text.strip()] assert texts, f'empty slide {n}' print(f'{n:02d}: {texts[0][:75]}') print('validated bytes=',p.stat().st_size) PY
Pancytopenia Clinical Cases to Etiological Diagnosis
Presentation · PPTX