Template:AntibioticDose
AntibioticDose Template
This template creates a single source of truth for antibiotic dosing on disease pages. It displays the drug name and dose as visible text, and simultaneously creates an SMW subobject linking the antibiotic to the disease.
The SMW subobject is only created when the template is used on a main namespace page (not on Template: pages), preventing duplicate data.
Usage
{{AntibioticDose|drug=Ceftriaxone|dose=1-2g IV daily|context=Inpatient, CAP Non-ICU|disease=Aspiration pneumonia and target=pneumonitis|population=Adult}}
{{AntibioticDose|drug=Ceftriaxone|dose=50-100mg/kg/day IV|context=CAP|disease=Pneumonia|population=Pediatric}}
Parameters
- drug (required): The antibiotic page name (e.g., Ceftriaxone, Azithromycin)
- dose (required): The dosing text (e.g., 1-2g IV daily, 500mg PO BID)
- context (required): Clinical context (e.g., Outpatient Healthy, Inpatient CAP Non-ICU, ICU Low Risk)
- disease (required): The disease page name this dosing is for (e.g., Pneumonia, Septic arthritis). This ensures the correct disease is recorded regardless of which page transcludes the template.
- population (optional): "Adult" or "Pediatric". Defaults to "Adult" if omitted.
- display (optional): Custom display text for the drug link. If omitted, uses the drug name
- link (optional): Set to "no" to show only the dose text without the drug link
Output
Renders: display dose (or just dose if link=no)
Creates SMW subobject (on main namespace pages only) with: Has DrugName, Has Dose, Has Context, Treats disease (set from disease parameter), Has Population
