if DOCUMENT.BODY_MASS_IN >= "25.0" and DOCUMENT.BODY_MASS_IN = "240" and match(PROB_ACTIVE(),"BMI 25.0-25.9,adult”)0
Then MEL_ADD_PROBLEM("mdxof", "BMI 25.0-25.9,adult", "ICD-V85.21", str(._TODAYSDATE), "", "")
before I added the match prob_active it worked fine
Assuming the BMI is calculated correctly:
1. If DOCUMENT.BODY_MASS_IN is a numeric variable, you can't compare its value with a text string. If it is a text string, then you should convert it to a number using the val function:
val(DOCUMENT.BODY_MASS_IN) >=25
2. DOCUMENT.BODY_MASS_IN = “240″ will never be true unless the patient weighs, like 1500 lb.
It should be
and val(DOCUMENT.BODY_MASS_IN) < 26
3. There is a missing equals sign in the 3rd condition. The condition should be:
match(PROB_ACTIVE(),”BMI 25.0-25.9,adult”)=0
1. as a general rule, if you are doing logic on numeric values, convert the string to number, e.g. val(document.Body_Mass_In)>=25.0.
2. match(str1,str2)=0