Data symbol ORDERS_NEW is returning orders from the past in addition to new orders. Is there a way to make it pull real new orders or limit what it pulls to a date range?
You could write a function and pull orders_new as delimited and grab the the date and limit it on that. The issue though I think is you shouldn't need to do it. If you look at the help file this is from ORDERS_NEW: "Lists active orders for the current patient entered during the current chart update." If you are having this issue you might want to report it as a bug.
As mentioned, the only viable workaround is to loop through the delimited version of the data symbol. While effective in filtering out most orders, it does have a failing in that if an older order was 'future dated' and that 'future start date' is on or after the document date, it will be included in the list of orders giving the appearance that the 'future order' was placed during the current visit. Something to be aware of, especially when documents are audited/submitted for claims support.
I have found that ORDER_LIST_CHANGES() function works well for me in VFE. I had a lot of complaints from clinics using ORDERS_NEW because it was pulling in all orders. I have changed all of my forms to use ORDER_LIST_CHANGES() and have had no complaints.
We use the following code as a Text component loaded into an encounter to list out just the orders that are associated with that
{'{cfmt(ORDER_LIST_CHANGES(), "", "Orders Added:
", "B,1", "")}'}
This has popped up for us in testing CPS 12.2. Never saw it prior. I run a CDS measure off certain orders that need to be confirmed through a web site (QUEST lab orders, via EMR-Link) and I remind users to do that. ONLY NOW, with 12.2, does it pop up erroneously.
Testing shows the these calls work fine:
ORDERS_NEW("Delim")
ORDERS_NEW("Comma")
but this call returns ALL orders:
ORDERS_NEW("List")
Once any order is entered, the problem goes away. It goes away for that note, and any subsequent note until I switch to another patient and back again, then in reappears. This particular version of the defect is definitely new in 12.2, and does not exist in any other CPS version, at least in this fashion, in CPS 12.X.
I created a new post about this issue because I was not able to reproduce the bug any more but no one has responded yet.
While I was modifying (for use in a different form) in the code that I wrote a while back to get around this bug I found that I was not able to reproduce the bug any more. I am on CEMR 9.8.13. I was hoping that someone that has run into the bug before could test it on their system and let me know if they still experience it.
I am not sure if I am just not performing the correct steps to reproduce the bug or if it simply doesn't exist in new(ish) versions of the software.
I have noticed the same thing, on CPS 12.2.1. The bug came up a few months ago, I found workarounds for some situations and just let others cook on the back burner, and when I got to them - I can no longer reproduce the error. I am assuming it is fixed but can't prove it, same as you.
I called GE today and asked them and they don't have any closed cases saying it was fixed. It makes me nervous changing the code without any proof that it was fixed.