pranit144 commited on
Commit
0927e06
·
verified ·
1 Parent(s): c19e9f9

Delete doctor_dashboard.html

Browse files
Files changed (1) hide show
  1. doctor_dashboard.html +0 -137
doctor_dashboard.html DELETED
@@ -1,137 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Doctor Dashboard - Care Plan Management System</title>
7
- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
8
- <style>
9
- :root {
10
- --primary-blue: #0d6efd;
11
- --light-blue: #e7f1ff;
12
- --dark-blue: #0a58ca;
13
- }
14
-
15
- body {
16
- background-color: #f8f9fa;
17
- }
18
-
19
- .navbar {
20
- background-color: var(--primary-blue);
21
- padding: 1rem;
22
- }
23
-
24
- .navbar-brand {
25
- color: white !important;
26
- font-weight: bold;
27
- }
28
-
29
- .container {
30
- max-width: 1000px;
31
- margin-top: 30px;
32
- }
33
-
34
- .card {
35
- border: none;
36
- border-radius: 15px;
37
- box-shadow: 0 0 15px rgba(0,0,0,0.1);
38
- margin-bottom: 20px;
39
- }
40
-
41
- .card-header {
42
- background-color: var(--light-blue);
43
- border-radius: 15px 15px 0 0 !important;
44
- border-bottom: none;
45
- padding: 1.5rem;
46
- }
47
-
48
- .emergency-alert {
49
- background-color: #dc3545;
50
- color: white;
51
- padding: 15px;
52
- border-radius: 10px;
53
- margin-bottom: 20px;
54
- }
55
-
56
- .role-switcher {
57
- position: fixed;
58
- top: 20px;
59
- right: 20px;
60
- z-index: 1000;
61
- }
62
- </style>
63
- </head>
64
- <body>
65
- <nav class="navbar">
66
- <div class="container">
67
- <a class="navbar-brand" href="#">Doctor Dashboard</a>
68
- <div class="role-switcher">
69
- <select class="form-select" id="roleSelect" onchange="switchRole()">
70
- <option value="doctor" selected>Doctor View</option>
71
- <option value="patient">Patient View</option>
72
- </select>
73
- </div>
74
- </div>
75
- </nav>
76
-
77
- <div class="container">
78
- <div class="card">
79
- <div class="card-header">
80
- <h3 class="mb-0">Emergency Notifications</h3>
81
- </div>
82
- <div class="card-body">
83
- <div id="emergencyNotifications">
84
- <div class="text-center" id="noNotifications">
85
- No emergency notifications at this time
86
- </div>
87
- </div>
88
- </div>
89
- </div>
90
- </div>
91
-
92
- <script>
93
- function switchRole() {
94
- const role = document.getElementById('roleSelect').value;
95
- if (role === 'patient') {
96
- window.location.href = '/';
97
- }
98
- }
99
-
100
- async function fetchEmergencyNotifications() {
101
- try {
102
- const response = await fetch('/get_emergency_notifications');
103
- const data = await response.json();
104
-
105
- if (data.success) {
106
- const notificationsDiv = document.getElementById('emergencyNotifications');
107
- const noNotificationsDiv = document.getElementById('noNotifications');
108
-
109
- if (data.notifications && data.notifications.length > 0) {
110
- notificationsDiv.innerHTML = '';
111
- data.notifications.forEach(notification => {
112
- const notificationElement = document.createElement('div');
113
- notificationElement.className = 'emergency-alert';
114
- notificationElement.innerHTML = `
115
- <h4>Emergency Alert</h4>
116
- <p>Time: ${notification.timestamp}</p>
117
- <p>Patient Feedback: ${notification.patient_feedback}</p>
118
- `;
119
- notificationsDiv.appendChild(notificationElement);
120
- });
121
- } else {
122
- notificationsDiv.innerHTML = '<div class="text-center">No emergency notifications at this time</div>';
123
- }
124
- }
125
- } catch (error) {
126
- console.error('Error fetching notifications:', error);
127
- }
128
- }
129
-
130
- // Initial fetch
131
- fetchEmergencyNotifications();
132
-
133
- // Poll for new notifications
134
- setInterval(fetchEmergencyNotifications, 30000);
135
- </script>
136
- </body>
137
- </html>