Does anyone know how to use a clinical function to write a statement that will disable a button or check box? For example, I have a form with a data display for patient allergies using the clinical function ALL_AFTER. I have a checkbox under the data display to allow users to check that patient has no known allergies but I do not want to allow users to check this if allergies are displayed. How can I disable the check box?
Thanks
ALL_AFTER()=="" in a visibility.
You could also use the "Enable/Disable Expression" field on the "Advanced" tab of the item configuration dialogue. If the statement you place there evaluates to 'true' then the form control is available for use, otherwise it dims and is unavailable.
Thanks all for your feedback. If I use the enable/disable expression, am I able to enter 2 or more MEL statements as the criteria. For example, I tried using ALL_PRIOR()== "" or ALL_AFTER() == "" but this does not seem to be working for me. Am I missing something?
are you sure you want 'or' and not 'and'???
If the above (ALL_PRIOR()== "" or ALL_AFTER() == "") is your enable/disable expression then it would evaluate to "true" if there are no allergies in the chart which would make the button or checkbox enabled. Check the chart you're using for presence/absence of allergies. Also, try using just all_after() since it gets all active allergies past and present. I tested this with a checkbox and it works correctly.