Sandbox: testwidget: Difference between revisions

Jump to navigation Jump to search
(Created page with "<includeonly> <script type="text/javascript"> function calcScore(){ var score = 0; if(document.forms["DVTCalc"]["input1"].checked == 1){ score += 1; } if(document.forms["DVTC...")
 
(Replaced content with "{{#widget: test}}")
 
Line 1: Line 1:
<includeonly>
{{#widget: test}}
<script type="text/javascript">
function calcScore(){
var score = 0;
if(document.forms["DVTCalc"]["input1"].checked == 1){
score += 1;
}
 
if(document.forms["DVTCalc"]["input2"].checked == 1){
score += 1;
}
if(document.forms["DVTCalc"]["input3"].checked == 1){
score += 1;
}
if(document.forms["DVTCalc"]["input4"].checked == 1){
score += 1;
}
if(document.forms["DVTCalc"]["input5"].checked == 1){
score += 1;
}
if(document.forms["DVTCalc"]["input6"].checked == 1){
score += 1;
}
if(document.forms["DVTCalc"]["input7"].checked == 1){
score += 1;
}
if(document.forms["DVTCalc"]["input8"].checked == 1){
score += 1;
}
if(document.forms["DVTCalc"]["input9"].checked == 1){
score += 1;
}
 
if(document.forms["DVTCalc"]["input10"].checked == 1){
score -= 2;
}
 
document.forms["DVTCalc"]["result"].value = score;
if(score == 0){document.forms["DVTCalc"]["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 >= 3){document.forms["DVTCalc"]["longanswer"].value = "High probability of DVT: Prevalence = 53%, Consider imaging of the deep veins";}
}
</script>
 
<form name="DVTCalc">
 
<table>
 
<tr><td>Active cancer (treatment within last 6 months or palliative) </td><td><input type="checkbox" name="input1" value="1.0" onchange="calcScore();" /></td></tr>
<tr><td>Calf swelling >3 cm compared to other calf (measured 10 cm below tibial tuberosity) </td><td><input type="checkbox" name="input2" value="1.0" onchange="calcScore();" /></td></tr>
<tr><td>Collateral superficial veins (non-varicose) </td><td><input type="checkbox" name="input3" value="1.0" onchange="calcScore();" /></td></tr>
<tr><td>Pitting edema (confined to symptomatic leg) </td><td><input type="checkbox" name="input4" value="1.0" onchange="calcScore();" /></td></tr>
 
<tr><td>Swelling of entire leg </td><td><input type="checkbox" name="input5" value="1.0" onchange="calcScore();" /></td></tr>
 
<tr><td>Localized pain along distribution of deep venous system </td><td><input type="checkbox" name="input6" value="1.0"  onchange="calcScore();" /></td></tr>
 
<tr><td>Paralysis, paresis, or recent cast immobilization of lower extremities </td><td><input type="checkbox" name="input7" value="1.0" onchange="calcScore();" /></td></tr>
<tr><td>Recently bedridden > 3 days, or major surgery requiring regional or general anesthetic in past 12 weeks </td><td><input type="checkbox" name="input8" value="1.0" onchange="calcScore();" /></td></tr>
<tr><td>Previously documented DVT </td><td><input type="checkbox" name="input9" value="1.0" onchange="calcScore();" /></td></tr>
<tr><td>Alternative diagnosis at least as likely </td><td><input type="checkbox" name="input10" value="- 2.0" onchange="calcScore();" /></td></tr>
 
</table>
 
Score: <input type="text" name="result" /><br />
 
<input type="text" size="80" name="longanswer" />
 
</form>
 
</includeonly>

Latest revision as of 14:48, 13 October 2017

Prior episode of VTE
Thrombophilia
Paralysis of the lower extremity during the hospitalization
Current malignancy
Immobilization for at least 7 days
ICU or CCU admission
Age more than 60 years
Score: