Spaces:
Running
Running
File size: 24,736 Bytes
d5191c1 9feaeef d5191c1 9feaeef d5191c1 9feaeef | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | <!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>INR+ - Télésurveillance Anticoagulant</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/lucide@latest/dist/umd/lucide.js"></script>
<style>
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.fade-in {
animation: fadeIn 0.6s ease-out;
}
.logo-hover {
transition: all 0.3s ease;
}
.logo-hover:hover {
transform: scale(1.1);
filter: drop-shadow(0 4px 20px rgba(59, 130, 246, 0.5));
}
.role-card {
backdrop-filter: blur(10px);
transition: all 0.3s ease;
}
.role-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
</style>
</head>
<body class="bg-gradient-to-br from-blue-50 to-indigo-100 min-h-screen">
<!-- Splash Screen -->
<div id="splashScreen" class="min-h-screen flex items-center justify-center relative overflow-hidden">
<!-- Background Pattern -->
<div class="absolute inset-0 opacity-10">
<div class="absolute top-10 left-10 w-32 h-32 bg-blue-500 rounded-full"></div>
<div class="absolute bottom-20 right-20 w-48 h-48 bg-indigo-500 rounded-full"></div>
<div class="absolute top-1/2 left-1/3 w-24 h-24 bg-purple-500 rounded-full"></div>
</div>
<!-- Main Logo -->
<div class="text-center z-10">
<div class="logo-hover cursor-pointer inline-block">
<div class="w-32 h-32 bg-gradient-to-br from-blue-500 to-indigo-600 rounded-full flex items-center justify-center mb-4 shadow-2xl">
<i data-lucide="heart-pulse" class="w-16 h-16 text-white"></i>
</div>
<h1 class="text-4xl font-bold text-gray-800 mb-2">INR+</h1>
<p class="text-gray-600">Télésurveillance des patients sous anticoagulant</p>
</div>
</div>
<!-- Role Selection -->
<div class="absolute bottom-8 left-8">
<button onclick="selectRole('patient')" class="role-card bg-white/80 p-6 rounded-2xl shadow-lg cursor-pointer">
<div class="text-center">
<div class="w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-3">
<i data-lucide="user" class="w-8 h-8 text-green-600"></i>
</div>
<h3 class="font-semibold text-gray-800">Patient</h3>
<p class="text-sm text-gray-600 mt-1">Accéder à mes données</p>
</div>
</button>
</div>
<div class="absolute top-8 right-8">
<button onclick="selectRole('medecin')" class="role-card bg-white/80 p-6 rounded-2xl shadow-lg cursor-pointer">
<div class="text-center">
<div class="w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-3">
<i data-lucide="stethoscope" class="w-8 h-8 text-red-600"></i>
</div>
<h3 class="font-semibold text-gray-800">Médecin</h3>
<p class="text-sm text-gray-600 mt-1">Gérer mes patients</p>
</div>
</button>
</div>
</div>
<!-- Auth Screen -->
<div id="authScreen" class="hidden min-h-screen flex items-center justify-center p-4">
<div class="max-w-md w-full">
<div class="bg-white rounded-2xl shadow-xl p-8 fade-in">
<div class="text-center mb-8">
<div class="w-20 h-20 bg-gradient-to-br from-blue-500 to-indigo-600 rounded-full flex items-center justify-center mx-auto mb-4">
<i data-lucide="heart-pulse" class="w-10 h-10 text-white"></i>
</div>
<h2 class="text-2xl font-bold text-gray-800">INR+</h2>
<p class="text-gray-600 mt-2" id="authSubtitle">Connexion</p>
</div>
<!-- Toggle Auth Mode -->
<div class="flex mb-6 bg-gray-100 rounded-lg p-1">
<button id="loginBtn" onclick="toggleAuthMode('login')"
class="flex-1 py-2 rounded-md text-sm font-medium transition">
Connexion
</button>
<button id="registerBtn" onclick="toggleAuthMode('register')"
class="flex-1 py-2 rounded-md text-sm font-medium transition">
Inscription
</button>
</div>
<!-- Forms -->
<form id="loginForm" class="space-y-4">
<input type="hidden" id="role" name="role" value="">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Email</label>
<input type="email" required class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Mot de passe</label>
<input type="password" required class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
</div>
<button type="submit" class="w-full bg-gradient-to-r from-blue-500 to-indigo-600 text-white py-2 rounded-lg font-medium hover:from-blue-600 hover:to-indigo-700 transition">
Se connecter
</button>
</form>
<form id="registerForm" class="hidden space-y-4">
<input type="hidden" id="regRole" name="role" value="">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Nom</label>
<input type="text" required class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Email</label>
<input type="email" required class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Mot de passe</label>
<input type="password" required minlength="6" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500">
</div>
<div id="medecinFields" class="hidden space-y-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Numéro RPPS</label>
<input type="text" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Spécialité</label>
<select class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500">
<option>Cardiologie</option>
<option>Hématologie</option>
<option>Médecine générale</option>
</select>
</div>
</div>
<button type="submit" class="w-full bg-gradient-to-r from-green-500 to-emerald-600 text-white py-2 rounded-lg font-medium hover:from-green-600 hover:to-emerald-700 transition">
S'inscrire
</button>
</form>
</div>
</div>
</div>
<!-- Patient Dashboard -->
<div id="patientDashboard" class="hidden min-h-screen bg-gray-50">
<!-- Header -->
<header class="bg-white shadow-sm border-b">
<div class="max-w-7xl mx-auto px-4 py-4 flex items-center justify-between">
<div class="flex items-center space-x-3">
<div class="w-10 h-10 bg-gradient-to-br from-blue-500 to-indigo-600 rounded-lg flex items-center justify-center">
<i data-lucide="heart-pulse" class="w-6 h-6 text-white"></i>
</div>
<h1 class="text-xl font-bold text-gray-800">INR+ Patient</h1>
</div>
<button onclick="logout()" class="text-gray-600 hover:text-gray-800">
<i data-lucide="log-out" class="w-6 h-6"></i>
</button>
</div>
</header>
<!-- Main Content -->
<main class="max-w-7xl mx-auto px-4 py-8">
<!-- Quick Stats -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="bg-white rounded-xl shadow-sm p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-600">Dernière INR</p>
<p class="text-2xl font-bold text-gray-800">2.5</p>
</div>
<div class="w-12 h-12 bg-green-100 rounded-lg flex items-center justify-center">
<i data-lucide="activity" class="w-6 h-6 text-green-600"></i>
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-sm p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-600">Prochaine dose</p>
<p class="text-2xl font-bold text-gray-800">5mg</p>
</div>
<div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center">
<i data-lucide="pill" class="w-6 h-6 text-blue-600"></i>
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-sm p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-600">Prochain RDV</p>
<p class="text-2xl font-bold text-gray-800">15/12</p>
</div>
<div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center">
<i data-lucide="calendar" class="w-6 h-6 text-purple-600"></i>
</div>
</div>
</div>
</div>
<!-- Actions -->
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="bg-white rounded-xl shadow-sm p-6">
<h3 class="text-lg font-semibold text-gray-800 mb-4">Actions rapides</h3>
<div class="space-y-3">
<button onclick="showModal('inrModal')" class="w-full text-left px-4 py-3 bg-blue-50 rounded-lg hover:bg-blue-100 transition flex items-center space-x-3">
<i data-lucide="plus" class="w-5 h-5 text-blue-600"></i>
<span class="text-gray-700">Enregistrer une nouvelle INR</span>
</button>
<button onclick="showModal('symptomModal')" class="w-full text-left px-4 py-3 bg-red-50 rounded-lg hover:bg-red-100 transition flex items-center space-x-3">
<i data-lucide="alert-triangle" class="w-5 h-5 text-red-600"></i>
<span class="text-gray-700">Signaler des symptômes</span>
</button>
<button onclick="showModal('appointmentModal')" class="w-full text-left px-4 py-3 bg-purple-50 rounded-lg hover:bg-purple-100 transition flex items-center space-x-3">
<i data-lucide="calendar-plus" class="w-5 h-5 text-purple-600"></i>
<span class="text-gray-700">Prendre rendez-vous</span>
</button>
</div>
</div>
<div class="bg-white rounded-xl shadow-sm p-6">
<h3 class="text-lg font-semibold text-gray-800 mb-4">Médicaments</h3>
<div class="space-y-3">
<div class="flex items-center justify-between">
<div>
<p class="font-medium text-gray-800">Warfarin 5mg</p>
<p class="text-sm text-gray-600">1 comprimé / jour</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" checked class="sr-only peer">
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-green-600"></div>
</label>
</div>
</div>
</div>
</div>
</main>
</div>
<!-- Médecin Dashboard -->
<div id="medecinDashboard" class="hidden min-h-screen bg-gray-50">
<!-- Header -->
<header class="bg-white shadow-sm border-b">
<div class="max-w-7xl mx-auto px-4 py-4 flex items-center justify-between">
<div class="flex items-center space-x-3">
<div class="w-10 h-10 bg-gradient-to-br from-blue-500 to-indigo-600 rounded-lg flex items-center justify-center">
<i data-lucide="heart-pulse" class="w-6 h-6 text-white"></i>
</div>
<h1 class="text-xl font-bold text-gray-800">INR+ Médecin</h1>
</div>
<button onclick="logout()" class="text-gray-600 hover:text-gray-800">
<i data-lucide="log-out" class="w-6 h-6"></i>
</button>
</div>
</header>
<!-- Main Content -->
<main class="max-w-7xl mx-auto px-4 py-8">
<!-- Stats -->
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8">
<div class="bg-white rounded-xl shadow-sm p-6">
<p class="text-sm text-gray-600">Patients actifs</p>
<p class="text-2xl font-bold text-gray-800">24</p>
</div>
<div class="bg-white rounded-xl shadow-sm p-6">
<p class="text-sm text-gray-600">Alertes en attente</p>
<p class="text-2xl font-bold text-red-600">3</p>
</div>
<div class="bg-white rounded-xl shadow-sm p-6">
<p class="text-sm text-gray-600">Contrôles cette semaine</p>
<p class="text-2xl font-bold text-gray-800">12</p>
</div>
<div class="bg-white rounded-xl shadow-sm p-6">
<p class="text-sm text-gray-600">RDV à venir</p>
<p class="text-2xl font-bold text-gray-800">8</p>
</div>
</div>
<!-- Patient List -->
<div class="bg-white rounded-xl shadow-sm">
<div class="p-6 border-b">
<h3 class="text-lg font-semibold text-gray-800">Mes patients</h3>
</div>
<div class="overflow-x-auto">
<table class="w-full">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Patient</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Dernière INR</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Date</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Statut</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Actions</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200">
<tr>
<td class="px-6 py-4">
<div>
<p class="font-medium text-gray-800">Jean Dupont</p>
<p class="text-sm text-gray-600">jean.dupont@email.com</p>
</div>
</td>
<td class="px-6 py-4">
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">
2.5
</span>
</td>
<td class="px-6 py-4 text-sm text-gray-600">Aujourd'hui</td>
<td class="px-6 py-4">
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">
Stable
</span>
</td>
<td class="px-6 py-4">
<button class="text-blue-600 hover:text-blue-800">
<i data-lucide="eye" class="w-4 h-4"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</main>
</div>
<!-- Modals -->
<div id="inrModal" class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50">
<div class="bg-white rounded-xl max-w-md w-full p-6">
<h3 class="text-lg font-semibold text-gray-800 mb-4">Enregistrer une INR</h3>
<form class="space-y-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Valeur INR</label>
<input type="number" step="0.1" required class="w-full px-4 py-2 border border-gray-300 rounded-lg">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Date</label>
<input type="date" required class="w-full px-4 py-2 border border-gray-300 rounded-lg">
</div>
<div class="flex space-x-3">
<button type="button" onclick="hideModal('inrModal')" class="flex-1 px-4 py-2 border border-gray-300 rounded-lg hover:bg-gray-50">Annuler</button>
<button type="submit" class="flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700">Enregistrer</button>
</div>
</form>
</div>
</div>
<script>
// Initialize Lucide icons
lucide.createIcons();
// Global state
let currentRole = null;
// Navigation functions
function selectRole(role) {
currentRole = role;
document.getElementById('splashScreen').classList.add('hidden');
document.getElementById('authScreen').classList.remove('hidden');
document.getElementById('role').value = role;
document.getElementById('regRole').value = role;
if (role === 'medecin') {
document.getElementById('medecinFields').classList.remove('hidden');
document.getElementById('authSubtitle').textContent = 'Connexion Médecin';
} else {
document.getElementById('authSubtitle').textContent = 'Connexion Patient';
}
}
function toggleAuthMode(mode) {
const loginBtn = document.getElementById('loginBtn');
const registerBtn = document.getElementById('registerBtn');
const loginForm = document.getElementById('loginForm');
const registerForm = document.getElementById('registerForm');
if (mode === 'login') {
loginBtn.className = 'flex-1 py-2 rounded-md text-sm font-medium bg-white shadow-sm';
registerBtn.className = 'flex-1 py-2 rounded-md text-sm font-medium text-gray-500';
loginForm.classList.remove('hidden');
registerForm.classList.add('hidden');
} else {
loginBtn.className = 'flex-1 py-2 rounded-md text-sm font-medium text-gray-500';
registerBtn.className = 'flex-1 py-2 rounded-md text-sm font-medium bg-white shadow-sm';
loginForm.classList.add('hidden');
registerForm.classList.remove('hidden');
}
}
// Form submissions
document.getElementById('loginForm').addEventListener('submit', (e) => {
e.preventDefault();
if (currentRole === 'patient') {
document.getElementById('authScreen').classList.add('hidden');
document.getElementById('patientDashboard').classList.remove('hidden');
} else {
document.getElementById('authScreen').classList.add('hidden');
document.getElementById('medecinDashboard').classList.remove('hidden');
}
});
document.getElementById('registerForm').addEventListener('submit', (e) => {
e.preventDefault();
if (currentRole === 'patient') {
document.getElementById('authScreen').classList.add('hidden');
document.getElementById('patientDashboard').classList.remove('hidden');
} else {
document.getElementById('authScreen').classList.add('hidden');
document.getElementById('medecinDashboard').classList.remove('hidden');
}
});
// Modal functions
function showModal(modalId) {
document.getElementById(modalId).classList.remove('hidden');
}
function hideModal(modalId) {
document.getElementById(modalId).classList.add('hidden');
}
// Logout
function logout() {
document.getElementById('patientDashboard').classList.add('hidden');
document.getElementById('medecinDashboard').classList.add('hidden');
document.getElementById('splashScreen').classList.remove('hidden');
currentRole = null;
}
// Close modals on outside click
window.addEventListener('click', (e) => {
if (e.target.classList.contains('fixed') && e.target.classList.contains('bg-opacity-50')) {
e.target.classList.add('hidden');
}
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=willynabole/inrplus" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |