returning multiple HL7 messages from a single message input

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf returning multiple HL7 messages from a single message input

  • Creator
    Topic
  • #55536
    Bevan Richards
    Participant

    I have to process a flat file that will have multiple lines in it. I can read the file and and process each line, but I need to pass on a HL7 message for each line I process. How do you ‘return’ multiple messages from a single input message?

Viewing 8 reply threads
  • Author
    Replies
    • #85662
      Jim Kosloskey
      Participant

      Are you doing this all in Tcl or using the Fileset Protocol and an Xlate?

      If you are using the UPoC protocol to read the file, then each message (line in tour case?) you return to Cloverleaf is now a message inside and if using an Xlate you can transform each non-HL/7 message to an HL/7 message.

      If the Fileset Protocol Style, etc. configuration can break your file into individual messages then you won’t need any Tcl to do that and you will still have one message per line to be presented to an Xlate for transformation to an HL/7 message.

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #85663
      Bevan Richards
      Participant

      I had hoped to use just TCL. I am very comfortable with it, not so much Xlates.

      I am running Ver 5.7 rev 2 on a Windows 2008 server.

    • #85664
      Jim Kosloskey
      Participant

      OK well lets start with what protocol are you using to get the file?

      Whatever protocol, once a line is presented to Cloverleaf as a message, then in your route detail, place your transformation proc.

      Or if you are using the UPoC Protocol, you can transform the data right there then specify the routing to the destination.

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #85665
      Dustin Sayes
      Participant

      I think you’ve got numerous options, here is my idea.

      Since you are mainly interested in TCL, I’d loop through my message and save each row to multiple variables that eventually become your msgset. Then loop though each of your variables and set them to msgset as you create your dispList. Then lappend each of your msgset to the dispList, then return the dispList. Will that work?

    • #85666
      MNelson
      Participant

      Couldn’t you just set up multiple routes for the one(same) message and each route sends a different message, or to a different target, or even the same target.

    • #85667
      David Coffey
      Participant

      Multiple HL7 messages from one input message?   For each newly “created” message one would have to create a message handle and do a msgset for each manufactured HL7 message.

      This is simple in TCL, I have no idea how to do this in an XLate.

    • #85668
      Jim Kosloskey
      Participant

      In an Xlate:

      – Issue a SUPPRESS Action (this will make sure no extra message gets generated)

      – do your transformation (BULKCOPY, PATHCOPYs, and/or multiple other Actions).

      – Issue a CONTINUE Action

      – More transformation Actions

      – CONTINUE

      Transforms and CONTINUEs for as many messages as you want to create.

      However, I think the OP really wanted to know how he could get multiple lines in a file to be presented as multiple messages to Cloverleaf. That is different.

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #85669
      Matthew Brophy
      Participant

      Bevan Richards wrote:

      I need to pass on a HL7 message for each line I process.

      Assuming the multiple messages are the result of conditions in the line, this would be done in TCL just like Dustin mentioned.

      I THINK (assume) I understand the ask presented by Bevan.

      start by reading the file, set the variables of each data element, then build a message based on conditions if a field is populated. The key will be to increase your message count ID as you progress, killing it each time you build a message

      Attaching an example of a TCL proc that reads one line of a FRL file, then builds a message depending on if a value is populated.

    • #85670
      Jim Kosloskey
      Participant

      IF that is what is wanted just be aware this could likely be done without Tcl – for those who are not Tcl proficient.

      Not a lot has been revealed regarding the termination characteristics of each message/record in the file.

      However, if that termination characteristic can be specified in the FileSet Style, then the FileSet protocol will extract each message/record from the file and present it to the engine.

      Then route as normal. Inside the route using an Xlate:

      Check the specific fields for qualification (using IF Actions).

      If the condition is such that the message should be discarded, SUPPRESS the message otherwise process the message using appropriate Xlate Actions.

      If a qualifying message is to produce multiple outbound messages follow the directions I specified above.

      If the style cannot specify the termination characteristics, then some Tcl could be constructed to present each message/record to the engine. But the qualification, transformation, and creation of multiple messages from one could still be accomplished as described.

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

Viewing 8 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10