Antibiotic resistance in general practice: modern approaches to rational antibiotic therapy.make a word document presentation
WHO antimicrobial resistance primary care rational antibiotic therapy guidance antibiotic stewardship general practice
antibiotic stewardship primary care
https://www.who.int/news/item/23-04-2025-strengthening-prima…
/tmp/workspace
diagram mechanisms of bacterial antibiotic resistance antibiotic stewardship
/tmp/workspace
mkdir -p "/tmp/workspace/antibiotic-rational-therapy-presentation/src" "/tmp/workspace/antibiotic-rational-therapy-presentation/output" && python3 - <<'PY' from docx import Document from docx.shared import Inches, Pt, RGBColor from docx.enum.section import WD_ORIENT from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.enum.table import WD_TABLE_ALIGNMENT, WD_CELL_VERTICAL_ALIGNMENT from docx.oxml import OxmlElement from docx.oxml.ns import qn from docx.enum.style import WD_STYLE_TYPE from docx.enum.section import WD_SECTION from docx.enum.text import WD_BREAK OUT='/tmp/workspace/antibiotic-rational-therapy-presentation/output/Antibiotic_Resistance_Rational_Therapy_General_Practice.docx' doc=Document() sec=doc.sections[0] sec.orientation=WD_ORIENT.LANDSCAPE sec.page_width,sec.page_height=Inches(13.333),Inches(7.5) sec.top_margin=Inches(.48); sec.bottom_margin=Inches(.45); sec.left_margin=Inches(.58); sec.right_margin=Inches(.58) # Theme NAVY='17365D'; TEAL='007C83'; BLUE='1F4E79'; PALE='EAF3F5'; LIGHT='F4F7FA'; RED='B85450'; GREEN='3F7D58'; GRAY='5B6573'; WHITE='FFFFFF' styles=doc.styles styles['Normal'].font.name='Aptos'; styles['Normal']._element.rPr.rFonts.set(qn('w:eastAsia'),'Aptos'); styles['Normal'].font.size=Pt(16); styles['Normal'].font.color.rgb=RGBColor.from_string('25364A') for nm,size,col in [('Title',35,NAVY),('Heading 1',27,NAVY),('Heading 2',18,TEAL)]: st=styles[nm]; st.font.name='Aptos Display' if nm!='Normal' else 'Aptos'; st.font.size=Pt(size); st.font.bold=True; st.font.color.rgb=RGBColor.from_string(col) # Helpers def shade(cell,color): tcPr=cell._tc.get_or_add_tcPr(); shd=OxmlElement('w:shd'); shd.set(qn('w:fill'),color); tcPr.append(shd) def set_cell_border(cell, **kwargs): tc=cell._tc; tcPr=tc.get_or_add_tcPr(); borders=tcPr.first_child_found_in('w:tcBorders') if borders is None: borders=OxmlElement('w:tcBorders'); tcPr.append(borders) for edge,attrs in kwargs.items(): tag='w:{}'.format(edge); element=borders.find(qn(tag)) if element is None: element=OxmlElement(tag); borders.append(element) for key,value in attrs.items(): element.set(qn('w:{}'.format(key)),str(value)) def set_margins(cell,top=100,start=130,bottom=100,end=130): tc=cell._tc; tcPr=tc.get_or_add_tcPr(); tcMar=tcPr.first_child_found_in('w:tcMar') if tcMar is None: tcMar=OxmlElement('w:tcMar'); tcPr.append(tcMar) for m,v in [('top',top),('start',start),('bottom',bottom),('end',end)]: node=tcMar.find(qn('w:'+m)) if node is None: node=OxmlElement('w:'+m); tcMar.append(node) node.set(qn('w:w'),str(v)); node.set(qn('w:type'),'dxa') def add_text(cell,text,size=15,bold=False,color='25364A',bullet=False): p=cell.add_paragraph() if cell.paragraphs[0].text else cell.paragraphs[0] p.paragraph_format.space_after=Pt(7); p.paragraph_format.line_spacing=1.05 if bullet: p.style='List Bullet' r=p.add_run(text); r.bold=bold; r.font.name='Aptos'; r.font.size=Pt(size); r.font.color.rgb=RGBColor.from_string(color) return p def title(text,kicker=None): if kicker: p=doc.add_paragraph(); p.paragraph_format.space_after=Pt(2); r=p.add_run(kicker.upper()); r.bold=True;r.font.size=Pt(10);r.font.color.rgb=RGBColor.from_string(TEAL) p=doc.add_paragraph();p.style='Heading 1';p.paragraph_format.space_after=Pt(8);p.add_run(text) def footer(n): p=doc.add_paragraph();p.paragraph_format.space_before=Pt(5);p.paragraph_format.space_after=Pt(0);p.alignment=WD_ALIGN_PARAGRAPH.RIGHT r=p.add_run(f'Antibiotic resistance and rational therapy in general practice | {n:02d}');r.font.size=Pt(8);r.font.color.rgb=RGBColor.from_string(GRAY) def page_break(): doc.add_page_break() def content_two_col(left_title,left_items,right_title,right_items, callout=None): t=doc.add_table(rows=1,cols=2);t.alignment=WD_TABLE_ALIGNMENT.CENTER;t.autofit=False t.columns[0].width=Inches(6.0);t.columns[1].width=Inches(6.0) for idx,(head,items) in enumerate([(left_title,left_items),(right_title,right_items)]): c=t.cell(0,idx);c.vertical_alignment=WD_CELL_VERTICAL_ALIGNMENT.TOP; shade(c, LIGHT if idx==0 else PALE);set_margins(c,150,180,150,180) set_cell_border(c,top={'val':'single','sz':'10','color':TEAL},bottom={'val':'single','sz':'4','color':'D7E3EA'},left={'val':'single','sz':'4','color':'D7E3EA'},right={'val':'single','sz':'4','color':'D7E3EA'}) add_text(c,head,18,True,NAVY) for x in items: add_text(c,x,15,False,'25364A',True) if callout: p=doc.add_paragraph();p.paragraph_format.space_before=Pt(10);p.paragraph_format.space_after=Pt(0) r=p.add_run(callout);r.bold=True;r.font.size=Pt(15);r.font.color.rgb=RGBColor.from_string(TEAL) def add_quote(text): t=doc.add_table(rows=1,cols=1);c=t.cell(0,0);shade(c,NAVY);set_margins(c,140,190,140,190) p=c.paragraphs[0];p.alignment=WD_ALIGN_PARAGRAPH.CENTER;r=p.add_run(text);r.bold=True;r.italic=True;r.font.size=Pt(18);r.font.color.rgb=RGBColor.from_string(WHITE) # 1 cover p=doc.add_paragraph();p.paragraph_format.space_before=Pt(40);p.alignment=WD_ALIGN_PARAGRAPH.CENTER r=p.add_run('ANTIBIOTIC RESISTANCE IN GENERAL PRACTICE');r.font.name='Aptos Display';r.font.size=Pt(36);r.bold=True;r.font.color.rgb=RGBColor.from_string(NAVY) p=doc.add_paragraph();p.alignment=WD_ALIGN_PARAGRAPH.CENTER;r=p.add_run('Modern approaches to rational antibiotic therapy');r.font.size=Pt(24);r.font.color.rgb=RGBColor.from_string(TEAL) add_quote('Right diagnosis • Right patient • Right drug • Right dose • Right duration') p=doc.add_paragraph();p.paragraph_format.space_before=Pt(28);p.alignment=WD_ALIGN_PARAGRAPH.CENTER;r=p.add_run('Educational presentation for primary care clinicians');r.font.size=Pt(14);r.font.color.rgb=RGBColor.from_string(GRAY) footer(1);page_break() # 2 objectives title('Learning objectives','At the end of this presentation') content_two_col('Understand',[ 'How antimicrobial resistance (AMR) emerges and why it matters in community care.', 'The difference between colonization, viral illness and probable bacterial infection.', 'How local resistance data, diagnostics and follow-up inform prescribing.' ],'Apply',[ 'A structured decision pathway before issuing an antibiotic prescription.', 'Appropriate empiric selection, review, de-escalation and stop decisions.', 'Practice-level stewardship interventions that change prescribing safely.' ], 'Scope: adults and children in general practice. Always use current local and national guidance for syndrome-specific regimens.') footer(2);page_break() #3 AMR title('Antibiotic resistance: what it is and why primary care matters','The problem') content_two_col('Definition',[ 'AMR occurs when microorganisms no longer respond to medicines designed to inhibit or kill them.', 'For bacteria, resistance may be intrinsic or acquired and can spread between organisms through mobile genetic material.', 'The result is treatment failure, limited options, adverse drug exposure and higher health-care costs.' ],'Why general practice is central',[ 'Most patient contacts occur in primary care, and WHO estimates that 80-90% of antibiotics are prescribed at this level.', 'Every avoidable course creates selection pressure at individual and community level.', 'Stewardship protects effectiveness while preserving prompt treatment for patients who truly need antibiotics.' ], 'Principle: absence of an antibiotic is not absence of care. Safety-netting, symptom relief and review are active treatment.') footer(3);page_break() #4 mechanisms title('How resistance develops and spreads','Biological basis') content_two_col('Common mechanisms',[ 'Drug inactivation: enzymes such as beta-lactamases degrade or modify antibiotics.', 'Target alteration: changed binding sites reduce drug activity.', 'Reduced permeability or active efflux lowers intracellular antibiotic concentration.', 'Biofilms and metabolic adaptation can reduce susceptibility and complicate eradication.' ],'How prescribing accelerates selection',[ 'Unnecessary therapy exposes normal flora and selects resistant organisms without patient benefit.', 'Excessively broad spectrum, prolonged duration and incorrect dose increase selection pressure.', 'Previous antibiotic exposure, recent hospital care, travel, devices and immunosuppression may increase resistant-pathogen risk.' ], 'Use the narrowest effective agent for the shortest evidence-based duration, tailored to site of infection and patient factors.') footer(4);page_break() #5 decision title('The rational prescribing decision','A repeatable five-step consultation') t=doc.add_table(rows=1,cols=5);t.alignment=WD_TABLE_ALIGNMENT.CENTER;t.autofit=False steps=[('1','Assess','Severity, red flags, host risk and source control.'),('2','Diagnose','Is bacterial infection likely? Is testing needed?'),('3','Decide','No, delayed, or immediate antibiotic strategy.'),('4','Prescribe','Guideline-concordant drug, dose, route and duration.'),('5','Review','Culture results, response, adverse effects and stop date.')] for i,(num,head,body) in enumerate(steps): c=t.cell(0,i);shade(c,PALE if i%2==0 else LIGHT);set_margins(c,150,110,150,110);c.vertical_alignment=WD_CELL_VERTICAL_ALIGNMENT.TOP set_cell_border(c,top={'val':'single','sz':'8','color':TEAL},bottom={'val':'single','sz':'4','color':'D7E3EA'},left={'val':'single','sz':'4','color':'D7E3EA'},right={'val':'single','sz':'4','color':'D7E3EA'}) add_text(c,num,22,True,TEAL);add_text(c,head,15,True,NAVY);add_text(c,body,12,False,'25364A') add_quote('Treat the patient and the syndrome - not a positive test, a discoloured sputum sample, or a request for antibiotics alone.') footer(5);page_break() #6 diagnostic title=None PY
python3 - <<'PY' from docx import Document from docx.shared import Inches, Pt, RGBColor from docx.enum.section import WD_ORIENT from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.enum.table import WD_TABLE_ALIGNMENT, WD_CELL_VERTICAL_ALIGNMENT from docx.oxml import OxmlElement from docx.oxml.ns import qn OUT='/tmp/workspace/antibiotic-rational-therapy-presentation/output/Antibiotic_Resistance_Rational_Therapy_General_Practice.docx' D=Document(); S=D.sections[0]; S.orientation=WD_ORIENT.LANDSCAPE; S.page_width=Inches(13.333); S.page_height=Inches(7.5); S.top_margin=S.bottom_margin=Inches(.45); S.left_margin=S.right_margin=Inches(.58) NAVY='17365D'; TEAL='007C83'; PALE='EAF3F5'; LIGHT='F4F7FA'; GRAY='5B6573'; WHITE='FFFFFF'; DARK='25364A' D.styles['Normal'].font.name='Aptos';D.styles['Normal'].font.size=Pt(15);D.styles['Normal'].font.color.rgb=RGBColor.from_string(DARK) for n,size,c in [('Heading 1',27,NAVY),('Title',35,NAVY)]: D.styles[n].font.name='Aptos Display';D.styles[n].font.size=Pt(size);D.styles[n].font.bold=True;D.styles[n].font.color.rgb=RGBColor.from_string(c) def sh(c,x): tcPr=c._tc.get_or_add_tcPr(); a=OxmlElement('w:shd');a.set(qn('w:fill'),x);tcPr.append(a) def mar(c): tcPr=c._tc.get_or_add_tcPr();a=OxmlElement('w:tcMar');tcPr.append(a) for n in ['top','start','bottom','end']: e=OxmlElement('w:'+n);e.set(qn('w:w'),'140');e.set(qn('w:type'),'dxa');a.append(e) def border(c): tcPr=c._tc.get_or_add_tcPr();a=OxmlElement('w:tcBorders');tcPr.append(a) for n in ['top','bottom','left','right']: e=OxmlElement('w:'+n);e.set(qn('w:val'),'single');e.set(qn('w:sz'),'6');e.set(qn('w:color'),TEAL if n=='top' else 'D7E3EA');a.append(e) def tx(c,s,size=15,bold=False,col=DARK,bul=False): p=c.paragraphs[0] if not c.paragraphs[0].text else c.add_paragraph();p.paragraph_format.space_after=Pt(6);p.paragraph_format.line_spacing=1.0 if bul:p.style='List Bullet' r=p.add_run(s);r.font.name='Aptos';r.font.size=Pt(size);r.bold=bold;r.font.color.rgb=RGBColor.from_string(col) def title(s,k=''): if k: p=D.add_paragraph();p.paragraph_format.space_after=Pt(1);r=p.add_run(k.upper());r.bold=True;r.font.size=Pt(10);r.font.color.rgb=RGBColor.from_string(TEAL) p=D.add_paragraph(style='Heading 1');p.paragraph_format.space_after=Pt(7);p.add_run(s) def foot(i): p=D.add_paragraph();p.alignment=WD_ALIGN_PARAGRAPH.RIGHT;p.paragraph_format.space_before=Pt(4);r=p.add_run(f'Antibiotic resistance and rational therapy in general practice | {i:02d}');r.font.size=Pt(8);r.font.color.rgb=RGBColor.from_string(GRAY) def quote(s): t=D.add_table(rows=1,cols=1);c=t.cell(0,0);sh(c,NAVY);mar(c);p=c.paragraphs[0];p.alignment=WD_ALIGN_PARAGRAPH.CENTER;r=p.add_run(s);r.bold=True;r.italic=True;r.font.size=Pt(17);r.font.color.rgb=RGBColor.from_string(WHITE) def cols(a,ai,b,bi,call=''): t=D.add_table(rows=1,cols=2);t.alignment=WD_TABLE_ALIGNMENT.CENTER for i,(head,items) in enumerate(((a,ai),(b,bi))): c=t.cell(0,i);sh(c,LIGHT if i==0 else PALE);mar(c);border(c);c.vertical_alignment=WD_CELL_VERTICAL_ALIGNMENT.TOP;tx(c,head,18,True,NAVY) for x in items:tx(c,x,14,False,DARK,True) if call: p=D.add_paragraph();p.paragraph_format.space_before=Pt(7);r=p.add_run(call);r.bold=True;r.font.size=Pt(14);r.font.color.rgb=RGBColor.from_string(TEAL) def br():D.add_page_break() #1 p=D.add_paragraph();p.paragraph_format.space_before=Pt(42);p.alignment=WD_ALIGN_PARAGRAPH.CENTER;r=p.add_run('ANTIBIOTIC RESISTANCE IN GENERAL PRACTICE');r.font.name='Aptos Display';r.font.size=Pt(36);r.bold=True;r.font.color.rgb=RGBColor.from_string(NAVY) p=D.add_paragraph();p.alignment=WD_ALIGN_PARAGRAPH.CENTER;r=p.add_run('Modern approaches to rational antibiotic therapy');r.font.size=Pt(24);r.font.color.rgb=RGBColor.from_string(TEAL) quote('Right diagnosis • Right patient • Right drug • Right dose • Right duration') p=D.add_paragraph();p.paragraph_format.space_before=Pt(28);p.alignment=WD_ALIGN_PARAGRAPH.CENTER;r=p.add_run('Educational presentation for primary care clinicians');r.font.size=Pt(14);r.font.color.rgb=RGBColor.from_string(GRAY);foot(1);br() #2 title('Learning objectives','At the end of this presentation') cols('Understand',['Why antimicrobial resistance (AMR) matters in community care.','How to distinguish colonization, viral illness and likely bacterial infection.','How local susceptibility patterns and diagnostics inform treatment.'],'Apply',['A structured decision pathway before prescribing.','Guideline-concordant empiric selection, review, de-escalation and stopping.','Practice-level stewardship actions that improve use safely.'],'Use current local and national guidance for syndrome-specific drug, dose and duration recommendations.');foot(2);br() #3 title('AMR: why primary care matters','The problem') cols('What AMR means',['Microorganisms no longer respond to medicines that once inhibited or killed them.','Resistance can be intrinsic or acquired, and resistance genes may spread between bacteria.','Consequences include treatment failure, adverse effects, restricted options and increased cost.'],'Why general practice is central',['WHO estimates that 80-90% of antibiotics are prescribed at primary care level.','Avoidable exposure selects resistant organisms in the individual and community.','Stewardship preserves prompt treatment for patients who genuinely need antibiotics.'],'Absence of an antibiotic is not absence of care: provide symptom relief, clear advice and safety-netting.');foot(3);br() #4 title('How bacterial resistance develops','Biological mechanisms and selection pressure') cols('Common mechanisms',['Enzymatic inactivation, for example beta-lactamase production.','Altered drug targets that reduce binding.','Reduced permeability and active efflux pumps.','Biofilm formation and metabolic adaptation that reduce susceptibility.'],'Prescribing factors that amplify selection',['Unnecessary therapy exposes normal flora without clinical benefit.','Overly broad spectrum, wrong dose and excessive duration exert added selection pressure.','Recent antibiotics, hospital care, travel, devices and immunosuppression may raise resistant-pathogen risk.'],'Aim for the narrowest effective agent, at the correct exposure, for the shortest evidence-based duration.');foot(4);br() #5 title('The rational prescribing decision','A five-step consultation') t=D.add_table(rows=1,cols=5);t.alignment=WD_TABLE_ALIGNMENT.CENTER for i,(n,h,b) in enumerate([('1','Assess','Severity, red flags, host risk and source control.'),('2','Diagnose','Is bacterial infection likely? Is testing needed?'),('3','Decide','No, delayed, or immediate antibiotic strategy.'),('4','Prescribe','Guideline-concordant drug, dose, route and duration.'),('5','Review','Results, response, adverse effects and stop date.')]): c=t.cell(0,i);sh(c,PALE if i%2==0 else LIGHT);mar(c);border(c);tx(c,n,22,True,TEAL);tx(c,h,15,True,NAVY);tx(c,b,12) quote('Treat the patient and syndrome - not a test result, discoloured sputum, or a request for antibiotics alone.') foot(5);br() #6 title('Modern diagnostic stewardship','Improve certainty before treatment') cols('At the consultation',['Use validated clinical scores only where locally recommended.','Test when the result will change management: targeted swab, urine culture or point-of-care testing.','Obtain cultures before antibiotics when feasible in severe infection or treatment failure.','Avoid testing asymptomatic patients when results will represent colonization.'],'Interpret results in context',['A positive microbiological test does not always equal infection.','Consider pre-test probability, sampling quality, illness severity and alternative diagnoses.','Review microbiology promptly: stop therapy if bacterial infection becomes unlikely; narrow therapy when possible.'],'Point-of-care C-reactive protein testing, used with communication strategies, can reduce antibiotic prescribing for respiratory presentations in suitable settings.');foot(6);br() #7 title('Choosing the right prescribing strategy','Not every patient needs an immediate prescription') cols('No antibiotic',['Likely viral/self-limiting illness without features of bacterial disease.','Give a positive management plan: analgesia, hydration, expected course and red flags.','Document diagnostic reasoning and return precautions.'],'Delayed or immediate antibiotic',['Delayed prescription: selected stable patients where benefit is uncertain and follow-up is reliable.','Immediate therapy: likely bacterial infection with meaningful expected benefit, severe disease, high-risk host or sepsis concern.','Urgent escalation: systemic instability, suspected meningitis, necrotizing infection, severe pneumonia or other red flags.'],'Shared decision-making and a written safety-net plan reduce uncertainty without defaulting to an antibiotic.');foot(7);br() #8 title('If antibiotics are indicated','Optimize the prescription') cols('Select thoughtfully',['Use first-line local guidance and local antibiogram data.','Match spectrum to the likely pathogen and anatomic site.','Account for allergy history, pregnancy, renal/hepatic function, interactions and prior culture results.','Choose oral therapy when bioavailability and clinical condition allow.'],'Specify and communicate',['Correct dose, interval, route and evidence-based duration.','Indication and review/stop date in the record.','Expected benefit, adverse effects and when to seek review.','Avoid leftover medicines and do not share antibiotics.'],'Avoid routine broad-spectrum combinations and avoid extending treatment "just in case" without a clinical indication.');foot(8);br() #9 title('Review, de-escalate, stop','The prescription is not the end of the decision') cols('At 48-72 hours or when data arrive',['Is the diagnosis still credible?','Has the patient improved clinically?','Do culture and susceptibility findings permit narrowing?','Is there a non-infectious source or need for drainage/source control?'],'Actions',['Stop when infection is not supported.','De-escalate from broad to narrow spectrum.','Switch IV to oral when appropriate, in settings where IV started.','Adjust dose for organ dysfunction or toxicity and set a final stop date.'],'Do not label early lack of improvement as resistance automatically: reassess diagnosis, complications, adherence and source control.');foot(9);br() #10 title('Practice-level antimicrobial stewardship','Make the right action the easy action') cols('Core interventions',['Visible clinical leadership and a named stewardship champion.','Syndrome-specific guidelines embedded in the electronic record.','Audit and feedback on prescribing rates, agent selection and duration.','Peer comparison and accountable justification for non-guideline prescribing.'],'Supportive systems',['Local antibiogram and resistance alerts.','Access to microbiology, pharmacist and infectious-disease advice.','Patient education materials and consistent reception-team messaging.','Monitoring of adverse events, C. difficile where relevant, and resistance trends.'],'Track, report and educate: feedback should be non-punitive, timely and connected to clinical outcomes.');foot(10);br() #11 title('Communication that supports appropriate care','Managing expectations') cols('What to say',['“This looks most consistent with a viral infection, and antibiotics will not help it resolve faster.”','“The safest plan is symptom treatment plus a clear plan for when to contact us.”','“If symptoms worsen, persist beyond the expected course, or red flags occur, seek review.”'],'What to provide',['Specific self-care options and expected illness trajectory.','Written return precautions and a contact route.','A delayed prescription only when clinically suitable, with explicit instructions on when to use it.','Clear explanation of common antibiotic harms: diarrhea, allergy, interactions and resistance.'],'Patients generally value a careful examination, explanation and safety net more than an antibiotic prescription.');foot(11);br() #12 title('Take-home algorithm','Use in every consultation') quote('1. Assess severity and red flags → 2. Establish likelihood of bacterial disease → 3. Test only if it changes management → 4. Choose no, delayed or immediate treatment → 5. If prescribed, use targeted therapy and planned review') cols('Five rules',['Do not prescribe for clearly viral or non-infectious illness.','Use local guidelines and the narrowest effective option.','Write indication, dose, duration and review/stop date.'],'Five safeguards',['Check allergy and host factors.','Use safety-netting and follow-up.','Review culture results and de-escalate.','Measure your prescribing patterns.','Educate patients and the practice team.']) foot(12);br() #13 refs title('Selected references','For local adaptation and further reading') refs=['World Health Organization. Strengthening primary health care to address antimicrobial resistance. 23 April 2025.','World Health Organization. Promoting antimicrobial stewardship to tackle antimicrobial resistance. Accessed October 2026.','Red Book 2021: Report of the Committee on Infectious Diseases. Actions to Prevent or Slow Antimicrobial Resistance, pp. 1326 onward.','Tietz Textbook of Laboratory Medicine, 7th ed. Use of C-reactive Protein in Primary Care to Reduce Antibiotic Prescribing, p. 921.','Dolatkhah Laein G, et al. Telemedicine interventions for improving antibiotic stewardship and prescribing: a systematic review. PLoS One. 2025. PMID: 40179108.'] t=D.add_table(rows=1,cols=1);c=t.cell(0,0);sh(c,LIGHT);mar(c);border(c) for r in refs:tx(c,r,15,False,DARK,True) p=D.add_paragraph();p.paragraph_format.space_before=Pt(12);r=p.add_run('Clinical disclaimer: This educational material does not replace local guidelines, antimicrobial susceptibility data, or patient-specific clinical judgment.');r.bold=True;r.font.size=Pt(12);r.font.color.rgb=RGBColor.from_string('B85450') foot(13) D.save(OUT) print(OUT) PY python3 - <<'PY' from docx import Document p='/tmp/workspace/antibiotic-rational-therapy-presentation/output/Antibiotic_Resistance_Rational_Therapy_General_Practice.docx' d=Document(p) print('pages', len([x for x in d.paragraphs if 'Antibiotic resistance and rational' in x.text]), 'paras',len(d.paragraphs),'tables',len(d.tables)) PY
python3 - <<'PY' from docx import Document from pathlib import Path p=Path('/tmp/workspace/antibiotic-rational-therapy-presentation/output/Antibiotic_Resistance_Rational_Therapy_General_Practice.docx') d=Document(p) assert p.exists() and p.stat().st_size > 10000 texts='\n'.join(x.text for x in d.paragraphs) for phrase in ['ANTIBIOTIC RESISTANCE IN GENERAL PRACTICE','The rational prescribing decision','Selected references']: assert phrase in texts, phrase assert len(d.tables) >= 15 assert len(d.sections)==1 and d.sections[0].orientation is not None print(f'Validated: {p.name} | {p.stat().st_size:,} bytes | {len(d.tables)} formatted tables | {len(d.paragraphs)} paragraphs') PY
Antibiotic resistance in general practice: modern approaches to rational antibiotic therapy.make a word document presentation
antibiotic stewardship primary care
WHO antimicrobial resistance primary care rational antibiotic therapy stewardship
/tmp/workspace
Antibiotic Resistance Rational Therapy General Practice
Word Document · DOCX