Priscription of diarrhea
25years old 2 days Fever No medications
acute diarrhea AND treatment
CDC adult acute diarrhea fever when to seek medical care oral rehydration loperamide fever
Create a quick reference PDF for diarrhea care
~/
acute diarrhea AND oral rehydration
CDC acute diarrhea adults fever oral rehydration loperamide medical care
mkdir -p "/tmp/workspace/diarrhea-care-pdf/src" "/tmp/workspace/diarrhea-care-pdf/output" && python - <<'PY' from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.enums import TA_CENTER from reportlab.lib.units import mm from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, KeepTogether from reportlab.pdfbase.ttfonts import TTFont from reportlab.pdfbase import pdfmetrics from reportlab.lib.colors import HexColor from reportlab.pdfbase.pdfmetrics import stringWidth from reportlab.platypus import HRFlowable from reportlab.pdfbase.pdfmetrics import registerFontFamily from reportlab.pdfbase.ttfonts import TTFont from reportlab.pdfbase import pdfmetrics out='/tmp/workspace/diarrhea-care-pdf/output/Diarrhea_Care_Quick_Reference.pdf' doc=SimpleDocTemplate(out,pagesize=A4,rightMargin=17*mm,leftMargin=17*mm,topMargin=14*mm,bottomMargin=14*mm) styles=getSampleStyleSheet() styles.add(ParagraphStyle(name='Title2', parent=styles['Title'], fontName='Helvetica-Bold', fontSize=21, leading=25, textColor=HexColor('#0B3954'), alignment=TA_CENTER, spaceAfter=3*mm)) styles.add(ParagraphStyle(name='Sub', parent=styles['Normal'], fontName='Helvetica', fontSize=9.5, leading=13, alignment=TA_CENTER, textColor=HexColor('#455A64'), spaceAfter=5*mm)) styles.add(ParagraphStyle(name='H', parent=styles['Heading2'], fontName='Helvetica-Bold', fontSize=12.5, leading=15, textColor=HexColor('#0B3954'), spaceBefore=3*mm, spaceAfter=2*mm)) styles.add(ParagraphStyle(name='Body2', parent=styles['BodyText'], fontName='Helvetica', fontSize=9.6, leading=13.2, textColor=HexColor('#182B36'))) styles.add(ParagraphStyle(name='Small', parent=styles['BodyText'], fontName='Helvetica', fontSize=8, leading=10.5, textColor=HexColor('#455A64'))) styles.add(ParagraphStyle(name='Alert', parent=styles['BodyText'], fontName='Helvetica-Bold', fontSize=10.3, leading=14, textColor=HexColor('#7A1F1F'))) def bullet(txt): return Paragraph('• '+txt, styles['Body2']) def box(title, content, bg, border, textstyle='Body2'): elems=[Paragraph(title, styles['H']), content] t=Table([[elems]], colWidths=[176*mm]) t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor(bg)),('BOX',(0,0),(-1,-1),0.7,HexColor(border)),('LEFTPADDING',(0,0),(-1,-1),4*mm),('RIGHTPADDING',(0,0),(-1,-1),4*mm),('TOPPADDING',(0,0),(-1,-1),2*mm),('BOTTOMPADDING',(0,0),(-1,-1),3*mm)])) return t story=[] story += [Paragraph('Diarrhea Care: Quick Reference',styles['Title2']),Paragraph('For adults with sudden-onset loose stools. This handout is general guidance, not a diagnosis or a prescription.',styles['Sub'])] fever=Paragraph('<b>Your situation: diarrhea for 2 days with fever.</b> Arrange a same-day medical assessment. Do not self-start antibiotics. A clinician may need to check for a bacterial or other infection and decide whether testing or treatment is appropriate.',styles['Alert']) story += [box('Important for you', fever, '#FFF3F2', '#C5564B'), Spacer(1,4*mm)] hydration=[bullet('<b>Use oral rehydration solution (ORS)</b> from a packet, mixed exactly as directed. Take frequent small sips.'),bullet('After each loose stool, drink roughly <b>200-250 mL</b> (about 1 cup) of ORS or other safe fluid, as tolerated.'),bullet('If nausea occurs, take 1-2 sips every few minutes and gradually increase.'),bullet('Monitor urine. Passing very little or very dark urine can indicate dehydration.')] story += [box('1. Replace fluids and salts', hydration, '#EDF7FA', '#4C9EB4'),Spacer(1,3*mm)] care=[bullet('<b>Eat if you can:</b> small meals such as rice, toast, bananas, soup, potatoes, or other plain foods.'),bullet('Avoid alcohol, very fatty foods, and drinks that are unsafe or unpasteurized.'),bullet('<b>Fever/pain:</b> paracetamol (acetaminophen) may be used if it is safe for you. Follow the label. Do not combine products that both contain paracetamol.'),bullet('<b>Do not take loperamide/Imodium</b> when diarrhea occurs with fever, or if there is blood/mucus in stool.'),bullet('<b>Do not use antibiotics without medical advice.</b> They are not appropriate for every cause and can sometimes cause harm.')] story += [box('2. What to do and avoid', care, '#F7F8F4', '#9BAA78'),Spacer(1,3*mm)] urgent=[bullet('<b>Go to urgent care/emergency now</b> for blood or black stool; severe or worsening abdominal pain; confusion, fainting, or marked weakness; repeated vomiting or inability to keep fluids down; or very little urine.'),bullet('<b>Seek same-day medical advice</b> for fever with diarrhea, symptoms worsening, or diarrhea lasting more than 48 hours.'),bullet('Higher-risk people should seek care earlier: pregnancy, age over 65, immune suppression, kidney/heart disease, or recent antibiotic use.')] story += [box('3. When to get help', urgent, '#FFF4E6', '#D68A2C'),Spacer(1,3*mm)] prevent=[bullet('Wash hands with soap and water after using the toilet and before preparing food.'),bullet('Do not prepare food for others until 48 hours after diarrhea has stopped, if possible.'),bullet('Use safe drinking water and eat thoroughly cooked food.')] story += [box('4. Reduce spread', prevent, '#F4F2FA', '#8673B5'),Spacer(1,4*mm)] story += [HRFlowable(width='100%', thickness=0.5, color=HexColor('#BBC9CF')), Spacer(1,2*mm),Paragraph('<b>Sources:</b> CDC guidance identifies fluid and electrolyte replacement as a key part of diarrhea care and advises against antimotility drugs alone for diarrhea with fever or bloody stool. Park\'s Textbook of Preventive and Social Medicine describes oral rehydration as the cornerstone of acute diarrhea treatment. Prepared 22 September 2026.',styles['Small'])] doc.build(story) print(out) PY python - <<'PY' from pypdf import PdfReader p='/tmp/workspace/diarrhea-care-pdf/output/Diarrhea_Care_Quick_Reference.pdf' r=PdfReader(p) print('exists', len(r.pages), 'pages') print(r.pages[0].extract_text()[:600]) PY
Diarrhea Care Quick Reference
PDF Document · PDF