I got information from another form that is populating a specific field with the problem when it is selected from the dynamic patient list. There is a button with the below Run Process that is supposed to do this:
{
SLMV_FN_AddProb_ToDiagImp("Diagnostic Impression")
}
Below is the function built to populate the appropriate Diagnostic Impression field, but it isn't putting the problem into the field.
I'm not sure what I have missed in the set up. But I thought I mimicked everything from the other form and it still doesn't work. Does anyone have any suggestions or something I should do instead of this? I am not very experienced at this type of function. Thanks in advance
!fn SLMV_FN_AddProb_ToDiagImp(DiagnosticImparea){
/*userok("current list " + DOCUMENT.SLCPWS_CRNT_PROB_LIST )*/
/*userok("prob after " + PROB_AFTER
("delimited"))*/
local nIndex
local nStart = 1
local strFormattedList = ""
local arrProblems = getfield(DOCUMENT.SLCPWS_CRNT_PROB_LIST, ",", "")
local BHSprobHldr=""
local BHSgetFld=""
cond
case DiagnosticImparea == "Diagnostic Impression"
BHSprobHldr = str(DOCUMENT.SLCBH_DI)
endcond
Hmm... I am guessing that the main issue would be the Document Variables. If those are not recreated in the form you are using, then the system will not know what those names mean. Specifically, I am referring to DOCUMENT.SLCPWS_CRNT_PROB_LIST, and DOCUMENT.SLCBH_DI.
Please let me know if you need further info.
Daniel