mirror of
https://github.com/gauvainboiche/ketapk.git
synced 2026-09-02 11:13:11 +02:00
291 lines
14 KiB
HTML
291 lines
14 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="fr" class="min-h-screen bg-slate-900 text-slate-100">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>KétaPK - Simulation Pharmacocinétique</title>
|
|
|
|
<!-- CSS Tailwind compilé -->
|
|
<link rel="stylesheet" href="css/tailwind.css">
|
|
|
|
<!-- CSS Personnalisé -->
|
|
<link rel="stylesheet" href="css/styles.css">
|
|
|
|
<!-- Librairies JS Statiques -->
|
|
<script src="vendor/chart.umd.min.js"></script>
|
|
<script src="vendor/chartjs-plugin-annotation.min.js"></script>
|
|
</head>
|
|
|
|
<body class="min-h-screen flex flex-col font-sans antialiased selection:bg-amber-500 selection:text-slate-950">
|
|
|
|
<!-- NAVBAR -->
|
|
<header class="bg-slate-800/90 backdrop-blur border-b border-slate-700/80 sticky top-0 z-40 shadow-lg">
|
|
<div class="max-w-[1800px] w-full mx-auto px-6 py-3 flex flex-wrap items-center justify-between gap-4">
|
|
|
|
<!-- Logo -->
|
|
<div class="flex items-center gap-3">
|
|
<div
|
|
class="bg-gradient-to-r from-amber-500 to-amber-600 text-slate-950 font-black px-3.5 py-1 rounded-xl text-xl tracking-wider shadow-md shadow-amber-500/20">
|
|
KétaPK
|
|
</div>
|
|
<div class="flex flex-col">
|
|
<span data-i18n="app.title" class="text-sm font-bold text-slate-200 leading-none">Pharmaco Kinetics</span>
|
|
<span data-i18n="app.version" class="text-[10px] text-slate-400 font-mono">v1.00 • Dr Georges Mion</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Mode Selector -->
|
|
<div class="flex items-center bg-slate-950/80 p-1 rounded-xl border border-slate-700/80 shadow-inner">
|
|
<button id="btnEsk" type="button" data-i18n="nav.mode_esk"
|
|
class="px-4 py-1.5 rounded-lg text-xs font-bold transition-all bg-amber-500 text-slate-950 shadow-md shadow-amber-500/30">
|
|
ESKETAMINE
|
|
</button>
|
|
<button id="btnRac" type="button" data-i18n="nav.mode_rac"
|
|
class="px-4 py-1.5 rounded-lg text-xs font-bold transition-all text-slate-400 hover:text-slate-200">
|
|
RACÉMIQUE
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Actions & Language -->
|
|
<div class="flex items-center gap-2">
|
|
<div class="flex items-center gap-1 bg-slate-900 border border-slate-700/70 rounded-xl px-2 py-1">
|
|
<span class="text-xs">🌐</span>
|
|
<select id="selectLang" class="bg-transparent text-xs font-bold text-slate-300 outline-none cursor-pointer">
|
|
<option value="fr" class="bg-slate-900">FR</option>
|
|
<option value="en" class="bg-slate-900">EN</option>
|
|
<option value="cn" class="bg-slate-900">CN</option>
|
|
</select>
|
|
</div>
|
|
|
|
<button id="btnOpenCalc" type="button"
|
|
class="bg-slate-700/80 hover:bg-slate-700 text-slate-200 border border-slate-600/60 px-3 py-1.5 rounded-lg text-xs font-medium transition flex items-center gap-1.5 shadow-sm">
|
|
<span>🧮</span>
|
|
<span data-i18n="nav.calculator" class="hidden sm:inline">Calculateur</span>
|
|
</button>
|
|
|
|
<button id="btnExportCSVNav" type="button"
|
|
class="bg-emerald-600/90 hover:bg-emerald-500 text-white border border-emerald-500/50 px-3 py-1.5 rounded-lg text-xs font-semibold transition flex items-center gap-1.5 shadow-md shadow-emerald-600/20">
|
|
<span>📊</span>
|
|
<span data-i18n="nav.export_csv" class="hidden sm:inline">Exporter CSV</span>
|
|
</button>
|
|
|
|
<button id="btnRaz" type="button"
|
|
class="bg-rose-500/10 hover:bg-rose-500/20 text-rose-400 border border-rose-500/30 px-3 py-1.5 rounded-lg text-xs font-medium transition flex items-center gap-1.5">
|
|
<span>🔄</span>
|
|
<span data-i18n="nav.raz" class="hidden sm:inline">RAZ</span>
|
|
</button>
|
|
</div>
|
|
|
|
</div>
|
|
</header>
|
|
|
|
<!-- MAIN -->
|
|
<main class="flex-1 max-w-[1800px] w-full mx-auto p-6 grid grid-cols-1 lg:grid-cols-12 xl:grid-cols-12 gap-6">
|
|
|
|
<!-- SIDEBAR -->
|
|
<aside class="lg:col-span-3 xl:col-span-2 space-y-5">
|
|
|
|
<!-- Panneau Patient -->
|
|
<div class="bg-slate-800/80 p-4 rounded-xl border border-slate-700/50 shadow-md mb-6">
|
|
<div class="grid grid-cols-1 gap-4 items-center">
|
|
|
|
<!-- Nom du Patient -->
|
|
<div>
|
|
<label data-i18n="patient.name_label" class="block text-xs text-slate-400 mb-1 font-medium">Nom du patient</label>
|
|
<input type="text" id="patientName" data-i18n-placeholder="patient.name_placeholder" placeholder="ex: DUPONT Jean"
|
|
class="w-full bg-slate-900 border border-slate-700 rounded-lg px-3 py-2 text-slate-100 font-bold focus:border-cyan-500 focus:outline-none">
|
|
</div>
|
|
|
|
<!-- Poids + Avertissement -->
|
|
<div>
|
|
<label data-i18n="patient.weight_label" class="block text-xs text-slate-400 mb-1 font-medium">Poids du patient (kg)</label>
|
|
<input type="number" id="patientWeight" value="70" min="10" max="250" step="any"
|
|
class="w-full bg-slate-900 border border-slate-700 rounded-lg px-3 py-2 text-slate-100 font-bold focus:border-cyan-500 focus:outline-none">
|
|
|
|
<div id="weightWarning" class="hidden text-amber-400 text-xs mt-1.5 flex items-center gap-1 font-medium"
|
|
data-i18n="patient.weight_warning">
|
|
⚠️ Modèles pharmacocinétiques non garantis hors de la plage 30 - 120 kg.
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Choix Unité Perfusion -->
|
|
<div>
|
|
<label data-i18n="patient.infusion_unit_label" class="block text-xs text-slate-400 mb-1 font-medium">Unité de perfusion continue</label>
|
|
<select id="infusionUnitSelect"
|
|
class="w-full bg-slate-900 border border-slate-700 rounded-lg px-3 py-2 text-slate-100 font-semibold focus:border-cyan-500 focus:outline-none">
|
|
<option value="mg_kg_h" data-i18n="units.mg_kg_h">mg / kg / h</option>
|
|
<option value="mcg_kg_min" data-i18n="units.mcg_kg_min">µg / kg / min</option>
|
|
<option value="mg_h" data-i18n="units.mg_h">mg / h (dose fixe)</option>
|
|
</select>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Bouton d'exportation CSV Lateral -->
|
|
<div class="flex justify-end gap-3 mb-4">
|
|
<button id="btnExportCSV" data-i18n="buttons.export_csv"
|
|
class="bg-slate-700 hover:bg-slate-600 text-slate-200 text-xs font-semibold px-3 py-2 rounded-lg flex items-center gap-2 transition w-full justify-center">
|
|
📊 Exporter valeurs CSV (ng/mL)
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Models Selection -->
|
|
<div class="bg-slate-800/60 border border-slate-700/70 rounded-2xl p-4 shadow-md backdrop-blur-sm">
|
|
<h2 data-i18n="models.title"
|
|
class="text-xs font-bold text-slate-400 uppercase tracking-wider mb-3 border-b border-slate-700/60 pb-2 flex items-center gap-2">
|
|
<span>📈</span> Modèles Pharmacocinétiques
|
|
</h2>
|
|
|
|
<div class="space-y-2">
|
|
<label
|
|
class="flex items-center justify-between p-2.5 bg-slate-900/60 border border-slate-800 rounded-xl cursor-pointer hover:bg-slate-900 transition">
|
|
<span class="text-xs font-bold text-orange-400">Domino et al. (1982)</span>
|
|
<input type="checkbox" id="chkDomino" checked class="w-4 h-4 accent-orange-500 rounded cursor-pointer">
|
|
</label>
|
|
|
|
<label
|
|
class="flex items-center justify-between p-2.5 bg-slate-900/60 border border-slate-800 rounded-xl cursor-pointer hover:bg-slate-900 transition">
|
|
<span class="text-xs font-bold text-emerald-400">Clements et al. (1981)</span>
|
|
<input type="checkbox" id="chkClements" checked class="w-4 h-4 accent-emerald-500 rounded cursor-pointer">
|
|
</label>
|
|
|
|
<label
|
|
class="flex items-center justify-between p-2.5 bg-slate-900/60 border border-slate-800 rounded-xl cursor-pointer hover:bg-slate-900 transition">
|
|
<span class="text-xs font-bold text-sky-400">Kamp et al. (2020)</span>
|
|
<input type="checkbox" id="chkKamp" checked class="w-4 h-4 accent-sky-500 rounded cursor-pointer">
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
</aside>
|
|
|
|
<!-- CONTENT -->
|
|
<section class="lg:col-span-9 xl:col-span-10 space-y-5 flex flex-col">
|
|
|
|
<!-- Graphique dynamique -->
|
|
<div
|
|
class="bg-slate-800/60 border border-slate-700/70 rounded-2xl p-4 shadow-md backdrop-blur-sm flex flex-col h-[calc(100vh-370px)] min-h-[450px] relative">
|
|
<div class="flex-1 w-full h-full relative">
|
|
<canvas id="pkChart"></canvas>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Timeline Grid -->
|
|
<div class="bg-slate-800/60 border border-slate-700/70 rounded-2xl p-4 shadow-md backdrop-blur-sm">
|
|
<div class="flex items-center justify-between mb-3 border-b border-slate-700/60 pb-2">
|
|
<h2 data-i18n="timeline.title"
|
|
class="text-xs font-bold text-slate-300 uppercase tracking-wider flex items-center gap-2">
|
|
<span>⏱️</span> Saisie Chronologique Doses & Perfusion (0 - 300 min)
|
|
</h2>
|
|
<span data-i18n="timeline.scroll_hint" class="text-[10px] text-slate-400 italic">Défilement horizontal 👉</span>
|
|
</div>
|
|
|
|
<div id="timelineGrid"
|
|
class="flex gap-2 overflow-x-auto pb-2 scrollbar-thin scrollbar-thumb-slate-700 scrollbar-track-slate-900">
|
|
<!-- Injecté via app.js -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Tableau de contrôle des concentrations (0-300 min) -->
|
|
<details class="bg-slate-800/50 border border-slate-700/50 rounded-xl mb-6">
|
|
<summary
|
|
class="p-4 cursor-pointer text-slate-300 font-semibold text-sm hover:text-white flex justify-between items-center">
|
|
<span data-i18n="table.summary_title">🔍 Tableau de contrôle des concentrations calculées (0 - 300 min)</span>
|
|
<span data-i18n="table.summary_subtitle" class="text-xs text-slate-500">Cliquer pour afficher/masquer</span>
|
|
</summary>
|
|
<div class="p-4 border-t border-slate-700/50 overflow-x-auto max-h-80">
|
|
<table class="w-full text-xs text-left text-slate-300">
|
|
<thead class="text-slate-400 bg-slate-900/80 uppercase font-mono sticky top-0">
|
|
<tr>
|
|
<th data-i18n="table.col_time" class="px-3 py-2">Temps</th>
|
|
<th data-i18n="table.col_bolus" class="px-3 py-2">Bolus (mg)</th>
|
|
<th data-i18n="table.col_infusion" class="px-3 py-2">Perf. Active</th>
|
|
<th data-i18n="table.col_domino" class="px-3 py-2 text-cyan-400">Domino (ng/mL)</th>
|
|
<th data-i18n="table.col_clements" class="px-3 py-2 text-emerald-400">Clements (ng/mL)</th>
|
|
<th data-i18n="table.col_kamp" class="px-3 py-2 text-purple-400">Kamp (ng/mL)</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="dataTableBody" class="divide-y divide-slate-800 font-mono">
|
|
<!-- Généré dynamiquement en JS -->
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</details>
|
|
|
|
</section>
|
|
|
|
</main>
|
|
|
|
<!-- MODAL CALCULATOR -->
|
|
<div id="modalCalc"
|
|
class="fixed inset-0 bg-slate-950/80 backdrop-blur-sm z-50 hidden flex items-center justify-center p-4 transition-opacity">
|
|
<div class="bg-slate-800 border border-slate-700 rounded-2xl w-full max-w-lg p-6 space-y-6 shadow-2xl relative">
|
|
|
|
<div class="flex justify-between items-center border-b border-slate-700 pb-3">
|
|
<h3 data-i18n="calculator.title" class="text-base font-bold text-amber-400 flex items-center gap-2">
|
|
<span>🧮</span> Calculateur & Conversions de Doses
|
|
</h3>
|
|
<button id="btnCloseCalc" type="button"
|
|
class="text-slate-400 hover:text-white font-bold text-xl leading-none transition">×</button>
|
|
</div>
|
|
|
|
<div class="space-y-4">
|
|
<div class="grid grid-cols-2 gap-3 bg-slate-900/80 p-3 rounded-xl border border-slate-700/50">
|
|
<div>
|
|
<label for="calcWeight" data-i18n="calculator.patient_weight"
|
|
class="block text-xs text-slate-400 mb-1">Poids du patient</label>
|
|
<div class="flex items-center gap-1">
|
|
<input type="number" id="calcWeight" value="70" step="any"
|
|
class="w-full bg-slate-800 border border-slate-700 rounded-lg p-2 text-sm text-white font-bold outline-none">
|
|
<span class="text-xs text-slate-400">kg</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<h4 data-i18n="calculator.bolus_header"
|
|
class="text-xs font-semibold text-slate-400 uppercase tracking-wider mb-2">Conversion Bolus</h4>
|
|
<div class="grid grid-cols-2 gap-3">
|
|
<div>
|
|
<label for="calcMg" data-i18n="calculator.total_dose" class="block text-[10px] text-slate-500 mb-1">Dose totale (mg)</label>
|
|
<input type="number" id="calcMg" step="any" placeholder="ex: 35"
|
|
class="w-full bg-slate-900 border border-slate-700 rounded-lg p-2 text-sm text-white focus:ring-1 focus:ring-amber-500 outline-none">
|
|
</div>
|
|
<div>
|
|
<label for="calcMgKg" data-i18n="calculator.relative_dose"
|
|
class="block text-[10px] text-slate-500 mb-1">Dose relative (mg/kg)</label>
|
|
<input type="number" id="calcMgKg" step="any" placeholder="ex: 0.5"
|
|
class="w-full bg-slate-900 border border-slate-700 rounded-lg p-2 text-sm text-white focus:ring-1 focus:ring-amber-500 outline-none">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<h4 data-i18n="calculator.infusion_header"
|
|
class="text-xs font-semibold text-slate-400 uppercase tracking-wider mb-2">Conversion Perfusion</h4>
|
|
<div class="grid grid-cols-2 gap-3">
|
|
<div>
|
|
<label for="calcMgKgH" data-i18n="calculator.rate_mgkgh"
|
|
class="block text-[10px] text-slate-500 mb-1">Débit (mg/kg/h)</label>
|
|
<input type="number" id="calcMgKgH" step="any" placeholder="ex: 0.3"
|
|
class="w-full bg-slate-900 border border-slate-700 rounded-lg p-2 text-sm text-white focus:ring-1 focus:ring-amber-500 outline-none">
|
|
</div>
|
|
<div>
|
|
<label for="calcUgKgMin" data-i18n="calculator.rate_ugkgmin"
|
|
class="block text-[10px] text-slate-500 mb-1">Débit (µg/kg/min)</label>
|
|
<input type="number" id="calcUgKgMin" step="any" placeholder="ex: 5"
|
|
class="w-full bg-slate-900 border border-slate-700 rounded-lg p-2 text-sm text-white focus:ring-1 focus:ring-amber-500 outline-none">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="module" src="js/app.js"></script>
|
|
</body>
|
|
|
|
</html> |