Spaces:
Running
Running
File size: 17,466 Bytes
24a5726 | 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 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Smart Health Monitoring System | Patient Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Mobile menu toggle
const mobileMenuButton = document.getElementById('mobileMenuButton');
const sidebar = document.getElementById('sidebar');
mobileMenuButton.addEventListener('click', function() {
sidebar.classList.toggle('-translate-x-full');
});
// Initialize charts
const ctx = document.getElementById('healthTrendsChart').getContext('2d');
const healthChart = new Chart(ctx, {
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
datasets: [{
label: 'Health Score',
data: [72, 75, 78, 80, 79, 82],
backgroundColor: 'rgba(79, 70, 229, 0.1)',
borderColor: 'rgba(79, 70, 229, 1)',
borderWidth: 2,
tension: 0.3
}]
},
options: {
responsive: true,
plugins: {
legend: { display: false }
},
scales: {
y: {
beginAtZero: true,
max: 100
}
}
}
});
// Simulate active notifications
setTimeout(() => {
const notificationDot = document.querySelector('.animate-pulse');
notificationDot.classList.toggle('animate-pulse');
}, 5000);
});
</script>
<style>
.sidebar-transition {
transition: all 0.3s ease;
}
.fade-in {
animation: fadeIn 0.5s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
.alert-pulse {
animation: pulse 2s infinite;
}
.no-scrollbar::-webkit-scrollbar {
display: none;
}
.scrollbar-thin::-webkit-scrollbar {
width: 5px;
height: 5px;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
background-color: #cbd5e0;
border-radius: 10px;
}
.health-score-gradient {
background: linear-gradient(135deg, #06b6d4 0%, #10b981 50%, #84cc16 100%);
}
@media (max-width: 768px) {
.mobile-stack {
flex-direction: column;
}
.mobile-full-width {
width: 100% !important;
}
}
</style>
</head>
<body class="bg-gray-50 font-sans antialiased text-gray-800">
<div class="min-h-screen flex flex-col md:flex-row">
<!-- Mobile Menu Button -->
<div class="md:hidden bg-white p-4 shadow flex justify-between items-center">
<h1 class="text-xl font-bold text-indigo-700">Smart HMS</h1>
<button id="mobileMenuButton" class="text-gray-600 focus:outline-none">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
</svg>
</button>
</div>
<!-- Sidebar -->
<aside id="sidebar" class="w-64 bg-indigo-800 text-white sidebar-transition transform -translate-x-full md:translate-x-0 fixed md:relative inset-y-0 left-0 z-50 overflow-y-auto">
<div class="p-4 flex items-center justify-center border-b border-indigo-700">
<div class="flex items-center space-x-2">
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"></path>
</svg>
<span class="text-xl font-bold">Smart HMS</span>
</div>
</div>
<div class="p-4">
<div class="flex items-center space-x-3 mb-8 p-2 bg-indigo-700 rounded-lg">
<div class="w-10 h-10 rounded-full bg-indigo-600 flex items-center justify-center">
<span class="font-semibold">JD</span>
</div>
<div>
<p class="font-medium">John Doe</p>
<p class="text-xs text-indigo-200">Patient ID: P-78234</p>
</div>
</div>
<nav class="space-y-2">
<a href="#" class="flex items-center space-x-3 p-2 rounded-lg bg-indigo-700 text-white">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"></path>
</svg>
<span>Dashboard</span>
</a>
<a href="#" class="flex items-center space-x-3 p-2 rounded-lg text-indigo-200 hover:bg-indigo-700 hover:text-white">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"></path>
</svg>
<span>Medical Records</span>
</a>
<a href="#" class="flex items-center space-x-3 p-2 rounded-lg text-indigo-200 hover:bg-indigo-700 hover:text-white">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path>
</svg>
<span>Lab Results</span>
</a>
<a href="#" class="flex items-center space-x-3 p-2 rounded-lg text-indigo-200 hover:bg-indigo-700 hover:text-white">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<span>Health Insights</span>
</a>
<a href="#" class="flex items-center space-x-3 p-2 rounded-lg text-indigo-200 hover:bg-indigo-700 hover:text-white">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
</svg>
<span>Settings</span>
</a>
<a href="#" class="flex items-center space-x-3 p-2 rounded-lg text-indigo-200 hover:bg-indigo-700 hover:text-white">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path>
</svg>
<span>Privacy & Consent</span>
</a>
</nav>
</div>
</aside>
<!-- Main Content -->
<main class="flex-1 bg-gray-50 overflow-y-auto relative">
<!-- Header -->
<header class="bg-white shadow-sm p-4 sticky top-0 z-10">
<div class="flex justify-between items-center">
<h1 class="text-xl font-semibold text-gray-800">Patient Dashboard</h1>
<div class="flex items-center space-x-4">
<div class="relative">
<button class="text-gray-600 focus:outline-none hover:text-gray-800">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"></path>
</svg>
</button>
<div class="absolute -top-1 -right-1 bg-red-500 rounded-full w-3 h-3 animate-pulse"></div>
</div>
<button class="text-gray-600 focus:outline-none hover:text-gray-800">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
</svg>
</button>
</div>
</div>
</header>
<!-- Dashboard Content -->
<div class="p-4 md:p-6 space-y-6">
<!-- Health Trends Chart -->
<div class="bg-white rounded-xl shadow p-5">
<h2 class="text-lg font-semibold mb-4">Health Trends</h2>
<canvas id="healthTrendsChart"></canvas>
</div>
<!-- Health Summary Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
<!-- Health Score -->
<div class="bg-white rounded-xl shadow p-5 health-score-gradient text-white">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium opacity-90">Health Score</p>
<p class="text-3xl font-bold mt-2">82<span class="text-lg">/100</span></p>
</div>
<div class="w-16 h-16 rounded-full bg-white bg-opacity-20 flex items-center justify-center">
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"></path>
</svg>
</div>
</div>
<div class="mt-4 pt-2 border-t border-white border-opacity-20">
<p class="text-sm">↑ 5 points from last week</p>
</div>
</div>
<!-- Emergency Triage Status -->
<div class="bg-white rounded-xl shadow p-5">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-600">Triage Status</p>
<p class="text-2xl font-bold mt-2 text-gray-800">Level 3</p>
<p class="text-xs mt-1 text-gray-500">Stable - Routine</p>
</div>
<div class="w-16 h-16 rounded-full bg-yellow-100 flex items-center justify-center">
<svg class="w-8 h-8 text-yellow-500" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path>
</svg>
</div>
</div>
<div class="mt-4 pt-2 border-t border-gray-100">
<p class="text-xs text-gray-500">Last updated: 15 minutes ago</p>
</div>
</div>
<!-- Recent Labs -->
<div class="bg-white rounded-xl shadow p-5">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-600">Recent Labs</p>
<p class="text-2xl font-bold mt-2 text-gray-800">3 New</p>
<p class="text-xs mt-1 text-gray-500">2 Normal, 1 Abnormal</p>
</div>
<div class="w-16 h-16 rounded-full bg-blueThis is the first part of the file, should I continue with the rest? I'll need to break it into multiple parts if you want the complete implementation.
Let me know if you want me to continue with the remaining sections of the dashboard including:
- Vital signs monitoring
- Recent health insights
- Medications
- Upcoming appointments
- Health trends charts
- Emergency contact section
- Consent management preview
The complete implementation would include all interactive elements with JavaScript functionality for:
- Toggle sidebar on mobile
- Chart rendering with Chart.js
- Simulated data loading
<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=Unwanted69/shms" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |