Currently we have 50 doctors and the same in PA's in our practice and every time one leaves or joins we have to manually go to every form with the DDL that contains the doctors and remove or add a name. Is there a way to create a "master" DDL that holds the docs and PA's so we could just change one DDL and not a hundred?
Thanks in advance
Yes, what I do is set the doctor list to a global variable in a central file that is loaded by userlib and make each dropdown that uses the list a dynamic list with the global variable name in connection. That would require setting up every PC with a userlib file if you dont already have one.
Another option would be to have any form using the list set its own variable equal to a function that uses FILEREAD to read the list from a textfile that you could put in a central location, it would take a little more time to set up but it would be easier to deploy across a large network. Let me know if you need more details on how to setup either.
Thanks! Brilliant idea yet simple.
S this in the DDL should run it?
{
local fname = "C:/Users/me/Desktop/doctor.txt"
local fhnd = FILEOPEN(fname, "r")
if fhnd <> NULL then
text = FILEREAD(fhnd)
FILECLOSE(fhnd)
endif
}
Yeah something like that should work, but you should point it to a network location that everyone can access so you only have to upkeep one file. And it would be more efficient to use a global variable so the code only runs once
{!global _Master_Doc_List = GrabDocList()}
!fn GrabDocList(){
local fname = "//Network/EMRFiles/doctor.txt"
local fhnd = FILEOPEN(fname, "r")
local text = ""
if fhnd <> NULL then
text = FILEREAD(fhnd)
FILECLOSE(fhnd)
endif
return text
}
The '/' and '\' have always given me trouble so if something isnt working right run a trace file and see what it is actually reading as you path, that will probably be the culprit
you also set your global variable in a text component which you would add to your document templates where you want to use the drop-down.
jjordet said:
you also set your global variable in a text component which you would add to your document templates where you want to use the drop-down.
Not quite understanding, can you explain some more?
Text component
{gblProviders = "aaa aaa MD, bbb bbb PA, ..."}
""
Form
drop-down
dynamic
gblProviders
Is {gblProviders = "aaa aaa MD, bbb bbb PA, …"}
placed in Administration> Chart Documents > Text Components ??
yes, in Administration> Chart Documents > Text Components.
then you have to add the text component into the document template where your form with the drop-down is being used.
So how do you call to it in the drop down on the form?
adaniel,
The same way, use the dynamic option and insert gblProviders in the connection box. It is just a different method of storing the information and calling it to the document.
jjordet,
I have never used this method to introduce a global variable, but wouldnt this add the variable at the document level, meaning it will expire when the document is put on hold and would need to added every time you open a document?
What is the path to text components in Centricity?
I guess what I'm asking is what is the code to call to that text in centricity text component.
jjordet said:
yes, in Administration> Chart Documents > Text Components.
then you have to add the text component into the document template where your form with the drop-down is being used.
I am able to get it to populate the list box, but how do you keep it from dumping the whole text component onto the end of the note??