I am attempting to use Mel to populate the obs term DIET COUNSEL if a patients BMI is out of range. I have it working for patients over 65 and under 65, but I can't seem to find the right MEL to only look at patients over the age of 18. The working MEL code is below. What else should I be adding to it so that patients under the age of 18 are not looked at.
{If PATIENT_AGE()>= "65" and OBSNOW("BMI")>= "30" or OBSNOW("BMI")< "22" then OBSNOW("INSTRUCTIONS", " * Your BMI calculation has been calculated as out of range for your height and age. Please contact your PCP for a weight management referral. Weight management recommended for better health.") + OBSNOW("DIET COUNSEL","Pt advised to contact PCP") else "" endif} {If PATIENT_AGE()< "65" and OBSNOW("BMI")>= "25" or OBSNOW("BMI")< "18.5" then OBSNOW("INSTRUCTIONS", " * Your BMI calculation has been calculated as out of range for your height and age. Please contact your PCP for a weight management referral. Weight management recommended for better health.") + OBSNOW("DIET COUNSEL","Pt advised to contact PCP") else "" endif}
Thank you for your assistance in advance.
Amanda Koenig
Oregon Orthopedic & Sports Medicine
{If PATIENT_AGE() >= 65 then
if VAL(OBSNOW("BMI")) >= 30
or VAL(OBSNOW("BMI")) < 22 then
...
else
""
endif
else
If PATIENT_AGE() >= 18
if VAL(OBSNOW("BMI")) >= ???
or VAL(OBSNOW("BMI")) < ??? then
...
else
""
endif
else
If PATIENT_AGE() < 18 then
if VAL(OBSNOW("BMI")) >= 25
or VAL(OBSNOW("BMI")) < 18.5 then
...
else
""
endif
else
""
endif
endif
endif
@Jerroll - I tried the code ( I have pasted below exactly what I tried) and I am still getting the Weight Management verbiage for a 20 year old with a BMI of 20.42(within range).
{If PATIENT_AGE() >= 65 then
if VAL(OBSNOW("BMI")) >= 30
or VAL(OBSNOW("BMI")) < 22 then
OBSNOW("INSTRUCTIONS", " * Your BMI calculation has been calculated as out of range for your height and age. Please contact your PCP for a weight management referral. Weight management recommended for better health.") +
OBSNOW("DIET COUNSEL","Pt advised to contact PCP")
else
""
endif
else
If PATIENT_AGE() < 18 then
if VAL(OBSNOW("BMI")) >= 0
or VAL(OBSNOW("BMI")) < 0 then
OBSNOW("DIET COUNSEL","")
else
""
endif
else
If PATIENT_AGE() >= 18 then
if VAL(OBSNOW("BMI")) >= 25
or VAL(OBSNOW("BMI")) < 18.5 then
OBSNOW("INSTRUCTIONS", " * Your BMI calculation has been calculated as out of range for your height and age. Please contact your PCP for a weight management referral. Weight management recommended for better health.") +
OBSNOW("DIET COUNSEL","Pt advised to contact PCP")
else
""
endif
else
""
endif
endif
endif
}
I am not so sure about the less than 18 coding - I don't want anything to happen for patients less than 18.
{If PATIENT_AGE() >= 65 then
if VAL(OBSNOW("BMI")) >= 30
or VAL(OBSNOW("BMI")) < 22 then
OBSNOW("INSTRUCTIONS", " * Your BMI calculation has been calculated as out of range for your height and age. Please contact your PCP for a weight management referral. Weight management recommended for better health.")
OBSNOW("DIET COUNSEL","Pt advised to contact PCP")
else
""
endif
else
If PATIENT_AGE() >= 18 then
if VAL(OBSNOW("BMI")) >= 25
or VAL(OBSNOW("BMI")) < 18.5 then
OBSNOW("INSTRUCTIONS", " * Your BMI calculation has been calculated as out of range for your height and age. Please contact your PCP for a weight management referral. Weight management recommended for better health.")
OBSNOW("DIET COUNSEL","Pt advised to contact PCP")
else
""
endif
else
""
endif
endif}
Unfortunately, that didn't work either
{If VAL(PATIENT_AGE()) >= 65 then
if VAL(OBSNOW("BMI")) >= 30
or VAL(OBSNOW("BMI")) < 22 then
OBSNOW("INSTRUCTIONS", " * Your BMI calculation has been calculated as out of range for your height and age. Please contact your PCP for a weight management referral. Weight management recommended for better health.")
OBSNOW("DIET COUNSEL","Pt advised to contact PCP")
else
""
endif
else
If VAL(PATIENT_AGE()) >= 18 then
if VAL(OBSNOW("BMI")) >= 25
or VAL(OBSNOW("BMI")) < 18.5 then
OBSNOW("INSTRUCTIONS", " * Your BMI calculation has been calculated as out of range for your height and age. Please contact your PCP for a weight management referral. Weight management recommended for better health.")
OBSNOW("DIET COUNSEL","Pt advised to contact PCP")
else
""
endif
else
""
endif
endif}
Still a no
then I'm stumped, unless your obsterms contain more than a number.