Is this in TCL or a translate? If a translate, there isn’t a way to check to see if a field is multiple values. You have to do “if $x eq =1 || $x eq =2” and so forth. TCL is the same way in the if statement, but there is the switch statement which can have multiple values:
You could use a table. place the values to be checked against in the left hand column and something consistent (like ‘Y’) in the right hand column with the default being something like ‘N’.
Then in the Xlate TABLE Action pointing to your table and the data item to be checked giving a temp variable followed by an IF testing the temp variable for a value of ‘Y’.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
works OK and I was going to use it but it turns out that in the live environment there are 7 or 8 instances mapping to 1 so too many to hard code especially if changes need to be made for other hospitals using this in future.
Anyway, I now want to try your idea Jim. I have used a table before and indeed if there was only this position to map I would just use one without an IF but other positions in the field (PV1-8) depend on this value.
Could you expand on how to use the variable in conjunction with the table? I’ve used a variable in an ITERATE but that’s all.
If it’s any help in an example I’m mapping (simplified):