The only way I've seen to pull the patients complete pharmacy list is by parsing out data using the "patient.contacts" symbol. this symbol takes nearly 3 minutes to run which is killing our workflow. Does anyone have a better way to get the pharmacy list (regpharmacy only pulls the main pharmacy, we need them all)?
Greg
Did this function but it doesn't always work. Sometimes you have to go to Registration before it works – known issue with the Business mldefs object:
?
{fn get_pharmacies() {local a,c local i = getRowCount('Business') while i > 0 do i = i-1 a = getRow('Business',i,'searchName','Address1','Address2','City','State','Zip','primPhone','ISPHARMACY') if a[1] <> "" and a[8] ="Y" then c=c+"|" + a[1] + " - " + a[2] + "" + a[3] + " " + a[4] + ", " + a[5] + " " + a[6] + " " + a[7] + HRET else "" endif endwhile if c=="" then return "None entered" else "" endif local result=sort(getfield(c,"|","")) local arr_size=size(result) for a=1, a<arr_size, a=a+1 do if result[a]==result[a+1] then remove(result,a+1) arr_size=arr_size-1 else "" endif endfor local result1 = str(result) result1 = replacestr(result1,",","") return str(result1) }} {get_pharmacies()}
gfishback said:
The only way I've seen to pull the patients complete pharmacy list is by parsing out data using the "patient.contacts" symbol. this symbol takes nearly 3 minutes to run which is killing our workflow. Does anyone have a better way to get the pharmacy list (regpharmacy only pulls the main pharmacy, we need them all)?
Greg
Interesting…we have been having the same issue with patient.contacts taking several minutes to return results. I've talked to several folks at GE and they all say they have never heard of this before. We are running on CPS 11.1 currently. Have you tried the function work around?