infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Cloverleaf
FIltering using translation
Simon Jamison
Hi,
I'm trying the following (have also tried = but makes no difference):
IF 0(0).MSH(0).#3(0).[0] ct=TTK
SEND
ELSE
SUPPRESS
When I use the test tool with an input file with TTK I get MSH returned:
MESSAGE 1
0(0).MSH(0).#1(0).[0].[0] "Field Separator" : >|<
0(0).MSH(0).#2(0).[0].[0] "Encoding Characters" : >^~\&<
0(0).MSH(0).#3(0).[0].[0] "Sending Application" : >TTK<
0(0).MSH(0).#4(0).[0].[0] "Sending Facility" : >disalpha<
0(0).MSH(0).#7(0).[0].[0] "Date/Time Of Message" : >202405281440<
0(0).MSH(0).#9(0).[0].[0] "Message Type" : >ADT<
0(0).MSH(0).#9(0).[1].[0] "Message Type" : >A31<
0(0).MSH(0).#10(0).[0].[0] "Message Control ID" : >1003237359.A31<
0(0).MSH(0).#11(0).[0].[0] "Processing ID" : >P<
0(0).MSH(0).#12(0).[0].[0] "Version ID" : >2.3.1<
0(0).EVN(0).#1(0).[0].[0] "Event Type Code" : >A08<
but when I use a file with, say, RTK, I just get:
MESSAGE 1
From the above I'm assuming that the translation is suppressing messages without TTK (could be wrong?) but in the 'real world' outside the testing tool, as the thired in a chain of translations it doesn't suppress the message.
Does anyone have any ideas please?
For a couple of reason I can't use gc_filterHL7msgUsingFieldValue
Thanks,
Simon
Find more posts tagged with
Clovertech
Comments
Jim Kosloskey
First, understand the difference between SEND and CONTINUE. SEND sends the message directly to the OB thread bypassing any post Xlate processing, whereas CONTINUE moves the message to the next stage in the engine processing.
Probably makes no difference in your case, but if later on you want to add some additional processing post Xlate, that processing will be skipped and you are likely to bang your head against a wall trying to figure out why.
In my ITERATE Class (shameless plug), I recommend always using CONTINUE unless you ABSOLUTELY KNOW you ALWAYS want to skip post Xlate processing.
OK, the testing tool is showing you there is no message when suppression takes place. Are you saying this Xlate is the third in a chain of Xlates and it is not suppressing there?
Typically, when I do Filtering in an Xlate and Chaining (I prefer it be chained - does not seem to cause any unacceptable overhead), I place the filtering Xlate first for a couple of reasons:
I don't want to do processing against the message just to throw it away.
The field I am filtering on may be affected by other activity prior in the chain making my filter unreliable. By being first in the chain I am getting a 'virgin' copy of the message. This might be what is happening to you.
If you still have issues and would like assistance off-line, email me.
Paul Stein
I agree with Jim - i use xlate chain and put the filter xlate 1st so i don't have to process a full message that i will throw away.
Could you consider changing your logic to something like:
IF 0(0).MSH(0).#3(0).[0] ne =TTK
SUPRESS
*notice the space before the equal sign
Also - I'd recommend Jim's ITERATE class. Jim's has worked with me on a few occasions and it has really helped my understanding of xlate logic, and capabilities.
Simon Jamison
Jim/Paul,
Thanks very much for your help. Moving the additional suppression Xlate to the start of the chain of three translations did the trick.
This is only a temporary workaround so ignoring any downsides/sub-optimal coding :-)
Simon