Page 1 of 1

Report of Pre-d's

Posted: Thu Sep 27, 2007 8:56 am
by Anthony J Turner
We have been enetering pre determinations received as they come in but they drop off the aged ins list. Could someone give me the script for a sql query for pulling up the list?

Posted: Thu Sep 27, 2007 12:07 pm
by drtech
select DateReceived, PatNum, ClaimStatus, DateSent, ClaimFee from claim
where claimtype="PreAuth" AND DateReceived>'2007-05-01' OR Claimtype="PreAuth" AND DateReceived<='0001-01-01'
Order By DateReceived DESC



and you can change the date up there that says 2007-05-01 to include however many you want.

Posted: Thu Sep 27, 2007 12:47 pm
by jordansparks
Wouldn't you have to put in some parentheses?

select DateReceived, PatNum, ClaimStatus, DateSent, ClaimFee from claim
where (claimtype="PreAuth" AND DateReceived>'2007-05-01')
OR (Claimtype="PreAuth" AND DateReceived<='0001-01-01')
Order By DateReceived

Posted: Thu Sep 27, 2007 6:38 pm
by drtech
for clarity, yes, but I think mySQL treats everything on either side of the OR like it has parentheses...b/c I get the same result.

Posted: Fri Sep 28, 2007 10:25 am
by Anthony J Turner
Thanks

Posted: Fri Sep 28, 2007 10:30 am
by Anthony J Turner
Thanks