HL7 to text file

  • Creator
    Topic
  • #53704
    Gina Borden
    Participant

    I am wondering if I could get some suggestions on the best way to use the data from an HL7 Order Message to format a text file like the image attached.

    Thanks so much,

    Gina

Viewing 4 reply threads
  • Author
    Replies
    • #78647
      Jim Kosloskey
      Participant

      I suppose this could be accomplished in an Xlate using probably an HRL with FRL (or maybe VRL) segments for the outbound

      The big challenge there as I see it is to accomodate repetitions in the HRL that would retain the look wanted by the receiving system.

      Of course you can also use Tcl for this.

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

    • #78648
      Gina Borden
      Participant

      I’m not familiar with HRL, I see that it lets you name segments, but I’m not sure how that would help with this?  I’m also not great with tcl, I just do the basics.

      I have a VRL set up with the data elements I need.  I’m just not sure what the next step should be.

      Thanks,

      Gina

    • #78649
      Brandon Grudt
      Participant

      Gina,

      I am new myself.  My best advice, use Google to find the TCL commands you’d like to use.  I knew nothing about TCL (or much about coding in general) but successfully put together a volume reporting feature on our Cloverleaf Engine by searching the internet for code snippets.  I was able to create a directory of text files that were organized pretty intuitively.

      A broad solution is that you will want to break down the message using the delimiters and assign the specific fields to variables.  After that you will want to format the output using tabs and newlines, along with your stored variables.

      A few searches you may want to perform:

      “TCL open and write to text file”

      “TCL list commands”

      “TCL splitting a string”

      TCL seems intimidating, but using the Testing tool in Cloverleaf can help out a lot.  If you create the TCL in Cloverleaf, you’ll be able to see the output using the Testing tool.

    • #78650
      Robert Milfajt
      Participant

      Gina Borden wrote:

      I’m not familiar with HRL, I see that it lets you name segments, but I’m not sure how that would help with this?

      Robert Milfajt
      Northwestern Medicine
      Chicago, IL

    • #78651

      Gina, a tclproc would probably be the “best” way to do this if you or someone on your team has a decent knowledge of tcl.

      You could read in the message, parse it as desired and print the output to a file. And then you would have the engine kill the message.

      -- Max Drown (Infor)

Viewing 4 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,432
Topic Tags
286
Empty Topic Tags
10