make a detailed ppt for my online video course for postgraduate students for 'internal medicine mastery course' on Clinical reasoning and diagnostic frameworks Suggested structure: Epidemiology • Pathophysiology • Clinical features • Diagnosis •Investigations • Evidence-based management • Complications • Exam pearls • Case discussion.

Reading File
Reading File
Searching the Web

clinical reasoning diagnostic frameworks internal medicine evidence-based diagnosis guidelines diagnostic error

Searching PubMed

clinical reasoning diagnostic error

Reading File
Finding Sources
Finding Sources
Browsing Directory

~/

Reading File
Reading File
Reading File
Browsing Directory

~/

Running Command

mkdir -p "/tmp/workspace/internal-medicine-mastery/src" "/tmp/workspace/internal-medicine-mastery/output" && python - <<'PY' 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.shapes import MSO_AUTO_SHAPE_TYPE from pptx.oxml.xmlchemy import OxmlElement from pptx.oxml.ns import qn from pptx.enum.text import MSO_AUTO_SIZE from pathlib import Path OUT=Path('/tmp/workspace/internal-medicine-mastery/output/Clinical_Reasoning_and_Diagnostic_Frameworks.pptx') prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5) blank=prs.slide_layouts[6] # colors NAVY='0B1F33'; BLUE='146C94'; TEAL='0C8C8C'; CYAN='DFF5F3'; GOLD='F4B942'; RED='C94C4C'; INK='17212B'; MUTED='536471'; PALE='F4F7FA'; WHITE='FFFFFF'; LBLUE='E9F2F8'; GREEN='287D5C'; LRED='FCEBEC' def C(h): return RGBColor.from_string(h) def shape(sl,x,y,w,h,fill, radius=False, line=None): sh=sl.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=C(fill) sh.line.color.rgb=C(line or fill) if radius: sh.adjustments[0]=0.12 return sh def text(sl,txt,x,y,w,h,size=18,color=INK,bold=False,align=None,font='Aptos',margin=.08): tb=sl.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(margin); tf.margin_top=tf.margin_bottom=Inches(margin*.65); tf.vertical_anchor=MSO_ANCHOR.MIDDLE lines=txt.split('\n') for i,line in enumerate(lines): p=tf.paragraphs[0] if i==0 else tf.add_paragraph(); p.text=line; p.font.name=font; p.font.size=Pt(size); p.font.bold=bold; p.font.color.rgb=C(color); p.space_after=Pt(3) if align: p.alignment=align return tb def add_notes(sl, content): notes = sl.notes_slide tf=notes.notes_text_frame tf.text=content def base(title, section='CORE FRAMEWORK'): sl=prs.slides.add_slide(blank); shape(sl,0,0,13.333,7.5,WHITE) shape(sl,0,0,13.333,.16,TEAL); text(sl,section, .55,.31,4,.25,10,TEAL,True); text(sl,title,.55,.58,12.1,.65,29,NAVY,True) text(sl,'INTERNAL MEDICINE MASTERY COURSE',.55,7.08,5,.17,8,MUTED,True) text(sl,str(len(prs.slides)),12.25,7.05,.45,.2,9,MUTED,True,PP_ALIGN.RIGHT) return sl def bullet_list(sl, items,x,y,w,h,size=17, color=INK): tb=sl.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(.05); tf.margin_right=Inches(.03); tf.margin_top=Inches(.02) for i,(head,body) in enumerate(items): p=tf.paragraphs[0] if i==0 else tf.add_paragraph(); p.level=0; p.text='• '+head + ((' — '+body) if body else ''); p.font.name='Aptos'; p.font.size=Pt(size); p.font.color.rgb=C(color); p.space_after=Pt(10) # first run bold until dash if p.runs: p.runs[0].font.bold=False return tb def card(sl,title,body,x,y,w,h,accent=TEAL): shape(sl,x,y,w,h,PALE,True); shape(sl,x,y,.08,h,accent); text(sl,title,x+.22,y+.18,w-.35,.28,15,NAVY,True); text(sl,body,x+.22,y+.57,w-.38,h-.66,12,MUTED) # 1 sl=prs.slides.add_slide(blank); shape(sl,0,0,13.333,7.5,NAVY); shape(sl,0,0,13.333,.22,TEAL); shape(sl,.68,1.1,.12,4.8,GOLD); text(sl,'Clinical reasoning\nand diagnostic frameworks',1.05,1.25,10.9,1.65,34,WHITE,True); text(sl,'A practical, evidence-informed approach for postgraduate internal medicine',1.08,3.12,9.9,.5,18,'D5E4EF'); for i,(n,l) in enumerate([('01','Frame'),('02','Prioritize'),('03','Test'),('04','Reassess')]): x=1.08+i*2.85; shape(sl,x,4.35,2.35,1.08,'163A57',True); text(sl,n,x+.18,4.52,.42,.22,12,GOLD,True); text(sl,l,x+.18,4.77,1.9,.28,16,WHITE,True) text(sl,'Internal Medicine Mastery Course | Postgraduate Level',1.08,6.5,8,.3,13,'B8CFDF') add_notes(sl,'Open with the premise: diagnostic excellence is not memorizing longer lists. It is making uncertainty explicit, using structure, and closing loops.') # 2 objectives sl=base('Learning outcomes','ORIENT'); items=[('Build a high-fidelity problem representation','Compress raw data into a discriminating one-liner.'),('Construct and rank a differential','Use anatomy, mechanism, tempo, and probability.'),('Choose tests that change management','Apply pretest probability, likelihood ratios, thresholds, and harms.'),('Protect against error','Recognize cognitive and system contributors; use diagnostic time-outs.'),('Communicate a defensible plan','State uncertainty, safety net, and reassessment triggers.')] bullet_list(sl,items,.72,1.55,11.7,4.8,20) # 3 map sl=base('The diagnostic encounter is a loop, not a line','ORIENT') steps=[('1','Detect','recognize syndrome'),('2','Frame','problem representation'),('3','Generate','differential + danger'),('4','Discriminate','history, exam, tests'),('5','Decide','treat, test, observe'),('6','Recalibrate','follow-up and revise')] for i,(n,a,b) in enumerate(steps): x=.6+i*2.08; shape(sl,x,2.18,1.76,2.15,LB LUE if False else LBLUE,True); text(sl,n,x+.12,2.43,.3,.25,13,TEAL,True); text(sl,a,x+.15,2.8,1.45,.28,16,NAVY,True,PP_ALIGN.CENTER); text(sl,b,x+.15,3.25,1.45,.47,11,MUTED,False,PP_ALIGN.CENTER) if i<5: text(sl,'→',x+1.78,2.92,.26,.25,21,GOLD,True,PP_ALIGN.CENTER) card(sl,'Rule for every transition','Name what has changed: probability, urgency, action, or uncertainty.',1.6,5.15,10.1,.85,GOLD) # 4 epi sl=base('Why diagnostic reasoning matters: epidemiology and burden','EPIDEMIOLOGY') card(sl,'Patient safety burden','Diagnostic error is a major preventable source of harm. Its measurement varies because definitions and detection methods differ.',.65,1.45,5.9,1.25,RED) card(sl,'Where errors arise','At presentation, data acquisition, synthesis, test performance/interpretation, referral, follow-up, and communication.',6.8,1.45,5.85,1.25,TEAL) text(sl,'A useful operational definition',.73,3.2,4,.28,17,NAVY,True); text(sl,'Missed, delayed, or wrong diagnosis, or failure to communicate it to the patient.',.73,3.62,11.3,.38,21,INK,True) for i,(a,b) in enumerate([('Cognition','bias, knowledge, calibration'),('Data','history, exam, test limitations'),('System','handover, access, interruptions'),('Follow-up','no loop closure, no safety net')]): card(sl,a,b,.75+i*3.08,4.65,2.7,1.05,[BLUE,TEAL,GOLD,RED][i]) text(sl,'Teaching point: do not reduce diagnostic error to “bad thinking”. It is a property of clinician, patient, task, and system.',.73,6.28,11.8,.32,14,MUTED,False) #5 path sl=base('Pathophysiology of reasoning: dual-process cognition','PATHOPHYSIOLOGY') shape(sl,.75,1.52,5.75,4.4,LBLUE,True); text(sl,'SYSTEM 1',1.05,1.82,2,.35,21,BLUE,True); text(sl,'Fast • pattern-based • low effort',1.05,2.32,4.7,.3,15,MUTED,True); bullet_list(sl,[('Best use','familiar pattern, time-critical stabilization'),('Risk','misleading prototypes; availability; premature closure'),('Safeguard','ask: “What does not fit?”')],1.05,3.02,4.9,2.1,16) shape(sl,6.82,1.52,5.75,4.4,CYAN,True); text(sl,'SYSTEM 2',7.12,1.82,2,.35,21,TEAL,True); text(sl,'Slow • analytic • effortful',7.12,2.32,4.7,.3,15,MUTED,True); bullet_list(sl,[('Best use','novel, complex, conflicting, high-stakes cases'),('Risk','fatigue, over-analysis, delayed action'),('Safeguard','structured problem representation + thresholds')],7.12,3.02,4.9,2.1,16) text(sl,'Expertise = flexible switching, not exclusive allegiance to one system.',1.1,6.42,11.1,.33,17,NAVY,True,PP_ALIGN.CENTER) # 6 features sl=base('Clinical features that carry diagnostic information','CLINICAL FEATURES') for i,(t,b) in enumerate([('Tempo','hyperacute, acute, subacute, chronic; progression'),('Syndrome','cluster symptoms and signs before naming disease'),('Context','age, immune state, drugs, exposures, geography'),('Discriminators','findings that strongly alter probability'),('Discordance','negative or atypical data that challenge the leading label')]): x=.65+(i%3)*4.22;y=1.55+(i//3)*2.2; card(sl,t,b,x,y,3.75,1.55,[TEAL,BLUE,GOLD,RED,TEAL][i]) text(sl,'Do not collect data indiscriminately. Elicit data that separate plausible diagnoses.',.76,6.2,11.8,.35,19,NAVY,True,PP_ALIGN.CENTER) #7 problem rep sl=base('Problem representation: turn a story into a signal','DIAGNOSIS') shape(sl,.75,1.55,11.8,.76,NAVY,True); text(sl,'Semantic qualifiers + syndrome + context + key discriminators',1.02,1.75,11.2,.3,20,WHITE,True,PP_ALIGN.CENTER) card(sl,'Raw presentation','“Breathless, febrile, and confused since yesterday.”',.75,2.85,5.5,1.25,BLUE) card(sl,'Problem representation','“A 68-year-old with COPD and CKD has acute febrile hypoxemic respiratory failure with focal crackles and hypotension.”',6.8,2.85,5.75,1.25,TEAL) text(sl,'Semantic qualifiers',.78,4.75,2.4,.27,16,NAVY,True); bullet_list(sl,[('time','acute vs chronic'),('pattern','focal vs diffuse'),('severity','stable vs shock'),('host','immunocompetent vs compromised')],.78,5.12,11.3,.9,15) #8 differential sl=base('Generate a differential that is both broad and usable','DIAGNOSIS') text(sl,'Four lenses',.75,1.5,2,.3,18,NAVY,True) for i,(t,b) in enumerate([('Anatomic','Where is the process?'),('Mechanistic','VINDICATE: vascular, infectious, neoplastic, etc.'),('Physiologic','Failure of oxygenation, perfusion, metabolism, regulation'),('Pivot points','Which feature sharply reorganizes the list?')]): card(sl,t,b,.75+(i%2)*6.08,1.95+(i//2)*1.45,5.55,1.1,[BLUE,TEAL,GOLD,RED][i]) shape(sl,.8,5.2,11.65,.72,LRED,True); text(sl,'Always run two tracks: “most likely” AND “must-not-miss if delayed.”',1.1,5.4,11,.28,20,RED,True,PP_ALIGN.CENTER) #9 rank sl=base('Rank diagnoses: probability × danger × actionability','DIAGNOSIS') headers=['Candidate','Prior probability','Fit with data','Consequence if missed','Next discriminator'] rows=[['Pneumonia','High','High','High','CXR, cultures if severe'],['Pulmonary embolism','Moderate','Partial','High','pretest score → D-dimer/CTPA'],['Acute heart failure','Moderate','Partial','High','JVP, BNP/POCUS'],['COPD exacerbation','High','Partial','Moderate','ABG, triggers']] xs=[.65,3.2,5.15,7.55,10.0]; widths=[2.4,1.75,2.15,2.35,2.6] for j,h in enumerate(headers): shape(sl,xs[j],1.55,widths[j],.56,NAVY); text(sl,h,xs[j]+.06,1.68,widths[j]-.12,.2,11,WHITE,True,PP_ALIGN.CENTER) for i,row in enumerate(rows): y=2.14+i*.77 for j,val in enumerate(row): shape(sl,xs[j],y,widths[j],.72,'F4F7FA' if i%2==0 else 'E9F2F8'); text(sl,val,xs[j]+.06,y+.16,widths[j]-.12,.34,12,INK, j==0,PP_ALIGN.CENTER) text(sl,'Ranking is dynamic. New evidence should move diagnoses up, down, or off the list.',.8,5.75,11.7,.35,17,MUTED,False,PP_ALIGN.CENTER) #10 test sl=base('Investigations: ask a testable question before ordering','INVESTIGATIONS') for i,(q,a) in enumerate([('What diagnosis or decision is this test for?','If no explicit answer, reconsider.'),('What is the pretest probability?','Tests shift probability; they do not create it.'),('Will the result change immediate action?','Treatment, disposition, isolation, procedure, or observation.'),('What are test harms and alternatives?','Radiation, contrast, false positives, cascades, delay.')]): card(sl,q,a,.75,1.5+i*1.15,11.8,.9,[TEAL,BLUE,GOLD,RED][i]) #11 bayes sl=base('Bayesian reasoning at the bedside','INVESTIGATIONS') shape(sl,.75,1.55,4.0,3.85,LBLUE,True); text(sl,'Core equations',1.03,1.83,3,.3,20,BLUE,True); text(sl,'Pretest odds = p / (1 − p)\nPost-test odds = pretest odds × LR\nPost-test probability = odds / (1 + odds)',1.05,2.45,3.3,1.55,19,NAVY,True) shape(sl,5.05,1.55,7.48,3.85,CYAN,True); text(sl,'Worked example: test with LR− 0.1',5.35,1.83,5.7,.3,19,TEAL,True); text(sl,'Pretest probability 40% → odds 0.67\nNegative test: 0.67 × 0.1 = 0.067\nPost-test probability ≈ 6%',5.35,2.52,5.75,1.25,20,NAVY,True) text(sl,'Interpretation: a negative result meaningfully lowers probability only when the test is appropriate and performed reliably.',5.35,4.25,6.6,.45,14,MUTED) text(sl,'Rule out: sensitive test with low LR−. Rule in: specific test with high LR+.',.85,6.05,11.5,.4,19,NAVY,True,PP_ALIGN.CENTER) #12 thresholds sl=base('Decision thresholds: test, treat, or observe','INVESTIGATIONS') shape(sl,.85,2.18,11.6,.45,'DCE7EF',True); shape(sl,.85,2.18,3.8,.45,BLUE,True); shape(sl,4.65,2.18,3.8,.45,GOLD,True); shape(sl,8.45,2.18,4,.45,TEAL,True) for x,t,b in [(1.0,'Below test threshold','observe / seek alternative'),(5.0,'Testing zone','test to change probability'),(9.0,'Above treatment threshold','treat; test only if it changes plan')]: text(sl,t,x,2.95,3.1,.3,17,NAVY,True,PP_ALIGN.CENTER); text(sl,b,x,3.38,3.1,.3,13,MUTED,False,PP_ALIGN.CENTER) card(sl,'Thresholds vary','Severity if missed, treatment toxicity, test performance, patient values, and resource/time constraints all move thresholds.',1.25,4.65,10.85,1.0,RED) #13 evidence management sl=base('Evidence-based management begins with a diagnostic plan','EVIDENCE-BASED MANAGEMENT') items=[('Stabilize first','ABC approach, resuscitation, sepsis/ischemia/airway pathways when indicated.'),('Use guideline pathways as scaffolds','Match inclusion criteria and setting; do not apply labels blindly.'),('Treat uncertainty proportionately','Empiric therapy when delay is harmful and probability crosses treatment threshold.'),('Make de-escalation explicit','Specify what result, timepoint, or clinical trajectory will narrow/stop treatment.'),('Shared decisions','Explain trade-offs, uncertainty, feasibility, and patient priorities.')] bullet_list(sl,items,.72,1.55,11.8,4.9,19) #14 complications sl=base('Complications of poor reasoning and how to interrupt them','COMPLICATIONS') for i,(t,b,a) in enumerate([('Missed emergency','Explicit “can’t-miss” list and red-flag escalation.'),('Diagnostic cascade','Stop and ask whether each next test alters a decision.'),('Treatment harm','Use time-limited empiricism; review renal function, interactions, contraindications.'),('Loss to follow-up','Assign result ownership, safety-net symptoms, and a time-bound review.'),('Erosion of trust','Communicate uncertainty honestly and document the working diagnosis.')]): card(sl,t,b,.72+(i%2)*6.05,1.5+(i//2)*1.52,5.55,1.18,[RED,GOLD,TEAL,BLUE,RED][i]) #15 biases sl=base('Cognitive biases: name them to interrupt them','COMPLICATIONS') rows=[('Anchoring','first impression dominates','What alternative would I choose if I saw this data first?'),('Premature closure','stop once a label fits','What serious diagnosis remains unexcluded?'),('Confirmation bias','seek supporting data','Actively seek a disconfirming feature.'),('Availability','recent/vivid case feels common','Check base rate and setting.'),('Diagnostic momentum','inherited label persists','Rebuild the problem representation independently.')] for i,(a,b,c) in enumerate(rows): y=1.42+i*.91; shape(sl,.7,y,2.45,.69,LRED,True);text(sl,a,.83,y+.18,2.15,.25,15,RED,True);text(sl,b,3.45,y+.16,3.3,.28,14,INK);shape(sl,7.05,y,5.55,.69,LBLUE,True);text(sl,c,7.28,y+.16,5.05,.3,14,NAVY) #16 safety sl=base('Metacognition: the 60-second diagnostic time-out','COMPLICATIONS') qs=['What is the patient’s syndrome and severity?','What is the worst plausible diagnosis?','What data do not fit my leading diagnosis?','What is the next test or action most likely to change management?','Who will reassess, when, and what triggers escalation?'] for i,q in enumerate(qs): shape(sl,1.2,1.35+i*.85,10.9,.62,WHITE,True,TEAL); shape(sl,1.2,1.35+i*.85,.65,.62,TEAL,True); text(sl,str(i+1),1.42,1.52+i*.85,.22,.18,13,WHITE,True,PP_ALIGN.CENTER); text(sl,q,2.1,1.48+i*.85,9.55,.26,17,NAVY,True) #17 pearls sl=base('Exam pearls: high-yield diagnostic moves','EXAM PEARLS') pearls=[('One-liner before list','A precise problem representation makes the differential easier to rank.'),('Time course is a test','Hyperacute suggests vascular/toxic/arrhythmic processes; tempo reorganizes the differential.'),('Negative data matter','Document absent discriminators: pleuritic pain, focal deficit, rash, exposure, etc.'),('Test the leading fork','Choose the investigation that best separates the top plausible options.'),('Always ask “what if I am wrong?”','A safety net is part of diagnosis, not an afterthought.')] for i,(a,b) in enumerate(pearls): card(sl,a,b,.72+(i%2)*6.05,1.45+(i//2)*1.55,5.5,1.2,[GOLD,TEAL,BLUE,RED,TEAL][i]) #18 case sl=base('Case discussion: acute dyspnea with hypotension','CASE DISCUSSION') shape(sl,.7,1.45,12,1.15,NAVY,True); text(sl,'A 68-year-old man with COPD and CKD presents with 18 hours of fever, dyspnea and confusion. BP 86/54, HR 118, RR 30, SpO₂ 88% on air, T 39.1°C. Right basal crackles.',.98,1.72,11.5,.55,17,WHITE,True,PP_ALIGN.CENTER) for i,(t,b) in enumerate([('Syndrome','septic shock + acute hypoxemic respiratory failure'),('Must not miss','severe CAP; PE; acute heart failure/MI; obstructive process'),('Immediate actions','oxygen, IV access, lactate/cultures, ECG, resuscitation, early antibiotics when indicated'),('Discriminators','CXR/POCUS, ECG/troponin, ABG, focused history/exam, pretest assessment for PE')]): card(sl,t,b,.72+(i%2)*6.05,3.05+(i//2)*1.48,5.5,1.16,[RED,GOLD,TEAL,BLUE][i]) #19 case reasoning sl=base('Case discussion: reason aloud, then recalibrate','CASE DISCUSSION') steps=[('Initial frame','Fever + focal signs makes infection likely; shock increases urgency.'),('Do not anchor','Hypoxemia/hypotension can also occur in PE, MI, or cardiogenic edema.'),('Choose discriminators','CXR shows right lower-zone infiltrate. POCUS no RV strain; no B-lines. ECG sinus tachycardia.'),('Update and act','Severe CAP with septic shock now leads. Treat, culture, monitor response; keep PE as contingent alternative.'),('Close the loop','If shock/hypoxemia fail to improve, revisit diagnosis, source control, complications, and test assumptions.')] for i,(a,b) in enumerate(steps): y=1.37+i*.93; shape(sl,.8,y,2.15,.63,[BLUE,TEAL,GOLD,RED,BLUE][i],True);text(sl,a,.98,y+.16,1.8,.24,14,WHITE,True,PP_ALIGN.CENTER); text(sl,b,3.25,y+.1,9.1,.4,16,INK) #20 case prompts sl=base('Case discussion: learner prompts','CASE DISCUSSION') qs=[('1','Give a one-sentence problem representation.'),('2','List your top 3 diagnoses and 2 must-not-miss alternatives.'),('3','Which finding would most reduce the probability of PE?'),('4','Which test result would change disposition or treatment now?'),('5','State your reassessment trigger after initial therapy.')] for i,(n,q) in enumerate(qs): card(sl,n+' '+q,'Pair-share for 60 seconds, then defend the reasoning chain.',.9,1.25+i*1.0,11.45,.72,[TEAL,BLUE,GOLD,RED,TEAL][i]) #21 takehome sl=base('Take-home framework: FRAME-TEST-REVIEW','RECAP') for i,(a,b) in enumerate([('FRAME','problem representation; severity; context'),('RANK','likely + dangerous + actionable diagnoses'),('ASK','question before every history item, exam maneuver, and test'),('MEASURE','pretest probability → likelihood ratio → post-test probability'),('ESCALATE','stabilize and treat when risk crosses threshold'),('REVIEW','time-out, safety net, result ownership, recalibration')]): x=.68+(i%3)*4.18;y=1.55+(i//3)*2.08; shape(sl,x,y,3.65,1.55,[BLUE,TEAL,GOLD,RED,BLUE,TEAL][i],True);text(sl,a,x+.18,y+.25,3.25,.32,18,WHITE,True,PP_ALIGN.CENTER);text(sl,b,x+.23,y+.74,3.15,.45,13,WHITE,False,PP_ALIGN.CENTER) #22 refs sl=base('References and further reading','REFERENCES') refs=[ 'Harrison’s Principles of Internal Medicine, 22e (2025). “Brief Introduction to Clinical Reasoning.” pp. 63-64.', 'Symptom to Diagnosis: An Evidence-Based Guide, 4th ed. Ch. 1: A Model for Clinical Reasoning, Table 1-1.', 'Goldman-Cecil Medicine, International Edition. “Clinical Reasoning and Decision-Making.” p. 49.', 'Di Martino M, et al. Diagnostic reasoning in internal medicine: a practical reappraisal. Intern Emerg Med. 2021;16:247-255. PMCID: PMC7705414.', 'Yamada K, et al. Errors in clinical diagnosis: a narrative review. Diagnosis. 2023. PMCID: PMC10467407.', 'Use local protocols and current specialty guidelines for disease-specific diagnosis and management.' ] bullet_list(sl,[(r,'') for r in refs],.75,1.45,11.9,4.85,15,INK) text(sl,'Educational content. Not a substitute for clinical supervision, local pathways, or patient-specific decision making.',.78,6.45,11.7,.28,12,RED,True,PP_ALIGN.CENTER) # Add notes to unnoted slides for i,sl in enumerate(prs.slides): if not sl.notes_slide.notes_text_frame.text.strip(): add_notes(sl,f'Slide {i+1}. Facilitate discussion, pause for learner reasoning, and relate the framework to a recent clinical case.') prs.save(OUT) print(OUT, len(prs.slides)) PY

