Prescription report

For users or potential users.
Post Reply
mikebarrdds
Posts: 28
Joined: Tue Jun 24, 2014 9:15 pm

Prescription report

Post by mikebarrdds » Sun Dec 24, 2017 11:08 am

I would like to run a report that lists all prescriptions written for a time period (last year, for example).

I went to the example queries page. But, the closest example will do report for a specified time period AND for a specific drug. I want to do it for ALL drugs.

Anyone know how to modify this to accomplish my goal?

SET @FromDate='2009-01-01' , @ToDate='2009-12-31';
SELECT PatNum, RxDate, Drug, Disp, Refills, ProvNum FROM rxpat
WHERE drug LIKE ('%Amoxicillin%') AND
RxDate BETWEEN @FromDate AND @ToDate;

Tom Zaccaria
Posts: 353
Joined: Mon Feb 25, 2008 3:09 am

Re: Prescription report

Post by Tom Zaccaria » Mon Dec 25, 2017 2:50 am

Try this

SET @FromDate='2017-01-01' , @ToDate='2017-12-31';
SELECT PatNum, RxDate, Drug, Disp, Refills, ProvNum
FROM rxpat
WHERE RxDate BETWEEN @FromDate AND @ToDate;

drtmz

mikebarrdds
Posts: 28
Joined: Tue Jun 24, 2014 9:15 pm

Re: Prescription report

Post by mikebarrdds » Thu Jan 11, 2018 4:37 pm

That worked! Thanks!

Post Reply