tpsScanDir and Style:HL7

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf tpsScanDir and Style:HL7

  • Creator
    Topic
  • #49445

    I’m confused about something (not hard to do, I know).

    I have an inbound flat file containing HL7 messages with mlp wrapping. All of the messages are on one big line with each message beginning with ^K (hex 0b) and ending with ^^M (hex 1c0d).

    Directory: /data/……

    Style: HL7

    Directory Parse: tpsScanDir

    Nothing is being sent to my scripts in the inbound tab. I have two scripts, tpstintout and tpsPuts (which simply outputs the contents of the message for degbugging). The HL7 messages are not getting to the inbound tab.

    Help!

    -- Max Drown (Infor)

Viewing 5 reply threads
  • Author
    Replies
    • #61995
      Jim Kosloskey
      Participant

        Max,

        Could tpsScanDir be causing the file list to be empty?

        Jim Kosloskey

        email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

      • #61996

        It’s possible. Doesn’t tpsScanDir come from Quovadx?

        -- Max Drown (Infor)

      • #61997
        Jim Kosloskey
        Participant

          Max,

          I don’t know if it is part of the release – but I don’t find it on 5.2.

          A Quovadx implementer may have provided it or it may have been written by someone in your shop.

          In any case, take a look at the proc and see if its use could result in an empty file list being returned to Cloverleaf(R). If the list is empty or indicates files which do not really exist, you won’t get any data at the Inbound TPS.

          Jim Kosloskey

          email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

        • #61998

          Do you have a good directory parse script that you could share? I’m trying not to reinvent the wheel.

          -- Max Drown (Infor)

        • #61999
          Jim Kosloskey
          Participant

            Max,

            Email me and we will discuss.

            Thanks,

            Jim Kosloskey

            email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

          • #62000

            Here’s my solution …

            tpsScanDir (dir parse) –> tpsSplitHL7.tcl (inbound tps) –> routes/xlates

            Code:

            ######################################################################
            # Name:         tpsSplitHL7
            # Purpose:      
            # UPoC type:    tps
            # Args:         tps keyedlist containing the following keys:
            #               MODE    run mode (”start”, “run” or “time”)
            #               MSGID   message handle
            #               ARGS    user-supplied arguments:
            #                      
            #
            # Returns: tps disposition list:
            #          

            #

            proc tpsSplitHL7 { args } {
               keylget args MODE mode                      ;# Fetch mode

               set dispList {}                             ;# Nothing to return

               switch -exact — $mode {
                   start {
                       # Perform special init functions
                       # N.B.: there may or may not be a MSGID key in args
                   }

                   run {
                       # ‘run’ mode always has a MSGID; fetch and process it
                       keylget args MSGID mh

                       set msg [msgget $mh]

                       set allMessages [split $msg xb]
                       foreach oneMessage $allMessages {
                           regsub -all — {x1c} $oneMessage {} oneMessage
                           if {$oneMessage != “”} {
                               #puts [join $oneMessage xd]
                               set new_mh [msgcopy $mh]
                               #msgset $new_mh [join $oneMessage xd]
                               msgset $new_mh $oneMessage
                               lappend dispList “CONTINUE $new_mh”
                           }
                       }
                       lappend dispList “KILL $mh”
                   }

                   time {
                       # Timer-based processing
                       # N.B.: there may or may not be a MSGID key in args
                   }

                   shutdown {
                       # Doing some clean-up work
                   }
               }

               return $dispList
            }

            -- Max Drown (Infor)

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