MediaWiki:Common.js
Page de l’interface de MediaWiki
Autres actions
Note : après avoir publié vos modifications, il se peut que vous deviez forcer le rechargement complet du cache de votre navigateur pour voir les changements.
- Firefox / Safari : maintenez la touche Maj (Shift) en cliquant sur le bouton Actualiser ou appuyez sur Ctrl + F5 ou Ctrl + R (⌘ + R sur un Mac).
- Google Chrome : appuyez sur Ctrl + Maj + R (⌘ + Shift + R sur un Mac).
- Edge : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl + F5.
// Forcer l'ouverture des sections hidden dans citizen qui les cachent par défaut
function ouvrirSections() {
document.querySelectorAll('.citizen-section').forEach(function (el) {
el.removeAttribute('hidden');
});
}
document.addEventListener('DOMContentLoaded', ouvrirSections);
window.addEventListener('pageshow', function (e) {
if (e.persisted) {
ouvrirSections();
}
});
new MutationObserver(ouvrirSections).observe(document.documentElement, { childList: true, subtree: true });
// ============================================
// CALCULATEUR IRC — Microguide
// ============================================
if (mw.config.get('wgPageName') === 'Calculateur') {
var style = document.createElement('style');
style.textContent = `
#calc-app * { box-sizing: border-box; font-family: 'Segoe UI', system-ui, sans-serif; }
#calc-app { background: #f0f4f8; padding: 16px; border-radius: 12px; }
.calc-header { background: linear-gradient(135deg, #1a5fa8 0%, #2980d4 100%); padding: 18px 22px; border-radius: 12px; color: white; margin-bottom: 16px; }
.calc-header h1 { margin: 0; font-size: 20px; font-weight: 700; }
.calc-header p { margin: 4px 0 0; font-size: 12px; opacity: 0.75; }
.calc-card { background: white; border-radius: 12px; padding: 20px 22px; margin-bottom: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid #e2e8f0; }
.calc-card h2 { margin: 0 0 14px; font-size: 15px; font-weight: 700; color: #0f2d5e; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.calc-grid label { font-size: 11px; color: #64748b; font-weight: 600; display: block; margin-bottom: 4px; }
.calc-grid input { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1.5px solid #e2e8f0; font-size: 14px; color: #0f2d5e; font-weight: 600; outline: none; }
.calc-sexe-btn { padding: 6px 18px; border-radius: 8px; border: 1.5px solid #e2e8f0; background: white; color: #64748b; font-weight: 600; cursor: pointer; font-size: 13px; margin-right: 8px; }
.calc-sexe-btn.active { border-color: #0f2d5e; background: #0f2d5e; color: white; }
.calc-result-box { background: #f8fafc; border-radius: 10px; padding: 14px 18px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 10px; }
.calc-clcr-val { font-size: 32px; font-weight: 800; line-height: 1; }
.calc-clcr-label { font-size: 12px; font-weight: 600; margin-top: 2px; }
.calc-search { width: 100%; padding: 10px 14px; border-radius: 10px; border: 1.5px solid #e2e8f0; font-size: 14px; margin-bottom: 10px; outline: none; }
.calc-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.calc-cat-btn { padding: 6px 14px; border-radius: 20px; border: 1.5px solid #e2e8f0; background: white; color: #475569; font-weight: 600; cursor: pointer; font-size: 12px; }
.calc-cat-btn.active { border-color: #0f2d5e; background: #0f2d5e; color: white; }
.calc-drugs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.calc-drug-btn { padding: 6px 12px; border-radius: 8px; border: 1.5px solid #e2e8f0; background: white; color: #475569; font-weight: 500; cursor: pointer; font-size: 12px; }
.calc-drug-btn.active { border-color: #1a9d8f; background: #e8f6f4; color: #0f7a6e; font-weight: 700; }
.calc-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.calc-table th { background: #f1f5f9; padding: 8px 12px; text-align: left; font-weight: 700; color: #0f2d5e; }
.calc-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; }
.calc-table tr.active-row { background: #e8f4f0 !important; outline: 2px solid #1a9d8f; }
.calc-table tr.active-row td { color: #0a5a52; font-weight: 700; }
.calc-badge { background: #1a9d8f; color: white; font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-left: 8px; font-weight: 700; }
.calc-note { background: #fefce8; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 14px; font-size: 12px; color: #92400e; margin-bottom: 12px; }
.calc-warning { background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 12px 16px; font-size: 11px; color: #991b1b; margin-top: 14px; }
.calc-search-results button { display: block; width: 100%; text-align: left; padding: 8px 12px; margin-bottom: 4px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer; font-size: 13px; color: #0f2d5e; }
.calc-hint { margin-top: 12px; padding: 10px 14px; background: #f0f9ff; border-radius: 8px; font-size: 12px; color: #0369a1; }
.calc-imc-info { border-left: 1px solid #e2e8f0; padding-left: 16px; font-size: 11px; color: #d97706; }
@media (max-width: 600px) { .calc-grid { grid-template-columns: 1fr 1fr; } }
.vanco-header { background: linear-gradient(135deg, #7c3aed 0%, #9f67f5 100%); padding: 18px 22px; border-radius: 12px; color: white; margin-bottom: 16px; }
.vanco-header h1 { margin: 0; font-size: 20px; font-weight: 700; }
.vanco-header p { margin: 4px 0 0; font-size: 12px; opacity: 0.75; }
.vanco-card { background: white; border-radius: 12px; padding: 20px 22px; margin-bottom: 14px; box-shadow: 0 2px 8px rgba(124,58,237,0.08); border: 1px solid #ede9fe; }
.vanco-card h2 { margin: 0 0 14px; font-size: 15px; font-weight: 700; color: #5b21b6; }
.vanco-section-title { font-size: 13px; font-weight: 700; color: #5b21b6; margin: 14px 0 8px; padding-bottom: 4px; border-bottom: 2px solid #ede9fe; }
.vanco-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.vanco-table th { background: #ede9fe; padding: 8px 12px; text-align: left; font-weight: 700; color: #5b21b6; }
.vanco-table td { padding: 9px 12px; border-bottom: 1px solid #f5f3ff; }
.vanco-table tr.vanco-active { background: #f3e8ff !important; }
.vanco-table tr.vanco-active td { color: #6d28d9; font-weight: 700; }
.vanco-badge { background: #7c3aed; color: white; font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-left: 6px; font-weight: 700; }
.vanco-input-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.vanco-input-group { flex: 1; min-width: 120px; }
.vanco-input-group label { font-size: 11px; color: #7c3aed; font-weight: 600; display: block; margin-bottom: 4px; }
.vanco-input-group input { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1.5px solid #ede9fe; font-size: 14px; color: #4c1d95; font-weight: 600; outline: none; }
.vanco-result-box { background: #f3e8ff; border: 2px solid #c4b5fd; border-radius: 10px; padding: 14px 18px; margin-top: 12px; display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.vanco-result-val { font-size: 26px; font-weight: 800; color: #6d28d9; line-height: 1; }
.vanco-warning { background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 12px 16px; font-size: 11px; color: #991b1b; margin-top: 14px; }
.vanco-note { background: #fefce8; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 14px; font-size: 12px; color: #92400e; margin-bottom: 12px; }
.vanco-tab-btns { display: flex; gap: 8px; margin-bottom: 16px; }
.vanco-tab-btn { padding: 7px 18px; border-radius: 8px; border: 1.5px solid #ede9fe; background: white; color: #7c3aed; font-weight: 600; cursor: pointer; font-size: 13px; }
.vanco-tab-btn.active { background: #7c3aed; border-color: #7c3aed; color: white; }
.vanco-prelevement { background: #f5f3ff; border-radius: 10px; padding: 14px 18px; margin-top: 12px; font-size: 13px; }
@media (max-width: 600px) { .vanco-input-row { flex-direction: column; } }
`;
document.head.appendChild(style);
var ANTIBIOS = {
"Céphalosporines": {
"Céfadroxil (PO)": { notes: "", doses: [
{ min: 30, max: 999, label: "500 mg PO q12h ou 1g PO q12-24h" },
{ min: 20, max: 29, label: "1g PO x1 dose puis 500 mg PO q12h" },
{ min: 10, max: 19, label: "1g PO x1 dose puis 500 mg PO q24h" },
{ min: 0, max: 9, label: "1g PO x1 dose puis 500 mg PO q24-36h" },
]},
"Céfazoline (IV)": { notes: "", doses: [
{ min: 35, max: 999, label: "1-2g IV q8h (fréq. max. q6h)" },
{ min: 11, max: 34, label: "1-2g IV q12h" },
{ min: 0, max: 10, label: "1g IV q24h" },
]},
"Céfépime (IV) — IIA/IU": { notes: "Infections intra-abdominales et urinaires", doses: [
{ min: 30, max: 999, label: "1-2g IV q12h" },
{ min: 11, max: 29, label: "1-2g IV q24h" },
{ min: 6, max: 10, label: "1g IV q24h" },
{ min: 0, max: 5, label: "500 mg IV q24h" },
]},
"Céfépime (IV) — NF": { notes: "Neutropénie fébrile", doses: [
{ min: 30, max: 999, label: "2g IV q8h" },
{ min: 11, max: 29, label: "2g IV q12h" },
{ min: 6, max: 10, label: "2g IV q24h" },
{ min: 0, max: 5, label: "1g IV q24h" },
]},
"Céfixime (PO)": { notes: "", doses: [
{ min: 21, max: 999, label: "400 mg PO q24h" },
{ min: 11, max: 20, label: "300 mg (¾ co.) PO q24h" },
{ min: 0, max: 10, label: "200 mg PO q24h" },
]},
"Céfotaxime (IV)": { notes: "", doses: [
{ min: 21, max: 999, label: "1-2g IV q6-8h (jusqu'à 2g IV q4h si SNC)" },
{ min: 0, max: 20, label: "Diminuer la dose de 50%. Certains: 2g IV q12-24h" },
]},
"Céfoxitine (IV)": { notes: "Dose max: 12g/jour", doses: [
{ min: 30, max: 999, label: "1-2g IV q6-8h" },
{ min: 11, max: 29, label: "1-2g IV q8-12h" },
{ min: 5, max: 10, label: "1-2g IV q12-24h" },
{ min: 1, max: 4, label: "50% de la dose IV q12-24h" },
{ min: 0, max: 0, label: "50% de la dose IV q24-48h" },
]},
"Cefprozil (PO)": { notes: "", doses: [
{ min: 31, max: 999, label: "250-500 mg PO q12h" },
{ min: 0, max: 30, label: "250 mg PO q12h" },
]},
"Ceftazidime (IV)": { notes: "", doses: [
{ min: 31, max: 999, label: "1-2g IV q8h" },
{ min: 16, max: 30, label: "1-2g IV q12h" },
{ min: 6, max: 15, label: "1-2g IV q24h" },
{ min: 1, max: 5, label: "500mg-1g IV q24h" },
{ min: 0, max: 0, label: "500mg-1g IV q48h" },
]},
"Ceftobiprole (IV)": { notes: "Perfusion sur 4h si Clcr > 150 mL/min", doses: [
{ min: 31, max: 999, label: "500 mg IV q8h perf. sur 2h" },
{ min: 16, max: 30, label: "500 mg IV q12h perf. sur 2h" },
{ min: 6, max: 15, label: "250 mg IV q12h perf. sur 2h" },
{ min: 0, max: 5, label: "250 mg IV q24h perf. sur 2h" },
]},
"Ceftriaxone (IV)": { notes: "Aucun ajustement requis sauf IR + IH (dose max: 2g/jour)", doses: [
{ min: 0, max: 999, label: "1-2g IV q24h (max: 2g IV q12h pour SNC)" },
]},
"Céfuroxime axétil (PO)": { notes: "", doses: [
{ min: 11, max: 999, label: "250-500 mg PO q12h" },
{ min: 0, max: 10, label: "250 mg PO q24h" },
]},
"Céfuroxime (IV)": { notes: "", doses: [
{ min: 21, max: 999, label: "750mg-1,5g IV q8h" },
{ min: 11, max: 20, label: "750 mg IV q12h" },
{ min: 0, max: 10, label: "750 mg IV q24h" },
]},
"Céphalexine (PO)": { notes: "", doses: [
{ min: 41, max: 999, label: "250mg-1g PO q6h" },
{ min: 11, max: 40, label: "250-500 mg PO q8-12h" },
{ min: 0, max: 10, label: "250-500 mg PO q12-24h" },
]},
},
"Carbapénèmes": {
"Ertapénem (IV)": { notes: "", doses: [
{ min: 31, max: 999, label: "1g IV q24h" },
{ min: 0, max: 30, label: "500 mg IV q24h" },
]},
"Imipénem-Cilastatine (IV)": { notes: "PR ≥ 70 kg: 500 mg IV q6h (max 4g/jour). PR < 70 kg: voir monographie.", doses: [
{ min: 71, max: 999, label: "500 mg IV q6h (max: 4g/jour)" },
{ min: 41, max: 70, label: "500 mg IV q6-8h" },
{ min: 21, max: 40, label: "500 mg IV q8-12h" },
{ min: 6, max: 20, label: "250 mg IV q12h" },
{ min: 0, max: 5, label: "⚠️ Non recommandé" },
]},
"Méropénem (IV) — usuel": { notes: "Posologie usuelle", doses: [
{ min: 26, max: 999, label: "1g IV q8h" },
{ min: 11, max: 25, label: "1g IV q12h" },
{ min: 6, max: 10, label: "500 mg IV q12h" },
{ min: 0, max: 5, label: "500 mg IV q24h" },
]},
"Méropénem (IV) — SNC": { notes: "Infections du SNC", doses: [
{ min: 26, max: 999, label: "2g IV q8h" },
{ min: 11, max: 25, label: "2g IV q12h" },
{ min: 6, max: 10, label: "1g IV q12h" },
{ min: 0, max: 5, label: "1g IV q24h" },
]},
},
"Macrolides": {
"Azithromycine (PO)": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "250-500 mg PO q24h" }]},
"Azithromycine (IV)": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "500 mg IV q24h" }]},
"Clarithromycine (PO)": { notes: "", doses: [
{ min: 31, max: 999, label: "250-500 mg PO q12h" },
{ min: 0, max: 30, label: "250 mg PO q24h (ou q12h si infection sévère)" },
]},
"Érythromycine (PO/IV)": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "Posologie selon indication et formulation" }]},
},
"Pénicillines": {
"Amoxicilline (PO)": { notes: "", doses: [
{ min: 31, max: 999, label: "250mg-1g PO q8h" },
{ min: 11, max: 30, label: "250-500 mg PO q12h" },
{ min: 0, max: 10, label: "250-500 mg PO q24h" },
]},
"Amoxicilline-Clavulanate (PO)": { notes: "", doses: [
{ min: 31, max: 999, label: "500/125 mg PO q8h ou 875/125 mg PO q12h" },
{ min: 11, max: 30, label: "500/125 mg PO q12h" },
{ min: 0, max: 10, label: "500/125 mg PO q24h" },
]},
"Ampicilline (IV)": { notes: "Posologie usuelle: 1-2g IV q4-6h", doses: [
{ min: 41, max: 999, label: "1-2g IV q6h" },
{ min: 31, max: 40, label: "1-2g IV q6-8h" },
{ min: 16, max: 30, label: "1-2g IV q8-12h" },
{ min: 0, max: 15, label: "1-2g IV q12-24h" },
]},
"Cloxacilline (PO)": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "250-500 mg PO q6h (jusqu'à 4g/jour)" }]},
"Cloxacilline (IV)": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "1-2g IV q4-6h" }]},
"Pénicilline G sodique (IV)": { notes: "DC = dose de charge", doses: [
{ min: 21, max: 999, label: "1-4 mU IV q4-6h" },
{ min: 11, max: 20, label: "DC suivie de 50% de la dose IV q4-6h" },
{ min: 0, max: 10, label: "DC suivie de 50% de la dose IV q8-12h" },
]},
"Pipéracilline-Tazobactam (IV) — usuel": { notes: "Posologie usuelle", doses: [
{ min: 41, max: 999, label: "3,375g [3g/0,375g] IV q6h ou 4,5g [4g/0,5g] IV q8h" },
{ min: 21, max: 40, label: "2,25g [2g/0,25g] IV q6h" },
{ min: 0, max: 20, label: "2,25g [2g/0,25g] IV q8h" },
]},
"Pipéracilline-Tazobactam (IV) — PAH/NF": { notes: "Pneumonie hospitalière ou neutropénie fébrile", doses: [
{ min: 41, max: 999, label: "4,5g [4g/0,5g] IV q6h" },
{ min: 21, max: 40, label: "3,375g [3g/0,375g] IV q6h" },
{ min: 0, max: 20, label: "2,25g [2g/0,25g] IV q6h" },
]},
},
"Fluoroquinolones": {
"Ciprofloxacine (PO)": { notes: "", doses: [
{ min: 31, max: 999, label: "500-750 mg PO q12h" },
{ min: 16, max: 30, label: "500 mg PO q12h" },
{ min: 0, max: 15, label: "500 mg PO q24h ou 250 mg PO q12h" },
]},
"Ciprofloxacine (IV)": { notes: "", doses: [
{ min: 31, max: 999, label: "400 mg IV q8-12h" },
{ min: 16, max: 30, label: "400 mg IV q12h" },
{ min: 0, max: 15, label: "400 mg IV q24h ou 200 mg IV q12h" },
]},
"Lévofloxacine — légère/prostatite": { notes: "Ex: prostatite chronique", doses: [
{ min: 51, max: 999, label: "500 mg PO/IV q24h" },
{ min: 21, max: 50, label: "500 mg PO/IV x1 dose, puis 250 mg PO/IV q24h" },
{ min: 0, max: 20, label: "500 mg PO/IV x1 dose, puis 250 mg PO/IV q48h" },
]},
"Lévofloxacine — PAH": { notes: "Pneumonie hospitalière", doses: [
{ min: 51, max: 999, label: "750 mg PO/IV q24h" },
{ min: 21, max: 50, label: "750 mg PO/IV q48h" },
{ min: 0, max: 20, label: "750 mg PO/IV x1 dose, puis 500 mg PO/IV q48h" },
]},
"Moxifloxacine (PO/IV)": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "400 mg PO/IV q24h" }]},
"Norfloxacine (PO) — IU": { notes: "Infection urinaire", doses: [
{ min: 31, max: 999, label: "400 mg PO q12-24h" },
{ min: 0, max: 30, label: "400 mg PO q24h" },
]},
},
"Autres antibactériens": {
"Clindamycine (PO)": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "150-450 mg PO q6h" }]},
"Clindamycine (IV)": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "600-900 mg IV q8h (fréq. max.: q6h)" }]},
"Daptomycine (IV) — usuelle": { notes: "Pour dose 6 mg/kg: utiliser PD si PR > 140 kg", doses: [
{ min: 31, max: 999, label: "4-6 mg/kg PR IV q24h" },
{ min: 0, max: 30, label: "Même dose IV q48h" },
]},
"Doxycycline (PO)": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "100 mg PO q12h" }]},
"Linézolide (PO/IV)": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "600 mg PO/IV q12h" }]},
"Métronidazole (PO)": { notes: "", doses: [
{ min: 11, max: 999, label: "250-500 mg PO q8h ou 500 mg PO q12h" },
{ min: 0, max: 10, label: "500 mg PO q12h" },
]},
"Métronidazole (IV)": { notes: "", doses: [
{ min: 11, max: 999, label: "500 mg IV q8h (fréq. max.: q6h)" },
{ min: 0, max: 10, label: "500 mg IV q12h" },
]},
"Nitrofurantoïne (PO)": { notes: "Cystite non compliquée uniquement", doses: [
{ min: 46, max: 999, label: "50-100 mg PO QID ou 100 mg PO q12h (monohydrate)" },
{ min: 31, max: 45, label: "Données limitées. Possiblement efficace à court terme." },
{ min: 0, max: 30, label: "⚠️ Contre-indiqué — risque de toxicité accru" },
]},
"Tétracycline (PO)": { notes: "", doses: [
{ min: 51, max: 999, label: "250-500 mg PO q6h" },
{ min: 11, max: 50, label: "250-500 mg PO q12h" },
{ min: 0, max: 10, label: "250-500 mg PO q24h" },
]},
"Tigécycline (IV)": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "100 mg IV x1 dose puis 50 mg IV q12h" }]},
"Triméthoprime (PO)": { notes: "", doses: [
{ min: 16, max: 999, label: "100 mg PO q12h" },
{ min: 6, max: 15, label: "50 mg PO q12h" },
{ min: 0, max: 5, label: "⚠️ Non recommandé" },
]},
"TMP-SMX — usuel": { notes: "80 mg TMP = 1 co SS; 160 mg TMP = 1 co DS", doses: [
{ min: 31, max: 999, label: "160-320 mg TMP PO/IV q12h" },
{ min: 16, max: 30, label: "80 mg TMP PO/IV q12h ou 160 mg TMP PO/IV q24h" },
{ min: 0, max: 15, label: "⚠️ Non recommandé" },
]},
"Vancomycine (IV)": { notes: "⚠️ Amorcer empiriquement selon âge, fonction rénale et poids puis ajuster selon dosages sériques. DC = 25 mg/kg PR. DM: 15-20 mg/kg PD/dose q8-12h (max 2g/dose). Consulter pharmacien.", doses: [
{ min: 71, max: 999, label: "DM IV q12h — surveiller dosages sériques" },
{ min: 41, max: 70, label: "DM IV q24h — surveiller dosages sériques" },
{ min: 21, max: 40, label: "DM IV q36-48h — dosages sériques quotidiens" },
{ min: 11, max: 20, label: "DM IV q72-96h" },
{ min: 0, max: 10, label: "DM IV q5-7 jours — consulter pharmacien" },
]},
"Vancomycine (PO)": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "125 mg PO QID (max 500 mg PO QID si infection compliquée)" }]},
},
"Antifongiques": {
"Anidulafungine (IV)": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "200 mg IV x1 dose puis 100 mg IV q24h" }]},
"Caspofungine (IV)": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "70 mg IV x1 dose puis 50 mg IV q24h" }]},
"Fluconazole (PO/IV)": { notes: "DC = 100% de la dose. Écart: 100-800 mg PO/IV q24h", doses: [
{ min: 51, max: 999, label: "DC puis 100% dose PO/IV q24h" },
{ min: 11, max: 50, label: "DC puis 50% de la dose PO/IV q24h" },
{ min: 0, max: 10, label: "DC puis 25-50% de la dose PO/IV q24h" },
]},
"Isavuconazole (PO/IV)": { notes: "Aucun ajustement requis. 372 mg sulfate = 200 mg isavuconazole.", doses: [{ min: 0, max: 999, label: "DC: 200 mg PO/IV q8h x6 doses, puis 200 mg PO/IV q24h" }]},
"Kétoconazole (PO)": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "200-400 mg PO q24h" }]},
"Micafungine — prophylaxie": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "50-100 mg IV q24h" }]},
"Micafungine — traitement": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "100-150 mg IV q24h" }]},
"Terbinafine (PO)": { notes: "", doses: [
{ min: 51, max: 999, label: "250 mg PO q24h" },
{ min: 0, max: 50, label: "⚠️ Non recommandé — données limitées" },
]},
},
"Antimycobactériens": {
"Ethambutol (PO)": { notes: "Si PR > 120% PI, baser dose sur PI.", doses: [
{ min: 31, max: 999, label: "15-25 mg/kg PO q24h" },
{ min: 0, max: 30, label: "15-25 mg/kg/dose PO DIE 3 jours/semaine" },
]},
"Isoniazide (PO)": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "5 mg/kg PO q24h (max: 300 mg)" }]},
"Pyrazinamide (PO)": { notes: "Si PR > 120% PI, baser dose sur PI.", doses: [
{ min: 31, max: 999, label: "20-25 mg/kg PO q24h (max: 2g)" },
{ min: 0, max: 30, label: "25-35 mg/kg/dose PO DIE 3 jours/semaine" },
]},
"Rifabutine (PO)": { notes: "", doses: [
{ min: 16, max: 999, label: "300 mg PO q24h" },
{ min: 0, max: 15, label: "150 mg PO q24h" },
]},
"Rifampicine (PO)": { notes: "Aucun ajustement requis", doses: [{ min: 0, max: 999, label: "10 mg/kg PO q24h (max: 600 mg)" }]},
},
"Antiviraux": {
"Acyclovir (IV)": { notes: "Posologie usuelle: 5-15 mg/kg/dose IV q8h", doses: [
{ min: 26, max: 999, label: "100% de la dose IV q8h" },
{ min: 11, max: 25, label: "100% de la dose IV q12h" },
{ min: 6, max: 10, label: "100% de la dose IV q24h" },
{ min: 0, max: 5, label: "50% de la dose IV q24h" },
]},
"Acyclovir (PO) — zona": { notes: "", doses: [
{ min: 26, max: 999, label: "800 mg PO q4h (5 fois/jour)" },
{ min: 11, max: 25, label: "800 mg PO q8h" },
{ min: 0, max: 10, label: "800 mg PO q12h" },
]},
"Famciclovir (PO) — zona": { notes: "", doses: [
{ min: 41, max: 999, label: "500 mg PO q8h" },
{ min: 21, max: 40, label: "500 mg PO q12h" },
{ min: 6, max: 20, label: "500 mg PO q24h" },
{ min: 0, max: 5, label: "250 mg PO q24h" },
]},
"Oseltamivir (PO) — traitement": { notes: "Influenza A et B", doses: [
{ min: 31, max: 999, label: "75 mg PO q12h" },
{ min: 11, max: 30, label: "30 mg PO q12h" },
{ min: 6, max: 10, label: "30 mg PO q24h" },
{ min: 0, max: 5, label: "75 mg PO x1 dose" },
]},
"Oseltamivir (PO) — prophylaxie": { notes: "Prophylaxie Influenza A et B", doses: [
{ min: 31, max: 999, label: "75 mg PO q24h" },
{ min: 11, max: 30, label: "30 mg PO q24h" },
{ min: 6, max: 10, label: "30 mg PO q48h" },
{ min: 0, max: 5, label: "Privilégier zanamivir inhalation" },
]},
"Valacyclovir (PO) — zona": { notes: "", doses: [
{ min: 31, max: 999, label: "1g PO q8h" },
{ min: 16, max: 30, label: "1g PO q12h" },
{ min: 6, max: 15, label: "1g PO q24h" },
{ min: 0, max: 5, label: "500 mg PO q24h" },
]},
"Valacyclovir (PO) — herpès génital": { notes: "", doses: [
{ min: 31, max: 999, label: "1g PO q12h" },
{ min: 16, max: 30, label: "1g PO q24h" },
{ min: 0, max: 15, label: "500 mg PO q24h" },
]},
},
};
function calcClcr(age, poids, creat, sexe) {
var k = sexe === 'F' ? 0.85 : 1.0;
return ((140 - age) * poids / (49 * creat)) * 60 * k;
}
function calcPI(taille, sexe) {
return sexe === 'F' ? 45.5 + 0.91 * (taille - 152) : 50 + 0.91 * (taille - 152);
}
function calcIMC(poids, taille) {
return poids / Math.pow(taille / 100, 2);
}
var state = {
age: '', poids: '', taille: '', creat: '', sexe: 'H',
selectedCat: '', selectedDrug: '', search: '',
mode: 'cg', dfgDirect: '',
vancoTab: 'calcul'
};
// Vancomycine — état séparé
var vancoState = {
poids: '', dfge: ''
};
// Dose de charge selon poids
function vancoGetDoseCharge(poids) {
var p = parseFloat(poids);
if (isNaN(p)) return null;
if (p < 35) return null;
if (p <= 39.9) return 750;
if (p <= 49.9) return 1000;
if (p <= 59.9) return 1250;
if (p <= 69.9) return 1500;
if (p <= 79.9) return 1750;
if (p <= 89.9) return 2000;
if (p <= 99.9) return 2250;
if (p <= 129.9) return 2500;
return 3000;
}
// Dose entretien selon poids
function vancoGetDoseEntretien(poids) {
var p = parseFloat(poids);
if (isNaN(p)) return null;
if (p < 35) return null;
if (p <= 39.9) return 500;
if (p <= 59.9) return 750;
if (p <= 79.9) return 1000;
if (p <= 99.9) return 1250;
return 1500;
}
// Fréquence selon DFGe
function vancoGetFrequence(dfge) {
var d = parseFloat(dfge);
if (isNaN(d)) return null;
if (d > 90) return 'q 8h';
if (d >= 50) return 'q 12h';
if (d >= 15) return 'q 24h';
return 'Dose unique puis selon dosage';
}
// Prélèvements selon fréquence
function vancoGetPrelevement(freq) {
if (!freq) return null;
if (freq === 'q 8h' || freq === 'q 12h') {
return { pic: '60 à 120 min post fin de perfusion de la 4e dose', creux: 'Juste avant la 4e dose' };
}
if (freq === 'q 24h') {
return { pic: '60 à 120 min post fin de perfusion de la 3e dose', creux: 'Juste avant la 3e dose' };
}
return { pic: 'Selon dosage', creux: 'Selon dosage' };
}
function renderVancoShell() {
var app = document.getElementById('vanco-app');
if (!app) return;
var html = '';
html += '<div class="vanco-header">';
html += '<h1>Vancomycine IV — Calculateur posologique</h1>';
html += '<p>Basé sur les lignes directrices APES • Adultes seulement • Consulter un pharmacien pour les cas complexes</p>';
html += '</div>';
html += '<div class="vanco-tab-btns">';
html += '<button class="vanco-tab-btn ' + (state.vancoTab === 'calcul' ? 'active' : '') + '" onclick="vancoSetTab(\'calcul\')">🧮 Calcul personnalisé</button>';
html += '<button class="vanco-tab-btn ' + (state.vancoTab === 'tableau' ? 'active' : '') + '" onclick="vancoSetTab(\'tableau\')">📋 Tableau de référence</button>';
html += '</div>';
if (state.vancoTab === 'calcul') {
html += '<div class="vanco-card">';
html += '<h2>Données du patient</h2>';
html += '<div class="vanco-note">⚠️ Ordonnance non applicable aux usagers sous thérapie de remplacement rénal — consulter le guide.</div>';
html += '<div class="vanco-input-row">';
html += '<div class="vanco-input-group"><label>Poids réel (kg)</label><input id="vanco-poids" type="number" placeholder="ex: 70" onchange="vancoSetField(\'poids\',this.value)"></div>';
html += '<div class="vanco-input-group"><label>DFGe du laboratoire (mL/min/1,73m²)</label><input id="vanco-dfge" type="number" placeholder="ex: 55" onchange="vancoSetField(\'dfge\',this.value)"></div>';
html += '</div>';
html += '</div>';
html += '<div id="vanco-results"></div>';
} else {
html += renderVancoTableau();
}
html += '<div class="vanco-warning">⚠️ <b>Avertissement clinique :</b> Cet outil est fourni à titre indicatif seulement. Consulter un pharmacien pour tout ajustement posologique de la vancomycine. Se référer au guide d\'ajustement de la vancomycine (bulletin No 40) pour les méthodes de calcul de la SSC.</div>';
app.innerHTML = html;
}
function renderVancoTableau() {
var html = '';
html += '<div class="vanco-card">';
html += '<h2>Dose de charge — Tableau complet</h2>';
html += '<div style="font-size:12px;color:#64748b;margin-bottom:10px;">25 mg/kg poids réel arrondi</div>';
html += '<table class="vanco-table"><thead><tr><th>Poids (kg)</th><th>Dose (mg)</th><th>Poids (kg)</th><th>Dose (mg)</th><th>Poids (kg)</th><th>Dose (mg)</th></tr></thead><tbody>';
html += '<tr><td>35 – 39,9</td><td>750</td><td>60 – 69,9</td><td>1500</td><td>90 – 99,9</td><td>2250</td></tr>';
html += '<tr><td>40 – 49,9</td><td>1000</td><td>70 – 79,9</td><td>1750</td><td>100 – 129,9</td><td>2500</td></tr>';
html += '<tr><td>50 – 59,9</td><td>1250</td><td>80 – 89,9</td><td>2000</td><td>130 et plus</td><td>3000</td></tr>';
html += '</tbody></table></div>';
html += '<div class="vanco-card"><h2>Traitement d\'entretien — Tableau complet</h2>';
html += '<div style="display:flex;gap:16px;flex-wrap:wrap;">';
html += '<div style="flex:1;min-width:180px;"><div class="vanco-section-title">Dose selon le poids</div>';
html += '<table class="vanco-table"><thead><tr><th>Poids (kg)</th><th>Dose (mg)</th></tr></thead><tbody>';
html += '<tr><td>35 – 39,9</td><td>500</td></tr><tr><td>40 – 59,9</td><td>750</td></tr><tr><td>60 – 79,9</td><td>1000</td></tr><tr><td>80 – 99,9</td><td>1250</td></tr><tr><td>100 et plus</td><td>1500</td></tr>';
html += '</tbody></table></div>';
html += '<div style="flex:1;min-width:220px;"><div class="vanco-section-title">Fréquence selon DFGe</div>';
html += '<table class="vanco-table"><thead><tr><th>DFGe (mL/min/1,73m²)</th><th>Fréquence</th></tr></thead><tbody>';
html += '<tr><td>Plus de 90</td><td>q 8h</td></tr><tr><td>50 – 90</td><td>q 12h</td></tr><tr><td>15 – 49</td><td>q 24h</td></tr><tr><td>Moins de 15</td><td>Dose unique puis selon dosage</td></tr>';
html += '</tbody></table></div></div></div>';
html += '<div class="vanco-card"><h2>Moment des prélèvements selon l\'intervalle posologique</h2>';
html += '<table class="vanco-table"><thead><tr><th>Intervalle posologique</th><th>PIC</th><th>CREUX</th></tr></thead><tbody>';
html += '<tr><td style="font-weight:700;">q8h ou q12h</td><td>60 à 120 min post fin de perfusion de la 4e dose</td><td>Juste avant la 4e dose</td></tr>';
html += '<tr><td style="font-weight:700;">q24h</td><td>60 à 120 min post fin de perfusion de la 3e dose</td><td>Juste avant la 3e dose</td></tr>';
html += '</tbody></table>';
html += '<div style="font-size:11px;color:#64748b;margin-top:8px;">Incluant la dose de charge s\'il y a lieu.</div></div>';
return html;
}
function renderVancoResults() {
var section = document.getElementById('vanco-results');
if (!section) return;
var dc = vancoGetDoseCharge(vancoState.poids);
var de = vancoGetDoseEntretien(vancoState.poids);
var freq = vancoGetFrequence(vancoState.dfge);
var prel = vancoGetPrelevement(freq);
var html = '';
if (dc !== null || de !== null || freq !== null) {
html += '<div class="vanco-card"><h2>1. Dose de charge × 1 dose</h2>';
html += '<div style="font-size:12px;color:#64748b;margin-bottom:10px;">Recommandée pour les usagers gravement malades.</div>';
if (dc !== null) {
html += '<div class="vanco-result-box">';
html += '<div><div style="font-size:11px;color:#7c3aed;font-weight:600;margin-bottom:4px;">DOSE DE CHARGE</div>';
html += '<div class="vanco-result-val">' + dc + ' mg</div>';
html += '<div style="font-size:11px;color:#64748b;margin-top:4px;">IV × 1 dose</div></div></div>';
} else {
html += '<div style="color:#64748b;font-size:13px;">Entrez le poids pour calculer</div>';
}
html += '</div>';
html += '<div class="vanco-card"><h2>2. Traitement d\'entretien</h2>';
html += '<div style="font-size:12px;color:#64748b;margin-bottom:10px;">Pour mieux estimer la dose, l\'utilisation de vancopk.com est recommandée, particulièrement si IMC > 30 kg/m².</div>';
html += '<div class="vanco-result-box">';
if (de !== null) {
html += '<div><div style="font-size:11px;color:#7c3aed;font-weight:600;margin-bottom:4px;">DOSE</div>';
html += '<div class="vanco-result-val">' + de + ' mg</div>';
html += '<div style="font-size:11px;color:#64748b;margin-top:4px;">IV par dose</div></div>';
}
if (freq !== null) {
html += '<div style="border-left:2px solid #c4b5fd;padding-left:16px;">';
html += '<div style="font-size:11px;color:#7c3aed;font-weight:600;margin-bottom:4px;">FRÉQUENCE</div>';
html += '<div class="vanco-result-val" style="font-size:22px;">' + freq + '</div>';
var dfgeVal = parseFloat(vancoState.dfge);
var dfgeLabel = !isNaN(dfgeVal) ? (dfgeVal > 90 ? '> 90' : dfgeVal >= 50 ? '50–90' : dfgeVal >= 15 ? '15–49' : '< 15') : '';
if (dfgeLabel) html += '<div style="font-size:11px;color:#64748b;margin-top:4px;">DFGe ' + dfgeLabel + ' mL/min/1,73m²</div>';
html += '</div>';
}
html += '</div></div>';
if (prel && freq) {
html += '<div class="vanco-card"><h2>3. Prélèvements recommandés</h2>';
html += '<div class="vanco-prelevement">';
html += '<table class="vanco-table"><thead><tr><th>Intervalle</th><th>PIC</th><th>CREUX</th></tr></thead><tbody>';
html += '<tr class="vanco-active"><td style="font-weight:700;">' + freq + '</td><td>' + prel.pic + '</td><td>' + prel.creux + '</td></tr>';
html += '</tbody></table>';
if (freq !== 'Dose unique puis selon dosage') {
html += '<div style="font-size:11px;color:#64748b;margin-top:10px;">Des prélèvements par creux seulement doivent être effectués pour les patients dont l\'état d\'équilibre n\'est pas atteint.</div>';
}
html += '</div></div>';
}
}
section.innerHTML = html;
}
function renderVanco() {
renderVancoShell();
renderVancoResults();
}
window.vancoSetField = function(field, val) {
vancoState[field] = val;
renderVancoResults();
};
window.vancoSetTab = function(tab) { state.vancoTab = tab; renderVanco(); };
window.calcSetMode = function(mode) { state.mode = mode; render(); };
window.calcSetField = function(field, val) {
state[field] = val;
renderResult();
};
window.calcSetSexe = function(sexe) { state.sexe = sexe; renderResult(); };
window.calcSetSearch = function(val) { state.search = val; state.selectedCat = ''; state.selectedDrug = ''; renderDrugSelector(); renderDrugResult(calcClcrFromState().clcr); };
window.calcSetCat = function(cat) { state.selectedCat = cat; state.selectedDrug = ''; renderDrugSelector(); renderDrugResult(calcClcrFromState().clcr); };
window.calcSetDrug = function(drug) { state.selectedDrug = drug; renderDrugSelector(); renderDrugResult(calcClcrFromState().clcr); };
window.calcSelectDrug = function(cat, drug) { state.selectedCat = cat; state.selectedDrug = drug; state.search = ''; var si = document.getElementById('calc-search-input'); if(si) si.value=''; renderDrugSelector(); renderDrugResult(calcClcrFromState().clcr); };
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', render);
} else {
render();
}
}