Running Command

python - <<'PY' p='/dev/null' # Re-run generator from saved shell history is unavailable; patch command source supplied below PY # Create generator by extracting prior command unavailable; use sed-like compact generator here cat > "/tmp/workspace/internal-medicine-mastery/src/build_deck.py" <<'PY' 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 pathlib import Path OUT=Path('/tmp/workspace/internal-medicine-mastery/output/Clinical_Reasoning_and_Diagnostic_Frameworks.pptx') prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5); blank=prs.slide_layouts[6] NAVY='0B1F33'; BLUE='146C94'; TEAL='0C8C8C'; CYAN='DFF5F3'; GOLD='F4B942'; RED='C94C4C'; INK='17212B'; MUTED='536471'; PALE='F4F7FA'; WHITE='FFFFFF'; LBLUE='E9F2F8'; LRED='FCEBEC' def C(h): return RGBColor.from_string(h) def shape(s,x,y,w,h,f,r=False,line=None): z=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if r else MSO_SHAPE.RECTANGLE, Inches(x), Inches(y), Inches(w), Inches(h));z.fill.solid();z.fill.fore_color.rgb=C(f);z.line.color.rgb=C(line or f) if r:z.adjustments[0]=.12 return z def text(s,t,x,y,w,h,sz=18,col=INK,b=False,al=None): z=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h));f=z.text_frame;f.clear();f.word_wrap=True;f.margin_left=f.margin_right=Inches(.07);f.margin_top=f.margin_bottom=Inches(.04);f.vertical_anchor=MSO_ANCHOR.MIDDLE for i,l in enumerate(t.split('\n')): p=f.paragraphs[0] if i==0 else f.add_paragraph();p.text=l;p.font.name='Aptos';p.font.size=Pt(sz);p.font.bold=b;p.font.color.rgb=C(col);p.space_after=Pt(2) if al:p.alignment=al return z def note(s,t):s.notes_slide.notes_text_frame.text=t def base(t,sec='CORE FRAMEWORK'): s=prs.slides.add_slide(blank);shape(s,0,0,13.333,7.5,WHITE);shape(s,0,0,13.333,.16,TEAL);text(s,sec,.55,.31,4,.25,10,TEAL,True);text(s,t,.55,.58,12.1,.65,29,NAVY,True);text(s,'INTERNAL MEDICINE MASTERY COURSE',.55,7.08,5,.17,8,MUTED,True);text(s,str(len(prs.slides)),12.25,7.05,.45,.2,9,MUTED,True,PP_ALIGN.RIGHT);return s def card(s,t,b,x,y,w,h,a=TEAL): shape(s,x,y,w,h,PALE,True);shape(s,x,y,.08,h,a);text(s,t,x+.22,y+.16,w-.35,.28,15,NAVY,True);text(s,b,x+.22,y+.52,w-.38,h-.59,12,MUTED) def bullets(s,arr,x,y,w,h,sz=17): z=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h));f=z.text_frame;f.clear();f.word_wrap=True;f.margin_left=Inches(.04);f.margin_right=Inches(.03) for i,(a,b) in enumerate(arr): p=f.paragraphs[0] if i==0 else f.add_paragraph();p.text='• '+a+(' — '+b if b else '');p.font.name='Aptos';p.font.size=Pt(sz);p.font.color.rgb=C(INK);p.space_after=Pt(10) # title s=prs.slides.add_slide(blank);shape(s,0,0,13.333,7.5,NAVY);shape(s,0,0,13.333,.22,TEAL);shape(s,.68,1.1,.12,4.8,GOLD);text(s,'Clinical reasoning\nand diagnostic frameworks',1.05,1.25,10.9,1.65,34,WHITE,True);text(s,'A practical, evidence-informed approach for postgraduate internal medicine',1.08,3.12,9.9,.5,18,'D5E4EF') for i,(n,l) in enumerate([('01','Frame'),('02','Prioritize'),('03','Test'),('04','Reassess')]): x=1.08+i*2.85;shape(s,x,4.35,2.35,1.08,'163A57',True);text(s,n,x+.18,4.52,.42,.22,12,GOLD,True);text(s,l,x+.18,4.77,1.9,.28,16,WHITE,True) text(s,'Internal Medicine Mastery Course | Postgraduate Level',1.08,6.5,8,.3,13,'B8CFDF');note(s,'Set the premise: diagnostic excellence is not memorizing longer lists. It is making uncertainty explicit, using structure, and closing loops.') #2 s=base('Learning outcomes','ORIENT');bullets(s,[('Build a high-fidelity problem representation','Compress raw data into a discriminating one-liner.'),('Construct and rank a differential','Use anatomy, mechanism, tempo, and probability.'),('Choose tests that change management','Apply pretest probability, likelihood ratios, thresholds, and harms.'),('Protect against error','Recognize cognitive and system contributors; use diagnostic time-outs.'),('Communicate a defensible plan','State uncertainty, safety net, and reassessment triggers.')],.72,1.55,11.7,4.8,20) #3 s=base('The diagnostic encounter is a loop, not a line','ORIENT');steps=[('1','Detect','recognize syndrome'),('2','Frame','problem representation'),('3','Generate','differential + danger'),('4','Discriminate','history, exam, tests'),('5','Decide','treat, test, observe'),('6','Recalibrate','follow-up and revise')] for i,(n,a,b) in enumerate(steps): x=.6+i*2.08;shape(s,x,2.18,1.76,2.15,LBLUE,True);text(s,n,x+.12,2.43,.3,.25,13,TEAL,True);text(s,a,x+.15,2.8,1.45,.28,16,NAVY,True,PP_ALIGN.CENTER);text(s,b,x+.15,3.25,1.45,.47,11,MUTED,False,PP_ALIGN.CENTER) if i<5:text(s,'→',x+1.78,2.92,.26,.25,21,GOLD,True,PP_ALIGN.CENTER) card(s,'Rule for every transition','Name what has changed: probability, urgency, action, or uncertainty.',1.6,5.15,10.1,.85,GOLD) #4 s=base('Why diagnostic reasoning matters: epidemiology and burden','EPIDEMIOLOGY');card(s,'Patient safety burden','Diagnostic error is a major preventable source of harm. Its measurement varies because definitions and detection methods differ.',.65,1.45,5.9,1.25,RED);card(s,'Where errors arise','At presentation, data acquisition, synthesis, test performance/interpretation, referral, follow-up, and communication.',6.8,1.45,5.85,1.25,TEAL);text(s,'A useful operational definition',.73,3.2,4,.28,17,NAVY,True);text(s,'Missed, delayed, or wrong diagnosis, or failure to communicate it to the patient.',.73,3.62,11.3,.38,21,INK,True) for i,(a,b) in enumerate([('Cognition','bias, knowledge, calibration'),('Data','history, exam, test limitations'),('System','handover, access, interruptions'),('Follow-up','no loop closure, no safety net')]):card(s,a,b,.75+i*3.08,4.65,2.7,1.05,[BLUE,TEAL,GOLD,RED][i]) text(s,'Teaching point: do not reduce diagnostic error to “bad thinking”. It is a property of clinician, patient, task, and system.',.73,6.28,11.8,.32,14,MUTED) #5 s=base('Pathophysiology of reasoning: dual-process cognition','PATHOPHYSIOLOGY');shape(s,.75,1.52,5.75,4.4,LBLUE,True);text(s,'SYSTEM 1',1.05,1.82,2,.35,21,BLUE,True);text(s,'Fast • pattern-based • low effort',1.05,2.32,4.7,.3,15,MUTED,True);bullets(s,[('Best use','familiar pattern, time-critical stabilization'),('Risk','misleading prototypes; availability; premature closure'),('Safeguard','ask: “What does not fit?”')],1.05,3.02,4.9,2.1,16);shape(s,6.82,1.52,5.75,4.4,CYAN,True);text(s,'SYSTEM 2',7.12,1.82,2,.35,21,TEAL,True);text(s,'Slow • analytic • effortful',7.12,2.32,4.7,.3,15,MUTED,True);bullets(s,[('Best use','novel, complex, conflicting, high-stakes cases'),('Risk','fatigue, over-analysis, delayed action'),('Safeguard','structured problem representation + thresholds')],7.12,3.02,4.9,2.1,16);text(s,'Expertise = flexible switching, not exclusive allegiance to one system.',1.1,6.42,11.1,.33,17,NAVY,True,PP_ALIGN.CENTER) #6 s=base('Clinical features that carry diagnostic information','CLINICAL FEATURES') for i,(t,b) in enumerate([('Tempo','hyperacute, acute, subacute, chronic; progression'),('Syndrome','cluster symptoms and signs before naming disease'),('Context','age, immune state, drugs, exposures, geography'),('Discriminators','findings that strongly alter probability'),('Discordance','negative or atypical data that challenge the leading label')]): x=.65+(i%3)*4.22;y=1.55+(i//3)*2.2;card(s,t,b,x,y,3.75,1.55,[TEAL,BLUE,GOLD,RED,TEAL][i]) text(s,'Do not collect data indiscriminately. Elicit data that separate plausible diagnoses.',.76,6.2,11.8,.35,19,NAVY,True,PP_ALIGN.CENTER) #7 s=base('Problem representation: turn a story into a signal','DIAGNOSIS');shape(s,.75,1.55,11.8,.76,NAVY,True);text(s,'Semantic qualifiers + syndrome + context + key discriminators',1.02,1.75,11.2,.3,20,WHITE,True,PP_ALIGN.CENTER);card(s,'Raw presentation','“Breathless, febrile, and confused since yesterday.”',.75,2.85,5.5,1.25,BLUE);card(s,'Problem representation','“A 68-year-old with COPD and CKD has acute febrile hypoxemic respiratory failure with focal crackles and hypotension.”',6.8,2.85,5.75,1.25,TEAL);text(s,'Semantic qualifiers',.78,4.75,2.4,.27,16,NAVY,True);bullets(s,[('time','acute vs chronic'),('pattern','focal vs diffuse'),('severity','stable vs shock'),('host','immunocompetent vs compromised')],.78,5.12,11.3,.9,15) #8 s=base('Generate a differential that is both broad and usable','DIAGNOSIS');text(s,'Four lenses',.75,1.5,2,.3,18,NAVY,True) for i,(t,b) in enumerate([('Anatomic','Where is the process?'),('Mechanistic','VINDICATE: vascular, infectious, neoplastic, etc.'),('Physiologic','Failure of oxygenation, perfusion, metabolism, regulation'),('Pivot points','Which feature sharply reorganizes the list?')]):card(s,t,b,.75+(i%2)*6.08,1.95+(i//2)*1.45,5.55,1.1,[BLUE,TEAL,GOLD,RED][i]) shape(s,.8,5.2,11.65,.72,LRED,True);text(s,'Always run two tracks: “most likely” AND “must-not-miss if delayed.”',1.1,5.4,11,.28,20,RED,True,PP_ALIGN.CENTER) #9 s=base('Rank diagnoses: probability × danger × actionability','DIAGNOSIS');heads=['Candidate','Prior probability','Fit with data','Consequence if missed','Next discriminator'];rows=[['Pneumonia','High','High','High','CXR, cultures if severe'],['Pulmonary embolism','Moderate','Partial','High','pretest score → D-dimer/CTPA'],['Acute heart failure','Moderate','Partial','High','JVP, BNP/POCUS'],['COPD exacerbation','High','Partial','Moderate','ABG, triggers']];xs=[.65,3.2,5.15,7.55,10.0];ws=[2.4,1.75,2.15,2.35,2.6] for j,h in enumerate(heads):shape(s,xs[j],1.55,ws[j],.56,NAVY);text(s,h,xs[j]+.06,1.68,ws[j]-.12,.2,11,WHITE,True,PP_ALIGN.CENTER) for i,row in enumerate(rows): y=2.14+i*.77 for j,v in enumerate(row):shape(s,xs[j],y,ws[j],.72,'F4F7FA' if i%2==0 else 'E9F2F8');text(s,v,xs[j]+.06,y+.16,ws[j]-.12,.34,12,INK,j==0,PP_ALIGN.CENTER) text(s,'Ranking is dynamic. New evidence should move diagnoses up, down, or off the list.',.8,5.75,11.7,.35,17,MUTED,False,PP_ALIGN.CENTER) #10 s=base('Investigations: ask a testable question before ordering','INVESTIGATIONS') for i,(q,a) in enumerate([('What diagnosis or decision is this test for?','If no explicit answer, reconsider.'),('What is the pretest probability?','Tests shift probability; they do not create it.'),('Will the result change immediate action?','Treatment, disposition, isolation, procedure, or observation.'),('What are test harms and alternatives?','Radiation, contrast, false positives, cascades, delay.')]):card(s,q,a,.75,1.5+i*1.15,11.8,.9,[TEAL,BLUE,GOLD,RED][i]) #11 s=base('Bayesian reasoning at the bedside','INVESTIGATIONS');shape(s,.75,1.55,4.0,3.85,LBLUE,True);text(s,'Core equations',1.03,1.83,3,.3,20,BLUE,True);text(s,'Pretest odds = p / (1 − p)\nPost-test odds = pretest odds × LR\nPost-test probability = odds / (1 + odds)',1.05,2.45,3.3,1.55,19,NAVY,True);shape(s,5.05,1.55,7.48,3.85,CYAN,True);text(s,'Worked example: test with LR− 0.1',5.35,1.83,5.7,.3,19,TEAL,True);text(s,'Pretest probability 40% → odds 0.67\nNegative test: 0.67 × 0.1 = 0.067\nPost-test probability ≈ 6%',5.35,2.52,5.75,1.25,20,NAVY,True);text(s,'Interpretation: a negative result meaningfully lowers probability only when the test is appropriate and performed reliably.',5.35,4.25,6.6,.45,14,MUTED);text(s,'Rule out: sensitive test with low LR−. Rule in: specific test with high LR+.',.85,6.05,11.5,.4,19,NAVY,True,PP_ALIGN.CENTER) #12 s=base('Decision thresholds: test, treat, or observe','INVESTIGATIONS');shape(s,.85,2.18,11.6,.45,'DCE7EF',True);shape(s,.85,2.18,3.8,.45,BLUE,True);shape(s,4.65,2.18,3.8,.45,GOLD,True);shape(s,8.45,2.18,4,.45,TEAL,True) for x,t,b in [(1.0,'Below test threshold','observe / seek alternative'),(5.0,'Testing zone','test to change probability'),(9.0,'Above treatment threshold','treat; test only if it changes plan')]:text(s,t,x,2.95,3.1,.3,17,NAVY,True,PP_ALIGN.CENTER);text(s,b,x,3.38,3.1,.3,13,MUTED,False,PP_ALIGN.CENTER) card(s,'Thresholds vary','Severity if missed, treatment toxicity, test performance, patient values, and resource/time constraints all move thresholds.',1.25,4.65,10.85,1.0,RED) #13 s=base('Evidence-based management begins with a diagnostic plan','EVIDENCE-BASED MANAGEMENT');bullets(s,[('Stabilize first','ABC approach, resuscitation, sepsis/ischemia/airway pathways when indicated.'),('Use guideline pathways as scaffolds','Match inclusion criteria and setting; do not apply labels blindly.'),('Treat uncertainty proportionately','Empiric therapy when delay is harmful and probability crosses treatment threshold.'),('Make de-escalation explicit','Specify what result, timepoint, or clinical trajectory will narrow/stop treatment.'),('Shared decisions','Explain trade-offs, uncertainty, feasibility, and patient priorities.')],.72,1.55,11.8,4.9,19) #14 s=base('Complications of poor reasoning and how to interrupt them','COMPLICATIONS') for i,(t,b,a) in enumerate([('Missed emergency','Explicit “can’t-miss” list and red-flag escalation.'),('Diagnostic cascade','Stop and ask whether each next test alters a decision.'),('Treatment harm','Use time-limited empiricism; review renal function, interactions, contraindications.'),('Loss to follow-up','Assign result ownership, safety-net symptoms, and a time-bound review.'),('Erosion of trust','Communicate uncertainty honestly and document the working diagnosis.')]):card(s,t,b,.72+(i%2)*6.05,1.5+(i//2)*1.52,5.55,1.18,[RED,GOLD,TEAL,BLUE,RED][i]) #15 s=base('Cognitive biases: name them to interrupt them','COMPLICATIONS');rows=[('Anchoring','first impression dominates','What alternative would I choose if I saw this data first?'),('Premature closure','stop once a label fits','What serious diagnosis remains unexcluded?'),('Confirmation bias','seek supporting data','Actively seek a disconfirming feature.'),('Availability','recent/vivid case feels common','Check base rate and setting.'),('Diagnostic momentum','inherited label persists','Rebuild the problem representation independently.')] for i,(a,b,c) in enumerate(rows): y=1.42+i*.91;shape(s,.7,y,2.45,.69,LRED,True);text(s,a,.83,y+.18,2.15,.25,15,RED,True);text(s,b,3.45,y+.16,3.3,.28,14,INK);shape(s,7.05,y,5.55,.69,LBLUE,True);text(s,c,7.28,y+.16,5.05,.3,14,NAVY) #16 s=base('Metacognition: the 60-second diagnostic time-out','COMPLICATIONS');qs=['What is the patient’s syndrome and severity?','What is the worst plausible diagnosis?','What data do not fit my leading diagnosis?','What is the next test or action most likely to change management?','Who will reassess, when, and what triggers escalation?'] for i,q in enumerate(qs):shape(s,1.2,1.35+i*.85,10.9,.62,WHITE,True,TEAL);shape(s,1.2,1.35+i*.85,.65,.62,TEAL,True);text(s,str(i+1),1.42,1.52+i*.85,.22,.18,13,WHITE,True,PP_ALIGN.CENTER);text(s,q,2.1,1.48+i*.85,9.55,.26,17,NAVY,True) #17 s=base('Exam pearls: high-yield diagnostic moves','EXAM PEARLS');pearls=[('One-liner before list','A precise problem representation makes the differential easier to rank.'),('Time course is a test','Hyperacute suggests vascular/toxic/arrhythmic processes; tempo reorganizes the differential.'),('Negative data matter','Document absent discriminators: pleuritic pain, focal deficit, rash, exposure, etc.'),('Test the leading fork','Choose the investigation that best separates the top plausible options.'),('Always ask “what if I am wrong?”','A safety net is part of diagnosis, not an afterthought.')] for i,(a,b) in enumerate(pearls):card(s,a,b,.72+(i%2)*6.05,1.45+(i//2)*1.55,5.5,1.2,[GOLD,TEAL,BLUE,RED,TEAL][i]) #18 s=base('Case discussion: acute dyspnea with hypotension','CASE DISCUSSION');shape(s,.7,1.45,12,1.15,NAVY,True);text(s,'A 68-year-old man with COPD and CKD presents with 18 hours of fever, dyspnea and confusion. BP 86/54, HR 118, RR 30, SpO₂ 88% on air, T 39.1°C. Right basal crackles.',.98,1.72,11.5,.55,17,WHITE,True,PP_ALIGN.CENTER) for i,(t,b) in enumerate([('Syndrome','septic shock + acute hypoxemic respiratory failure'),('Must not miss','severe CAP; PE; acute heart failure/MI; obstructive process'),('Immediate actions','oxygen, IV access, lactate/cultures, ECG, resuscitation, early antibiotics when indicated'),('Discriminators','CXR/POCUS, ECG/troponin, ABG, focused history/exam, pretest assessment for PE')]):card(s,t,b,.72+(i%2)*6.05,3.05+(i//2)*1.48,5.5,1.16,[RED,GOLD,TEAL,BLUE][i]) #19 s=base('Case discussion: reason aloud, then recalibrate','CASE DISCUSSION');steps=[('Initial frame','Fever + focal signs makes infection likely; shock increases urgency.'),('Do not anchor','Hypoxemia/hypotension can also occur in PE, MI, or cardiogenic edema.'),('Choose discriminators','CXR shows right lower-zone infiltrate. POCUS no RV strain; no B-lines. ECG sinus tachycardia.'),('Update and act','Severe CAP with septic shock now leads. Treat, culture, monitor response; keep PE as contingent alternative.'),('Close the loop','If shock/hypoxemia fail to improve, revisit diagnosis, source control, complications, and test assumptions.')] for i,(a,b) in enumerate(steps): y=1.37+i*.93;shape(s,.8,y,2.15,.63,[BLUE,TEAL,GOLD,RED,BLUE][i],True);text(s,a,.98,y+.16,1.8,.24,14,WHITE,True,PP_ALIGN.CENTER);text(s,b,3.25,y+.1,9.1,.4,16,INK) #20 s=base('Case discussion: learner prompts','CASE DISCUSSION');qs=[('1','Give a one-sentence problem representation.'),('2','List your top 3 diagnoses and 2 must-not-miss alternatives.'),('3','Which finding would most reduce the probability of PE?'),('4','Which test result would change disposition or treatment now?'),('5','State your reassessment trigger after initial therapy.')] for i,(n,q) in enumerate(qs):card(s,n+' '+q,'Pair-share for 60 seconds, then defend the reasoning chain.',.9,1.25+i*1.0,11.45,.72,[TEAL,BLUE,GOLD,RED,TEAL][i]) #21 s=base('Take-home framework: FRAME-TEST-REVIEW','RECAP') for i,(a,b) in enumerate([('FRAME','problem representation; severity; context'),('RANK','likely + dangerous + actionable diagnoses'),('ASK','question before every history item, exam maneuver, and test'),('MEASURE','pretest probability → likelihood ratio → post-test probability'),('ESCALATE','stabilize and treat when risk crosses threshold'),('REVIEW','time-out, safety net, result ownership, recalibration')]): x=.68+(i%3)*4.18;y=1.55+(i//3)*2.08;shape(s,x,y,3.65,1.55,[BLUE,TEAL,GOLD,RED,BLUE,TEAL][i],True);text(s,a,x+.18,y+.25,3.25,.32,18,WHITE,True,PP_ALIGN.CENTER);text(s,b,x+.23,y+.74,3.15,.45,13,WHITE,False,PP_ALIGN.CENTER) #22 s=base('References and further reading','REFERENCES');refs=['Harrison’s Principles of Internal Medicine, 22e (2025). “Brief Introduction to Clinical Reasoning.” pp. 63-64.','Symptom to Diagnosis: An Evidence-Based Guide, 4th ed. Ch. 1: A Model for Clinical Reasoning, Table 1-1.','Goldman-Cecil Medicine, International Edition. “Clinical Reasoning and Decision-Making.” p. 49.','Di Martino M, et al. Diagnostic reasoning in internal medicine: a practical reappraisal. Intern Emerg Med. 2021;16:247-255. PMCID: PMC7705414.','Yamada K, et al. Errors in clinical diagnosis: a narrative review. Diagnosis. 2023. PMCID: PMC10467407.','Use local protocols and current specialty guidelines for disease-specific diagnosis and management.'];bullets(s,[(r,'') for r in refs],.75,1.45,11.9,4.85,15);text(s,'Educational content. Not a substitute for clinical supervision, local pathways, or patient-specific decision making.',.78,6.45,11.7,.28,12,RED,True,PP_ALIGN.CENTER) for i,s in enumerate(prs.slides): if not s.notes_slide.notes_text_frame.text.strip():note(s,f'Slide {i+1}. Pause for learner reasoning. Relate the framework to a recent clinical case.') prs.save(OUT);print(OUT, len(prs.slides)) PY python "/tmp/workspace/internal-medicine-mastery/src/build_deck.py"

