Widget:CrCl: Difference between revisions
m (Aidan moved page Widgets:CrCl to Widget:CrCl without leaving a redirect) |
No edit summary |
||
Line 22: | Line 22: | ||
<div class="mleft">Age: |
<div class="mleft">Age: |
||
</div><div class="mmiddle"> |
</div><div class="mmiddle"> |
||
<input autocomplete=off class="forminputcontent" onkeyup= |
<input autocomplete=off class="forminputcontent" onkeyup="calcreat()" name=a> |
||
</div> |
</div> |
||
<div class="mright"> |
<div class="mright"> |
||
Line 29: | Line 29: | ||
<div class="mline"> |
<div class="mline"> |
||
<div class="mleft">Sex: |
<div class="mleft">Sex:</div> |
||
</div> |
|||
<div class="mmiddle"> |
<div class="mmiddle"> |
||
<select name=sex |
<select name=sex> |
||
<option |
<option selected>Male</option> |
||
<option |
<option>Female</option> |
||
</select> |
</select> |
||
</div> |
</div> |
||
</div> |
</div> |
||
<div class="mline"> |
<div class="mline"> |
||
<div class="mleft">Body Weight: |
<div class="mleft">Body Weight:</div> |
||
<div class="mmiddle"> |
|||
<input autocomplete=off class="forminputcontent" onkeyup= |
<input autocomplete=off class="forminputcontent" onkeyup="calcreat()" name=w> |
||
</div> |
</div> |
||
<div class="mright"> |
<div class="mright"> |
||
Line 55: | Line 53: | ||
<div class="mleft">Serum Creatinine: |
<div class="mleft">Serum Creatinine: |
||
</div><div class="mmiddle"> |
</div><div class="mmiddle"> |
||
<input autocomplete=off class="forminputcontent" onkeyup= |
<input autocomplete=off class="forminputcontent" onkeyup="calcreat()" name=c> |
||
</div> |
</div> |
||
<div class="mright"> |
<div class="mright"> |
||
Line 65: | Line 63: | ||
<div class="mline"> |
<div class="mline"> |
||
<div class="mleft">Creatinine |
<div class="mleft">Creatinine Clearance:</div> |
||
<div class="mmiddle"> |
|||
<input ReadOnly class="forminputcontent" name=res style="color:red;background-color:#cccccc"> |
<input ReadOnly class="forminputcontent" name="res" style="color:red;background-color:#cccccc"> |
||
</div> |
</div> |
||
<div class="mright"> |
<div class="mright"> |
||
Line 75: | Line 73: | ||
<div class="mcalc"> |
<div class="mcalc"> |
||
<input onclick="calcreat()" type="button" name="Calculate" value="Calculate"/> |
<input onclick="calcreat()" type="button" name="Calculate" value="Calculate"/> |
||
<input onclick="creatclear()" type="button" name="reset" value="Reset All"/> |
|||
</div> |
</div> |
||
Revision as of 20:43, 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 (a=="" || w=="" || c=="") 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">
<input autocomplete=off class="forminputcontent" onkeyup="calcreat()" name=a>
Years
<select name=sex> <option selected>Male</option> <option>Female</option> </select>
<input autocomplete=off class="forminputcontent" onkeyup="calcreat()" name=w>
<select name=wsel> <option value=2.2046 >Kilograms</option> <option value=1 selected>Pounds</option> </select>
<input autocomplete=off class="forminputcontent" onkeyup="calcreat()" name=c>
<select name=csel> <option value=1>mg/dL</option> <option value=0.0113636>umol/L</option> </select>
<input ReadOnly class="forminputcontent" name="res" style="color:red;background-color:#cccccc">
mL/min
<input onclick="calcreat()" type="button" name="Calculate" value="Calculate"/>
</form>