Widget:CrCl: Difference between revisions
No edit summary |
No edit summary |
||
Line 18: | Line 18: | ||
</script> |
</script> |
||
<form name="creat" style="font-size:80%"> |
<form name="creat" style="font-size:80%"> |
||
<div |
<div>Creatinine Clearance (CrCl) Calculator</div><br/> |
||
<div |
<div> |
||
< |
<label for="a">Age:</label> |
||
<input autocomplete="off" onkeyup="calcreat()" name="a"> |
|||
years |
|||
<div class="mright">Years</div> |
|||
</div> |
</div> |
||
<div |
<div> |
||
< |
<label for="sex">Sex:</label> |
||
< |
<select name="sex"> |
||
⚫ | |||
⚫ | |||
<option value="0.85">Female</option> |
|||
⚫ | |||
⚫ | |||
⚫ | |||
</div> |
|||
</div> |
</div> |
||
<div |
<div> |
||
< |
<label for="w">Body Weight:</label> |
||
⚫ | |||
<div class="mmiddle"> |
|||
⚫ | |||
⚫ | |||
⚫ | |||
</div> |
|||
< |
<option value="0.4536">lbs</option> |
||
</select> |
|||
⚫ | |||
<option value="0.4536">lbs</option> |
|||
⚫ | |||
</div> |
|||
</div> |
</div> |
||
<div |
<div> |
||
< |
<label for="c">Serum Creatinine:</label> |
||
⚫ | |||
<div class="mmiddle"> |
|||
⚫ | |||
⚫ | |||
⚫ | |||
</div> |
|||
⚫ | |||
<div class="mright"> |
|||
</select> |
|||
⚫ | |||
⚫ | |||
</select> |
|||
</div> |
|||
</div> |
</div> |
||
<div |
<div> |
||
< |
<label for="res">Creatinine Clearance:</div> |
||
⚫ | |||
<div class="mmiddle"> |
|||
mL/min |
|||
⚫ | |||
</div> |
|||
<div class="mright">mL/min</div> |
|||
</div> |
</div> |
||
<div |
<div> |
||
<input onclick="calcreat()" type="button" value="Calculate" /> |
<input onclick="calcreat()" type="button" value="Calculate" /> |
||
</div> |
</div> |
Revision as of 21:34, 15 August 2019
<script type="text/javascript"> function calcreat() { var age = document.creat.a.value; var creat = document.creat.c.value; var weight = document.creat.w.value; var creat_units = document.creat.csel.value; var weight_units = document.creat.wsel.value; var sex = document.creat.sex.value;
if (age=="" || weight=="" || creat=="") return;
var crcl = 1.2 * (140 - age) * (weight * weight_units) / (creat * creat_units); if (sex == "Female") crcl = crcl * 0.85; if (crcl < 0) crcl = 0; document.creat.res.value = crcl; } </script> <form name="creat" style="font-size:80%">
<label for="a">Age:</label> <input autocomplete="off" onkeyup="calcreat()" name="a"> years
<label for="sex">Sex:</label> <select name="sex"> <option value="1" selected>Male</option> <option value="0.85">Female</option> </select>
<label for="w">Body Weight:</label> <input autocomplete="off" onkeyup="calcreat()" name="w"> <select name="wsel"> <option value="1" selected>kg</option> <option value="0.4536">lbs</option> </select>
<label for="c">Serum Creatinine:</label> <input autocomplete=off onkeyup="calcreat()" name="c"> <select name="csel"> <option value="88">mg/dL</option> <option value="1" selected>umol/L</option> </select>
<input ReadOnly name="res" style="color:red;background-color:#cccccc"> mL/min
<input onclick="calcreat()" type="button" value="Calculate" />
</form>