Widget:Test: Difference between revisions

Jump to navigation Jump to search
Mehdi Pahlavani (talk | contribs)
No edit summary
Mehdi Pahlavani (talk | contribs)
No edit summary
Line 3: Line 3:
function calcScore(){
function calcScore(){
var score = 0;
var score = 0;
if(document.forms["DVTCalc"]["input1"].checked == 1){
if(document.forms["IMPROVEScore"]["input1"].checked == 1){
score += 2;
score += 2;
}
}


if(document.forms["DVTCalc"]["input2"].checked == 1){
if(document.forms["IMPROVEScore"]["input2"].checked == 1){
score += 1;
score += 1;
}
}
if(document.forms["DVTCalc"]["input3"].checked == 1){
if(document.forms["IMPROVEScore"]["input3"].checked == 1){
score += 1;
score += 1;
}
}
if(document.forms["DVTCalc"]["input4"].checked == 1){
if(document.forms["IMPROVEScore"]["input4"].checked == 1){
score += 1;
score += 1;
}
}
if(document.forms["DVTCalc"]["input5"].checked == 1){
if(document.forms["IMPROVEScore"]["input5"].checked == 1){
score += 1;
score += 1;
}
}
if(document.forms["DVTCalc"]["input6"].checked == 1){
if(document.forms["IMPROVEScore"]["input6"].checked == 1){
score += 1;
score += 1;
}
}
if(document.forms["DVTCalc"]["input7"].checked == 1){
if(document.forms["IMPROVEScore"]["input7"].checked == 1){
score += 1;
score += 1;
}
}
if(document.forms["DVTCalc"]["input8"].checked == 1){
if(document.forms["IMPROVEScore"]["input8"].checked == 1){
score += 1;
score += 1;
}
}
if(document.forms["DVTCalc"]["input9"].checked == 1){
if(document.forms["IMPROVEScore"]["input9"].checked == 1){
score += 1;
score += 1;
}
}


if(document.forms["DVTCalc"]["input10"].checked == 1){
if(document.forms["IMPROVEScore"]["input10"].checked == 1){
score -= 2;
score -= 2;
}
}


document.forms["DVTCalc"]["result"].value = score;
document.forms["IMPROVEScore"]["result"].value = score;
if(score == 0){document.forms["DVTCalc"]["longanswer"].value = "Low probability of DVT: Prevalence = 5%, Consider checking D-dimer";}
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["DVTCalc"]["longanswer"].value = "Moderate probability of DVT: Prevalence = 17%, Consider checking D-dimer";}
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["DVTCalc"]["longanswer"].value = "High probability of DVT: Prevalence = 53%, Consider imaging of the deep veins";}
if(score >= 3){document.forms["IMPROVEScore"]["longanswer"].value = "High probability of DVT: Prevalence = 53%, Consider imaging of the deep veins";}
}
}
</script>
</script>


<form name="DVTCalc">
<form name="IMPROVEScore">


<table>
<table>

Revision as of 15:13, 13 October 2017