Widget:Corticosteroids: Difference between revisions

From IDWiki
No edit summary
No edit summary
Line 1: Line 1:
<html><body>
 
 
 
<script type="text/javascript">
 
<script type="text/javascript">
 
function calc_corticosteroids(from) {
 
function calc_corticosteroids(from) {
Line 12: Line 10:
   
 
<form name="steroids" style="font-size:80%;float:right;padding:5px;border:1px solid grey;">
 
<form name="steroids" style="font-size:80%;float:right;padding:5px;border:1px solid grey;">
<table class="wikitable">
+
<table>
 
<tbody>
 
<tbody>
 
<tr><th>Corticosteroid (Route)</th><th>Equivalent Dose (mg)</th></tr>
 
<tr><th>Corticosteroid (Route)</th><th>Equivalent Dose (mg)</th></tr>
<tr><td>betamethasone (IV)</td><td><input autocomplete="off" value="0.75" onkeyup="calc_corticosteroids(this.name)" name="betamethasone" style="width:80px;display:inline-block" /></td></tr>
+
<tr><td>betamethasone (IV)</td><td><input autocomplete="off" value="0.75" onkeyup="calc_corticosteroids(this.name)" name="betamethasone" /></td></tr>
<tr><td>cortisone (PO)</td><td><input autocomplete="off" value="25" onkeyup="calc_corticosteroids(this.name)" name="cortisone" style="width:80px;display:inline-block" /></td></tr>
+
<tr><td>cortisone (PO)</td><td><input autocomplete="off" value="25" onkeyup="calc_corticosteroids(this.name)" name="cortisone" /></td></tr>
<tr><td>dexamethasone (PO/IV)</td><td><input autocomplete="off" value="0.75" onkeyup="calc_corticosteroids(this.name)" name="dexamethasone" style="width:80px;display:inline-block" /></td></tr>
+
<tr><td>dexamethasone (PO/IV)</td><td><input autocomplete="off" value="0.75" onkeyup="calc_corticosteroids(this.name)" name="dexamethasone" /></td></tr>
<tr><td>hydrocortisone (PO/IV)</td><td><input autocomplete="off" value="20" onkeyup="calc_corticosteroids(this.name)" name="hydrocortisone" style="width:80px;display:inline-block" /></td></tr>
+
<tr><td>hydrocortisone (PO/IV)</td><td><input autocomplete="off" value="20" onkeyup="calc_corticosteroids(this.name)" name="hydrocortisone" /></td></tr>
<tr><td>methylprednisolone (PO/IV)</td><td><input autocomplete="off" value="4" onkeyup="calc_corticosteroids(this.name)" name="methylprednisolone" style="width:80px;display:inline-block" /></td></tr>
+
<tr><td>methylprednisolone (PO/IV)</td><td><input autocomplete="off" value="4" onkeyup="calc_corticosteroids(this.name)" name="methylprednisolone" /></td></tr>
<tr><td>prednisolone (PO)</td><td><input autocomplete="off" value="5" onkeyup="calc_corticosteroids(this.name)" name="prednisolone" style="width:80px;display:inline-block" /></td></tr>
+
<tr><td>prednisolone (PO)</td><td><input autocomplete="off" value="5" onkeyup="calc_corticosteroids(this.name)" name="prednisolone" /></td></tr>
<tr><td>prednisone (PO)</td><td><input autocomplete="off" value="5" onkeyup="calc_corticosteroids(this.name)" name="prednisone" style="width:80px;display:inline-block" /></td></tr>
+
<tr><td>prednisone (PO)</td><td><input autocomplete="off" value="5" onkeyup="calc_corticosteroids(this.name)" name="prednisone" style="width:80px" /></td></tr>
<tr><td>triamcinolone (IV)</td><td><input autocomplete="off" value="4" onkeyup="calc_corticosteroids(this.name)" name="triamcinolone" style="width:80px;display:inline-block" /></td></tr>
+
<tr><td>triamcinolone (IV)</td><td><input autocomplete="off" value="4" onkeyup="calc_corticosteroids(this.name)" name="triamcinolone" /></td></tr>
 
</tbody>
 
</tbody>
 
</table>
 
</table>
  +
</form>
 
 
</body></html>
 

Revision as of 07:29, 21 December 2022

<script type="text/javascript"> function calc_corticosteroids(from) {

 let steroid_conv = {betamethasone: 0.75, cortisone: 25, dexamethasone: 0.75, hydrocortisone: 20, methylprednisolone: 4, prednisolone: 5, prednisone: 5, triamcinolone: 4};
 for (let to in steroid_conv) {
   if (to == from) continue;
   document.steroids[to].value = document.steroids[from].value * steroid_conv[to] / steroid_conv[from];
 }

} </script>

<form name="steroids" style="font-size:80%;float:right;padding:5px;border:1px solid grey;">

<tbody>

</tbody>

Corticosteroid (Route)Equivalent Dose (mg)
betamethasone (IV)<input autocomplete="off" value="0.75" onkeyup="calc_corticosteroids(this.name)" name="betamethasone" />
cortisone (PO)<input autocomplete="off" value="25" onkeyup="calc_corticosteroids(this.name)" name="cortisone" />
dexamethasone (PO/IV)<input autocomplete="off" value="0.75" onkeyup="calc_corticosteroids(this.name)" name="dexamethasone" />
hydrocortisone (PO/IV)<input autocomplete="off" value="20" onkeyup="calc_corticosteroids(this.name)" name="hydrocortisone" />
methylprednisolone (PO/IV)<input autocomplete="off" value="4" onkeyup="calc_corticosteroids(this.name)" name="methylprednisolone" />
prednisolone (PO)<input autocomplete="off" value="5" onkeyup="calc_corticosteroids(this.name)" name="prednisolone" />
prednisone (PO)<input autocomplete="off" value="5" onkeyup="calc_corticosteroids(this.name)" name="prednisone" style="width:80px" />
triamcinolone (IV)<input autocomplete="off" value="4" onkeyup="calc_corticosteroids(this.name)" name="triamcinolone" />

</form>