I have a order form where all that are future or today orders pull into a data field with the date, name of test and providers name but does not populate the document so when the provider goes to order they can see what is already on the orders module so there is no duplications. I also have a data field attached to the order form so when they order test that goes into a seperate one for new tests ordered and also populates their CPOE and they do not have to double entry as far as what their plan of care is for the patient. My problem is I cannot get the date of the test to pull into the new test ordered data field. Here is my language.
All test ordered: pulls in Name,Date,Provider-that works fine- this is a MEL expression
{ {
global orders= getfield(ORDERS_ALL(
"delimited","T"), "|", "")
global max = size(orders)
global count, returnorders =
"", getorders
for count = 1, count <= max, count = count +1 do
getorders = getfield(orders[count],
"^","")
if getorders[20] ==
"S" then
returnorders = returnorders +
"" + getorders[1] + " " + getorders[4] + " " + getorders[21] + HRET
endif
endfor
returnorders}}
New test ordered: pulls in Name of test only- this is a clinical function attached to Orders_New
{CFMT(ORDERS_NEW( "LIST", "T"), "", "Orders " , "B", " " )}
So what do i need to do to get the new test ordered to pull in the date along with the test name.