I am trying to add a MEL_ADD_ORDER function to an edit field on a VFE form. I am trying to force a service order from the vital signs form when an entry s put in for a Pulse Ox. I can get it to work but I don't want it to push unless there is a value int eh Pulse Ox edit field.
Thoughts, suggestions?
Thanks,
Lisa
Try something like this:
if(DOCUMENT.PULSE_OX <> "" then MEL_ADD_ORDER("S","category", "Pulse OX", ....) else "" endif
Thanks Jim- I tried this and entered it under the Advanced tab under the Enable Expression box but it did not work, it grays out the edit field so I can not enter a value. Any other thoughts? Should I put it somewhere else?
I think it will work if you put the MEL expression in the Vital Signs form "MEL coding area" on the right side of the form. The form has a horizontal line at the right side, On the left you can put mel coding under form objects, on the Right is where you put mel coding by itself.
Where you currently put the code, is for a different purpose. The "Enable" expression box is to control Enabling/Disabling the field. If it evaluates to TRUE, the edit box will be enabled, otherwise the edit box will disabled. This is why you are seeing it disabled right now.
I suggest you put the MEL expression under a button, on the Vitals Sign form next to the pulse ox edit field. This will be much safer. If you like, you can enable/disable this "mel_add_order" button based on
{ if DOCUMENT.PULSE_OX=="s" then TRUE else FALSE endif }
There are pitfalls with auto-adding Orders like you are trying to do. If you put the encounter on hold, and open it, the form may check the pulse ox field, find "s" and add the Order Again, causing duplicate orders. So this is what I mean by "safer" to add a button you have to explicitly push.
- Beverly