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
splitting a message on two different characters
Kevin Crist
I have a message that i have to take a specific thing from an NTE and put it somewhere else in the message.
Below, i want to split diagnosis reason, which is right after the CARD DX and copy it. I know how the get the NTE-3 field it is in but how would i just get the "what" diagnosis? I believe it is always the first one in this group but can be multiple words. Any ideas would be great.
NTE|1|P|CARD DX,what::HEART BP MEDS,no::PT BLOOD PRES,no::TRANSPORT
Thanks.
Find more posts tagged with
Clovertech
Comments
System
Originally posted by Gary Atkinson
You could do this in xltp proc in your translation file. So, you could split the list based on a "," and then lappend the elements except the first one.
Russ Ross
I previously posted a proc (xlt_splitflds.tcl) on clovertech that splits a field using a specified delimiter and maps each of the split fields to the desired output field(s), see URL:
CALL in Xlate
Tom Rioux
Try this (this is assuming that the "CARD DX," can be anywhere in the field)
# Grab the value from the field
set dx [lindex $xlateInVals 0]
# Find the index of where the diagnosis starts
set dxidx [expr [string first "CARD DX," $dx] +8]
# Find the index of where the diagnosis ends
set dxend [expr [string first : $dx $dxidx] -1]
set xlateOutVals [list [string range $dx $dxidx $dxend]]
4 lines of code to get what you want.
Hope this helps....
Tom Rioux