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
Cloverleaf
HL7 translation question regarding field length
Mike Campbell
Just completed Level 1 training last week. A new interface is taking RDE messages from source to destination. Both sides HL7. The inbound PID-2 is sent with leading zeros removed. How can I check the length of the field to insure it is 7 in length on the outbound side, padding with zeros if shorter?
Thanks.
Find more posts tagged with
Clovertech
Comments
System
Originally posted by Gary Atkinson
Use ~ in front of your inbound and check in an IF statement. There is some len logic built into the IF command. Add another IF with tcl proc to pad in the zeros if length is less than 7.
jcobane1
On your COPY command, you can simply add a tcl statement (in the proc window) to format the MRN with leading zeros:
set xlateOutVals [list [format %07s [lindex $xlateInVals 0]]]
If the number coming in is 1234, it will be sent out as 0001234.
Hope this helps.
Jim Cobane
Henry Ford Health
System
Originally posted by Sam Craig
Or, in the xlate, use a field copy with a Pre TCL Proc with code similar to this ......
set pid2_in [lindex $xlateInVals 0]
set xlateOutVals [format "%07s" $pid2_in]
This will always make the field 7 characters long and pad with zeroes if needed.