Reason for Exam Prompt


We had to add this to several of our forms recently, so I thought I'd show you our solution to it.

The Problem

We have to put a reason for exam text box on our radiology items. If we put one box that loads the same reason into each load string, it's simple, but doesn't offer our doctors much flexibility. However, putting a separate reason box on each item can be unwieldy and if they're all for the same reason, time consuming.



The Solution

The best solution I have found is creating a primary reason for exam box at the top of the radiology tab, and then a separate reason for exam box on each radiology item which has a higher priority than the main box.



We need to:
  • create a "main reason for exam" box
  • create individual "reason for exam" boxes
  • create code which puts the individual box at the highest priority
  • create code which uses the main reason if the individual reasons are empty
  • create code that still sends something if they're both empty

The Code

First thing we want is a "main reason for exam box that will populate all of the other reason for exam fields if nothing is entered into them.
  (individual reason boxes take precedence) 
Then we want a table with all of our other reason for exams tied to each item on the radiology page. There are several ways to do this, but I elected to put the reason for exam boxes in a column on the left, so they could be easily compared.
CXR portable 1 view stat once
Chest PA - lateral stat once

Now for the guts of the issue. I could have done my validation with a script, but it was so easy with VGR I went that route. The code is a bit bulky, but it's very easy to replicate.

This is the code for ONE reason for exam line, in this case chest x-ray portable 1 view

# CXR PORTABLE 1 VIEW
EDIT,IF,,ord_81,EQ,"true",AND
EDIT,IF,,cprompt_201,EQ,"",AND
EDIT,IF,,cprompt_200,EQ,"",THEN
EDIT,LOAD_ORDER,,,,"@LOAD_ORDER=OIS=235102^^^OOS=null^^^p=stat^^^f=ONCE"
EDIT,IF,,ord_81,EQ,"true",AND
EDIT,IF,,cprompt_201,EQ,"",AND
EDIT,IF,,cprompt_200,NE,"",THEN
EDIT,LOAD_ORDER,,,,"@LOAD_ORDER=OIS=235102^^^OOS=null^^^p=stat^^^f=ONCE^^^40593=`cprompt_200"
EDIT,IF,,ord_81,EQ,"true",AND
EDIT,IF,,cprompt_201,NE,"",THEN
EDIT,LOAD_ORDER,,,,"@LOAD_ORDER=OIS=235102^^^OOS=null^^^p=stat^^^f=ONCE^^^40593=`cprompt_201"

Lets break that down into the three statements and have a look a the purpose of each:

EDIT,IF,,ord_81,EQ,"true",AND
EDIT,IF,,cprompt_201,EQ,"",AND
EDIT,IF,,cprompt_200,EQ,"",THEN
EDIT,LOAD_ORDER,,,,"@LOAD_ORDER=OIS=235102^^^OOS=null^^^p=stat^^^f=ONCE"

If the check box ord_81 is checked, and both reason for exam boxes are blank, then load the order with no reason for exam.



EDIT,IF,,ord_81,EQ,"true",AND
EDIT,IF,,cprompt_201,EQ,"",AND
EDIT,IF,,cprompt_200,NE,"",THEN
EDIT,LOAD_ORDER,,,,"@LOAD_ORDER=OIS=235102^^^OOS=null^^^p=stat^^^f=ONCE^^^40593=`cprompt_200"

If the check box ord_81 is checked, and the individual reason for exam is blank, but the main reason is populated, then load with that reason for exam



EDIT,IF,,ord_81,EQ,"true",AND
EDIT,IF,,cprompt_201,NE,"",THEN
EDIT,LOAD_ORDER,,,,"@LOAD_ORDER=OIS=235102^^^OOS=null^^^p=stat^^^f=ONCE^^^40593=`cprompt_201"


If the check box ord_81 is checked, and the individual reason for exam is populated, regardless of the state of the main reason for exam, then load with the individual reason for exam





See for Yourself

See What it Looks Like


0 comments: