Filter a message based on Results Status

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Filter a message based on Results Status

  • Creator
    Topic
  • #50533
    Alka Sharma
    Participant

      Hi Everyone,

      I would like to know the best way possible to tackle the scenario below:

      Our Radiology system source messages look like this:

      000001046MSH|^~&|RAD|UCHC|||200812231014||ORU|RMS|P|2.3||

      PID|1|000T99000651|000009002257|000000014146|TEST^PEAR^^^||197805060000|F|

      PV1||O|IC2^IC2^^UCHC||||008320^MENOUTIS MD^JOHN^|008320^MENOUTIS MD^JOHN|^^|ORA|||||N^N^U||008320^MENOUTIS MD^JOHN^||000000014146||||||||||||||||||||UCHC|

      OBR||                    ^               |97150|CAT4230015 ^CT HEAD W + WO CONTRAST         |||200812230952|||DMC|||||^^^ |008320^JOHN MENOUTIS MD||||||200812231014|||||1^^^^^R^^ROUTINE|||||999991&DEFAULT&DOCTOR&&&|

      NTE|||TEST FOR NEXT GEN            

      OBX|1|TX|CAT0015GDT||COMPUTERIZED AXIAL TOMOGRAPHY REPORT~***Preliminary Addendum****~~CAT 0015 – CT HEAD W + WO CONTRAST  (A#:97150,12/23/2008)~INDICATIONS:  TEST FOR NEXT GEN~~Addendum to correct result.~~RESULT:  ~Test result for Next Gen.~~~IMPRESSION:  ~Test result for Next Gen.~~TECHNOLOGIST: DMC~~~~~Interpreting Physician: DOCTOR DEFAULT   on 12/23/2008 10:11~Reviewed By:  ~Transcribed by / Date: DMC on 12/23/2008 10:07~Approved Electronically by / Date:   on  ~Distribution: JOHN MENOUTIS MD~||||||C|

      0000001067MSH|^~&|RAD|UCHC|||200812231017||ORU|RMS|P|2.3||

      PID|1|000T99000651|000009002257|000000014146|TEST^PEAR^^^||197805060000|F|

      PV1||O|IC2^IC2^^UCHC||||008320^MENOUTIS MD^JOHN^|008320^MENOUTIS MD^JOHN|^^|ORA|||||N^N^U||008320^MENOUTIS MD^JOHN^||000000014146||||||||||||||||||||UCHC|

      OBR||                    ^               |97150|CAT4230015 ^CT HEAD W + WO CONTRAST         |||200812230952|||DMC|||||^^^ |008320^JOHN MENOUTIS MD||||||200812231017|||||1^^^^^R^^ROUTINE|||||999991&DEFAULT&DOCTOR&&&|

      NTE|||TEST FOR NEXT GEN            

      OBX|1|TX|CAT0015GDT||COMPUTERIZED AXIAL TOMOGRAPHY REPORT~***Final Addendum***~~CAT 0015 – CT HEAD W + WO CONTRAST  (A#:97150,12/23/2008)~INDICATIONS:  TEST FOR NEXT GEN~~Addendum to correct result.~~RESULT:  ~Test result for Next Gen.~~~IMPRESSION:  ~Test result for Next Gen.~~TECHNOLOGIST: DMC~~~~~Interpreting Physician: DOCTOR DEFAULT   on 12/23/2008 10:11~Reviewed By:  ~Transcribed by / Date: DMC on 12/23/2008 10:07~Approved Electronically by / Date: DOCTOR DEFAULT on 12/23/2008 10:17~Distribution: JOHN MENOUTIS MD~||||||C|

      As you can see that all the result come in one obx. Before I send it out to NextGen, I am spliting it on ~ and sending out multiple OBX’s. Nextgen do not want any preliminary results and I am filtering it out using a preproc. The result status comes in P, C and F. My filtering looks for P in the last field of OBX and kills the message. My problem is that NextGen would like Final addendum which comes with a status of C. Preliminary Addendum also comes with a status of C. The string will always have either ***Preliminary Addendum*** or ***Final Addendum*** with a flag of C in OBX 11. How can I search msg and If I find the string ***Preliminary Addendum***, Kill the message. I have written a post proc but I think I should kill before the xlate. Any help is greatly appreciated.

    Viewing 4 reply threads
    • Author
      Replies
      • #66499
        Michael Hertel
        Participant

          You could save yourself a lot of time and trouble

          by using the “string first” command.

          if {[string first *Preliminary Addendum* [msgget $mh]] > -1} {return “{KILL $mh}”}

        • #66500
          Michael Hertel
          Participant

            I goofed… add the double quotes…

            if {[string first “*Preliminary Addendum*” [msgget $mh]] > -1} {return “{KILL $mh}”}

          • #66501
            Alka Sharma
            Participant

              Thanks! It works. Have a good holiday

            • #66502
              Michael Hertel
              Participant

                Here’s your cleaned up proc:

                #———————————————————————————
                #
                [code]
                #


                #

              • #66503
                Tom Rioux
                Participant

                  My question is if you already have an xlate in place for the message, why are you using a tclproc to kill the message?  I know some like to keep it separate so that it makes the kill more readily identifiable in the TPS stack.  However, this is also another point of failure and can get cumbersome in testing, depending on the number of tclprocs in your TPS stack.

                  I am assuming in your xlate you are iterating through the OBX.5 field anyway, so why not throw an IF statement in your xlate that checks for the preliminary verbage and then if the condition is met, SUPPRESS the message.  I would add that if you do suppress the message place a comment in your IF statement saying that you are suppressing the message and the reason why?  It will save you headaches when testing later.

                  Just another way to skin that darn cat…

                  Tom Rioux

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