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
merging a PDF file into an HL7 messages generated from a VRL file
Ron Swain
I am wanting to embed a PDF file into the OBX segment of a message generated from a VRL file. The PDF filename will correspond to a field from the line in the flat file being converted to an HL7 message. We have done this via external shell scripts; but was hoping to move the functionality within the Cloverleaf engine.
Find more posts tagged with
Clovertech
Comments
Peter Heggie
Is the file on the Cloverleaf server? Then you can use TCL to open the file, read it into a variable (in binary) and then COPY the variable into the OBX.
If you have to use FTP, then technically you could add the TCL FTP package into your environment but I'm not sure about the impact. especially if it encounters errors.
Jim Kosloskey
Ron,
I have a Tcl script that does what you want I think but at least a starting point. This proc though requires the file be accessible vioa the file system not FTP.
If you would like that proc and its User Doc, email me.
Ron Swain
Thanks Jim. I will let you know.. I appreciate it.
david_barr
We do a lot of interfaces like this, but we use Windows file shares instead of FTP to access the PDFs, and we use TCL TPS procs to read the files into the message. We mount the Windows file shares to our Linux Cloverleaf server using CIFS mounts in fstab. Also, I've run into so many problems dealing with binary files in Cloverleaf, that I prefer to use a command like this to read in the pdf:
set pdfData [exec base64 -w 0 < $filename]
This puts the data in a variable in an Base64 ASCII encoded format that you can copy directly into a field in the message.
You could probably do the same thing if you mounted the FTP server the files are on to your Linux Cloverleaf server using the FUSE filesystem type.
Jason Russell
I agree that you should avoid dealing with binary PDFs. TCL does have a builtin protocol to do that vs running it via exec:
set pdf [<get PDF however>]
set b64 [binary encode base64 $pdf]
This is also a bit more portable between environments.