Hi,
I was hoping someone could help me. I need MEL that will prevent ordering a test twice if the order button is clicked more than once.
Example:
MEL_ADD_ORDER("T", "Bone Density ", "DEXA SCAN", "", "", "", "", "", "", "", "")
{IF MATCH(ORDERS_NEW("LIST"),"CPT - DEXA") >0 THEN "" ELSE MEL_ADD ORDER("T", "Bone Density", "DEXA SCAN", "","","","","","","","") ENDIF}
I have tried using the above...but it still pushed another order for dexa scan.
Thank you in advance....
Kathy
I don't see where you pushed CPT - DEXA in the original MEL_ADD_ORDER. Did you leave out the other parameters on purpose for the post or are you not adding CPT code, etc. in your code?
I'm not adding the CPT Code.
Kathy
Ok, that's why you aren't getting anything. Your MATCH command is looking for the string "CPT - DEXA" which you are not including in the order at all. You need to change DEXA SCAN to CPT - DEXA for your second piece of code to work.
Your code basically says Add a Test from the Category Bone Density that is named DEXA SCAN. But your second like is trying looking for the string CPT - DEXA which doesn't exist. If you just did a MATCH using the word DEXA it would work.
Thanks....I'll give that a try.