Page 1 of 1

Prescription report

Posted: Sun Dec 24, 2017 11:08 am
by mikebarrdds
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;

Re: Prescription report

Posted: Mon Dec 25, 2017 2:50 am
by Tom Zaccaria
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

Re: Prescription report

Posted: Thu Jan 11, 2018 4:37 pm
by mikebarrdds
That worked! Thanks!