Template:AntibioticDose
AntibioticDose Template
This template is the single source of truth for antibiotic and medication dosing on WikEM. When you add dosing to a disease page using this template, it does two things:
- Displays the drug name (as a link) and dose on the disease page
- Automatically populates the drug's page with that dosing information via a dynamic table
This means you only need to enter or update a dose in one place (the disease page), and it will appear on both the disease page and the drug page.
When to Use This Template
Use {{AntibioticDose}} whenever you are listing a specific medication dose on a disease or condition page. It replaces manually typing something like:
*[[Ceftriaxone]] 1-2g IV daily
with:
*{{AntibioticDose|drug=Ceftriaxone|dose=1-2g IV daily|context=Inpatient CAP|disease=Pneumonia (main)|population=Adult}}
Both display the same thing on the disease page, but the template version also makes the dose appear in the dynamic table on the Ceftriaxone page.
Basic Usage
{{AntibioticDose|drug=Ceftriaxone|dose=1-2g IV daily|context=Inpatient, CAP Non-ICU|disease=Pneumonia (main)|population=Adult}}
{{AntibioticDose|drug=Ceftriaxone|dose=50-100mg/kg/day IV|context=CAP|disease=Pneumonia (main)|population=Pediatric}}
Parameters
| Parameter | Required? | Description | Example |
|---|---|---|---|
drug |
Yes | The exact page name of the drug on WikEM. Must match the drug's wiki page title. | Ceftriaxone, Amoxicillin/Clavulanate |
dose |
Yes | The dosing text exactly as you want it displayed. Include dose, route, frequency, and duration when applicable. | 1-2g IV daily, 500mg PO BID x 10 days |
context |
Yes | Clinical context describing when this dose applies. Helps differentiate the same drug used for different scenarios. | Outpatient, Inpatient Non-ICU, First-line, PCN allergy alternative, Prophylaxis |
disease |
Yes | The exact page name of the disease on WikEM. Must match the disease's wiki page title (use the canonical name, not a redirect). | Pneumonia (main), Acute cystitis, Pelvic inflammatory disease |
population |
No | "Adult" or "Pediatric". Defaults to "Adult" if omitted. | Adult, Pediatric |
display |
No | Custom display text for the drug link, if different from the page name. | TMP-SMX (instead of Trimethoprim-Sulfamethoxazole DS) |
link |
No | Set to "no" to show only the dose text without a drug link. Useful when the drug name is already shown nearby. | no |
Examples
Adding an antibiotic to a disease page
On the Pharyngitis page, in the Management section:
===First-line===
*{{AntibioticDose|drug=Amoxicillin|dose=500mg PO TID x 10 days|context=First-line|disease=Pharyngitis|population=Adult}}
*{{AntibioticDose|drug=Amoxicillin|dose=50mg/kg/day divided BID-TID x 10 days (max 1g/day)|context=First-line|disease=Pharyngitis|population=Pediatric}}
===Alternative (PCN allergy)===
*{{AntibioticDose|drug=Azithromycin|dose=500mg day 1, then 250mg daily x 4 days|context=PCN allergy|disease=Pharyngitis|population=Adult}}
Using inside an antibiotic sub-template
Many disease pages use an antibiotic sub-template (e.g., {{Pharyngitis antibiotics}}). Place the AntibioticDose calls inside that template. The disease parameter must still match the disease page name where the template is transcluded:
<!-- Inside Template:PID antibiotics -->
*{{AntibioticDose|drug=Ceftriaxone|dose=500mg IM x1|context=First-line with doxycycline|disease=Pelvic inflammatory disease|population=Adult}}
Using display and link parameters
<!-- Show TMP-SMX instead of the full page name -->
*{{AntibioticDose|drug=Trimethoprim-Sulfamethoxazole DS|dose=1 DS tab PO BID x 3 days|context=First-line|disease=Acute cystitis|display=TMP-SMX|population=Adult}}
<!-- Show dose only, no drug link (when drug name is already listed above) -->
*{{AntibioticDose|drug=Vancomycin|dose=15-20mg/kg IV q8-12h|context=MRSA coverage|disease=Septic arthritis|link=no|population=Adult}}
Important Rules
- Drug names must be exact page names. Use the canonical (non-redirect) page name. For example, use
Amoxicillin/Clavulanatenot "Augmentin", andTrimethoprim-Sulfamethoxazole DSnot "TMP-SMX" or "Bactrim". You can use thedisplayparameter to show a shorter name. - Disease names must be exact page names. Use the canonical page name. For example, use
Acute cystitisnot "UTI", andNeisseria gonorrhoeaenot "Gonorrhea". If unsure, search WikEM for the disease and check what the page title is. - The disease parameter must match the page the template lives on. If you put an AntibioticDose call on the Pneumonia (main) page (or a template transcluded there), the disease parameter must be
disease=Pneumonia (main). This is how the system prevents duplicate entries when templates are shared across pages. - One dose per template call. If a drug has different doses for different scenarios (e.g., outpatient vs inpatient), use separate AntibioticDose calls with different
contextvalues. - Always specify population for pediatric doses. Adult is the default, so you must explicitly set
population=Pediatricfor any pediatric dosing. - Purge after editing. After adding or changing AntibioticDose entries, you may need to purge the drug page to refresh the dynamic table. To purge, add
?action=purgeto the end of the drug page URL and reload.
How It Works
Each AntibioticDose call creates a Semantic MediaWiki (SMW) subobject with five properties: Has DrugName, Treats disease, Has Dose, Has Context, and Has Population.
Drug pages (like Ceftriaxone) use an {{#ask}} query to dynamically pull all entries referencing that drug, creating an auto-updating "Indications by Disease" table. This means:
- Updating a dose on the disease page automatically updates it on the drug page - no need to edit both pages
- Adding a new indication only requires editing the disease page
- Removing an indication only requires removing the AntibioticDose call from the disease page
Troubleshooting
- Drug page table is empty or not updating: Purge the disease page first (
?action=purge), then purge the drug page. SMW sometimes needs both pages refreshed. - Dose shows on the disease page but not on the drug page: Check that the
diseaseparameter exactly matches the disease page name (case-sensitive, including parentheses). Also check that the template is not inside<translate>tags, which block SMW. - Duplicate entries on drug page: The same AntibioticDose call may be transcluded from multiple pages. Ensure the
diseaseparameter matches only one page name. - Red link for drug name: The drug parameter does not match any existing WikEM page. Check the spelling and use the exact page title.
Common Drug Name Mappings
If the commonly used name differs from the WikEM page title, use the page title for drug and the common name for display:
| Common Name | WikEM Page Name (use for drug=) |
|---|---|
| Augmentin | Amoxicillin/Clavulanate |
| Unasyn | Ampicillin/Sulbactam |
| Zosyn | Piperacillin/Tazobactam |
| Bactrim, TMP-SMX | Trimethoprim-Sulfamethoxazole DS |
| Primaxin | Imipenem/Cilastatin |
