Burn Pain Engine Rules Reference
This document summarizes the current rules implemented in the burn pain decision engine. It reflects the logic
in heliohost-root/httpdocs/assets/decision-engine.js and the medication data in
heliohost-root/httpdocs/data/medications.json as of March 3, 2026.
1. Required Baseline Classes
| Class | Engine Group | Medication Choices | Rule |
|---|---|---|---|
| Tylenol | Tylenol |
Acetaminophen | Add unless contraindicated. |
| NSAID | NSAID |
Celecoxib or Ketorolac | Add one NSAID unless renal risk or other contraindication is present. |
| GABA | GABA |
Gabapentin or Pregabalin | Add one GABA agent unless excluded; do not duplicate class. When older age, renal impairment, delirium risk, or respiratory risk is tagged, prefer pregabalin. |
The engine prefers filling missing baseline classes before maximizing a single medication.
2. Pain-Band Rules
| Pain Score | Top Suggestion Logic |
|---|---|
0-1 |
Suggest opioid weaning first. Opioids are de-escalated before other classes. |
<3 |
If hydromorphone exists and baseline classes are missing, suggest adding missing baseline classes and beginning hydromorphone wean. If baseline classes already exist, suggest keeping the current baseline regimen. |
3-5 |
Moderate/actionable pain range. Complete missing baseline classes first. Selected non-opioid escalation is considered once pain is above 4/10.
|
6-10 |
Severe pain range. Top suggestion includes baseline completion, selected non-opioid escalation, and opioid escalation. Hydromorphone CR rebalance is added when the local CR rule is triggered. |
3. Hydromorphone Rules
HM CR rebalance rule
- Triggered when total hydromorphone dose is more than
10 mg/day. - Triggered only if PO route is available.
- Triggered only if current HM CR is less than
50%of the total hydromorphone daily dose. - Suggested HM CR target is approximately
50%of total hydromorphone dose. - Target is rounded to the HM CR step size of
3 mg/day. - Target is bounded to the HM CR reference range of
3-36 mg/day. - When this rule fires, the engine adds the remark: consider lowering HM IR as HM CR is increased.
- This exact
>10 mg/dayand50%CR conversion threshold is treated as a local protocol rule.
Severe-pain opioid escalation
- If pain is in the severe range (
6-10/10), the engine can suggest increasing HM IR or HM CR by one step. - HM IR is formatted as
q6h PRNequivalents in the output. - HM CR is formatted as
daily,BID, orTIDdepending on the computed total. Doses up to6 mg/daydisplay asdaily.
4. Non-Opioid Escalation Rules
- If pain is above
4/10, the engine suggests adding or increasing selected non-opioid medications. - If pain is in the severe range (
6-10/10), the engine suggests both non-opioid and opioid escalation. - Venlafaxine is the default antidepressant-class adjunct, but it opens only when all three baseline classes are already active.
- If venlafaxine is already active and pain remains above
4/10with all baseline classes in place, the engine suggests titrating toward150 mg/daybefore switching to a different antidepressant-class adjunct. - Ketamine is suggested when pain is in the severe range, or when pain is above
4/10with elevated hydromorphone IR requirement (>= 6 mg/day) or4+PRN doses in 12 hours. - Ketamine add-dosing starts at
0.2 mg/kg/hrfor non-severe qualifying cases and0.4 mg/kg/hrfor severe pain in this model. - An alpha-2 adjunct pathway opens when pain is above
4/10or agitation is present. - Clonidine is suggested when that alpha-2 pathway is open, enteral route is available, and there is no hemodynamic contraindication.
- Dexmedetomidine is used instead of clonidine when the alpha-2 pathway is open but
PO/NGTis unavailable,IVis available, and hemodynamics allow. This should be treated as a monitored-setting/local-protocol recommendation. - Ketorolac IV is preferred over celecoxib when pain is in the high/severe range and
IVis available, even ifPO/NGTis also available. - The engine prefers lower-dose additions from different classes over pushing one existing medication to its maximum dose.
- For existing baseline medications, optimization uses the next step, not an immediate jump to the maximum documented dose.
Literature basis: ABA burn pain guideline supports ketamine as an opioid-sparing adjunct and alpha-2 agonists for anxiety/withdrawal contexts.
The exact hydromorphone trigger and the 0.4 mg/kg/hr severe-pain ketamine start are implemented here as local protocol choices within the subanesthetic infusion range.
5. Renal Adjustment Rules
If the Renal checkbox is selected, the engine applies a conservative renal adjustment consistent
with roughly GFR/CrCl 30 or lower for gabapentinoids.
| Medication | Standard Range | Renal Range Used by Engine | Output Format |
|---|---|---|---|
| Gabapentin | 300-900 mg/day |
300-700 mg/day |
Shown as daily under renal impairment |
| Pregabalin | 50-900 mg/day |
50-150 mg/day |
Shown as daily or BID under renal impairment |
Because the UI uses a yes/no renal checkbox rather than numeric eGFR, the engine uses one conservative renal bucket.
6. Exclusion and Penalty Rules
- Acetaminophen is excluded if hepatic impairment is selected.
- NSAIDs are excluded if renal impairment is selected.
- Alpha-2 agonists are avoided with bradycardia or hypotension risk.
- Medications with sedative or cognitive burden are down-ranked with delirium and respiratory risk.
- Agitation can partially offset that penalty for sedating medications.
- Ketamine is down-ranked if significant psychiatric history is selected.
- Only one medication per duplicate-sensitive class is preferred: NSAID, GABA, Alpha-2 agonist, SSRI/TCA.
7. Age > 65 Toggle
The engine now applies conservative geriatric ranking penalties when Age > 65 is checked.
These are ranking and warning adjustments, not hard age-based dose caps.
Active age-based rules
- Opioids are down-ranked in older adults, with an additional penalty when respiratory risk or delirium is also present.
- Gabapentin and pregabalin are down-ranked in older adults, especially when opioids, respiratory risk, or delirium are also present.
- When a GABA agent is still needed in that context, pregabalin is preferred over gabapentin.
- Clonidine is down-ranked in older adults, but agitation partially offsets that penalty.
- Dexmedetomidine is down-ranked in older adults, but severe pain with agitation partially offsets that penalty.
- Nortriptyline is strongly down-ranked in older adults because of anticholinergic, cognitive, and fall-related burden.
- Older-adult warnings are added to the output for opioids, gabapentinoids, clonidine, dexmedetomidine, and nortriptyline.
Evidence basis used for these conservative penalties: hydromorphone geriatric sensitivity from DailyMed labeling, FDA gabapentinoid respiratory warning, dexmedetomidine geriatric bradycardia/hypotension labeling, and the 2023 AGS Beers Criteria for nortriptyline caution.
8. Output Rules
- Ranked outputs show one medication per option.
- The summary block at the top can contain multiple actions when the pain-band logic requires a combined plan.
- The top suggestion is selectable in the UI and is toggled on by default.
- Output dosing is shown as dose plus interval, for example
q6h,BID,TID,daily, orcontinuous. - The engine returns up to
5ranked options. - The top ranked option is preselected in the UI.
9. Current Medication Dose Steps
| Medication | Range | Step | Default when tagged |
|---|---|---|---|
| Hydromorphone IR | 2-48 mg/day | 2 mg | 2 mg/day |
| Hydromorphone CR | 3-36 mg/day | 3 mg | 6 mg/day |
| Fentanyl | 25-300 mcg/hr | 25 mcg/hr | 25 mcg/hr |
| Gabapentin | 300-900 mg/day | 300 mg | 300 mg/day |
| Pregabalin | 50-900 mg/day | 50 mg | 200 mg/day |
| Ketamine | 0.1-0.4 mg/kg/hr | 0.1 | 0.1 mg/kg/hr |
| Clonidine | 0.3-0.9 mg/day | 0.3 mg | 0.3 mg/day |
| Nortriptyline | 10-100 mg/day | 10 mg | 10 mg/day |
| Methadone | 9-30 mg/day | 1 mg | 9 mg/day |
| Venlafaxine | 75-300 mg/day | 75 mg | 75 mg/day |
| Duloxetine | 30-120 mg/day | 30 mg | 30 mg/day |
When the engine recommends starting a medication, it uses the configured default dose for that medication, adjusted to the active renal range when needed.
10. Medication Reference From Burn_Pain_Drugs_Table_from_v1_v4
This section mirrors the source spreadsheet fields and adds the active engine min/max range where the web model currently uses a dose slider.
Source file: /Users/noamgoder/Documents/QI/Burn_Pain_Drugs_Table_from_v1_v4.xlsx.
| Class | Medication | Pain Level | Route | Starting Dose | Max Dose | Engine Min-Max | Limitations / Contraindications | Sedation | Rules |
|---|---|---|---|---|---|---|---|---|---|
| Tylenol | Acetaminophen | Low | PO/NGT | 500 mg q6h | 1 g q6h | 2000-4000 mg/day | Hepatic failure | No | Give unless CI |
| NSAID | Celecoxib | Low | PO/NGT | 200 mg BID | 200 mg BID | 400 mg/day fixed | AKI/renal risk | No | Give unless CI or on ketorolac |
| NSAID | Ketorolac | Mod | IV | 7.5 mg q6h | 7.5 mg q6h | 30 mg/day fixed | AKI/renal risk | No | Max 4 days; do not combine with celecoxib |
| Opioid | Hydromorphone IR | High | PO/IV | 0.2-0.4 mg q4h | Per protocol | 2-48 mg/day | Respiratory risk | Yes | Short-acting hydromorphone for breakthrough pain |
| Opioid | Hydromorphone CR | High | PO | 3 mg BID | 10 mg TID | 3-36 mg/day | Respiratory risk | Yes | Combine with hydromorphone IR PRN |
| Opioid | Fentanyl | High | IV | 50 mcg | Per protocol | 25-300 mcg/hr | Respiratory risk | Yes | Uncontrollable pain |
| GABA | Gabapentin | Mod | PO/NGT | 100 mg TID | 300 mg TID | 300-900 mg/dayrenal: 300-700 mg/day | Renal adjustment | Yes | Give one from class unless CI |
| GABA | Pregabalin | Mod | PO/NGT | 50 mg BID | 300 mg/day | 50-900 mg/dayrenal: 50-150 mg/day | Renal adjustment | Source table: No Active engine: Yes | Give one from class unless CI |
| NMDA | Ketamine | High (Procedural) | IV | 0.2 mg/kg/hr | 0.4 mg/kg/hr | 0.1-0.4 mg/kg/hr | Psych history caution | Yes | Adjunctive ketamine option |
| Alpha-2 Agonist | Clonidine | Adjunct | PO/NGT | 0.1 mg q8h | 0.3 mg q8h | 0.3-0.9 mg/day | Hypotension/bradycardia | Yes | 1 of class |
| Alpha-2 Agonist | Dexmedetomidine | Adjunct | IV | Per protocol | Per protocol | Protocol only | Hypotension/bradycardia | Yes | 1 of class |
| SSRI/TCA | Nortriptyline | Adjunct | PO/NGT | 10 mg HS | 100 mg HS | 10-100 mg/day | QT prolongation | Yes | 1 of class |
| Opioid (Maintenance) | Methadone | High | PO | Per protocol | Per protocol | 9-30 mg/day | QT prolongation | Yes | Can be combined with hydromorphone IR/CR |
| SSRI/TCA | Venlafaxine | Low | PO | 75 mg daily | 300 mg daily | 75-300 mg/day | No | 1 of class | |
| SSRI/TCA | Venlafaxine (NGT) | Low | NGT | 37.5 mg BID | 150 mg BID | 75-300 mg/day | No | 1 of class | |
| SSRI/TCA | Duloxetine | Low | PO | 30 mg daily | 120 mg daily | 30-120 mg/day | No | 1 of class; for long-term treatment | |
| Sodium Channel Blocker | Lidocaine infusion | Uncontrolled pain | IV | Not specified in source table | Not specified in source table | Not active in current web model | No | For uncontrolled pain; consider lidocaine infusion |
11. Source Files
/Users/noamgoder/Documents/QI/heliohost-root/httpdocs/assets/decision-engine.js/Users/noamgoder/Documents/QI/heliohost-root/httpdocs/data/medications.json/Users/noamgoder/Documents/QI/heliohost-root/httpdocs/assets/app.js