Widget:DASH score: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
function calcScore(){ | function calcScore(){ | ||
var score = 0; | var score = 0; | ||
if(document.forms["DASH_score"]["input1"].checked == 1){score += 2;} | if(document.forms["DASH_score"]["input1"].checked == 1){score += 2.0;} | ||
if(document.forms["DASH_SCORE"]["input2"].checked == 1){score += 1;} | if(document.forms["DASH_SCORE"]["input2"].checked == 1){score += 1.0;} | ||
if(document.forms["DASH_SCORE"]["input3"].checked == 1){score += 1;} | if(document.forms["DASH_SCORE"]["input3"].checked == 1){score += 1.0;} | ||
if(document.forms["DASH_SCORE"]["input4"].checked == 1){score -= 2;} | if(document.forms["DASH_SCORE"]["input4"].checked == 1){score -= 2.0;} | ||
document.forms["DASH_SCORE"]["result"].value = score; | document.forms["DASH_SCORE"]["result"].value = score; | ||
if(score == -2){document.forms["DASH_SCORE"]["longanswer"].value = "Annualized VTE Recurrence Rate is 1.8%";} | if(score == -2.0){document.forms["DASH_SCORE"]["longanswer"].value = "Annualized VTE Recurrence Rate is 1.8%";} | ||
if(score == -1){document.forms["DASH_SCORE"]["longanswer"].value = "Annualized VTE Recurrence Rate is 1.0%";} | if(score == -1.0){document.forms["DASH_SCORE"]["longanswer"].value = "Annualized VTE Recurrence Rate is 1.0%";} | ||
if(score == 0){document.forms["DASH_SCORE"]["longanswer"].value = "Annualized VTE Recurrence Rate is 2.4%";} | if(score == 0){document.forms["DASH_SCORE"]["longanswer"].value = "Annualized VTE Recurrence Rate is 2.4%";} | ||
if(score == 1){document.forms["DASH_SCORE"]["longanswer"].value = "Annualized VTE Recurrence Rate is 3.9%";} | if(score == 1.0){document.forms["DASH_SCORE"]["longanswer"].value = "Annualized VTE Recurrence Rate is 3.9%";} | ||
if(score == 2){document.forms["DASH_SCORE"]["longanswer"].value = "Annualized VTE Recurrence Rate is 6.3%";} | if(score == 2.0){document.forms["DASH_SCORE"]["longanswer"].value = "Annualized VTE Recurrence Rate is 6.3%";} | ||
if(score == 3){document.forms["DASH_SCORE"]["longanswer"].value = "Annualized VTE Recurrence Rate is 10.8%";} | if(score == 3.0){document.forms["DASH_SCORE"]["longanswer"].value = "Annualized VTE Recurrence Rate is 10.8%";} | ||
if(score == 4){document.forms["DASH_SCORE"]["longanswer"].value = "Annualized VTE Recurrence Rate is 19.9%";} | if(score == 4.0){document.forms["DASH_SCORE"]["longanswer"].value = "Annualized VTE Recurrence Rate is 19.9%";} | ||
} | } | ||
</script> | </script> |