Widget:Tygerberg score: 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["PECalc"]["input1"].checked == 1){ score += 1; } if(document.forms["PECalc...")
 
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:
function calcScore(){
function calcScore(){
var score = 0;
var score = 0;
if(document.forms["PECalc"]["input1"].checked == 1){
if(document.forms["Tygerberg_score"]["input1"].checked == 1){score += 3;}
score += 1;
if(document.forms["Tygerberg_score"]["input2"].checked == 1){score += 3;}
}
if(document.forms["Tygerberg_score"]["input3"].checked == 1){score += 2;}
if(document.forms["PECalc"]["input2"].checked == 1){
if(document.forms["Tygerberg_score"]["input4"].checked == 1){score += 1;}
score += 1;
if(document.forms["Tygerberg_score"]["input5"].checked == 1){score += 1;}
}
document.forms["Tygerberg_score"]["result"].value = score;
if(document.forms["PECalc"]["input3"].checked == 1){
if(score < 6){document.forms["Tygerberg_score"]["longanswer"].value = "Check other causes of pericarditis rather than tuberculosis";}
score += 2;
if(score >= 6){document.forms["Tygerberg_score"]["longanswer"].value = "Highly suggestive that tuberculosis is the cause of the pericarditis ";}
}
if(document.forms["PECalc"]["input4"].checked == 1){
score += 3;
}
if(document.forms["PECalc"]["input5"].checked == 1){
score += 3;
}
document.forms["PECalc"]["result"].value = score;
}
}
</script>
</script>
<form name="PECalc">
<form name="Tygerberg_score">
<table>
<table>
<tr><td>[[Weight loss]]</td><td><input type="checkbox" name="input1" value="1.0" onchange="calcScore();" /></td></tr>
<tbody style="border: 0; float: left; position: float; background: #104E8B; border-radius: 10px 10px 10px 10px; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5); margin: 0 0 0 0; padding: 5px 5px; font-weight: bold;">
<tr><td>[[Night sweats]]</td><td><input type="checkbox" name="input2" value="1.0" onchange="calcScore();" /></td></tr>
<tr>
<tr><td>[[Fever]]</td><td><input type="checkbox" name="input3" value="2.0" onchange="calcScore();" /></td></tr>
<td style="text-align: center;" colspan="3"><span style="color: #ffffff;"><strong>Tygerberg Score Calculator</strong></span></td>
<tr><td>Serum globulin &gt;40 g/l</td><td><input type="checkbox" name="input4" value="3.0" onchange="calcScore();" /></td></tr>
</tr>
<tr><td>[[Blood leukocyte count]] &lt;10 &times; 10<sup>9</sup>/l</td><td><input type="checkbox" name="input5" value="3.0" onchange="calcScore();" /></td></tr>
<tr>
<td style="color: #4479ba; background: #ffffff; padding: 2px 10px; border-radius: 5px; text-shadow: rgba(0, 0, 0, 0.5) 0px 0px 0px; box-shadow: rgba(0, 0, 0, 0.5) 0px 1px 1px;"><strong>Variable</strong></td>
<td colspan="2" style="color: #4479ba; background: #ffffff; padding: 2px 10px; border-radius: 5px; text-shadow: rgba(0, 0, 0, 0.5) 0px 0px 0px; box-shadow: rgba(0, 0, 0, 0.5) 0px 1px 1px; text-align: center;"><strong>Score</strong></td>
</tr>
<tr>
<td style="text-align: left; color: #ffffff; background: #4479BA; padding: 2px 10px; border-radius: 5px 5px 5px 5px; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);">Blood leukocyte count <10 × 10^9/L</td>
<td style="color: #ffffff; background: #4479ba; padding: 2px 10px; border-radius: 5px; text-shadow: rgba(0, 0, 0, 0.5) 0px -1px 0px; box-shadow: rgba(0, 0, 0, 0.5) 0px 1px 1px; text-align: center;"><strong>3</strong></td>
<td style="text-align: center; color: #ffffff; background: #4479BA; padding: 2px 10px; border-radius: 5px 5px 5px 5px; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);"><input style="top: 4px; width: 24px; height: 24px;" name="input1" type="checkbox" value="3.0" onchange="calcScore();" /></td>
</tr>
<tr>
<td style="text-align: left; color: #ffffff; background: #4479BA; padding: 2px 10px; border-radius: 5px 5px 5px 5px; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);">Serum globulin >40 g/l</td>
<td style="color: #ffffff; background: #4479ba; padding: 2px 10px; border-radius: 5px; text-shadow: rgba(0, 0, 0, 0.5) 0px -1px 0px; box-shadow: rgba(0, 0, 0, 0.5) 0px 1px 1px; text-align: center;"><strong>3</strong></td>
<td style="text-align: center; color: #ffffff; background: #4479BA; padding: 2px 10px; border-radius: 5px 5px 5px 5px; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);"><input style="top: 4px; width: 24px; height: 24px;" name="input2" type="checkbox" value="3.0" onchange="calcScore();" /></td>
</tr>
<tr>
<td style="text-align: left; color: #ffffff; background: #4479BA; padding: 2px 10px; border-radius: 5px 5px 5px 5px; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);">Fever</td>
<td style="color: #ffffff; background: #4479ba; padding: 2px 10px; border-radius: 5px; text-shadow: rgba(0, 0, 0, 0.5) 0px -1px 0px; box-shadow: rgba(0, 0, 0, 0.5) 0px 1px 1px; text-align: center;"><strong>2</strong></td>
<td style="text-align: center; color: #ffffff; background: #4479BA; padding: 2px 10px; border-radius: 5px 5px 5px 5px; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);"><input style="top: 4px; width: 24px; height: 24px;" name="input3" type="checkbox" value="2.0" onchange="calcScore();" /></td>
</tr>
<tr>
<td style="text-align: left; color: #ffffff; background: #4479BA; padding: 2px 10px; border-radius: 5px 5px 5px 5px; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);">Night sweats</td>
<td style="color: #ffffff; background: #4479ba; padding: 2px 10px; border-radius: 5px; text-shadow: rgba(0, 0, 0, 0.5) 0px -1px 0px; box-shadow: rgba(0, 0, 0, 0.5) 0px 1px 1px; text-align: center;"><strong>1</strong></td>
<td style="text-align: center; color: #ffffff; background: #4479BA; padding: 2px 10px; border-radius: 5px 5px 5px 5px; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);"><input style="top: 4px; width: 24px; height: 24px;" name="input4" type="checkbox" value="1.0" onchange="calcScore();" /></td>
</tr>
<tr>
<td style="text-align: left; color: #ffffff; background: #4479BA; padding: 2px 10px; border-radius: 5px 5px 5px 5px; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);">Weight loss</td>
<td style="color: #ffffff; background: #4479ba; padding: 2px 10px; border-radius: 5px; text-shadow: rgba(0, 0, 0, 0.5) 0px -1px 0px; box-shadow: rgba(0, 0, 0, 0.5) 0px 1px 1px; text-align: center;"><strong>1</strong></td>
<td style="text-align: center; color: #ffffff; background: #4479BA; padding: 2px 10px; border-radius: 5px 5px 5px 5px; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);"><input style="top: 4px; width: 24px; height: 24px;" name="input5" type="checkbox" value="1.0" onchange="calcScore();" /></td>
</tr>
<tr>
<td style="text-align: left; color: #4479BA; background: #ffffff; padding: 2px 10px; border-radius: 5px 5px 5px 5px; text-shadow: 0 0 0 rgba(0, 0, 0, 0.5); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);" colspan="3">Tygerberg Score: <input name="result" type="text" style="border: white"/></td>
</tr>
<tr>
<td style="text-align: left; color: #4479BA; background: #ffffff; padding: 2px 10px; border-radius: 5px 5px 5px 5px; text-shadow: 0 0 0 rgba(0, 0, 0, 0.5); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);" colspan="3">Interpretation: <input name="longanswer" size="60" type="text" style="border: white"/></td>
</tr>
</tbody>
</table>
</table>
Score: <input type="text" name="result" /><br />
</form>
</form>
</includeonly>
</includeonly>

Latest revision as of 22:07, 13 November 2018