Make a opd case to presentation of given uploaded photo details in it , and take reference from uploaded pdf.
~/
~/attachments/1c79e1de-f5ed-4c08-a80f-b34f13cd26e5
tinea corporis treatment
tinea corporis treatment guidelines topical antifungal 2025
python -c "from pptx import Presentation; p=Presentation('/tmp/workspace/attachments/1c79e1de-f5ed-4c08-a80f-b34f13cd26e5/Opd case .pptx'); print('Slides',len(p.slides)); [print('--- SLIDE',i,'LAYOUT',s.slide_layout.name,'---\n'+'\n'.join(sh.text for sh in s.shapes if getattr(sh,'has_text_frame',False) and sh.text.strip())) for i,s in enumerate(p.slides,1)]"
python -c "from PIL import Image; import os; base='/tmp/workspace/attachments/1c79e1de-f5ed-4c08-a80f-b34f13cd26e5'; [(lambda im,n: (print(n, im.size), im.crop((0,0,im.width,im.height)).save('/tmp/workspace/'+n+'.png')))(Image.open(os.path.join(base,f)), os.path.splitext(f)[0].replace(' ','_')) for f in ['IMG_7809.jpg','IMG_7810.jpg']]"
~/
mkdir -p "/tmp/workspace/opd_case_presentation/output" 66 python - <<'PY' from pptx import Presentation from pptx.util import Inches, Pt from pptx.enum.text import PP_ALIGN, MSO_ANCHOR from pptx.enum.shapes import MSO_SHAPE from pptx.dml.color import RGBColor from pptx.enum.dml import MSO_THEME_COLOR from pptx.enum.text import MSO_AUTO_SIZE from pptx.enum.shapes import MSO_CONNECTOR from pptx.oxml.xmlchemy import OxmlElement from pptx.oxml.ns import qn from copy import deepcopy out='/tmp/workspace/opd_case_presentation/output/OPD_Case_Presentation_Hand_Dermatitis.pptx' prs=Presentation() prs.slide_width=Inches(13.333) prs.slide_height=Inches(7.5) blank=prs.slide_layouts[6] NAVY=RGBColor(16,48,78); BLUE=RGBColor(31,116,173); TEAL=RGBColor(0,151,158) LIGHT=RGBColor(244,248,251); MID=RGBColor(220,232,241); TEXT=RGBColor(35,47,58) MUTED=RGBColor(94,111,125); WHITE=RGBColor(255,255,255); RED=RGBColor(173,55,55) # helpers def background(slide, title, subtitle=None, number=None): bg=slide.background.fill; bg.solid(); bg.fore_color.rgb=LIGHT header=slide.shapes.add_shape(MSO_SHAPE.RECTANGLE,0,0,prs.slide_width,Inches(.78)); header.fill.solid(); header.fill.fore_color.rgb=NAVY; header.line.fill.background() tx=slide.shapes.add_textbox(Inches(.55),Inches(.12),Inches(10.9),Inches(.42)); p=tx.text_frame.paragraphs[0]; p.text=title.upper(); p.font.name='Aptos Display';p.font.size=Pt(26);p.font.bold=True;p.font.color.rgb=WHITE if subtitle: st=slide.shapes.add_textbox(Inches(.58),Inches(.82),Inches(11.5),Inches(.35)); p=st.text_frame.paragraphs[0];p.text=subtitle;p.font.name='Aptos';p.font.size=Pt(11);p.font.color.rgb=MUTED footer=slide.shapes.add_shape(MSO_SHAPE.RECTANGLE,0,Inches(7.23),prs.slide_width,Inches(.27));footer.fill.solid();footer.fill.fore_color.rgb=NAVY;footer.line.fill.background() f=slide.shapes.add_textbox(Inches(.5),Inches(7.245),Inches(10),Inches(.15));p=f.text_frame.paragraphs[0];p.text='OPD CASE PRESENTATION | De-identified teaching copy';p.font.name='Aptos';p.font.size=Pt(7.5);p.font.color.rgb=WHITE if number: n=slide.shapes.add_textbox(Inches(12.15),Inches(7.235),Inches(.55),Inches(.18));p=n.text_frame.paragraphs[0];p.text=str(number);p.alignment=PP_ALIGN.RIGHT;p.font.size=Pt(8);p.font.color.rgb=WHITE def add_text(slide, text, x,y,w,h, size=18, color=TEXT, bold=False, align=None, valign=MSO_ANCHOR.TOP): box=slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h)); tf=box.text_frame;tf.clear();tf.word_wrap=True;tf.vertical_anchor=valign p=tf.paragraphs[0];p.text=text;p.font.name='Aptos';p.font.size=Pt(size);p.font.color.rgb=color;p.font.bold=bold if align: p.alignment=align return box def card(slide, x,y,w,h, heading, body, accent=BLUE, body_size=15): shp=slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(x), Inches(y), Inches(w), Inches(h));shp.fill.solid();shp.fill.fore_color.rgb=WHITE;shp.line.color.rgb=MID stripe=slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, Inches(x), Inches(y), Inches(.09), Inches(h));stripe.fill.solid();stripe.fill.fore_color.rgb=accent;stripe.line.fill.background() add_text(slide,heading,x+.28,y+.18,w-.45,.31,13,accent,True) b=add_text(slide,body,x+.28,y+.56,w-.47,h-.68,body_size,TEXT) for p in b.text_frame.paragraphs: p.space_after=Pt(4) return shp def bullet_text(slide, bullets,x,y,w,h,size=17): box=slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h));tf=box.text_frame;tf.clear();tf.word_wrap=True for i, item in enumerate(bullets): p=tf.paragraphs[0] if i==0 else tf.add_paragraph();p.text=item;p.level=0;p.font.name='Aptos';p.font.size=Pt(size);p.font.color.rgb=TEXT;p.space_after=Pt(9);p._p.get_or_add_pPr().insert(0,OxmlElement('a:buChar')) if False else None p.text='• '+item return box # 1 cover s=prs.slides.add_slide(blank); bg=s.background.fill;bg.solid();bg.fore_color.rgb=NAVY s.shapes.add_shape(MSO_SHAPE.RECTANGLE,Inches(.58),Inches(.72),Inches(.12),Inches(4.45)).fill.solid();s.shapes[-1].fill.fore_color.rgb=TEAL;s.shapes[-1].line.fill.background() add_text(s,'OPD CASE\nPRESENTATION',.95,.78,7.8,1.75,32,WHITE,True) add_text(s,'Chronic pruritic eruption of both hands\nWorking impression: irritant contact dermatitis',.97,2.8,7.8,.85,19,RGBColor(210,228,240)) add_text(s,'Prepared from the uploaded OPD chart\nPatient identifiers removed for confidentiality',.97,4.05,6.8,.55,14,WHITE) # abstract hand cards for i,(lab,val) in enumerate([('PRESENTATION','Bilateral hand itch'),('COURSE','Approximately 1 year'),('SETTING','Outpatient clinic')]): x=8.7; y=.9+i*1.45 sh=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,Inches(x),Inches(y),Inches(3.65),Inches(1.06));sh.fill.solid();sh.fill.fore_color.rgb=RGBColor(29,69,103);sh.line.color.rgb=RGBColor(73,122,155) add_text(s,lab,x+.25,y+.18,3.1,.22,10,RGBColor(135,200,208),True) add_text(s,val,x+.25,y+.45,3.1,.35,16,WHITE,True) add_text(s,'Date on source record: 10 Jul 2023',.98,6.78,4,.25,10,RGBColor(190,210,225)) # 2 profile s=prs.slides.add_slide(blank);background(s,'Patient profile','Only legible chart details are shown. No name or record number included.',2) card(s,.65,1.38,3.9,1.25,'DEMOGRAPHICS','Adult female\nAge recorded as approximately 55 years',TEAL,16) card(s,4.75,1.38,3.9,1.25,'CONSULTATION','Family and Community Medicine OPD\nSource date: 10 July 2023',BLUE,16) card(s,8.85,1.38,3.8,1.25,'ANTHROPOMETRICS','Ht 160 cm | Wt 80 kg\nBMI recorded: 33.9 kg/m²',RED,16) card(s,.65,3.05,5.85,2.45,'CHIEF COMPLAINT','Skin irritation / itch involving both fingers.\n\nDuration in narrative: about 1 year.',TEAL,17) card(s,6.75,3.05,5.9,2.45,'CLINICAL CONTEXT','The handwritten chart is partly difficult to read. This presentation distinguishes documented facts from inferences and should not replace review of the original chart.',BLUE,16) #3 history s=prs.slides.add_slide(blank);background(s,'History of present illness','Narrative transcribed conservatively from the handwritten OPD record.',3) card(s,.65,1.3,3.85,4.9,'ONSET AND SYMPTOMS','• Chronic itch and redness\n• Both hands / fingers\n• Symptoms reported for roughly one year\n• Dry, pruritic skin described\n\nNo systemic symptoms were clearly documented.',TEAL,17) card(s,4.75,1.3,3.85,4.9,'PRIOR CARE','• Seen by a dermatologist\n• Previously prescribed topical medication(s), exact agent unclear\n• Treatment stopped because of inadequate improvement\n\nPetroleum jelly / emollient use was mentioned in the narrative, but wording is partly unclear.',BLUE,16) card(s,8.85,1.3,3.8,4.9,'CLINICAL INTERPRETATION','A chronic bilateral pruritic hand eruption is compatible with hand dermatitis. Exposure history, morphology, and fungal testing were not fully captured in the supplied record.',RED,16) #4 past/personal s=prs.slides.add_slide(blank);background(s,'Past, family and personal history','Information as recorded in the source chart.',4) card(s,.65,1.35,3.82,2.05,'PAST HISTORY','Hypertension noted in the chart.\n\nCurrent medications written as amlodipine + losartan 50/50 (exact regimen requires confirmation).',RED,16) card(s,4.76,1.35,3.82,2.05,'FAMILY HISTORY','Wife / spouse recorded as having hypertension; no other contributory family history was clearly legible.',BLUE,15) card(s,8.87,1.35,3.8,2.05,'ALLERGIES','Food allergy: none recorded\nMedication allergy: none recorded',TEAL,16) card(s,.65,3.75,5.85,2.15,'PERSONAL / SOCIAL','Non-smoker.\nNo alcohol use noted.\nLight activity recorded.\nNo occupation or irritant exposure was clearly documented.',BLUE,16) card(s,6.8,3.75,5.87,2.15,'IMMUNIZATION','Influenza, pneumococcal and COVID vaccinations marked negative / not received in the record.',TEAL,16) #5 vitals s=prs.slides.add_slide(blank);background(s,'Vital signs and general examination','Recorded at the OPD visit.',5) vals=[('BP','140/90 mmHg',RED),('Pulse','92 /min',BLUE),('Respiratory rate','20 /min',BLUE),('Temperature','36.9 °C',TEAL),('O₂ saturation','95%',TEAL),('BMI','33.9 kg/m²',RED)] for i,(a,b,c) in enumerate(vals): col=i%3;row=i//3;x=.75+col*4.18;y=1.45+row*1.58 sh=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,Inches(x),Inches(y),Inches(3.6),Inches(1.12));sh.fill.solid();sh.fill.fore_color.rgb=WHITE;sh.line.color.rgb=MID add_text(s,a,x+.25,y+.17,3.0,.24,11,c,True);add_text(s,b,x+.25,y+.51,3.1,.35,21,TEXT,True) card(s,.75,4.75,11.95,1.25,'GENERAL SURVEY','Awake, alert, and not in distress. HEENT, chest/lungs, cardiac and abdominal examinations were recorded as essentially unremarkable.',BLUE,16) #6 skin exam s=prs.slides.add_slide(blank);background(s,'Focused physical examination','Handwriting limits detailed lesion morphology.',6) card(s,.65,1.35,5.75,2.1,'DOCUMENTED SKIN / EXTREMITY FINDING','The chart describes bilateral hand / finger lesions with pruritus. The exact morphology, distribution, and severity are difficult to decipher from the photograph.',TEAL,17) card(s,.65,3.78,5.75,1.72,'NEGATIVE / OTHER EXAMINATION','No edema or peripheral vascular compromise was reported. Other systemic examination findings were noncontributory.',BLUE,16) # hand schematic sh=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,Inches(6.85),Inches(1.35),Inches(5.8),Inches(4.15));sh.fill.solid();sh.fill.fore_color.rgb=WHITE;sh.line.color.rgb=MID add_text(s,'BILATERAL HAND INVOLVEMENT',7.15,1.65,5.1,.28,13,RED,True,PP_ALIGN.CENTER) for base in [8.1,10.55]: # palm + fingers simple palm=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,Inches(base),Inches(2.85),Inches(1.3),Inches(1.55));palm.fill.solid();palm.fill.fore_color.rgb=RGBColor(243,222,201);palm.line.color.rgb=RGBColor(189,139,98) for j in range(4): f=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,Inches(base+.08+j*.3),Inches(2.15),Inches(.23),Inches(.92));f.fill.solid();f.fill.fore_color.rgb=RGBColor(243,222,201);f.line.color.rgb=RGBColor(189,139,98) thumb=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,Inches(base-.30),Inches(3.3),Inches(.52),Inches(.25));thumb.fill.solid();thumb.fill.fore_color.rgb=RGBColor(243,222,201);thumb.line.color.rgb=RGBColor(189,139,98) for j in range(3): dot=s.shapes.add_shape(MSO_SHAPE.OVAL,Inches(base+.2+j*.35),Inches(3.2),Inches(.22),Inches(.22));dot.fill.solid();dot.fill.fore_color.rgb=RED;dot.line.fill.background() add_text(s,'Schematic only. It does not reproduce an unverified lesion photograph.',7.12,4.83,5.15,.28,10,MUTED,False,PP_ALIGN.CENTER) #7 working impression s=prs.slides.add_slide(blank);background(s,'Assessment','Working diagnosis taken from the recorded assessment.',7) sh=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,Inches(.75),Inches(1.35),Inches(11.85),Inches(1.38));sh.fill.solid();sh.fill.fore_color.rgb=RGBColor(229,245,245);sh.line.color.rgb=TEAL add_text(s,'IRRITANT CONTACT DERMATITIS OF BOTH HANDS',1.05,1.68,11.2,.35,25,NAVY,True,PP_ALIGN.CENTER) add_text(s,'Documented as: “Irritant contact dermatitis”',1.05,2.16,11.2,.25,13,TEAL,False,PP_ALIGN.CENTER) card(s,.75,3.22,3.65,2.25,'ASSOCIATED CONCERNS','• Hypertension, suboptimally controlled at this visit\n• Obesity by recorded BMI',RED,17) card(s,4.85,3.22,3.65,2.25,'CLINICAL BASIS','Chronic bilateral pruritic hand inflammation, dryness and historical exposure to topical products are consistent with a dermatitis syndrome.',TEAL,16) card(s,8.95,3.22,3.65,2.25,'CONFIRMATORY GAPS','Irritant trigger, lesion morphology, KOH microscopy, patch testing, and occupational history were not documented.',BLUE,16) #8 ddx s=prs.slides.add_slide(blank);background(s,'Differential diagnosis','Important alternatives to consider before confirming a chronic hand dermatitis diagnosis.',8) card(s,.65,1.3,3.78,4.65,'ALLERGIC CONTACT DERMATITIS','Consider if distribution corresponds to gloves, soaps, cosmetics, topical antibiotics, metals, or work materials.\n\nPatch testing may help when the disease is persistent or the allergen is unclear.',BLUE,16) card(s,4.78,1.3,3.78,4.65,'TINEA MANUUM','May mimic hand eczema, especially if unilateral with scaling or associated tinea pedis.\n\nKOH examination can differentiate dermatophyte infection.',TEAL,16) card(s,8.91,1.3,3.78,4.65,'OTHER ECZEMATOUS / INFLAMMATORY DISEASE','Atopic hand eczema, dyshidrotic eczema, psoriasis, scabies, and secondary bacterial infection should be assessed according to morphology and exposure history.',RED,16) #9 investigations s=prs.slides.add_slide(blank);background(s,'Diagnostics and evaluation','The source chart lists general tests. Dermatology-focused testing is presented as an evaluation gap.',9) card(s,.65,1.35,3.85,3.95,'REQUESTED IN OPD CHART','• Complete blood count\n• Urinalysis\n• Chest radiograph\n• 12-lead ECG\n\nResults were not supplied.',BLUE,17) card(s,4.75,1.35,3.85,3.95,'SKIN-FOCUSED EVALUATION','• Detailed exposure history: water, detergents, glove use, cleaning products, occupation\n• Morphology and body surface map\n• KOH microscopy if fungal infection suspected',TEAL,16) card(s,8.85,1.35,3.82,3.95,'IF PERSISTENT / RECURRENT','• Consider patch testing for allergic contact dermatitis\n• Assess for infection or alternate diagnosis\n• Dermatology referral if refractory or diagnosis remains uncertain',RED,16) #10 plan s=prs.slides.add_slide(blank);background(s,'Recorded treatment plan','Medication names / doses are transcribed only where sufficiently legible. Verify against the original prescription before use.',10) card(s,.65,1.25,4.0,4.75,'PRESCRIBED IN SOURCE CHART','1. Mupirocin + betamethasone topical preparation, written as twice daily for 1 week.\n\n2. Cetirizine 10 mg tablet, once daily.\n\nSome prescription text is not fully legible.',RED,16) card(s,4.95,1.25,3.7,4.75,'NON-PHARMACOLOGIC ADVICE','• Avoid harsh chemicals\n• Use mild soap and moisturiser / emollient\n• Avoid manual manipulation / scratching\n• Monitor blood pressure\n\nFollow-up was written for 1 week.',TEAL,16) card(s,8.95,1.25,3.7,4.75,'SAFETY NOTE','Topical antibiotic-corticosteroid combinations should not be prolonged or routinely used without reassessment. Confirm diagnosis and exclude fungal infection if the eruption does not improve.',BLUE,16) #11 counselling s=prs.slides.add_slide(blank);background(s,'Counselling and follow-up','Patient-centred advice aligned with the chart and standard hand dermatitis care.',11) steps=[('1','Reduce wet work','Use lukewarm water, minimise repeated washing, and avoid fragranced detergents.'),('2','Protect hands','Use suitable protective gloves for wet work. Remove promptly and keep hands dry.'),('3','Restore barrier','Apply a bland, fragrance-free emollient regularly, especially after washing.'),('4','Reassess','Return if spreading rash, pain, pus, fever, no improvement, or recurrence after treatment.')] for i,(num,h,b) in enumerate(steps): y=1.2+i*1.28 c=s.shapes.add_shape(MSO_SHAPE.OVAL,Inches(.8),Inches(y),Inches(.62),Inches(.62));c.fill.solid();c.fill.fore_color.rgb=TEAL;c.line.fill.background();add_text(s,num,.8,y+.14,.62,.25,16,WHITE,True,PP_ALIGN.CENTER) add_text(s,h,1.65,y+.02,2.3,.25,16,NAVY,True);add_text(s,b,4.0,y+.02,8.15,.48,15,TEXT) #12 references s=prs.slides.add_slide(blank);background(s,'References and documentation note','Teaching presentation. It is not a substitute for the original medical record or clinical judgement.',12) card(s,.65,1.2,12.0,1.05,'PRIMARY CASE SOURCE','De-identified transcription of uploaded handwritten OPD chart images (dated 10 July 2023). Information that could not be confidently read has been labelled as unclear.',TEAL,15) card(s,.65,2.55,12.0,1.33,'TEXTBOOK REFERENCE','Textbook of Family Medicine, 9th ed., Key Treatment section: topical antifungal agents are effective for tinea; allylamines have evidence of greater effectiveness than azoles for tinea pedis and corporis. This supports fungal testing as a differential consideration.',BLUE,14) card(s,.65,4.18,12.0,1.33,'WEB REFERENCE','DermNet NZ, “Tinea corporis (Body Ringworm)”: localised tinea may respond to topical imidazoles or terbinafine; consider systemic treatment for extensive, hair-bearing, or topical-treatment-refractory disease. Accessed 28 Aug 2026.',BLUE,14) card(s,.65,5.8,12.0,.72,'RECENT EVIDENCE NOTE','A recent systematic review of naftifine for dermatophyte infections is available (PMID 40053133, 2025). It does not alter the documented OPD treatment plan.',RED,13) # 13 final s=prs.slides.add_slide(blank); bg=s.background.fill;bg.solid();bg.fore_color.rgb=NAVY add_text(s,'KEY TAKEAWAY',.8,1.15,11.7,.45,27,RGBColor(133,208,211),True,PP_ALIGN.CENTER) add_text(s,'Chronic bilateral pruritic hand dermatitis requires\ntrigger identification, skin-barrier restoration, and reassessment\nif symptoms persist or the diagnosis is uncertain.',1.3,2.2,10.7,1.55,25,WHITE,True,PP_ALIGN.CENTER) add_text(s,'Thank you',.8,5.5,11.7,.4,21,RGBColor(210,228,240),False,PP_ALIGN.CENTER) add_text(s,'All patient identifiers have been removed.',.8,6.35,11.7,.22,11,RGBColor(190,210,225),False,PP_ALIGN.CENTER) # metadata prs.core_properties.title='OPD Case Presentation - Hand Dermatitis' prs.core_properties.subject='De-identified clinical case presentation' prs.core_properties.author='Orris' prs.save(out) print(out) PY python -c "from pptx import Presentation; p=Presentation('/tmp/workspace/opd_case_presentation/output/OPD_Case_Presentation_Hand_Dermatitis.pptx'); print('validated slides=',len(p.slides)); print([len(s.shapes) for s in p.slides])"
~/opd_case_presentation
mkdir -p "/tmp/workspace/opd_case_presentation/src" && printf 'ready\n'
python - <<'PY' from pptx import Presentation from pptx.util import Inches,Pt from pptx.enum.shapes import MSO_SHAPE from pptx.enum.text import PP_ALIGN from pptx.dml.color import RGBColor from pathlib import Path out=Path('/tmp/workspace/opd_case_presentation/output/OPD_Case_Presentation_Hand_Dermatitis.pptx') out.parent.mkdir(parents=True,exist_ok=True) p=Presentation();p.slide_width=Inches(13.333);p.slide_height=Inches(7.5);blank=p.slide_layouts[6] NAVY=RGBColor(16,48,78);TEAL=RGBColor(0,151,158);BLUE=RGBColor(31,116,173);WHITE=RGBColor(255,255,255);BG=RGBColor(245,248,251);TEXT=RGBColor(35,47,58);MUTED=RGBColor(94,111,125);RED=RGBColor(173,55,55);LINE=RGBColor(220,232,241) def tx(s,t,x,y,w,h,sz=17,col=TEXT,bold=False,align=None): b=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h));f=b.text_frame;f.clear();f.word_wrap=True;q=f.paragraphs[0];q.text=t;q.font.name='Aptos';q.font.size=Pt(sz);q.font.bold=bold;q.font.color.rgb=col if align:q.alignment=align return b def base(title,n,sub=''): s=p.slides.add_slide(blank);s.background.fill.solid();s.background.fill.fore_color.rgb=BG r=s.shapes.add_shape(MSO_SHAPE.RECTANGLE,0,0,p.slide_width,Inches(.78));r.fill.solid();r.fill.fore_color.rgb=NAVY;r.line.fill.background();tx(s,title.upper(),.55,.13,11.3,.4,25,WHITE,True) if sub:tx(s,sub,.58,.85,11.8,.28,10,MUTED) f=s.shapes.add_shape(MSO_SHAPE.RECTANGLE,0,Inches(7.23),p.slide_width,Inches(.27));f.fill.solid();f.fill.fore_color.rgb=NAVY;f.line.fill.background();tx(s,'OPD CASE PRESENTATION | De-identified teaching copy',.5,7.24,8,.15,7.5,WHITE);tx(s,str(n),12.2,7.24,.4,.15,8,WHITE,False,PP_ALIGN.RIGHT) return s def card(s,x,y,w,h,head,body,c=BLUE,fs=15): z=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,Inches(x),Inches(y),Inches(w),Inches(h));z.fill.solid();z.fill.fore_color.rgb=WHITE;z.line.color.rgb=LINE a=s.shapes.add_shape(MSO_SHAPE.RECTANGLE,Inches(x),Inches(y),Inches(.09),Inches(h));a.fill.solid();a.fill.fore_color.rgb=c;a.line.fill.background();tx(s,head,x+.27,y+.18,w-.4,.25,12,c,True);tx(s,body,x+.27,y+.55,w-.45,h-.65,fs,TEXT) # Cover s=p.slides.add_slide(blank);s.background.fill.solid();s.background.fill.fore_color.rgb=NAVY r=s.shapes.add_shape(MSO_SHAPE.RECTANGLE,Inches(.6),Inches(.78),Inches(.11),Inches(4.6));r.fill.solid();r.fill.fore_color.rgb=TEAL;r.line.fill.background();tx(s,'OPD CASE\nPRESENTATION',.95,.85,6.8,1.45,31,WHITE,True);tx(s,'Chronic pruritic eruption of both hands\nWorking impression: irritant contact dermatitis',.97,2.75,7.0,.7,18,RGBColor(210,228,240));tx(s,'Prepared from the uploaded OPD chart\nPatient identifiers removed for confidentiality',.97,4.15,6.5,.5,14,WHITE) for i,(a,b) in enumerate([('PRESENTATION','Bilateral hand itch'),('COURSE','About 1 year'),('SETTING','Outpatient clinic')]): y=.9+i*1.43;card(s,8.6,y,3.75,1.02,a,b,TEAL,16) tx(s,'Source record date: 10 July 2023',.97,6.75,4,.2,10,RGBColor(190,210,225)) # slides data s=base('Patient profile',2,'Legible source-chart details only. Name and record number removed.') card(s,.65,1.35,3.9,1.3,'DEMOGRAPHICS','Adult female\nAge recorded as approximately 55 years',TEAL,16);card(s,4.75,1.35,3.9,1.3,'CONSULTATION','Family and Community Medicine OPD\n10 July 2023',BLUE,16);card(s,8.85,1.35,3.8,1.3,'ANTHROPOMETRICS','Height 160 cm | Weight 80 kg\nBMI recorded: 33.9 kg/m²',RED,16);card(s,.65,3.05,5.85,2.4,'CHIEF COMPLAINT','Skin irritation / itch involving both fingers.\n\nDuration in narrative: about one year.',TEAL,17);card(s,6.8,3.05,5.85,2.4,'DOCUMENTATION NOTE','Some handwriting is unclear. This deck distinguishes recorded facts from clinical inferences and does not replace the original chart.',BLUE,16) s=base('History of present illness',3,'Conservative transcription of handwritten narrative.') card(s,.65,1.3,3.85,4.9,'SYMPTOMS','• Chronic itch and redness\n• Both hands / fingers\n• Dry, pruritic skin described\n• Duration roughly one year\n\nNo systemic symptoms were clearly recorded.',TEAL,16);card(s,4.75,1.3,3.85,4.9,'PRIOR CARE','• Previously seen by dermatologist\n• Topical medication was prescribed, exact agent unclear\n• Inadequate improvement reported\n\nPetroleum jelly / emollient use may be mentioned but wording is partly unclear.',BLUE,15);card(s,8.85,1.3,3.8,4.9,'INTERPRETATION','Chronic bilateral pruritic hand inflammation is compatible with hand dermatitis. Trigger exposure, exact morphology, and fungal testing are not fully documented.',RED,16) s=base('Past, family and personal history',4,'Information as recorded in the source chart.') card(s,.65,1.35,3.82,2.05,'PAST HISTORY','Hypertension recorded.\n\nMedications noted as amlodipine + losartan 50/50. Exact dosing requires confirmation.',RED,15);card(s,4.76,1.35,3.82,2.05,'ALLERGIES','Food allergy: none recorded\nMedication allergy: none recorded',TEAL,16);card(s,8.87,1.35,3.8,2.05,'SOCIAL HISTORY','Non-smoker.\nNo alcohol use noted.\nLight activity recorded.',BLUE,16);card(s,.65,3.75,5.85,2.15,'FAMILY HISTORY','A spouse was recorded as having hypertension. No other contributory family history was clearly legible.',BLUE,16);card(s,6.8,3.75,5.87,2.15,'EXPOSURE GAP','Occupation, glove use, wet work, detergents, cosmetics, and cleaning-product exposure were not clearly captured.',RED,16) s=base('Vital signs and general examination',5,'Recorded at the OPD visit.') for i,(a,b,c) in enumerate([('BP','140/90 mmHg',RED),('Pulse','92 /min',BLUE),('Respiratory rate','20 /min',BLUE),('Temperature','36.9 °C',TEAL),('O₂ saturation','95%',TEAL),('BMI','33.9 kg/m²',RED)]): x=.75+(i%3)*4.18;y=1.35+(i//3)*1.55;card(s,x,y,3.6,1.1,a,b,c,17) card(s,.75,4.72,11.95,1.2,'GENERAL SURVEY','Awake, alert, and not in distress. HEENT, chest/lungs, cardiac, and abdominal examinations were recorded as essentially unremarkable.',BLUE,16) s=base('Focused skin examination',6,'Handwriting limits detailed description of lesion morphology.') card(s,.65,1.35,5.75,2.1,'DOCUMENTED FINDING','The chart describes bilateral hand / finger lesions with pruritus. The exact morphology, distribution, and severity cannot be confidently determined from the photograph.',TEAL,16);card(s,.65,3.78,5.75,1.7,'OTHER EXAMINATION','No edema or peripheral vascular compromise reported. Other systemic findings were noncontributory.',BLUE,16);card(s,6.85,1.35,5.8,4.15,'CLINICALLY IMPORTANT DOCUMENTATION','For follow-up, describe: site and symmetry, erythema, scale, fissures, vesicles, lichenification, pain, discharge, and possible infection. Record exposures and response to treatment.',RED,17) s=base('Assessment',7,'Working diagnosis appears in the source chart.') card(s,.75,1.35,11.85,1.35,'WORKING IMPRESSION','IRRITANT CONTACT DERMATITIS OF BOTH HANDS\nRecorded in the source assessment as “irritant contact dermatitis”.',TEAL,22);card(s,.75,3.15,3.65,2.25,'ASSOCIATED ISSUES','• Hypertension, above target at visit\n• Obesity by recorded BMI',RED,16);card(s,4.85,3.15,3.65,2.25,'CLINICAL BASIS','Chronic bilateral itch, dry inflamed hand skin, and possible exposure to topical products are compatible with dermatitis.',TEAL,16);card(s,8.95,3.15,3.65,2.25,'CONFIRMATORY GAPS','Trigger, morphology, KOH microscopy, patch testing, and work exposure history are not documented.',BLUE,16) s=base('Differential diagnosis',8,'Alternatives should be considered if symptoms persist or morphology is atypical.') card(s,.65,1.3,3.78,4.65,'ALLERGIC CONTACT DERMATITIS','Consider if distribution corresponds to gloves, soaps, cosmetics, topical antibiotics, metals, or workplace materials.\n\nPatch testing may help when persistent.',BLUE,16);card(s,4.78,1.3,3.78,4.65,'TINEA MANUUM','Can mimic hand eczema, especially with scaling or associated tinea pedis.\n\nKOH examination can help distinguish dermatophyte infection.',TEAL,16);card(s,8.91,1.3,3.78,4.65,'OTHER CONDITIONS','Atopic hand eczema, dyshidrotic eczema, psoriasis, scabies, and secondary bacterial infection should be considered according to morphology and exposure history.',RED,16) s=base('Diagnostics and evaluation',9,'General tests were written in the OPD chart. Results were not supplied.') card(s,.65,1.35,3.85,3.95,'CHARTED REQUESTS','• Complete blood count\n• Urinalysis\n• Chest radiograph\n• 12-lead ECG\n\nNo results provided.',BLUE,17);card(s,4.75,1.35,3.85,3.95,'SKIN EVALUATION','• Detailed exposure history\n• Morphology and body map\n• KOH microscopy if fungal infection suspected\n• Assess infection if painful or exudative',TEAL,16);card(s,8.85,1.35,3.82,3.95,'IF RECURRENT','• Patch testing for allergic contact dermatitis\n• Dermatology referral if refractory\n• Reconsider diagnosis if poor response',RED,16) s=base('Recorded treatment plan',10,'Verify prescription details against the original chart before clinical use.') card(s,.65,1.25,4.0,4.75,'PRESCRIBED IN CHART','1. Mupirocin + betamethasone topical preparation, written twice daily for 1 week.\n\n2. Cetirizine 10 mg tablet, once daily.\n\nSome prescription text is partly unclear.',RED,15);card(s,4.95,1.25,3.7,4.75,'NON-PHARMACOLOGIC ADVICE','• Avoid harsh chemicals\n• Mild soap and moisturiser / emollient\n• Avoid scratching\n• Monitor blood pressure\n\nFollow-up written for 1 week.',TEAL,16);card(s,8.95,1.25,3.7,4.75,'SAFETY NOTE','Avoid prolonged topical antibiotic-corticosteroid combinations without reassessment. Exclude fungal infection if no improvement or atypical rash.',BLUE,16) s=base('Counselling and follow-up',11,'Hand dermatitis care: barrier protection, trigger avoidance, and review.') for i,(h,b) in enumerate([('Reduce wet work','Use lukewarm water and minimise repeated washing or fragranced detergents.'),('Protect hands','Use appropriate gloves for wet work. Remove promptly and keep hands dry.'),('Restore barrier','Apply a bland fragrance-free emollient regularly, especially after washing.'),('Return for review','Seek care for spreading rash, pain, pus, fever, no improvement, or recurrence.')]): y=1.2+i*1.28;card(s,.8,y,11.8,.95,h,b,TEAL if i%2==0 else BLUE,15) s=base('References and documentation note',12,'Teaching presentation. Not a substitute for the medical record or clinical judgement.') card(s,.65,1.2,12.0,1.03,'PRIMARY SOURCE','De-identified transcription of uploaded handwritten OPD chart images, dated 10 July 2023. Ambiguous items are explicitly labelled.',TEAL,14);card(s,.65,2.55,12.0,1.35,'TEXTBOOK','Textbook of Family Medicine, 9th ed., Key Treatment section: topical antifungal agents can treat tinea; allylamines have evidence of greater effectiveness than azoles for tinea pedis and corporis.',BLUE,14);card(s,.65,4.23,12.0,1.35,'WEB REFERENCE','DermNet NZ, “Tinea corporis (Body Ringworm)”: localised tinea may respond to topical imidazoles or terbinafine; systemic treatment may be required for extensive or refractory disease.',BLUE,14);card(s,.65,5.88,12.0,.65,'RECENT EVIDENCE','Systematic review of naftifine for dermatophyte infections: PMID 40053133 (2025).',RED,13) s=p.slides.add_slide(blank);s.background.fill.solid();s.background.fill.fore_color.rgb=NAVY;tx(s,'KEY TAKEAWAY',.8,1.15,11.7,.4,27,RGBColor(133,208,211),True,PP_ALIGN.CENTER);tx(s,'Chronic bilateral pruritic hand dermatitis requires\ntrigger identification, skin-barrier restoration, and reassessment\nwhen symptoms persist or diagnosis is uncertain.',1.25,2.2,10.8,1.55,24,WHITE,True,PP_ALIGN.CENTER);tx(s,'Thank you',.8,5.55,11.7,.4,21,RGBColor(210,228,240),False,PP_ALIGN.CENTER);tx(s,'All patient identifiers have been removed.',.8,6.35,11.7,.2,11,RGBColor(190,210,225),False,PP_ALIGN.CENTER) p.core_properties.title='OPD Case Presentation - Hand Dermatitis';p.core_properties.subject='De-identified clinical case';p.save(out);print(out) PY python -c "from pptx import Presentation; a=Presentation('/tmp/workspace/opd_case_presentation/output/OPD_Case_Presentation_Hand_Dermatitis.pptx');print('Validated:',len(a.slides),'slides')"
python - <<'PY' from pptx import Presentation from zipfile import ZipFile path='/tmp/workspace/opd_case_presentation/output/OPD_Case_Presentation_Hand_Dermatitis.pptx' with ZipFile(path) as z: bad=z.testzip() print('zip_bad_member=',bad) p=Presentation(path) for i,s in enumerate(p.slides,1): texts=[sh.text for sh in s.shapes if getattr(sh,'has_text_frame',False) and sh.text.strip()] print(i, 'text_items=',len(texts), 'chars=',sum(map(len,texts))) print('file_bytes=',__import__('os').path.getsize(path)) PY
OPD Case Presentation Hand Dermatitis
Presentation · PPTX
Yes