I am building an in house lab form and I have a check box next to the test that will push out an order. I am having a problem with users clicking the check box and un-checking it then checking it again. This will push the order twice. Is there a way to get it to if they un-check and check again it will not push a duplicate order?
You could set a variable to something like "done" when you enter the order and have a logic test before the code where the order is placed and if that variable is set to "done" do not enter the order. That way it could only get entered once.
Other option would be to overlay a visability region to reveal a text box that indicates the test was ordered.
I use a matching function to look for the code to see if it has already been ordered. Should e something like this
{IF match(ORDERS_NEW("list"),"CPT-99201")>0 then "" else MEL_ADD_ORDER("S", "E&M", "New Patient - Lvl I", "","","", "", "", "", "", "") ENDIF}
This will look at new orders and see if there is a new patient Level One office visit has been ordered. If there's not want it will place the order, if there is one it will do nothing.
Great!
I will try these and see which one works best for our form.
Thanks for all your help!
OK. I can't get it to work it still pushes multiple orders. What am I doing wrong??
{IF DOCUMENT.ORD_MICRO_URN <> "" THEN MEL_ADD_ORDER("S", "Labs- performed in office", "UA microalbumin Semiquant", "", "", "", "", "", "", "", "") ELSE "" ENDIF} {IF MATCH(ORDERS_NEW("LIST"), "UA microalbumin Semiquant")>0 THEN "" ELSE MEL_ADD_ORDER ("S", "Labs- performed in office", "UA microalbumin Semiquant", "","","","","","","","") ENDIF}
Try matching on the cpt code instead of the description. I have found that works better most of the times, but other than that, your code should work.