Running Command

python - <<'PY' p='/tmp/workspace/internal-medicine-mastery/src/build_deck.py' s=open(p).read();s=s.replace('for i,(t,b,a) in enumerate([\'(Missed emergency\'', 'for i,(t,b) in enumerate([\'(Missed emergency\'') if False else s # Exact logical repair based on targeted source string s=s.replace('for i,(t,b,a) in enumerate([', 'for i,(t,b) in enumerate([') open(p,'w').write(s) PY python "/tmp/workspace/internal-medicine-mastery/src/build_deck.py" && ls -lh "/tmp/workspace/internal-medicine-mastery/output/Clinical_Reasoning_and_Diagnostic_Frameworks.pptx"

Running Command

python - <<'PY' from pptx import Presentation p='/tmp/workspace/internal-medicine-mastery/output/Clinical_Reasoning_and_Diagnostic_Frameworks.pptx' prs=Presentation(p) print('slides=',len(prs.slides)) for i,s in enumerate(prs.slides,1): txt=' | '.join(sh.text.replace('\n',' / ') for sh in s.shapes if getattr(sh,'has_text_frame',False) and sh.text.strip()) print(f'{i:02d}: {txt[:180]}') assert len(prs.slides)==22 assert all(any(getattr(sh,'has_text_frame',False) and sh.text.strip() for sh in s.shapes) for s in prs.slides) print('VALID') PY

