Widget:PE calculator: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>
<includeonly>
<script type="text/javascript">
<form name="preoprisk">
function calcScore(){
<div id="step1">
var score = 0;
Need for emergency noncardiac surgery?<br />
if(document.forms["PECalc"]["input1"].checked == 1){
<input type="checkbox" id="yes1" />
score += 1.5;
<input type="checkbox" id="no1" /><br />
}
</div>
if(document.forms["PECalc"]["input2"].checked == 1){
<div id="ans1">
score += 1.5;
What're you doing!? Go fix the problem!
}
</div>
if(document.forms["PECalc"]["input3"].checked == 1){
<div id="step2">
score += 1;
Active Cardiac Conditions?<br />
}
<input type="checkbox" id="yes2" />
if(document.forms["PECalc"]["input4"].checked == 1){
<input type="checkbox" id="no2" /><br />
score += 1;
</div>
}
<div id="ans2">
if(document.forms["PECalc"]["input5"].checked == 1){
Evaluate and Treat per guidelines
score += 1.5;
</div>
}
<div id="step3">
if(document.forms["PECalc"]["input6"].checked == 1){
Active Cardiac Conditions?<br />
score += 3;
<input type="checkbox" id="yes3" />
}
<input type="checkbox" id="no3" /><br />
if(document.forms["PECalc"]["input7"].checked == 1){
</div>
score += 3;
<div id="ans3">
}
You may proceed.
document.forms["PECalc"]["result"].value = score;
</div>
if(score < 2){document.forms["PECalc"]["longanswer"].value = "Low probability of PE: Consider checking D-dimer";}
<div id="step4">
if(score >= 2 && score <= 6){document.forms["PECalc"]["longanswer"].value = "Moderate probability of PE: Consider checking D-dimer";}
Functional capacity >= 4 METs Without Symptoms<br />
if(score > 6){document.forms["PECalc"]["longanswer"].value = "High probability of PE: Consider imaging of the pulmonary arteries";}
<input type="checkbox" id="yes3" />
}
<input type="checkbox" id="no3" /><br />
</script>
</div>
<form name="PECalc">
<div id="ans4">
<table>
You may proceed.
<tr><td>Clinically suspected DVT (leg swelling, pain with palpation) </td><td><input type="checkbox" name="input6" value="3.0" onchange="calcScore();" /></td></tr>
</div>
<tr><td>Alternative diagnosis is less likely than PE </td><td><input type="checkbox" name="input7" value="3.0" onchange="calcScore();" /></td></tr>
<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="text" size="60" name="longanswer" />
</form>
</form>
</includeonly>
</includeonly>

Revision as of 14:14, 23 May 2012