Widget:CapCal: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["CapCalc "]["input2"].checked == 1){ | if(document.forms["CapCalc"]["input2"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["CapCalc "]["input3"].checked == 1){ | if(document.forms["CapCalc"]["input3"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["CapCalc "]["input4"].checked == 1){ | if(document.forms["CapCalc"]["input4"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["CapCalc "]["input5"].checked == 1){ | if(document.forms["CapCalc"]["input5"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["CapCalc "]["input6"].checked == 1){ | if(document.forms["CapCalc"]["input6"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["CapCalc "]["input7"].checked == 1){ | if(document.forms["CapCalc"]["input7"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["CapCalc "]["input8"].checked == 1){ | if(document.forms["CapCalc"]["input8"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["CapCalc "]["input9"].checked == 1){ | if(document.forms["CapCalc"]["input9"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["CapCalc "]["input10"].checked == 1){ | if(document.forms["CapCalc"]["input10"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["CapCalc "]["input11"].checked == 1){ | if(document.forms["CapCalc"]["input11"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["CapCalc "]["input12"].checked == 1){ | if(document.forms["CapCalc"]["input12"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["CapCalc "]["input13"].checked == 1){ | if(document.forms["CapCalc"]["input13"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["CapCalc "]["input14"].checked == 1){ | if(document.forms["CapCalc"]["input14"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["CapCalc "]["input15"].checked == 1){ | if(document.forms["CapCalc"]["input15"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["CapCalc "]["input16"].checked == 1){ | if(document.forms["CapCalc"]["input16"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["CapCalc "]["input17"].checked == 1){ | if(document.forms["CapCalc"]["input17"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
document.forms["CapCalc"]["result"].value = score; | document.forms["CapCalc"]["result"].value = score; | ||
if(score <2 ){document.forms["CapCalc "]["longanswer"].value = "Low risk of VTE";} | if(score <2 ){document.forms["CapCalc"]["longanswer"].value = "Low risk of VTE";} | ||
if(score == 2 || score == 2){document.forms["CapCalc "]["longanswer"].value = "Moderate risk of VTE ";} | if(score == 2 || score == 2){document.forms["CapCalc"]["longanswer"].value = "Moderate risk of VTE ";} | ||
if(score ==3){document.forms["CapCalc "]["longanswer"].value = "High risk of VTE";} | if(score ==3){document.forms["CapCalc"]["longanswer"].value = "High risk of VTE";} | ||
if(score ==4){document.forms["CapCalc "]["longanswer"].value = "High risk of VTE";} | if(score ==4){document.forms["CapCalc"]["longanswer"].value = "High risk of VTE";} | ||
if(score >=5){document.forms["CapCalc "]["longanswer"].value = "Highest risk of VTE";} | if(score >=5){document.forms["CapCalc"]["longanswer"].value = "Highest risk of VTE";} | ||
} | } | ||
</script> | </script> | ||
<form name=" CapCalc"> | <form name="CapCalc"> | ||
<table> | <table> | ||
<tr><td>Age 41-60 years </td><td><input type="checkbox" name="input1" value="1.0" onchange="calcScore();" /></td></tr> | <tr><td>Age 41-60 years </td><td><input type="checkbox" name="input1" value="1.0" onchange="calcScore();" /></td></tr> |