We have been ask to access the Orders/Service Providers from our Office Visit form. The idea is to have a dropdown list with the names of all (approx 500 or more) service providers. Is this possible? Right now we have a edit field where the MAs type in the name of the PCP.
Thanks
There is a _ServiceProviders object in mldefs3.txt. You could write a function to pull the info from that object. If that isn't the correct one, there are other objects associated with Service Providers in that file.
Thanks, David. I passed your suggestion along to someone here who may have more experience with working with those files. I did find mldefs3.txt and it looks like it is the one we'd need. I just don't know how to procede.
Here is a function you can use as an example. It is looking at an mldef object. For your function, you would create a variable to hold your list and on each loop, take your list variable and append the value you want to that variable (strList = strList + whatever) rather than doing like this function does and find the first matching value and quit:
fn LastObsValueForUser (obsname,usrname){
// This function retrieves the last signed observation value
// signed in a document by the specified user
// ASSUMPTION: values are always ordered by Obsdate decending
// List_Obs is based on ViewPencilObs (mldefs7.txt) which is currently sorted
// by date but not guaranteed to remain that way
local aObsdata =
getfield(List_Obs(obsname,'Signed','Delimited','value'),"|","")
local aThisObs
local result=""
for i=1, i <= size(aObsdata), i=i+1
do
aThisObs = getfield(aObsdata[i],"^","")
//skip any value not from this LOC
if aThisObs[5] <> usrname then result = "" else
if aThisObs[5] == usrname then result = aThisObs[1] break
endif
endif
endfor
return result}