I have a new letter template that I am adding. It calls for the appt location. This is not an existing symbol for me to pull in. I do not know how to add this. Please help!
You may be able to do this by converting appt_next() into an array and returning the location element (4 I think, depending on your EMR version), or by pulling the mldefs - more difficult if you're not familiar with that process.
For example, this function returns array elements 1,2, 4, and 5. You could place this fn in you letter and edit it to return only element 4, or whatever element is the location - you'll have to test because this data symbol function has apparently been altered in different emr versions.
{fn nappt(){
local napp=""
local narr=getfield(APPT_NEXT(), ",", "")
local nsize=size(narr)
for
count=1, count<=nsize, count=count+1
do
napp=narr[1] + " " + narr[2] + " " + narr[4] + " " + narr[5]
endfor
return napp}
}
Paul Atkinson said:
You may be able to do this by converting appt_next() into an array and returning the location element (4 I think, depending on your EMR version), or by pulling the mldefs - more difficult if you're not familiar with that process.
For example, this function returns array elements 1,2, 4, and 5. You could place this fn in you letter and edit it to return only element 4, or whatever element is the location - you'll have to test because this data symbol function has apparently been altered in different emr versions.
{fn nappt(){
local napp=""
local narr=getfield(APPT_NEXT(), ",", "")
local nsize=size(narr)
for
count=1, count<=nsize, count=count+1
do
napp=narr[1] + " " + narr[2] + " " + narr[4] + " " + narr[5]
endfor
return napp}
}
Thank you! I tried this and I dont get any error messages but it comes back blank. I tried to put the word "test" in the " " between narr[1] and narr[2] just to see if there were blanks but it still came back blank.
Can you help?
I didn't specify all of the steps. You must also call the function in the letter (be sure to copy/paste into notepad before you paste into letter template) or it won't execute. So, place the fn above in the letter template, removing all of the extra lines, then in the place where you want to see the result of the function place the function call:
Location: {nappt()}
Paul Atkinson said:
I didn't specify all of the steps. You must also call the function in the letter (be sure to copy/paste into notepad before you paste into letter template) or it won't execute. So, place the fn above in the letter template, removing all of the extra lines, then in the place where you want to see the result of the function place the function call:
Location: {nappt()}
OMG - That worked! Thank you very very much. It may seem simple to you but its big to me. I appreciate the time.
Is there a way to get the address that corresponds with that location?
I believe so, but since the nex_appt() data symbol function doesn't return that, one must resort to "option B", the mldefs. Takes a bit more work. I'll see what I can get for you. Would you please send me your email address directly: