Announcement

Collapse
No announcement yet.

CSV to multiple HL7 messages

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CSV to multiple HL7 messages

    Hi,

    I am in a situation where I get data from a source in the form of a CSV file containing details of several records. This csv file is then converted to an XML file (manually, using Javascript preprocessor). However for the next stage, I need to send independent messages for each record in the xml file. I have mapped the fields from xml to HL7 using the destination transformer, but it seems to generate only one HL7 message.

    I would like to know if there is a simpler procedure to generate multiple HL7 messages when we are given a single csv file specification as an input.

    Regards,
    Abhi

  • #2
    You can create multiple destinations, each of which will receive the same data from the CSV file but can have different outbound templates.
    Gerald Bortis | Chief Information Officer | Mirth Corporation

    Comment


    • #3
      Originally posted by geraldb View Post
      You can create multiple destinations, each of which will receive the same data from the CSV file but can have different outbound templates.
      Thanks for the reply. For your workaround, I do not understand how creating multiple destinations would solve it. In this case, I only have to route the HL7 messages to one destination, but want the channel to process the file as a set of records, and generate HL7 messages for each.

      I later searched on the forum for similar problems encountered by others, and found this one, which is identical to mine:
      http://www.mirthcorp.com/community/f...t=multiple+hl7

      However, even after setting the Process Batch Files option, I still get one HL7 message as an output.

      Comment


      • #4
        Hello,

        I did a "quick and dirty" channel to show how you can achieve it.
        The output is not HL7, but csv. However, you only have to replace the outbound template by a template of your HL7 and map the fields accordingly.

        I attach the channel and a sample input file.
        The output will be individual files having the name of the first field in the input data.
        Attached Files
        JJ Mouris
        FFE Luxembourg
        IT-Department

        Comment


        • #5
          Originally posted by mourisj View Post
          Hello,

          I did a "quick and dirty" channel to show how you can achieve it.
          The output is not HL7, but csv. However, you only have to replace the outbound template by a template of your HL7 and map the fields accordingly.

          I attach the channel and a sample input file.
          The output will be individual files having the name of the first field in the input data.
          Exactly what I had in mind.. Also, nice job with the script !
          I'll try to change the output to HL7 messages and see if it works (which i'm sure, would). Thanks mourisj..

          Regards,
          Abhi

          Comment


          • #6
            Can you post the updated channel where you were able to convert CSV to many HL7 message?

            Comment

            Working...
            X