{"action":"opened","issue":{"url":"https://api.github.com/repos/redivis/help/issues/20","repository_url":"https://api.github.com/repos/redivis/help","labels_url":"https://api.github.com/repos/redivis/help/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/redivis/help/issues/20/comments","events_url":"https://api.github.com/repos/redivis/help/issues/20/events","html_url":"https://github.com/redivis/help/issues/20","id":346302498,"node_id":"MDU6SXNzdWUzNDYzMDI0OTg=","number":20,"title":"Question on filtering","user":{"login":"JKoltsov","id":34384934,"node_id":"MDQ6VXNlcjM0Mzg0OTM0","avatar_url":"https://avatars2.githubusercontent.com/u/34384934?v=4","gravatar_id":"","url":"https://api.github.com/users/JKoltsov","html_url":"https://github.com/JKoltsov","followers_url":"https://api.github.com/users/JKoltsov/followers","following_url":"https://api.github.com/users/JKoltsov/following{/other_user}","gists_url":"https://api.github.com/users/JKoltsov/gists{/gist_id}","starred_url":"https://api.github.com/users/JKoltsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JKoltsov/subscriptions","organizations_url":"https://api.github.com/users/JKoltsov/orgs","repos_url":"https://api.github.com/users/JKoltsov/repos","events_url":"https://api.github.com/users/JKoltsov/events{/privacy}","received_events_url":"https://api.github.com/users/JKoltsov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-31T18:16:12Z","updated_at":"2018-07-31T18:16:12Z","closed_at":null,"author_association":"NONE","body":"Hi!  One of my filters worked in a way that I didn't expect and I was curious as to why/if I did something wrong on my end with the logic.\r\n\r\nI had the following filter for the Truven outpatient services:\r\nFilter by\r\nproc1 = list of 3 procedure codes AND\r\nany of dx1, dx2, dx3, dx4 = list of 9 diagnoses codes\r\n\r\nWhen I ran this, I ended up with over 11 million records for 5 million unique patients.  This is way too many.\r\n\r\nHowever, when I split the filtering step to first do the transform:\r\nFilter by proc1 = list of 3 procedure codes\r\n\r\nand then in a separate tranform:\r\nFilter by dx1, dx2, dx3, dx4 = list of 9 diagnoses codes\r\n\r\nThen I get ~200k records for roughly 134k patients, which is what I should have.\r\n\r\nWhy did filtering for those two things with the AND logic not work? I was getting a ton of different procedure codes that weren't in my list of 3."}}
{"actor":{"display_login":"JKoltsov"}}