Spaces:
Running
Running
enhance the Save Information button within the Hospital Settings section so that it turns green and changes the wording to "Information Saved" when clicked - Follow Up Deployment
32283b9 verified Download index.html from mavodanovic/AI-Assistant: direct link, hf CLI and curl.
- Browser
- Download file 92 kB
-
https://huggingface.co/spaces/mavodanovic/AI-Assistant/resolve/main/index.html
- Command line
-
hf download hf://spaces/mavodanovic/AI-Assistant/index.html
-
curl -L -o index.html https://huggingface.co/spaces/mavodanovic/AI-Assistant/resolve/main/index.html
92 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MediScheduler - Hospital Appointment Management</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#2563eb',
secondary: '#1d4ed8',
accent: '#0ea5e9',
dark: '#1e293b',
light: '#f8fafc'
}
}
}
}
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Poppins', sans-serif;
background-color: #f1f5f9;
}
.sidebar {
transition: all 0.3s ease;
}
.dashboard-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}
.stat-card:hover {
transform: scale(1.03);
}
.section {
display: none;
animation: fadeIn 0.4s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.active-section {
display: block;
}
.nav-link {
transition: all 0.2s;
}
.nav-link:hover {
background-color: rgba(37, 99, 235, 0.1);
}
.nav-link.active {
background-color: rgba(37, 99, 235, 0.2);
border-left: 4px solid #2563eb;
}
.appointment-item:nth-child(odd) {
background-color: #f8fafc;
}
.doctor-card {
transition: all 0.3s ease;
}
.doctor-card:hover {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.doctor-card .specialty {
background-color: #dbeafe;
color: #2563eb;
padding: 2px 8px;
border-radius: 4px;
font-size: 0.75rem;
font-weight: 500;
}
.availability-day.active {
background-color: #dbeafe;
color: #2563eb;
font-weight: 500;
}
input[type="time"]:disabled {
background-color: #f3f4f6;
cursor: not-allowed;
}
/* Modal styles */
#edit-doctor-modal {
transition: opacity 0.3s ease;
}
#edit-doctor-modal input {
font-size: 0.875rem;
}
</style>
</head>
<body class="bg-gray-100">
<div class="flex h-screen">
<!-- Sidebar -->
<div class="sidebar bg-white w-64 md:w-72 h-full shadow-lg flex flex-col">
<div class="p-6 border-b">
<div class="flex items-center">
<div class="bg-blue-100 p-3 rounded-lg mr-3">
<i class="fas fa-hospital text-primary text-xl"></i>
</div>
<h1 class="text-xl font-bold text-gray-800">Medi<span class="text-primary">Scheduler</span></h1>
</div>
</div>
<div class="flex-1 overflow-y-auto py-4">
<nav>
<ul>
<li>
<a href="#" class="nav-link active flex items-center py-3 px-6 text-gray-700" data-section="dashboard">
<i class="fas fa-home mr-3 text-gray-500"></i>
<span>Dashboard</span>
</a>
</li>
<li>
<a href="#" class="nav-link flex items-center py-3 px-6 text-gray-700" data-section="appointments">
<i class="fas fa-calendar-check mr-3 text-gray-500"></i>
<span>Appointments</span>
<span class="ml-auto bg-red-100 text-red-800 text-xs px-2 py-0.5 rounded-full">24</span>
</a>
</li>
<li>
<a href="#" class="nav-link flex items-center py-3 px-6 text-gray-700" data-section="doctors">
<i class="fas fa-user-md mr-3 text-gray-500"></i>
<span>Doctors</span>
</a>
</li>
<li>
<a href="#" class="nav-link flex items-center py-3 px-6 text-gray-700" data-section="schedules">
<i class="fas fa-calendar-alt mr-3 text-gray-500"></i>
<span>Schedules</span>
</a>
</li>
<li>
<a href="#" class="nav-link flex items-center py-3 px-6 text-gray-700" data-section="settings">
<i class="fas fa-cog mr-3 text-gray-500"></i>
<span>Hospital Settings</span>
</a>
</li>
<li>
<a href="#" class="nav-link flex items-center py-3 px-6 text-gray-700" data-section="ai-assistant">
<i class="fas fa-robot mr-3 text-gray-500"></i>
<span>AI Assistant</span>
</a>
</li>
</ul>
</nav>
</div>
<div class="p-4 border-t">
<div class="flex items-center">
<img src="https://ui-avatars.com/api/?name=Admin+Hospital&background=2563eb&color=fff" class="w-10 h-10 rounded-full" alt="Admin">
<div class="ml-3">
<p class="text-sm font-medium text-gray-800">Hospital Admin</p>
<p class="text-xs text-gray-500">admin@example.com</p>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="flex-1 overflow-y-auto">
<!-- Header -->
<header class="bg-white shadow-sm">
<div class="flex justify-between items-center px-6 py-4">
<div>
<h2 class="text-xl font-semibold text-gray-800">Hospital Appointment Dashboard</h2>
<p class="text-sm text-gray-500">Manage appointments, doctors, and hospital settings</p>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<input type="text" placeholder="Search..." class="pl-10 pr-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent text-sm">
<i class="fas fa-search absolute left-3 top-2.5 text-gray-400"></i>
</div>
<div class="relative">
<button class="text-gray-500 hover:text-gray-700">
<i class="fas fa-bell text-xl"></i>
<span class="absolute top-0 right-0 inline-block w-2 h-2 transform translate-x-1/4 -translate-y-1/4 bg-red-500 rounded-full"></span>
</button>
</div>
</div>
</div>
</header>
<!-- Dashboard Content -->
<main class="p-6">
<!-- Dashboard Stats -->
<div id="dashboard" class="section active-section">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<div class="stat-card bg-white p-6 rounded-xl shadow-sm border-l-4 border-blue-500 transition-all">
<div class="flex justify-between items-center">
<div>
<p class="text-sm text-gray-500">Total Appointments</p>
<h3 class="text-2xl font-bold text-gray-800 mt-1">142</h3>
</div>
<div class="bg-blue-100 p-3 rounded-full">
<i class="fas fa-calendar-check text-blue-600 text-xl"></i>
</div>
</div>
<p class="text-xs text-green-500 mt-2"><i class="fas fa-arrow-up mr-1"></i>12% from last week</p>
</div>
<div class="stat-card bg-white p-6 rounded-xl shadow-sm border-l-4 border-green-500 transition-all">
<div class="flex justify-between items-center">
<div>
<p class="text-sm text-gray-500">Available Doctors</p>
<h3 class="text-2xl font-bold text-gray-800 mt-1">24</h3>
</div>
<div class="bg-green-100 p-3 rounded-full">
<i class="fas fa-user-md text-green-600 text-xl"></i>
</div>
</div>
<p class="text-xs text-gray-500 mt-2">3 doctors on leave</p>
</div>
<div class="stat-card bg-white p-6 rounded-xl shadow-sm border-l-4 border-yellow-500 transition-all">
<div class="flex justify-between items-center">
<div>
<p class="text-sm text-gray-500">Pending Requests</p>
<h3 class="text-2xl font-bold text-gray-800 mt-1">17</h3>
</div>
<div class="bg-yellow-100 p-3 rounded-full">
<i class="fas fa-clock text-yellow-600 text-xl"></i>
</div>
</div>
<p class="text-xs text-red-500 mt-2"><i class="fas fa-exclamation-circle mr-1"></i>Action required</p>
</div>
<div class="stat-card bg-white p-6 rounded-xl shadow-sm border-l-4 border-purple-500 transition-all">
<div class="flex justify-between items-center">
<div>
<p class="text-sm text-gray-500">AI Calls Handled</p>
<h3 class="text-2xl font-bold text-gray-800 mt-1">328</h3>
</div>
<div class="bg-purple-100 p-3 rounded-full">
<i class="fas fa-robot text-purple-600 text-xl"></i>
</div>
</div>
<p class="text-xs text-green-500 mt-2"><i class="fas fa-arrow-up mr-1"></i>24% from last week</p>
</div>
</div>
<!-- Upcoming Appointments -->
<div class="bg-white rounded-xl shadow-sm p-6 mb-8">
<div class="flex justify-between items-center mb-6">
<h3 class="text-lg font-semibold text-gray-800">Upcoming Appointments</h3>
<button class="bg-primary hover:bg-secondary text-white px-4 py-2 rounded-lg text-sm flex items-center">
<i class="fas fa-plus mr-2"></i> New Appointment
</button>
</div>
<div class="overflow-x-auto" style="max-width: 100vw;">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Patient</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Doctor</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Next Appointment</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr class="appointment-item hover:bg-gray-50">
<td class="px-4 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="https://ui-avatars.com/api/?name=John+Doe&background=0ea5e9&color=fff" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">John Doe</div>
</div>
</div>
</td>
<td class="px-4 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">Dr. Sarah Johnson</div>
<div class="text-sm text-gray-500">Cardiology</div>
</td>
<td class="px-4 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">Jun 15, 2023</div>
<div class="text-sm text-gray-500">10:30 AM - 11:00 AM</div>
</td>
<td class="px-4 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Confirmed</span>
</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">
<button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-edit"></i></button>
<button class="text-red-600 hover:text-red-900"><i class="fas fa-trash"></i></button>
</td>
</tr>
<tr class="appointment-item hover:bg-gray-50">
<td class="px-4 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="https://ui-avatars.com/api/?name=Maria+Garcia&background=ec4899&color=fff" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Maria Garcia</div>
</div>
</div>
</td>
<td class="px-4 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">Dr. Robert Chen</div>
<div class="text-sm text-gray-500">Dermatology</div>
</td>
<td class="px-4 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">Jun 16, 2023</div>
<div class="text-sm text-gray-500">2:15 PM - 2:45 PM</div>
</td>
<td class="px-4 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">Pending</span>
</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">
<button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-edit"></i></button>
<button class="text-red-600 hover:text-red-900"><i class="fas fa-trash"></i></button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="mt-6 text-center">
<button class="text-primary hover:text-secondary font-medium text-sm flex items-center justify-center mx-auto">
View All Appointments <i class="fas fa-arrow-right ml-2"></i>
</button>
</div>
</div>
<!-- Doctor Availability -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
<div class="bg-white rounded-xl shadow-sm p-6">
<h3 class="text-lg font-semibold text-gray-800 mb-6">Doctor Availability</h3>
<div class="flex justify-between mb-4">
<h4 class="text-sm font-medium text-gray-600">Dr. Sarah Johnson - Cardiology</h4>
<span class="text-xs px-2 py-1 bg-green-100 text-green-800 rounded-full">Available</span>
</div>
<div class="flex space-x-2 mb-6">
<div class="availability-day text-center py-2 px-3 rounded-lg cursor-pointer border border-gray-200 text-sm">
<div class="font-medium">Mon</div>
<div class="text-xs mt-1">9AM-5PM</div>
</div>
<div class="availability-day active text-center py-2 px-3 rounded-lg cursor-pointer border border-gray-200 text-sm">
<div class="font-medium">Tue</div>
<div class="text-xs mt-1">9AM-5PM</div>
</div>
<div class="availability-day text-center py-2 px-3 rounded-lg cursor-pointer border border-gray-200 text-sm">
<div class="font-medium">Wed</div>
<div class="text-xs mt-1">9AM-5PM</div>
</div>
<div class="availability-day text-center py-2 px-3 rounded-lg cursor-pointer border border-gray-200 text-sm">
<div class="font-medium">Thu</div>
<div class="text-xs mt-1">OFF</div>
</div>
<div class="availability-day text-center py-2 px-3 rounded-lg cursor-pointer border border-gray-200 text-sm">
<div class="font-medium">Fri</div>
<div class="text-xs mt-1">9AM-3PM</div>
</div>
</div>
<div class="flex justify-between mb-4">
<h4 class="text-sm font-medium text-gray-600">Dr. Robert Chen - Dermatology</h4>
<span class="text-xs px-2 py-1 bg-green-100 text-green-800 rounded-full">Available</span>
</div>
<div class="flex space-x-2">
<div class="availability-day text-center py-2 px-3 rounded-lg cursor-pointer border border-gray-200 text-sm">
<div class="font-medium">Mon</div>
<div class="text-xs mt-1">10AM-4PM</div>
</div>
<div class="availability-day text-center py-2 px-3 rounded-lg cursor-pointer border border-gray-200 text-sm">
<div class="font-medium">Tue</div>
<div class="text-xs mt-1">OFF</div>
</div>
<div class="availability-day text-center py-2 px-3 rounded-lg cursor-pointer border border-gray-200 text-sm">
<div class="font-medium">Wed</div>
<div class="text-xs mt-1">10AM-4PM</div>
</div>
<div class="availability-day text-center py-2 px-3 rounded-lg cursor-pointer border border-gray-200 text-sm">
<div class="font-medium">Thu</div>
<div class="text-xs mt-1">10AM-4PM</div>
</div>
<div class="availability-day text-center py-2 px-3 rounded-lg cursor-pointer border border-gray-200 text-sm">
<div class="font-medium">Fri</div>
<div class="text-xs mt-1">11AM-5PM</div>
</div>
</div>
</div>
<!-- AI Assistant Stats -->
<div class="bg-white rounded-xl shadow-sm p-6">
<h3 class="text-lg font-semibold text-gray-800 mb-6">AI Assistant Performance</h3>
<div class="flex items-center mb-6">
<div class="mr-4">
<div class="bg-blue-100 p-4 rounded-full">
<i class="fas fa-robot text-blue-600 text-2xl"></i>
</div>
</div>
<div>
<div class="text-3xl font-bold text-gray-800">92%</div>
<div class="text-sm text-gray-600">Success Rate</div>
</div>
</div>
<div class="grid grid-cols-2 gap-4">
<div class="bg-blue-50 p-4 rounded-lg">
<div class="text-xl font-bold text-blue-700">328</div>
<div class="text-sm text-gray-600">Calls Handled</div>
</div>
<div class="bg-green-50 p-4 rounded-lg">
<div class="text-xl font-bold text-green-700">302</div>
<div class="text-sm text-gray-600">Appointments Booked</div>
</div>
<div class="bg-yellow-50 p-4 rounded-lg">
<div class="text-xl font-bold text-yellow-700">24</div>
<div class="text-sm text-gray-600">Reschedules</div>
</div>
<div class="bg-purple-50 p-4 rounded-lg">
<div class="text-xl font-bold text-purple-700">2.8 min</div>
<div class="text-sm text-gray-600">Avg. Call Time</div>
</div>
</div>
<button class="w-full mt-6 bg-primary hover:bg-secondary text-white py-2.5 rounded-lg font-medium flex items-center justify-center">
<i class="fas fa-cog mr-2"></i> Configure AI Assistant
</button>
</div>
</div>
</div>
<!-- Other sections (initially hidden) -->
<div id="appointments" class="section">
<div class="bg-white p-6 rounded-xl shadow-sm">
<div class="flex justify-between items-center mb-6">
<h3 class="text-xl font-bold text-gray-800">Appointments Management</h3>
<button class="bg-primary hover:bg-secondary text-white px-4 py-2 rounded-lg text-sm flex items-center">
<i class="fas fa-plus mr-2"></i> New Appointment
</button>
</div>
<div class="flex flex-wrap gap-4 mb-6">
<div class="flex-1 min-w-[200px]">
<label class="block text-sm font-medium text-gray-700 mb-1">Status</label>
<select class="w-full border rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary">
<option value="all">All Statuses</option>
<option value="confirmed">Confirmed</option>
<option value="pending">Pending</option>
<option value="cancelled">Cancelled</option>
<option value="completed">Completed</option>
</select>
</div>
<div class="flex-1 min-w-[200px]">
<label class="block text-sm font-medium text-gray-700 mb-1">Date Range</label>
<select class="w-full border rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary">
<option value="today">Today</option>
<option value="week">This Week</option>
<option value="month">This Month</option>
<option value="custom">Custom Range</option>
</select>
</div>
<div class="flex-1 min-w-[200px]">
<label class="block text-sm font-medium text-gray-700 mb-1">Doctor</label>
<select class="w-full border rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary">
<option value="all">All Doctors</option>
<option value="1">Dr. Sarah Johnson</option>
<option value="2">Dr. Robert Chen</option>
<option value="3">Dr. Emily Wilson</option>
</select>
</div>
<div class="flex-1 min-w-[200px]">
<label class="block text-sm font-medium text-gray-700 mb-1">Specialty</label>
<select class="w-full border rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary">
<option value="all">All Specialties</option>
<option value="cardiology">Cardiology</option>
<option value="dermatology">Dermatology</option>
<option value="pediatrics">Pediatrics</option>
</select>
</div>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Patient</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Doctor</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date & Time</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Duration</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr class="hover:bg-gray-50">
<td class="px-4 py-4 whitespace-nowrap">
<div class="flex items-center">
<img class="h-10 w-10 rounded-full" src="https://ui-avatars.com/api/?name=John+Doe&background=0ea5e9&color=fff" alt="John Doe">
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">John Doe</div>
</div>
</div>
</td>
<td class="px-4 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">Dr. Sarah Johnson</div>
<div class="text-sm text-gray-500">Cardiology</div>
</td>
<td class="px-4 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">Jun 15, 2023</div>
<div class="text-sm text-gray-500">10:30 AM - 11:00 AM</div>
</td>
<td class="px-4 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">30 min</div>
</td>
<td class="px-4 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Confirmed</span>
</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">
<button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-edit"></i></button>
<button class="text-red-600 hover:text-red-900"><i class="fas fa-trash"></i></button>
</td>
</tr>
<!-- More appointment rows would be dynamically added here -->
</tbody>
</table>
</div>
<div class="mt-6 flex justify-between items-center">
<div class="text-sm text-gray-500">
Showing <span class="font-medium">1</span> to <span class="font-medium">10</span> of <span class="font-medium">24</span> appointments
</div>
<div class="flex space-x-2">
<button class="px-3 py-1 border rounded-lg text-sm">Previous</button>
<button class="px-3 py-1 border rounded-lg text-sm bg-primary text-white">1</button>
<button class="px-3 py-1 border rounded-lg text-sm">2</button>
<button class="px-3 py-1 border rounded-lg text-sm">3</button>
<button class="px-3 py-1 border rounded-lg text-sm">Next</button>
</div>
</div>
</div>
</div>
<div id="doctors" class="section">
<div class="bg-white p-6 rounded-xl shadow-sm">
<div class="flex justify-between items-center mb-6">
<h3 class="text-xl font-bold text-gray-800">Doctors Directory</h3>
<button class="bg-primary hover:bg-secondary text-white px-4 py-2 rounded-lg text-sm flex items-center">
<i class="fas fa-plus mr-2"></i> Add New Doctor
</button>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Doctor Card 1 -->
<div class="doctor-card bg-white border border-gray-200 rounded-lg overflow-hidden hover:shadow-md transition-all">
<div class="p-4 border-b">
<div class="flex items-center">
<img src="https://randomuser.me/api/portraits/women/44.jpg" class="w-16 h-16 rounded-full object-cover" alt="Dr. Sarah Johnson">
<div class="ml-4">
<h4 class="font-bold text-gray-800">Dr. Sarah Johnson</h4>
<p class="text-sm text-primary">Cardiologist</p>
</div>
</div>
</div>
<div class="p-4">
<div class="flex items-center text-sm text-gray-600 mb-2">
<i class="fas fa-hospital mr-2"></i>
<span>Main Hospital</span>
</div>
<div class="text-sm text-gray-600 mb-2">
<i class="fas fa-map-marker-alt mr-2"></i>
<span>123 Medical Center Dr, Building A</span>
</div>
<div class="text-sm text-gray-600">
<i class="fas fa-door-open mr-2"></i>
<span>Floor 3, Office 302</span>
</div>
</div>
<div class="bg-gray-50 px-4 py-3 flex justify-end space-x-2">
<button class="text-blue-600 hover:text-blue-800">
<i class="fas fa-edit"></i>
</button>
<button class="text-red-600 hover:text-red-800">
<i class="fas fa-trash"></i>
</button>
</div>
</div>
<!-- Doctor Card 2 -->
<div class="doctor-card bg-white border border-gray-200 rounded-lg overflow-hidden hover:shadow-md transition-all">
<div class="p-4 border-b">
<div class="flex items-center">
<img src="https://randomuser.me/api/portraits/men/32.jpg" class="w-16 h-16 rounded-full object-cover" alt="Dr. Robert Chen">
<div class="ml-4">
<h4 class="font-bold text-gray-800">Dr. Robert Chen</h4>
<p class="text-sm text-primary">Dermatologist</p>
</div>
</div>
</div>
<div class="p-4">
<div class="flex items-center text-sm text-gray-600 mb-2">
<i class="fas fa-hospital mr-2"></i>
<span>Westside Clinic</span>
</div>
<div class="text-sm text-gray-600 mb-2">
<i class="fas fa-map-marker-alt mr-2"></i>
<span>456 Health Parkway, Suite 100</span>
</div>
<div class="text-sm text-gray-600">
<i class="fas fa-door-open mr-2"></i>
<span>Floor 1, Office 105</span>
</div>
</div>
<div class="bg-gray-50 px-4 py-3 flex justify-end space-x-2">
<button class="text-blue-600 hover:text-blue-800">
<i class="fas fa-edit"></i>
</button>
<button class="text-red-600 hover:text-red-800">
<i class="fas fa-trash"></i>
</button>
</div>
</div>
<!-- Doctor Card 3 -->
<div class="doctor-card bg-white border border-gray-200 rounded-lg overflow-hidden hover:shadow-md transition-all">
<div class="p-4 border-b">
<div class="flex items-center">
<img src="https://randomuser.me/api/portraits/women/68.jpg" class="w-16 h-16 rounded-full object-cover" alt="Dr. Emily Wilson">
<div class="ml-4">
<h4 class="font-bold text-gray-800">Dr. Emily Wilson</h4>
<p class="text-sm text-primary">Pediatrician</p>
</div>
</div>
</div>
<div class="p-4">
<div class="flex items-center text-sm text-gray-600 mb-2">
<i class="fas fa-hospital mr-2"></i>
<span>Children's Center</span>
</div>
<div class="text-sm text-gray-600 mb-2">
<i class="fas fa-map-marker-alt mr-2"></i>
<span>789 Wellness Blvd, Tower B</span>
</div>
<div class="text-sm text-gray-600">
<i class="fas fa-door-open mr-2"></i>
<span>Floor 2, Office 210</span>
</div>
</div>
<div class="bg-gray-50 px-4 py-3 flex justify-end space-x-2">
<button class="text-blue-600 hover:text-blue-800">
<i class="fas fa-edit"></i>
</button>
<button class="text-red-600 hover:text-red-800">
<i class="fas fa-trash"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<div id="schedules" class="section">
<div class="bg-white p-6 rounded-xl shadow-sm">
<div class="flex justify-between items-center mb-6">
<h3 class="text-xl font-bold text-gray-800">Doctor Schedules</h3>
<div class="flex space-x-3">
<select class="border rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary">
<option>All Doctors</option>
<option>Dr. Sarah Johnson</option>
<option>Dr. Robert Chen</option>
<option>Dr. Emily Wilson</option>
</select>
<select class="border rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary">
<option>This Week</option>
<option>Next Week</option>
<option>Custom Range</option>
</select>
</div>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Doctor</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Monday</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Tuesday</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Wednesday</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Thursday</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Friday</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Saturday</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Sunday</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr class="hover:bg-gray-50" data-doctor-id="1">
<td class="px-4 py-4 whitespace-nowrap">
<div class="flex items-center">
<img src="https://randomuser.me/api/portraits/women/44.jpg" class="w-10 h-10 rounded-full mr-3" alt="Dr. Sarah Johnson">
<div>
<div class="font-medium text-gray-900">Dr. Sarah Johnson</div>
<div class="text-xs text-primary">Cardiology</div>
</div>
</div>
</td>
<td class="px-4 py-4 text-sm text-gray-700 day-cell" data-day="monday">
<div class="flex items-center space-x-2">
<input type="time" value="09:00" class="border rounded px-2 py-1 text-sm w-20 start-time">
<span>to</span>
<input type="time" value="17:00" class="border rounded px-2 py-1 text-sm w-20 end-time">
</div>
<div class="flex items-center mt-2">
<label class="inline-flex items-center">
<input type="checkbox" class="rounded text-primary focus:ring-primary off-day">
<span class="ml-2 text-xs">Off Duty</span>
</label>
</div>
</td>
<td class="px-4 py-4 text-sm text-gray-700 day-cell" data-day="tuesday">
<div class="flex items-center space-x-2">
<input type="time" value="09:00" class="border rounded px-2 py-1 text-sm w-20 start-time">
<span>to</span>
<input type="time" value="17:00" class="border rounded px-2 py-1 text-sm w-20 end-time">
</div>
<div class="flex items-center mt-2">
<label class="inline-flex items-center">
<input type="checkbox" class="rounded text-primary focus:ring-primary off-day">
<span class="ml-2 text-xs">Off Duty</span>
</label>
</div>
</td>
<td class="px-4 py-4 text-sm text-gray-700 day-cell" data-day="wednesday">
<div class="flex items-center space-x-2">
<input type="time" value="09:00" class="border rounded px-2 py-1 text-sm w-20 start-time">
<span>to</span>
<input type="time" value="17:00" class="border rounded px-2 py-1 text-sm w-20 end-time">
</div>
<div class="flex items-center mt-2">
<label class="inline-flex items-center">
<input type="checkbox" class="rounded text-primary focus:ring-primary off-day">
<span class="ml-2 text-xs">Off Duty</span>
</label>
</div>
</td>
<td class="px-4 py-4 text-sm text-gray-700 day-cell" data-day="thursday">
<div class="flex items-center space-x-2">
<input type="time" value="09:00" class="border rounded px-2 py-1 text-sm w-20 start-time">
<span>to</span>
<input type="time" value="17:00" class="border rounded px-2 py-1 text-sm w-20 end-time">
</div>
<div class="flex items-center mt-2">
<label class="inline-flex items-center">
<input type="checkbox" class="rounded text-primary focus:ring-primary off-day" checked>
<span class="ml-2 text-xs">Off Duty</span>
</label>
</div>
</td>
<td class="px-4 py-4 text-sm text-gray-700 day-cell" data-day="friday">
<div class="flex items-center space-x-2">
<input type="time" value="09:00" class="border rounded px-2 py-1 text-sm w-20 start-time">
<span>to</span>
<input type="time" value="15:00" class="border rounded px-2 py-1 text-sm w-20 end-time">
</div>
<div class="flex items-center mt-2">
<label class="inline-flex items-center">
<input type="checkbox" class="rounded text-primary focus:ring-primary off-day">
<span class="ml-2 text-xs">Off Duty</span>
</label>
</div>
</td>
<td class="px-4 py-4 text-sm text-gray-700 day-cell" data-day="saturday">
<div class="flex items-center space-x-2">
<input type="time" value="09:00" class="border rounded px-2 py-1 text-sm w-20 start-time">
<span>to</span>
<input type="time" value="17:00" class="border rounded px-2 py-1 text-sm w-20 end-time">
</div>
<div class="flex items-center mt-2">
<label class="inline-flex items-center">
<input type="checkbox" class="rounded text-primary focus:ring-primary off-day" checked>
<span class="ml-2 text-xs">Off Duty</span>
</label>
</div>
</td>
<td class="px-4 py-4 text-sm text-gray-700 day-cell" data-day="sunday">
<div class="flex items-center space-x-2">
<input type="time" value="09:00" class="border rounded px-2 py-1 text-sm w-20 start-time">
<span>to</span>
<input type="time" value="17:00" class="border rounded px-2 py-1 text-sm w-20 end-time">
</div>
<div class="flex items-center mt-2">
<label class="inline-flex items-center">
<input type="checkbox" class="rounded text-primary focus:ring-primary off-day" checked>
<span class="ml-2 text-xs">Off Duty</span>
</label>
</div>
</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">
<div class="space-y-2">
<div>
<span class="text-xs text-gray-500 block mb-1">Slot Length</span>
<select class="slot-length border rounded px-2 py-1 text-xs w-20" data-doctor-id="1">
<option value="15">15 min</option>
<option value="20">20 min</option>
<option value="30" selected>30 min</option>
<option value="45">45 min</option>
<option value="60">60 min</option>
</select>
</div>
<div class="flex items-center space-x-2">
<button class="text-blue-600 hover:text-blue-800 save-schedule" title="Save Schedule">
<i class="fas fa-save"></i>
</button>
<button class="text-red-600 hover:text-red-800" title="Reset Changes">
<i class="fas fa-undo"></i>
</button>
</div>
</div>
</td>
</tr>
<tr class="hover:bg-gray-50">
<td class="px-4 py-4 whitespace-nowrap">
<div class="flex items-center">
<img src="https://randomuser.me/api/portraits/men/32.jpg" class="w-10 h-10 rounded-full mr-3" alt="Dr. Robert Chen">
<div>
<div class="font-medium text-gray-900">Dr. Robert Chen</div>
<div class="text-xs text-primary">Dermatology</div>
</div>
</div>
</td>
<td class="px-4 py-4 text-sm text-gray-700">
<div>10:00 AM - 4:00 PM</div>
<div class="text-xs text-gray-500 mt-1">6 slots available</div>
</td>
<td class="px-4 py-4 text-sm text-gray-500 italic">
Off Duty
</td>
<td class="px-4 py-4 text-sm text-gray-700">
<div>10:00 AM - 4:00 PM</div>
<div class="text-xs text-gray-500 mt-1">4 slots available</div>
</td>
<td class="px-4 py-4 text-sm text-gray-700">
<div>10:00 AM - 4:00 PM</div>
<div class="text-xs text-gray-500 mt-1">5 slots available</div>
</td>
<td class="px-4 py-4 text-sm text-gray-700">
<div>11:00 AM - 5:00 PM</div>
<div class="text-xs text-gray-500 mt-1">7 slots available</div>
</td>
<td class="px-4 py-4 text-sm text-gray-700">
<div>9:00 AM - 1:00 PM</div>
<div class="text-xs text-gray-500 mt-1">2 slots available</div>
</td>
<td class="px-4 py-4 text-sm text-gray-500 italic">
Off Duty
</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">
<button class="text-blue-600 hover:text-blue-800 mr-2" title="Edit Schedule">
<i class="fas fa-edit"></i>
</button>
<button class="text-red-600 hover:text-red-800" title="Block Time">
<i class="fas fa-ban"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="mt-6">
<h4 class="font-medium text-gray-800 mb-3">Upcoming Time Off</h4>
<div class="bg-blue-50 border border-blue-100 rounded-lg p-4">
<div class="flex items-center justify-between mb-2">
<div class="flex items-center">
<img src="https://randomuser.me/api/portraits/women/44.jpg" class="w-8 h-8 rounded-full mr-3" alt="Dr. Sarah Johnson">
<span class="font-medium">Dr. Sarah Johnson</span>
</div>
<span class="text-sm bg-blue-100 text-blue-800 px-2 py-1 rounded">Jun 20-22, 2023</span>
</div>
<p class="text-sm text-gray-600">Annual leave - Cardiology department meeting</p>
</div>
</div>
</div>
</div>
<div id="settings" class="section">
<div class="bg-white p-6 rounded-xl shadow-sm">
<h3 class="text-xl font-bold text-gray-800 mb-6">Hospital Settings</h3>
<div class="mb-6 p-4 bg-blue-50 rounded-lg">
<h4 class="font-medium text-blue-800 mb-2">AI Assistant Information</h4>
<p class="text-sm text-gray-700">
The information you provide below will be used by our AI Assistant to answer questions from patients calling in.
Please include details about your hospital's services, specialties, locations, and any other relevant information.
</p>
</div>
<form class="space-y-6">
<div>
<label for="hospital-info" class="block text-sm font-medium text-gray-700 mb-2">Hospital Information</label>
<textarea id="hospital-info" rows="8" class="w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Enter detailed information about your hospital..."></textarea>
</div>
<div class="flex justify-end">
<button type="button" id="save-hospital-info" class="bg-primary hover:bg-secondary text-white px-6 py-2.5 rounded-lg font-medium flex items-center transition-colors duration-300">
<i class="fas fa-save mr-2"></i> Save Information
</button>
</div>
</form>
</div>
</div>
<div id="ai-assistant" class="section">
<div class="bg-white p-6 rounded-xl shadow-sm">
<h3 class="text-xl font-bold text-gray-800 mb-6">AI Assistant Configuration</h3>
<p class="text-gray-600">This section would manage the AI assistant settings, call handling rules, and scheduling preferences.</p>
</div>
</div>
</main>
</div>
</div>
<!-- Edit Schedule Modal -->
<div id="edit-schedule-modal" class="hidden fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full z-50">
<div class="relative top-20 mx-auto p-5 border w-full max-w-2xl shadow-lg rounded-md bg-white">
<div class="mt-3 text-left">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-medium leading-6 text-gray-900">Edit Schedule for <span id="schedule-doctor-name" class="font-bold">Dr. Sarah Johnson</span></h3>
<button id="close-schedule-modal" class="text-gray-400 hover:text-gray-500">
<i class="fas fa-times"></i>
</button>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<h4 class="font-medium text-gray-700 mb-3">Default Weekly Schedule</h4>
<div class="space-y-4">
<div class="flex items-center justify-between mb-2">
<span class="w-24">Monday</span>
<div class="flex items-center space-x-2">
<input type="time" class="border rounded px-2 py-1 text-sm w-24">
<span>to</span>
<input type="time" class="border rounded px-2 py-1 text-sm w-24">
</div>
<label class="inline-flex items-center">
<input type="checkbox" class="rounded text-primary focus:ring-primary">
<span class="ml-2 text-sm">Off</span>
</label>
</div>
<div class="flex items-center justify-between mb-2">
<span class="w-24">Tuesday</span>
<div class="flex items-center space-x-2">
<input type="time" class="border rounded px-2 py-1 text-sm w-24">
<span>to</span>
<input type="time" class="border rounded px-2 py-1 text-sm w-24">
</div>
<label class="inline-flex items-center">
<input type="checkbox" class="rounded text-primary focus:ring-primary">
<span class="ml-2 text-sm">Off</span>
</label>
</div>
<div class="flex items-center justify-between mb-2">
<span class="w-24">Wednesday</span>
<div class="flex items-center space-x-2">
<input type="time" class="border rounded px-2 py-1 text-sm w-24">
<span>to</span>
<input type="time" class="border rounded px-2 py-1 text-sm w-24">
</div>
<label class="inline-flex items-center">
<input type="checkbox" class="rounded text-primary focus:ring-primary">
<span class="ml-2 text-sm">Off</span>
</label>
</div>
<div class="flex items-center justify-between mb-2">
<span class="w-24">Thursday</span>
<div class="flex items-center space-x-2">
<input type="time" class="border rounded px-2 py-1 text-sm w-24">
<span>to</span>
<input type="time" class="border rounded px-2 py-1 text-sm w-24">
</div>
<label class="inline-flex items-center">
<input type="checkbox" class="rounded text-primary focus:ring-primary">
<span class="ml-2 text-sm">Off</span>
</label>
</div>
<div class="flex items-center justify-between mb-2">
<span class="w-24">Friday</span>
<div class="flex items-center space-x-2">
<input type="time" class="border rounded px-2 py-1 text-sm w-24">
<span>to</span>
<input type="time" class="border rounded px-2 py-1 text-sm w-24">
</div>
<label class="inline-flex items-center">
<input type="checkbox" class="rounded text-primary focus:ring-primary">
<span class="ml-2 text-sm">Off</span>
</label>
</div>
<div class="flex items-center justify-between mb-2">
<span class="w-24">Saturday</span>
<div class="flex items-center space-x-2">
<input type="time" class="border rounded px-2 py-1 text-sm w-24">
<span>to</span>
<input type="time" class="border rounded px-2 py-1 text-sm w-24">
</div>
<label class="inline-flex items-center">
<input type="checkbox" class="rounded text-primary focus:ring-primary">
<span class="ml-2 text-sm">Off</span>
</label>
</div>
<div class="flex items-center justify-between mb-2">
<span class="w-24">Sunday</span>
<div class="flex items-center space-x-2">
<input type="time" class="border rounded px-2 py-1 text-sm w-24">
<span>to</span>
<input type="time" class="border rounded px-2 py-1 text-sm w-24">
</div>
<label class="inline-flex items-center">
<input type="checkbox" class="rounded text-primary focus:ring-primary">
<span class="ml-2 text-sm">Off</span>
</label>
</div>
</div>
</div>
<div>
<h4 class="font-medium text-gray-700 mb-3">Block Specific Dates</h4>
<div class="space-y-4">
<div class="flex items-center justify-between">
<span>From</span>
<input type="date" class="border rounded px-2 py-1 text-sm">
<span>to</span>
<input type="date" class="border rounded px-2 py-1 text-sm">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Reason</label>
<input type="text" class="w-full border rounded px-3 py-2 text-sm" placeholder="Conference, Vacation, etc.">
</div>
<button class="w-full bg-primary text-white py-2 rounded text-sm font-medium">
Add Time Off
</button>
</div>
<h4 class="font-medium text-gray-700 mt-6 mb-3">Block Recurring Time</h4>
<div class="space-y-3">
<div class="flex items-center space-x-3">
<div class="flex-1">
<label class="block text-sm font-medium text-gray-700 mb-1">Day</label>
<select class="w-full border rounded px-3 py-2 text-sm">
<option>Monday</option>
<option>Tuesday</option>
<!-- All weekdays -->
</select>
</div>
<div class="flex-1">
<label class="block text-sm font-medium text-gray-700 mb-1">Time</label>
<div class="flex items-center space-x-2">
<input type="time" class="border rounded px-2 py-1 text-sm w-full">
<span>to</span>
<input type="time" class="border rounded px-2 py-1 text-sm w-full">
</div>
</div>
</div>
<button class="w-full bg-primary text-white py-2 rounded text-sm font-medium">
Add Weekly Block
</button>
</div>
</div>
</div>
<div class="flex justify-end space-x-3 pt-6">
<button id="cancel-schedule-edit" class="px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 rounded-md hover:bg-gray-200">
Cancel
</button>
<button class="px-4 py-2 text-sm font-medium text-white bg-primary rounded-md hover:bg-secondary">
Save Changes
</button>
</div>
</div>
</div>
</div>
<!-- Edit Doctor Modal -->
<div id="edit-doctor-modal" class="hidden fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full z-50">
<div class="relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white">
<div class="mt-3 text-left">
<h3 class="text-lg font-medium leading-6 text-gray-900 mb-4">Edit Doctor Information</h3>
<form id="doctor-form" class="space-y-4">
<div>
<label for="doctor-name" class="block text-sm font-medium text-gray-700">Full Name</label>
<input type="text" id="doctor-name" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary sm:text-sm">
</div>
<div>
<label for="doctor-specialty" class="block text-sm font-medium text-gray-700">Specialty</label>
<input type="text" id="doctor-specialty" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary sm:text-sm">
</div>
<div>
<label for="doctor-facility" class="block text-sm font-medium text-gray-700">Facility</label>
<input type="text" id="doctor-facility" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary sm:text-sm">
</div>
<div>
<label for="doctor-address" class="block text-sm font-medium text-gray-700">Address</label>
<input type="text" id="doctor-address" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary sm:text-sm">
</div>
<div class="grid grid-cols-2 gap-4">
<div>
<label for="doctor-floor" class="block text-sm font-medium text-gray-700">Floor</label>
<input type="text" id="doctor-floor" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary sm:text-sm">
</div>
<div>
<label for="doctor-office" class="block text-sm font-medium text-gray-700">Office</label>
<input type="text" id="doctor-office" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary sm:text-sm">
</div>
</div>
<div class="flex justify-end space-x-3 pt-4">
<button id="cancel-edit" type="button" class="px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 rounded-md hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
Cancel
</button>
<button type="submit" class="px-4 py-2 text-sm font-medium text-white bg-primary rounded-md hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
Save Changes
</button>
</div>
</form>
</div>
</div>
</div>
<script>
// Hospital info save functionality
document.getElementById('save-hospital-info').addEventListener('click', function() {
const button = this;
button.disabled = true;
button.innerHTML = '<i class="fas fa-check mr-2"></i> Information Saved';
button.classList.remove('bg-primary', 'hover:bg-secondary');
button.classList.add('bg-green-600', 'hover:bg-green-700');
// Simulate saving with timeout
setTimeout(function() {
// Here you would typically actually save the data to your backend
console.log('Hospital information saved:', document.getElementById('hospital-info').value);
// Reset button after 3 seconds
setTimeout(function() {
button.innerHTML = '<i class="fas fa-save mr-2"></i> Save Information';
button.classList.remove('bg-green-600', 'hover:bg-green-700');
button.classList.add('bg-primary', 'hover:bg-secondary');
button.disabled = false;
}, 3000);
}, 1000);
});
// Appointment filtering functionality
function filterAppointments() {
const status = document.querySelector('#appointments select:nth-of-type(1)').value;
const dateRange = document.querySelector('#appointments select:nth-of-type(2)').value;
const doctor = document.querySelector('#appointments select:nth-of-type(3)').value;
const specialty = document.querySelector('#appointments select:nth-of-type(4)').value;
// Here you would typically make an API call with the filter parameters
console.log('Filtering appointments with:', {status, dateRange, doctor, specialty});
// For demo purposes, we'll just show an alert
alert(`Filtering appointments by:
Status: ${status}
Date Range: ${dateRange}
Doctor: ${doctor}
Specialty: ${specialty}`);
}
// Initialize appointment filters
document.querySelectorAll('#appointments select').forEach(select => {
select.addEventListener('change', filterAppointments);
});
// Individual slot length configuration
document.querySelectorAll('.slot-length').forEach(select => {
select.addEventListener('change', function() {
const doctorId = this.dataset.doctorId;
const slotLength = parseInt(this.value);
// Here you would typically send this to your backend
console.log('Updating slot length to', slotLength, 'minutes for doctor:', doctorId);
// Update the appointments table to reflect new slot durations
const doctorRow = document.querySelector(`tr[data-doctor-id="${doctorId}"]`);
if (doctorRow) {
doctorRow.querySelectorAll('td:nth-child(4)').forEach(td => {
td.textContent = `${slotLength} min`;
});
}
// Show success message
alert(`Slot length updated to ${slotLength} minutes for this doctor`);
});
});
// Navigation functionality
document.querySelectorAll('.nav-link').forEach(link => {
link.addEventListener('click', function(e) {
e.preventDefault();
// Remove active class from all links
document.querySelectorAll('.nav-link').forEach(el => {
el.classList.remove('active');
});
// Add active class to clicked link
this.classList.add('active');
// Hide all sections
document.querySelectorAll('.section').forEach(section => {
section.classList.remove('active-section');
});
// Show the target section
const targetSection = this.getAttribute('data-section');
document.getElementById(targetSection).classList.add('active-section');
});
});
// Toggle active state for availability days
document.querySelectorAll('.availability-day').forEach(day => {
day.addEventListener('click', function() {
document.querySelectorAll('.availability-day').forEach(d => {
d.classList.remove('active');
});
this.classList.add('active');
});
});
// Stats counter animation
function animateValue(id, start, end, duration) {
let obj = document.getElementById(id);
let startTimestamp = null;
const step = (timestamp) => {
if (!startTimestamp) startTimestamp = timestamp;
const progress = Math.min((timestamp - startTimestamp) / duration, 1);
const value = Math.floor(progress * (end - start) + start);
obj.innerHTML = value;
if (progress < 1) {
window.requestAnimationFrame(step);
}
};
window.requestAnimationFrame(step);
}
// Initialize counters on page load
// Doctor edit functionality
document.querySelectorAll('.doctor-card .fa-edit').forEach(button => {
button.addEventListener('click', function() {
const card = this.closest('.doctor-card');
const name = card.querySelector('h4').textContent;
const specialty = card.querySelector('.text-primary').textContent;
const [facility, address, floorOffice] = Array.from(card.querySelectorAll('.text-gray-600 span')).map(el => el.textContent);
// Set form values
document.getElementById('doctor-name').value = name;
document.getElementById('doctor-specialty').value = specialty;
document.getElementById('doctor-facility').value = facility;
document.getElementById('doctor-address').value = address;
// Split floor/office info if available
if (floorOffice) {
const [floor, office] = floorOffice.split(',').map(s => s.trim());
document.getElementById('doctor-floor').value = floor.replace('Floor ', '');
document.getElementById('doctor-office').value = office.replace('Office ', '');
}
// Show modal
document.getElementById('edit-doctor-modal').classList.remove('hidden');
});
});
// Close modal handlers
document.getElementById('close-modal').addEventListener('click', () => {
document.getElementById('edit-doctor-modal').classList.add('hidden');
});
document.getElementById('cancel-edit').addEventListener('click', () => {
document.getElementById('edit-doctor-modal').classList.add('hidden');
});
// Form submission handler
document.getElementById('doctor-form').addEventListener('submit', function(e) {
e.preventDefault();
// Here you would typically send the data to your backend
// For this demo, we'll just update the UI
const name = document.getElementById('doctor-name').value;
const specialty = document.getElementById('doctor-specialty').value;
const facility = document.getElementById('doctor-facility').value;
const address = document.getElementById('doctor-address').value;
const floor = document.getElementById('doctor-floor').value;
const office = document.getElementById('doctor-office').value;
// Find the card that initiated the edit
const card = document.querySelector('.doctor-card h4').textContent === name ?
document.querySelector('.doctor-card h4').closest('.doctor-card') : null;
if (card) {
card.querySelector('h4').textContent = name;
card.querySelector('.text-primary').textContent = specialty;
const spans = card.querySelectorAll('.text-gray-600 span');
spans[0].textContent = facility;
spans[1].textContent = address;
spans[2].textContent = `Floor ${floor}, Office ${office}`;
}
// Close modal
document.getElementById('edit-doctor-modal').classList.add('hidden');
// Show success message (could be enhanced)
alert('Doctor information updated successfully!');
});
// Schedule edit functionality
document.querySelectorAll('[title="Edit Schedule"]').forEach(button => {
button.addEventListener('click', function() {
const row = this.closest('tr');
const doctorName = row.querySelector('.font-medium').textContent;
// Set doctor name in modal
document.getElementById('schedule-doctor-name').textContent = doctorName;
// Show modal
document.getElementById('edit-schedule-modal').classList.remove('hidden');
});
});
// Close schedule modal
document.getElementById('close-schedule-modal').addEventListener('click', () => {
document.getElementById('edit-schedule-modal').classList.add('hidden');
});
document.getElementById('cancel-schedule-edit').addEventListener('click', () => {
document.getElementById('edit-schedule-modal').classList.add('hidden');
});
document.addEventListener('DOMContentLoaded', function() {
animateValue("appointment-counter", 0, 142, 1500);
updateSlotLengths();
// Handle off day toggles
document.querySelectorAll('.off-day').forEach(checkbox => {
checkbox.addEventListener('change', function() {
const dayCell = this.closest('.day-cell');
const inputs = dayCell.querySelectorAll('input[type="time"]');
inputs.forEach(input => {
input.disabled = this.checked;
if (this.checked) {
input.classList.add('opacity-50');
} else {
input.classList.remove('opacity-50');
}
});
});
});
// Initialize disabled states
document.querySelectorAll('.off-day').forEach(checkbox => {
if (checkbox.checked) {
const dayCell = checkbox.closest('.day-cell');
const inputs = dayCell.querySelectorAll('input[type="time"]');
inputs.forEach(input => {
input.disabled = true;
input.classList.add('opacity-50');
});
}
});
// Save schedule handler
document.querySelectorAll('.save-schedule').forEach(button => {
button.addEventListener('click', function() {
const row = this.closest('tr');
const doctorId = row.dataset.doctorId;
const scheduleData = {};
row.querySelectorAll('.day-cell').forEach(dayCell => {
const day = dayCell.dataset.day;
const isOff = dayCell.querySelector('.off-day').checked;
const startTime = dayCell.querySelector('.start-time').value;
const endTime = dayCell.querySelector('.end-time').value;
scheduleData[day] = {
off: isOff,
start: startTime,
end: endTime
};
});
// Here you would typically send this data to your backend
console.log('Saving schedule for doctor', doctorId, scheduleData);
alert('Schedule saved successfully!');
});
});
// Reset changes handler
document.querySelectorAll('.fa-undo').forEach(button => {
button.addEventListener('click', function() {
const row = this.closest('tr');
if (confirm('Are you sure you want to reset all changes?')) {
// Here you would typically reload the original data
// For demo, we'll just reload the page
location.reload();
}
});
});
});
// Time block functionality
document.querySelectorAll('[title="Block Time"]').forEach(button => {
button.addEventListener('click', function() {
const row = this.closest('tr');
const doctorName = row.querySelector('.font-medium').textContent;
alert(`Block time functionality for ${doctorName} would open here`);
});
});
</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=mavodanovic/ai-assistant-backoffice" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p><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=mavodanovic/AI-Assistant" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MediScheduler - Hospital Appointment Management</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#2563eb',
secondary: '#1d4ed8',
accent: '#0ea5e9',
dark: '#1e293b',
light: '#f8fafc'
}
}
}
}
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Poppins', sans-serif;
background-color: #f1f5f9;
}
.sidebar {
transition: all 0.3s ease;
}
.dashboard-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}
.stat-card:hover {
transform: scale(1.03);
}
.section {
display: none;
animation: fadeIn 0.4s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.active-section {
display: block;
}
.nav-link {
transition: all 0.2s;
}
.nav-link:hover {
background-color: rgba(37, 99, 235, 0.1);
}
.nav-link.active {
background-color: rgba(37, 99, 235, 0.2);
border-left: 4px solid #2563eb;
}
.appointment-item:nth-child(odd) {
background-color: #f8fafc;
}
.doctor-card {
transition: all 0.3s ease;
}
.doctor-card:hover {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.doctor-card .specialty {
background-color: #dbeafe;
color: #2563eb;
padding: 2px 8px;
border-radius: 4px;
font-size: 0.75rem;
font-weight: 500;
}
.availability-day.active {
background-color: #dbeafe;
color: #2563eb;
font-weight: 500;
}
input[type="time"]:disabled {
background-color: #f3f4f6;
cursor: not-allowed;
}
/* Modal styles */
#edit-doctor-modal {
transition: opacity 0.3s ease;
}
#edit-doctor-modal input {
font-size: 0.875rem;
}
</style>
</head>
<body class="bg-gray-100">
<div class="flex h-screen">