I have a form that the providers want to see all the medications with the comments. So i have a data field with it set as a MEL expression with the following: and it works it pulls in all the meds with the comments. Here is the problem; I cannot figure out what to put into the translation to get the same thing so far all i can get is the meds to pull in but not with the comments. What do i need to do to actually get this to populate the document as well? Any help will be appreciated.
{{
global med= getfield(MEDS_PRIOR(
"delimited"), "|", "")
global max = size(med)
global count, returnmed =
"", getmed
for count = 1, count <= max, count = count +1 do
getmed = getfield(med[count],
"^","")
returnmed = returnmed + count +
".) " + getmed[1] +" Instructions: " + getmed[7] + if getmed[14] <> "" then " Comment: " + getmed[14] + "\n" else "\n"
endif + HRET
endfor
returnmed}}
What statement are you using for the Translation? Could you post that code?
Right now it is blank because every thing i have tried does not work.
You probably have to set the variable med to a document variable (like DOCUMENT.MEDISPLAY) and use that as the value you are printing. You may want to move your code to the watcher pane, insert a line to set med to a document variable and use that document variable for your display field and translation. You might need to put a ! at the beginning also, though I don't know that for sure.