Widget:IMPROVEDDScore: Difference between revisions
Jump to navigation
Jump to search
Tarek Nafee (talk | contribs) No edit summary |
Tarek Nafee (talk | contribs) No edit summary |
||
Line 3: | Line 3: | ||
function calcScore(){ | function calcScore(){ | ||
var score = 0; | var score = 0; | ||
if(document.forms["IMPROVEDDScore"][" | if(document.forms["IMPROVEDDScore"]["DDinput1"].checked == 1){ | ||
score += 3; | score += 3; | ||
} | } | ||
if(document.forms["IMPROVEDDScore"][" | if(document.forms["IMPROVEDDScore"]["DDinput2"].checked == 1){ | ||
score += 2; | score += 2; | ||
} | } | ||
if(document.forms["IMPROVEDDScore"][" | if(document.forms["IMPROVEDDScore"]["DDinput3"].checked == 1){ | ||
score += 2; | score += 2; | ||
} | } | ||
if(document.forms["IMPROVEDDScore"][" | if(document.forms["IMPROVEDDScore"]["DDinput4"].checked == 1){ | ||
score += 2; | score += 2; | ||
} | } | ||
if(document.forms["IMPROVEDDScore"][" | if(document.forms["IMPROVEDDScore"]["DDinput5"].checked == 1){ | ||
score += 2; | |||
} | |||
if(document.forms["IMPROVEDDScore"]["DDinput6"].checked == 1){ | |||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["IMPROVEDDScore"][" | if(document.forms["IMPROVEDDScore"]["DDinput7"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms["IMPROVEDDScore"][" | if(document.forms["IMPROVEDDScore"]["DDinput8"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
document.forms["IMPROVEDDScore"][" | document.forms["IMPROVEDDScore"]["DDresult"].value = score; | ||
if(score == 0){document.forms["IMPROVEDDScore"][" | if(score == 0){document.forms["IMPROVEDDScore"]["DDlonganswer"].value = "0.4%";} | ||
if(score == 1){document.forms["IMPROVEDDScore"][" | if(score == 1){document.forms["IMPROVEDDScore"]["DDlonganswer"].value = "0.6%";} | ||
if(score == 2){document.forms["IMPROVEDDScore"][" | if(score == 2){document.forms["IMPROVEDDScore"]["DDlonganswer"].value = "0.8%";} | ||
} | } | ||
if(score == 3){document.forms["IMPROVEDDScore"][" | if(score == 3){document.forms["IMPROVEDDScore"]["DDlonganswer"].value = "1.2%";} | ||
} | } | ||
if(score == 4){document.forms["IMPROVEDDScore"][" | if(score == 4){document.forms["IMPROVEDDScore"]["DDlonganswer"].value = "1.6%";} | ||
} | } | ||
if(score >= 5){document.forms["IMPROVEDDScore"][" | if(score >= 5){document.forms["IMPROVEDDScore"]["DDlonganswer"].value = "2.2%";} | ||
} | } | ||
Line 43: | Line 46: | ||
<table> | <table> | ||
<tr><td>Prior episode of VTE </td><td><input type="checkbox" name=" | <tr><td>Prior episode of VTE </td><td><input type="checkbox" name="DDinput1" value="3.0" onchange="calcScore();" /></td></tr> | ||
<tr><td>Thrombophilia </td><td><input type="checkbox" name=" | <tr><td>Thrombophilia </td><td><input type="checkbox" name="DDinput2" value="2.0" onchange="calcScore();" /></td></tr> | ||
<tr><td>Paralysis of the lower extremity during the hospitalization</td><td><input type="checkbox" name=" | <tr><td>Paralysis of the lower extremity during the hospitalization</td><td><input type="checkbox" name="DDinput3" value="2.0" onchange="calcScore();" /></td></tr> | ||
<tr><td>Current malignancy</td><td><input type="checkbox" name=" | <tr><td>Current malignancy</td><td><input type="checkbox" name="DDinput4" value="2.0" onchange="calcScore();" /></td></tr> | ||
<tr><td>D-dimer >= 2x ULN</td><td><input type="checkbox" name=" | <tr><td>D-dimer >= 2x ULN</td><td><input type="checkbox" name="DDinput5" value="2.0" onchange="calcScore();" /></td></tr> | ||
<tr><td>Immobilization for at least 7 days</td><td><input type="checkbox" name=" | <tr><td>Immobilization for at least 7 days</td><td><input type="checkbox" name="DDinput6" value="1.0" onchange="calcScore();" /></td></tr> | ||
<tr><td>ICU or CCU admission</td><td><input type="checkbox" name=" | <tr><td>ICU or CCU admission</td><td><input type="checkbox" name="DDinput7" value="1.0" onchange="calcScore();" /></td></tr> | ||
<tr><td>Age more than 60 years</td><td><input type="checkbox" name=" | <tr><td>Age more than 60 years</td><td><input type="checkbox" name="DDinput8" value="1.0" onchange="calcScore();" /></td></tr> | ||
</table> | </table> | ||
Score: <input type="text" name=" | Score: <input type="text" name="DDresult" /><br /> | ||
<input type="text" size="60" name=" | <input type="text" size="60" name="DDlonganswer" /> | ||
</form> | </form> | ||
</includeonly> | </includeonly> |