Widget:PE calculator: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
function | function calcScore(){ | ||
document. | var score = 0; | ||
document. | if(document.forms["PECalc"]["input1"].checked == 1){ | ||
document. | score += 1.5; | ||
document. | } | ||
document. | if(document.forms["PECalc"]["input2"].checked == 1){ | ||
document. | score += 1.5; | ||
document. | } | ||
if(document.forms["PECalc"]["input3"].checked == 1){ | |||
score += 1; | |||
} | |||
if(document.forms["PECalc"]["input4"].checked == 1){ | |||
score += 1; | |||
} | |||
if(document.forms["PECalc"]["input5"].checked == 1){ | |||
score += 1.5; | |||
} | |||
if(document.forms["PECalc"]["input6"].checked == 1){ | |||
score += 3; | |||
} | |||
if(document.forms["PECalc"]["input7"].checked == 1){ | |||
score += 3; | |||
} | |||
document.forms["PECalc"]["result"].value = score; | |||
if(score < 2){document.forms["PECalc"]["longanswer"].value = "Low probability of PE: Consider checking D-dimer";} | |||
if(score >= 2 && score <= 6){document.forms["PECalc"]["longanswer"].value = "Moderate probability of PE: Consider checking D-dimer";} | |||
if(score > 6){document.forms["PECalc"]["longanswer"].value = "High probability of PE: Consider imaging of the pulmonary arteries";} | |||
} | } | ||
</script> | </script> | ||
<form name=" | <form name="PECalc"> | ||
< | <table> | ||
<tr><td>Clinically suspected DVT (leg swelling, pain with palpation) </td><td><input type="checkbox" name="input6" value="3.0" onchange="calcScore();" /></td></tr> | |||
<input type="checkbox" | <tr><td>Alternative diagnosis is less likely than PE </td><td><input type="checkbox" name="input7" value="3.0" onchange="calcScore();" /></td></tr> | ||
<input type="checkbox" | <tr><td>Immobilization/surgery in previous four weeks </td><td><input type="checkbox" name="input1" value="1.5" onchange="calcScore();" /></td></tr> | ||
</ | <tr><td>Previous history of DVT or PE </td><td><input type="checkbox" name="input2" value="1.5" onchange="calcScore();" /></td></tr> | ||
< | <tr><td>Tachycardia (heart rate more than 100 bpm) </td><td><input type="checkbox" name="input5" value="1.5" onchange="calcScore();" /></td></tr> | ||
<tr><td>Hemoptysis </td><td><input type="checkbox" name="input4" value="1.0" onchange="calcScore();" /></td></tr> | |||
</ | <tr><td>Malignancy (treatment for within 6 months, palliative)</td><td><input type="checkbox" name="input3" value="1.0" onchange="calcScore();" /></td></tr> | ||
< | </table> | ||
Score: <input type="text" name="result" /><br /> | |||
<input type="checkbox" | <input type="text" size="60" name="longanswer" /> | ||
<input type="checkbox" | |||
</ | |||
< | |||
< | |||
< | |||
<input type="checkbox" | |||
<input type="checkbox" | |||
</ | |||
< | |||
< | |||
< | |||
<input type="checkbox" | |||
<input type=" | |||
< | |||
</form> | </form> | ||
</includeonly> | </includeonly> |