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
Tool to format HL7 to NL (newline) specification for Cloverleaf?
Jason
Hi all,
I'm trying to setup some sort of automated process that will replay certain failed HL7 messages in Cloverleaf. In Cloverleaf, we already have setup a 'replay' inbound file-based thread that will look in a folder and replay any properly formatted text/dat file.
My issue is that, currently, the raw HL7 we're getting out of SQL queries are not formatted properly, ASCII (0x0A & 0x0B all over the place) is off.. so Cloverleaf doesn't read it properly as NL file type.
Does anyone know of an HL7 tool or something that will do this in a more streamlined way? So I can just input the raw HL7 and it will come out formatted properly?
Thanks!
Find more posts tagged with
Clovertech
Comments
Jason
Or would it be better/easier to output the SQL HL7 to XML and use that in the Cloverleaf input?
Charlie Bursell
I understand the 0x0A in your data as that is a linefeed character. I do not understand the 0x0B. That is a vertical tab only used in MLLP encoding. Are you sure it is not 0x0D which is the carriage return character?
In any case, if you have a file you can use a simple command line perl script to change them. For example: (Assuming not many different hex characters)
perl -pi.bak -e "s/0x0A/\n/g" <file name>
The .bak will create a file with original contents in case you want to go back. The g means global and will replace all. If on Unix use the single quote instead of double.
You could do this for each of the hex characters. If worried use a different bak to enable recovery. For example:
perl -pi.bak1 -e "s/0x0D/\r/g" tst
These command could be placed in a shell or batch script.
I hope I did not mis-understand the problem here
Jason
Charlie,
yes, you were right, it was a 0x0D, my bad.
Thank you for that. So what I did was basically what you're suggesting but in C# instead of Perl.
Appreciate you taking the time reply.
Cheers!