Catching duplicate orders with an Exit Check

41 views
Skip to first unread message

James B

unread,
Jan 23, 2015, 2:04:41 PM1/23/15
to heo-i...@googlegroups.com
Is it possible to check for specific duplicate orders, with an Exit Check?

The problem is code diagnosis.  An example would be the patient is admitted and a Code 3 status is entered by a physician.  Later, a different physician would come in and complete an Admission iForm and he would enter a Code 3 status as well.  

Now there are two Code 3 Statuses.  While it probably doesn't hurt anything, it looks clunky.  I've been trying to figure out how to catch it with an Exit Check but I'm not sure if it has the ability to look for a Code 1 AND a different Code 1.

Any ideas, other than modifying all of our iForms to catch the duplicate when the iForm is submitted?  That would be a TON of work.
Message has been deleted

TWessel

unread,
Jan 26, 2015, 1:38:20 PM1/26/15
to heo-i...@googlegroups.com

Would it work to just set the "one per patient" flag in the orders toolkit?  This is what our build looks like for the Code Status order:

James B

unread,
Jan 26, 2015, 7:29:51 PM1/26/15
to heo-i...@googlegroups.com
TWessel, you're a saint.  Not sure how I overlooked that prompt but it seems to be exactly what I need.  Thanks again.

James B

unread,
Jan 27, 2015, 4:23:18 PM1/27/15
to heo-i...@googlegroups.com
Well, I might have jumped the gun on my specific issue.  Using the "one per patient" flag will break pre-orders if there is a code status active on a patient, and then a duplicate one ordered during pre-orders.  When you attempt to activate those pre-orders, you'll receive a playback error.



On Friday, January 23, 2015 at 1:04:41 PM UTC-6, James B wrote:

Michael Hudson

unread,
Jan 27, 2015, 5:29:41 PM1/27/15
to heo-i...@googlegroups.com
James, 

You an run a formless VGR for the exit check and have it not place the order if one already exists. Something like:

# Get order UI of most recent Code Status order
INIT,MAP,LOCAL,codestatusui,TO,get_order.ui.238979.1

# Get order status of order in queue (1 is unaccepted aka "New", 2 is previously ordered)
INIT,MAP,LOCAL,codeorderstatus,TO,get_order.status.238979.1

$ Get value of order status prompt, repeat for as many as you think they could have
INIT,MAP,LOCAL,codestatusvalue,TO,get_order.12345.238979.1
INIT,MAP,LOCAL,codestatusvalue2,TO,get_order.12345.238979.2
INIT,MAP,LOCAL,codestatusvalue3,TO,get_order.12345.238979.3

# DC order if it already exits, repeat for all possible code statuses
INIT,IF,,codeorderstatus,EQ,1,AND
INIT,IF,,codestatusvalue,EQ,"Code1",AND
INIT,IF,,codestatusvalue2,EQ,"Code1",OR,
INIT,IF,,codestatusvalue3,EQ,"Code1",THEN,
INIT,LOAD_ORDER,,,,"@DC_ORDER=UI=`codestatusui"

INIT,IF,,codeorderstatus,EQ,1,AND
INIT,IF,,codestatusvalue,EQ,"Code2",AND
INIT,IF,,codestatusvalue2,EQ,"Code2",OR,
INIT,IF,,codestatusvalue3,EQ,"Code2",THEN,
INIT,LOAD_ORDER,,,,"@DC_ORDER=UI=`codestatusui"

INIT,IF,,codeorderstatus,EQ,1,AND
INIT,IF,,codestatusvalue,EQ,"Code3",AND
INIT,IF,,codestatusvalue2,EQ,"Code3",OR,
INIT,IF,,codestatusvalue3,EQ,"Code3",THEN,
INIT,LOAD_ORDER,,,,"@DC_ORDER=UI=`codestatusui" 
INIT,EXIT,ALL

This is just a frame. Email me if you want to talk about it.

Michael

--
You received this message because you are subscribed to the Google Groups "HEO iForms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to heo-iforms+...@googlegroups.com.
To post to this group, send email to heo-i...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/heo-iforms/8af177a4-3415-4441-ad3e-9ad356a57b35%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages