So this is my code:
{!if LISTSUBSET(DOCUMENT.PROBLEM,"list","Z01.411", "contains", "any") <> "" then document.code_options = "x"
else document.code_options = "y"
endif}
Simple except I have 20 or so diagnosis to do with the potential of more to be added so of course I don't have to have to maintain that many separate LISTSUBSET.
I've tried stringing them together and even setting them in a different function like so:
{fn HoldDaCodes(){
local dacodes = ""
dacodes = str("Z12.4","N95.2","Z85.43","N87.9","R10.31","Z20.2","N89.3","R10.32","Z85.41","D07.2","D07.1","D07.39","R10.10","R10.2","R10.30","Z11.51","N91.2","R19.03","N92.4","R19.04","N95.1","N95.0","R87.619","Z01.411","Z01.419","Z12.4","R87.610")
return dacodes
}}
I'm sure there is something simple that will work just isn't coming to me. Any suggestions?
I would approach it more like this -
{fn HolddaCodes(vartocheck){
local dacodes = array("Z12.4","N95.2","Z85.43","N87.9","R10.31","Z20.2","N89.3","R10.32","Z85.41","D07.2","D07.1","D07.39","R10.10","R10.2","R10.30","Z11.51","N91.2","R19.03","N92.4","R19.04","N95.1","N95.0","R87.619","Z01.411","Z01.419","Z12.4","R87.610")
for i = 1, i<=size(dacodes), i = i + 1 do
if match(vartocheck,dacodes[i])>0
return true
endif
endfor
return false
}}
Then in the visibility just {!HolddaCodes(PROB_AFTER("delimited") )} //or DOCUMENT.PROBLEM in your case as the parameter
Wonderful thanks as always!