Closed Kiragroh closed 3 years ago
Thanks for posting. I think the issue is in here: https://github.com/cutright/DVH-Analytics/blob/126f204a73adc8009a9d7a0769158d849abf9e6d/dvha/main.py#L897-L900
When multiple entries are provided for the same SQL column, they're combined with an OR
. But I think maybe they should be combined with AND
if the Filter Type is Exclude.
Thanks Dan. With this simple if statement all is working fine.
DVH-Analytics/dvha/main.py Line 897:
` for table in queries:
for col in queries_by_sql_column[table]:
if "!=" in str(queries_by_sql_column[table][col]):
queries[table].append("(%s)" % ' AND '.join(queries_by_sql_column[table][col]))
else:
queries[table].append("(%s)" % ' OR '.join(queries_by_sql_column[table][col]))
queries[table] = ' AND '.join(queries[table])
`
I think that may fail if you have an include and an exclude for the same column? I'll come up with a more robust method this weekend.
You are right. In this case, you get an unwanted Query. But in my Querys it is very unlikely that I mix 'include' and 'exclude' for the same 'category1'. Therefore I am happy about my quick fix. But please add a more robust fix.
Sorry for the delay, it's not the cleanest, but I think it works as expected.
Hi Dan, I tried the newest 0.9.2 branch. I can do anything on my 13'' MacBookPro (BigSur) because the buttons that are cutOff can be access via ContextBar. But Keyboard-Shortcut for Fullscreen (Command+Control+F) or other tricks to get Fullscreen is not working.
fixed in v0.9.2
Nope. Not fixed yet.
Hi Dan,
I encountered a strange thing.
With these query settings MRN exclution is not working.
It works when one MRN-exclusion is present.
Is this normal?