Regular Expression in SMAT

Clovertech Forums Read Only Archives Cloverleaf General Regular Expression in SMAT

  • Creator
    Topic
  • #50297
    Keith McLeod
    Participant

      What is the language behind the regular expression usage in SMAT.  I am looking to see if I can search in SMAT for messages that have ‘&’ in other locations besides directly after MSH in MSH:2.  I am able to do this in other tools but though it would be nice to apply it in SMAT directly.  I understand I will probably get a lot of hits if there are many messages with the ‘&’ character in fields as part of the HL7 convention.  But lets say I want to find messages where the ‘&’ falls between 2 pipes or 2 carats or a combination of pipe and carat.

      Example |History & Physical|^R&D|^Bob & Bill^|

      Can this be done using the SMAT regular expression location?

    Viewing 1 reply thread
    • Author
      Replies
      • #65526
        Tom Rioux
        Participant

          Since most of the time you would see the & symbol preceded by and/or followed by a space, you can simply enter ” &” (that is a space then the symbol) into the regular expression search field in SMAT.  That would return instances such as:

          History & Physical

          Bob & Bill

          However, if you are looking to return those that may be preceeded and/or followed by the field separator pipe, you would need to use the backslash in your regular expression search.  To find something like “|&|” you would enter the reguar expression search as “|&|” or just simply “|&”.

          In either instances, you are not just returning all messages because of the one listed in MSH.2.

          Hope this helps….

          Tom Rioux

          Baylor Health Care System

        • #65527
          John Mercogliano
          Participant

            Keith,

             I use the following regular expression in the Smat tool to find messages with more then 1 ampersand:

            Code:


            .*&.*&

            Hope this helps,

            John Mercogliano
            Sentara Healthcare
            Hampton Roads, VA

        Viewing 1 reply thread
        • The forum ‘General’ is closed to new topics and replies.