2 Replies Latest reply: Oct 31, 2017 2:09 AM by Jonathan Dienst RSS

    Exclude value using wildcard

    Brandon Droy

      Among a few other names I am looking to exclude, I need 123Test to be excluded. This is the last name for all of our test patients, so I do not want it in my data. I have tried multiple variations but my data continues to have these patients. Please let me know what is wrong with my formula below. As an example a test patients name is 123Test, Cathy.

       

      WildMatch(Upper(ApplyMap('PatientNameMap', patientID, Null())), 'TEST,*', '*, TEST', '*TEST1*', '*123Test*', '123Test,', '123Test*', '123Test,*', '123Test, *', '*TEST2*', '*TEST3*', '*TEST4*', '*RESEARCH*', '*MEETING*', '*MTG, *')=0

        • Re: Exclude value using wildcard
          Shraddha Gajare

          If you are doing this in Load Script,

           

          Then try

           

          Load *

          where not wildmatch(PatientName,'TEST,*', '*, TEST', '*TEST1*', '*123Test*', '123Test,', '123Test*', '123Test,*', '123Test, *', '*TEST2*', '*TEST3*', '*TEST4*', '*RESEARCH*', '*MEETING*', '*MTG, *');

          Load *,

          Upper(ApplyMap('PatientNameMap', patientID, Null()))) as PatientName

           

          From .....

          ;

          • Re: Exclude value using wildcard
            Jonathan Dienst

            Your WildMatch() = 0 looks OK*, so I suspect the problem may be in your mapping. Not and =0 are functionally the same thing.

             

            *except for some unnecessary redundancy

            '*123Test*' will cover all these as well: '123Test', '123Test*', '123Test,*', '123Test, *'

            WildMatch() is case insensitve, so the Upper() is also redundant. "123Test" is not uppercase anyway.