Hello Fellow Chuggers,
I am new to VFE and am so frustrated with this program. Any ways I was wondering if anyone is willing to share their Body Mass Index (BMI) and Ideal Body Weight (IBW) calculation. Any advice or sharing of information would be much appreciated.
Thank you,
Emma Parker
858-499-3163
Here ya go:
{fn CalcBMIConv() {
local heightval = 0
local weightval = 0
cond
case OBSNOW("height") <> ""
heightval = OBSNOW("Height")
case OBSPREV("height") <> "" and OBSNOW("height") = ""
heightval = OBSPREV("Height")
else
heightval = ""
endcond
cond
case OBSNOW("weight") <> ""
weightval = OBSNOW("weight")
case OBSPREV("weight") <> "" and OBSNOW("weight") = ""
weightval = OBSPREV("weight")
else
weightval = ""
endcond
if weightval == "" or heightval == "" then
return ""
else
return (weightval / 2.2) / ((heightval / 39.4)^2)
endif
}}
Here's a form utilizing it: Vitals
Sorry, but I don't have anything using IBW
I'm not sure why the forum formatted my text all jumbled like that, let me know if you can't understand it.
Thanks Dan this was helpful and worked like a charm!
adaniel, to post my code as intended, I have been doing this.
Edit your post, cut it all out of [Visual],
select [Text] and paste it in between these HTML tags
(In my example below, replace { } with <>.
I had to use { and } to prevent it processing as HTML tags)
{PRE}{CODE}
... your post and code here ...
{/CODE}{/PRE}
You will also need to replace <>
with <<>>
or they will get stripped out.
- Beverly
Tried to edit the answer post to make it look better and only partially succeeded
For ideal body weight, this is what we are using
--Brad
{
GLOBAL IBW=round(
IF match(PATIENT.SEX,"F")>0 then
IF (OBSANY("HEIGHT") > 60) then
100+5*(OBSANY("HEIGHT")-60)
else
100-2*(60-OBSANY("HEIGHT"))
endif
else
IF (OBSANY("HEIGHT") > 60) then
106+6*(OBSANY("HEIGHT")-60)
else
106-2*(60-OBSANY("HEIGHT"))
endif
endif
,0)
}
{
IBW
}
;