AndreaImperatore04 commited on
Commit
f7d69d7
·
verified ·
1 Parent(s): 76587b1

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +252 -433
index.html CHANGED
@@ -3,352 +3,218 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Dapt-Safinous (CDRS)</title>
7
- <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
8
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
9
  <script src="https://cdn.plot.ly/plotly-2.27.0.min.js"></script>
10
 
11
  <style>
 
12
  :root {
13
- --azzurro: #0ea5e9;
14
- --verdeacqua: #0d9488;
15
- --bg-page: #f8fafc;
16
- --surface: #ffffff;
17
- --text-main: #0f172a;
18
- --text-muted: #64748b;
19
- --border-light: #e2e8f0;
20
  }
21
 
22
  body {
23
- background-color: var(--bg-page);
24
- font-family: 'Inter', sans-serif;
25
- color: var(--text-main);
26
- -webkit-font-smoothing: antialiased;
27
- letter-spacing: -0.01em;
28
  }
29
 
30
- /* Top Bar Minimalista */
31
- .top-navbar {
32
- background-color: var(--surface);
33
- border-bottom: 1px solid var(--border-light);
34
- padding: 1rem 0;
35
- position: sticky;
36
- top: 0;
37
- z-index: 1000;
38
- box-shadow: 0 1px 3px rgba(0,0,0,0.02);
39
  }
40
 
41
- .brand-title {
42
- font-weight: 700;
43
- font-size: 1.4rem;
44
- background: linear-gradient(135deg, var(--azzurro), var(--verdeacqua));
45
- -webkit-background-clip: text;
46
- -webkit-text-fill-color: transparent;
47
  margin: 0;
 
48
  }
49
 
50
- .brand-subtitle {
51
- font-size: 0.85rem;
52
- color: var(--text-muted);
53
- font-weight: 500;
54
- margin: 0;
55
- margin-left: 1rem;
56
- padding-left: 1rem;
57
- border-left: 1px solid var(--border-light);
58
  }
59
 
60
- /* Container e Card Base */
61
- .dashboard-container {
62
  max-width: 1200px;
63
- margin: 2rem auto;
64
- padding: 0 1rem;
65
  }
66
 
67
- .panel {
68
- background: var(--surface);
69
- border-radius: 16px;
70
- border: 1px solid var(--border-light);
71
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
72
- padding: 2rem;
73
- margin-bottom: 2rem;
74
  }
75
 
76
- .section-title {
77
- font-size: 0.85rem;
78
- font-weight: 700;
 
 
 
 
79
  text-transform: uppercase;
80
- letter-spacing: 0.05em;
81
- color: var(--text-muted);
82
- margin-bottom: 1.5rem;
83
- display: flex;
84
- align-items: center;
85
- gap: 0.5rem;
86
- border-bottom: 1px solid var(--border-light);
87
- padding-bottom: 0.75rem;
88
  }
89
 
90
- /* Input Form Raffinati */
91
- .form-group-custom {
92
- background-color: var(--surface);
93
- border: 1px solid var(--border-light);
94
- border-radius: 12px;
95
- padding: 1.5rem;
96
- height: 100%;
97
- box-shadow: 0 1px 3px rgba(0,0,0,0.01);
98
  }
99
 
 
100
  .form-label {
101
- font-size: 0.8rem;
102
- font-weight: 600;
103
- color: var(--text-main);
104
- margin-bottom: 0.4rem;
105
  }
106
 
107
  .form-control, .form-select {
108
- border-radius: 8px;
109
- border: 1px solid var(--border-light);
110
- background-color: var(--bg-page);
111
- padding: 0.5rem 0.8rem;
112
- font-size: 0.95rem;
113
- color: var(--text-main);
114
- transition: all 0.2s;
115
  }
116
-
117
  .form-control:focus, .form-select:focus {
118
- background-color: var(--surface);
119
- border-color: var(--azzurro);
120
- box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
121
- outline: none;
122
  }
123
 
124
- .input-group > .form-control, .input-group > .form-select {
125
- border-color: var(--border-light);
126
  }
127
-
128
- .input-group > .form-control:focus, .input-group > .form-select:focus {
129
- z-index: 3;
 
 
 
 
 
 
130
  }
131
 
132
- /* Primary Button */
133
  .btn-compute {
134
- background-color: var(--text-main);
135
  color: white;
136
- border: none;
137
- border-radius: 50px;
138
- padding: 1rem 3rem;
139
- font-weight: 600;
140
- font-size: 1rem;
141
- transition: all 0.3s ease;
142
- box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
143
  }
144
 
145
  .btn-compute:hover {
146
- background-color: var(--azzurro);
147
  color: white;
148
- transform: translateY(-2px);
149
- box-shadow: 0 6px 15px rgba(14, 165, 233, 0.3);
150
  }
151
 
