Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Combine many Where Clauses into one in script?

I have been trying for days now to write these parameters into my script with no luck.  I keep searching but can’t find anything that works. Your time and help is gratefully appreciated.

I’m trying to load the following script, but I need a way to combine the Where clause into one.  I can run them all independently, but can’t seem to figure a way to combine them.

LOAD

     [Code],

     [Diagnosis Date & Time],

     [Medical Service],

     Organization,

     [Person Alias]

    

FROM

(ooxml, embedded labels, header is 3 lines, table is [Report 1])

Where Match(Left([ICD10 Diagnosis Code],1),'D')

Where Match(Left([ICD10 Diagnosis Code],3),'C44')

Where Match(Left([ICD10 Diagnosis Code],4),'R856',’R876’)

Then I have a list of codes that I need to exclude: ('C443.2', ‘C449.32’,'D01.0', ‘D03.4’)

1 Solution

Accepted Solutions
MarcoWedel

Where WildMatch([ICD10 Diagnosis Code],'D*','C44*','R856*',’R876*’) and not Match([ICD10 Diagnosis Code],'C443.2', ‘C449.32’,'D01.0', ‘D03.4’)



hope this helps


regards


Marco

View solution in original post

3 Replies
MarcoWedel

Where WildMatch([ICD10 Diagnosis Code],'D*','C44*','R856*',’R876*’) and not Match([ICD10 Diagnosis Code],'C443.2', ‘C449.32’,'D01.0', ‘D03.4’)



hope this helps


regards


Marco

MarcoWedel

or another one using your expressions:

Where (Match(Left([ICD10 Diagnosis Code],1),'D') or Match(Left([ICD10 Diagnosis Code],3),'C44') or Match(Left([ICD10 Diagnosis Code],4),'R856',’R876’)) and not Match([ICD10 Diagnosis Code],'C443.2', ‘C449.32’,'D01.0', ‘D03.4’)

Anonymous
Not applicable
Author

This worked like a charm! Thank you so much Marco!