Hi, I'm new at this so I'm hoping someone can help me. I created the quick text below to use on the Patient Instructions form. It lists the orders the way I want them, however the comment is listed for only the last order in the list. I would like each order listed with it's own comment (from the Instruction field in Orders). I'm sure there is probably an if,then type of programming that could be done??? Would appreciate someone's help, thank you!
The orders from your visit today are:
{ORDERS_NEW()} {ORD_COMMENTS()}
returns:
The orders from your visit today are:
OV Est - Level IV [CPT-99214]
Direct LDL [CPT-83721]
DME Referral [Referral] this should have a comment
CTA Chest- Thoracic Aorta [ct angio] this should have a comment
SCHEDULE AN ANNUAL EXAM [ANNUAL EXAM] this should have a comment
Short Latency Somatosensory Evoked Potential [CPT-95925] Appointment Date & Time: DUE May 2013
Specify: upper limbs this was the last order in the list so I see the comments
You will need to use ORDERS_NEW('delimited') and reformat the result to make it look like you want, this is one I use just to get the name[1], code[3], and quantity [11] for a data display. Comments is field [8].
{fn ordersList(strList){
local lOrdArray
local lStart
local lBuffer
local lrawlist
local lFormattedList = ""
lOrdArray = getfield(strList, "|", "")
for i = 1, i <= size(lOrdArray), i = i + 1 do
lOrdArray[i] = getfield(lOrdArray[i], "^", "")
lBuffer = ReplaceStr(lOrdArray[i][1], ",", ";")
lrawlist = lBuffer + " (" + lOrdArray[i][3] +") " + " "
lFormattedList = lFormattedList + (if lFormattedList <> "" then hret else "" endif) + sub(lrawlist,1,38) + " QTY: " + lOrdArray[i][11]
endfor
return (lFormattedList)
}}
This is one that I wrote for orders with comments:
!fn fnGetOrders(strList) { local lCounter local strOrderList local nStart local strBuf local strFormattedList = "" strOrderList = getfield(strList, "|", "") for lCounter = 1, lCounter <= size(strOrderList), lCounter = lCounter + 1 do strOrderList[lCounter] = getfield(strOrderList[lCounter], "^", "") strFormattedList = strFormattedList + str(lCounter) + "." /* Need to remove commas from problem name */ strBuf = strOrderList[lCounter][1] + " " + "(" +strOrderList[lCounter][3] + ") " + HRET + "Order Comments: " + HRET + strOrderList[lCounter][8] strBuf = ReplaceStr(strBuf, ",", "\,") strFormattedList = strFormattedList + strBuf + HRET endfor if (lCounter > 1) then strFormattedList = remove(strFormattedList, size(strFormattedList)) endif return strFormattedList }
thank you both!! This looks too long for quick text, do you both use this in the build of patient instructions, or in quick text? Some of my physicians like to remove the E & M code from the instructions.
I have mine built into the form itself. You could easily put it in your patient instructions form unless you are using the CCC patient instructions form. If you are, you could put it in your usrlib.txt file and then have the call in a quicktext.
Just remember to push the usrlib.txt file out to all users.
Have you guys come up with a workaround for including completed orders in the list? ORDERS_NEW only shows active orders (not ones that go to complete upon signing) and I can't see an easy way to work ORDERS_ALL into showing me only ones that are from the current update. I think I'm going to filter by start date for now using ORDERS_ALL, but that's pretty sloppy considering that a lot of providers change the start date for future orders.
Thanks,
Rachael