I have created a form with data displays and radio buttons. My goal is to get the radio button to auto populate the correct choice depending on the value in the data display.
Example: Patients BMI- OBSNOW BMI is 28. I have a radio button (DOCUMENT.BMI) field with the choices of under 18.5, 18.5-24.99, 25 or over. Is there a way to auto populate the radio "25 or over" ?
Thanks for your help
Yes just do something like this in the white space to the side. Keep in mind this will evaluate anytime an observation is changed, but it should do what you are looking for.
{cond
case (val(OBSNOW("BMI")) < 18.5 and OBSNOW("BMI") <> "")
DOCUMENT.BMI = "under 18.5"
case (val(OBSNOW("BMI")) >= 18.5 and val(OBSNOW("BMI")) < 25)
DOCUMENT.BMI = "18.5-24.99"
case (val(OBSNOW("BMI")) >=25)
DOCUMENT.BMI = "25 or over"
else
""
endcond}
This worked perfectly! Thank you very much for your help. Have a great weekend!