I was asked at CHUG to share what I came up with for this topic. It requires an ObsTerm linked to a task that the Providers routinely do. In my case it was followup and fax to PCP in the patient instructions-CCC form. The following code was inserted into the "Click to Enter" button function of the CCC form.
If (LIST_OBS('FOLLOWUPREC', 'Pencil', 'Value', 'List') <> '') then ((If (LISTSUBSET(ORDERS_new("list"),"list","99", "contains", "any") == "") then (If userok("No Charges have been placed")= FALSE then "" else ""endif) else "" endif)) else "" endif
This looks for the FOLLOWUPREC ObsTerm to populated. If it is then it goes and looks for new orders. If "99" is in the list of new orders (E&M charge code) then nothing, if not then pop-up box. Of course then flaw is if any other order containing a CPT with a 99 in it is placed but nor an E&M code, then nothing happens. Also if they forget to check the CCC box or forget to "Click to Enter."
Hope this helps.