Remove active nulls from an entire HL7 message

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Remove active nulls from an entire HL7 message

  • Creator
    Topic
  • #51999
    Dan Loch
    Participant

      Hello,

      I need to remove active nulls from HL7 messages.

    Viewing 3 reply threads
    • Author
      Replies
      • #72648
        James Cobane
        Participant

          Dan,

          You could do a pre-proc to perform a ‘string map’ command to replace the double-quotes:

           set msg [msgget $mh]

           set msg [string map {“” “”} $msg]

           msgset $mh $msg

          But, what does the application send out when they are actually deleting a value from a field?  This is normally how the active nulls are used.

          Hope this helps.

          Jim Cobane

          Henry Ford Health

        • #72649
          Gary Atkinson
          Participant

            One there is way to have Mckesson not send the data this way, I know because I foght this battle before with them  8)   If they will not do this you set-up a pre-proc tcl and do a regsub on the whole msg and replace all “” with nothing.  I am not sure why Mckesson does this as the double quotes are only supposed to be for deletes and not nulls.  As usual nobody wants to follow the standard    ðŸ™„

          • #72650
            Shaun Beckman
            Participant

              We fought the same battle, and use the following post proc.

              proc remove_activenull { 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]

                         regsub -all {“} $msg {} msg

                         msgset $mh $msg

                         lappend dispList “CONTINUE $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

              }

            • #72651
              Michael Lacriola
              Participant

                Know it all to well. Using the hbochi feed instead of the SRI…

                You can use this in IB Tps or OB Tps, your choice

                run {

                      # ‘run’ mode always has a MSGID; fetch and process it

                           keylget args MSGID mh

                set msgdta [msgget $mh]

                regsub -all — {“”} $msgdta {} msgdta

                msgset $mh $msgdta

                           lappend dispList “CONTINUE $mh”

                }

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