Widget:Test: 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[" | if(document.forms["IMPROVEScore"]["input1"].checked == 1){ | ||
score += 2; | score += 2; | ||
} | } | ||
if(document.forms[" | if(document.forms["IMPROVEScore"]["input2"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms[" | if(document.forms["IMPROVEScore"]["input3"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms[" | if(document.forms["IMPROVEScore"]["input4"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms[" | if(document.forms["IMPROVEScore"]["input5"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms[" | if(document.forms["IMPROVEScore"]["input6"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms[" | if(document.forms["IMPROVEScore"]["input7"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms[" | if(document.forms["IMPROVEScore"]["input8"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms[" | if(document.forms["IMPROVEScore"]["input9"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms[" | if(document.forms["IMPROVEScore"]["input10"].checked == 1){ | ||
score -= 2; | score -= 2; | ||
} | } | ||
document.forms[" | document.forms["IMPROVEScore"]["result"].value = score; | ||
if(score == 0){document.forms[" | if(score == 0){document.forms["IMPROVEScore"]["longanswer"].value = "Low probability of DVT: Prevalence = 5%, Consider checking D-dimer";} | ||
if(score == 1 || score == 2){document.forms[" | if(score == 1 || score == 2){document.forms["IMPROVEScore"]["longanswer"].value = "Moderate probability of DVT: Prevalence = 17%, Consider checking D-dimer";} | ||
if(score >= 3){document.forms[" | if(score >= 3){document.forms["IMPROVEScore"]["longanswer"].value = "High probability of DVT: Prevalence = 53%, Consider imaging of the deep veins";} | ||
} | } | ||
</script> | </script> | ||
<form name=" | <form name="IMPROVEScore"> | ||
<table> | <table> |