regexp to be used in SMAT tool (text files) for NO ORC

› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › regexp to be used in SMAT tool (text files) for NO ORC

  • Creator
    Topic
  • #55754
    Bob Schmid
    Participant

      Want to search SMATS for ORU’s that do NOT contain an ORC

      have tried some “not conditions” and still haven’t found what im looking for  ðŸ˜•

    Viewing 4 reply threads
    • Author
      Replies
      • #86404
        Keith McLeod
        Participant

          What tool?

          I would add all ORU^R01 to your view and then remove those containing rORC. Let me know if this helps.

        • #86405
          Charlie Bursell
          Participant

            In Tcl, the following expression using negative look-ahead will work.  I have not tried it with SMAT

            {ORU^R01(?!(.*rORC.*))}

          • #86406
            Bob Schmid
            Participant

              Both good ideas.

              I haven’t tried the regexp yet…but will shortly

              Thanks fellas! for taking the time!

              Bob

              Your reward is great (in heaven!)

              😀

            • #86407
              Keith McLeod
              Participant

                On the SMATDB side of the equations it appears like charlies negative lookahead worked…..

                ORU^R01(?!(.*rORC.*))

                Also performed with HL7 and Advanced.

              • #86408
                Charlie Bursell
                Participant

                  You must remember that Tcl regexp default is that a newline is simply a character so the regexp would treat the whole file as as string.  I think SMAT reverses this and, by default, uses newline as end of a string.

                  So for the flat file you need to do something like:

                  regexp -line — {REGEXP}

                  The above would only match the first instance found so for all you would need something like:

                  set LIST [regexp -all -inline -line — {REGEXP}]

                  Of course this assumes your flat file is saved as newline delimited.  It would not work against a .msg file of len10 file.  That would really get hairy!  ðŸ˜€

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