Widget:CrCl: Difference between revisions
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
} |
} |
||
</script> |
</script> |
||
<form name="creat"> |
<form name="creat" style="font-size:80%"> |
||
<div class="mtitle">Creatinine Clearance (CRCL) Calculator</div> |
<div class="mtitle">Creatinine Clearance (CRCL) Calculator</div><br/> |
||
<br/> |
|||
<div class="mline"> |
<div class="mline"> |
||
<div class="mleft">Age:</div> |
<div class="mleft">Age:</div> |
||
Line 26: | Line 24: | ||
<div class="mright">Years</div> |
<div class="mright">Years</div> |
||
</div> |
</div> |
||
<div class="mline"> |
<div class="mline"> |
||
<div class="mleft">Sex:</div> |
<div class="mleft">Sex:</div> |
||
Line 36: | Line 33: | ||
</div> |
</div> |
||
</div> |
</div> |
||
<div class="mline"> |
<div class="mline"> |
||
<div class="mleft">Body Weight:</div> |
<div class="mleft">Body Weight:</div> |
||
Line 49: | Line 45: | ||
</div> |
</div> |
||
</div> |
</div> |
||
<div class="mline"> |
<div class="mline"> |
||
<div class="mleft">Serum Creatinine:</div> |
<div class="mleft">Serum Creatinine:</div> |
||
Line 62: | Line 57: | ||
</div> |
</div> |
||
</div> |
</div> |
||
<div class="mline"> |
<div class="mline"> |
||
<div class="mleft">Creatinine Clearance:</div> |
<div class="mleft">Creatinine Clearance:</div> |
||
Line 70: | Line 64: | ||
<div class="mright">mL/min</div> |
<div class="mright">mL/min</div> |
||
</div> |
</div> |
||
<div class="mcalc"> |
<div class="mcalc"> |
||
<input onclick="calcreat()" type="button" |
<input onclick="calcreat()" type="button" value="Calculate" /> |
||
</div> |
</div> |
||
</form> |
</form> |
Revision as of 20:58, 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 sex = document.creat.sex.value;
if (age=="" || weight=="" || creat=="") return;
var crcl = 1.2 * (140 - age) * weight / creat; 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%">
<input autocomplete=off class="forminputcontent" onkeyup="calcreat()" name=a>
<select name=sex> <option selected>Male</option> <option>Female</option> </select>
<input autocomplete=off onkeyup="calcreat()" name=w>
<select name=wsel> <option value=2.2046 selected>Kilograms</option> <option value=1>Pounds</option> </select>
<input autocomplete=off onkeyup="calcreat()" name=c>
<select name=csel> <option value=1>mg/dL</option> <option value=0.0113636 selected>umol/L</option> </select>
<input ReadOnly name="res" style="color:red;background-color:#cccccc">
<input onclick="calcreat()" type="button" value="Calculate" />
</form>