-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathview.html
1384 lines (1297 loc) · 73.7 KB
/
view.html
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
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<!--<link rel="stylesheet" href="Chart.css" />-->
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="styles-extra.css">
<link href="css/fontawesome.min.css" rel="stylesheet">
<link href="css/regular.min.css" rel="stylesheet">
<link href="css/solid.min.css" rel="stylesheet"> <!--font awesome-->
<meta name="theme-color" content="#7B8092">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
<link rel="apple-touch-icon" sizes="57x57" href="apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon" sizes="72x72" href="apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon" sizes="76x76" href="apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" sizes="114x114" href="apple-touch-icon-114x114.png" />
<link rel="apple-touch-icon" sizes="120x120" href="apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" sizes="144x144" href="apple-touch-icon-144x144.png" />
<link rel="apple-touch-icon" sizes="152x152" href="apple-touch-icon-152x152.png" />
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon-180x180.png" />
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="apple-touch-startup-image" media="screen and (device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" href="splash_screens/12.9__iPad_Pro_landscape.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" href="splash_screens/11__iPad_Pro__10.5__iPad_Pro_landscape.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" href="splash_screens/10.5__iPad_Air_landscape.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" href="splash_screens/10.2__iPad_landscape.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" href="splash_screens/9.7__iPad_Pro__7.9__iPad_mini__9.7__iPad_Air__9.7__iPad_landscape.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)" href="splash_screens/iPhone_13_Pro_Max__iPhone_12_Pro_Max_landscape.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)" href="splash_screens/iPhone_13_Pro__iPhone_13__iPhone_12_Pro__iPhone_12_landscape.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)" href="splash_screens/iPhone_13_mini__iPhone_12_mini__iPhone_11_Pro__iPhone_XS__iPhone_X_landscape.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)" href="splash_screens/iPhone_11_Pro_Max__iPhone_XS_Max_landscape.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" href="splash_screens/iPhone_11__iPhone_XR_landscape.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)" href="splash_screens/iPhone_8_Plus__iPhone_7_Plus__iPhone_6s_Plus__iPhone_6_Plus_landscape.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" href="splash_screens/iPhone_8__iPhone_7__iPhone_6s__iPhone_6__4.7__iPhone_SE_landscape.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" href="splash_screens/4__iPhone_SE__iPod_touch_5th_generation_and_later_landscape.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="splash_screens/12.9__iPad_Pro_portrait.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="splash_screens/11__iPad_Pro__10.5__iPad_Pro_portrait.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="splash_screens/10.5__iPad_Air_portrait.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="splash_screens/10.2__iPad_portrait.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="splash_screens/9.7__iPad_Pro__7.9__iPad_mini__9.7__iPad_Air__9.7__iPad_portrait.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" href="splash_screens/iPhone_13_Pro_Max__iPhone_12_Pro_Max_portrait.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" href="splash_screens/iPhone_13_Pro__iPhone_13__iPhone_12_Pro__iPhone_12_portrait.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" href="splash_screens/iPhone_13_mini__iPhone_12_mini__iPhone_11_Pro__iPhone_XS__iPhone_X_portrait.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" href="splash_screens/iPhone_11_Pro_Max__iPhone_XS_Max_portrait.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="splash_screens/iPhone_11__iPhone_XR_portrait.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" href="splash_screens/iPhone_8_Plus__iPhone_7_Plus__iPhone_6s_Plus__iPhone_6_Plus_portrait.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="splash_screens/iPhone_8__iPhone_7__iPhone_6s__iPhone_6__4.7__iPhone_SE_portrait.png">
<link rel="apple-touch-startup-image" media="screen and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="splash_screens/4__iPhone_SE__iPod_touch_5th_generation_and_later_portrait.png">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
<link rel="manifest" href="manifest.json">
<meta charset="utf-8">
<meta name="description" content="Simple and free TIVA simulator">
<meta name="keywords" content="simtiva, tiva, tci, free, simulator, terence, luk, cuhk, propofol, app, smartphones, apple, android">
<meta name="author" content="Terence Luk">
<title>SimTIVA Viewer</title>
<script defer src="https://cloud.umami.is/script.js" data-website-id="fe14ba98-f4c0-4536-94fa-9a0a4c1ed75e"></script>
</head>
<body class="" id="windowbody">
<div id="viewoverlay" style="z-index:999;display:flex;width:100%;height:100%;background:rgb(0,0,0,0.8);justify-content:center;align-items:center;position:fixed">
<div id="viewmsg" style="flex-basis:70%;color:#fff;border-left:2px solid #198964;padding:1rem;font-weight:bold">
Loading SimTIVA viewer parameters...
</div>
</div>
<div id="modalHistory" class="modal">
<div class="modal-content" id="modalHistorycontent">
<div class="modal-header">PAST SCHEMES</div>
<div class="modal-body" id="modalHistorytext">
</div>
</div>
</div>
<div id="modalWarning" class="modal alt">
<div class="modal-content alt" id="modalWarningcontent">
<div class="modal-header alt"><span class="title">Please wait</span><span class="close alt" onClick="hidewarningmodal()">×</span></div>
<div class="modal-body alt">SimTIVA is loading up...</div>
</div>
</div>
<!--startmodal-->
<div id="modalInitial" class="modal" style="display:none">
<div class="modal-content" id="modalInitialcontent">
<div class="modal-header">Enter patient data<!--<span class="close notcondensed" onClick="hideallmodal()">×</span>--><img onclick="displayAbout();" src="apple-touch-icon-180x180.png" style="position:absolute;right:6px;width:44px;cursor:pointer"></div>
<div class="modal-body">
<div class="paedimode_selector">
<a class="button_paedimode active" id="paedimode0" onclick="switchpaedimode(0);">Adult</a><!--
--><a class="button_paedimode" id="paedimode1" onclick="switchpaedimode(1);">Paediatric</a>
</div>
<table class="table-Init">
<tr class="fr" id="row_age_adultmode">
<td >Age (y) <i class="far fa-question-circle tooltip"><span class="tooltiptext" style="width: 80px; line-height:20px">0-100y</span></i></td>
<td><input type="number" inputmode="decimal" id="inputAge" min="0.1" max="99" step="0.1" placeholder=" " onkeyup="sendToValidate(0)" required/></td>
</tr>
<tr class="fr" id="row_age_paedimode" style="display:none">
<td>Age <i class="far fa-question-circle tooltip"><span class="tooltiptext">Actual chronological age</span></i></td>
<td>
<input type="number" inputmode="decimal" id="inputAgePaedi" placeholder=" " onkeyup="sendToValidate(0)"/>
<select id="select_age_unit">
<option value="d">Days</option>
<option value="w">Weeks</option>
<option value="m" selected>Months</option>
<option value="y">Years</option>
</select>
</tr>
<tr id="row_PMA_paedimode" style="display:none">
<td><span style="letter-spacing: -0.5px">Post-menstrual age </span><i class="far fa-question-circle tooltip"><span class="tooltiptext" style="">Covariate for Eleveld; affects clearance in <6mo</span></i>
</td>
<td>
<div id="PMA_td">
<div id="PMA_entry"><input type="number" inputmode="decimal" id="inputPMA" placeholder=" "/>weeks</div>
<div id="PMA_explanation" onclick="displayWarning('Post-menstrual age', 'Covariate for Eleveld model, affects clearance in <6 months old. Optional entry, omit for full term.')">What's this?</div>
</div>
</td>
</tr>
<tr>
<td>Weight (kg) <i class="far fa-question-circle tooltip"><span class="tooltiptext">0-200kg, validation with BMI & weight-for-age</span></i></td>
<td><input type="number" inputmode="decimal" id="inputBW" min="0.1" max="200" step="0.01" placeholder=" " onkeyup="sendToValidate(0)" required/></td>
</tr>
<tr id="row_height">
<td>Height (cm) <i class="far fa-question-circle tooltip"><span class="tooltiptext">0-250cm, required for Schnider/Eleveld</span></i></td>
<td><input type="number" inputmode="decimal" id="inputBH" min="0.1" max="250" step="0.1" placeholder=" " onkeyup="sendToValidate(0)" ></td>
</tr>
<tr id="row_gender"><td>Gender</td>
<td>
<select id="select_gender" onchange="sendToValidate(0)" >
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</td>
</tr>
<tr><td>Model <i class="far fa-question-circle tooltip2"><span class="tooltiptext">Paedfusor: for children. Marsh/Schnider/Minto: for adults.</span></i></td>
<td>
<select id="select_model" onchange="sendToValidate(0)" >
<option value="Marsh">Propofol (Marsh)</option>
<option value="Schnider">Propofol (Schnider)</option>
<option value="Paedfusor">Propofol (Paedfusor)</option>
<option value="Eleveld">Propofol (Eleveld)</option>
<option value="Minto">Remifentanil (Minto)</option>
<option value="Eleveld-Remifentanil">Remifentanil (Eleveld)</option>
<option value="Shafer">Fentanyl (Shafer)</option>
<option value="Complex">Complex (Dual mode)</option>
</select>
<select id="select_model_paedi" onchange="sendToValidate(0)" style="display:none">
<option value="Paedfusor">Propofol (Paedfusor)</option>
<option value="Eleveld" selected>Propofol (Eleveld)</option>
<option value="Eleveld-Remifentanil">Remifentanil (Eleveld)</option>
<option value="Complex">Complex (Dual mode)</option>
</select>
</td>
</tr>
<tr id="row_remidilution"><td style="letter-spacing:-0.5px">Concentration <span style="font-size: 85%">(mcg/ml)</span></td>
<td>
<select id="select_remidilution" onchange="change_remidilution(this.value)">
<option value="5">5mcg/ml</option>
<option value="10">10mcg/ml</option>
<option value="20" selected>20mcg/ml</option>
<option value="25">25mcg/ml</option>
<option value="50">50mcg/ml</option>
<option value="custom">Custom</option>
</select>
<div id="custom_remidilution" onclick="popup_dilution('remidilution','remifentanil')">
<span id="remidilution">_</span>mcg/ml
</div>
</td>
</tr>
<tr id="row_fen_weightadjusted"><td>Weight adjusted? <i class="far fa-question-circle tooltip3"><span class="tooltiptext">If YES: PK model adjusted to BW according to Shibutani, 2004; recommended for obese.</span></i></td>
<td>
<select id="select_fen_weightadjusted">
<option value="0" >No</option>
<option value="1" selected>Yes</option>
</select>
</td>
</tr>
<tr id="row_fendilution"><td style="letter-spacing:-0.5px">Concentration <span style="font-size: 85%">(mcg/ml)</span></td>
<td>
<select id="select_fendilution" onchange="change_fendilution(this.value)">
<option value="5">5mcg/ml</option>
<option value="10" selected>10mcg/ml</option>
<option value="20">20mcg/ml</option>
<option value="25">25mcg/ml</option>
<option value="50">50mcg/ml</option>
<option value="custom">Custom</option>
</select>
<div id="custom_fendilution" onclick="popup_dilution('fendilution','fentanyl')">
<span id="fendilution">_</span>mcg/ml
</div>
</td>
</tr>
<tr id="row_dexmededilution"><td>Drug dilution (mcg/ml)</td>
<td>
<input type="number" inputmode="decimal" id="inputDexmedeDilution" value="4">
</td>
</tr>
<!--
<tr><td>File Name</td>
<td>
<input id="inputFileName1" value="" class="formTextInput" placeholder="Optional, Max 32 char.">
</td>
</tr>
-->
<!--<tr><td>Debug: Enter Sim Speed (1=default)</td><td><input type="number" id="simspeed" value="1"></td></tr>-->
</table>
<div id="valCard" class="translate">
<div id="valLeft"></div>
<div id="valRight">
<div style="position:relative">
<div id="valRightContainer1" class="">
Waiting for input.
</div>
<div id="valRightContainer2" class="valClose">
BMI: <span id="bmiDisplay"></span><span id="bmiForAgeDisplay"></span>
<div id="wfaDiv">Weight for age: <span id="wfaDisplay"></span>
</div>
</div>
</div>
</div>
</div>
<div id="validationDisplay">
</div>
<div id="checkmarkDisplay">
<label class="container" style="visibility:hidden;">I confirm the above data are correct.
<input type="checkbox" onChange="sendToValidate(1);checkChecked();" id="checkConfirm"><span class="checkmark"></span>
</label>
<label class="container" style="visibility:hidden;">I agree to the disclaimer.
<input type="checkbox" id="checkDisclaim" onChange="checkChecked();"><span class="checkmark"></span>
</label>
</div>
<div>
<a class="button invert disabled" id="btn_initProceed">Proceed</a>
<a class="button muted right" id="btn_disclaimer" onclick="displayDisclaimer();">Disclaimer</a>
<a class="button muted right" id="btn_about" onclick="displayAbout();">About</a>
</div>
</div>
</div>
</div>
<!-- start leftbar-->
<div class="leftbar propofol hide">
<div class="ptolcontainer">
<div id="">
</div>
</div>
<div class="leftbarlabel">
<div class="druglabelcontainer propofol active" onclick="tabswitch(0);">
<div class="druglabelicon alert hide"><i class="fas fa-bell"></i></div>
<div class="druglabelicon propofol">
P
</div>
<div class="druglabeltext propofol active">
<div class="line1">PROPOFOL</div>
<div class="line2 hide">
<div class="line2text"><i class="fas fa-tint fa-fw"></i> <span id="cp_propo"></span> </div>
<div class="line2text"><i class="fas fa-brain fa-fw"></i> <span id="ce_propo"></span> </div>
<div class="line2text"><i class="fas fa-running fa-fw"></i> <span id="inf_propo"></span></div>
</div>
</div>
</div>
</div>
<div class="spacer">
</div>
<div class="leftbarlabel">
<div class="druglabelcontainer opioid " onclick="tabswitch(1);">
<div class="druglabelicon alert hide"><i class="fas fa-bell"></i></div>
<div class="druglabelicon opioid">
R
</div>
<div class="druglabeltext opioid ">
<div class="line1">REMIFENTANIL</div>
<div class="line2 hide">
<div class="line2text"><i class="fas fa-tint fa-fw"></i> <span id="cp_opioid"></span> </div>
<div class="line2text"><i class="fas fa-brain fa-fw"></i> <span id="ce_opioid"></span> </div>
<div class="line2text"><i class="fas fa-running fa-fw"></i> <span id="inf_opioid"></span></div>
</div>
</div>
</div>
</div>
</div>
<!-- end leftbar-->
<div id="parallax3"></div>
<div class="menuwrapper" id="menu">
<div class="menucontent">
<!--<a href="#"
onclick="showbaselayer(); window.scrollTo(0,0); togglemenu();"
ontouchstart="showbaselayer(); window.scrollTo(0,0); event.preventDefault(); togglemenu();">Home</a>-->
<a href="#"
onclick="setmodal('modalAbout'); togglemenu();"
ontouchstart="setmodal('modalAbout'); event.preventDefault(); togglemenu();">About</a>
<a href="#"
onclick="setmodal('modalReset'); togglemenu();"
ontouchstart="setmodal('modalReset'); event.preventDefault(); togglemenu();">Reset</a>
<a href="#"
onclick="setmodal('modalHelp'); togglemenu();"
ontouchstart="setmodal('modalHelp'); event.preventDefault(); togglemenu();">Help</a>
<a href="#"
onclick="setmodal('modalDocumentation'); togglemenu();"
ontouchstart="setmodal('modalDocumentation'); event.preventDefault(); togglemenu();">Documentation</a>
<a href="#"
onclick="sharefunction(); togglemenu();"
ontouchstart="sharefunction(); event.preventDefault(); togglemenu();">Share</a><!--
<a href="#"
onclick="setmodal('modalExport'); togglemenu();"
ontouchstart="document.getElementById('inputMaxDuration').value = Math.floor(time_in_s); setmodal('modalExport'); event.preventDefault(); togglemenu();">Export</a>-->
<a href="https://simtiva.blogspot.com/p/feedback.html"
onclick="togglemenu();"
ontouchstart="">Contact</a>
<!--<a href="#" onclick="setmodal('modaldisclaimer'); togglemenu();" ontouchstart="setmodal('modaldisclaimer'); event.preventDefault(); togglemenu();">Disclaimer</a>-->
</div>
</div>
<div id="bodywrapper" class="">
<div class="installbutton" id="installbutton">
<i class="fas fa-download fa-fw" style="transform: translateY(2px);"></i>
<div class="installtext" id="installtext">INSTALL</div>
<div class="installclose" id="installclose"><i class="fas fa-times fa-fw"></i></div>
</div>
<div class="hamburger" id="hamburger" style="display: none" onclick="togglemenu();">
<div class="bar1"></div>
<div class="bar2"></div>
<div class="bar3"></div>
</div>
<div id="parallax2">
<div class="top-bar-container">
<div class="topleft stop" id="iconplay" onclick="window.scrollTo(0,0);"><i class="fas fa-pause fa-lg"></i></div><!--
--><div class="topright">
<div class="top_subtitle " id="top_subtitle"><b>SimTIVA</b> - <span style="opacity: 50%; white-space:nowrap;" id="top_subtitle2">Simple TIVA simulator</span></div>
<div class="top_title " id="top_title">
<div class="top_title_box cp" id="top_cp"><span id="cp">-</span></div>
<div class="top_title_box ce" id="top_ce"><span id="ce">-</span></div>
<div class="top_title_box infrate" id="top_infrate"><span id="infrate">-</span></div>
</div>
</div>
</div>
</div>
<div id="parallax1">
<!--<div id="parallaxtop" class="propofol">
<div class="parallax_left">
<div class="parallax_drug_name"><span class="parallax_drug_name1">Propofol</span><div id="parallax_desired">_</div>
</div>
<div class="parallax_drug_model">
<span class="parallax_drug_model_name">Eleveld</span> | <span class="parallax_drug_conc">20mcg/ml</span>
</div>
</div>
<div class="parallax_right">
<div class="parallax_conc_box cp"><span id="cp_active">2.9</span>
</div>
<div class="parallax_conc_box ce"><span id="ce_active">3.3</span>
</div>
<div class="parallax_conc_box inf"><span id="inf_active">35</span>
</div>
</div>
</div>
-->
<div id="parallax1container" class="">
<div class="displayleft">
<div class="clockcontainer"><span id="clock">_</span></div>
<div class="VIcontainer">VI: <span id="displayvolume">_</span>ml</div>
</div><!--
--><div class="displayright">
<div class="displaywrapper">
<div class="">
<span id="drugname"></span> (<span id="modelname"></span>)
</div>
<div><b>BW:<span id="bw"></span></b>, BH:<span id="bh"></span></div>
<div><span id="age"></span>, <span id="gender"></span><!--<span id="temptimedisplay" style="float:right; opacity:50%"></span>--></div>
</div>
</div>
</div>
</div>
<!--start parallax bottom-->
<!--
<div id="parallaxbottom">
<div id="parallaxbottom_whitebox"> </div>
<div id="parallaxbottom_container" class="remifentanil">
<div class="parallax_left" >
<div class="parallax_drug_name"><span class="parallax_drug_name1">Remifentanil</span>
<div id="parallaxbottom_desired">_</div>
</div>
<div class="parallax_drug_model">
<span class="parallax_drug_model_name">Minto</span> | <span class="parallax_drug_conc">20mcg/ml</span>
</div>
</div>
<div class="parallax_right">
<div class="parallax_conc_box cp"><span id="cp_alt">2.9</span>
</div>
<div class="parallax_conc_box ce"><span id="ce_alt">3.3</span>
</div>
<div class="parallax_conc_box inf"><span id="inf_alt">35</span>
</div>
</div>
</div>
<div id="parallaxbottom_message">
<div id="parallaxbottom_message1"></div>
</div>
</div>
-->
<!-- end parallax bottom-->
<div id="popupchartdiv" style="display: none;position:fixed;background:black;top:0;left:0;z-index:99;width:100%;height:100%;padding:0">
<!--
<div id="chartbuttons2" style="display:none">
<a id="chartzoomin2" onclick="chartZoomToggle(1);"><i class="fas fa-search-plus"></i></a>
<a id="chartoptions2" onclick="chartOptionsToggle();"><i class="fas fa-cog"></i></a>
<a id="chartzoomout2" onclick="chartZoomToggle(0);"><i class="fas fa-search-minus"></i></a>
</div>
-->
<div id="chartinfooverlay" class="">
<div id="chartinfoleft" onclick="togglePopupInfo();"><i class="fas fa-chevron-circle-right fa-fw"></i></div><!--
--><div id="chartinforight">
<div id="chartinfotime"><span id="timecopy" class="timespan">0m 0s</span></div>
<div id="chartinfodrugline1"><span id="drugnamecopy">DRUG</span><span id="modelnamecopy"></span><span id="conccopy">(_mg/ml)</span></div>
<div id="chartinfodrugline2">Awaiting input</div>
<div id="chartinfoscheme"><span id="nextratedescriptor">Rate info unavailable </span><span id="nextratecopy"></span><span id="nextratepreposition"></span><span id="timeremaincopy"></span></div>
<div id="chartinfoptol">PTOL: __</div>
</div>
</div>
<div id="chartoverlayoptions2" >
<div id="chartoverlayoptions2content">
<div id="closeoptions2" onclick="togglepopupoptions();">×</div>
<div id="" style="font-weight:bold; margin-top:6px; margin-bottom:7px">Chart Options</div>
<div id="chartoptionscheckbox2">
<label class="container labeloptionscontainer" style="">Automatic time scale
<input type="checkbox" id="isTimeAutomatic2" onChange="toggleautotime();" checked><span class="checkmark"></span>
</label>
</div>
<div style="padding-left:30px">Custom time range (min):</div>
<div id="timerangeslider2">
<div id="leftslidercontainer2">
<input id="range0copy" value="10" min="0" max="30" step="5" type="range" oninput="processrange(0);">
<div class="timerangetext" id="rangetext0copy">0</div>
</div>
<div id="rightslidercontainer2">
<input id="range1copy" value="90" min="30" max="120" step="5" type="range" oninput="processrange(1);">
<div class="timerangetext" id="rangetext1copy">30</div>
</div>
</div>
<div style="margin-top:30px" id="PD_options_group2">
<label class="container labeloptionscontainer" style="margin-bottom:0px">PD Effect estimation
<input type="checkbox" id="isEffectEstimationOn2" onChange="if (document.getElementById('isEffectEstimationOn').checked == true) {document.getElementById('isEffectEstimationOn').checked = false} else {document.getElementById('isEffectEstimationOn').checked = true;}toggleEffectEst();" checked><span class="checkmark"></span>
</label>
<select id="select_effect_measure2" style="margin-left:30px;width:calc(100% - 30px)" onChange="document.getElementById('select_effect_measure').value=document.getElementById('select_effect_measure2').value;toggleEffectEst();">
<option value="bis">BIS 40-60</option>
<option value="ptol">PTOL 50-90</option>
<option value="nsri">NSRI 20-50</option>
</select>
</div>
</div>
<div id="chartoverlayoptionscontentarrow2"></div>
</div>
<div id="popupchartcontainer" style="width:100%;height:100%;display:block;border-radius:1rem">
<div style="display:inline-block;width:calc(100% - 108px);height:100%;"><canvas id="popupchart"></canvas></div><!--
--><div style="display:inline-block;width:108px;vertical-align:top;padding:10px;height:100%">
<div style="background:#198964; border-radius:0rem 1rem 1rem 1rem;height:100%">
<!--right container-->
<div class="pop_right_elem">
<a class="pop_button" id="pop_button_close" onclick="destroypopup();">
<i class="fas fa-times"></i>
</a>
</div>
<div class="pop_right_elem">
<div class="pop_title_box cp" id="pop_cp"><span id="cp_copy">-</span></div>
</div>
<div class="pop_right_elem">
<div class="pop_title_box ce" id="pop_ce"><span id="ce_copy">-</span></div>
</div>
<div class="pop_right_elem">
<div class="pop_title_box infrate" id="pop_infrate"><span id="infrate_copy">-</span></div>
</div>
<a class="pop_button" id="pop_button_options" onclick="togglepopupoptions();">
<i class="fas fa-cog"></i>
</a>
</div>
</div>
</div>
</div>
<div id="controlpanel">
<div id="prompts_container">
<div class="prompts_card" id="warning" style="border-color:#e4c4c4">
<div class="prompts_close" onclick="hide_prompts(this.parentElement); user_hide = 1; userhide();"><i class="fas fa-times-circle"></i></div>
<div id="warningleft"><i class="fas fa-exclamation-circle" id="warningicon"></i></div>
<div id="warningright">
<div style="font-size:80%; font-weight:bold; color:red; border-bottom:1px solid #e4c4c4; padding-bottom:2px"><span id="warningdescriptor">REMINDER - next change in </span><div id="warningcounter">10s</div></div>
<div style="" id="warningprompt">_</div>
</div>
</div>
<div class="prompts_card" id="preview" style="border-color:#a9c5e4">
<div class="prompts_close" onclick="hide_prompts(this.parentElement)"><i class="fas fa-times-circle"></i></div>
<div id="previewleft"><i class="fas fa-arrow-circle-up" id="previewicon"></i></div>
<div id="previewright">
<div style="font-size:80%; font-weight:bold; border-bottom:1px solid #a9c5e4; padding-bottom:2px;line-height:1.2">PREVIEW: To achieve target <div id="preview_cpt"></div></div>
<div style="line-height:1.2;padding-top:2px;font-size:95%" id="preview_msg"></div>
</div>
</div>
<div class="prompts_card" id="prompt" style="border-color:#9bc99d">
<div id="promptleft"><i class="fas fa-info-circle" id="prompticon"></i></div>
<div id="promptright">
<div style="font-size:80%; font-weight:bold; border-bottom:1px solid #9bc99d; padding-bottom:2px"><span id="prompt_msg2">Current rate</span></div>
<div id="progressbar"></div>
<div style="" id="prompt_msg"><span id="status">Waiting to start</span><span id="infusiondescriptor"></span></div>
</div>
</div>
</div>
<div class="cardscontainer">
<div id="xInputCards">
<!--<button onclick="openpopupchart()">POPUP</button>-->
<!-- start cards container for layout-->
<div class="card" id="card_infusion0" style="display:none;">
<div class="cardtitle">INFUSION</div>
<div class="cardcontents">
<table class="table-control line" id="tableInfusionRate0">
<tr class="fr"><td>
<div class="infusionratecontainer" id="infusionratecontainer0"><span id="infusionratedescription0">Infusion rate (ml/h)</span>
<span class="infusionrateselector" id="infusionrateselector0" onclick="dropdownshow(0)"><i class="fas fa-chevron-down"></i></span>
<div class="infusionratedropdown" id="infusionratedropdown0">
<a class="infusionratedropdownitem" id="infusionrateoption0" onclick="setInfusionUnit(0)"><i class="far fa-check-circle infusioncheck"></i> ml/h</a>
<a class="infusionratedropdownitem" id="infusionrateoption1" onclick="setInfusionUnit(1)"><i class="far fa-circle infusioncheck"></i> mg/kg/h</a>
</div>
</div>
</td><td><input type="number" inputmode="decimal" id="inputInfusion0" min="0" max="100" step="0.1" placeholder=" " onchange=""></td></tr>
</table>
<table class="table-control space" id="tableInitialBolus0">
<tr><td>
<div class="infusionratecontainer" id="boluscontainer0"><span id="bolusdescription0">Initial bolus (<span class="infused_units"></span>)</span>
<span class="infusionrateselector" id="bolusselector0" onclick="dropdownshowbolus(0,'')"><i class="fas fa-chevron-down"></i></span>
</div>
<div class="infusionratedropdown" id="bolusdropdown0">
<a class="infusionratedropdownitem" id="bolusoption0_0" onclick="setBolusUnit(0)"><i class="far fa-check-circle infusioncheck"></i> <span class="infused_units"></span></a>
<a class="infusionratedropdownitem" id="bolusoption1_0" onclick="setBolusUnit(1)"><i class="far fa-circle infusioncheck"></i> <span class="infused_units"></span>/kg</a>
<a class="infusionratedropdownitem" id="bolusoption2_0" onclick="setBolusUnit(2)"><i class="far fa-circle infusioncheck"></i> ml</a>
</div>
</div>
</td><td><input type="number" inputmode="decimal" id="inputBolus_initial0" min="0" max="2000" step="0.01" placeholder=" " ></td></tr>
</table>
<a class="button" id="btn_start0" onclick="start_manual(0);">Start</a>
<a class="button" id="btn_pause0" onclick="pause(0);">Pause</a>
</div>
</div>
<div class="card" id="card_infusion1" style="display:none;">
<div class="cardtitle">INFUSION.</div>
<div class="cardcontents">
<table class="table-control line" id="tableInfusionRate1">
<tr class="fr"><td>
<div class="infusionratecontainer" id="infusionratecontainer1"><span id="infusionratedescription1">Infusion rate (ml/h)</span>
<span class="infusionratecontainer" id="infusionrateselector1" onclick="dropdownshow(1)"><i class="fas fa-chevron-down"></i></span>
<div class="infusionratedropdown" id="infusionratedropdown1">
<a class="infusionratedropdownitem" id="infusionrateoptioncopy0" onclick="setInfusionUnit(0)"><i class="far fa-check-circle infusioncheck"></i> ml/h</a>
<a class="infusionratedropdownitem" id="infusionrateoptioncopy1" onclick="setInfusionUnit(1)"><i class="far fa-circle infusioncheck"></i> mg/kg/h</a>
</div>
</div>
</td><td><input type="number" inputmode="decimal" id="inputInfusion1" min="0" max="100" step="0.1" placeholder=" " onchange=""></td></tr>
</table>
<table class="table-control space" id="tableInitialBolus1">
<tr><td>
<div class="infusionratecontainer" id="boluscontainer1"><span id="bolusdescription1">Initial bolus (<span class="infused_units"></span>)</span>
<span class="infusionrateselector" id="bolusselector1" onclick="dropdownshowbolus(1,'')"><i class="fas fa-chevron-down"></i></span>
</div>
<div class="infusionratedropdown" id="bolusdropdown1">
<a class="infusionratedropdownitem" id="bolusoption0_1" onclick="setBolusUnit(0)"><i class="far fa-check-circle infusioncheck"></i> <span class="infused_units"></span></a>
<a class="infusionratedropdownitem" id="bolusoption1_1" onclick="setBolusUnit(1)"><i class="far fa-circle infusioncheck"></i> <span class="infused_units"></span>/kg</a>
<a class="infusionratedropdownitem" id="bolusoption2_1" onclick="setBolusUnit(2)"><i class="far fa-circle infusioncheck"></i> ml</a>
</div>
</div>
</td><td><input type="number" inputmode="decimal" id="inputBolus_initial1" min="0" max="2000" step="0.01" placeholder=" " ></td></tr>
</table>
<a class="button" id="btn_start1" onclick="start_manual(1);">Start</a>
<a class="button" id="btn_pause1" onclick="pause(1);">Pause</a>
</div>
</div>
<div class="card hide" id="card_reanimate">
<div class="cardtitle">RESUME SIMULATION</div>
<div class="cardcontents">
<div style="color:grey; font-size:90%">The recording of simulation data was suspended at: <br><span id="timestamp_lastdata"></span></div>
<table class="table-control space">
<tr class="fr">
<td>Duration elapsed since simulation suspended:</td>
<td>
<select id="reanimate_select" onchange="sendtoreanimate(this.value*60);">
<option value="0">0min</option>
<option value="0.5"><1min</option>
<option value="1">1min</option>
<option value="2">2mins</option>
<option value="3">3mins</option>
<option value="4">4mins</option>
<option value="5">5mins</option>
<option value="6">6mins</option>
<option value="7">7mins</option>
<option value="8">8mins</option>
<option value="9">9mins</option>
<option value="10">10mins</option>
<option value="11">11mins</option>
<option value="12">12mins</option>
<option value="13">13mins</option>
<option value="14">14mins</option>
<option value="15">15mins</option>
<option value="16">16mins</option>
<option value="17">17mins</option>
<option value="18">18mins</option>
<option value="19">19mins</option>
<option value="20">20mins</option>
<option value="21">21mins</option>
<option value="22">22mins</option>
<option value="23">23mins</option>
<option value="24">24mins</option>
<option value="25">25mins</option>
<option value="26">26mins</option>
<option value="27">27mins</option>
<option value="28">28mins</option>
<option value="29">29mins</option>
<option value="30">30mins</option>
<option value="35">35mins</option>
<option value="40">40mins</option>
<option value="45">45mins</option>
<option value="50">50mins</option>
<option value="55">55mins</option>
<option value="60">60mins</option>
</select>
</td>
</tr>
<tr>
<td>Time point for resuming simulation:</td>
<td><span id="timestamp_toberesumed"></span></td>
</table>
<a class="button" id="btn_reanimate" onclick="submit_reanimate();">Resume simulation</a>
</div>
</div>
<div class="card" id="card_cpt0" style="display:none;">
<div class="cardtitle">Cp TARGETING</div>
<div class="cardcontents">
<table class="table-control space" id="tableCpt">
<tr class="fr"><td>Enter Cp (<span class="conc_units"></span>/ml)</td><td><input type="number" inputmode="decimal" id="inputDesired0" min="0.1" max="200" step="0.1" placeholder=" " oninput="displaypreview(this.value,0);"></td></tr>
</table>
<a class="button" id="btn_startCpt0" onclick="start_cpt();">Start</a>
<a class="button" id="btn_pauseCpt0" onclick="pauseCpt(0); drug_sets[0].cpt_active=0.5;">Pause</a>
</div>
</div>
<div class="card" id="card_cpt1" style="display:none;">
<div class="cardtitle">Cp TARGETING.</div>
<div class="cardcontents">
<table class="table-control space" id="tableCpt">
<tr class="fr"><td>Enter Cp (<span class="conc_units"></span>/ml)</td><td><input type="number" inputmode="decimal" id="inputDesired1" min="0.1" max="200" step="0.1" placeholder=" " oninput="displaypreview(this.value,1);"></td></tr>
</table>
<a class="button" id="btn_startCpt1" onclick="
start_cpt_complex(document.getElementById('inputDesired1').value*1,1);
">Start</a>
<a class="button" id="btn_pauseCpt1" onclick="pauseCpt(1); drug_sets[1].cpt_active=0.5;">Pause</a>
</div>
</div>
<div class="card" id="card_cet0" style="display:none;">
<div class="cardtitle">Ce TARGETING</div>
<div class="cardcontents">
<table class="table-control space" id="tableCet">
<tr class="fr"><td>Enter Ce (<span class="conc_units"></span>/ml)</td><td><input type="number" inputmode="decimal" style="border-radius:1rem; width:75px; border-width:2px" id="inputDesiredCe0" onfocus="this.nextElementSibling.style.display='inline-block';" min="0.1" max="200" step="0.1" placeholder=" " onkeyup="displaypreview(this.value,0);this.nextElementSibling.style.display='inline-block';" onblur="x=this;setTimeout(function(){x.nextElementSibling.style.display='none';},300)"><button id="clearCe" class="closeicon" onclick="clearInput('inputDesiredCe0');"></button></td></tr>
<tr id="IB_swing_select_row0" class="IB_elements">
<td>Peak/trough level</td>
<td>
<select id="IB_swing_select0" onchange="drug_sets[0].IB_swing=this.value*1">
<option value="0.025">±2.5%</option>
<option value="0.05" selected>±5%</option>
<option value="0.075">±7.5%</option>
<option value="0.1">±10%</option>
<option value="0.125">±12.5%</option>
<option value="0.15">±15%</option>
</select>
</td>
</tr>
<tr id="IB_interval_row0" class="IB_elements">
<td>Bolus interval
</td>
<td id="IB_interval0">
</td>
</tr>
</table>
<!--
<div id="IB_description" class="" style="color:grey; font-size:90%; padding-top:10px; padding-bottom:10px">
The peak/trough levels represent the magnitude of fluctuation for Ce. For example, when set to ±5%, the Ce will reach a maximum of 105% of target and then drop to a minimum of 95% of target. At the trough level, another bolus will be administered, and the cycle repeats.
</div>
-->
<a class="button" id="btn_startCet0" onclick="start_cet();">Start</a>
<a class="button" id="btn_pauseCet0" onclick="pauseCpt(0); cet_active=0.5;">Pause</a>
<span id="IB_about_btn0" onclick="displayIBabout();"><i class="fas fa-question-circle"></i></span>
<!--
<a class="button muted" id="btn_bolusconverter" onclick="start_cet_bolus();"><i class="fas fa-syringe"></i></a>
-->
</div>
</div>
<div class="card" id="card_cet1" style="display:none;">
<div class="cardtitle">Ce TARGETING.</div>
<div class="cardcontents">
<table class="table-control space" id="tableCet1">
<tr class="fr"><td>Enter Ce (<span class="conc_units"></span>/ml)</td><td><input type="number" inputmode="decimal" style="border-radius:1rem; width:75px; border-width:2px" id="inputDesiredCe1" onfocus="this.nextElementSibling.style.display='inline-block';" min="0.1" max="200" step="0.1" placeholder=" " onkeyup="displaypreview(this.value,1);this.nextElementSibling.style.display='inline-block';" onblur="x=this;setTimeout(function(){x.nextElementSibling.style.display='none';},300)"><button id="clearCe" class="closeicon" onclick="clearInput('inputDesiredCe1');"></button></td></tr>
<tr id="IB_swing_select_row1" class="IB_elements">
<td>Peak/trough level</td>
<td>
<select id="IB_swing_select1" onchange="drug_sets[1].IB_swing=this.value*1">
<option value="0.025">±2.5%</option>
<option value="0.05" selected>±5%</option>
<option value="0.075">±7.5%</option>
<option value="0.1">±10%</option>
<option value="0.125">±12.5%</option>
<option value="0.15">±15%</option>
</select>
</td>
</tr>
<tr id="IB_interval_row1" class="IB_elements">
<td>Bolus interval
</td>
<td id="IB_interval1">
</td>
</tr>
</table>
<!--
<div id="IB_description" class="" style="color:grey; font-size:90%; padding-top:10px; padding-bottom:10px">
The peak/trough levels represent the magnitude of fluctuation for Ce. For example, when set to ±5%, the Ce will reach a maximum of 105% of target and then drop to a minimum of 95% of target. At the trough level, another bolus will be administered, and the cycle repeats.
</div>
-->
<a class="button" id="btn_startCet1" onclick="start_cet_complex(document.getElementById('inputDesiredCe1').value*1,1);">Start</a>
<a class="button" id="btn_pauseCet1" onclick="pauseCpt(1); cet_active=0.5;">Pause</a>
<span id="IB_about_btn1" onclick="displayIBabout();"><i class="fas fa-question-circle"></i></span>
<!--
<a class="button muted" id="btn_bolusconverter" onclick="start_cet_bolus();"><i class="fas fa-syringe"></i></a>
-->
</div>
</div>
<div class="card" id="card_bolus0" style="display:none;">
<div class="cardtitle">BOLUS</div>
<div class="cardcontents">
<table class="table-control space">
<tr class="fr"><td>
<div class="infusionratecontainer" id="boluscontainercopy0"><span id="bolusdescriptioncopy0">Custom bolus (<span class="infused_units"></span>)</span> <span class="infusionrateselector" id="bolusselectorcopy0" onclick="dropdownshowbolus(0,'copy')"><i class="fas fa-chevron-down"></i></span>
</div>
<div class="infusionratedropdown" id="bolusdropdowncopy0">
<a class="infusionratedropdownitem" id="bolusoptioncopy0_0" onclick="setBolusUnit(0)"><i class="far fa-check-circle infusioncheck"></i> <span class="infused_units"></span></a>
<a class="infusionratedropdownitem" id="bolusoptioncopy1_0" onclick="setBolusUnit(1)"><i class="far fa-circle infusioncheck"></i> <span class="infused_units"></span>/kg</a>
<a class="infusionratedropdownitem" id="bolusoptioncopy2_0" onclick="setBolusUnit(2)"><i class="far fa-circle infusioncheck"></i> ml</a>
</div>
</td>
<td width="30px"><input type="number" id="inputBolus0" min="0" max="2000" step="0.01" placeholder=" " ></td>
<td><a class="button custom" id="" onclick="bolusadmin(custombolus(0),0);">Go!</button></a></td>
</tr></table>
<a class="button bolus" id="bolus3" onclick="bolusadmin(30,0);"><div class="bolus_outside">Bolus</div><div class="bolus_inside">30<span class="infused_units"></span></div></a>
<a class="button bolus" id="bolus2" onclick="bolusadmin(20,0);"><div class="bolus_outside">Bolus</div><div class="bolus_inside">20<span class="infused_units"></span></div></a>
<a class="button bolus" id="bolus1" onclick="bolusadmin(10,0);"><div class="bolus_outside">Bolus</div><div class="bolus_inside">10<span class="infused_units"></span></div></a>
</div>
</div>
<div class="card" id="card_bolus1" style="display:none;">
<div class="cardtitle">BOLUS.</div>
<div class="cardcontents">
<table class="table-control space">
<tr class="fr">
<td>
<div class="infusionratecontainer" id="boluscontainercopy1"><span id="bolusdescriptioncopy1">Custom bolus (<span class="infused_units"></span>)</span>
<span class="infusionrateselector" id="bolusselectorcopy1" onclick="dropdownshowbolus(0,'')"><i class="fas fa-chevron-down"></i></span>
</div>
<div class="infusionratedropdown" id="bolusdropdowncopy1">
<a class="infusionratedropdownitem" id="bolusoptioncopy0_1" onclick="setBolusUnit(0)"><i class="far fa-check-circle infusioncheck"></i> <span class="infused_units"></span></a>
<a class="infusionratedropdownitem" id="bolusoptioncopy1_1" onclick="setBolusUnit(1)"><i class="far fa-circle infusioncheck"></i> <span class="infused_units"></span>/kg</a>
<a class="infusionratedropdownitem" id="bolusoptioncopy2_1" onclick="setBolusUnit(2)"><i class="far fa-circle infusioncheck"></i> ml</a>
</div>
</div>
</td>
<td width="30px"><input type="number" id="inputBolus1" min="0" max="2000" step="0.01" placeholder=" " ></td>
<td><a class="button custom" id=""onclick="bolusadmin(custombolus(1),1);">Go!</button></a></td>
</tr></table>
<a class="button bolus" id="bolus3_1" onclick="bolusadmin(30,1);"><div class="bolus_outside">Bolus</div><div class="bolus_inside">30<span class="infused_units"></span></div></a>
<a class="button bolus" id="bolus2_1" onclick="bolusadmin(20,1);"><div class="bolus_outside">Bolus</div><div class="bolus_inside">20<span class="infused_units"></span></div></a>
<a class="button bolus" id="bolus1_1" onclick="bolusadmin(10,1);"><div class="bolus_outside">Bolus</div><div class="bolus_inside">10<span class="infused_units"></span></div></a>
</div>
</div>
<div id="outputcontainer">
<div id="outputselector">
<a class="outputtab active" id="btn_displaychart" onclick="show_graph();">Graph</a>
<a class="outputtab" id="btn_displayhistory" onclick="show_history();">History</a>
</div>
<div id="chartwrapper">
<div id="chartoverlay">
<div id="chartoverlaytext">Updating chart...</div>
</div>
<div id="chartbuttons">
<a id="chartzoomin" onclick="chartZoomToggle(1);"><i class="fas fa-search-plus"></i></a>
<a id="chartoptions" onclick="chartOptionsToggle();"><i class="fas fa-cog"></i></a>
<a id="chartzoomout" onclick="chartZoomToggle(0);"><i class="fas fa-search-minus"></i></a>
</div>
<div id="chartoverlayoptions">
<div id="chartoverlayoptionscontent">
<div id="closeoptions" onclick="chartOptionsToggle();">×</div>
<div id="" style="font-weight:bold; margin-top:6px; margin-bottom:9px">Chart Options</div>
<div id="chartoptionscheckbox">
<label class="container labeloptionscontainer" style="">Display events
<input type="checkbox" onChange="toggleshowevents();" id="isShowEvents" checked><span class="checkmark"></span>
</label>
<label class="container labeloptionscontainer" style="">Automatic time scale
<input type="checkbox" id="isTimeAutomatic" onChange="toggleautotime();" checked><span class="checkmark"></span>
</label>
</div>
<div style="padding-left:30px">Custom time range (min):</div>
<div id="timerangeslider">
<div id="leftslidercontainer">
<input id="range0" value="10" min="0" max="30" step="5" type="range" oninput="processrange(0);">
<div class="timerangetext" id="rangetext0">0</div>
</div>
<div id="rightslidercontainer">
<input id="range1" value="90" min="30" max="120" step="5" type="range" oninput="processrange(1);">
<div class="timerangetext" id="rangetext1">30</div>
</div>
</div>
<div style="margin-top:30px" id="PD_options_group">
<label class="container labeloptionscontainer" style="">PD Effect estimation
<input type="checkbox" id="isEffectEstimationOn" onChange="toggleEffectEst();" checked><span class="checkmark"></span>
</label>
<select id="select_effect_measure" style="margin-left:30px;width:calc(100% - 30px)" onChange="toggleEffectEst();">
<option value="bis">BIS 40-60</option>
<option value="ptol">PTOL 50-90</option>
<option value="nsri">NSRI 20-50</option>
</select>
</div>
</div>
<div id="chartoverlayoptionscontentarrow"></div>
</div>
<div id="annotatebutton" style="display:none" onclick="setnow(Math.floor(time_in_s));document.getElementById('modalAnnotatetitle').innerHTML='ADD EVENT';document.getElementById('addeventtext').value='';document.getElementById('btn_submitevent').setAttribute('onclick','createEvent2(-1)');document.getElementById('btn_deleteevent').style.display='none';setmodal('modalAnnotate')">
<i class="fas fa-pen"></i>
</div>
<div id="expandbutton" style="" onclick="openpopupchart();">
<i class="fas fa-expand-alt"></i>
</div>
<div id="chartcontainer">
<canvas id="myChart"></canvas>
</div>
</div>
<div id="historywrapper2">
<div id="historywrapper">
</div>
</div>
<div id="pastscheme">
<a id="pastschemebutton" onclick="displaymodalhistory();"><i class="fas fa-history"></i> Past Schemes</a>
</div>
</div>
<div id="eventscontainer" style="display:block">
</div>
<div id="ptolcard" class="">
<div id="ptolcard_left" style="padding:0.5rem;flex-basis:70%">
<div style="font-size:200%;font-weight:bold;line-height:1" id=""><span id="ptoltitle">PTOL</span><span id="ptoltooltip" onclick="ptolwarning();" style="display:none"><i class="far fa-question-circle"></i></span></div>
<div style="font-size:80%;opacity:50%" id="ptoldesc">Probability of tolerance to laryngoscopy (%)</div>
</div><!--
--><div id="ptolcard_right" style="flex-basis: 25%;text-align:center;font-size:400%;font-weight:bold">
-
</div><!--
--><div id="ptolcard_switch" style="text-align:center;align-self:stretch;padding-top:30px; cursor:pointer" onclick="cycleEffectEst();">
<div style="line-height:0.5">
<i class="fas fa-caret-up"></i><br>
<i class="fas fa-caret-down"></i>
</div>
</div>
</div>
<div id="emulatecard" class="card" style="display:none">
<div class="cardtitle">ELEVELD EMULATION</div>
<div id="emulatetitlecontainer">
<div id="emulatetitleleft" style="padding:0.5rem;flex-basis:70%">
<span style="font-size:200%;font-weight:bold;line-height:1">eBIS</span>
<div style="font-size:80%;opacity:50%" id="">Estimated BIS from Eleveld PD model</div>
</div>
<div style="flex-basis: 25%;text-align:center;font-size:400%;font-weight:bold" id="emulatetitleright">
</div>
</div>
<div id="emulateswitch">
<a class="button" onclick="document.getElementById('emulateswitch').classList.add('hide');document.getElementById('emulatebox').classList.add('expand');emulatePopulateRatio();">Turn on emulation</a>
</div>
<div id="emulatebox">
<div id="emulatechartbuttons" class="hide"><a id="chartemulatebutton" onclick="emulateDisplayToggle()"><span style="padding-right: 6px"><i class="fas fa-question-circle"></i></span>Details</a></div>
<div id="emulatecontrols">
<div>
<span style="opacity:0.7;font-size:0.8rem;width:85%;margin:9px auto;white-space:normal;display:block">This table estimates the required target to emulate the Eleveld model. Use the induction target for initial 1-3mins then reduce to maintenance target. Ratio to convert <i>Eleveld target</i> to <i><span id="emulateRatioModel3">Marsh</span> target</i> is: <b><span id="emulateRatio" ></span></b></span>
<div class="customTableRow">
<span><b>Eleveld CET</b></span><span><b id="emulateRatioModel1">Marsh</b><br><b>Induction</b></span><span><b id="emulateRatioModel2">Marsh</b><br><b>Maintenance</b></span>
</div>
<div class="customTableRow">
<b><span>1</span></b><span id="emulateRatioX1start"></span><span id="emulateRatioX1"></span>
</div>
<div class="customTableRow">
<b><span>2</span></b><span id="emulateRatioX2start"></span><span id="emulateRatioX2"></span>
</div>
<div class="customTableRow">
<b><span>3</span></b><span id="emulateRatioX3start"></span><span id="emulateRatioX3"></span>
</div>
<div class="customTableRow">
<b><span>4</span></b><span id="emulateRatioX4start"></span><span id="emulateRatioX4"></span>
</div>
<div class="customTableRow noline">
<b><span>5</span></b><span id="emulateRatioX5start"></span><span id="emulateRatioX5"></span>
</div>
<div class="customTableRow noline">
</div>
<span style="opacity:0.7;font-size:0.8rem;width:85%;margin:9px auto;white-space:normal;display:block">Age-adjusted CE50 for Eleveld model is: <b><span id="emulateCE50"></span></b></span>
</div>
<div style="display:flex;width:100%;height: 40px;justify-content:center;align-items:center">
<a class="button invert" id="emulateStartBtn" onclick="emulateEleveldInit();emulateEleveldReal();emulateDisplayToggle();setTimeout(emulatePlot,3000);setTimeout(function() {document.getElementById('emulateStartBtn').setAttribute('onclick','emulateDisplayToggle()');document.getElementById('emulateStartBtn').innerHTML='Show Graph'},250);emulateOn = true;">Start Emulation</a>
</div>
</div>
<div id="emulatechartcontainer">
<canvas id="myChartEmulate"></canvas>
</div>
</div>
</div>
<div id="interactionscontainer">
<div id="interactionstabselector">
<a class="interactionstab active" id="btn_displayisobologram" onclick="show_isobologram()">Isobologram</a>
<a class="interactionstab" id="btn_displaylegend" onclick="show_legend();">PD Interaction</a>
</div>
<div id="chart2wrapper">
<div id="chart2container">
<canvas id="myChart2"></canvas>
</div>
</div> <!-- end chart2wrapper -->
<div id="legendwrapper">
<div class="legendtitle">Propofol-Opioid Interaction</div>
<div class="legendcontent">Propofol and opioids such as remifentanil demonstrate intense synergism. The interaction can be quantified using a hypnotic-analgesic endpoint such as ablating response to laryngoscopy. For example, remifenanil concentration of 4ng/ml may reduce propofol concentration associated with loss of response to laryngoscopy by two-thirds (Bouillon 2004). Probability to tolerate laryngoscopy (PTOL) and its derivative, the noxious stimulation response index (NSRI), have been proposed as measures of potency of propofol-remifentanil drug combination (Hannivoort 2016).</div>
<div class="legendtitle">Isobologram</div>
<div class="legendcontent">Using different combinations of CE-propofol and CE-remifentanil (effect-site concentrations of propofol and remifentanil respectively), all yielding the same predicted response (90% probability to tolerate laryngoscopy, PTOL90), a line (isobole) is drawn connecting all the possible combinations of CE-propofol/CE-remifentanil to achieve the same identical effect (van den Berg 2021). In our simulation programme, the same method is repeated for PTOL80, PTOL70... PTOL10 to generate a total of 9 isoboles on the 2-dimensional chart. The contour of the isoboles is typical of synergism, or supradditive interaction.</div>
<div class="legendtitle">Combinations of CEProp/CERemi for PTOL90</div>
<div class="legendcontent">Using PTOL90 isobole as an example, the combinations of CE-propofol and CE-remifentanil yielding the identical effect are: {8.6mcg/ml, 1ng/ml}, {5.9mcg/ml, 2ng/ml}, {3.6mcg/ml, 4ng/ml}, {2mcg/ml, 8ng/ml} according to the Bouillon interaction model (van den Berg 2021). Following this, the clinician may decide on using PTOL as a guidance to control different CE of propofol/remifentanil based on haemodynamic, hypnotic, or other consequences while maintaining the same level of pharmacodynamic endpoint.</div>
</div>
<!-- obsolete code for UI interactions toggles
<button onclick="complex_mode=1;">COMPLEX</button>
<button onclick="readmodel('Minto',1);drug_sets[1].infusate_concentration=20;initcet_complex(1);complexinterface_init();">INIT MINTO CET</button>
<button onclick="readmodel('Minto',1);drug_sets[1].infusate_concentration=20;initcpt_complex(1);complexinterface_init();">INIT MINTO CPT</button>
<button onclick="readmodel('Minto',1);drug_sets[1].infusate_concentration=20;initmanual(1);complexinterface_init();">INIT MINTO MANUAL</button>
<input id="remi_desired">
<button onclick="start_cet_complex(getElementById('remi_desired').value*1,1);">DELIVER REMI</button>
<button onclick="if (active_drug_set_index == 0) {myChart.data.datasets[6].data = ptol_generate_data_p(0.9);myChart.data.datasets[7].data = ptol_generate_data_p(0.5);} else {myChart.data.datasets[6].data = ptol_generate_data_r(0.9);myChart.data.datasets[7].data = ptol_generate_data_r(0.5)} myChart.update();">REFRESH CHART PTOL</button>
<button onclick="setInterval(update_ptol,1000)">UPDATE PTOL 1s</button>
<button onclick="testarg = 0; setInterval(function() {tabaltupdate();tabaltdisplaycycle(testarg);if (testarg==0) {testarg = 1} else {testarg = 0};},5000)">UPDATE TAB INFO 5s</button>
<button onclick="tabswitch();">SWITCHTAB</button>
-->
</div> <!-- end interactions container -->
<div style='display:none'>
<div>CURRENT: <span id='isobole_chart_current'></span></div>
<div>CURSOR: <span id='isobole_chart_description'></span></div>
<div><b>PTOL:</b><span id="ptol"></span></div>
</div>
<div class="card" id="parameters">
<div class="cardtitle">MODEL PARAMETERS</div>
<div class="cardcontents"><span id="modeldescription"></span></div>
</div>
</div><div id="xCards">
<div class="card" id="schemecopy">
<div class="cardtitle" id="schemecopytitle">SCHEME</div>
<div class="cardcontents" id="schemecopycontainer">
<div id="historywrapperCOPY">Waiting to start.