Create a ppt about contact disorder refer from kaplan and sadocks synopsis of psychiatry
contact disorder psychiatry Kaplan Sadock synopsis contact disorder term
"conduct disorder" AND treatment
~/
mkdir -p "/tmp/workspace/conduct-disorder-ppt/src" "/tmp/workspace/conduct-disorder-ppt/output" && python -c "import pptx; print('python-pptx ready')"
python - <<'PY' from pathlib import Path p=Path('/tmp/workspace/conduct-disorder-ppt/src/create_conduct_disorder_ppt.py') p.write_text(r'''from pptx import Presentation from pptx.util import Inches, Pt from pptx.dml.color import RGBColor from pptx.enum.text import PP_ALIGN, MSO_ANCHOR from pptx.enum.shapes import MSO_SHAPE from pptx.enum.dml import MSO_THEME_COLOR OUT='/tmp/workspace/conduct-disorder-ppt/output/Conduct_Disorder_Kaplan_Sadock.pptx' prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5) blank=prs.slide_layouts[6] # palette NAVY=RGBColor(18,43,70); TEAL=RGBColor(18,122,125); SKY=RGBColor(216,238,241); CREAM=RGBColor(248,246,241) INK=RGBColor(31,45,58); MUTED=RGBColor(86,103,116); WHITE=RGBColor(255,255,255); ORANGE=RGBColor(229,133,57); RED=RGBColor(183,63,54); GREEN=RGBColor(57,137,103) def rect(sl,x,y,w,h,color, radius=False, line=None): shp=sl.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if radius else MSO_SHAPE.RECTANGLE, Inches(x), Inches(y), Inches(w), Inches(h)) shp.fill.solid(); shp.fill.fore_color.rgb=color shp.line.color.rgb=line or color if radius: shp.adjustments[0]=0.10 return shp def text(sl,txt,x,y,w,h,size=20,color=INK,bold=False,align=PP_ALIGN.LEFT,font='Aptos',val=MSO_ANCHOR.TOP): box=sl.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h)); tf=box.text_frame tf.clear(); tf.word_wrap=True; tf.margin_left=0; tf.margin_right=0; tf.margin_top=0; tf.margin_bottom=0; tf.vertical_anchor=val for i,line in enumerate(txt.split('\n')): p=tf.paragraphs[0] if i==0 else tf.add_paragraph(); p.text=line; p.alignment=align; p.space_after=Pt(4) for r in p.runs: r.font.name=font; r.font.size=Pt(size); r.font.bold=bold; r.font.color.rgb=color return box def bulletbox(sl,items,x,y,w,h,size=18,color=INK,accent=TEAL): box=sl.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h)); tf=box.text_frame; tf.clear(); tf.word_wrap=True tf.margin_left=Inches(.06); tf.margin_right=Inches(.04); tf.margin_top=Inches(.04) 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._p.get_or_add_pPr().insert(0, p._p._new_buChar('•')) return box def header(sl,num,title,kicker='CHILD & ADOLESCENT PSYCHIATRY'): rect(sl,0,0,13.333,.2,TEAL); text(sl,kicker,.65,.38,8.7,.25,10,TEAL,True); text(sl,title,.65,.72,11.8,.65,27,NAVY,True) text(sl,f'{num:02d}',12.15,.48,.52,.32,13,TEAL,True,PP_ALIGN.RIGHT) rect(sl,.65,1.48,1.1,.05,ORANGE) def footer(sl,source='Kaplan & Sadock’s Synopsis of Psychiatry, 12e, Conduct Disorder, pp. 608-612.'): rect(sl,.65,7.08,12.02,.012,RGBColor(204,215,220)); text(sl,source,.65,7.17,10.6,.16,8,MUTED); text(sl,'Educational use',11.2,7.17,1.45,.16,8,MUTED,False,PP_ALIGN.RIGHT) def add_notes(sl, lines): tf=sl.notes_slide.notes_text_frame tf.text='Speaker notes\n'+'\n'.join(lines) # title s=prs.slides.add_slide(blank); rect(s,0,0,13.333,7.5,NAVY); rect(s,0,0,4.1,7.5,TEAL) # stylized behavior pathway for x,y,r,c in [(1.0,1.15,.72,SKY),(2.02,2.08,.55,ORANGE),(1.18,3.1,.8,WHITE),(2.35,4.18,.42,SKY),(1.04,5.35,.58,ORANGE)]: sh=s.shapes.add_shape(MSO_SHAPE.OVAL, Inches(x), Inches(y), Inches(r), Inches(r)); sh.fill.solid(); sh.fill.fore_color.rgb=c; sh.line.color.rgb=c text(s,'CONDUCT\nDISORDER',4.75,1.38,7.7,1.55,39,WHITE,True); text(s,'Recognition, assessment and management',4.78,3.14,6.6,.4,19,SKY) rect(s,4.78,3.82,2.0,.07,ORANGE); text(s,'Based primarily on Kaplan & Sadock’s\nSynopsis of Psychiatry, 12th edition',4.78,4.22,5.5,.8,16,WHITE) text(s,'Child & Adolescent Psychiatry',4.78,6.73,4,.22,11,SKY,True) add_notes(s,['This presentation uses “conduct disorder,” not “contact disorder.”','Emphasize that diagnosis requires a persistent pattern and functional impairment.']) # 2 overview s=prs.slides.add_slide(blank); header(s,2,'What is conduct disorder?'); text(s,'A persistent pattern of behavior that violates the rights of others and major age-appropriate social norms.',.78,1.83,7.1,.85,24,INK,True) rect(s,8.35,1.78,3.8,3.8,SKY,True); text(s,'CD is not\na single act\nof misconduct.',8.78,2.43,3.0,1.25,25,NAVY,True,PP_ALIGN.CENTER); text(s,'Look for repetition, persistence\nand clinically significant impact.',8.75,4.05,3.05,.6,14,MUTED,False,PP_ALIGN.CENTER) bulletbox(s,['Often presents with aggression and violation of others’ rights.','Problems evolve over time rather than appearing overnight.','School functioning and peer relationships are commonly affected.'],.8,3.15,6.8,2.6,18); footer(s); add_notes(s,['Kaplan and Sadock describe an enduring set of behaviors, usually characterized by aggression and violation of rights.']) # 3 categories s=prs.slides.add_slide(blank); header(s,3,'The four behavioral domains'); cards=[('1','Aggression','Threats, fights, cruelty, weapons, robbery or forced sexual activity',RED),('2','Property destruction','Fire setting or deliberate destruction of property',ORANGE),('3','Deceit or theft','Breaking in, lying for gain, theft without confrontation',TEAL),('4','Serious rule violations','Staying out, running away, or truancy before age 13',NAVY)] for i,(n,t,d,c) in enumerate(cards): x=.75+(i%2)*6.15; y=1.85+(i//2)*2.35; rect(s,x,y,5.65,1.78,CREAM,True,RGBColor(225,229,229)); rect(s,x,y,.78,1.78,c,True); text(s,n,x+.19,y+.58,.35,.35,21,WHITE,True,PP_ALIGN.CENTER); text(s,t,x+1.03,y+.33,4.25,.34,19,NAVY,True); text(s,d,x+1.03,y+.84,4.2,.64,14,MUTED) footer(s); add_notes(s,['These four categories organize the 15 DSM-5 symptom criteria.']) #4 diagnostic s=prs.slides.add_slide(blank); header(s,4,'DSM-5 diagnostic framework'); rect(s,.75,1.8,4.0,3.95,NAVY,True); text(s,'3',1.1,2.05,1.0,.8,48,WHITE,True); text(s,'or more symptoms\nfrom 15 criteria',2.05,2.28,2.2,.7,18,WHITE,True); rect(s,1.1,3.34,3.25,.02,SKY); text(s,'in the past 12 months',1.1,3.58,3.05,.3,17,SKY,True); text(s,'with at least 1 symptom\nin the past 6 months',1.1,4.25,3.05,.58,17,WHITE) text(s,'Plus:',5.35,1.95,1.2,.35,19,TEAL,True); bulletbox(s,['The disturbance causes clinically significant impairment in social, academic, or occupational functioning.','For persons age 18 years or older, criteria for antisocial personality disorder must not be met.','Evaluate developmental context and corroborate history across home, school and community.'],5.35,2.45,6.75,2.55,18); text(s,'Clinical reminder | Symptoms must be persistent, not isolated or developmentally expected behavior.',5.35,5.45,6.65,.55,14,NAVY,True); footer(s); add_notes(s,['The symptom threshold and timing come from the DSM-5 table in Kaplan and Sadock.']) #5 specifiers s=prs.slides.add_slide(blank); header(s,5,'Course and severity specifiers'); text(s,'Age at onset',.8,1.82,2.3,.35,19,TEAL,True) for x,t,d,c in [(0.8,'Childhood-onset','At least one symptom before age 10',RED),(4.38,'Adolescent-onset','No symptoms before age 10',ORANGE),(7.96,'Unspecified','Age at onset is unknown',TEAL)]: rect(s,x,2.3,3.1,1.55,CREAM,True,RGBColor(225,229,229)); rect(s,x,2.3,3.1,.14,c); text(s,t,x+.24,2.68,2.65,.3,17,NAVY,True); text(s,d,x+.24,3.17,2.62,.35,14,MUTED) text(s,'Severity',.8,4.35,1.5,.35,19,TEAL,True) for x,t,d,c in [(0.8,'Mild','Few extra symptoms; minor harm',GREEN),(4.38,'Moderate','Intermediate number and impact',ORANGE),(7.96,'Severe','Many symptoms or considerable harm',RED)]: rect(s,x,4.82,3.1,1.28,c,True); text(s,t,x+.2,5.08,2.65,.25,17,WHITE,True); text(s,d,x+.2,5.54,2.68,.24,12,WHITE) footer(s); add_notes(s,['Childhood onset and limited prosocial emotions tend to identify a more severe and persistent clinical group.']) #6 LPE s=prs.slides.add_slide(blank); header(s,6,'Specifier: with limited prosocial emotions'); text(s,'A persistent interpersonal and emotional pattern, present in multiple relationships and settings.',.8,1.8,10.8,.45,20,INK,True) items=[('Lack of remorse\nor guilt','Does not feel bad after wrongdoing'),('Callous lack\nof empathy','Disregards others’ feelings'),('Unconcerned\nabout performance','Does not care about poor work or outcomes'),('Shallow or\ndeficient affect','Does not express feelings or displays insincere emotion')] for i,(a,b) in enumerate(items): x=.8+i*3.03; rect(s,x,2.7,2.55,2.55,SKY,True); text(s,a,x+.2,3.05,2.15,.58,16,NAVY,True,PP_ALIGN.CENTER); text(s,b,x+.22,4.14,2.1,.54,12,MUTED,False,PP_ALIGN.CENTER) text(s,'DSM-5 requires at least 2 of the 4 characteristics.',.8,5.82,6.5,.35,16,TEAL,True); footer(s); add_notes(s,['This is a specifier, not a separate diagnosis. Establish persistence and presence across settings.']) #7 etiology s=prs.slides.add_slide(blank); header(s,7,'Etiology and risk: a developmental model'); rect(s,.82,1.82,11.65,4.58,CREAM,True,RGBColor(225,229,229)); for i,(title,pts,c) in enumerate([('Child factors',['Temperament','Biologic vulnerabilities','Social-cognitive skills'],TEAL),('Family factors',['Maltreatment','Harsh or punitive parenting','Family discord / poor supervision'],ORANGE),('Contextual factors',['Peer and school difficulties','Low social competence','Socioeconomic adversity'],NAVY)]): x=1.15+i*3.72; rect(s,x,2.22,3.0,.52,c,True); text(s,title,x+.13,2.36,2.72,.18,15,WHITE,True,PP_ALIGN.CENTER); bulletbox(s,pts,x+.12,3.05,2.75,1.65,15,INK,c) text(s,'Clinical formulation should identify modifiable risks and protective relationships, not assign blame.',1.15,5.55,10.9,.35,15,NAVY,True,PP_ALIGN.CENTER); footer(s); add_notes(s,['Kaplan and Sadock frame enduring aggressive behavior as multifactorial: biologic, temperamental, learned and psychological contributors.']) #8 assessment s=prs.slides.add_slide(blank); header(s,8,'Assessment: build the full picture'); steps=[('01','Safety','Assess risk of harm to self or others, weapons, cruelty, fire-setting, exploitation and safeguarding needs.'),('02','Timeline','Age at onset, frequency, contexts, escalation, and consequences of behaviors.'),('03','Collateral','Child, caregivers, school reports, records and where relevant legal or child-protection information.'),('04','Comorbidity','Screen for ADHD, mood symptoms, trauma exposure, learning disorders, substance use and neurodevelopmental concerns.'),('05','Function','Review academic progress, peer relationships, family stressors, parenting patterns and strengths.')] for i,(n,t,d) in enumerate(steps): y=1.68+i*1.0; rect(s,.8,y,.62,.62,TEAL,True); text(s,n,.91,y+.18,.4,.16,11,WHITE,True,PP_ALIGN.CENTER); text(s,t,1.7,y+.03,1.55,.22,16,NAVY,True); text(s,d,3.15,y+.03,8.85,.46,13,MUTED) footer(s); add_notes(s,['Assessment is multimodal. Diagnostic criteria alone do not substitute for risk assessment, a developmental history or collateral information.']) #9 differential s=prs.slides.add_slide(blank); header(s,9,'Key differentials and comorbidity'); left=[('Oppositional defiant disorder','Defiance and irritability without the serious rights violations characteristic of CD.'),('ADHD','Impulsivity may contribute to aggression, but does not by itself explain planned deceit, cruelty or rights violations.'),('Mood / trauma-related disorders','Irritability, dysregulation or trauma responses may drive behavior; evaluate symptom context and triggers.')] right=[('Learning disorder / intellectual disability','Academic failure and communication difficulties can shape behavior and require targeted support.'),('Substance use','Can precipitate, worsen or mimic disruptive behavior in adolescents.'),('Antisocial personality disorder','In adults, diagnose CD only when criteria for antisocial personality disorder are not met.')] for j,col in enumerate([left,right]): x=.8+j*6.15 for i,(t,d) in enumerate(col): y=1.8+i*1.58; rect(s,x,y,5.55,1.2,CREAM,True,RGBColor(225,229,229)); text(s,t,x+.22,y+.18,5.05,.24,15,NAVY,True); text(s,d,x+.22,y+.57,5.0,.42,12,MUTED) footer(s); add_notes(s,['Kaplan and Sadock note associations with ADHD, depression and learning disorders.']) #10 management s=prs.slides.add_slide(blank); header(s,10,'Management: multimodal and family-centered'); text(s,'First-line care is psychosocial and targets the child, caregivers, school and environment.',.8,1.76,11.2,.42,20,INK,True) for i,(title,desc,c) in enumerate([('Parent / caregiver work','Consistent routines, positive reinforcement, supervision and non-harsh discipline.',TEAL),('Child-focused work','Skills for emotion regulation, problem solving and social functioning; CBT-informed approaches.',ORANGE),('School / systems plan','Coordinated behavior plan, learning supports, attendance interventions and safeguarding.',NAVY),('Treat comorbidity','Treat ADHD, depression, substance use and other contributors when present.',GREEN)]): x=.8+(i%2)*6.0;y=2.55+(i//2)*1.7;rect(s,x,y,5.45,1.3,CREAM,True,RGBColor(225,229,229));rect(s,x,y,.13,1.3,c);text(s,title,x+.35,y+.22,4.65,.25,16,NAVY,True);text(s,desc,x+.35,y+.62,4.65,.48,13,MUTED) text(s,'Medication is not a stand-alone treatment for core conduct disorder symptoms. Consider it only for a clearly defined target or comorbid condition, with monitoring.',.8,6.02,11.55,.42,14,RED,True); footer(s); add_notes(s,['Evidence in the textbook includes CBT approaches and trials of risperidone for aggression in selected youth. Avoid presenting medication as routine treatment for CD itself.']) #11 prognosis s=prs.slides.add_slide(blank); header(s,11,'Prognosis and prevention'); rect(s,.8,1.85,5.45,3.9,NAVY,True);text(s,'Earlier\nrecognition',1.23,2.3,3.7,.8,30,WHITE,True);text(s,'can redirect developmental pathways through sustained support for caregivers, school engagement and social skills.',1.23,3.5,4.3,1.1,17,SKY);text(s,'Persistent, early disruptive behavior can predict adult antisocial outcomes in some youth.',1.23,5.03,4.3,.38,13,WHITE,True) text(s,'Factors associated with less favorable course',6.75,1.96,5.1,.3,19,TEAL,True);bulletbox(s,['Childhood onset and severe symptoms','Limited prosocial emotions','Ongoing family adversity or violence exposure','Untreated comorbidities and school disengagement'],6.75,2.55,5.35,2.5,18);text(s,'Avoid fatalism: prognosis varies and targeted early intervention matters.',6.75,5.48,5.25,.35,15,NAVY,True);footer(s);add_notes(s,['Use balanced language: a course toward antisocial personality disorder is a risk for some, not an inevitable outcome.']) #12 takeaways refs s=prs.slides.add_slide(blank); header(s,12,'Take-home points'); bulletbox(s,['Conduct disorder is a persistent pattern involving aggression, property destruction, deceit/theft or serious rule violations.','Diagnosis requires at least 3 of 15 symptoms in the prior 12 months, including at least 1 in the prior 6 months, plus impairment.','Document age of onset, severity and the limited prosocial emotions specifier when applicable.','Assessment must include safety, collateral data, developmental history, comorbidity and strengths.','Use coordinated psychosocial care involving caregivers, child, school and relevant community systems.'],.85,1.8,7.5,4.5,18) rect(s,8.7,1.8,3.5,4.5,SKY,True);text(s,'Primary reference',9.05,2.15,2.8,.25,16,TEAL,True);text(s,'Boland RJ, Verduin ML, Ruiz P, eds.\nKaplan & Sadock’s Synopsis of Psychiatry. 12th ed.\n\nConduct Disorder, pp. 608-612.',9.05,2.68,2.75,1.55,14,NAVY,True);text(s,'Diagnostic criteria presented as summarized in the text’s DSM-5 comparison table.',9.05,4.65,2.72,.7,12,MUTED);text(s,'Thank you',9.05,5.65,2.7,.28,18,NAVY,True,PP_ALIGN.CENTER) footer(s,'Primary source: Kaplan & Sadock’s Synopsis of Psychiatry, 12e.'); add_notes(s,['Invite questions on diagnosis, differential diagnosis or management planning.']) prs.save(OUT) print(OUT) ''') PY python "/tmp/workspace/conduct-disorder-ppt/src/create_conduct_disorder_ppt.py" python - <<'PY' from pptx import Presentation p='/tmp/workspace/conduct-disorder-ppt/output/Conduct_Disorder_Kaplan_Sadock.pptx' prs=Presentation(p) print('slides=',len(prs.slides)) for i,s in enumerate(prs.slides,1): texts=[sh.text for sh in s.shapes if getattr(sh,'has_text_frame',False) and sh.text.strip()] print(i, ' | '.join(texts[:2])) PY
~/conduct-disorder-ppt/src/create_conduct_disorder_ppt.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/conduct-disorder-ppt/src/create_conduct_disorder_ppt.py'
rm -f "/tmp/workspace/conduct-disorder-ppt/output/Conduct_Disorder_Kaplan_Sadock.pptx"; python "/tmp/workspace/conduct-disorder-ppt/src/create_conduct_disorder_ppt.py" && python - <<'PY' from pptx import Presentation p='/tmp/workspace/conduct-disorder-ppt/output/Conduct_Disorder_Kaplan_Sadock.pptx' prs=Presentation(p) print('slides=',len(prs.slides)) for i,s in enumerate(prs.slides,1): texts=[sh.text.replace('\n',' / ') for sh in s.shapes if getattr(sh,'has_text_frame',False) and sh.text.strip()] print(i, texts[0][:100] if texts else 'EMPTY') PY ls -lh "/tmp/workspace/conduct-disorder-ppt/output/Conduct_Disorder_Kaplan_Sadock.pptx"
Conduct Disorder Kaplan Sadock
Presentation · PPTX