Template:MedicationDose

Revision as of 15:19, 20 March 2026 by Danbot (talk | contribs) (Create MedicationDose template — single source of truth for non-antibiotic medication dosing with SMW subobjects)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

MedicationDose Template

This template creates a single source of truth for non-antibiotic medication dosing on WikEM. It displays the drug name and dose as visible text, and simultaneously creates an SMW subobject linking the medication to its clinical indication/context.

The SMW subobject is only created when:

  1. The template is used on a main namespace page (not on Template: pages)
  2. The current page name matches the indication parameter (prevents duplicates from aggregation pages)

For antibiotic dosing, use {{AntibioticDose}} instead.

Usage

*{{MedicationDose|drug=Ketamine|dose=1-2 mg/kg IV|route=IV|context=Induction|indication=Rapid sequence intubation|population=Adult|onset=1 min|duration=10-20 min}}
*{{MedicationDose|drug=Lorazepam|dose=0.1 mg/kg (max 4 mg)|route=IV|context=1st line benzodiazepine|indication=Status epilepticus|population=Adult|max_dose=4 mg}}
*{{MedicationDose|drug=Norepinephrine|dose=0.01-2 mcg/kg/min|route=IV drip|context=1st line vasopressor|indication=Vasopressors|population=Adult|notes=1st line for septic shock (SSC 2021)}}

Parameters

  • drug (required): The medication page name (e.g., Ketamine, Propofol, Norepinephrine)
  • dose (required): The dosing text (e.g., 1-2 mg/kg IV, 0.3 mg/kg bolus)
  • context (required): Clinical context/role (e.g., Induction, Paralytic, 1st line benzodiazepine, Premedication)
  • indication (required): The page name where this dose is used (e.g., Rapid sequence intubation, Status epilepticus, Procedural sedation, Vasopressors). Must match the transcluding page name for SMW subobjects to be created.
  • population (optional): "Adult" or "Pediatric". Defaults to "Adult".
  • route (optional): Route of administration (e.g., IV, IM, IN, IV drip, PO, PR)
  • onset (optional): Onset of action (e.g., 1 min, 45 sec)
  • duration (optional): Duration of action (e.g., 10-20 min, 3-8 min)
  • max_dose (optional): Maximum dose (e.g., 4 mg, 300 mg)
  • 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.
  • notes (optional): Brief clinical note displayed in italics after the dose.

Output

Renders as: drug dose (route), onset X, duration Y (max Z) — notes

Creates SMW subobject (only on the matching indication page in main namespace) with properties: Has DrugName, Has Dose, Has Context, Has Indication, Has Population, Has Route, Has Onset, Has Duration, Has MaxDose

SMW Queries

On a drug page, to show all indications where the drug is used:

{{#ask:[[Has DrugName::Ketamine]]
 |?Has Indication
 |?Has Dose
 |?Has Context
 |?Has Population
 |?Has Route
 |format=broadtable
 |headers=plain
}}