Re: Base64 Encoded text

2019-02-14 Thread Robert McKeever via 4D_Tech
Actually, I look for the HL7 delimiters (the vertical bar | and the carat ^). It breaks the HL7 into its component parts wonderfully well. I appreciate the comment. > On Feb 14, 2019, at 12:10 PM, slerch via 4D_Tech <4d_tech@lists.4d.com> wrote: > > BASE64 can be split into multiple lines so i

Re: Base64 Encoded text

2019-02-14 Thread Robert McKeever via 4D_Tech
Well, this works but I don’t understand why: 1. Strip off the leading portion (…Base64^). Find the next vertical bar and strip off the vertical bar and anything after it. 2. Base64 decode it into a blob. 3. Create a PDF Document. Do Blob to Document (Yep, opens with Acrobat). Import the docum

Re: Base64 Encoded text

2019-02-14 Thread slerch via 4D_Tech
BASE64 can be split into multiple lines so if you are looking for a CR or CRLF break between OBX segments, you could be getting the character found inside the BASE64 segment instead and so when you go to pull the info you actually have just part of the full BASE64 text. Therefore when it attempts t

Re: Base64 Encoded text

2019-02-14 Thread Koen Van Hooreweghe via 4D_Tech
Hi Bob, It is normal the HL7text is longer than the PDF size. As Base64 encoding converts a binary file to be sent by a text protocol. I decoded the starting part of your hl7 record you provided and I get '%PDF-1.4 %' which is the start of a PDF file. Looks good to me. For start you could try t

Base64 Encoded text

2019-02-13 Thread Robert McKeever via 4D_Tech
The health authority has decided to release some results (discharge reports) in PDF form which we receive in HL7 format. The line received begins with 'OBX|1|ED|PDF^PDF||^TEXT^PDF^Base64^JVBERi0xLjQKJdP0zOEKM’. I’ve tried $BlobText:=substring([PatientLabResults]HL7Text;36;length([PatientLabR