in the hospital dashboard can the chart does not show any value , can you do it some default values - Follow Up Deployment
Browse files- index.html +92 -4
index.html
CHANGED
@@ -5,6 +5,7 @@
|
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
<title>MedFlow AI - Healthcare Portal</title>
|
7 |
<script src="https://cdn.tailwindcss.com"></script>
|
|
|
8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
<style>
|
10 |
.gradient-bg {
|
@@ -332,16 +333,16 @@
|
|
332 |
<div class="bg-white rounded-xl shadow p-6">
|
333 |
<h3 class="font-bold text-gray-800 mb-4">Patient Flow Today</h3>
|
334 |
<p class="text-sm text-gray-500 mb-4">Real-time admissions and discharges</p>
|
335 |
-
<div class="h-64
|
336 |
-
<
|
337 |
</div>
|
338 |
</div>
|
339 |
|
340 |
<div class="bg-white rounded-xl shadow p-6">
|
341 |
<h3 class="font-bold text-gray-800 mb-4">Capacity Utilization</h3>
|
342 |
<p class="text-sm text-gray-500 mb-4">Hospital capacity throughout the day</p>
|
343 |
-
<div class="h-64
|
344 |
-
<
|
345 |
</div>
|
346 |
</div>
|
347 |
</div>
|
@@ -563,6 +564,93 @@
|
|
563 |
alert('Invalid credentials. For this demo, use username: doctor, password: timotee');
|
564 |
}
|
565 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
566 |
</script>
|
567 |
<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=dcrey7/medflowai" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
568 |
</html>
|
|
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
<title>MedFlow AI - Healthcare Portal</title>
|
7 |
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
9 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
10 |
<style>
|
11 |
.gradient-bg {
|
|
|
333 |
<div class="bg-white rounded-xl shadow p-6">
|
334 |
<h3 class="font-bold text-gray-800 mb-4">Patient Flow Today</h3>
|
335 |
<p class="text-sm text-gray-500 mb-4">Real-time admissions and discharges</p>
|
336 |
+
<div class="h-64">
|
337 |
+
<canvas id="patientFlowChart"></canvas>
|
338 |
</div>
|
339 |
</div>
|
340 |
|
341 |
<div class="bg-white rounded-xl shadow p-6">
|
342 |
<h3 class="font-bold text-gray-800 mb-4">Capacity Utilization</h3>
|
343 |
<p class="text-sm text-gray-500 mb-4">Hospital capacity throughout the day</p>
|
344 |
+
<div class="h-64">
|
345 |
+
<canvas id="capacityChart"></canvas>
|
346 |
</div>
|
347 |
</div>
|
348 |
</div>
|
|
|
564 |
alert('Invalid credentials. For this demo, use username: doctor, password: timotee');
|
565 |
}
|
566 |
}
|
567 |
+
|
568 |
+
// Initialize charts when hospital dashboard is shown
|
569 |
+
function loginAsDoctor() {
|
570 |
+
const username = document.getElementById('username').value;
|
571 |
+
const password = document.getElementById('password').value;
|
572 |
+
|
573 |
+
// Hardcoded credentials for demo
|
574 |
+
if (username === 'doctor' && password === 'timotee') {
|
575 |
+
document.getElementById('hospitalLogin').classList.add('hidden');
|
576 |
+
document.getElementById('hospitalDashboard').classList.remove('hidden');
|
577 |
+
|
578 |
+
// Patient Flow Chart
|
579 |
+
const patientFlowCtx = document.getElementById('patientFlowChart').getContext('2d');
|
580 |
+
new Chart(patientFlowCtx, {
|
581 |
+
type: 'line',
|
582 |
+
data: {
|
583 |
+
labels: ['6 AM', '8 AM', '10 AM', '12 PM', '2 PM', '4 PM', '6 PM', '8 PM'],
|
584 |
+
datasets: [{
|
585 |
+
label: 'Admissions',
|
586 |
+
data: [12, 19, 28, 42, 36, 29, 18, 8],
|
587 |
+
borderColor: '#3B82F6',
|
588 |
+
backgroundColor: 'rgba(59, 130, 246, 0.1)',
|
589 |
+
tension: 0.3,
|
590 |
+
fill: true
|
591 |
+
}, {
|
592 |
+
label: 'Discharges',
|
593 |
+
data: [5, 12, 18, 24, 32, 28, 22, 15],
|
594 |
+
borderColor: '#10B981',
|
595 |
+
backgroundColor: 'rgba(16, 185, 129, 0.1)',
|
596 |
+
tension: 0.3,
|
597 |
+
fill: true
|
598 |
+
}]
|
599 |
+
},
|
600 |
+
options: {
|
601 |
+
responsive: true,
|
602 |
+
maintainAspectRatio: false,
|
603 |
+
scales: {
|
604 |
+
y: {
|
605 |
+
beginAtZero: true
|
606 |
+
}
|
607 |
+
}
|
608 |
+
}
|
609 |
+
});
|
610 |
+
|
611 |
+
// Capacity Utilization Chart
|
612 |
+
const capacityCtx = document.getElementById('capacityChart').getContext('2d');
|
613 |
+
new Chart(capacityCtx, {
|
614 |
+
type: 'bar',
|
615 |
+
data: {
|
616 |
+
labels: ['ER', 'ICU', 'Ward A', 'Ward B', 'OR', 'Clinic'],
|
617 |
+
datasets: [{
|
618 |
+
label: 'Capacity Utilization (%)',
|
619 |
+
data: [92, 85, 78, 65, 88, 72],
|
620 |
+
backgroundColor: [
|
621 |
+
'rgba(239, 68, 68, 0.7)',
|
622 |
+
'rgba(249, 115, 22, 0.7)',
|
623 |
+
'rgba(234, 179, 8, 0.7)',
|
624 |
+
'rgba(16, 185, 129, 0.7)',
|
625 |
+
'rgba(59, 130, 246, 0.7)',
|
626 |
+
'rgba(139, 92, 246, 0.7)'
|
627 |
+
],
|
628 |
+
borderColor: [
|
629 |
+
'rgba(239, 68, 68, 1)',
|
630 |
+
'rgba(249, 115, 22, 1)',
|
631 |
+
'rgba(234, 179, 8, 1)',
|
632 |
+
'rgba(16, 185, 129, 1)',
|
633 |
+
'rgba(59, 130, 246, 1)',
|
634 |
+
'rgba(139, 92, 246, 1)'
|
635 |
+
],
|
636 |
+
borderWidth: 1
|
637 |
+
}]
|
638 |
+
},
|
639 |
+
options: {
|
640 |
+
responsive: true,
|
641 |
+
maintainAspectRatio: false,
|
642 |
+
scales: {
|
643 |
+
y: {
|
644 |
+
beginAtZero: true,
|
645 |
+
max: 100
|
646 |
+
}
|
647 |
+
}
|
648 |
+
}
|
649 |
+
});
|
650 |
+
} else {
|
651 |
+
alert('Invalid credentials. For this demo, use username: doctor, password: timotee');
|
652 |
+
}
|
653 |
+
}
|
654 |
</script>
|
655 |
<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=dcrey7/medflowai" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
656 |
</html>
|