I'm trying to display a list of the new orders entered in an encounter along with the order comments on a handout.
{ccc_add_num_with_carriage_ret(ORDERS_NEW("list"))} gives me a nice looking list of the new orders, but does not give me the comments added to the instructions field.
{ORDERS_NEW(‘delimited’)} gives me a list of the new order in a delimited format, but it looks too messy to give to a patient.
Can anybody help me (possibly with an array?) with the MEL code to get a list of the new orders with Order Description, Order Code, and Order Comment?
{ document.Formatted_Orders=Orders_Formatted(Orders_New("delimited"))}
{ fn Orders_Formatted(strOrders)
{
local i=0
local arrayOrders
local strRet
if strOrders<>"" then
arrayOrders=getfield(strOrders,"|","")
for i=1,i<=size(arrayOrders),i=i+1 do
arrayOrders[i]=getfield(arrayOrders[i],"^","")
strRet=strRet+arrayOrders[i][1]+" "+arrayOrders[i][3]+": "+arrayorders[i][8]+HRET
endfor
endif
return strRet
}
}
Contact me if you have any questions.