Widget:CrCl: Difference between revisions

From IDWiki
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 class="mtitle">Creatinine Clearance (CRCL) Calculator</div><br/>
<div>Creatinine Clearance (CrCl) Calculator</div><br/>
<div class="mline">
<div>
<div class="mleft">Age:</div>
<label for="a">Age:</label>
<div class="mmiddle"><input autocomplete="off" onkeyup="calcreat()" name="a"></div>
<input autocomplete="off" onkeyup="calcreat()" name="a">
years
<div class="mright">Years</div>
</div>
</div>
<div class="mline">
<div>
<div class="mleft">Sex:</div>
<label for="sex">Sex:</label>
<div class="mmiddle">
<select name="sex">
<option value="1" selected>Male</option>
<select name=sex>
<option value="1" selected>Male</option>
<option value="0.85">Female</option>
</select>
<option value="0.85">Female</option>
</select>
</div>
</div>
</div>
<div class="mline">
<div>
<div class="mleft">Body Weight:</div>
<label for="w">Body Weight:</label>
<input autocomplete="off" onkeyup="calcreat()" name="w">
<div class="mmiddle">
<select name="wsel">
<input autocomplete=off onkeyup="calcreat()" name=w>
<option value="1" selected>kg</option>
</div>
<div class="mright">
<option value="0.4536">lbs</option>
<select name=wsel>
</select>
<option value="1" selected>kg</option>
<option value="0.4536">lbs</option>
</select>
</div>
</div>
</div>
<div class="mline">
<div>
<div class="mleft">Serum Creatinine:</div>
<label for="c">Serum Creatinine:</label>
<input autocomplete=off onkeyup="calcreat()" name="c">
<div class="mmiddle">
<select name="csel">
<input autocomplete=off onkeyup="calcreat()" name=c>
<option value="88">mg/dL</option>
</div>
<option value="1" selected>umol/L</option>
<div class="mright">
<select name=csel>
</select>
<option value=88>mg/dL</option>
<option value=1 selected>umol/L</option>
</select>
</div>
</div>
</div>
<div class="mline">
<div>
<div class="mleft">Creatinine Clearance:</div>
<label for="res">Creatinine Clearance:</div>
<input ReadOnly name="res" style="color:red;background-color:#cccccc">
<div class="mmiddle">
mL/min
<input ReadOnly name="res" style="color:red;background-color:#cccccc">
</div>
<div class="mright">mL/min</div>
</div>
</div>
<div class="mcalc">
<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%">

Creatinine Clearance (CrCl) Calculator


<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>

<label for="res">Creatinine Clearance:

<input ReadOnly name="res" style="color:red;background-color:#cccccc"> mL/min

<input onclick="calcreat()" type="button" value="Calculate" />

</form>