Basically I'm looking for how this can be implemented to help things out and if it is quicker to do than just clicking the flag button.
EDIT: The issue I run into is using a dropdown to select users, I would like to show user names but push user ID to MEL_SEND_FLAG. I can use the following to grab the name:
!fn fnUserDropdown(strList)
{
local strUserList
local nStart
local strBuf
local strFormattedList = ""
strUserList = getfield(strList, "|", "")
for i = 1, i <= size(strUserList), i = i + 1 do
strUserList[i] = getfield(strUserList[i], "^", "")
strBuf = strUserList[i][2]
strBuf = ReplaceStr(strBuf, ",", "\,")
strFormattedList = strFormattedList + strBuf + ","
endfor
if (i > 1) then
strFormattedList = remove(strFormattedList, size(strFormattedList))
endif
return strFormattedList
}
In the dropdown:
{
fnUserDropdown(GET_USER_LIST("PHYSICIA","","delimited"))
}
From here i'm not sure where to go.
I have designed forms in the past to use. One interesting quirk is in determining how to create the address to send it to.
In one instance, staff were filling out a pre-screening form, and then hitting a button to send a flag to a shared user/mailbox for our social workers. You may be able to create a process with a drop-down for the recipient and then use that info to complete the SendFlag process.
I think that's what i'm running into is that userid spot. I think what I need is to pull all users and then in the background somehow covert that to ID before it goes in the symbol.
Here's my set up:
{
MEL_SEND_FLAG("Flag",DOCUMENT.USER,"Urgent",str(._todaysdate),"subject line",DOCUMENT.BODY,"Documents")
}
That will work but requires the ones using it to know the id of the user they need to send a flag to, which in my scenario may be good enough as it'll be a select few.
Look at 'GET_USER_LIST' as an option to cross walk name to userid (login name). You might be surprised what you find there and the options it opens up. 😉
We are using this to send a flag to a "Dummy" inbox that is worked by staff. One instance of this is a record request to HIM for hospital records. The staff member puts the details into a form, such as the hospital name, date range to request, etc... and then it goes to an HIM Proxy inbox that our staff use as a group inbox.
We are about to start using this same workflow to request Dental outreach for our medical patients. if the patient is interested in a dental call to schedule an appointment, the provider clicks a button, and it builds a message to our Dental Proxy flag bin. Dental checks the bin every night, and calls patient's based on that list.
Thanks, this is essentially what i'm trying to do. I'll dive into that.
EDIT: I can retrieve the user list somewhat correctly (it's out of order) by:
!fn fnUserDropdown(strList)
{
local strUserList
local nStart
local strBuf
local strFormattedList = ""
strUserList = getfield(strList, "|", "")
for i = 1, i <= size(strUserList), i = i + 1 do
strUserList[i] = getfield(strUserList[i], "^", "")
strBuf = strUserList[i][2]
strBuf = ReplaceStr(strBuf, ",", "\,")
strFormattedList = strFormattedList + strBuf + ","
endfor
if (i > 1) then
strFormattedList = remove(strFormattedList, size(strFormattedList))
endif
return strFormattedList
}
Now to get that to point back to the userid i'm stuck
We are using it although primarily for sending a future flag to the provider of the document (as a reminder) or a designated individual/desktop.
We do use the GET_USER_LIST() data symbol for populating dropdowns and you could likely do that as well. If you don't want to write a separate matching function, I often populate dropdowns from something like GET_USER_LIST() with the name and then the other piece of information separated by a caret. For example, you could return "Winston MD\, Harry^hwinston" and place that in the combo. However, if you do this make sure that:
1. You replace any commas in the name with \,
2. You remove the login name when you document in the chart note.
3. You only take the login name to include in the flag.