curaflow/dashboard.html

324 lines
17 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard | Curio</title>
<link rel="stylesheet" href="index.css">
<link rel="stylesheet" href="dashboard.css">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700&display=swap" rel="stylesheet">
<script src="tenantLoader.js"></script>
</head>
<body class="dashboard-body">
<div class="sidebar-mobile-toggle" onclick="toggleSidebar()">☰ Menu</div>
<aside class="sidebar" id="sidebar">
<div class="logo">
<span class="logo-icon">C</span>
<span class="logo-text" data-tenant-name>Curio</span>
</div>
<nav class="side-nav">
<a href="#" class="active" onclick="showSection('overview')"><span>🏠</span> Overview</a>
<a href="#" onclick="showSection('queue')"><span>👥</span> Queue</a>
<a href="#" onclick="showSection('patients')"><span>📂</span> Patients</a>
<a href="#" onclick="showSection('pharmacy')"><span>💊</span> Pharmacy</a>
<a href="#" onclick="showSection('lab')"><span>🔬</span> Lab</a>
<a href="billing.html"><span>💳</span> Billing & Accounts</a>
<a href="staff.html"><span>👔</span> Staff & Payroll</a>
<a href="settings.html"><span>⚙️</span> Settings</a>
</nav>
<div class="user-profile">
<div class="avatar">DS</div>
<div class="info">
<strong>Dr. Sharma</strong>
<span>Cardiologist</span>
<a href="login.html" class="logout-btn"><span>🚪</span> Logout</a>
</div>
</div>
</aside>
<main class="dashboard-main">
<header class="dash-header">
<div class="search-bar">
<input type="text" placeholder="Search patients by name or WhatsApp number...">
</div>
<div class="header-actions">
<div class="date-picker-group">
<label for="queueDate">Select Date:</label>
<input type="date" id="queueDate" class="date-input">
</div>
<span class="badge counter-badge">Reception Counter: 1</span>
<button class="btn-primary" id="newWalkinBtn">+ New Walk-in (Print Token)</button>
</div>
</header>
<div id="overview-section">
<section class="stats-row">
<div class="stat-card">
<span>In Queue</span>
<h3>12 Patients</h3>
<small class="text-accent">↑ 4 since last hour</small>
</div>
<div class="stat-card quota-card">
<span>Current Slot (10:00-10:30)</span>
<div class="quota-bars">
<div class="quota-item closed">
<small>Online: 3/3 (CLOSED)</small>
<div class="bar"><div class="fill" style="width: 100%; background: var(--text-muted);"></div></div>
</div>
<div class="quota-item">
<small>Walk-in: 4/5</small>
<div class="bar"><div class="fill" style="width: 80%;"></div></div>
</div>
</div>
</div>
<div class="stat-card">
<span>Avg. Wait Time</span>
<h3>18 Mins</h3>
<small class="text-muted">Target: 15 Mins</small>
</div>
</section>
<section class="queue-section" id="queue-section">
<div class="section-card">
<div class="card-header">
<h2>Live Queue</h2>
<div class="filters">
<span class="badge">All</span>
<span class="badge muted">Appointments</span>
<span class="badge muted">Walk-ins</span>
</div>
</div>
<table class="queue-table">
<thead>
<tr>
<th>Token</th>
<th>Patient Name</th>
<th>Source</th>
<th>Lang</th>
<th>Triage AI</th>
<th>Status</th>
<th>Arrival</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr class="active-row">
<td>#012</td>
<td><strong>Rahul Verma</strong></td>
<td><span class="source-tag online">Online</span></td>
<td><span class="lang-tag">HI</span></td>
<td><span class="triage-pill urgent">High Fever / Cough</span></td>
<td><span class="status-pill in-room">In Room</span></td>
<td>09:15 AM</td>
<td><button class="btn-small">Prescribe</button></td>
</tr>
<tr>
<td>#013</td>
<td><strong>Anjali Singh</strong></td>
<td><span class="source-tag walkin">Walk-in</span></td>
<td><span class="lang-tag">TE</span></td>
<td><span class="triage-pill moderate">General Checkup</span></td>
<td><span class="status-pill pending-pay">Unpaid (₹500)</span></td>
<td>09:30 AM</td>
<td><button class="btn-small secondary">Collect Pay</button></td>
</tr>
<tr>
<td>#014</td>
<td><strong>Suresh Kumar</strong></td>
<td><span class="source-tag online">Online</span></td>
<td><span class="lang-tag">EN</span></td>
<td><span class="triage-pill routine">Back Pain</span></td>
<td><span class="status-pill waiting">Paid (Waiting)</span></td>
<td>09:45 AM</td>
<td><button class="btn-small secondary">Notify</button></td>
</tr>
</tbody>
</table>
</div>
<div class="side-panel">
<div class="section-card ai-insights">
<h3>✨ AI Insights</h3>
<p>Predicted peak time: <strong>11:30 AM</strong>. Suggesting 5-min break for staff now.</p>
<div class="insight-item">
<small>No-show Alert</small>
<p>Token #015 (Vikram) hasn't replied to the 10-min reminder.</p>
</div>
</div>
</div>
</section>
</div>
<div id="patients-section" class="hidden">
<section class="section-card">
<div class="card-header">
<h2>Patient Records</h2>
<button class="btn-primary">+ Add New Patient</button>
</div>
<table class="queue-table">
<thead>
<tr>
<th>Patient ID</th>
<th>Name</th>
<th>WhatsApp</th>
<th>Last Visit</th>
<th>Visits</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>CF-1001</td>
<td><strong>Rahul Verma</strong></td>
<td>+91 98765 43210</td>
<td>12 May 2026</td>
<td>5</td>
<td><button class="btn-small secondary">View History</button></td>
</tr>
</tbody>
</table>
</section>
</div>
<div id="pharmacy-section" class="hidden">
<section class="section-card">
<div class="card-header">
<h2>💊 Pharmacy Inventory & Sales</h2>
<div class="header-actions">
<button class="btn-secondary">Expiry Alerts (2)</button>
<button class="btn-primary">+ Add Stock</button>
</div>
</div>
<div class="stats-row">
<div class="stat-card"><span>Total Inventory Value</span><h3>₹4,25,000</h3></div>
<div class="stat-card"><span>Daily Sales (GST)</span><h3>₹12,450</h3></div>
</div>
<table class="queue-table">
<thead>
<tr>
<th>ID</th>
<th>Medicine</th>
<th>Batch</th>
<th>Expiry</th>
<th>Stock</th>
<th>Price</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr><td>M01</td><td><strong>Paracetamol 500mg</strong></td><td>B2201</td><td>Dec 2026</td><td>120</td><td>₹5</td><td><button class="btn-small">Edit</button></td></tr>
<tr><td>M03</td><td><strong>Cough Syrup</strong></td><td>S881</td><td><span class="text-accent">Apr 2026</span></td><td>4</td><td>₹85</td><td><button class="btn-small secondary">Restock</button></td></tr>
</tbody>
</table>
</section>
</div>
<div id="lab-section" class="hidden">
<section class="section-card">
<div class="card-header">
<h2>🔬 Laboratory Orders</h2>
<span class="badge">4 New Orders</span>
</div>
<table class="queue-table">
<thead>
<tr>
<th>Order ID</th>
<th>Patient</th>
<th>Test Name</th>
<th>Priority</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr><td>LAB-101</td><td><strong>Rahul Verma</strong></td><td>CBC (Complete Blood Count)</td><td><span class="triage-pill urgent">High</span></td><td><span class="status-pill waiting">Sample Awaited</span></td><td><button class="btn-small">Collect Sample</button></td></tr>
</tbody>
</table>
</section>
</div>
<div id="consultationModal" class="modal">
<div class="modal-content" style="width: 900px; max-width: 95%;">
<div class="modal-header">
<h2>Digital Prescription</h2>
<span class="close-modal">&times;</span>
</div>
<div class="modal-body">
<div class="voice-section">
<button class="btn-secondary" id="startRecording"><span>🎤</span> Record Consultation</button>
<div id="recordingStatus" class="recording-status hidden">
<span class="pulse"></span> Recording...
</div>
<div id="aiInsights" class="ai-insights-box hidden">
<h4>✨ AI Insights (Draft)</h4>
<p id="insightText"></p>
</div>
</div>
<div class="doctor-panels-grid" style="display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.5rem; margin-top: 1rem;">
<!-- Column 1: Clinical Actions -->
<div class="clinical-inputs">
<div class="input-group">
<label>Diagnosis</label>
<input type="text" id="rxDiagnosis" placeholder="e.g. Viral Fever">
</div>
<div class="medicine-list" id="medicineList">
<label>Medicines & Dosages</label>
<div class="med-row">
<input type="text" placeholder="Medicine Name" class="med-name">
<input type="text" placeholder="Dosage (e.g. 1-0-1)" class="med-dosage">
<input type="text" placeholder="Duration" class="med-duration">
</div>
</div>
<button class="btn-secondary" id="addMed">+ Add Medicine</button>
<div class="lab-requests-section" style="margin-top: 1.5rem;">
<label>🔬 Request Lab Tests</label>
<div id="labTestList">
<div class="lab-row" style="display: flex; gap: 0.5rem; margin-bottom: 0.5rem;">
<input type="text" placeholder="Test Name (e.g. CBC, Lipid)" class="lab-test-name" style="flex: 1; padding: 0.6rem; border-radius: 8px; border: 1px solid var(--border);">
</div>
</div>
<button class="btn-secondary" id="addLabTest">+ Add Lab Test</button>
</div>
</div>
<!-- Column 2: Quick Reference & Sharing -->
<div class="quick-reference-panel" style="background: var(--bg); padding: 1rem; border-radius: 12px; border: 1px solid var(--border);">
<div class="panel-section">
<label style="font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase;">📂 Patient History</label>
<div class="history-list" style="font-size: 0.85rem; margin-top: 0.5rem;">
<div class="history-item" style="padding: 0.5rem; border-bottom: 1px solid #e2e8f0;">
<strong>12 May 2026</strong>: Chronic Gastritis. Rx: Pantoprazole.
</div>
<div class="history-item" style="padding: 0.5rem; border-bottom: 1px solid #e2e8f0;">
<strong>05 Apr 2026</strong>: Lab Report: HbA1c 7.2% (High) 🔬
</div>
</div>
</div>
<div class="panel-section" style="margin-top: 1.5rem;">
<label style="font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase;">⚡ Quick Share Health Tips</label>
<div class="tips-btns" style="display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.5rem;">
<button class="btn-small secondary" onclick="shareTip('diabetes')">🥗 Diabetes Diet</button>
<button class="btn-small secondary" onclick="shareTip('hypertension')">🧘 BP Control</button>
<button class="btn-small secondary" onclick="shareTip('viral')">💧 Hydration</button>
<button class="btn-small secondary" onclick="printTips()">🖨️ Print Tips</button>
</div>
</div>
<div class="panel-section" style="margin-top: 1.5rem;">
<label style="font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase;">📝 Note to Depts</label>
<textarea id="deptNote" placeholder="Note to Pharmacy or Lab..." style="width: 100%; height: 60px; margin-top: 0.5rem; padding: 0.5rem; border-radius: 8px; border: 1px solid #e2e8f0; font-size: 0.85rem;"></textarea>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn-primary" id="sendRx">Send to WhatsApp</button>
</div>
</div>
</div>
<script src="dashboard.js"></script>
</body>
</html>