Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
630 lines (580 loc) · 39.8 KB
/
Copy pathindex.html
File metadata and controls
630 lines (580 loc) · 39.8 KB
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
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
<!DOCTYPE html>
<html lang="en" class="h-full bg-slate-950 text-slate-100">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ACS CDSS Dashboard (2025 ACC/AHA Guidelines)</title>
<!-- Google Fonts: Inter & Outfit -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<!-- Tailwind CSS CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
fontFamily: {
sans: ['Inter', 'sans-serif'],
display: ['Outfit', 'sans-serif'],
},
fontSize: {
'2xs': '0.7rem',
'3xs': '0.6rem',
}
}
}
}
</script>
<style type="text/css">
/* Custom premium styling */
body {
background-image: radial-gradient(circle at 50% 0%, #1e1b4b 0%, #020617 70%);
font-family: 'Inter', sans-serif;
}
.font-display {
font-family: 'Outfit', sans-serif;
}
/* Glassmorphism details */
.glass-panel {
background: rgba(15, 23, 42, 0.45);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.05);
}
.glass-card {
background: rgba(30, 41, 59, 0.3);
border: 1px solid rgba(255, 255, 255, 0.03);
}
/* Custom scrollbars */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: rgba(15, 23, 42, 0.1);
}
::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.1);
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.2);
}
/* Micro animations */
@keyframes pulse-brief {
0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
50% { transform: scale(1.01); box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}
.animate-pulse-brief {
animation: pulse-brief 0.5s ease-out;
}
/* Print optimizations */
@media print {
html, body, #app-main-layout, main {
height: auto !important;
overflow: visible !important;
max-height: none !important;
background: white !important;
color: black !important;
}
header, section, #login-overlay, #btn-trigger-add, #btn-logout, #patient-directory-col, #patient-form-col, #notification-container {
display: none !important;
}
#clinical-audit-col {
grid-column: span 12 / span 12 !important;
width: 100% !important;
display: block !important;
}
.glass-panel, .glass-card {
background: transparent !important;
border: 1px solid #aaa !important;
color: black !important;
box-shadow: none !important;
margin-bottom: 20px !important;
page-break-inside: avoid !important;
}
span, h1, h2, h3, h4, h5, h6, p, div, li, td, th {
color: black !important;
}
.border-rose-500\/30, .border-amber-500\/30, .border-emerald-500\/20, .border-slate-800 {
border-color: #999 !important;
background: #fdfdfd !important;
}
table {
width: 100% !important;
border-collapse: collapse !important;
page-break-inside: avoid !important;
}
th, td {
border: 1px solid #aaa !important;
padding: 6px 10px !important;
text-align: left !important;
color: black !important;
}
th {
background-color: #f0f0f0 !important;
font-weight: bold !important;
}
/* Clean margins for printing */
@page {
size: A4 portrait;
margin: 15mm;
}
}
</style>
</head>
<body class="h-full flex flex-col antialiased select-none">
<!-- NOTIFICATION TOASTS -->
<div id="notification-container" class="fixed top-4 right-4 z-50 flex flex-col gap-3 pointer-events-none"></div>
<!-- LOGIN OVERLAY SPLASH -->
<div id="login-overlay" class="fixed inset-0 z-40 flex items-center justify-center bg-slate-950/80 backdrop-blur-md transition-opacity duration-300">
<div class="glass-panel w-full max-w-md p-8 rounded-3xl shadow-2xl border border-slate-800 flex flex-col">
<div class="text-center mb-8">
<div class="inline-flex p-3 rounded-2xl bg-indigo-500/10 border border-indigo-500/20 text-indigo-400 mb-4">
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"/></svg>
</div>
<h2 class="text-2xl font-bold font-display text-slate-100">ACS CDSS Portal</h2>
<p class="text-xs text-slate-400 mt-1">Acute Coronary Syndrome Clinical Decision Support System</p>
</div>
<form id="login-form" class="space-y-4">
<div>
<label class="block text-xs font-semibold text-slate-300 mb-1.5" for="login-username">Clinician ID</label>
<input type="text" id="login-username" required class="w-full px-4 py-2.5 rounded-xl bg-slate-900 border border-slate-800 text-slate-100 placeholder-slate-500 text-sm focus:border-indigo-500 focus:outline-none transition" placeholder="e.g. Dr. Roberts">
</div>
<div>
<label class="block text-xs font-semibold text-slate-300 mb-1.5" for="login-password">Access Token</label>
<input type="password" id="login-password" required class="w-full px-4 py-2.5 rounded-xl bg-slate-900 border border-slate-800 text-slate-100 placeholder-slate-500 text-sm focus:border-indigo-500 focus:outline-none transition" placeholder="••••••••">
</div>
<div class="pt-4">
<button type="submit" class="w-full py-3 bg-gradient-to-r from-indigo-600 to-indigo-700 hover:from-indigo-500 hover:to-indigo-600 active:scale-[0.98] transition-all rounded-xl font-semibold text-sm shadow-lg shadow-indigo-600/10 flex items-center justify-center">
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"/></svg>
Unlock Clinical Dashboard
</button>
</div>
</form>
<div class="mt-8 text-center text-[10px] text-slate-500">
Authorized Clinical Registry Personnel Only. Actions are logged for audit compliance.
</div>
</div>
</div>
<!-- MAIN LAYOUT (BLURRED UNTIL LOGGED IN) -->
<div id="app-main-layout" class="h-full flex flex-col blur-md pointer-events-none transition-all duration-300">
<!-- NAVIGATION HEADER -->
<header class="glass-panel border-b border-slate-800/80 px-6 py-4 flex flex-col md:flex-row justify-between items-center gap-4 flex-shrink-0">
<div class="flex items-center gap-3">
<div class="p-2 bg-indigo-500/10 rounded-xl border border-indigo-500/20 text-indigo-400">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg>
</div>
<div>
<h1 class="text-lg font-bold font-display text-slate-100 tracking-tight flex items-center">
ACS CDSS AUDIT PORTAL
<span class="ml-2.5 px-2 py-0.5 text-3xs font-semibold rounded bg-indigo-500/10 text-indigo-400 border border-indigo-500/20">2025 ACC/AHA Compliant</span>
</h1>
<p class="text-2xs text-slate-400">Acute Coronary Syndrome Clinical Decision Support System</p>
</div>
</div>
<!-- User Session Info & Controls -->
<div class="flex items-center gap-4">
<div class="text-right hidden sm:block">
<span class="text-2xs text-slate-400">Active Clinician</span>
<p id="user-name-display" class="text-xs font-bold text-slate-200">Dr. Roberts</p>
</div>
<button id="btn-trigger-add" class="px-4 py-2 text-xs bg-indigo-600 hover:bg-indigo-500 text-slate-100 rounded-xl transition flex items-center font-medium shadow-md shadow-indigo-600/10">
<svg class="w-4 h-4 mr-1.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/></svg>
Ingest Patient
</button>
<button id="btn-logout" class="p-2 rounded-xl bg-slate-900 border border-slate-800 text-slate-400 hover:text-rose-400 hover:border-rose-950 transition">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"/></svg>
</button>
</div>
</header>
<!-- CONTENT BODY (SCROLLABLE) -->
<main class="flex-grow p-6 overflow-y-auto space-y-6">
<!-- TOP STATISTICS STRIP -->
<section class="grid grid-cols-2 lg:grid-cols-4 gap-4">
<div class="glass-panel p-4 rounded-2xl flex items-center gap-4">
<div class="p-3 bg-sky-500/10 text-sky-400 rounded-xl">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"/></svg>
</div>
<div>
<span class="text-3xs font-semibold uppercase tracking-wider text-slate-400">Total Audit Sample</span>
<p id="stat-total-patients" class="text-2xl font-bold font-display text-slate-100">0</p>
</div>
</div>
<div class="glass-panel p-4 rounded-2xl flex items-center gap-4">
<div class="p-3 bg-rose-500/10 text-rose-400 rounded-xl">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/></svg>
</div>
<div>
<span class="text-3xs font-semibold uppercase tracking-wider text-slate-400">High Ischemic Risk</span>
<p id="stat-high-ischemic" class="text-2xl font-bold font-display text-slate-100">0</p>
</div>
</div>
<div class="glass-panel p-4 rounded-2xl flex items-center gap-4">
<div class="p-3 bg-amber-500/10 text-amber-400 rounded-xl">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/></svg>
</div>
<div>
<span class="text-3xs font-semibold uppercase tracking-wider text-slate-400">High Bleeding Risk (HBR)</span>
<p id="stat-high-bleeding" class="text-2xl font-bold font-display text-slate-100">0</p>
</div>
</div>
<div class="glass-panel p-4 rounded-2xl flex items-center gap-4">
<div class="p-3 bg-emerald-500/10 text-emerald-400 rounded-xl">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
</div>
<div>
<span class="text-3xs font-semibold uppercase tracking-wider text-slate-400">Guideline Compliance</span>
<p id="stat-compliance-score" class="text-2xl font-bold font-display text-emerald-400">0%</p>
</div>
</div>
</section>
<!-- THREE-PANEL INTERACTIVE GRID -->
<div class="grid grid-cols-1 lg:grid-cols-12 gap-6 items-start">
<!-- PANEL 1: PATIENT DIRECTORY (col-span-3) -->
<div id="patient-directory-col" class="lg:col-span-3 flex flex-col h-[740px] glass-panel rounded-3xl p-5 border border-slate-800">
<div class="mb-4">
<h3 class="text-base font-bold font-display text-slate-100">Patient Directory</h3>
<p class="text-3xs text-slate-400 mt-0.5">Select a registry case to inspect alerts</p>
</div>
<!-- Search & Filter Controls -->
<div class="space-y-2.5 mb-4">
<div class="relative">
<input type="text" id="search-patients" class="w-full pl-9 pr-4 py-2 rounded-xl bg-slate-900 border border-slate-800 text-slate-100 placeholder-slate-500 text-xs focus:border-indigo-500 focus:outline-none transition" placeholder="Search ID, Name, Diagnosis...">
<svg class="w-3.5 h-3.5 text-slate-500 absolute left-3 top-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/></svg>
</div>
<div class="grid grid-cols-2 gap-2 text-2xs">
<select id="filter-diagnosis" class="w-full px-2.5 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-300 focus:border-indigo-500 focus:outline-none transition">
<option value="all">All Diagnoses</option>
<option value="1">STEMI</option>
<option value="2">NSTEMI</option>
<option value="3">Unstable Angina</option>
</select>
<select id="filter-risk" class="w-full px-2.5 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-300 focus:border-indigo-500 focus:outline-none transition">
<option value="all">All Risks</option>
<option value="high-ischemic">High Ischemic</option>
<option value="high-bleeding">High Bleeding</option>
<option value="double-high">Double High</option>
<option value="standard">Standard Risk</option>
</select>
</div>
</div>
<!-- Patients List Scrollable Container -->
<div id="patient-list-container" class="flex-grow overflow-y-auto pr-1">
<!-- Rendered dynamically -->
</div>
</div>
<!-- PANEL 2: PATIENT INGESTION FORM (col-span-4) -->
<div id="patient-form-col" class="lg:col-span-4 glass-panel rounded-3xl p-5 border border-slate-800 flex flex-col h-[740px]">
<div class="mb-4 flex justify-between items-center">
<div>
<h3 id="form-action-title" class="text-base font-bold font-display text-slate-100">Add New Patient Record</h3>
<p class="text-3xs text-slate-400 mt-0.5">Define inputs for CDSS risk tiers</p>
</div>
<button id="btn-cancel-edit" class="px-2.5 py-1 text-2xs rounded bg-slate-800 hover:bg-slate-700 border border-slate-700 text-slate-300 hidden transition">
Clear Form
</button>
</div>
<!-- Scrollable Form Container -->
<form id="patient-ingestion-form" class="flex-grow overflow-y-auto pr-1 space-y-4 text-xs">
<!-- SECTION A: Demographics & Core Diagnostic Inputs (Collapsible) -->
<div class="border border-slate-800/80 rounded-xl overflow-hidden bg-slate-900/10">
<button type="button" class="collapsible-toggle w-full px-4 py-3 bg-slate-900/40 border-b border-slate-800 flex justify-between items-center text-slate-200 font-bold" data-target="form-section-a">
<span>A. Demographics & Core Inputs</span>
<svg class="toggle-icon w-4 h-4 transform rotate-180 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
</button>
<div id="form-section-a" class="p-4 space-y-3">
<div class="grid grid-cols-2 gap-3">
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-patient-id">Patient / Hospital ID *</label>
<input type="text" id="input-patient-id" required class="w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
</div>
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-name">Patient Name</label>
<input type="text" id="input-name" class="w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
</div>
</div>
<div class="grid grid-cols-3 gap-2">
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-age">Age (Years) *</label>
<input type="number" id="input-age" required min="1" max="120" class="w-full px-2 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
</div>
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-gender">Gender</label>
<select id="input-gender" class="w-full px-2 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</div>
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-weight">Weight (kg) *</label>
<input type="number" id="input-weight" required min="10" max="250" value="70" class="w-full px-2 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
</div>
</div>
<div class="grid grid-cols-2 gap-3">
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-diagnosis">Primary Diagnosis *</label>
<select id="input-diagnosis" class="w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
<option value="1">[1] STEMI</option>
<option value="2">[2] NSTEMI</option>
<option value="3">[3] Unstable Angina (UA)</option>
</select>
</div>
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-cptype">Chest Pain Type *</label>
<select id="input-cptype" class="w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
<option value="1">[1] Typical Angina</option>
<option value="2">[2] Atypical Angina</option>
<option value="3">[3] Non-anginal Pain</option>
</select>
</div>
</div>
<div class="grid grid-cols-2 gap-3">
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-troponin">Troponin Assay</label>
<select id="input-troponin" class="w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
<option value="0">[0] Normal/Negative</option>
<option value="1">[1] Elevated/Positive</option>
</select>
</div>
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-ecg">ECG Findings</label>
<select id="input-ecg" class="w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
<option value="0">[0] Normal</option>
<option value="1">[1] ST-Elevation</option>
<option value="2">[2] Dynamic ST-Depression/T-Wave Inv</option>
</select>
</div>
</div>
<div class="grid grid-cols-3 gap-2">
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-sbp">SBP (mmHg)</label>
<input type="number" id="input-sbp" min="50" max="250" class="w-full px-2 py-1.5 rounded bg-slate-900 border border-slate-800 text-slate-100 text-xs focus:border-indigo-500 focus:outline-none transition">
</div>
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-hr">HR (bpm)</label>
<input type="number" id="input-hr" min="30" max="220" class="w-full px-2 py-1.5 rounded bg-slate-900 border border-slate-800 text-slate-100 text-xs focus:border-indigo-500 focus:outline-none transition">
</div>
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-spo2">SpO2 (%)</label>
<input type="number" id="input-spo2" min="50" max="100" class="w-full px-2 py-1.5 rounded bg-slate-900 border border-slate-800 text-slate-100 text-xs focus:border-indigo-500 focus:outline-none transition">
</div>
</div>
</div>
</div>
<!-- SECTION B: Ischemic Risk Stratification Indicators (Collapsible) -->
<div class="border border-slate-800/80 rounded-xl overflow-hidden bg-slate-900/10">
<button type="button" class="collapsible-toggle w-full px-4 py-3 bg-slate-900/40 border-b border-slate-800 flex justify-between items-center text-slate-200 font-bold" data-target="form-section-b">
<span>B. Ischemic Risk Indicators</span>
<svg class="toggle-icon w-4 h-4 transform rotate-180 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
</button>
<div id="form-section-b" class="p-4 space-y-3.5">
<div class="flex items-start gap-2.5">
<input type="checkbox" id="cb-instability" class="mt-0.5 w-4 h-4 rounded text-indigo-600 bg-slate-950 border-slate-800 focus:ring-indigo-500 focus:ring-offset-slate-900">
<label for="cb-instability" class="text-2xs text-slate-300 leading-tight">Hemodynamic Instability or Cardiogenic Shock</label>
</div>
<div class="flex items-start gap-2.5">
<input type="checkbox" id="cb-angina" class="mt-0.5 w-4 h-4 rounded text-indigo-600 bg-slate-950 border-slate-800 focus:ring-indigo-500 focus:ring-offset-slate-900">
<label for="cb-angina" class="text-2xs text-slate-300 leading-tight">Severe/Recurrent Angina Refractory to Medical Therapy</label>
</div>
<div class="flex items-start gap-2.5">
<input type="checkbox" id="cb-hf" class="mt-0.5 w-4 h-4 rounded text-indigo-600 bg-slate-950 border-slate-800 focus:ring-indigo-500 focus:ring-offset-slate-900">
<label for="cb-hf" class="text-2xs text-slate-300 leading-tight">Acute Heart Failure or New/Worsening Mitral Regurgitation</label>
</div>
<div class="flex items-start gap-2.5">
<input type="checkbox" id="cb-arrhythmia" class="mt-0.5 w-4 h-4 rounded text-indigo-600 bg-slate-950 border-slate-800 focus:ring-indigo-500 focus:ring-offset-slate-900">
<label for="cb-arrhythmia" class="text-2xs text-slate-300 leading-tight">Sustained Ventricular Arrhythmias (VT/VF)</label>
</div>
<div class="flex items-start gap-2.5 border-t border-slate-850 pt-2.5">
<input type="checkbox" id="cb-diabetes" class="mt-0.5 w-4 h-4 rounded text-indigo-600 bg-slate-950 border-slate-800 focus:ring-indigo-500 focus:ring-offset-slate-900">
<label for="cb-diabetes" class="text-2xs text-slate-300 leading-tight">Diabetes Mellitus (Co-morbidity factor)</label>
</div>
</div>
</div>
<!-- SECTION C: Academic Bleeding Risk Indicators (ARC-HBR) -->
<div class="border border-slate-800/80 rounded-xl overflow-hidden bg-slate-900/10">
<button type="button" class="collapsible-toggle w-full px-4 py-3 bg-slate-900/40 border-b border-slate-800 flex justify-between items-center text-slate-200 font-bold" data-target="form-section-c">
<span>C. Bleeding Risk Indicators (ARC-HBR)</span>
<svg class="toggle-icon w-4 h-4 transform rotate-180 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
</button>
<div id="form-section-c" class="p-4 space-y-3.5">
<div class="flex items-start gap-2.5">
<input type="checkbox" id="cb-renal" class="mt-0.5 w-4 h-4 rounded text-indigo-600 bg-slate-950 border-slate-800 focus:ring-indigo-500 focus:ring-offset-slate-900">
<label for="cb-renal" class="text-2xs text-slate-300 leading-tight">Severe Renal Impairment (eGFR < 30 mL/min / CKD)</label>
</div>
<div class="flex items-start gap-2.5">
<input type="checkbox" id="cb-anemia" class="mt-0.5 w-4 h-4 rounded text-indigo-600 bg-slate-950 border-slate-800 focus:ring-indigo-500 focus:ring-offset-slate-900">
<label for="cb-anemia" class="text-2xs text-slate-300 leading-tight">Baseline Severe Anemia (Hemoglobin < 11 g/dL)</label>
</div>
<div class="flex items-start gap-2.5">
<input type="checkbox" id="cb-af" class="mt-0.5 w-4 h-4 rounded text-indigo-600 bg-slate-950 border-slate-800 focus:ring-indigo-500 focus:ring-offset-slate-900">
<label for="cb-af" class="text-2xs text-slate-300 leading-tight">History of Atrial Fibrillation / Concurrent OAC Use</label>
</div>
<div class="flex items-start gap-2.5">
<input type="checkbox" id="cb-stroke" class="mt-0.5 w-4 h-4 rounded text-indigo-600 bg-slate-950 border-slate-800 focus:ring-indigo-500 focus:ring-offset-slate-900">
<label for="cb-stroke" class="text-2xs text-slate-300 leading-tight">Prior Stroke or Transient Ischemic Attack (TIA)</label>
</div>
<div class="flex items-start gap-2.5 border-t border-slate-850 pt-2.5">
<input type="checkbox" id="cb-thrombocytopenia" class="mt-0.5 w-4 h-4 rounded text-indigo-600 bg-slate-950 border-slate-800 focus:ring-indigo-500 focus:ring-offset-slate-900">
<label for="cb-thrombocytopenia" class="text-2xs text-slate-300 leading-tight">Severe Thrombocytopenia (Platelet < 50 × 10⁹/L)</label>
</div>
<div class="flex items-start gap-2.5">
<input type="checkbox" id="cb-dementia" class="mt-0.5 w-4 h-4 rounded text-indigo-600 bg-slate-950 border-slate-800 focus:ring-indigo-500 focus:ring-offset-slate-900">
<label for="cb-dementia" class="text-2xs text-slate-300 leading-tight">Advanced Dementia (Relative Contraindication)</label>
</div>
<div class="flex items-start gap-2.5">
<input type="checkbox" id="cb-expectancy" class="mt-0.5 w-4 h-4 rounded text-indigo-600 bg-slate-950 border-slate-800 focus:ring-indigo-500 focus:ring-offset-slate-900">
<label for="cb-expectancy" class="text-2xs text-slate-300 leading-tight">Limited Life Expectancy (< 1-2 years)</label>
</div>
<div class="flex items-start gap-2.5">
<input type="checkbox" id="cb-arf" class="mt-0.5 w-4 h-4 rounded text-indigo-600 bg-slate-950 border-slate-800 focus:ring-indigo-500 focus:ring-offset-slate-900">
<label for="cb-arf" class="text-2xs text-slate-300 leading-tight">Acute Renal Failure (ARF) / Advanced Kidney Disease</label>
</div>
</div>
</div>
<!-- SECTION E: Additional History & Clinical Events (Collapsible) -->
<div class="border border-slate-800/80 rounded-xl overflow-hidden bg-slate-900/10">
<button type="button" class="collapsible-toggle w-full px-4 py-3 bg-slate-900/40 border-b border-slate-800 flex justify-between items-center text-slate-200 font-bold" data-target="form-section-e">
<span>E. Safety & Clinical Events</span>
<svg class="toggle-icon w-4 h-4 transform rotate-180 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
</button>
<div id="form-section-e" class="p-4 space-y-3.5">
<div class="flex items-start gap-2.5">
<input type="checkbox" id="cb-peptic-ulcer" class="mt-0.5 w-4 h-4 rounded text-indigo-600 bg-slate-950 border-slate-800 focus:ring-indigo-500 focus:ring-offset-slate-900">
<label for="cb-peptic-ulcer" class="text-2xs text-slate-300 leading-tight">History of Peptic Ulcer Disease (GI Risk)</label>
</div>
<div class="flex items-start gap-2.5">
<input type="checkbox" id="cb-nsaid" class="mt-0.5 w-4 h-4 rounded text-indigo-600 bg-slate-950 border-slate-800 focus:ring-indigo-500 focus:ring-offset-slate-900">
<label for="cb-nsaid" class="text-2xs text-slate-300 leading-tight">Concurrent NSAID Therapy (GI Risk)</label>
</div>
<div class="flex items-start gap-2.5">
<input type="checkbox" id="cb-minor-bleeding" class="mt-0.5 w-4 h-4 rounded text-indigo-600 bg-slate-950 border-slate-800 focus:ring-indigo-500 focus:ring-offset-slate-900">
<label for="cb-minor-bleeding" class="text-2xs text-slate-300 leading-tight">Active Minor Bleeding or Hemoglobin Drop</label>
</div>
</div>
</div>
<!-- SECTION D: Treatment & Discharge Metrics -->
<div class="border border-slate-800/80 rounded-xl overflow-hidden bg-slate-900/10">
<button type="button" class="collapsible-toggle w-full px-4 py-3 bg-slate-900/40 border-b border-slate-800 flex justify-between items-center text-slate-200 font-bold" data-target="form-section-d">
<span>D. Treatment & Discharge Metrics</span>
<svg class="toggle-icon w-4 h-4 transform rotate-180 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
</button>
<div id="form-section-d" class="p-4 space-y-3 bg-slate-900/5">
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-reperfusion">Reperfusion Strategy</label>
<select id="input-reperfusion" class="w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
<option value="1">[1] Primary PCI</option>
<option value="2">[2] Fibrinolytic Therapy</option>
<option value="3">[3] CABG</option>
<option value="4">[4] Medical Management</option>
</select>
</div>
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-p2y12">P2Y12 Inhibitor Prescribed</label>
<select id="input-p2y12" class="w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
<option value="0">[0] None</option>
<option value="1">[1] Clopidogrel (Plavix)</option>
<option value="2">[2] Ticagrelor (Brilinta)</option>
<option value="3">[3] Prasugrel (Effient)</option>
</select>
</div>
<div class="grid grid-cols-2 gap-3">
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-statin">Statin Therapy Intensity</label>
<select id="input-statin" class="w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
<option value="0">[0] None</option>
<option value="1">[1] Low / Moderate Intensity</option>
<option value="2">[2] High-Intensity Statin</option>
</select>
</div>
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-ldlc">Follow-Up LDL-C (mg/dL)</label>
<input type="number" id="input-ldlc" min="10" max="400" class="w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
</div>
</div>
<div class="grid grid-cols-2 gap-3">
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-ppi">PPI Prescribed?</label>
<select id="input-ppi" class="w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
<option value="0">[0] No PPI</option>
<option value="1">[1] PPI Prescribed</option>
</select>
</div>
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-oac">OAC Administered?</label>
<select id="input-oac" class="w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
<option value="0">[0] No OAC</option>
<option value="1">[1] Concurrent OAC</option>
</select>
</div>
</div>
<div class="grid grid-cols-2 gap-3">
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-beta-blocker">Beta-Blocker?</label>
<select id="input-beta-blocker" class="w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
<option value="0">[0] No</option>
<option value="1">[1] Yes</option>
</select>
</div>
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-raas-inhibitor">RAAS (ACEI/ARB)?</label>
<select id="input-raas-inhibitor" class="w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
<option value="0">[0] No</option>
<option value="1">[1] Yes</option>
</select>
</div>
</div>
<div class="grid grid-cols-2 gap-3">
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-anticoagulation">Parenteral OAC?</label>
<select id="input-anticoagulation" class="w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
<option value="0">[0] No</option>
<option value="1">[1] Yes</option>
</select>
</div>
<div>
<label class="block text-2xs text-slate-400 mb-1" for="input-transfusion">RBC Transfusion?</label>
<select id="input-transfusion" class="w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-100 focus:border-indigo-500 focus:outline-none transition">
<option value="0">[0] No</option>
<option value="1">[1] Yes</option>
</select>
</div>
</div>
</div>
</div>
<!-- Ingestion Form Submit buttons -->
<div class="pt-2 flex justify-between gap-3">
<button type="submit" id="btn-submit-form" class="flex-grow py-3 bg-gradient-to-r from-indigo-600 to-indigo-700 hover:from-indigo-500 hover:to-indigo-600 active:scale-[0.98] transition-all rounded-xl font-semibold text-slate-100 flex items-center justify-center shadow-lg shadow-indigo-600/10">
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/></svg>
Ingest Patient
</button>
</div>
</form>
</div>
<!-- PANEL 3: CLINICAL AUDIT PROFILE VIEW (col-span-5) -->
<div id="clinical-audit-col" class="lg:col-span-5 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-1 gap-6">
<!-- Baseline Calculation Dashboard (Left Panel) -->
<div id="patient-details-panel" class="glass-panel rounded-3xl p-5 border border-slate-800 min-h-[300px]">
<h3 class="text-base font-bold font-display text-slate-100 mb-4">Patient Baseline Assessment</h3>
<div class="text-center py-20 text-slate-500">
<svg class="w-16 h-16 mx-auto mb-4 text-slate-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg>
<p class="text-base font-semibold">No Patient Selected</p>
<p class="text-xs mt-1 text-slate-500">Select a patient from the directory or ingest a new one to evaluate guidelines.</p>
</div>
</div>
<!-- Rules Engine Audit Dashboard (Right Panel) -->
<div id="clinical-audit-panel" class="glass-panel rounded-3xl p-5 border border-slate-800 min-h-[400px]">
<h3 class="text-base font-bold font-display text-slate-100 mb-4">Medication Safety & Guideline Audit</h3>
<!-- Rendered dynamically -->
</div>
</div>
</div>
</main>
</div>
<script src="patients_data.js"></script>
<script src="model_data.js"></script>
<script src="app.js"></script>
</body>
</html>