Hello All,
I have some instances where there might be duplicate content (using the same obs terms) in the same visit if a provider pulls in a form What I would like to do is to prevent one form from writing to the note if the other is present. I have this working to a certain extent, the problem is the text translation won't call my function unless I change the value. What I need to have happen is for the text translation to change if I find the relevant form in GET_FORM_LIST().
For example this is my basic function to determine is the form I am looking for is present:
fn fnIsFormPresent()
{
local fmList = GET_FORM_LIST()
if match(fmList,1,"Control Panel") > 0 then
return "true"
else
return "false"
endif
}
Inside the text translation for the items I want to control with the above function I have the following:
{
if (fnIsFormPresent() == "false") then
//my text translation stuff
else
""
endif
}
Does anyone have any thoughts?
Thanks,
Brad
According to the data symbol reference, GET_FORM_LIST ( ) evaluates continuously. Try passing it as an argument.
{
if (fnIsFormPresent(GET_FORM_LIST()) == “false”) then
//my text translation stuff
else
“”
endif
}
You can also then shorten this -
fn fnIsFormPresent(fmList)
{
if match(fmList,1,”Control Panel”) > 0 then
return “true”
else
return “false”
endif
}
Thanks! That helped out.