-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaorta.html
363 lines (321 loc) · 13.2 KB
/
aorta.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
<!DOCTYPE html>
<HTML>
<Head>
<!-- defines the default zoom for mobile devices -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- highlight buttons and text input in yellow -->
<style>
input, textarea, select {
/* background: #f9f909; */
background: #f7fc8a;
color: black;
cursor: default;
}
</style>
<!-- https://www.w3schools.com/howto/howto_js_collapsible.asp -->
<style>
.content {
display: none;
}
</style>
<!-- when clicking on an named anchor, highlight the hyperlinked text -->
<style>
/* https://css-tricks.com/on-target/ */
:target {
background: yellow;
}
</style>
<!-- https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation -->
<style>
input:invalid {
border: 2px dashed red;
}
input:valid {
border: 2px solid darkgreen;
}
</style>
<!-- https://github.com/KaTeX/KaTeX/blob/master/README.md -->
<!-- https://sixthform.info/katex/guide.html -->
<!-- https://github.com/KaTeX/KaTeX/tree/master/contrib/copy-tex -->
<!--
<script src="copy-tex.js">
<link rel="stylesheet" href="copy-tex.css">
</script>
-->
<!-- https://github.com/KaTeX/KaTeX/releases/tag/v0.12.0 -->
<link rel="stylesheet" href="katex/katex.min.css">
<script src="katex/katex.min.js"></script>
<!-- https://sixthform.info/katex/smrender.js -->
<script src="smrender.js"></script>
</Head>
<BODY>
<H3 align="center">Cardiology Reference Equations and Calculator</h3>
<P> </P>
<a href="index.html">Back to Main Page</a>
<P> </P>
<P>
<fieldset>
<legend>
<a name="f1">
Formula: a + b = c
</a>
</legend>
<P>see formula 4 on page 3 in <a href="">link to paper</a></P>
<!-- from https://jsfiddle.net/davidThomas/wxhU9/4/ -->
<input type="text" id="calc1_eq1_var1" name="calc1_eq1_var1" size="4" required pattern="\d+" minlength="1" maxlength="3"/>
+
<input type="text" id="calc1_eq1_var2" name="calc1_eq1_var2" size="4" required pattern="\d+" minlength="1" maxlength="3"/>
=
<span id="calc1_result1" name="calc1_r1"></span>
<P>
<input type="button" value="calculate" onclick="calc1()" />
</P>
<button type="button" class="collapsible">Show Javascript used in calculation</button>
<div class="content">
<div id="form1"></div>
</div>
</fieldset>
</P>
<hr>
<P>
<fieldset>
<legend>
<a name="f2">Formula:</a>
<span id="mykatex2">...</span>
<script>
katex.render("g(x) = e^x + 34", mykatex2);
</script>
</legend>
<table>
<tr>
<td></td>
<td><input type="text" id="calc2_eq1_var1" name="calc2_eq1_var1" size="4" required/></td>
<td></td>
<td></td>
</tr>
<tr>
<td>e</td>
<td></td>
<td>+34 =</td>
<td><span id="calc2_result1" name="calc2_r1"></span></td>
</tr>
</table>
<P>
<input type="button" value="calculate" onclick="calc2()" />
</P>
<P>
<button type="button" class="collapsible">Show Javascript used in calculation</button>
<div class="content" style="display: none;">
<div id="form2"></div>
</div>
</fieldset>
or
<fieldset>
exp(<input type="text" id="calc2_eq1_var1" name="calc2_eq1_var1" size="4" required/>)+34 =
<span id="calc2_result1" name="calc2_r1"></span>
<P>
<input type="button" value="calculate" onclick="calc2()" />
</fieldset>
<hr>
<fieldset>
<legend>
<a name="f3">
Formula
</a>
<!-- https://sixthform.info/katex/guide.html -->
<span id="mykatex1">...</span>
<script>
katex.render("P(x_1, x_2, x_3) = \\frac{1}{1 + (\\exp{(3.22 - 0.334\\ x_1 - 4.06\\ x_2 + 0.708\\ x_3)})}", mykatex1);
</script>
</legend>
<P>
Logistic regression equation from <BR><a href="https://pubmed.ncbi.nlm.nih.gov/9468074/">Development and validation of an echocardiographic model for predicting progression of discrete subaortic stenosis in children</a> (1998)
</p>
<table border=0>
<tr>
<td align="center">1 <hr></td>
<td rowspan="2"> = <span id="calc3_result1" name="calc3_r1"></span></td>
</tr>
<tr>
<td>1 + exp(3.22
- (0.334 * <input type="text" id="calc3_eq1_var1" name="calc3_eq1_var1" size="4" required/>)
- (4.06 * <input type="text" id="calc3_eq1_var2" name="calc3_eq1_var2" size="4" required/>)
+ (0.708 * <input type="text" id="calc3_eq1_var3" name="calc3_eq1_var3" size="4" required/>)
)</td>
</tr>
</table>
<P>
<input type="button" value="calculate" onclick="calc3()" />
</fieldset>
<hr>
<fieldset>
<legend>
<a name="f4">
Formula
</a>
<span id="mykatex3">...</span>
<script>
katex.render("k = \\frac{a+b}{x^4}", mykatex3);
</script>
</legend>
<P>
From a research paper
</P>
<table border=0>
<tr>
<td colspan=2><input type="text" id="calc4_eq1_var1" name="calc4_eq1_var1" size="4" required/> +
<input type="text" id="calc4_eq1_var2" name="calc4_eq1_var2" size="4" required/>
<hr></td>
<td rowspan="3"> = <span id="calc4_result1" name="calc4_r1"></span></td>
</tr>
<tr>
<td> </td>
<td>4</td>
</tr>
<tr>
<td align="right"><input type="text" id="calc4_eq1_var3" name="calc4_eq1_var3" size="4" required/></td>
<td> </td>
</tr>
</table>
</fieldset>
<hr>
<P align="center">
Contact us with <a href="mailto:cardioref@gmail.com">feedback, questions, suggestions</a>
</P>
<P> </P>
<P align="center">
Licensed under <a href="https://creativecommons.org/licenses/by-nc/4.0/">Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)</a>
</P>
<P> </P>
<H3 align="Center">Disclaimer of liability</H3>
<P style="font-size:75%;">
Cardiology Reference Calculator ("Cardiology Reference Calculator," "CardioRef," "we," or "us") provides certain medical related software and solutions and systems ("systems"). Our systems are used by healthcare professionals as a training tool to acquire, retain, and enhance their procedural skills.
</P>
<P style="font-size:75%;">
By licensing, viewing, using and/or accessing the system, you acknowledge and agree that the systems provided by CardioRef are
</P>
<P style="font-size:75%;">
(i) specific educational and medical training products and tools <BR>
(ii) not certified as a medical device; <BR>
(iii) not intended for any clinical or diagnostic use and <BR>
(iv) intended to be used solely for non-commercial, medical training and performance improvement purposes. <BR>
You further acknowledge and agree that at all times you will use and access the system <BR>
(x) solely in connection with such medical training and performance improvement purposes; <BR>
(xi) in compliance will all applicable laws and regulations; and <BR>
(xii) in accordance with any user documentation, instruction manuals, guides and/or requirements we provide to you. You that at no time shall any system be used to <BR>
(xii) diagnose, treat or cure a human being’s condition or in a life-saving situation; <BR>
(xiii) support professional medical decisions, diagnosis or treatments, or <BR>
(ix) replace any diagnosis, recommendation, advice, treatment or decision by an appropriately trained and licensed physician. Use of the system with real subjects could cause serious injury or death.
</P>
<P>
<I><B>Disclaimers</B></I>
</P>
<P style="font-size:75%;">
CardioRef makes no representations or warranties and shall not be responsible for the competency of any person who may receive educational information and/or medical training provided through or based on the system or for the exercise of his or her skills by such person after completion of any training, courses or curriculum using the system. Supplier does not guarantee that any person receiving educational information and/or medical training from the system will achieve any particular skill level or the necessary proficiency to qualify for any license, certificates or ratings issued by any regulatory agency or government authority.
</P>
<P style="font-size:75%;">
CardioRef makes no representation or warranties that the system and the medical information and training provided on the system: <BR>
(a) will be constantly available, or available at all; or <BR>
(b) is error-free, complete, true, accurate, up to date and/or non-misleading. Your use of the system is with full knowledge and awareness that you waive any claim you may have against CardioRef for reliance on any information or training presented through the system.
</P>
<P>
<I><B>Limitations on liability</B></I>
</P>
<P style="font-size:75%;">
In no event will CardioRef be liable for any personal injury loss of use, loss of profit, interruption of business, or any indirect, special, incidental, punitive or consequential damages of any kind (including lost profits), regardless of the form of action, whether in contract, tort (including negligence), strict product liability, or otherwise, even if CardioRef has been advised or should have been aware of the possibility of such damages. In no event will CardioRef’s liability to you for any claim, whether in contract, tort or any other theory of liability, exceed the purchase price of the system paid by you.
</P>
<P style="font-size:75%;">
It is further understood that CardioRef shall also have no liability whatsoever concerning damages arising out of or relating to unauthorized access, use and/or alteration or destruction, by any third party, including any users, of the system or any data contained thereon or created by the system or your computer system.
</P>
<P style="font-size:75%;">
This policy is subject to continuous changes. Updated versions will be authorized when available on this website.
</P>
<script>
function calc1() {
var textType = Node.textContent ? 'textContent' : 'innerText'; // condition ? if-true : if-false
console.log(textType);
result = document.getElementById('calc1_result1');
num1 = parseFloat(document.getElementById('calc1_eq1_var1').value);
if (isNaN(num1)) {
result[textType] = "input for first field should be numeric";
return result;
} else if (num1 < 1){
result[textType] = "input for first field should greater than 1";
return result;
} else if (num1 > 10){
result[textType] = "input for first field should less than 10";
return result;
}
num2 = parseFloat(document.getElementById('calc1_eq1_var2').value);
if (isNaN(num2) || num2 < 1 || num2 > 10 || ! Number.isInteger(num2)) {
result[textType] = "input for second field is invalid";
return result;
}
result[textType] = num1 + num2;
}
function calc2() {
var textType = Node.textContent ? 'textContent' : 'innerText'; // condition ? if-true : if-false
console.log(textType);
result = document.getElementById('calc2_result1');
num1 = parseFloat(document.getElementById('calc2_eq1_var1').value);
if (isNaN(num1)) {
result[textType] = "input for first field should be numeric";
return result;
} else if (num1 < 1){
result[textType] = "input for first field should greater than 1";
return result;
} else if (num1 > 10){
result[textType] = "input for first field should less than 10";
return result;
}
result[textType] = Math.exp(num1) + 34;
}
function calc3() {
var textType = Node.textContent ? 'textContent' : 'innerText'; // condition ? if-true : if-false
console.log(textType);
result = document.getElementById('calc3_result1');
num1 = parseFloat(document.getElementById('calc3_eq1_var1').value);
num2 = parseFloat(document.getElementById('calc3_eq1_var2').value);
num3 = parseFloat(document.getElementById('calc3_eq1_var3').value);
if (isNaN(num1)) {
result[textType] = "input for first field should be numeric";
return result;
} else if (num1 < 1){
result[textType] = "input for first field should greater than 1";
return result;
} else if (num1 > 10){
result[textType] = "input for first field should less than 10";
return result;
}
result[textType] = 1 / (1 + Math.exp(3.22 - 0.334*num1 - 4.06*num2 + 0.708*num3));
}
</script>
<script>
// https://www.w3schools.com/howto/howto_js_collapsible.asp
var coll = document.getElementsByClassName("collapsible");
console.log(coll);
var i;
for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
var content = this.nextElementSibling;
if (content.style.display === "block") {
content.style.display = "none";
} else {
content.style.display = "block";
}
});
}
</script>
<script>
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString
//console.log(calc1.toString());
// https://stackoverflow.com/questions/807878/how-to-make-javascript-execute-after-page-load
window.addEventListener("load", function(){
// https://www.geeksforgeeks.org/how-to-append-data-to-div-element-using-javascript/
document.getElementById("form1").innerText += calc1.toString();
document.getElementById("form2").innerText += calc2.toString();
});
</script>
</BODY>
</HTML>