152
- /* Widgets Risultati */
153
- .widget-grid {
154
- display: grid;
155
- grid-template-columns: 1fr 1fr;
156
- gap: 1rem;
157
- margin-bottom: 1.5rem;
158
- }
159
-
160
- .widget {
161
- padding: 1.5rem;
162
- border-radius: 12px;
163
- border: 1px solid var(--border-light);
164
- background: var(--surface);
165
- display: flex;
166
- flex-direction: column;
167
- justify-content: space-between;
168
- }
169
-
170
- .widget-sm { padding: 1rem; }
171
-
172
- .widget-title { font-size: 0.75rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;}
173
- .widget-value { font-size: 2.2rem; font-weight: 700; color: var(--text-main); line-height: 1.1; margin-top: 0.5rem; }
174
- .widget-value-sm { font-size: 1.5rem; font-weight: 600; color: var(--text-main); }
175
-
176
- .widget-primary { background: #f0f9ff; border-color: #bae6fd; }
177
- .widget-primary .widget-title { color: #0369a1; }
178
- .widget-primary .widget-value { color: #0284c7; }
179
-
180
- .widget-success { background: #f0fdf4; border-color: #bbf7d0; }
181
- .widget-success .widget-title { color: #15803d; }
182
- .widget-success .widget-value { color: #16a34a; }
183
-
184
- /* Decision Box */
185
- .decision-box {
186
- padding: 2rem;
187
- border-radius: 16px;
188
- border: 1px solid var(--border-light);
189
- background: var(--surface);
190
- margin-bottom: 2rem;
191
- position: relative;
192
- overflow: hidden;
193
- box-shadow: 0 2px 4px rgba(0,0,0,0.02);
194
- }
195
-
196
- .decision-indicator {
197
- position: absolute;
198
- left: 0;
199
- top: 0;
200
- bottom: 0;
201
- width: 6px;
202
- }
203
-
204
- .decision-label { font-size: 0.75rem; text-transform: uppercase; font-weight: 700; color: var(--text-muted); margin-bottom: 0.5rem; letter-spacing: 0.5px;}
205
- .decision-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 1rem; color: var(--text-main);}
206
- .decision-rec { font-size: 1rem; color: #475569; line-height: 1.6; font-weight: 500;}
207
-
208
- /* Segmented Tabs (Mac Style) */
209
- .custom-tabs {
210
- background: #f1f5f9;
211
- padding: 0.3rem;
212
- border-radius: 12px;
213
- display: inline-flex;
214
- margin-bottom: 1.5rem;
215
  width: 100%;
216
- }
217
- .custom-tabs .nav-link {
218
- flex: 1;
219
- text-align: center;
220
- border: none;
221
- padding: 0.6rem 1rem;
222
- border-radius: 8px;
223
- color: var(--text-muted);
224
- font-weight: 600;
225
- font-size: 0.85rem;
226
- transition: all 0.2s ease;
227
- }
228
- .custom-tabs .nav-link.active {
229
- background: var(--surface);
230
- color: var(--text-main);
231
- box-shadow: 0 1px 3px rgba(0,0,0,0.1);
232
  }
233
 
234
- /* Documentation & Formulas Styling */
235
- .accordion-button { background: transparent; padding: 1.2rem 0; font-weight: 600; color: var(--text-main); border: none; box-shadow: none !important;}
236
- .accordion-button:not(.collapsed) { background: transparent; color: var(--azzurro); }
237
- .accordion-item { border: none; border-top: 1px solid var(--border-light); border-radius: 0; background: transparent;}
238
- .accordion-body { padding: 0 0 1.5rem 0; color: var(--text-muted); font-size: 0.9rem;}
239
-
240
- .doc-section-title {
241
- font-size: 0.75rem;
242
- font-weight: 700;
243
- text-transform: uppercase;
244
- letter-spacing: 0.5px;
245
- color: var(--text-muted);
246
- margin-bottom: 0.8rem;
247
  }
248
 
249
- .formula-card {
250
- background: var(--surface);
251
- border: 1px solid var(--border-light);
252
- border-radius: 8px;
253
- padding: 1rem;
254
- margin-bottom: 0.8rem;
255
  }
256
 
257
- .formula-name {
258
- font-size: 0.75rem;
259
- font-weight: 600;
260
- color: var(--text-muted);
261
- margin-bottom: 0.5rem;
262
- text-transform: uppercase;
263
- }
264
 
265
- .math-box {
266
- font-family: 'Cambria Math', 'Latin Modern Math', monospace;
267
- font-size: 1.05rem;
268
- color: var(--text-main);
269
- letter-spacing: 0.5px;
270
- }
271
-
272
- .threshold-item {
273
- display: flex;
274
- align-items: center;
275
- background: var(--surface);
276
- border: 1px solid var(--border-light);
277
- border-radius: 8px;
278
- padding: 0.8rem 1rem;
279
- margin-bottom: 0.5rem;
280
- }
281
-
282
- .thresh-indicator {
283
- width: 10px;
284
- height: 10px;
285
- border-radius: 50%;
286
- margin-right: 1rem;
287
- flex-shrink: 0;
288
- }
289
-
290
- .thresh-content {
291
- display: flex;
292
- flex-wrap: wrap;
293
- width: 100%;
294
- align-items: center;
295
- justify-content: space-between;
296
- gap: 0.5rem;
297
- }
298
-
299
- .thresh-label {
300
- font-weight: 700;
301
- font-size: 0.85rem;
302
- text-transform: uppercase;
303
- width: 120px;
304
- }
305
-
306
- .thresh-condition {
307
- font-family: monospace;
308
- background: var(--bg-page);
309
- padding: 0.3rem 0.6rem;
310
- border-radius: 4px;
311
- font-size: 0.85rem;
312
- color: var(--text-main);
313
- font-weight: 500;
314
  }
 
 
 
315
 
316
- .thresh-rec {
317
- font-size: 0.85rem;
318
- color: var(--text-muted);
319
- font-weight: 500;
320
- text-align: right;
321
- flex-grow: 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
  }
323
 
324
- /* Animations */
325
- .fade-enter { animation: fadeEnter 0.5s ease forwards; }
326
- @keyframes fadeEnter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
327
  .hidden { display: none; }
328
  </style>
329
  </head>
330
  <body>
331
 
332
- <nav class="top-navbar">
333
- <div class="dashboard-container d-flex align-items-center m-0 mx-auto py-0">
334
- <h1 class="brand-title">Dapt-Safinous</h1>
335
- <h2 class="brand-subtitle d-none d-sm-block">Clinical Decision Support</h2>
336
  </div>
337
- </nav>
338
 
339
- <div class="dashboard-container">
340
 
341
  <!-- INSERIMENTO DATI -->
342
- <div class="panel">
343
- <form id="patientForm">
344
- <div class="row g-4">
345
-
346
- <!-- Baseline & Labs -->
347
- <div class="col-lg-4">
348
- <div class="form-group-custom">
349
- <div class="section-title">Baseline & Labs</div>
350
 
351
- <div class="row g-2">
352
  <div class="col-6">
353
  <label class="form-label">Age</label>
354
  <input type="number" class="form-control" id="Age" value="65" min="40" max="95">
@@ -362,20 +228,20 @@
362
  </div>
363
  </div>
364
 
365
- <label class="form-label mt-3">Hemoglobin</label>
366
- <div class="input-group">
367
  <input type="number" step="0.1" class="form-control" id="Hb" value="10.3">
368
- <select class="form-select" id="HbUnit" style="max-width: 100px;">
369
  <option value="g/dL">g/dL</option>
370
  <option value="g/L">g/L</option>
371
  <option value="mmol/L">mmol</option>
372
  </select>
373
  </div>
374
 
375
- <label class="form-label mt-3">WBC Count</label>
376
- <div class="input-group">
377
  <input type="number" step="0.1" class="form-control" id="WBC" value="7.9">
378
- <select class="form-select" id="WBCUnit" style="max-width: 120px;">
379
  <option value="x10^3/uL">x10³/µL</option>
380
  <option value="cells/uL">cells/µL</option>
381
  </select>
@@ -390,20 +256,18 @@
390
  <label class="form-label">Creatinine</label>
391
  <div class="input-group">
392
  <input type="number" step="0.1" class="form-control" id="Creatinine" value="1.2">
393
- <select class="form-select" id="CrUnit" style="padding: 0.5rem;">
394
- <option value="mg/dL">mg</option>
395
- <option value="umol/L">µmol</option>
396
  </select>
397
  </div>
398
  </div>
399
  </div>
400
  </div>
401
- </div>
402
-
403
- <!-- Clinical History -->
404
- <div class="col-lg-4">
405
- <div class="form-group-custom">
406
- <div class="section-title">Clinical History</div>
407
 
408
  <label class="form-label">Prior Bleed</label>
409
  <select class="form-select mb-3" id="PriorBleed"><option value="0">No Prior Bleeding</option><option value="1">Yes, Prior Bleeding</option></select>
@@ -420,12 +284,10 @@
420
  <label class="form-label">Hypertension</label>
421
  <select class="form-select" id="Hypertension"><option value="0">No</option><option value="1">Yes</option></select>
422
  </div>
423
- </div>
424
-
425
- <!-- Surgical Details -->
426
- <div class="col-lg-4">
427
- <div class="form-group-custom">
428
- <div class="section-title">Operative Details</div>
429
 
430
  <label class="form-label">Endoscopic Vein Harvest (EVH)</label>
431
  <select class="form-select mb-3" id="EVH"><option value="0">No</option><option value="1">Yes</option></select>
@@ -444,138 +306,100 @@
444
  </div>
445
  </div>
446
  </div>
447
- </div>
448
-
449
- <div class="text-center mt-4">
450
- <button type="button" class="btn-compute" onclick="calculateRisk()">Run Risk Analysis</button>
451
- </div>
452
- </form>
 
453
  </div>
454
 
455
  <!-- SEZIONE RISULTATI -->
456
  <div id="resultsSection" class="hidden">
457
- <div class="panel fade-enter">
458
 
459
- <div class="row g-5">
460
- <!-- Colonna Sinistra: Metriche -->
461
- <div class="col-lg-5">
462
-
463
- <div class="decision-box" id="trajectoryBox">
464
- <div class="decision-indicator" id="decisionColor" style="background-color: #cbd5e1;"></div>
465
- <div class="decision-label">Recommended Strategy</div>
466
- <div class="decision-title" id="valTrajectory">-</div>
467
- <div class="decision-rec" id="valRecommendation">-</div>
468
- </div>
469
-
470
- <div class="widget-grid">
471
- <div class="widget widget-primary">
472
- <div class="widget-title">CDRS+ Score</div>
473
- <div class="widget-value" id="valCDRS">0.0</div>
474
- </div>
475
- <div class="widget widget-success">
476
- <div class="widget-title">CRI Index</div>
477
- <div class="widget-value" id="valCRI">0.0%</div>
478
- </div>
479
- <div class="widget widget-sm">
480
- <div class="widget-title">Safinous Score</div>
481
- <div class="widget-value-sm" id="valSafinous">0.0</div>
482
- </div>
483
- <div class="widget widget-sm">
484
- <div class="widget-title">Precise-DAPT</div>
485
- <div class="widget-value-sm" id="valPrecise">0.0</div>
486
- </div>
487
- </div>
488
-
489
- <!-- Accordion Documentazione (Migliorata secondo richiesta) -->
490
- <div class="accordion" id="docAccordion">
491
- <div class="accordion-item">
492
- <h2 class="accordion-header">
493
- <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseDoc">
494
- Clinical Documentation & Formulas
495
- </button>
496
- </h2>
497
- <div id="collapseDoc" class="accordion-collapse collapse" data-bs-parent="#docAccordion">
498
- <div class="accordion-body">
499
-
500
- <h6 class="doc-section-title mt-2">Continuous Metrics</h6>
501
-
502
- <div class="formula-card">
503
- <div class="formula-name">CABG-DUAL Risk Score Positive</div>
504
- <div class="math-box">CDRS+ = max(0, 3·SAFINOUS - 2·PRECISE-DAPT + 100)</div>
505
- </div>
506
-
507
- <div class="formula-card">
508
- <div class="formula-name">Composite Risk Index</div>
509
- <div class="math-box">CRI% = [ (P<sub>Isch</sub> - P<sub>Bleed</sub> + 1) / 2 ] × 100</div>
510
- </div>
511
-
512
- <h6 class="doc-section-title mt-4">Clinical Thresholds</h6>
513
-
514
- <div class="threshold-list">
515
- <div class="threshold-item">
516
- <div class="thresh-indicator" style="background-color: #0ea5e9;"></div>
517
- <div class="thresh-content">
518
- <span class="thresh-label" style="color: #0284c7;">High Ischemic</span>
519
- <span class="thresh-condition">CDRS+ ≥ 65</span>
520
- <span class="thresh-rec">Prolonged DAPT</span>
521
- </div>
522
- </div>
523
-
524
- <div class="threshold-item">
525
- <div class="thresh-indicator" style="background-color: #ef4444;"></div>
526
- <div class="thresh-content">
527
- <span class="thresh-label" style="color: #b91c1c;">Balanced Risk</span>
528
- <span class="thresh-condition">40 ≤ CDRS+ < 65</span>
529
- <span class="thresh-rec">Short DAPT</span>
530
- </div>
531
- </div>
532
-
533
- <div class="threshold-item">
534
- <div class="thresh-indicator" style="background-color: #f59e0b;"></div>
535
- <div class="thresh-content">
536
- <span class="thresh-label" style="color: #b45309;">High Bleeding</span>
537
- <span class="thresh-condition">CDRS+ < 40</span>
538
- <span class="thresh-rec">Aspirin Mono</span>
539
- </div>
540
- </div>
541
- </div>
542
-
543
- </div>
544
- </div>
545
  </div>
 
 
 
 
 
 
 
 
 
 
 
546
  </div>
547
  </div>
 
548
 
549
- <!-- Colonna Destra: Grafici -->
550
- <div class="col-lg-7">
551
- <!-- Segmented Tabs Custom -->
552
- <ul class="nav custom-tabs" id="myTab" role="tablist">
553
- <li class="nav-item" role="presentation"><button class="nav-link active" data-bs-toggle="tab" data-bs-target="#tab2d" type="button">2D Map</button></li>
554
- <li class="nav-item" role="presentation"><button class="nav-link" data-bs-toggle="tab" data-bs-target="#tab3d" type="button">3D Map</button></li>
555
- <li class="nav-item" role="presentation"><button class="nav-link" data-bs-toggle="tab" data-bs-target="#tabimpact" type="button">Feature Impact</button></li>
556
- </ul>
557
-
558
- <div class="tab-content" id="myTabContent">
559
- <div class="tab-pane fade show active" id="tab2d"><div id="plot2d" style="height: 480px; width:100%;"></div></div>
560
- <div class="tab-pane fade" id="tab3d"><div id="plot3d" style="height: 480px; width:100%;"></div></div>
561
- <div class="tab-pane fade" id="tabimpact">
562
- <div id="plotDynamicImpactSaf" style="height: 240px; width:100%;"></div>
563
- <div id="plotDynamicImpactPrec" style="height: 240px; width:100%; margin-top: 15px;"></div>
 
 
 
564
  </div>
565
  </div>
566
  </div>
567
  </div>
 
568
  </div>
569
  </div>
570
  </div>
571
 
572
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
573
  <script>
 
574
  const plotlyBaseLayout = {
575
- font: { family: 'Inter, sans-serif', color: '#64748b' },
576
- plot_bgcolor: 'transparent',
577
- paper_bgcolor: 'transparent',
578
- margin: { t: 30, b: 40, l: 40, r: 20 }
579
  };
580
 
581
  const bg_data = { p_isch: [], p_bleed: [], cri_pct: [] };
@@ -605,7 +429,6 @@ function calculateRisk() {
605
  let Creatinine = parseFloat(document.getElementById('Creatinine').value);
606
  const CrUnit = document.getElementById('CrUnit').value;
607
  if (CrUnit === 'umol/L') Creatinine /= 88.4;
608
- else if (CrUnit === 'mmol/L') Creatinine = (Creatinine * 1000.0) / 88.4;
609
 
610
  const PriorBleed = parseInt(document.getElementById('PriorBleed').value);
611
  const Diabetes = parseInt(document.getElementById('Diabetes').value);
@@ -637,31 +460,27 @@ function calculateRisk() {
637
  let traj = "", rec = "", color = "", border_color = "";
638
  if (CDRS_positive >= 65.0) {
639
  traj = "High Ischemic Dominance";
640
- rec = "Prolonged DAPT (6–12 months or longer) to maximize saphenous vein graft patency.";
641
- color = "#0369a1"; border_color = "#0ea5e9";
642
  } else if (CDRS_positive >= 40.0 && CDRS_positive < 65.0) {
643
  traj = "Balanced Competing Risk (Grey Zone)";
644
- rec = "Individualized, Short DAPT (1–3 months) combined with enhanced clinical surveillance.";
645
- color = "#b91c1c"; border_color = "#ef4444";
646
  } else {
647
  traj = "High Bleeding Dominance";
648
  rec = "Aspirin Monotherapy (100 mg/day) to minimize hemorrhagic hazard.";
649
- color = "#b45309"; border_color = "#f59e0b";
650
  }
651
 
652
  const resSection = document.getElementById('resultsSection');
653
  resSection.classList.remove('hidden');
654
-
655
- resSection.querySelector('.panel').classList.remove('fade-enter');
656
- void resSection.querySelector('.panel').offsetWidth;
657
- resSection.querySelector('.panel').classList.add('fade-enter');
658
 
659
  document.getElementById('valSafinous').innerText = Safinous.toFixed(1);
660
  document.getElementById('valPrecise').innerText = Precise.toFixed(1);
661
  document.getElementById('valCDRS').innerText = CDRS_positive.toFixed(1);
662
  document.getElementById('valCRI').innerText = CRI_pct.toFixed(1) + "%";
663
 
664
- document.getElementById('decisionColor').style.backgroundColor = border_color;
665
  const trajSpan = document.getElementById('valTrajectory');
666
  trajSpan.innerText = traj;
667
  trajSpan.style.color = color;
@@ -675,16 +494,16 @@ function calculateRisk() {
675
  }
676
 
677
  function draw2DPlot(px, py) {
678
- const traceBg = { x: bg_data.p_isch, y: bg_data.p_bleed, mode: 'markers', name: 'Cohort', marker: {color: '#cbd5e1', size: 6, opacity: 0.5}, type: 'scatter' };
679
- const tracePt = { x: [px], y: [py], mode: 'markers+text', name: 'Patient', text: ['Patient'], textposition: 'top right', textfont: {family: 'Inter', weight: 600, color: '#0f172a'}, marker: {color: '#ef4444', size: 12, symbol: 'circle', line: {width: 2, color: '#ffffff'}}, type: 'scatter' };
680
- const layout = { ...plotlyBaseLayout, title: {text: 'Probability Distribution', font: {size: 14, color: '#0f172a', weight: 600}}, xaxis: {title: 'P(Ischemia)', gridcolor: '#f1f5f9', zeroline: false}, yaxis: {title: 'P(Bleeding)', gridcolor: '#f1f5f9', zeroline: false}, shapes: [ {type: 'line', x0: 0.5, y0: 0, x1: 0.5, y1: 1, line: {dash: 'dash', color: '#cbd5e1'}}, {type: 'line', x0: 0, y0: 0.5, x1: 1, y1: 0.5, line: {dash: 'dash', color: '#cbd5e1'}} ], showlegend: false };
681
  Plotly.newPlot('plot2d', [traceBg, tracePt], layout, {responsive: true, displayModeBar: false});
682
  }
683
 
684
  function draw3DPlot(px, py, pz) {
685
- const traceBg = { x: bg_data.p_isch, y: bg_data.p_bleed, z: bg_data.cri_pct, mode: 'markers', name: 'Cohort', marker: {color: '#94a3b8', size: 3, opacity: 0.3}, type: 'scatter3d' };
686
- const tracePt = { x: [px], y: [py], z: [pz], mode: 'markers+text', name: 'Patient', text: ['Patient'], textposition: 'top center', marker: {color: '#ef4444', size: 5, symbol: 'circle'}, type: 'scatter3d' };
687
- const layout = { ...plotlyBaseLayout, scene: {xaxis: {title: 'P(Isch)', backgroundcolor: 'transparent', gridcolor:'#e2e8f0'}, yaxis: {title: 'P(Bleed)', backgroundcolor: 'transparent', gridcolor:'#e2e8f0'}, zaxis: {title: 'CRI %', backgroundcolor: 'transparent', gridcolor:'#e2e8f0'}}, margin: {t:0, b:0, l:0, r:0}, showlegend: false };
688
  Plotly.newPlot('plot3d', [traceBg, tracePt], layout, {responsive: true, displayModeBar: false});
689
  }
690
 
@@ -701,14 +520,14 @@ function drawDynamicFeatureImpact(Age, SexFemale, Dyslipidemia, Diabetes, Smokin
701
  {name: 'CrCl', val: -0.15 * CrCl}, {name: 'Prior Bleed', val: 15.0 * PriorBleed}
702
  ].filter(d => d.val !== 0).sort((a,b) => Math.abs(a.val) - Math.abs(b.val));
703
 
704
- const drawStyledPlot = (data, divId, titleText, colorBase) => {
705
- const trace = { x: data.map(d => d.val), y: data.map(d => d.name), type: 'bar', orientation: 'h', marker: { color: colorBase, border: 0, borderwidth: 0, bordercolor: 'transparent' } };
706
- const layout = { ...plotlyBaseLayout, title: { text: titleText, font: { size: 12, color: '#0f172a', weight: 600 } }, xaxis: { showgrid: true, gridcolor: '#f1f5f9', zeroline: true, zerolinecolor: '#cbd5e1', zerolinewidth: 2, tickfont: {size: 10} }, yaxis: { showgrid: false, tickfont: {size: 10} }, margin: { t: 30, b: 20, l: 90, r: 10 }, height: 240 };
707
  Plotly.newPlot(divId, [trace], layout, {responsive: true, displayModeBar: false});
708
  };
709
 
710
- drawStyledPlot(safData, 'plotDynamicImpactSaf', 'SAFINOUS Impact Points', '#0ea5e9');
711
- drawStyledPlot(precData, 'plotDynamicImpactPrec', 'PRECISE-DAPT Impact Points', '#0d9488');
712
  }
713
 
714
  document.querySelectorAll('button[data-bs-toggle="tab"]').forEach(el => {
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>CDRS - Clinical Decision Support</title>
 
7
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
8
  <script src="https://cdn.plot.ly/plotly-2.27.0.min.js"></script>
9
 
10
  <style>
11
+ /* Stile Accademico / Istituzionale (PubMed / PDB Style) */
12
  :root {
13
+ --academic-blue: #0056b3;
14
+ --academic-dark: #1a202c;
15
+ --border-color: #dee2e6;
16
+ --bg-light: #f4f6f8;
 
 
 
17
  }
18
 
19
  body {
20
+ background-color: #ffffff;
21
+ font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
22
+ color: #333333;
23
+ font-size: 14px; /* Dimensione base densa */
 
24
  }
25
 
26
+ /* Header in stile database */
27
+ .academic-header {
28
+ background-color: var(--academic-blue);
29
+ color: white;
30
+ padding: 15px 0;
31
+ border-bottom: 4px solid #e9ecef;
 
 
 
32
  }
33
 
34
+ .academic-header h1 {
35
+ font-size: 24px;
36
+ font-weight: 600;
 
 
 
37
  margin: 0;
38
+ letter-spacing: 0.5px;
39
  }
40
 
41
+ .academic-header .subtitle {
42
+ font-size: 13px;
43
+ color: #e2e8f0;
44
+ margin-top: 4px;
 
 
 
 
45
  }
46
 
47
+ .main-container {
 
48
  max-width: 1200px;
49
+ margin: 20px auto;
50
+ padding: 0 15px;
51
  }
52
 
53
+ /* Pannelli Rigorosi */
54
+ .academic-panel {
55
+ border: 1px solid var(--border-color);
56
+ border-radius: 2px;
57
+ background-color: #ffffff;
58
+ margin-bottom: 20px;
 
59
  }
60
 
61
+ .academic-panel-header {
62
+ background-color: var(--bg-light);
63
+ border-bottom: 1px solid var(--border-color);
64
+ padding: 10px 15px;
65
+ font-size: 15px;
66
+ font-weight: bold;
67
+ color: var(--academic-blue);
68
  text-transform: uppercase;
 
 
 
 
 
 
 
 
69
  }
70
 
71
+ .academic-panel-body {
72
+ padding: 15px;
 
 
 
 
 
 
73
  }
74
 
75
+ /* Form Controls Densi */
76
  .form-label {
77
+ font-size: 12px;
78
+ font-weight: bold;
79
+ color: #495057;
80
+ margin-bottom: 4px;
81
  }
82
 
83
  .form-control, .form-select {
84
+ border-radius: 2px;
85
+ border: 1px solid #ced4da;
86
+ padding: 4px 8px;
87
+ font-size: 13px;
88
+ height: 30px;
 
 
89
  }
90
+
91
  .form-control:focus, .form-select:focus {
92
+ border-color: var(--academic-blue);
93
+ box-shadow: none;
 
 
94
  }
95
 
96
+ .input-group-text, .input-group .form-control, .input-group .form-select {
97
+ border-radius: 2px;
98
  }
99
+
100
+ .form-section-title {
101
+ font-size: 13px;
102
+ font-weight: bold;
103
+ color: #6c757d;
104
+ border-bottom: 1px solid #e9ecef;
105
+ padding-bottom: 5px;
106
+ margin-bottom: 15px;
107
+ margin-top: 5px;
108
  }
109
 
110
+ /* Bottone Principale */
111
  .btn-compute {
112
+ background-color: var(--academic-blue);
113
  color: white;
114
+ border: 1px solid #004085;
115
+ border-radius: 2px;
116
+ padding: 8px 24px;
117
+ font-size: 14px;
118
+ font-weight: bold;
119
+ transition: background-color 0.2s;
 
120
  }
121
 
122
  .btn-compute:hover {
123
+ background-color: #004085;
124
  color: white;
 
 
125
  }
126
 
127
+ /* Risultati Strutturati */
128
+ .result-table {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  width: 100%;
130
+ border-collapse: collapse;
131
+ margin-bottom: 20px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  }
133
 
134
+ .result-table th, .result-table td {
135
+ border: 1px solid var(--border-color);
136
+ padding: 8px 12px;
137
+ text-align: left;
138
+ font-size: 14px;
 
 
 
 
 
 
 
 
139
  }
140
 
141
+ .result-table th {
142
+ background-color: var(--bg-light);
143
+ color: #495057;
144
+ width: 35%;
145
+ font-weight: bold;
 
146
  }
147
 
148
+ .result-table td.value-high { font-weight: bold; color: #dc3545; }
149
+ .result-table td.value-base { font-weight: bold; color: var(--academic-blue); }
 
 
 
 
 
150
 
151
+ .recommendation-box {
152
+ border-left: 4px solid var(--academic-blue);
153
+ background-color: #f8f9fa;
154
+ padding: 15px;
155
+ margin-bottom: 20px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  }
157
+
158
+ .recommendation-title { font-weight: bold; font-size: 15px; margin-bottom: 8px; color: var(--academic-dark); }
159
+ .recommendation-text { font-size: 14px; color: #333; margin: 0; }
160
 
161
+ /* Documentazione / Formule in Singola Riga */
162
+ .math-box {
163
+ font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
164
+ font-size: 13px;
165
+ color: #d63384;
166
+ background-color: #f8f9fa;
167
+ border: 1px solid #e9ecef;
168
+ padding: 6px 10px;
169
+ border-radius: 2px;
170
+ display: inline-block;
171
+ margin: 4px 0;
172
+ white-space: nowrap; /* FORZA LA SINGOLA RIGA */
173
+ overflow-x: auto;
174
+ max-width: 100%;
175
+ }
176
+
177
+ .doc-list { font-size: 13px; padding-left: 20px; margin-top: 10px; }
178
+ .doc-list li { margin-bottom: 8px; }
179
+
180
+ /* Standard Tabs */
181
+ .nav-tabs .nav-link {
182
+ border-radius: 2px 2px 0 0;
183
+ color: #495057;
184
+ font-size: 13px;
185
+ font-weight: bold;
186
+ padding: 8px 16px;
187
+ }
188
+ .nav-tabs .nav-link.active {
189
+ color: var(--academic-blue);
190
+ border-top: 3px solid var(--academic-blue);
191
  }
192
 
 
 
 
193
  .hidden { display: none; }
194
  </style>
195
  </head>
196
  <body>
197
 
198
+ <header class="academic-header">
199
+ <div class="main-container m-0 mx-auto py-0">
200
+ <h1>Dapt-Safinous (CDRS)</h1>
201
+ <div class="subtitle">Post-CABG Dual Antiplatelet Therapy Clinical Decision Support System</div>
202
  </div>
203
+ </header>
204
 
205
+ <div class="main-container">
206
 
207
  <!-- INSERIMENTO DATI -->
208
+ <div class="academic-panel">
209
+ <div class="academic-panel-header">Data Entry Form</div>
210
+ <div class="academic-panel-body">
211
+ <form id="patientForm">
212
+ <div class="row g-4">
213
+ <!-- Baseline & Labs -->
214
+ <div class="col-lg-4">
215
+ <div class="form-section-title">Baseline & Laboratory</div>
216
 
217
+ <div class="row g-2 mb-2">
218
  <div class="col-6">
219
  <label class="form-label">Age</label>
220
  <input type="number" class="form-control" id="Age" value="65" min="40" max="95">
 
228
  </div>
229
  </div>
230
 
231
+ <label class="form-label mt-2">Hemoglobin</label>
232
+ <div class="input-group mb-2">
233
  <input type="number" step="0.1" class="form-control" id="Hb" value="10.3">
234
+ <select class="form-select" id="HbUnit" style="max-width: 90px;">
235
  <option value="g/dL">g/dL</option>
236
  <option value="g/L">g/L</option>
237
  <option value="mmol/L">mmol</option>
238
  </select>
239
  </div>
240
 
241
+ <label class="form-label mt-2">WBC Count</label>
242
+ <div class="input-group mb-2">
243
  <input type="number" step="0.1" class="form-control" id="WBC" value="7.9">
244
+ <select class="form-select" id="WBCUnit" style="max-width: 100px;">
245
  <option value="x10^3/uL">x10³/µL</option>
246
  <option value="cells/uL">cells/µL</option>
247
  </select>
 
256
  <label class="form-label">Creatinine</label>
257
  <div class="input-group">
258
  <input type="number" step="0.1" class="form-control" id="Creatinine" value="1.2">
259
+ <select class="form-select" id="CrUnit" style="padding-left:4px; padding-right:4px;">
260
+ <option value="mg/dL">mg/dL</option>
261
+ <option value="umol/L">µmol/L</option>
262
  </select>
263
  </div>
264
  </div>
265
  </div>
266
  </div>
267
+
268
+ <!-- Clinical History -->
269
+ <div class="col-lg-4">
270
+ <div class="form-section-title">Clinical History</div>
 
 
271
 
272
  <label class="form-label">Prior Bleed</label>
273
  <select class="form-select mb-3" id="PriorBleed"><option value="0">No Prior Bleeding</option><option value="1">Yes, Prior Bleeding</option></select>
 
284
  <label class="form-label">Hypertension</label>
285
  <select class="form-select" id="Hypertension"><option value="0">No</option><option value="1">Yes</option></select>
286
  </div>
287
+
288
+ <!-- Surgical Details -->
289
+ <div class="col-lg-4">
290
+ <div class="form-section-title">Operative Details</div>
 
 
291
 
292
  <label class="form-label">Endoscopic Vein Harvest (EVH)</label>
293
  <select class="form-select mb-3" id="EVH"><option value="0">No</option><option value="1">Yes</option></select>
 
306
  </div>
307
  </div>
308
  </div>
309
+
310
+ <hr class="mt-4 mb-3">
311
+ <div class="text-right d-flex justify-content-end">
312
+ <button type="button" class="btn-compute" onclick="calculateRisk()">Run Risk Analysis</button>
313
+ </div>
314
+ </form>
315
+ </div>
316
  </div>
317
 
318
  <!-- SEZIONE RISULTATI -->
319
  <div id="resultsSection" class="hidden">
320
+ <div class="row g-4">
321
 
322
+ <!-- Colonna Analitica -->
323
+ <div class="col-lg-5">
324
+ <div class="academic-panel">
325
+ <div class="academic-panel-header">Clinical Report</div>
326
+ <div class="academic-panel-body">
327
+
328
+ <table class="result-table">
329
+ <tbody>
330
+ <tr>
331
+ <th>SAFINOUS Score</th>
332
+ <td id="valSafinous">0.0</td>
333
+ </tr>
334
+ <tr>
335
+ <th>PRECISE-DAPT</th>
336
+ <td id="valPrecise">0.0</td>
337
+ </tr>
338
+ <tr>
339
+ <th>CDRS+ Score</th>
340
+ <td class="value-base" id="valCDRS">0.0</td>
341
+ </tr>
342
+ <tr>
343
+ <th>CRI Index</th>
344
+ <td class="value-base" id="valCRI">0.0%</td>
345
+ </tr>
346
+ </tbody>
347
+ </table>
348
+
349
+ <div class="recommendation-box" id="trajectoryBox">
350
+ <div class="recommendation-title" id="valTrajectory">Trajectory</div>
351
+ <p class="recommendation-text" id="valRecommendation">Recommendation details.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
  </div>
353
+
354
+ <div class="form-section-title mt-4">Continuous Metrics Formulas</div>
355
+ <div class="math-box text-nowrap">CDRS+ = max(0, 3·SAFINOUS - 2·PRECISE_DAPT + 100)</div><br>
356
+ <div class="math-box text-nowrap mt-1">CRI% = [ (P(Isch) - P(Bleed) + 1.0) / 2.0 ] × 100%</div>
357
+
358
+ <div class="form-section-title mt-4">Clinical Thresholds</div>
359
+ <ul class="doc-list">
360
+ <li><strong>High Ischemic:</strong> CDRS+ ≥ 65 (Prolonged DAPT)</li>
361
+ <li><strong>Balanced Risk:</strong> 40 ≤ CDRS+ < 65 (Short DAPT)</li>
362
+ <li><strong>High Bleeding:</strong> CDRS+ < 40 (Aspirin Mono)</li>
363
+ </ul>
364
  </div>
365
  </div>
366
+ </div>
367
 
368
+ <!-- Colonna Grafici -->
369
+ <div class="col-lg-7">
370
+ <div class="academic-panel">
371
+ <div class="academic-panel-header">Data Visualization</div>
372
+ <div class="academic-panel-body p-0">
373
+ <ul class="nav nav-tabs px-3 pt-3" id="myTab" role="tablist">
374
+ <li class="nav-item" role="presentation"><button class="nav-link active" data-bs-toggle="tab" data-bs-target="#tab2d" type="button">2D Map</button></li>
375
+ <li class="nav-item" role="presentation"><button class="nav-link" data-bs-toggle="tab" data-bs-target="#tab3d" type="button">3D Map</button></li>
376
+ <li class="nav-item" role="presentation"><button class="nav-link" data-bs-toggle="tab" data-bs-target="#tabimpact" type="button">Feature Impact</button></li>
377
+ </ul>
378
+
379
+ <div class="tab-content p-3" id="myTabContent">
380
+ <div class="tab-pane fade show active" id="tab2d"><div id="plot2d" style="height: 480px; width:100%;"></div></div>
381
+ <div class="tab-pane fade" id="tab3d"><div id="plot3d" style="height: 480px; width:100%;"></div></div>
382
+ <div class="tab-pane fade" id="tabimpact">
383
+ <div id="plotDynamicImpactSaf" style="height: 240px; width:100%;"></div>
384
+ <div id="plotDynamicImpactPrec" style="height: 240px; width:100%; margin-top: 15px;"></div>
385
+ </div>
386
  </div>
387
  </div>
388
  </div>
389
  </div>
390
+
391
  </div>
392
  </div>
393
  </div>
394
 
395
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
396
  <script>
397
+ // Stile Plotly Accademico (senza trasparenze, netto)
398
  const plotlyBaseLayout = {
399
+ font: { family: 'Arial, sans-serif', color: '#333', size: 12 },
400
+ plot_bgcolor: '#ffffff',
401
+ paper_bgcolor: '#ffffff',
402
+ margin: { t: 40, b: 40, l: 50, r: 20 }
403
  };
404
 
405
  const bg_data = { p_isch: [], p_bleed: [], cri_pct: [] };
 
429
  let Creatinine = parseFloat(document.getElementById('Creatinine').value);
430
  const CrUnit = document.getElementById('CrUnit').value;
431
  if (CrUnit === 'umol/L') Creatinine /= 88.4;
 
432
 
433
  const PriorBleed = parseInt(document.getElementById('PriorBleed').value);
434
  const Diabetes = parseInt(document.getElementById('Diabetes').value);
 
460
  let traj = "", rec = "", color = "", border_color = "";
461
  if (CDRS_positive >= 65.0) {
462
  traj = "High Ischemic Dominance";
463
+ rec = "Prolonged DAPT (6-12 months or longer) to maximize saphenous vein graft patency.";
464
+ color = "#0056b3"; border_color = "#0056b3";
465
  } else if (CDRS_positive >= 40.0 && CDRS_positive < 65.0) {
466
  traj = "Balanced Competing Risk (Grey Zone)";
467
+ rec = "Individualized, Short DAPT (1-3 months) combined with enhanced clinical surveillance.";
468
+ color = "#dc3545"; border_color = "#dc3545";
469
  } else {
470
  traj = "High Bleeding Dominance";
471
  rec = "Aspirin Monotherapy (100 mg/day) to minimize hemorrhagic hazard.";
472
+ color = "#fd7e14"; border_color = "#fd7e14";
473
  }
474
 
475
  const resSection = document.getElementById('resultsSection');
476
  resSection.classList.remove('hidden');
 
 
 
 
477
 
478
  document.getElementById('valSafinous').innerText = Safinous.toFixed(1);
479
  document.getElementById('valPrecise').innerText = Precise.toFixed(1);
480
  document.getElementById('valCDRS').innerText = CDRS_positive.toFixed(1);
481
  document.getElementById('valCRI').innerText = CRI_pct.toFixed(1) + "%";
482
 
483
+ document.getElementById('trajectoryBox').style.borderLeftColor = border_color;
484
  const trajSpan = document.getElementById('valTrajectory');
485
  trajSpan.innerText = traj;
486
  trajSpan.style.color = color;
 
494
  }
495
 
496
  function draw2DPlot(px, py) {
497
+ const traceBg = { x: bg_data.p_isch, y: bg_data.p_bleed, mode: 'markers', name: 'Cohort', marker: {color: '#adb5bd', size: 6, opacity: 0.6}, type: 'scatter' };
498
+ const tracePt = { x: [px], y: [py], mode: 'markers+text', name: 'Patient', text: ['Patient'], textposition: 'top right', textfont: {family: 'Arial', weight: 'bold', color: '#000'}, marker: {color: '#dc3545', size: 10, symbol: 'square', line: {width: 1, color: '#000'}}, type: 'scatter' };
499
+ const layout = { ...plotlyBaseLayout, title: {text: 'Probability Distribution', font: {size: 14, weight: 'bold'}}, xaxis: {title: 'P(Ischemia)', gridcolor: '#e9ecef', zeroline: false}, yaxis: {title: 'P(Bleeding)', gridcolor: '#e9ecef', zeroline: false}, shapes: [ {type: 'line', x0: 0.5, y0: 0, x1: 0.5, y1: 1, line: {dash: 'dot', color: '#6c757d'}}, {type: 'line', x0: 0, y0: 0.5, x1: 1, y1: 0.5, line: {dash: 'dot', color: '#6c757d'}} ], showlegend: false };
500
  Plotly.newPlot('plot2d', [traceBg, tracePt], layout, {responsive: true, displayModeBar: false});
501
  }
502
 
503
  function draw3DPlot(px, py, pz) {
504
+ const traceBg = { x: bg_data.p_isch, y: bg_data.p_bleed, z: bg_data.cri_pct, mode: 'markers', name: 'Cohort', marker: {color: '#adb5bd', size: 3, opacity: 0.5}, type: 'scatter3d' };
505
+ const tracePt = { x: [px], y: [py], z: [pz], mode: 'markers+text', name: 'Patient', text: ['Patient'], textposition: 'top center', marker: {color: '#dc3545', size: 5, symbol: 'square'}, type: 'scatter3d' };
506
+ const layout = { ...plotlyBaseLayout, scene: {xaxis: {title: 'P(Isch)', backgroundcolor: '#ffffff', gridcolor:'#e9ecef'}, yaxis: {title: 'P(Bleed)', backgroundcolor: '#ffffff', gridcolor:'#e9ecef'}, zaxis: {title: 'CRI %', backgroundcolor: '#ffffff', gridcolor:'#e9ecef'}}, margin: {t:0, b:0, l:0, r:0}, showlegend: false };
507
  Plotly.newPlot('plot3d', [traceBg, tracePt], layout, {responsive: true, displayModeBar: false});
508
  }
509
 
 
520
  {name: 'CrCl', val: -0.15 * CrCl}, {name: 'Prior Bleed', val: 15.0 * PriorBleed}
521
  ].filter(d => d.val !== 0).sort((a,b) => Math.abs(a.val) - Math.abs(b.val));
522
 
523
+ const drawStyledPlot = (data, divId, titleText) => {
524
+ const trace = { x: data.map(d => d.val), y: data.map(d => d.name), type: 'bar', orientation: 'h', marker: { color: '#0056b3' } };
525
+ const layout = { ...plotlyBaseLayout, title: { text: titleText, font: { size: 13, weight: 'bold' } }, xaxis: { showgrid: true, gridcolor: '#e9ecef', zeroline: true, zerolinecolor: '#6c757d', zerolinewidth: 1, tickfont: {size: 11} }, yaxis: { showgrid: false, tickfont: {size: 11} }, margin: { t: 30, b: 20, l: 100, r: 10 }, height: 240 };
526
  Plotly.newPlot(divId, [trace], layout, {responsive: true, displayModeBar: false});
527
  };
528
 
529
+ drawStyledPlot(safData, 'plotDynamicImpactSaf', 'SAFINOUS Impact Points');
530
+ drawStyledPlot(precData, 'plotDynamicImpactPrec', 'PRECISE-DAPT Impact Points');
531
  }
532
 
533
  document.querySelectorAll('button[data-bs-toggle="tab"]').forEach(el => {