How to import a CSV and generate multiple HL7 messages.

0 votes
asked Nov 12, 2014 by (190 points)
edited Nov 12, 2014 by brandon-w-8204
What is the best way to generate an HL7 message from each row in a CSV file.

2 Answers

+3 votes
Best answer

Use the following steps to convert a CSV message to an HL7 Message:


  1. Create the source message as a CSV message model.
    Note: Set the Record Grouping to "Row count" and include only 1 row in each group.
  2. In the first mapping node create a new message by selecting  New Message from the Function drop down.
  3. Select HL7 from the Format drop down. 
  4. Set the segments needed from your CSV message.  Each value in the CSV file is considered a  node.

    Example using GUI Standard Mapping:

    Example using code: 

    message.setNode('PID-10', source.getNode('1'));
answered Nov 12, 2014 by brandon-w-8204 (33,030 points)
selected Nov 13, 2014 by
commented Nov 13, 2014 by (190 points)
Thanks! That was a lot easier then I was thinking.
0 votes

Another method for handling one message type to another is to use a template of the destination message.

You can create a system variable in QIE that is a template of the type of message you would like to create that has references to fields in the source message.


Then in your channel you can reference that system variable and create your new message type .

message = qie.createHL7Message();
message.setNode('/', qie.evaluateTemplate(qie.getVariable('hl7Template')));

answered Apr 17, 2018 by michael-h-5027 (14,390 points)