Created a 22-slide postgraduate teaching deck for the Internal Medicine Mastery Course.
It includes:
  • Epidemiology and diagnostic-error burden
  • Dual-process clinical reasoning
  • Problem representation and differential frameworks
  • Diagnostic test selection, Bayes reasoning, and decision thresholds
  • Evidence-based management under uncertainty
  • Cognitive bias mitigation and diagnostic time-outs
  • Exam pearls
  • Interactive acute dyspnea/septic shock case discussion
  • References and speaker-ready notes

Clinical Reasoning and Diagnostic Frameworks

Presentation · PPTX

create a ppt for postgraduate internal medicine students for history taking make it detailed

Reading File
Reading File
Finding Sources
Finding Sources
Searching the Web

history taking postgraduate internal medicine patient interview clinical guidelines communication

Searching PubMed

medical history taking communication

Reading File
Reading File
Reading File
Browsing Directory

~/

Running Command

mkdir -p "/tmp/workspace/history-taking-medicine/src" "/tmp/workspace/history-taking-medicine/output" && python - <<'PY' from pathlib import Path src=Path('/tmp/workspace/internal-medicine-mastery/src/build_deck.py').read_text() # Cannot easily repurpose. Create standalone script from compact builder. PY cat > "/tmp/workspace/history-taking-medicine/src/build_history_deck.py" <<'PY' 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 pathlib import Path OUT=Path('/tmp/workspace/history-taking-medicine/output/History_Taking_for_Postgraduate_Internal_Medicine.pptx') prs=Presentation();prs.slide_width=Inches(13.333);prs.slide_height=Inches(7.5);blank=prs.slide_layouts[6] N='0B1F33';B='146C94';T='087E8B';G='F0B747';R='C94C4C';W='FFFFFF';I='17212B';M='536471';P='F4F7FA';LB='E9F2F8';LT='DFF5F3';LR='FCEBEC' def c(x):return RGBColor.from_string(x) def box(s,x,y,w,h,f,round=False,line=None): q=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if round else MSO_SHAPE.RECTANGLE,Inches(x),Inches(y),Inches(w),Inches(h));q.fill.solid();q.fill.fore_color.rgb=c(f);q.line.color.rgb=c(line or f) if round:q.adjustments[0]=.12 return q def tx(s,t,x,y,w,h,sz=18,col=I,bold=False,align=None): q=s.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h));f=q.text_frame;f.clear();f.word_wrap=True;f.margin_left=f.margin_right=Inches(.07);f.margin_top=f.margin_bottom=Inches(.04);f.vertical_anchor=MSO_ANCHOR.MIDDLE for j,line in enumerate(t.split('\n')): p=f.paragraphs[0] if j==0 else f.add_paragraph();p.text=line;p.font.name='Aptos';p.font.size=Pt(sz);p.font.bold=bold;p.font.color.rgb=c(col);p.space_after=Pt(2) if align:p.alignment=align return q def card(s,title,body,x,y,w,h,accent=T): box(s,x,y,w,h,P,True);box(s,x,y,.08,h,accent);tx(s,title,x+.22,y+.14,w-.37,.28,15,N,True);tx(s,body,x+.22,y+.51,w-.42,h-.58,12,M) def bullets(s,items,x,y,w,h,sz=17): q=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h));f=q.text_frame;f.clear();f.word_wrap=True;f.margin_left=Inches(.04);f.margin_right=Inches(.03) for j,(a,b) in enumerate(items): p=f.paragraphs[0] if j==0 else f.add_paragraph();p.text='• '+a+(' — '+b if b else '');p.font.name='Aptos';p.font.size=Pt(sz);p.font.color.rgb=c(I);p.space_after=Pt(9) def base(title,sec='HISTORY TAKING'): s=prs.slides.add_slide(blank);box(s,0,0,13.333,7.5,W);box(s,0,0,13.333,.16,T);tx(s,sec,.55,.31,4,.24,10,T,True);tx(s,title,.55,.58,12,.6,28,N,True);tx(s,'INTERNAL MEDICINE MASTERY COURSE',.55,7.08,4.7,.15,8,M,True);tx(s,str(len(prs.slides)),12.25,7.04,.45,.2,9,M,True,PP_ALIGN.RIGHT);return s def note(s,t):s.notes_slide.notes_text_frame.text=t # 1 title s=prs.slides.add_slide(blank);box(s,0,0,13.333,7.5,N);box(s,0,0,13.333,.22,T);box(s,.72,1.1,.12,4.9,G);tx(s,'History taking\nfor internal medicine',1.08,1.25,10.4,1.55,35,W,True);tx(s,'A detailed postgraduate framework for diagnostic, person-centred interviews',1.1,3.14,10,.42,18,'D5E4EF'); for i,(a,b) in enumerate([('01','Connect'),('02','Elicit'),('03','Interpret'),('04','Close')]): x=1.1+i*2.83;box(s,x,4.32,2.32,1.05,'163A57',True);tx(s,a,x+.18,4.48,.4,.2,12,G,True);tx(s,b,x+.18,4.74,1.8,.25,16,W,True) tx(s,'Postgraduate Internal Medicine',1.1,6.5,4,.25,13,'B8CFDF');note(s,'History is an active diagnostic test and a therapeutic intervention. The goal is not a checklist recital but a coherent account of illness in context.') #2 s=base('Learning outcomes','ORIENT');bullets(s,[('Establish a safe opening','Use identity, consent, confidentiality, agenda, and patient narrative.'),('Elicit a diagnostic story','Characterize symptoms in sequence, with discriminators and red flags.'),('Integrate context','Medication, psychosocial, exposure, functional, and goals-of-care data.'),('Communicate effectively','Use open to focused questions, active listening, summaries, and empathy.'),('Document and hand over','Produce a problem representation that drives examination and investigations.')],.72,1.5,11.8,5,20) #3 s=base('Why history taking remains central','FOUNDATIONS');card(s,'Diagnostic value','History shapes the problem representation, prioritizes hypotheses, and selects the right physical examination and tests.',.72,1.45,5.75,1.3,B);card(s,'Therapeutic value','A respectful conversation builds trust, uncovers concerns, improves shared decisions, and supports adherence.',6.85,1.45,5.75,1.3,T) for i,(a,b) in enumerate([('Content','facts, chronology, symptoms, exposures'),('Meaning','ideas, concerns, expectations, impact'),('Context','family, occupation, culture, access, risk'),('Signals','emotion, silence, language, non-verbal behaviour')]):card(s,a,b,.75+(i%2)*6.05,3.25+(i//2)*1.4,5.5,1.05,[G,T,B,R][i]) #4 s=base('The consultation architecture','FOUNDATIONS');steps=[('Prepare','review only what is needed; privacy; interpreter'),('Open','introduce, confirm identity, consent, agenda'),('Listen','opening question and uninterrupted narrative'),('Explore','focused symptom and contextual inquiry'),('Explain','summarize, share reasoning, negotiate plan'),('Close','safety net, next steps, documentation')] for i,(a,b) in enumerate(steps): x=.57+(i%3)*4.24;y=1.55+(i//3)*2.18;box(s,x,y,3.7,1.55,[B,T,G,R,B,T][i],True);tx(s,str(i+1),x+.2,y+.18,.3,.22,12,W,True);tx(s,a,x+.55,y+.2,2.8,.28,18,W,True);tx(s,b,x+.23,y+.75,3.2,.38,13,W,False,PP_ALIGN.CENTER) #5 s=base('Before the first question: prepare the environment','FOUNDATIONS');bullets(s,[('Clinical preparation','Review referral, observations, previous records, and immediate instability without scripting the diagnosis.'),('Physical setting','Privacy, seating at eye level, minimal interruptions, appropriate chaperone, patient comfort.'),('Communication access','Check language, hearing, vision, cognitive barriers; use a trained interpreter rather than family for sensitive content.'),('Psychological safety','State confidentiality and its limits; signal respect and non-judgement.'),('Time discipline','Set an agenda and return to unmet concerns rather than interrupting prematurely.')],.73,1.45,11.8,5.3,18) #6 s=base('Open well: the first two minutes','OPENING');box(s,.75,1.42,12,1.0,N,True);tx(s,'“Hello, I am Dr ___. I would like to understand what has been happening from your perspective. Is this a good time to talk?”',1.04,1.72,11.4,.32,18,W,True,PP_ALIGN.CENTER) for i,(a,b) in enumerate([('Identify','name, role, patient-preferred name/pronouns'),('Permission','consent, privacy, confidentiality, companion preference'),('Agenda','“What are the main things you want us to cover today?”'),('Opening prompt','“Tell me what brought you in.”')]):card(s,a,b,.75+(i%2)*6.05,3.05+(i//2)*1.4,5.55,1.05,[T,B,G,R][i]) tx(s,'Avoid starting with a narrow biomedical question before the patient has described their concern.',.9,6.15,11.4,.3,16,R,True,PP_ALIGN.CENTER) #7 s=base('Open questions, facilitation, and active listening','COMMUNICATION');box(s,.8,1.43,3.7,4.7,LB,True);tx(s,'OPEN',1.1,1.75,2,.3,21,B,True);bullets(s,[('O','open question'),('P','pause'),('E','echo patient words'),('N','non-verbal encouragers')],1.1,2.35,2.8,2.1,17);tx(s,'“Go on.”\n“Tell me more.”\n“What happened next?”',1.1,4.95,2.8,.65,16,N,True,PP_ALIGN.CENTER) box(s,4.82,1.43,7.7,4.7,LT,True);tx(s,'Skills that increase yield',5.15,1.75,4,.3,21,T,True);bullets(s,[('Silence','gives space for recall and emotion.'),('Reflection','“That sounds frightening.”'),('Clarification','“When you say dizzy, do you mean spinning or faint?”'),('Summarization','organizes data and permits correction.'),('Signposting','“I will ask some focused questions now, then return to your concerns.”')],5.15,2.35,6.6,2.9,16) #8 s=base('The presenting complaint: create a chronological narrative','HISTORY OF PRESENTING ILLNESS');tx(s,'Start broad → establish timeline → identify discriminators → quantify impact → test key hypotheses',.75,1.43,11.8,.35,20,N,True,PP_ALIGN.CENTER) for i,(a,b) in enumerate([('Onset','when, setting, abrupt vs gradual, first symptom'),('Course','constant/intermittent; progression; prior episodes'),('Character','patient words first, then clarify quality'),('Triggers','exertion, position, meals, medications, exposures'),('Associated features','positive and key negative discriminators'),('Impact','function, sleep, work, self-care, caregiver burden')]): x=.68+(i%3)*4.2;y=2.15+(i//3)*1.72;card(s,a,b,x,y,3.68,1.28,[B,T,G,R,B,T][i]) #9 s=base('Symptom analysis: use frameworks flexibly','HISTORY OF PRESENTING ILLNESS');card(s,'OPQRST / SOCRATES','Onset, provocation/palliation, quality, region/radiation, severity, timing. Helpful prompts, not a substitute for chronology.',.75,1.42,5.65,1.15,B);card(s,'Key distinction','Do not force every symptom into a pain framework. Breathlessness, weakness, dizziness, fatigue, and confusion need syndrome-specific descriptors.',6.87,1.42,5.65,1.15,T) heads=['Symptom','High-yield clarification'];data=[('Dyspnea','rest vs exertion, orthopnea, PND, wheeze, pleuritic pain, onset'),('Dizziness','vertigo vs presyncope vs imbalance; position; focal deficits'),('Weakness','true power loss vs fatigue; distribution; fluctuation; bulbar symptoms'),('Fever','measured temperature, rigors, source, travel/exposure, immune status')] for j,h in enumerate(heads):box(s,[.8,3.25][j],3.0,[2.2,9.2][j],.55,N);tx(s,h,[.8,3.25][j]+.1,3.15,[2.0,8.9][j],.2,12,W,True) for i,(a,b) in enumerate(data): y=3.56+i*.63 box(s,.8,y,2.2,.58,LB);tx(s,a,.9,y+.14,2,.2,13,N,True);box(s,3.25,y,9.2,.58,P);tx(s,b,3.4,y+.14,8.8,.2,13,I) #10 s=base('Use discriminating questions, not exhaustive questioning','HISTORY OF PRESENTING ILLNESS');card(s,'Purpose','Every focused question should either identify danger, distinguish top diagnoses, assess severity, or change management.',.75,1.45,11.75,1.0,G) for i,(a,b) in enumerate([('Chest pain','exertional trigger, radiation, pleuritic/positional component, associated syncope/diaphoresis'),('GI bleed','melena/hematemesis, NSAID/anticoagulant use, liver disease, presyncope'),('AKI','volume loss, obstruction symptoms, nephrotoxins, systemic disease clues'),('Delirium','baseline cognition, time course, medication change, infection, pain, withdrawal')]):card(s,a,b,.75+(i%2)*6.05,3.0+(i//2)*1.38,5.5,1.05,[R,B,T,G][i]) #11 s=base('Past history: turn a list into clinical context','PAST HISTORY');bullets(s,[('Medical diagnoses','onset, severity, complications, control, prior investigations, admissions, current specialist care.'),('Surgery and procedures','indication, complications, implants/devices, transfusions, anaesthetic events.'),('Previous admissions','what happened, discharge diagnoses, unresolved issues, readmission risks.'),('Mental health','depression, anxiety, psychosis, trauma, self-harm risk when relevant.'),('Preventive care','vaccines, screening, reproductive history when relevant, baseline function and frailty.')],.72,1.45,11.8,5.2,18) #12 s=base('Medication history: a medication reconciliation interview','MEDICATIONS & ALLERGIES');box(s,.75,1.45,11.8,.85,N,True);tx(s,'Ask the patient to show medicines or use pharmacy records when possible. “What do you actually take in a typical week?”',1.0,1.68,11.25,.3,17,W,True,PP_ALIGN.CENTER) for i,(a,b) in enumerate([('Prescribed','name, dose, route, frequency, indication, prescriber'),('OTC and supplements','NSAIDs, herbals, vitamins, traditional medicines, recreational drugs'),('Adherence','missed doses, cost, side effects, understanding, access'),('Recent change','new drug, stopped drug, dose change, duplication, interactions'),('Allergy label','agent, phenotype, timing, severity, treatment, tolerance of related agents')]):card(s,a,b,.72+(i%2)*6.05,2.85+(i//2)*1.2,5.52,.92,[B,T,G,R,B][i]) #13 s=base('Social history is diagnostic data','SOCIAL & EXPOSURE HISTORY');for i,(a,b) in enumerate([('Living and support','home layout, caregiver, safeguarding, food security, health literacy'),('Occupation and environment','dust, fumes, animals, shift work, workplace exposures'),('Substances','tobacco pack-years, vaping, alcohol quantity/withdrawal risk, drugs, injection practices'),('Travel and contacts','destinations, dates, food/water, vectors, TB/COVID contacts, healthcare exposure'),('Sexual health','partners, practices, protection, STI history, pregnancy potential when relevant'),('Function and frailty','ADLs/IADLs, mobility, falls, exercise tolerance, cognition, baseline')]): x=.68+(i%3)*4.2;y=1.45+(i//3)*2.08;card(s,a,b,x,y,3.68,1.55,[T,B,G,R,T,B][i]) #14 s=base('Family history and inherited risk','FAMILY HISTORY');bullets(s,[('Ask targeted questions','premature cardiovascular disease, sudden death, diabetes, cancer, thromboembolism, autoimmune disease, renal disease, neurological illness.'),('Build a mini-pedigree when relevant','relationship, age at diagnosis/death, lineage, phenotype, known genetic result.'),('Recognize red flags','multiple affected relatives, early onset, bilateral/multifocal disease, unusual phenotype, consanguinity.'),('Use information ethically','obtain consent before contacting relatives or pursuing family data; consider genetic counselling.'),('Interpret proportionately','family history modifies prior probability but does not establish diagnosis.')],.72,1.5,11.8,5.2,18) #15 s=base('Review of systems: a safety net, not a substitute for reasoning','REVIEW OF SYSTEMS');card(s,'Use it after the narrative','A targeted review detects missed multisystem features and red flags. Avoid a rapid, decontextualized checklist that creates noise.',.75,1.43,11.75,1.0,T) for i,(a,b) in enumerate([('Constitutional','fever, weight loss, night sweats, fatigue'),('Cardiorespiratory','chest pain, palpitations, syncope, edema, cough'),('GI/GU','bowel change, bleed, urinary symptoms, retention'),('Neurologic','headache, seizure, focal deficit, vision, gait'),('Endocrine/rheum','heat/cold intolerance, rash, joints, sicca'),('Psychiatric','mood, sleep, cognition, safety, substance use')]): x=.7+(i%3)*4.18;y=2.8+(i//3)*1.55;card(s,a,b,x,y,3.63,1.12,[B,T,G,R,B,T][i]) #16 s=base('Sensitive topics: ask respectfully and directly','COMMUNICATION');bullets(s,[('Normalize and explain','“I ask all patients these questions because they can affect health.”'),('Ensure privacy','speak without family or partner present when discussing violence, sexual health, substance use, or safety.'),('Use inclusive language','ask about partners, practices, and pronouns without assumptions.'),('Ask directly about safety','self-harm, suicidal thoughts, domestic violence, neglect, and immediate danger as clinically indicated.'),('Respond to disclosure','thank the patient, validate, assess immediate risk, explain limits of confidentiality, follow local safeguarding pathways.')],.72,1.45,11.8,5.25,18) #17 s=base('Interviewing when communication is difficult','SPECIAL SITUATIONS');items=[('Acute illness','stabilize first; use brief focused questions; obtain collateral and records.'),('Delirium/cognitive impairment','establish baseline from collateral; assess capacity task-by-task; use simple, one-at-a-time questions.'),('Hearing/vision impairment','reduce noise, face patient, use aids/large print; do not shout.'),('Interpreter-mediated interview','speak to the patient, short sentences, first person, pause often, avoid jargon.'),('Emotion, anger, or mistrust','name emotion, avoid defensiveness, set boundaries, return to shared goals.'),('Teleconsultation','verify identity/location, privacy, emergency contact, technology, and a contingency plan.')] for i,(a,b) in enumerate(items): x=.67+(i%3)*4.22;y=1.48+(i//3)*2.08;card(s,a,b,x,y,3.7,1.55,[R,B,T,G,R,B][i]) #18 s=base('Common failure modes and repairs','QUALITY & SAFETY');rows=[('Interrupting early','wait; use facilitation and a deliberate pause'),('Leading questions','replace “You had fever?” with “Did you measure a temperature?”'),('Jargon and stacked questions','use plain language; one question at a time'),('Ignoring emotion','name it: “This sounds worrying.”'),('Premature diagnostic closure','ask “What does not fit?” and elicit alternatives'),('No safety net','give specific symptom, time, and access instructions')] for i,(a,b) in enumerate(rows): y=1.35+i*.78;box(s,.8,y,3.2,.58,LR,True);tx(s,a,.98,y+.14,2.8,.2,14,R,True);box(s,4.28,y,8.15,.58,LB,True);tx(s,b,4.5,y+.14,7.7,.2,14,N) #19 s=base('Closing the interview: summary, plan, safety net','CLOSING');for i,(a,b) in enumerate([('Summarize','“Let me check I have understood...” Include timeline, key positives, key negatives, and impact.'),('Check accuracy','“What have I missed or misunderstood?”'),('Explain next steps','what happens now, likely tests/exam, uncertainty, who will review.'),('Safety net','symptoms requiring urgent help, expected time course, contact route, follow-up date.'),('Document','problem representation, differential, red flags considered, collateral, capacity/consent issues.')]):card(s,a,b,.75+(i%2)*6.05,1.45+(i//2)*1.55,5.5,1.17,[T,B,G,R,T][i]) #20 s=base('From history to problem representation','SYNTHESIS');box(s,.7,1.42,12,1.05,N,True);tx(s,'One-liner = patient + context + time course + syndrome + discriminating features + severity',1.0,1.77,11.35,.3,19,W,True,PP_ALIGN.CENTER);card(s,'Unstructured','“Shortness of breath for two days.”',.75,3.05,5.6,1.1,R);card(s,'High-information','“A 68-year-old with COPD and CKD has 18 hours of acute febrile hypoxemic dyspnea, pleuritic pain, focal crackles, and hypotension.”',6.85,3.05,5.7,1.1,T);bullets(s,[('Why it matters','it drives focused examination, ranks the differential, and makes handover safer.'),('Avoid','copying a chronology without interpretation, labels without evidence, or omitted key negatives.')],.85,4.8,11.4,1.2,17) #21 s=base('Case discussion: unintentional weight loss','CASE DISCUSSION');box(s,.72,1.35,12,1.18,N,True);tx(s,'A 59-year-old man reports 8 kg weight loss in 3 months, fatigue and reduced appetite. He has type 2 diabetes and “takes tablets sometimes.”',1.0,1.68,11.35,.48,18,W,True,PP_ALIGN.CENTER) for i,(a,b) in enumerate([('Open','What would your first question be?'),('Narrative','What chronology, constitutional, GI, endocrine, mood, and exposure data are needed?'),('Medication','Could treatment, non-adherence, or adverse effects explain part of the syndrome?'),('Context','Ask about food insecurity, alcohol, tobacco, depression, and function.'),('Synthesis','Give a one-line representation and rank malignant, metabolic, infectious, psychiatric, and GI causes.')]):card(s,a,b,.78+(i%2)*6.0,2.9+(i//2)*1.05,5.47,.8,[T,B,G,R,T][i]) #22 s=base('Role-play worksheet: assessment rubric','SKILLS PRACTICE');heads=['Domain','Observable behaviour'];rows=[('Opening','identity, consent, agenda, privacy, appropriate opening prompt'),('Listening','does not interrupt; facilitates narrative; attends to verbal/non-verbal cues'),('Structure','logical chronology; discriminators; relevant past, medication, social history'),('Human factors','empathy, plain language, inclusive non-judgemental practice'),('Synthesis','accurate summary, problem representation, safety net and documentation')] for j,h in enumerate(heads):box(s,[.8,3.25][j],1.45,[2.25,9.15][j],.55,N);tx(s,h,[.8,3.25][j]+.1,1.58,[2,8.8][j],.2,12,W,True) for i,(a,b) in enumerate(rows): y=2.05+i*.78;box(s,.8,y,2.25,.7,LB);tx(s,a,.95,y+.18,1.95,.25,14,N,True);box(s,3.25,y,9.15,.7,P);tx(s,b,3.42,y+.15,8.75,.3,14,I) #23 s=base('Exam pearls','EXAM PEARLS');pearls=[('Narrative first','Start open and let the story unfold before focused questions.'),('Patient words matter','Clarify what “dizzy,” “weak,” “allergy,” or “non-compliant” means.'),('Time course is diagnostic','Onset, tempo, triggers and progression often discriminate better than long symptom lists.'),('Function is a vital sign','Baseline ADLs, cognition, mobility, and social supports change management.'),('Medication reconciliation is history taking','A current list is not proof of actual use.'),('Close every interview','summary + uncertainty + safety net + ownership of follow-up.')] for i,(a,b) in enumerate(pearls): x=.68+(i%3)*4.2;y=1.45+(i//3)*2.15;box(s,x,y,3.66,1.62,[B,T,G,R,B,T][i],True);tx(s,a,x+.2,y+.22,3.25,.3,17,W,True,PP_ALIGN.CENTER);tx(s,b,x+.25,y+.78,3.15,.48,13,W,False,PP_ALIGN.CENTER) #24 s=base('References and further reading','REFERENCES');refs=['Sleisenger and Fordtran’s Gastrointestinal and Liver Disease. “History Taking.” pp. 104-105.','Bailey & Love’s Short Practice of Surgery, 28th ed. Summary box 35.1: Taking a history, p. 494.','Nichol JR, Sundjaja JH, Nelson G. Medical History. StatPearls. Updated 2024.','Davis F, et al. Interview Techniques. StatPearls. NCBI Bookshelf.','Hossain S, et al. Challenging history taking encounters: a systematic review, meta-analysis and phenomenological framework. BMJ Open. 2026. PMID: 41974542.','Use local confidentiality, safeguarding, consent, interpreter, and documentation policies.'] bullets(s,[(x,'') for x in refs],.75,1.45,11.9,4.8,15);tx(s,'Educational material. Use clinical judgment and local protocols for individual patients.',.8,6.45,11.7,.25,12,R,True,PP_ALIGN.CENTER) for i,s in enumerate(prs.slides): if not s.notes_slide.notes_text_frame.text.strip():note(s,f'Slide {i+1}: Invite learners to apply the structure to a recent patient. Pause after key questions and ask what information would change their diagnostic thinking.') prs.save(OUT);print(OUT, len(prs.slides)) PY python "/tmp/workspace/history-taking-medicine/src/build_history_deck.py" && ls -lh "/tmp/workspace/history-taking-medicine/output/History_Taking_for_Postgraduate_Internal_Medicine.pptx"

