HL7 File through XLATE

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf HL7 File through XLATE

  • Creator
    Topic
  • #55071
    Jon Melin
    Participant

      Hello,

      I have a seemingly easy problem that I can’t seem to solve. I am trying to take a file inbound from a test site that has a DFT HL7 formatted like this:

      Keep in mind there are many messages in this file, so it’s this format below, CR/NL, and then a new message starts in the same file.

      Code:


      MSH|^~&|Source|Company|Destination|Facility|201604251410||DFT^P03|74866|P|2.3|
      EVN|P03|201604251410|01
      PID|1|000000000|000000000^^^^^|0000000|TESTING^TEST^T|
      PV1|1|O|LOCAL||||111^DOC^DOC^D|222^DOC2^DOC2||||||||||||||||||||||||||||||||||||201603171127|
      FT1|1|||20160317||GG|||||||||||||N60.01^^I10~N60.01^^I10~N63^^I10~N63^^I10||||0000000||00000|RT|

      All I am trying to do is grab this data with a file reader and send it through a simple XLT I built. All I am getting in the HL7 tester is MSH, it doesn’t see the rest. I’ve done this will HL7 messages without NL and other things. I’ve tried setting the file reader as single and HL7 and all I get is this output:

      MSH|^~&|Source|Company|Destination|Facility|201604251410||DFT^P03|74866|P|2.3

      EVN

      PID

      FT1

      I know it’s something simple, but I can’t seem to figure it out. Any suggestions?

    Viewing 3 reply threads
    • Author
      Replies
      • #83983
        Jon Melin
        Participant

          I was thinking a screenshot might help explain my file read and output. When I do it without an XLATE in the route I get the same input file on the output structured the same as the input file. When I put it through an XLATE I get what I showed above, just the MSH and nothing else. Here are my inbound/outbound configurations.

        • #83984
          Keith McLeod
          Participant

            Try your style as newline.

            Also another common issue is the segment termination characters within your message.  If the MSH is the only thing recognized as an HL7 message and the rest of the segments are not, then you may have a x0Dx0A as opposed to just a x0D character separating each segment.

            Hope this helps…

          • #83985
            Charlie Bursell
            Participant

              First you must convert to legitimate HL7 messages.  I would do a three step approach like:

              Assume the file is in variable msg

              # First put CR in front of all MSH

              set msg [string map

                $msg

                # Separate segments with CR

                set msg [string map

                 $msg]

                # Now make each message

                msgset $mh “”    ;# This will make msgcopy much faster if large message

                set dispList

                foreach rec [split $msg n] {

                     set nmh [msgcopy $mh]

                      msgset $nmh $rec

                      lappend dispList “CONTINUE $nmh”

                }

                return $dispList

                As always I may have fate-finger something here and I did not run it but you should get the gist of it

            • #83986
              Jon Melin
              Participant

                Thanks everyone. I was able to get this to function. In production they will be sending valid messages, not sure why they sent me these to test with and said they didn’t have any other option for testing.

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