-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin-review-queue.html
More file actions
727 lines (674 loc) · 20.7 KB
/
Copy pathadmin-review-queue.html
File metadata and controls
727 lines (674 loc) · 20.7 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
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Review Queue - ARFA ABA Note Risk Checker</title>
<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@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<style>
/* ── Review Queue local styles ── */
.admin-layout {
max-width: 1320px;
margin: 0 auto;
padding: 28px 32px 80px;
}
/* Nav (same as overview) */
.topbar-nav {
display: flex;
align-items: center;
gap: 4px;
}
.nav-link {
font-size: 13px;
font-weight: 600;
color: var(--text-soft);
text-decoration: none;
padding: 7px 14px;
border-radius: 8px;
transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--bg-soft); color: var(--navy); }
.nav-link.nav-active { background: var(--teal-bg); color: var(--teal-deep); }
/* Page header */
.page-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 24px;
flex-wrap: wrap;
gap: 12px;
}
.page-title {
font-size: 22px;
font-weight: 800;
color: var(--navy);
letter-spacing: -0.3px;
}
.page-subtitle {
font-size: 13px;
color: var(--text-muted);
font-weight: 500;
margin-top: 2px;
}
/* Filter bar */
.filter-bar {
background: var(--card);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: var(--shadow);
padding: 16px 20px;
margin-bottom: 20px;
display: flex;
align-items: center;
gap: 16px;
flex-wrap: wrap;
}
/* Tab group */
.tab-group {
display: flex;
background: var(--bg-soft);
border: 1px solid var(--border);
border-radius: 10px;
padding: 3px;
gap: 2px;
flex-shrink: 0;
}
.tab-btn {
padding: 7px 14px;
border-radius: 8px;
border: none;
background: transparent;
font-size: 12.5px;
font-weight: 600;
color: var(--text-muted);
cursor: pointer;
font-family: inherit;
transition: background 0.15s, color 0.15s;
white-space: nowrap;
min-height: 34px;
}
.tab-btn:hover { color: var(--navy); }
.tab-btn.tab-active {
background: var(--card);
color: var(--navy);
box-shadow: 0 1px 4px rgba(15,23,42,0.08);
}
.filter-search {
flex: 1;
min-width: 180px;
}
.filter-search .field-control {
height: 36px;
padding: 8px 12px;
font-size: 13px;
}
.sort-select { min-width: 160px; }
.sort-select .field-control {
height: 36px;
padding: 6px 32px 6px 12px;
font-size: 12.5px;
}
.filter-count {
font-size: 12px;
font-weight: 600;
color: var(--text-muted);
white-space: nowrap;
}
/* Table */
.queue-table-wrap {
overflow-x: auto;
border-radius: var(--radius);
}
.queue-table {
width: 100%;
border-collapse: collapse;
background: var(--card);
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
box-shadow: var(--shadow);
min-width: 720px;
}
.queue-table thead th {
background: var(--bg-soft);
padding: 11px 14px;
font-size: 10.5px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.6px;
color: var(--text-muted);
text-align: left;
border-bottom: 1px solid var(--border);
white-space: nowrap;
}
.queue-table tbody tr {
border-bottom: 1px solid var(--border-soft);
cursor: pointer;
transition: background 0.12s;
}
.queue-table tbody tr:last-child { border-bottom: none; }
.queue-table tbody tr:hover { background: var(--bg-soft); }
.queue-table tbody tr.row-selected { background: var(--teal-bg); }
.queue-table tbody td {
padding: 13px 14px;
font-size: 13px;
color: var(--text-soft);
vertical-align: middle;
}
.td-client-name {
font-weight: 700;
color: var(--navy);
}
.td-rbt-name {
font-size: 11.5px;
color: var(--text-muted);
font-weight: 500;
margin-top: 2px;
}
.td-cpt {
font-family: 'JetBrains Mono', monospace;
font-size: 12px;
color: var(--text-muted);
}
.td-date {
font-family: 'JetBrains Mono', monospace;
font-size: 12px;
white-space: nowrap;
}
.td-submitted {
font-size: 11.5px;
color: var(--text-faint);
white-space: nowrap;
}
.severity-pills {
display: flex;
gap: 5px;
align-items: center;
}
.sev-pill {
font-size: 11px;
font-weight: 700;
padding: 2px 8px;
border-radius: 999px;
white-space: nowrap;
line-height: 1.4;
}
.sev-pill-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239,68,68,0.25); }
.sev-pill-warning { background: var(--warning-bg); color: #b45309; border: 1px solid rgba(245,158,11,0.25); }
.sev-pill-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(16,185,129,0.25); }
.btn-sm {
padding: 7px 14px;
font-size: 12px;
border-radius: 8px;
font-weight: 600;
cursor: pointer;
border: 1px solid transparent;
white-space: nowrap;
font-family: inherit;
transition: all 0.15s;
min-height: 34px;
min-width: 44px;
}
.btn-sm.btn-primary { background: var(--teal); color: var(--navy); box-shadow: 0 2px 8px rgba(0,212,180,0.25); }
.btn-sm.btn-primary:hover { background: var(--teal-deep); }
.btn-sm.btn-secondary { background: var(--card); color: var(--text-soft); border-color: var(--border); }
.btn-sm.btn-secondary:hover { border-color: var(--teal); color: var(--teal-deep); }
/* Pagination */
.pagination {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 20px 0 0;
}
.page-btn {
width: 36px;
height: 36px;
border-radius: 8px;
border: 1px solid var(--border);
background: var(--card);
font-size: 13px;
font-weight: 600;
color: var(--text-soft);
cursor: pointer;
font-family: inherit;
transition: all 0.15s;
display: flex;
align-items: center;
justify-content: center;
}
.page-btn:hover { border-color: var(--teal); color: var(--teal-deep); }
.page-btn.page-active { background: var(--teal); color: var(--navy); border-color: var(--teal); box-shadow: 0 2px 8px rgba(0,212,180,0.25); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
/* Empty state */
.empty-state {
background: var(--card);
border: 1px dashed var(--border);
border-radius: var(--radius);
padding: 52px 32px;
text-align: center;
}
.empty-state-glyph { font-size: 28px; margin-bottom: 10px; color: var(--teal); }
.empty-state-title { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.empty-state-sub { font-size: 13px; color: var(--text-muted); }
/* ── Detail panel (slides in from right on desktop) ── */
.detail-overlay {
display: none;
position: fixed;
inset: 0;
z-index: 200;
background: rgba(15,23,42,0.35);
backdrop-filter: blur(2px);
}
.detail-overlay.panel-open { display: block; }
.detail-panel {
position: fixed;
top: 0;
right: 0;
bottom: 0;
width: 540px;
max-width: 100vw;
background: var(--card);
border-left: 1px solid var(--border);
box-shadow: -8px 0 40px rgba(15,23,42,0.12);
z-index: 201;
display: flex;
flex-direction: column;
transform: translateX(100%);
transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
overflow: hidden;
}
.detail-panel.panel-open { transform: translateX(0); }
.detail-panel-header {
padding: 18px 22px 14px;
border-bottom: 1px solid var(--border-soft);
display: flex;
align-items: center;
justify-content: space-between;
flex-shrink: 0;
}
.detail-panel-title {
font-size: 15px;
font-weight: 700;
color: var(--navy);
}
.detail-close-btn {
width: 32px;
height: 32px;
border-radius: 8px;
border: 1px solid var(--border);
background: var(--bg-soft);
font-size: 16px;
color: var(--text-muted);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-family: inherit;
transition: all 0.15s;
min-width: 44px;
min-height: 44px;
}
.detail-close-btn:hover { border-color: var(--teal); color: var(--teal-deep); }
.detail-panel-body {
flex: 1;
overflow-y: auto;
padding: 20px 22px;
display: flex;
flex-direction: column;
gap: 20px;
}
.detail-panel-body::-webkit-scrollbar { width: 5px; }
.detail-panel-body::-webkit-scrollbar-track { background: transparent; }
.detail-panel-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
/* Metadata block */
.detail-meta-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.detail-meta-item { display: flex; flex-direction: column; gap: 2px; }
.detail-meta-label {
font-size: 10px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.6px;
color: var(--text-muted);
}
.detail-meta-value {
font-size: 13px;
font-weight: 600;
color: var(--navy);
}
/* Findings list - reuses .finding .finding-danger etc. from style.css */
.detail-section-title {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.6px;
color: var(--text-muted);
margin-bottom: 10px;
}
.detail-findings {
display: flex;
flex-direction: column;
gap: 10px;
}
/* Note narrative */
.note-narrative {
background: var(--bg-soft);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 14px 16px;
font-size: 12.5px;
line-height: 1.65;
color: var(--text-soft);
font-family: 'JetBrains Mono', monospace;
white-space: pre-wrap;
word-break: break-word;
max-height: 200px;
overflow-y: auto;
}
/* Action panel at bottom */
.detail-panel-actions {
padding: 16px 22px;
border-top: 1px solid var(--border-soft);
display: flex;
flex-direction: column;
gap: 10px;
flex-shrink: 0;
background: var(--card);
}
.action-row {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.action-row .btn {
flex: 1;
min-width: 120px;
min-height: 44px;
text-align: center;
}
/* Return-reason inline form */
.return-reason-form {
display: none;
flex-direction: column;
gap: 10px;
padding: 12px;
background: var(--warning-bg);
border: 1px solid rgba(245,158,11,0.25);
border-radius: var(--radius-sm);
}
.return-reason-form.form-open { display: flex; }
.return-reason-label {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.6px;
color: #b45309;
}
.return-reason-input {
background: var(--card);
border: 1px solid rgba(245,158,11,0.35);
border-radius: 8px;
padding: 10px 12px;
font-size: 13px;
color: var(--text);
font-family: inherit;
width: 100%;
resize: vertical;
min-height: 72px;
outline: none;
transition: border-color 0.15s, box-shadow 0.15s;
}
.return-reason-input:focus {
border-color: var(--warning);
box-shadow: 0 0 0 3px rgba(245,158,11,0.15);
}
.return-reason-btns { display: flex; gap: 8px; }
/* Approval confirmation inline */
.approval-confirm {
background: var(--success-bg);
border: 1px solid rgba(16,185,129,0.25);
border-radius: var(--radius-sm);
padding: 11px 14px;
font-size: 13px;
font-weight: 600;
color: var(--success);
display: none;
align-items: center;
gap: 8px;
}
.approval-confirm.confirm-visible { display: flex; }
/* BCBA disclaimer strip */
.bcba-strip {
background: var(--teal-bg);
border: 1px solid rgba(0,212,180,0.2);
border-radius: 8px;
padding: 9px 14px;
font-size: 11.5px;
font-weight: 600;
color: var(--teal-deep);
text-align: center;
}
/* Mobile card stack */
@media (max-width: 768px) {
.admin-layout { padding: 16px 16px 60px; }
.topbar { padding: 12px 16px; }
.topbar-nav { display: none; }
.filter-bar { gap: 10px; }
.queue-table-wrap { display: none; }
.queue-card-stack { display: flex; flex-direction: column; gap: 12px; }
.detail-panel { width: 100vw; border-left: none; top: 0; }
}
@media (min-width: 769px) {
.queue-card-stack { display: none; }
}
/* Mobile card */
.queue-card {
background: var(--card);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: var(--shadow);
padding: 16px 18px;
cursor: pointer;
transition: box-shadow 0.15s;
}
.queue-card:hover { box-shadow: var(--shadow-lg); }
.queue-card-top {
display: flex;
align-items: flex-start;
justify-content: space-between;
margin-bottom: 8px;
}
.queue-card-client { font-size: 14px; font-weight: 700; color: var(--navy); }
.queue-card-rbt { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: 2px; }
.queue-card-meta {
display: flex;
gap: 8px;
flex-wrap: wrap;
margin-top: 8px;
align-items: center;
justify-content: space-between;
}
/* Spinner */
.spinner {
width: 20px; height: 20px;
border: 2px solid var(--border);
border-top-color: var(--teal);
border-radius: 50%;
animation: spin 0.7s linear infinite;
display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-row { display: flex; align-items: center; gap: 10px; padding: 24px; color: var(--text-muted); font-size: 13px; }
/* Row fade-out on approve/return */
@keyframes fadeSlideOut {
from { opacity: 1; transform: translateX(0); max-height: 80px; }
to { opacity: 0; transform: translateX(30px); max-height: 0; padding: 0; margin: 0; overflow: hidden; }
}
.row-removing {
animation: fadeSlideOut 0.4s ease-in forwards;
}
</style>
</head>
<body>
<div class="bg-glow" aria-hidden="true">
<div class="orb orb-1"></div>
<div class="orb orb-2"></div>
<div class="orb orb-3"></div>
</div>
<header class="topbar">
<div class="brand">
<img src="assets/arfa-ace-mark-navy-transparent.png" alt="ARFA" class="brand-mark-image">
<div class="brand-text">
<div class="brand-name">ARFA ABA Note Risk Checker</div>
<div class="brand-tagline">Part of the ABA Field Documentation Safety Layer</div>
</div>
</div>
<nav class="topbar-nav" aria-label="Admin navigation">
<a href="admin-overview.html" class="nav-link">Overview</a>
<a href="admin-review-queue.html" class="nav-link nav-active">Review Queue</a>
<a href="admin-reference-library.html" class="nav-link">Reference Library</a>
<a href="how-flagging-works.html" class="nav-link">How It Flags</a>
</nav>
<div class="topbar-meta">
<div class="topbar-pill"><span class="dot"></span> Demo · synthetic data</div>
</div>
</header>
<main class="admin-layout" role="main">
<!-- Page header -->
<div class="page-header">
<div>
<div class="page-title">Review Queue</div>
<div class="page-subtitle">BCBA review and signature required before submission</div>
</div>
</div>
<!-- Filter bar -->
<div class="filter-bar" role="search" aria-label="Filter review queue">
<div class="tab-group" role="tablist" aria-label="Queue status filter" id="tab-group">
<button class="tab-btn tab-active" data-filter="needs_review" role="tab" aria-selected="true">Needs Review</button>
<button class="tab-btn" data-filter="approved" role="tab" aria-selected="false">Approved</button>
<button class="tab-btn" data-filter="returned" role="tab" aria-selected="false">Returned to RBT</button>
<button class="tab-btn" data-filter="all" role="tab" aria-selected="false">All</button>
</div>
<div class="filter-search field">
<input
type="search"
class="field-control"
id="search-input"
placeholder="Filter by client, RBT…"
aria-label="Search notes"
>
</div>
<div class="sort-select field">
<select class="field-control" id="sort-select" aria-label="Sort order">
<option value="date_desc">Date: newest first</option>
<option value="risk_desc">Risk: highest first</option>
<option value="rbt_asc">RBT: A-Z</option>
</select>
</div>
<div class="filter-count" id="filter-count" aria-live="polite">- notes</div>
</div>
<!-- Desktop table -->
<div class="queue-table-wrap" id="table-wrap">
<table class="queue-table" aria-label="Notes pending review">
<thead>
<tr>
<th>Client</th>
<th>RBT</th>
<th>Session Date</th>
<th>CPT</th>
<th>Validator Result</th>
<th>Submitted</th>
<th>Action</th>
</tr>
</thead>
<tbody id="queue-tbody">
<tr><td colspan="7"><div class="loading-row"><span class="spinner"></span> Loading queue…</div></td></tr>
</tbody>
</table>
</div>
<!-- Mobile card stack -->
<div class="queue-card-stack" id="queue-card-stack">
<div class="loading-row"><span class="spinner"></span> Loading queue…</div>
</div>
<!-- Pagination -->
<div class="pagination" id="pagination" role="navigation" aria-label="Pagination"></div>
<!-- Empty state (hidden by default) -->
<div class="empty-state" id="empty-state" style="display:none;" role="status">
<div class="empty-state-glyph">✓</div>
<div class="empty-state-title">All caught up - nothing pending review.</div>
<div class="empty-state-sub">No notes match the current filter. Try a different tab or clear the search.</div>
</div>
</main>
<!-- Detail panel overlay -->
<div class="detail-overlay" id="detail-overlay" role="dialog" aria-modal="true" aria-label="Note detail" aria-hidden="true">
</div>
<!-- Detail panel -->
<div class="detail-panel" id="detail-panel" role="dialog" aria-modal="true" aria-label="Note review panel" aria-hidden="true">
<div class="detail-panel-header">
<div class="detail-panel-title" id="detail-panel-title">Note Detail</div>
<button class="detail-close-btn" id="detail-close-btn" aria-label="Close detail panel">✕</button>
</div>
<div class="detail-panel-body" id="detail-panel-body">
<!-- Populated by JS -->
</div>
<div class="detail-panel-actions">
<div class="bcba-strip">Automated checks flag; BCBA reviews and signs.</div>
<div class="approval-confirm" id="approval-confirm" role="status">
<span>✓</span> <span id="approval-confirm-text">Note marked reviewed.</span>
</div>
<div class="action-row" id="primary-action-row">
<button class="btn btn-primary" id="btn-approve" style="background:var(--success); box-shadow:0 4px 14px rgba(16,185,129,0.25); color:#fff; min-height:44px;">
Approve & Mark Reviewed
</button>
<button class="btn btn-secondary" id="btn-return" style="min-height:44px;">
Return to RBT
</button>
<button class="btn btn-secondary" id="btn-close-panel" style="min-height:44px;">
Close
</button>
</div>
<div class="return-reason-form" id="return-reason-form" role="form" aria-label="Return reason">
<div class="return-reason-label">Reason for returning to RBT</div>
<textarea
class="return-reason-input"
id="return-reason-input"
placeholder="Describe what needs to be corrected before resubmission…"
aria-label="Return reason text"
rows="3"
></textarea>
<div class="return-reason-btns">
<button class="btn btn-secondary btn-sm" id="btn-return-cancel">Cancel</button>
<button class="btn btn-primary btn-sm" id="btn-return-confirm">Send Return</button>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="footer-inner">
<div class="footer-disclaimer">
ARFA ABA Note Risk Checker is a configurable compliance and revenue-protection tool. It checks notes against representative payer-risk rules and is <strong>not</strong> a clinical decision system. BCBA review and signature are required before submission. Demo uses synthetic data only - no PHI is processed. Production deployment requires clinic-approved payer rule calibration and a signed Business Associate Agreement.
</div>
<div class="footer-meta">
<span class="dot">●</span>
<span>Automated checks flag; BCBA reviews and signs.</span>
<span>·</span>
<span>ARFA - Applied Resources for Facility Administration</span>
</div>
</div>
</footer>
<script src="mock-data.js"></script>
<script src="api-client.js"></script>
<script src="app.js"></script>
<script src="admin-review-queue.js"></script>
<script src="anime.umd.min.js"></script>
<script src="animations.js"></script>
<script src="shell.js"></script>
</body>
</html>