Searching Content

";for " in ~/history-taking-medicine/src

Reading File
Editing File

~/history-taking-medicine/src/build_history_deck.py

Successfully replaced 1 instance(s) of the string in '/tmp/workspace/history-taking-medicine/src/build_history_deck.py'
Editing File

~/history-taking-medicine/src/build_history_deck.py

Successfully replaced 1 instance(s) of the string in '/tmp/workspace/history-taking-medicine/src/build_history_deck.py'
Running Command

python "/tmp/workspace/history-taking-medicine/src/build_history_deck.py" && ls -lh "/tmp/workspace/history-taking-medicine/output/History_Taking_for_Postgraduate_Internal_Medicine.pptx"

Running Command

python - <<'PY' from pptx import Presentation p='/tmp/workspace/history-taking-medicine/output/History_Taking_for_Postgraduate_Internal_Medicine.pptx' prs=Presentation(p) print('slides',len(prs.slides)) for i,s in enumerate(prs.slides,1): t=' | '.join(x.text.replace('\n',' / ') for x in s.shapes if getattr(x,'has_text_frame',False) and x.text.strip()) print(f'{i:02d}: {t[:145]}') assert t.strip(), f'empty slide {i}' print('notes',sum(bool(s.notes_slide.notes_text_frame.text.strip()) for s in prs.slides)) assert len(prs.slides)==24 print('VALID') PY

Created a detailed 24-slide PowerPoint for postgraduate internal medicine students on History Taking.
Included topics:
  • Consultation structure and patient-centred interviewing
  • Opening the encounter, agenda setting, active listening, and empathy
  • History of presenting illness and symptom frameworks
  • Discriminating questions and red-flag assessment
  • Past, medication, allergy, social, exposure, and family histories
  • Review of systems, sensitive topics, and difficult communication scenarios
  • Medication reconciliation and functional assessment
  • Common interview errors and corrective strategies
  • Closing, safety-netting, documentation, and problem representation
  • Case discussion, role-play assessment rubric, exam pearls, and references

History Taking for Postgraduate Internal Medicine

Presentation · PPTX

This is a shared conversation. Sign in to Orris to start your own chat.