Continue/Kill message based on a value

Clovertech Forums Cloverleaf Continue/Kill message based on a value

  • Creator
    Topic
  • #115151
    Rich
    Participant

      If my RXA-9.1 contains 00, I need to send the message, but any other value I need to kill the message.  What’s the best way to do that?

       

      Thanks in advance!

      Rich

    Viewing 2 reply threads
    • Author
      Replies
      • #115162
        Robert Kersemakers
        Participant

          The best way to do this is before the message is translated, because translation takes a lot of resource (compared to the rest of the flow). So best is to do this in routing, in Pre Procs with a tcl-proc.

          I normally use the gc_filterHL7msgUsingFieldValue for this; not sure if this is a standard proc for everyone. With this proc you can kill/continue messages based on (regexp) values of a specified (sub)field. In your case the parameters for this proc would be:

          {SEGMENT RXA} {FIELD 9} {SUBFIELD 0} {TYPE equal} {VALUE 00} {MODE CONTINUE} {NONMATCH KILL}

          Attached another example in a test-routing.

           

          Attachments:
          You must be logged in to view attached files.

          Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

          • #115167
            Rich
            Participant

              Perfect, thank yo so much for your time!

          • #115168
            Jim Kosloskey
            Participant

              Just so you are aware another option is to use the Xlate to SUPPRESS the message.

              Not everyone has Tcl coding capability or access to generic filtering procs.

               

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

            • #115262
              Matthew Brophy
              Participant

                if your filtering criteria is simple (one field / non-iterating), the incoming procedure is where you’d want to define it.

                Using the generic proc to handle arguments is a modular method to be used for any thread’s filtering.  Attached is generic proc that can use a list, range or even a lookup table. Put the generic proc in your master site so it is 1) central and 2) there is no other derivative in your environment.

                Call the procedure in the route pre proc, then supply the arguments (below)

                List space-delimited

                {FILTERLIST {HMSH RPBH LECH}} {DISP KILL} {SEG PV1} {FLD 3} {CMP 3} {COMMENT {Remove facilities based on facility in PV1.3.4}}​

                Contain range

                {FILTERRANGE {EDMA MROH}} {DISP CONTINUE} {SEG PV1} {FLD 3} {CMP 0} {START 0} {END 3} {COMMENT {filter messages based on PV1.3.1}}

                Lookup table

                {FILTERTBL {rxstrategies_facilities.tbl}} {DISP CONTINUE} {SEG PV1} {FLD 3} {CMP 3} {COMMENT {send if facility is found in table}}​

                If it gets more involved than filtering like this, the xlate (suppress) criteria is an easy way to handle messages

                Attachments:
                You must be logged in to view attached files.
            Viewing 2 reply threads
            • You must be logged in to reply to this topic.