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
Import/Read csv file
System
Originally posted by Alison Benecchi
How do I import an HL7 .csv file? When I look at it in the smat DB, each line is a separate HL7 message.
Find more posts tagged with
Clovertech
Comments
System
Originally posted by Matthew Brophy
is your protocol inbound style set to 'eof' or 'hl7'?
does your hl7.csv file have message terminators included before the start of each message?
System
Originally posted by Alison Benecchi
Each line is separated by cr/lf. No there are no terminators before the start of each message. Where would I see the inbound protocol? I have the Protocol set to File with CR to CRNL
Jim Kosloskey
If you cannot get the source file changed to a more proper construct, I think you will need some Tcl and use the Style of EOF so the entire file is treated as one physical 'message'. Then in the IB UPoC your Tcl would break that physical 'message' into logical messages releasing each logical message to the engine.
A properly constructed file would likely have cr after each segment and cr/lf after the last segment of each HL/7 message. The source system should be able to do that.
Charlie Bursell
Are there several messages in a file? If not a simple fix would be a one line Tcl proc, assuming each line is a segment, to substitute newline with the empty string:
msgset $mh [string map "\n {}" [msgget $mh]]
return "{CONTINUE $mh}"
Leaving each segment terminated with the CR as it should be
If multiple messages in the file a little more is needed. Do same as above except
set msgs [string map "\n {}" [msgget $mh]]
set msgs [string trimleft [string map "MSH| \nMSH|" $msgs]] ;# all but last has LF
msgsset $mh "" ;# save time copying if large file
set dispList [list "KILL $mh"] ;# Kill original
Then in a loop:
foreach msg [split $msgs \n] {
set newmh [msgcopy $mh]
msgset $newmh $msg
lappend dispList "CONTINUE $newmh"
}
return $dispList
This is off the top of my pointed head so may be some fat finger errors but that is the gist of it.
System
Originally posted by Matthew Brophy
if it helps, we ran into this issue a while back, as well
https://usspvlclovertch2.infor.com/forums/topic/hl7-file-w-no-terminators/
attached pic is the inbound protocol
0OI009.27-AM201811.png