1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
1.7K views
by brandon-w-8204 (34.1k points)
edited by brandon-w-8204
I want to put a PDF in a ORU message. How can I get the PDF in a base64 string.

1 Answer

0 votes
 
Best answer

Use the following code to get the file you want into a base64 string.

message = qie.createHL7Message('UTF-8');

var bytes = qie.readFile('c:\\hl7\\Sample Report.pdf');
var base64 = qie.base64EncodeBytes(bytes);

message.setNode('OBX-5', base64);

 

by brandon-w-8204 (34.1k points)
edited by michael-h-5027
...