Spaces:
Running
Running
File size: 24,715 Bytes
7ce2f25 744a384 7ce2f25 744a384 7ce2f25 744a384 7ce2f25 744a384 7ce2f25 744a384 7ce2f25 744a384 7ce2f25 744a384 7ce2f25 744a384 7ce2f25 744a384 7ce2f25 744a384 7ce2f25 2e21cc8 |
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 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MedScript Pro - Medical Transcription Simplified</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/sql.js@1.8.0/dist/sql-wasm.js"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js"></script>
<style>
.wave-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
}
.transcription-card {
backdrop-filter: blur(10px);
background-color: rgba(255, 255, 255, 0.85);
}
.play-btn:hover .play-icon {
transform: scale(1.1);
transition: all 0.2s ease;
}
</style>
</head>
<body class="min-h-screen bg-gray-50">
<div id="wave-bg" class="wave-bg"></div>
<!-- Navigation -->
<nav class="bg-white shadow-sm">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex items-center">
<div class="flex-shrink-0 flex items-center">
<i data-feather="activity" class="h-8 w-8 text-blue-600"></i>
<span class="ml-2 text-xl font-bold text-gray-800">MedScript Pro</span>
</div>
</div>
<div class="hidden md:ml-6 md:flex md:items-center md:space-x-8">
<a href="#" class="text-blue-600 border-blue-500 px-3 py-2 text-sm font-medium border-b-2">Dashboard</a>
<a href="#" class="text-gray-500 hover:text-gray-700 px-3 py-2 text-sm font-medium">Transcripts</a>
<a href="#" class="text-gray-500 hover:text-gray-700 px-3 py-2 text-sm font-medium">Patients</a>
<a href="#" class="text-gray-500 hover:text-gray-700 px-3 py-2 text-sm font-medium">Settings</a>
</div>
<div class="flex items-center">
<button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md text-sm font-medium flex items-center">
<i data-feather="plus" class="h-4 w-4 mr-1"></i>
New Transcription
</button>
<div class="ml-4 relative flex-shrink-0">
<div class="h-8 w-8 rounded-full bg-blue-100 flex items-center justify-center cursor-pointer">
<i data-feather="user" class="h-4 w-4 text-blue-600"></i>
</div>
</div>
</div>
</div>
</div>
</nav>
<!-- Main Content -->
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<!-- Header -->
<div class="mb-8">
<h1 class="text-3xl font-bold text-gray-900">Medical Transcription Dashboard</h1>
<p class="mt-2 text-gray-600">Efficiently transcribe, review, and manage medical records</p>
</div>
<!-- Stats Cards -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center">
<div class="p-3 rounded-full bg-blue-100">
<i data-feather="mic" class="h-6 w-6 text-blue-600"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Pending Transcriptions</p>
<p class="text-2xl font-semibold text-gray-900">12</p>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center">
<div class="p-3 rounded-full bg-green-100">
<i data-feather="check-circle" class="h-6 w-6 text-green-600"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Completed Today</p>
<p class="text-2xl font-semibold text-gray-900">8</p>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center">
<div class="p-3 rounded-full bg-purple-100">
<i data-feather="clock" class="h-6 w-6 text-purple-600"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Avg. Turnaround Time</p>
<p class="text-2xl font-semibold text-gray-900">2.4h</p>
</div>
</div>
</div>
</div>
<!-- Transcription Section -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
<!-- Left Column - Record/Upload -->
<div class="lg:col-span-1">
<div class="bg-white rounded-lg shadow overflow-hidden">
<div class="px-6 py-5 border-b border-gray-200 bg-gradient-to-r from-blue-50 to-white">
<h3 class="text-lg font-medium text-gray-900">Start New Transcription</h3>
</div>
<div class="px-6 py-5 space-y-4">
<div class="flex flex-col items-center justify-center p-8 border-2 border-dashed border-gray-300 rounded-lg bg-gray-50">
<i data-feather="mic" class="h-10 w-10 text-gray-400 mb-3"></i>
<p class="text-sm text-gray-500 mb-4">Record directly or upload an audio file</p>
<button onclick="startRecording()" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md text-sm font-medium">
Start Recording
</button>
</div>
<div class="text-center">
<button onclick="uploadAudio()" class="text-blue-600 hover:text-blue-800 text-sm font-medium flex items-center justify-center w-full">
<i data-feather="upload" class="h-4 w-4 mr-2"></i>
Upload Audio File
</button>
</div>
</div>
</div>
<!-- Recent Patients -->
<div class="mt-6 bg-white rounded-lg shadow overflow-hidden">
<div class="px-6 py-5 border-b border-gray-200 bg-gradient-to-r from-blue-50 to-white">
<h3 class="text-lg font-medium text-gray-900">Recent Patients</h3>
</div>
<div class="divide-y divide-gray-200">
<div class="px-6 py-4 flex items-center">
<div class="h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center">
<i data-feather="user" class="h-5 w-5 text-blue-600"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-900">John D. Peterson</p>
<p class="text-sm text-gray-500">Last visit: Cardiology</p>
</div>
</div>
<div class="px-6 py-4 flex items-center">
<div class="h-10 w-10 rounded-full bg-purple-100 flex items-center justify-center">
<i data-feather="user" class="h-5 w-5 text-purple-600"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-900">Sarah M. Williams</p>
<p class="text-sm text-gray-500">Last visit: Pediatrics</p>
</div>
</div>
<div class="px-6 py-4 flex items-center">
<div class="h-10 w-10 rounded-full bg-green-100 flex items-center justify-center">
<i data-feather="user" class="h-5 w-5 text-green-600"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-900">Robert T. Johnson</p>
<p class="text-sm text-gray-500">Last visit: Orthopedics</p>
</div>
</div>
</div>
</div>
</div>
<!-- Right Column - Recent Transcriptions -->
<div class="lg:col-span-2">
<div class="bg-white rounded-lg shadow overflow-hidden">
<div class="px-6 py-5 border-b border-gray-200 bg-gradient-to-r from-blue-50 to-white">
<div class="flex items-center justify-between">
<h3 class="text-lg font-medium text-gray-900">Recent Transcriptions</h3>
<button class="text-blue-600 hover:text-blue-800 text-sm font-medium">
View All
</button>
</div>
</div>
<div class="divide-y divide-gray-200">
<!-- Transcription Item 1 -->
<div class="p-6 flex items-start">
<div class="play-btn flex-shrink-0 h-12 w-12 rounded-full bg-blue-600 flex items-center justify-center cursor-pointer hover:bg-blue-700 transition-colors">
<i data-feather="play" class="play-icon h-5 w-5 text-white"></i>
</div>
<div class="ml-4 flex-1">
<div class="flex items-center justify-between">
<p class="text-sm font-medium text-blue-600">Dr. Michael Chen</p>
<span class="px-2 py-1 text-xs rounded-full bg-green-100 text-green-800">Completed</span>
</div>
<p class="text-sm text-gray-900 mt-1">Patient Follow-up - Cardiology Consultation</p>
<p class="text-sm text-gray-500 mt-1">Transcript: 02/15/2023 路 8:42 AM 路 12 min</p>
<div class="mt-2 flex items-center text-sm text-gray-500">
<i data-feather="calendar" class="h-4 w-4 mr-1"></i>
Due: Today, 5:00 PM
</div>
</div>
</div>
<!-- Transcription Item 2 -->
<div class="p-6 flex items-start">
<div class="play-btn flex-shrink-0 h-12 w-12 rounded-full bg-blue-600 flex items-center justify-center cursor-pointer hover:bg-blue-700 transition-colors">
<i data-feather="play" class="play-icon h-5 w-5 text-white"></i>
</div>
<div class="ml-4 flex-1">
<div class="flex items-center justify-between">
<p class="text-sm font-medium text-blue-600">Dr. Lisa Rodriguez</p>
<span class="px-2 py-1 text-xs rounded-full bg-yellow-100 text-yellow-800">In Progress</span>
</div>
<p class="text-sm text-gray-900 mt-1">Initial Evaluation - Pediatric Checkup</p>
<p class="text-sm text-gray-500 mt-1">Transcript: 02/14/2023 路 3:15 PM 路 18 min</p>
<div class="mt-2 flex items-center text-sm text-gray-500">
<i data-feather="calendar" class="h-4 w-4 mr-1"></i>
Due: Tomorrow, 10:00 AM
</div>
</div>
</div>
<!-- Transcription Item 3 -->
<div class="p-6 flex items-start">
<div class="play-btn flex-shrink-0 h-12 w-12 rounded-full bg-blue-600 flex items-center justify-center cursor-pointer hover:bg-blue-700 transition-colors">
<i data-feather="play" class="play-icon h-5 w-5 text-white"></i>
</div>
<div class="ml-4 flex-1">
<div class="flex items-center justify-between">
<p class="text-sm font-medium text-blue-600">Dr. James Wilson</p>
<span class="px-2 py-1 text-xs rounded-full bg-red-100 text-red-800">Pending</span>
</div>
<p class="text-sm text-gray-900 mt-1">Surgical Consultation - Orthopedic Review</p>
<p class="text-sm text-gray-500 mt-1">Transcript: 02/14/2023 路 11:30 AM 路 22 min</p>
<div class="mt-2 flex items-center text-sm text-gray-500">
<i data-feather="calendar" class="h-4 w-4 mr-1"></i>
Due: Today, 12:00 PM
</div>
</div>
</div>
</div>
</div>
<!-- Quick Actions -->
<div class="mt-6 grid grid-cols-1 sm:grid-cols-2 gap-6">
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center">
<div class="p-3 rounded-full bg-indigo-100">
<i data-feather="book-open" class="h-6 w-6 text-indigo-600"></i>
</div>
<div class="ml-4">
<h4 class="text-lg font-medium text-gray-900">Templates</h4>
<p class="mt-1 text-sm text-gray-500">Access common medical templates</p>
<button class="mt-3 text-indigo-600 hover:text-indigo-800 text-sm font-medium">
Browse Templates
</button>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center">
<div class="p-3 rounded-full bg-pink-100">
<i data-feather="settings" class="h-6 w-6 text-pink-600"></i>
</div>
<div class="ml-4">
<h4 class="text-lg font-medium text-gray-900">Preferences</h4>
<p class="mt-1 text-sm text-gray-500">Customize your transcription workflow</p>
<button class="mt-3 text-pink-600 hover:text-pink-800 text-sm font-medium">
Update Settings
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- Transcription Modal -->
<div id="transcriptionModal" class="fixed inset-0 overflow-y-auto hidden z-50">
<div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
<div class="fixed inset-0 transition-opacity" aria-hidden="true">
<div class="absolute inset-0 bg-gray-500 opacity-75"></div>
</div>
<span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span>
<div class="inline-block align-bottom bg-white rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-2xl sm:w-full sm:p-6">
<div>
<div class="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-blue-100">
<i data-feather="mic" class="h-6 w-6 text-blue-600"></i>
</div>
<div class="mt-3 text-center sm:mt-5">
<h3 class="text-lg leading-6 font-medium text-gray-900" id="modalTitle">New Transcription</h3>
<div class="mt-2">
<div class="grid grid-cols-1 gap-y-6 gap-x-4 sm:grid-cols-6">
<div class="sm:col-span-3">
<label for="doctor-name" class="block text-sm font-medium text-gray-700">Doctor Name</label>
<input type="text" name="doctor-name" id="doctor-name" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
</div>
<div class="sm:col-span-3">
<label for="patient-name" class="block text-sm font-medium text-gray-700">Patient Name</label>
<input type="text" name="patient-name" id="patient-name" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
</div>
<div class="sm:col-span-6">
<label for="specialty" class="block text-sm font-medium text-gray-700">Specialty</label>
<select id="specialty" name="specialty" class="mt-1 block w-full py-2 px-3 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
<option>Cardiology</option>
<option>Pediatrics</option>
<option>Orthopedics</option>
<option>Neurology</option>
<option>Dermatology</option>
</select>
</div>
</div>
</div>
</div>
</div>
<div class="mt-5 sm:mt-6 sm:grid sm:grid-cols-2 sm:gap-3 sm:grid-flow-row-dense">
<button type="button" onclick="document.getElementById('transcriptionModal').classList.add('hidden');" class="w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:col-start-1 sm:text-sm">
Cancel
</button>
<button type="button" onclick="saveNewTranscription()" class="mt-3 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:mt-0 sm:col-start-2 sm:text-sm">
Save Transcription
</button>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="bg-white border-t border-gray-200 mt-12">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
<div class="md:flex md:items-center md:justify-between">
<div class="flex justify-center md:order-2 space-x-6">
<a href="#" class="text-gray-400 hover:text-gray-500">
<i data-feather="help-circle" class="h-5 w-5"></i>
</a>
<a href="#" class="text-gray-400 hover:text-gray-500">
<i data-feather="mail" class="h-5 w-5"></i>
</a>
<a href="#" class="text-gray-400 hover:text-gray-500">
<i data-feather="settings" class="h-5 w-5"></i>
</a>
</div>
<div class="mt-8 md:mt-0 md:order-1">
<p class="text-center text-xs text-gray-500">
© 2023 MedScript Pro. All rights reserved. HIPAA compliant.
</p>
</div>
</div>
</div>
</footer>
<script>
// Initialize SQLite database
let db;
async function initDB() {
const SQL = await initSqlJs({
locateFile: file => `https://cdn.jsdelivr.net/npm/sql.js@1.8.0/dist/${file}`
});
db = new SQL.Database();
// Create tables if they don't exist
db.run(`
CREATE TABLE IF NOT EXISTS transcriptions (
id INTEGER PRIMARY KEY AUTOINCREMENT,
doctor_name TEXT NOT NULL,
patient_name TEXT NOT NULL,
specialty TEXT NOT NULL,
recording_date TEXT NOT NULL,
duration INTEGER NOT NULL,
status TEXT NOT NULL,
due_date TEXT NOT NULL,
audio_file BLOB,
transcription_text TEXT
);
`);
db.run(`
CREATE TABLE IF NOT EXISTS patients (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
last_visit TEXT NOT NULL,
department TEXT NOT NULL
);
`);
// Insert sample data if empty
const transcriptionsCount = db.exec("SELECT COUNT(*) FROM transcriptions")[0].values[0][0];
if (transcriptionsCount === 0) {
db.run(`INSERT INTO transcriptions (doctor_name, patient_name, specialty, recording_date, duration, status, due_date)
VALUES ('Dr. Michael Chen', 'John Peterson', 'Cardiology', '2023-02-15 08:42:00', 12, 'Completed', '2023-02-15 17:00:00')`);
db.run(`INSERT INTO transcriptions (doctor_name, patient_name, specialty, recording_date, duration, status, due_date)
VALUES ('Dr. Lisa Rodriguez', 'Sarah Williams', 'Pediatrics', '2023-02-14 15:15:00', 18, 'In Progress', '2023-02-16 10:00:00')`);
db.run(`INSERT INTO transcriptions (doctor_name, patient_name, specialty, recording_date, duration, status, due_date)
VALUES ('Dr. James Wilson', 'Robert Johnson', 'Orthopedics', '2023-02-14 11:30:00', 22, 'Pending', '2023-02-15 12:00:00')`);
}
const patientsCount = db.exec("SELECT COUNT(*) FROM patients")[0].values[0][0];
if (patientsCount === 0) {
db.run(`INSERT INTO patients (name, last_visit, department)
VALUES ('John D. Peterson', '2023-02-10', 'Cardiology')`);
db.run(`INSERT INTO patients (name, last_visit, department)
VALUES ('Sarah M. Williams', '2023-02-08', 'Pediatrics')`);
db.run(`INSERT INTO patients (name, last_visit, department)
VALUES ('Robert T. Johnson', '2023-02-12', 'Orthopedics')`);
}
}
// Initialize Vanta.js waves background
VANTA.WAVES({
el: "#wave-bg",
color: 0x0066cc,
waveHeight: 20,
shininess: 50,
waveSpeed: 0.5,
zoom: 0.8
});
// Initialize Feather Icons
feather.replace();
// Initialize database when page loads
document.addEventListener('DOMContentLoaded', initDB);
</script>
</body>
</html>
|