import { computed, defineComponent, ref } from "vue";
export default defineComponent({
name: "ge-calculator",
setup() {
const t3Ratio = ref(1);
const t4Ratio = ref(4);
const MPG_T3_SYN = 25;
const MPG_T4_SYN = 100;
const inputDefs = [
{
name: "Grains",
mpg: 1,
unit: "",
step: 0.1,
},
{
name: 'Natural Dessicated Thyroid ("Armour")',
mpg: 60,
unit: "mg",
},
{
name: 'Liothyronine (T3 - "Cytomel/Cynomel")',
mpg: MPG_T3_SYN,
unit: "mcg",
},
{
name: "Levothyroxine (T4)",
mpg: MPG_T4_SYN,
unit: "mcg",
},
];
const numGrains = ref(2);
const compounded = computed(() => {
const total = t3Ratio.value + t4Ratio.value;
const t3Proportion = t3Ratio.value / total;
const t4Proportion = t4Ratio.value / total;
const grainsSyn = t3Proportion / MPG_T3_SYN + t4Proportion / MPG_T4_SYN;
const multiplierSyn = numGrains.value / grainsSyn;
return {
t3Syn: t3Proportion * multiplierSyn,
t4Syn: t4Proportion * multiplierSyn,
};
});
return () => (
<>
Thyroid Calculator
Use this calculator to convert between different forms and units of thyroid hormone. Common synthetic, pure and natural dessicated forms are listed. The last section of the table provides input fields for a specified ratio of T3 to T4, and will give the dosages required for both the synthetic and pure forms. All dosages given are based on the "Grains" field at the beginning of the table, but editing any field will automatically update the rest to keep them in sync.
{_.name}{_.unit && (', ' + _.unit)} |
{
const val = (e.target as HTMLInputElement).valueAsNumber;
if (_.name === "Grains") {
numGrains.value = val;
} else {
numGrains.value = val / _.mpg;
}
}}
min="0"
step={_.step ?? 1}
type="number"
/>
|
Compounded (T3 and T4 - "Cynoplus") | |
Desired Ratio (T3:T4) |
{
t3Ratio.value = (e.currentTarget as HTMLInputElement).valueAsNumber;
}}
min="0"
step="1"
type="number"
/>
{
t4Ratio.value = (e.currentTarget as HTMLInputElement).valueAsNumber;
}}
min="0"
step="1"
type="number"
/>
|
T3 mcg : T4 mcg |
{
t4Ratio.value = compounded.value.t4Syn;
t3Ratio.value = (e.currentTarget as HTMLInputElement).valueAsNumber;
numGrains.value = t3Ratio.value / MPG_T3_SYN +
t4Ratio.value / MPG_T4_SYN;
}}
min="0"
step="1"
type="number"
/>
{
t3Ratio.value = compounded.value.t3Syn;
t4Ratio.value = (e.currentTarget as HTMLInputElement).valueAsNumber;
numGrains.value = t3Ratio.value / MPG_T3_SYN +
t4Ratio.value / MPG_T4_SYN;
}}
min="0"
step="1"
type="number"
/>
|