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
Read Only Archives
Cloverleaf
Tcl Library
Insurance group problem
System
Originally posted by John Bass
I need to create an HL7 message insurance group based on the following requirements:
The sending system
Find more posts tagged with
Clovertech
Comments
Tom Rioux
One way to do this is to write a pre-xlate tcl to do the sorting of the IN1 segments. I am assuming here, that while they aren't coming out in order, they are coming all together.
First, split your message into segments. Grab the IN1 segments and their index's (you will need to put them back into the message in the proper spots.
Second, loop through each IN1 segment, split on the field separator (|), and do an lappend to a list variable. Each split IN1 segment will be an element in the list. Also, while you are doing this, you can check the insurance date to make sure it is in effect. If it is, then you lappend to the list variable. IF it isn't, then dont.
Third, perform an lsort using the -index option. For example:
lsort -index 22 $ins_grps
Fourth, grab the first four elements (IN segments) in the list, join each one back together with the field separator and place it back in the proper place in the message.
Remember, before you join the message back together, you need to accommodate for any IN1 segments you may have removed from the message list variable. You will need to remove any empty list elements.
Hope this gets your started!
Tom Rioux
Jim Kosloskey
John,
We do it in the Xlate without any Tcl - just Xlate Actions.
If you want an example of how we do it let me know via email.