Widget:Atria: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Undo revision 1491783 by Saeedeh Kowsarnia (talk) Tag: Undo |
||
Line 4: | Line 4: | ||
function calcScore(){ | function calcScore(){ | ||
var score = 0; | var score = 0; | ||
if(document.forms[" | if(document.forms["ATRIA"]["input1"].checked == 1){ | ||
score += | score += 3; | ||
} | } | ||
if(document.forms[" | if(document.forms["ATRIA"]["input2"].checked == 1){ | ||
score += | score += 3; | ||
} | } | ||
if(document.forms[" | if(document.forms["ATRIA"]["input3"].checked == 1){ | ||
score += | score += 2; | ||
} | } | ||
if(document.forms[" | if(document.forms["ATRIA"]["input4"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms[" | if(document.forms["ATRIA"]["input5"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
document.forms[" | document.forms["ATRIA"]["result"].value = score; | ||
if(score == 0 | if(score == 0){document.forms["ATRIA"]["longanswer"].value = "Predicted bleeding risk through a year is < 1%";} | ||
if(score == | if(score == 1){document.forms["ATRIA"]["longanswer"].value = "Predicted bleeding risk through a year is < 1%";} | ||
if(score == | if(score == 2){document.forms["ATRIA"]["longanswer"].value = "Predicted bleeding risk through a year is < 1%";} | ||
if(score == | if(score == 3){document.forms["ATRIA"]["longanswer"].value = "Predicted bleeding risk through a year is < 1%";} | ||
if(score == 4){document.forms["ATRIA"]["longanswer"].value = "Predicted bleeding risk through a year is 2-3%";} | |||
if(score >= 5 && score <= 10){document.forms["ATRIA"]["longanswer"].value = "Predicted bleeding risk through a year is > 5%";} | |||
} | } | ||
</script> | </script> | ||
<form name=" | <form name="ATRIA"> | ||
<table> | <table> | ||
<tr><td> | <tr><td>Anemia</td><td><input type="checkbox" name="input1" value="3.0" onchange="calcScore();" /></td></tr> | ||
<tr><td> | <tr><td>Severe renal dysfunction</td><td><input type="checkbox" name="input2" value="3.0" onchange="calcScore();" /></td></tr> | ||
<tr><td> | <tr><td>Age ≥ 75</td><td><input type="checkbox" name="input3" value="2.0" onchange="calcScore();" /></td></tr> | ||
<tr><td> | <tr><td>Prior episodes of hemorrhage</td><td><input type="checkbox" name="input4" value="1.0" onchange="calcScore();" /></td></tr> | ||
<tr><td> | <tr><td>Diagnosed hypertension</td><td><input type="checkbox" name="input5" value="1.0" onchange="calcScore();" /></td></tr> | ||
</table> | </table> | ||
Score: <input type="text" name="result" /><br /> | Score: <input type="text" name="result" /><br /> |