Difference between revisions of "MediaWiki:Gadget-calculator-drugs-data.js"
From WikiAnesthesia
Chris Rishel (talk | contribs) |
Chris Rishel (talk | contribs) |
||
| Line 130: | Line 130: | ||
abbreviation: 'Anxiety' | abbreviation: 'Anxiety' | ||
}, | }, | ||
generalAnesthesiaInduction: { | |||
name: 'General anesthesia', | name: 'General anesthesia (induction)', | ||
abbreviation: 'GA' | abbreviation: 'GA ind.' | ||
}, | |||
generalAnesthesiaMaintenance: { | |||
name: 'General anesthesia (maintenance)', | |||
abbreviation: 'GA maint.' | |||
}, | }, | ||
neuromuscularBlockade: { | neuromuscularBlockade: { | ||
| Line 139: | Line 143: | ||
}, | }, | ||
neuromuscularBlockadeRsi: { | neuromuscularBlockadeRsi: { | ||
name: 'Neuromuscular blockade ( | name: 'Neuromuscular blockade (rapid sequence induction)', | ||
abbreviation: 'NMB (RSI)' | abbreviation: 'NMB (RSI)' | ||
}, | }, | ||
| Line 154: | Line 158: | ||
abbreviation: 'PONV' | abbreviation: 'PONV' | ||
}, | }, | ||
tivaLoad: { | |||
name: 'Total intravenous anesthesia', | name: 'Total intravenous anesthesia (loading dose)', | ||
abbreviation: 'TIVA' | abbreviation: 'TIVA load' | ||
}, | |||
tivaMaintenance: { | |||
name: 'Total intravenous anesthesia (maintenance)', | |||
abbreviation: 'TIVA maint.' | |||
} | } | ||
} ); | } ); | ||
| Line 225: | Line 233: | ||
mw.calculators.addDrugDosages( drugId, [ | mw.calculators.addDrugDosages( drugId, [ | ||
{ | { | ||
indication: ' | indication: 'generalAnesthesiaInduction', | ||
population: 'general', | population: 'general', | ||
dose: { | dose: { | ||
| Line 233: | Line 241: | ||
} | } | ||
}, { | }, { | ||
indication: ' | indication: 'generalAnesthesiaInduction', | ||
population: 'general', | population: 'general', | ||
route: 'im', | route: 'im', | ||
| Line 306: | Line 314: | ||
} | } | ||
}, { | }, { | ||
indication: ' | indication: 'generalAnesthesiaInduction', | ||
population: 'general', | population: 'general', | ||
dose: { | dose: { | ||
| Line 420: | Line 428: | ||
mw.calculators.addDrugDosages( drugId, [ | mw.calculators.addDrugDosages( drugId, [ | ||
{ | { | ||
indication: ' | indication: 'generalAnesthesiaInduction', | ||
population: 'general', | |||
dose: { | |||
min: '1 mg/kg', | |||
max: '2.5 mg/kg', | |||
weightCalculation: 'lbw' | |||
} | |||
}, { | |||
indication: 'generalAnesthesiaInduction', | |||
population: 'pediatric', | |||
dose: { | |||
min: '2.5 mg/kg', | |||
max: '3.5 mg/kg', | |||
weightCalculation: 'lbw' | |||
} | |||
}, { | |||
indication: 'generalAnesthesiaInduction', | |||
population: 'elderly', | |||
dose: { | |||
min: '1 mg/kg', | |||
max: '1.5 mg/kg', | |||
weightCalculation: 'lbw' | |||
} | |||
}, { | |||
indication: 'generalAnesthesiaMaintenance', | |||
population: 'general', | population: 'general', | ||
dose: | dose: { | ||
min: '100 mcg/kg/min', | |||
max: '200 mcg/kg/min' | |||
} | |||
}, { | }, { | ||
indication: ' | indication: 'generalAnesthesiaMaintenance', | ||
population: 'pediatric', | population: 'pediatric', | ||
dose: | dose: { | ||
name: 'Maintenance', | |||
min: '125 mcg/kg/min', | |||
max: '300 mcg/kg/min' | |||
} | |||
}, { | }, { | ||
indication: ' | indication: 'generalAnesthesiaMaintenance', | ||
population: 'elderly', | population: 'elderly', | ||
dose: | dose: { | ||
min: '50 mcg/kg/min', | |||
max: '100 mcg/kg/min' | |||
} | |||
}, { | }, { | ||
indication: 'mac', | indication: 'mac', | ||
| Line 539: | Line 548: | ||
mw.calculators.addDrugDosages( drugId, [ | mw.calculators.addDrugDosages( drugId, [ | ||
{ | { | ||
indication: ' | indication: 'tivaLoad', | ||
population: 'general', | |||
dose: { | |||
min: '0.25 mcg/kg', | |||
max: '2 mcg/kg', | |||
weightCalculation: 'lbw' | |||
} | |||
}, { | |||
indication: 'tivaMaintenance', | |||
population: 'general', | population: 'general', | ||
dose: | dose: { | ||
name: 'Maintenance', | |||
min: '0.5 mcg/kg/hr', | |||
max: '1.5 mcg/kg/hr' | |||
} | |||
} | } | ||
] ); | ] ); | ||
Revision as of 18:19, 11 August 2021
/**
* @author Chris Rishel
*/
( function() {
/**
* DrugColor data
*/
mw.calculators.addDrugColors( {
anticholinergic: {
primaryColor: '#00ac8c'
},
benzodiazepine: {
primaryColor: '#ff6c2f'
},
benzodiazepineReversal: {
parentColor: 'benzodiazepine',
striped: true
},
cardiovascularAgonist: {
primaryColor: '#ba93df'
},
cardiovascularAntagonist: {
parentColor: 'cardiovascularAgonist',
striped: true
},
default: {
primaryColor: '#fff',
highlightColor: '#fff'
},
desflurane: {
primaryColor: '#0ab8fd'
},
enflurane: {
primaryColor: '#f58733'
},
epinephrine: {
parentColor: 'cardiovascularAntagonist',
highlightColor: '#000'
},
halothane: {
primaryColor: '#b20107'
},
isoflurane: {
primaryColor: '#ca7fc0'
},
localAnesthetic: {
primaryColor: '#dad9d6'
},
neuromuscularBlocker: {
primaryColor: '#fe5442'
},
neuromuscularBlockerReversal: {
parentColor: 'neuromuscularBlocker',
striped: true
},
nitrousOxide: {
primaryColor: '#2d549f'
},
opioid: {
primaryColor: '#6cd1ef'
},
opioidReversal: {
parentColor: 'opioid',
striped: true
},
sedativeHypnotic: {
primaryColor: '#ffe800'
},
sevoflurane: {
primaryColor: '#f8da00'
},
succinylcholine: {
parentColor: 'neuromuscularBlocker',
highlightColor: '#000'
}
} );
/**
* DrugPopulation data
*/
mw.calculators.addDrugPopulations( {
general: {
name: 'General',
abbreviation: 'Gen.'
},
neonatal: {
name: 'Neonatal',
abbreviation: 'Neo.',
variables: {
age: {
max: '0 yo'
}
}
},
pediatric: {
name: 'Pediatric',
abbreviation: 'Ped.',
variables: {
age: {
min: '0 yo',
max: '17.9 yo'
}
}
},
elderly: {
name: 'Elderly',
abbreviation: 'Eld.',
variables: {
age: {
min: '65 yo'
}
}
}
} );
/**
* DrugIndication data
*/
mw.calculators.addDrugIndications( {
abxProphylaxis: {
name: 'Antimicrobial prophylaxis',
abbreviation: 'Abx.'
},
anxiolysis: {
name: 'Anxiolysis',
abbreviation: 'Anxiety'
},
generalAnesthesiaInduction: {
name: 'General anesthesia (induction)',
abbreviation: 'GA ind.'
},
generalAnesthesiaMaintenance: {
name: 'General anesthesia (maintenance)',
abbreviation: 'GA maint.'
},
neuromuscularBlockade: {
name: 'Neuromuscular blockade (non-RSI)',
abbreviation: 'NMB (non-RSI)'
},
neuromuscularBlockadeRsi: {
name: 'Neuromuscular blockade (rapid sequence induction)',
abbreviation: 'NMB (RSI)'
},
neuromuscularBlockadeReversal: {
name: 'Neuromuscular blockade reversal',
abbreviation: 'NMB reversal'
},
mac: {
name: 'Monitored anesthesia care',
abbreviation: 'MAC'
},
ponv: {
name: 'Postoperative nausea & vomiting',
abbreviation: 'PONV'
},
tivaLoad: {
name: 'Total intravenous anesthesia (loading dose)',
abbreviation: 'TIVA load'
},
tivaMaintenance: {
name: 'Total intravenous anesthesia (maintenance)',
abbreviation: 'TIVA maint.'
}
} );
/**
* Drug data
*/
var drugId;
/**
* Cefazolin
*/
drugId = 'cefazolin';
mw.calculators.addDrugs( [
{
id: drugId,
name: 'Cefazolin'
}
] );
mw.calculators.addDrugDosages( drugId, [
{
indication: 'abxProphylaxis',
population: 'general',
dose: {
dose: '2 g',
frequency: 'q4h'
}
}
] );
mw.calculators.addDrugPreparations( drugId, [
{
concentration: '1 g/vial'
}
] );
/**
* Ketamine
*/
drugId = 'ketamine';
mw.calculators.addDrugs( [
{
id: drugId,
name: 'Ketamine',
color: 'sedativeHypnotic'
}
] );
mw.calculators.addDrugPreparations( drugId, [
{
concentration: '10 mg/mL'
}, {
concentration: '50 mg/mL'
}, {
concentration: '100 mg/mL'
}
] );
mw.calculators.addDrugDosages( drugId, [
{
indication: 'generalAnesthesiaInduction',
population: 'general',
dose: {
min: '1 mg/kg',
max: '2 mg/kg',
weightCalculation: 'lbw'
}
}, {
indication: 'generalAnesthesiaInduction',
population: 'general',
route: 'im',
dose: {
min: '4 mg/kg',
max: '6 mg/kg'
}
}
] );
/**
* Lidocaine
*/
drugId = 'lidocaine';
mw.calculators.addDrugs( [
{
id: drugId,
name: 'Lidocaine',
color: 'localAnesthetic'
}
] );
mw.calculators.addDrugPreparations( drugId, [
{
concentration: '1 pct'
}, {
concentration: '2 pct'
}
] );
/**
* Midazolam
*/
drugId = 'midazolam';
mw.calculators.addDrugs( [
{
id: drugId,
name: 'Midazolam',
color: 'benzodiazepine'
}
] );
mw.calculators.addDrugDosages( drugId, [
{
indication: 'anxiolysis',
population: 'general',
dose: {
min: '0.01 mg/kg',
max: '0.03 mg/kg'
}
}, {
indication: 'anxiolysis',
population: 'general',
route: 'im',
dose: {
min: '0.07 mg/kg',
max: '0.08 mg/kg'
}
}, {
indication: 'anxiolysis',
population: 'pediatric',
route: 'po',
dose: {
dose: '0.5 mg/kg',
absoluteMax: '20 mg'
}
}, {
indication: 'generalAnesthesiaInduction',
population: 'general',
dose: {
min: '0.1 mg/kg',
max: '0.3 mg/kg',
weightCalculation: 'lbw'
}
}
] );
mw.calculators.addDrugPreparations( drugId, [
{
concentration: '1 mg/mL'
}, {
concentration: '5 mg/mL'
}
] );
/**
* Neostigmine
*/
drugId = 'neostigmine';
mw.calculators.addDrugs( [
{
id: drugId,
name: 'Neostigmine',
color: 'neuromuscularBlockerReversal'
}
] );
mw.calculators.addDrugDosages( drugId, [
{
indication: 'neuromuscularBlockadeReversal',
population: 'general',
dose: {
min: '0.03 mg/kg',
max: '0.07 mg/kg',
absoluteMax: '5 mg'
},
description: 'For each 1 mg of neostigmine, give 0.2 mg of glycopyrrolate to avoid bradycardia'
}
] );
mw.calculators.addDrugPreparations( drugId, [
{
concentration: '0.5 mg/mL'
}, {
concentration: '1 mg/mL'
}
] );
/**
* Ondansetron
*/
drugId = 'ondansetron';
mw.calculators.addDrugs( [
{
id: drugId,
name: 'Ondansetron'
}
] );
mw.calculators.addDrugDosages( drugId, [
{
indication: 'ponv',
population: 'general',
dose: {
dose: '4 mg'
}
}, {
indication: 'ponv',
population: 'pediatric',
dose: {
dose: '0.1 mg/kg',
absoluteMax: '4 mg'
}
}
] );
mw.calculators.addDrugPreparations( drugId, [
{
concentration: '2 mg/mL'
}
] );
/**
* Propofol
*/
drugId = 'propofol';
mw.calculators.addDrugs( [
{
id: drugId,
name: 'Propofol',
color: 'sedativeHypnotic'
}
] );
mw.calculators.addDrugPreparations( drugId, [
{
concentration: '10 mg/mL'
}
] );
mw.calculators.addDrugDosages( drugId, [
{
indication: 'generalAnesthesiaInduction',
population: 'general',
dose: {
min: '1 mg/kg',
max: '2.5 mg/kg',
weightCalculation: 'lbw'
}
}, {
indication: 'generalAnesthesiaInduction',
population: 'pediatric',
dose: {
min: '2.5 mg/kg',
max: '3.5 mg/kg',
weightCalculation: 'lbw'
}
}, {
indication: 'generalAnesthesiaInduction',
population: 'elderly',
dose: {
min: '1 mg/kg',
max: '1.5 mg/kg',
weightCalculation: 'lbw'
}
}, {
indication: 'generalAnesthesiaMaintenance',
population: 'general',
dose: {
min: '100 mcg/kg/min',
max: '200 mcg/kg/min'
}
}, {
indication: 'generalAnesthesiaMaintenance',
population: 'pediatric',
dose: {
name: 'Maintenance',
min: '125 mcg/kg/min',
max: '300 mcg/kg/min'
}
}, {
indication: 'generalAnesthesiaMaintenance',
population: 'elderly',
dose: {
min: '50 mcg/kg/min',
max: '100 mcg/kg/min'
}
}, {
indication: 'mac',
population: 'general',
dose: [
{
min: '25 mcg/kg/min',
max: '75 mcg/kg/min'
}
]
}
] );
/**
* Rocuronium
*/
drugId = 'rocuronium';
mw.calculators.addDrugs( [
{
id: drugId,
name: 'Rocuronium',
color: 'neuromuscularBlocker'
}
] );
mw.calculators.addDrugPreparations( drugId, [
{
concentration: '10 mg/mL'
}
] );
mw.calculators.addDrugDosages( drugId, [
{
indication: 'neuromuscularBlockade',
population: 'general',
dose: {
dose: '0.6 mg/kg'
}
}, {
indication: 'neuromuscularBlockadeRsi',
population: 'general',
dose: {
dose: '1.2 mg/kg'
}
}
] );
/**
* Sufentanil
*/
drugId = 'sufentanil';
mw.calculators.addDrugs( [
{
id: drugId,
name: 'Sufentanil',
color: 'opioid'
}
] );
mw.calculators.addDrugPreparations( drugId, [
{
concentration: '5 mcg/mL'
},
{
concentration: '50 mcg/mL'
}
] );
mw.calculators.addDrugDosages( drugId, [
{
indication: 'tivaLoad',
population: 'general',
dose: {
min: '0.25 mcg/kg',
max: '2 mcg/kg',
weightCalculation: 'lbw'
}
}, {
indication: 'tivaMaintenance',
population: 'general',
dose: {
name: 'Maintenance',
min: '0.5 mcg/kg/hr',
max: '1.5 mcg/kg/hr'
}
}
] );
/**
* Sugammadex
*/
drugId = 'sugammadex';
mw.calculators.addDrugs( [
{
id: drugId,
name: 'Sugammadex',
color: 'neuromuscularBlockerReversal'
}
] );
mw.calculators.addDrugDosages( drugId, [
{
indication: 'neuromuscularBlockadeReversal',
population: 'general',
dose: {
min: '2 mg/kg',
max: '4 mg/kg',
absoluteMax: '16 mg/kg'
}
}
] );
mw.calculators.addDrugPreparations( drugId, [
{
concentration: '100 mg/mL'
}
] );
/**
* DrugDosage
*
* Structure is:
*
* drugId: {
* indicationId: {
* doseId: {
*
* }
* }
* }
*/
var drugDosages = {
cefazolin: {
abxProphylaxis: {
general: {
population: 'general',
dose: '2 g'
},
general120kg: {
population: {
id: 'general',
variables: {
weight: {
min: '120 kg'
}
}
},
dose: '3 g'
},
pediatric: {
dose: {
absoluteMax: '2 g',
dose: '30 mg/kg'
}
},
pediatric120kg: {
population: {
id: 'pediatric',
variables: {
weight: {
min: '120 kg'
}
}
},
dose: {
dose: '3 g'
}
}
}
}
};
}() );